x86: use local variable in check_VecOperands()
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
ce29f843
AA
12018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2
3 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
4 S390_TDESC_GS.
5 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
6 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
7 and init_registers_s390_gs_linux64.
8
c49bd90b
AA
92018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
10
11 * linux-s390-low.c (s390_fill_gs): Remove function.
12 (s390_fill_gsbc): Remove function.
13 (s390_regsets): Set fill functions for the guarded storage regsets
14 to NULL.
15
7edb9bd3
AA
162018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
17
18 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
19 the word size. Add comment.
20 (s390_get_wordsize): New function.
21 (s390_arch_setup): No longer select a temporary tdesc to fetch the
22 pswm with it. Instead, use s390_get_wordsize to determine the
23 word size first and derive the correct tdesc from that directly.
24
39be3c7e
SM
252018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
26
27 * Makefile.in: Include silent-rules.mk.
28 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
29 (COMPILE): Add ECHO_CXX.
30 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
31 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
32 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
33 (version-generated.c): Add ECHO_GEN.
34 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
35 (IPAGENT_COMPILE): Add ECHO_CXX.
36 (%-generated.c): Add ECHO_REGDAT.
37
3ae9ce5d
TT
382018-03-14 Tom Tromey <tom@tromey.com>
39
40 PR cli/14977:
41 * ax.c (ax_printf): Special case for NULL.
42
e6a58aa8
SM
432018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
44
45 * linux-low.c (linux_qxfer_libraries_svr4): Use
46 xml_escape_text_append.
47
f6e8a41e
SM
482018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
49
50 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
51
b9671caf
SM
522018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
53
54 * server.c (handle_general_set): Remove unnecessary xstrdup.
55
e80aaf61
SM
562018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
57
58 * server.c (parse_debug_format_options): Adjust to
59 delim_string_to_char_ptr_vec changes.
60 * thread-db.c (thread_db_load_search): Adjust to
61 dirnames_to_char_ptr_vec changes.
62
b1223e78
MM
632018-03-01 Markus Metzger <markus.t.metzger@intel.com>
64
65 * target.h (target_enable_btrace, target_disable_btrace)
66 (target_read_btrace, target_read_btrace_conf): Turn macro into
67 inline function. Throw error if target method is not defined.
68 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
69 check for btrace target method. Be prepared to handle exceptions
70 from btrace target methods.
71
81561546
SDJ
722018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
73
74 * server.c (captured_main): Change order of error message printed
75 when the current working directory cannot be found.
76
25e3c82c
SDJ
772018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
78
79 * server.c: Include "filenames.h" and "pathstuff.h".
80 (program_name): Delete variable.
81 (program_path): New anonymous class.
82 (get_exec_wrapper): Use "program_path" instead of
83 "program_name".
84 (handle_v_run): Likewise.
85 (captured_main): Likewise.
86 (process_serial_event): Likewise.
87
b4987c95
SDJ
882018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
89
90 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
91 (OBJS): Add "pathstuff.o".
92 * server.c (current_directory): New global variable.
93 (captured_main): Initialize "current_directory".
94
f46cd62a
AH
952018-02-26 Alan Hayward <alan.hayward@arm.com>
96
97 * tdesc.c: Use common/tdesc.h.
98 * tdesc.h: Likewise.
99
a543c5ca
AH
1002018-02-20 Alan Hayward <alan.hayward@arm.com>
101 Simon Marchi <simon.marchi@ericsson.com>
102
103 * Makefile.in: Switch order of make rules.
104
b5884fa7
AH
1052018-02-19 Alan Hayward <alan.hayward@arm.com>
106
107 * Makefile.in: Add common directory in build.
108 * configure.ac: Add common reference.
109 * configure: Regenerate.
110
de6242d3
MM
1112018-02-09 Markus Metzger <markus.t.metzger@intel.com>
112
113 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
114 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
115 * spu-low.c (spu_target_ops): Likewise.
116 * win32-low.c (win32_target_ops): Likewise.
117 * server.c (supported_btrace_packets): Report packets unconditionally.
118 * target.h (target_ops) <supports_btrace>: Remove.
119 (target_supports_btrace): Remove.
120
9ee23a85
MM
1212018-02-09 Markus Metzger <markus.t.metzger@intel.com>
122
123 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
124 (handle_btrace_disable): Change return type to void. Use exceptions
125 to report errors.
126 (handle_btrace_general_set): Catch exception and copy message to
127 return message.
128
8ce47547
TT
1292018-02-08 Tom Tromey <tom@tromey.com>
130
131 * linux-low.c (install_software_single_step_breakpoints): Use
132 make_scoped_restore.
133 * inferiors.c (make_cleanup_restore_current_thread): Remove.
134 (do_restore_current_thread_cleanup): Remove.
135 * gdbthread.h (make_cleanup_restore_current_thread): Don't
136 declare.
137
45dd3607
TT
1382018-02-08 Tom Tromey <tom@tromey.com>
139
140 * mem-break.c (set_raw_breakpoint_at): Use
141 gdb::unique_xmalloc_ptr.
142
e671cd59
PA
1432018-01-30 Pedro Alves <palves@redhat.com>
144
145 PR gdb/13211
146 * target.c (target_terminal::terminal_state): Rename to ...
147 (target_terminal::m_terminal_state): ... this.
148
a0aad537
JC
1492018-01-19 James Clarke <jrtc27@jrtc27.com>
150
151 * linux-low.c (handle_extended_wait): Surround call to
152 thread_db_notice_clone with #ifdef USE_THREAD_DB.
153
4d9b86e1
SM
1542018-01-17 Simon Marchi <simon.marchi@ericsson.com>
155
156 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
157 linux_ptrace_attach_fail_reason_string now returning an
158 std::string.
159 (linux_attach): Likewise.
160 * thread-db.c (attach_thread): Likewise.
161
f517c180
EA
1622018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
163
164 PR gdb/21559
165 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
166 checking for fs_base/gs_base fields in struct user_regs_struct.
167 * configure: Regenerate.
168
9a70f35c
YQ
1692018-01-16 Yao Qi <yao.qi@linaro.org>
170
171 PR gdb/18749
172 * linux-low.c (fetch_register): Call supply_register instead of
173 error.
174
605fd3c6
YQ
1752018-01-08 Yao Qi <yao.qi@linaro.org>
176 Simon Marchi <simon.marchi@ericsson.com>
177
178 * Makefile.in (OBS): Remove selftest.o.
179 * configure.ac: Set srv_selftest_objs if $development is true.
180 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
181 * configure: Re-generated.
182 * server.c (captured_main): Wrap variable selftest_filter with
183 GDB_SELF_TEST.
184
2cc05030
SM
1852018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
186
187 * server.c (parse_debug_format_options): Return std::string.
188 (handle_monitor_command, captured_main): Adjust.
189
e379cee6
PA
1902018-01-05 Pedro Alves <palves@redhat.com>
191
192 PR gdb/18653
193 * server.c (captured_main): Pass quiet=false to
194 save_original_signals_state.
195
82e1e79a
JB
1962018-01-01 Joel Brobecker <brobecker@adacore.com>
197
198 * gdbreplay.c (gdbreplay_version): Update copyright year in
199 version message.
200 * server.c (gdbserver_version): Likewise.
201
8e481c3b
TT
2022017-12-08 Tom Tromey <tom@tromey.com>
203
204 * ax.c (ax_printf): Update.
205
a8806230
YQ
2062017-12-07 Yao Qi <yao.qi@linaro.org>
207
208 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
209 aarch64_linux_read_description.
210 * linux-amd64-ipa.c (idx2mask): New array.
211 (get_ipa_tdesc): Move idx2mask out.
212 (initialize_low_tracepoint): Initialize target descriptions.
213 * linux-i386-ipa.c (idx2mask): New array.
214 (get_ipa_tdesc): Move idx2mask out.
215 (initialize_low_tracepoint): Initialize target descriptions.
216
d4a0e8b5
SM
2172017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
218
219 * tdesc.c (struct tdesc_type): Change return type.
220 (tdesc_add_flag): Change parameter type.
221 (tdesc_add_bitfield): Likewise.
222 (tdesc_add_field): Likewise.
223 (tdesc_set_struct_size): Likewise.
224
798a7429
SM
2252017-12-05 Simon Marchi <simon.marchi@ericsson.com>
226
227 * regcache.c (registers_to_string): Remove unused variable.
228
c0e15c9b
SM
2292017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
230
231 * inferiors.c (for_each_inferior_with_data): Remove.
232 * inferiors.h (for_each_inferior_with_data): Remove.
233 * server.c (handle_qxfer_threads_worker): Change parameter type.
234 (handle_qxfer_threads_proper): Use for_each_thread.
235
f0045347
SM
2362017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
237
238 * inferiors.c (for_each_inferior): Remove.
239 (clear_inferiors): Use for_each_thread.
240 * inferiors.h (for_each_inferior): Remove.
241 * linux-low.c (linux_wait_for_event_filtered): Use
242 for_each_thread.
243 (linux_stabilize_threads): Likewise.
244 * regcache.c (regcache_release): Likewise.
245 * server.c (gdb_wants_all_threads_stopped): Likewise.
246 (clear_pending_status_callback): Remove.
247 (handle_status): Use for_each_thread.
248 (captured_main): Likewise.
249 * win32-low.c (child_init_thread_list): Likewise.
250 (win32_clear_inferiors): Likewise.
251 (fake_breakpoint_event): Likewise.
252
9521758b
SM
2532017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
254
255 * inferiors.h (find_inferior): Remove.
256 * inferiors.c (find_inferior): Remove.
257
8f86d7aa
SM
2582017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
259
260 * linux-low.c (resume_status_pending_p): Update comment.
261 (need_step_over_p): Update comment.
262
e2b44075
SM
2632017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
264
265 * linux-low.c (proceed_one_lwp): Return void, change parameter
266 type.
267 (unsuspend_and_proceed_one_lwp): Likewise.
268 (proceed_all_lwps): Use for_each_thread.
269 (unstop_all_lwps): Likewise.
270
c80825ff
SM
2712017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
272
273 * linux-low.c (linux_resume_one_thread): Return void, take
274 parameter directly.
275 (linux_resume): Use for_each_thread.
276
df3e4dbe
SM
2772017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
278
279 * linux-low.c (send_sigstop_callback): Return void, change
280 parameter type. Rename to...
281 (send_sigstop): ... this.
282 (suspend_and_send_sigstop_callback): Return void, change parameter
283 type. Rename to...
284 (suspend_and_send_sigstop): ... this.
285 (stop_all_lwps): Use for_each_thread.
286
5a6b0a41
SM
2872017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
288
289 * linux-low.c (lwp_running): Return bool, remove unused
290 argument.
291 (linux_stabilize_threads): Use find_thread.
292
39a64da5
SM
2932017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
294
295 * linux-low.c (select_singlestep_lwp_callback): Remove.
296 (count_events_callback): Remove.
297 (select_event_lwp_callback): Remove.
298 (select_event_lwp): Use find_thread/for_each_thread.
299
a1385b7b
SM
3002017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
301
302 * linux-low.c (not_stopped_callback): Return bool, take filter
303 argument directly.
304 (linux_wait_for_event_filtered): Use find_thread.
305 (linux_wait_1): Likewise.
306
454296a2
SM
3072017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
308
309 * linux-low.c (same_lwp): Remove.
310 (find_lwp_pid): Use find_thread.
311
6b2a85da
SM
3122017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
313
314 * linux-low.c (delete_lwp_callback): Remove.
315 (linux_mourn): Use for_each_thread.
316
798a38e8
SM
3172017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
318
319 * linux-low.c (linux_detach_lwp_callback): Return void, remove
320 args parameter, don't check for pid.
321 (linux_detach): Use for_each_thread.
322
e4eb0dec
SM
3232017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
324
325 * linux-low.c (struct counter): Remove.
326 (second_thread_of_pid_p): Remove.
327 (last_thread_of_process_p): Use find_thread.
328
83e1b6c1
SM
3292017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
330
331 * inferiors.c (find_inferior_in_random): Remove.
332 * inferiors.h (find_inferior_in_random): Remove.
333 * linux-low.c (status_pending_p_callback): Return bool, accept
334 parameter ptid directly.
335 (linux_wait_for_event_filtered): Use find_thread_in_random.
336 (linux_wait_1): Likewise.
337
8dc7b443
SM
3382017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
339
340 * inferiors.c (find_inferior_id): Remove.
341 (find_thread_ptid): Move implemention from find_inferior_id to
342 here.
343 * inferiors.h (find_inferior_id): Remove.
344 * server.c (handle_status): Use find_thread_ptid.
345 (process_serial_event): Likewise.
346 * thread-db.c (find_one_thread): Likewise.
347 (thread_db_thread_handle): Likewise.
348 * win32-low.c (thread_rec): Likewise.
349 (child_delete_thread): Likewise.
350 (win32_thread_alive): Likewise.
351 (get_child_debug_event): Likewise.
352
da25033c
SM
3532017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
354
355 * linux-mips-low.c (update_watch_registers_callback): Return
356 void, remove pid_p parameter, don't check for pid.
357 (mips_insert_point, mips_remove_point): Use for_each_thread.
358
c91bb56b
SM
3592017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
360
361 * lynx.low (lynx_delete_thread_callback): Remove.
362 (lynx_mourn): Use for_each_thread.
363
634a3254
SM
3642017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
365
366 * regcache.c (regcache_invalidate_one): Remove.
367 (regcache_invalidate_pid): use for_each_thread.
368
41272101
TT
3692017-11-26 Tom Tromey <tom@tromey.com>
370
371 * linux-low.c (linux_create_inferior): Update.
372
f5291a6f
UW
3732017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
374
375 * spu-low.c (spu_create_inferior): Fix typo in argument name.
376
6654d750
AH
3772017-11-24 Alan Hayward <alan.hayward@arm.com>
378
379 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
380 * linux-aarch64-low.c (initialize_low_arch): Call init func.
381 * linux-aarch64-tdesc-selftest.c: New file.
382 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
383
3842017-11-24 Alan Hayward <alan.hayward@arm.com>
385
386 * configure.srv: Add new file.
387 * linux-aarch64-low.c (initialize_low_arch): Call init func.
388 * linux-aarch64-tdesc-selftest.c: New file.
389 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
390
49bdb7ee
AH
3912017-11-24 Alan Hayward <alan.hayward@arm.com>
392
393 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
394 * linux-aarch64-low.c (initialize_low_arch): Remove init.
395 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
396
d6d7ce56
AH
3972017-11-24 Alan Hayward <alan.hayward@arm.com>
398
399 * configure.srv: Add new files.
400 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
401 aarch64_linux_read_description.
402 * linux-aarch64-low.c (aarch64_linux_read_description):
403 Merge with aarch64_arch_setup.
404 (aarch64_arch_setup): Call aarch64_linux_read_description.
405 * linux-aarch64-tdesc.c: New file.
406 * linux-aarch64-tdesc.h: New file.
407
506fe5f4
YQ
4082017-11-24 Yao Qi <yao.qi@linaro.org>
409
410 * configure.srv: Set $srv_regobj for tic6x-linux.
411 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
412 (tic6x_read_description): Move some code to tic6x_arch_setup.
413 (tic6x_tdesc_test): New function.
414 (initialize_low_arch): Call selftests::register_test.
415
29f9a567
YQ
4162017-11-22 Yao Qi <yao.qi@linaro.org>
417
418 * remote-utils.c (prepare_resume_reply): Use memcpy.
419
578290ec
SM
4202017-11-19 Simon Marchi <simon.marchi@ericsson.com>
421
422 * linux-low.c (kill_one_lwp_callback): Return void, take
423 argument directly, don't filter on pid.
424 (linux_kill): Use for_each_thread.
425
eca55aec
SM
4262017-11-19 Simon Marchi <simon.marchi@ericsson.com>
427
428 * linux-low.c (need_step_over_p): Return bool, remove dummy
429 argument.
430 (linux_resume, proceed_all_lwps): Use find_thread.
431
25c28b4d
SM
4322017-11-19 Simon Marchi <simon.marchi@ericsson.com>
433
434 * linux-low.c (resume_status_pending_p): Return bool, remove
435 flag_p argument.
436 (linux_resume): Use find_thread.
437
5fdda392
SM
4382017-11-19 Simon Marchi <simon.marchi@ericsson.com>
439
440 * linux-low.c (struct thread_resume_array): Remove.
441 (linux_set_resume_request): Return void, take arguments
442 directly.
443 (linux_resume): Use for_each_thread.
444
fcb056a5
SM
4452017-11-19 Simon Marchi <simon.marchi@ericsson.com>
446
447 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
448 return bool, remove data argument.
449 (linux_stabilize_threads): Use find_thread.
450
139720c5
SM
4512017-11-19 Simon Marchi <simon.marchi@ericsson.com>
452
453 * linux-low.c (unsuspend_one_lwp): Remove.
454 (unsuspend_all_lwps): Use for_each_thread, inline code from
455 unsuspend_one_lwp.
456
6d1e5673
SM
4572017-11-19 Simon Marchi <simon.marchi@ericsson.com>
458
459 * gdbthread.h (find_thread): Add overload with ptid_t filter.
460 * linux-low.c (struct iterate_over_lwps_args): Remove.
461 (iterate_over_lwps_filter): Remove.
462 (iterate_over_lwps): Use find_thread.
463
bbf550d5
SM
4642017-11-19 Simon Marchi <simon.marchi@ericsson.com>
465
466 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
467 (linux_handle_new_gdb_connection): Use for_each_thread, inline
468 code from reset_lwp_ptrace_options_callback.
469
00192f77
SM
4702017-11-19 Simon Marchi <simon.marchi@ericsson.com>
471
472 * linux-arm-low.c (struct update_registers_data): Remove.
473 (update_registers_callback): Return void, take arguments
474 directly, don't check thread's pid.
475 (arm_insert_point, arm_remove_point): Use for_each_thread.
476
2bee2b6c
SM
4772017-11-19 Simon Marchi <simon.marchi@ericsson.com>
478
479 * win32-low.c (continue_one_thread): Return void, take argument
480 directly.
481 (child_continue): Use for_each_thread.
482
0b360f19
SM
4832017-11-19 Simon Marchi <simon.marchi@ericsson.com>
484
485 * win32-i386-low.c (update_debug_registers_callback): Rename
486 to ...
487 (update_debug_registers): ... this, return void, remove pid_p arg.
488 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
489
f27866ba
SM
4902017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
491
492 * inferiors.h (struct process_info): Add constructor, initialize
493 fields..
494 <syscalls_to_catch>: Change type to std::vector<int>.
495 * inferiors.c (add_process): Allocate process_info with new.
496 (remove_process): Free process_info with delete.
497 * linux-low.c (handle_extended_wait): Adjust.
498 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
499 * server.c (handle_general_set): Adjust.
500
e849ea89
PA
5012017-11-16 Pedro Alves <palves@redhat.com>
502
503 * remote-utils.c (remote_close): Block SIGIO signals instead of
504 uninstalling the SIGIO handler.
505
1d0aa65c
AH
5062017-11-16 Alan Hayward <alan.hayward@arm.com>
507
508 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
509
3491a34c
YQ
5102017-11-16 Yao Qi <yao.qi@linaro.org>
511
512 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
513 (tic6x_store_gregset): Likewise.
514 (tic6x_usrregs_info): Move it up.
515
a602f924
AH
5162017-11-15 Alan Hayward <alan.hayward@arm.com>
517
518 * Makefile.in: Update arch rules.
519 * configure.srv: Explicitly mark arch/ files.
520
5616b6c3
AS
5212017-11-13 Andreas Schwab <schwab@suse.de>
522
523 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
524 function.
525 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
526
d1928160
PA
5272017-11-06 Pedro Alves <palves@redhat.com>
528
529 * config.in, configure: Regenerate.
530
bac608e7
SM
5312017-10-27 Simon Marchi <simon.marchi@ericsson.com>
532
533 * target.c (struct thread_search): Remove.
534 (thread_search_callback): Remove.
535 (prepare_to_access_memory): Use for_each_thread instead of
536 find_inferior. Inline code from thread_search_callback.
537
eaddb425
SM
5382017-10-27 Simon Marchi <simon.marchi@ericsson.com>
539
540 * server.c (struct visit_actioned_threads_data): Remove.
541 (visit_actioned_threads): Change prototype to take arguments
542 directly.
543 (resume): Use find_thread instead of find_inferior.
544
99078d34
SM
5452017-10-27 Simon Marchi <simon.marchi@ericsson.com>
546
547 * server.c (queue_stop_reply_callback): Change prototype, return
548 void.
549 (find_status_pending_thread_callback): Remove.
550 (handle_status): Replace find_inferior with find_thread and
551 for_each_thread.
552
cc628f3d
AH
5532017-10-25 Alan Hayward <alan.hayward@arm.com>
554
555 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
556 with REGNO.
557 (aarch64_store_gregset): Likewise.
558 (aarch64_fill_fpregset): Likewise.
559 (aarch64_store_fpregset): Likewise.
560
4d3bb80e
SM
5612017-10-21 Simon Marchi <simon.marchi@ericsson.com>
562
563 * gdbthread.h (find_thread, for_each_thread): New functions.
564 * inferiors.c (thread_of_pid): Remove.
565 (find_any_thread_of_pid): Use find_thread.
566 * linux-low.c (num_lwps): Use for_each_thread.
567
7a7cdfa0
YQ
5682017-10-17 Yao Qi <yao.qi@linaro.org>
569
570 * Makefile.in: Remove one rule.
571 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
572
e675d170
YQ
5732017-10-17 Yao Qi <yao.qi@linaro.org>
574
575 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
576 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
577
7eb4e0f9
YQ
5782017-10-17 Yao Qi <yao.qi@linaro.org>
579
580 * configure.srv: Rename arm.o with arch/arm.o.
581
60d6cfc9
YQ
5822017-10-17 Yao Qi <yao.qi@linaro.org>
583
584 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
585 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
586 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
587 (arch-i386.o, arch-amd64.o): Remove rules.
588 (arch/%.o): New rule.
589 Update POSTCOMPILE and COMPILE.pre.
590 * configure.ac: Invoke AC_CONFIG_COMMANDS.
591 * configure: Re-generated.
592 * configure.srv: Replace arch-i386.o with arch/i386.o.
593 Replace arch-amd64.o with arch/amd64.o.
594
5bfda255
YQ
5952017-10-16 Yao Qi <yao.qi@linaro.org>
596
597 * configure: Regenerated.
598
9c80ecd6
SM
5992017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
600
601 * inferiors.h: (struct inferior_list): Remove.
602 (struct inferior_list_entry); Remove.
603 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
604 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
605 get_first_inferior): Remove.
606 (for_each_inferior, for_each_inferior_with_data, find_inferior,
607 find_inferior_id, find_inferior_in_random): Change signature.
608 * inferiors.c (all_threads): Change type to
609 std::list<thread_info *>.
610 (get_thread): Remove macro.
611 (find_inferior, find_inferior_id): Change signature, implement
612 using find_thread.
613 (find_inferior_in_random): Change signature, implement using
614 find_thread_in_random.
615 (for_each_inferior, for_each_inferior_with_data): Change
616 signature, implement using for_each_thread.
617 (add_inferior_to_list, remove_inferior): Remove.
618 (add_thread, get_first_thread, thread_of_pid,
619 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
620 (get_first_inferior, one_inferior_p, clear_inferior_list):
621 Remove.
622 (clear_inferiors, get_thread_process): Update.
623 * gdbthread.h: Include <list>.
624 (struct thread_info) <entry>: Remove field.
625 <id>: New field.
626 (all_threads): Change type to std::list<thread_info *>.
627 (get_first_inferior): Add doc.
628 (find_thread, for_each_thread, find_thread_in_random): New
629 functions.
630 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
631 * linux-arm-low.c (update_registers_callback): Update.
632 * linux-low.c (second_thread_of_pid_p): Update.
633 (kill_one_lwp_callback, linux_detach_lwp_callback,
634 delete_lwp_callback, status_pending_p_callback, same_lwp,
635 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
636 iterate_over_lwps, not_stopped_callback,
637 resume_stopped_resumed_lwps, count_events_callback,
638 select_singlestep_lwp_callback, select_event_lwp_callback,
639 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
640 suspend_and_send_sigstop_callback, wait_for_sigstop,
641 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
642 lwp_running, linux_set_resume_request, resume_status_pending_p,
643 need_step_over_p, start_step_over, linux_resume_one_thread,
644 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
645 reset_lwp_ptrace_options_callback): Update.
646 * linux-mips-low.c (update_watch_registers_callback): Update.
647 * regcache.c (regcache_invalidate_one, regcache_invalidate):
648 Update.
649 (free_register_cache_thread_one): Remove.
650 (regcache_release): Update.
651 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
652 handle_qxfer_threads_worker): Update.
653 (handle_query): Update, use list iterator.
654 (visit_actioned_threads, handle_pending_status,
655 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
656 clear_pending_status_callback, set_pending_status_callback,
657 find_status_pending_thread_callback, handle_status,
658 process_serial_event): Update.
659 * target.c (thread_search_callback): Update.
660 * thread-db.c (thread_db_get_tls_address): Update.
661 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
662 Update.
663 * win32-i386-low.c (update_debug_registers_callback): Update.
664 * win32-low.c (delete_thread_info, child_delete_thread,
665 continue_one_thread, suspend_one_thread,
666 get_child_debug_event): Adjust.
667
9179355e
SM
6682017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
669
670 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
671 * inferiors.h: Include <list>.
672 (struct process_info) <entry>: Remove field.
673 <pid>: New field.
674 (pid_of): Change macro to function.
675 (ptid_of, lwpid_of): Remove macro.
676 (all_processes): Change type to std::list<process_info *>.
677 (ALL_PROCESSES): Remove macro.
678 (for_each_process, find_process): New function.
679 * inferiors.c (all_processes): Change type to
680 std::list<process_info *>.
681 (find_thread_process): Adjust.
682 (add_process): Likewise.
683 (remove_process): Likewise.
684 (find_process_pid): Likewise.
685 (get_first_process): Likewise.
686 (started_inferior_callback): Remove.
687 (have_started_inferiors_p): Adjust.
688 (attached_inferior_callback): Remove.
689 (have_attached_inferiors_p): Adjust.
690 * linux-low.c (check_zombie_leaders): Likewise.
691 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
692 (x86_linux_update_xmltarget): Adjust.
693 * server.c (handle_query): Likewise.
694 (gdb_reattached_process): Remove.
695 (handle_status): Adjust.
696 (kill_inferior_callback): Likewise.
697 (detach_or_kill_inferior): Remove.
698 (print_started_pid): Likewise.
699 (print_attached_pid): Likewise.
700 (detach_or_kill_for_exit): Update.
701 (process_serial_event): Likewise.
702 * linux-arm-low.c (arm_new_fork): Likewise.
703
c9cb8905
SM
7042017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
705
706 * dll.h: Include <list>.
707 (struct dll_info): Add constructor.
708 <entry>: Remove field.
709 (all_dlls): Change type to std::list<dll_info>.
710 * dll.c: Include <algorithm>.
711 (get_dll): Remove macro.
712 (all_dlls): Change type to std::list<dll_info *>.
713 (free_one_dll): Remove.
714 (match_dll): Likewise.
715 (loaded_dll): Adjust.
716 (unloaded_dll): Adjust to all_dlls type change, use
717 std::find_if. Inline code from match_dll.
718 (clear_dlls): Adjust to all_dlls type change.
719 * server.c (emit_dll_description): Remove.
720 (handle_qxfer_libraries): Adjust to all_dlls type change,
721 integrate emit_dll_description's functionality.
722
04ec7890
SM
7232017-10-12 Simon Marchi <simon.marchi@ericsson.com>
724
725 * linux-low.h (struct linux_target_ops) <delete_process>: New
726 field.
727 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
728 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
729 (struct linux_target_ops): Add delete_process callback.
730 * linux-arm-low.c (arm_delete_process): New.
731 (struct linux_target_ops): Add delete_process callback.
732 * linux-bfin-low.c (struct linux_target_ops): Likewise.
733 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
734 * linux-m32r-low.c (struct linux_target_ops): Likewise.
735 * linux-mips-low.c (mips_linux_delete_process): New.
736 (struct linux_target_ops): Add delete_process callback.
737 * linux-ppc-low.c (struct linux_target_ops): Likewise.
738 * linux-s390-low.c (struct linux_target_ops): Likewise.
739 * linux-sh-low.c (struct linux_target_ops): Likewise.
740 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
741 * linux-tile-low.c (struct linux_target_ops): Likewise.
742 * linux-x86-low.c (x86_linux_delete_process): New.
743 (struct linux_target_ops): Add delete_process callback.
744 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
745
466eecee
SM
7462017-10-12 Simon Marchi <simon.marchi@ericsson.com>
747
748 * linux-aarch64-low.c (the_low_target): Add thread delete
749 callback.
750 * linux-arm-low.c (arm_delete_thread): New function.
751 (the_low_target): Add thread delete callback.
752 * linux-bfin-low.c (the_low_target): Likewise.
753 * linux-crisv32-low.c (the_low_target): Likewise.
754 * linux-low.c (delete_lwp): Invoke delete_thread callback if
755 set.
756 * linux-low.h (struct linux_target_ops) <delete_thread>: New
757 field.
758 * linux-m32r-low.c (the_low_target): Add thread delete callback.
759 * linux-mips-low.c (mips_linux_delete_thread): New function.
760 (the_low_target): Add thread delete callback.
761 * linux-ppc-low.c (the_low_target): Likewise.
762 * linux-s390-low.c (the_low_target): Likewise.
763 * linux-sh-low.c (the_low_target): Likewise.
764 * linux-tic6x-low.c (the_low_target): Likewise.
765 * linux-tile-low.c (the_low_target): Likewise.
766 * linux-x86-low.c (the_low_target): Likewise.
767 * linux-xtensa-low.c (the_low_target): Likewise.
768
b79f7801
YZ
7692017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
770
771 * win32-low.c: Include "common-inferior.h".
772
bc3b087d
SDJ
7732017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
774
775 * inferiors.c (set_inferior_cwd): New function.
776 * server.c (handle_general_set): Handle QSetWorkingDir packet.
777 (handle_query): Inform that QSetWorkingDir is supported.
778 * win32-low.c (create_process): Pass the inferior's cwd to
779 CreateProcess.
780
d092c5a2
SDJ
7812017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
782
783 * inferiors.c (current_inferior_cwd): New global variable.
784 (get_inferior_cwd): New function.
785 * inferiors.h (struct process_info) <cwd>: New field.
786
7da0a886
SDJ
7872017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
788
789 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
790 (OBS): Add gdb_tilde_expand.o.
791
289a6840
SM
7922017-10-02 Simon Marchi <simon.marchi@ericsson.com>
793
794 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
795 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
796
256642e8
PA
7972017-09-29 Pedro Alves <palves@redhat.com>
798
799 * ax.c (gdb_parse_agent_expr): Constify.
800 * ax.h (gdb_parse_agent_expr): Constify.
801 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
802 Constify.
803 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
804 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
805 * remote-utils.h (read_ptid): Constify.
806 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
807 (process_point_options, process_serial_event): Constify.
808 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
809 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
810 (cmd_qtbuffer): Constify.
811
5b9ca4d4
PA
8122017-09-29 Pedro Alves <palves@redhat.com>
813
814 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
815 fails.
816
94c207e0
PA
8172017-09-29 Pedro Alves <palves@redhat.com>
818
819 * linux-low.c (handle_extended_wait): Pass parent thread instead
820 of process to thread_db_notice_clone.
821 * linux-low.h (thread_db_notice_clone): Replace parent process
822 parameter with parent thread parameter.
823 * thread-db.c (find_one_thread): Add comment.
824 (thread_db_notice_clone): Replace parent process parameter with
825 parent thread parameter. Temporarily switch to the parent thread.
826
75352e28
SDJ
8272017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
828
829 * gdbthread.h: Include "common-gdbthread.h".
830 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
831 "if" when validating the ptid.
832 * remote-utils.c: Include "gdbthread.h".
833 (prepare_resume_reply): Use "switch_to_thread".
834 * target.c (done_accessing_memory): Likewise.
835
ad339634
AA
8362017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
837
838 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
839 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
840 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
841 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
842 s390x-gs-linux64-ipa.o to ipa_obj.
843 * linux-s390-low.c (HWCAP_S390_GS): New define.
844 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
845 New functions.
846 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
847 (s390_arch_setup): Check for guarded-storage support and choose
848 appropriate tdesc.
849 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
850 init_registers_s390x_gs_linux64.
851 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
852 enum value.
853 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
854 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
855
cc4d742f
SM
8562017-09-22 Simon Marchi <simon.marchi@ericsson.com>
857
858 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
859
f6327dcb
KB
8602017-09-21 Kevin Buettner <kevinb@redhat.com>
861
862 * linux-low.h (struct lwp_info): Add new field, thread_handle.
863 (thread_db_thread_handle): Declare.
864 * linux-low.c (linux_target_ops): Initialize thread_handle.
865 * server.c (handle_qxfer_threads_worker): Add support for
866 "handle" attribute.
867 * target.h (struct target_ops): Add new function pointer,
868 thread_handle.
869 (target_thread_handle): Define.
870 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
871 field in lwp.
872 (thread_db_thread_handle): New function.
873
86299109
KB
8742017-09-21 Kevin Buettner <kevinb@redhat.com>
875
876 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
877 * linux-low.h (thread_db_notice_clone): Declare.
878 * thread-db.c (thread_db_notice_clone): New function.
879
f557a88a
PA
8802017-09-21 Pedro Alves <palves@redhat.com>
881
882 * server.c (gdb_read_memory, handle_status, process_serial_event)
883 (handle_serial_event, handle_target_event): Adjust to
884 set_desired_thread prototype change.
885 * target.c (set_desired_thread): Remove 'use_general' parameter
886 and adjust.
887 * target.h (set_desired_thread): Remove 'use_general' parameter.
888
223ffa71
TT
8892017-09-20 Tom Tromey <tom@tromey.com>
890
891 * target.c (target_terminal::terminal_state): Define.
892 (target_terminal::init): Rename from target_terminal_init.
893 (target_terminal::inferior): Rename from
894 target_terminal_inferior.
895 (target_terminal::ours): Rename from target_terminal_ours.
896 (target_terminal::ours_for_output, target_terminal::info): New.
897
04fd3ba9
SM
8982017-09-16 Simon Marchi <simon.marchi@ericsson.com>
899
900 * server.c (accumulate_file_name_length): Remove.
901 (emit_dll_description): Adjust to std::string change.
902 (handle_qxfer_libraries): Use std::string to hold document.
903
5e187554
SM
9042017-09-16 Simon Marchi <simon.marchi@ericsson.com>
905
906 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
907 return type of xml_escape_text.
908 * server.c (emit_dll_description): Likewise.
909
1526853e
SM
9102017-09-16 Simon Marchi <simon.marchi@ericsson.com>
911
912 * server.c (captured_main): Accept argument for --selftest.
913 Update run_tests call.
914 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
915 when registering selftests.
916
c4dfafab
SDJ
9172017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
918
919 * regcache.c (get_thread_regcache): Update code to use "std::vector"
920 instead of "VEC" for "target_desc.reg_defs".
921 (regcache_cpy): Likewise.
922 (registers_to_string): Likewise.
923 (registers_from_string): Likewise.
924 (find_regno): Likewise.
925 (supply_regblock): Likewise.
926 (regcache_raw_read_unsigned): Likewise.
927 * tdesc.c (init_target_desc): Likewise.
928 (tdesc_create_reg): Likewise.
929 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
930 (struct target_desc) <reg_defs>: Convert to "std::vector".
931 (target_desc): Do not initialize "reg_defs".
932 (~target_desc): Update code to use "std::vector" instead of "VEC"
933 for "target_desc.reg_defs".
934 (operator==): Likewise.
935
124aceb4
SM
9362017-09-15 Simon Marchi <simon.marchi@ericsson.com>
937
938 * inferiors.h (thread_to_gdb_id): Remove.
939 * inferiors.c (thread_to_gdb_id): Remove.
940 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
941 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
942 lynx_store_registers, lynx_read_memory, lynx_write_memory):
943 Likewise.
944 * nto-low.c (nto_fetch_registers, nto_store_registers,
945 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
946
96cde54f
SM
9472017-09-15 Simon Marchi <simon.marchi@ericsson.com>
948
949 * inferiors.h (gdb_id_to_thread_id): Remove.
950 * inferiors.c (gdb_id_to_thread_id): Remove.
951 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
952 removal. Move pid declaration closer to where it's used.
953
e8ca139e
SM
9542017-09-15 Simon Marchi <simon.marchi@ericsson.com>
955
956 * server.c (handle_detach): New function.
957 (process_serial_event): Move code out, call handle_detach.
958
f8a4e119
SM
9592017-09-15 Simon Marchi <simon.marchi@ericsson.com>
960
961 * server.c (require_running): Rename to ...
962 (require_running_or_return): ... this ...
963 (require_running_or_break): ... and this.
964 (handle_query, process_serial_event): Adjust.
965
0eb0a407
SM
9662017-09-15 Simon Marchi <simon.marchi@ericsson.com>
967
968 * linux-low.c (linux_set_resume_request): Remove unused
969 variables.
970
785922a5
SM
9712017-09-15 Simon Marchi <simon.marchi@ericsson.com>
972
973 * server.c (first_thread_of): Remove.
974 (process_serial_event): Replace usage of first_thread_of with
975 find_any_thread_of_pid.
976 * tracepoint.c (same_process_p): Remove.
977 (gdb_agent_about_to_close): Replace usage of same_process_p with
978 find_any_thread_of_pid.
979 * linux-x86-low.c (same_process_callback): Remove.
980 (x86_arch_setup_process_callback): Replace usage of
981 same_process_callback with find_any_thread_of_pid.
982 * thread-db.c (any_thread_of): Remove.
983 (switch_to_process): Replace usage of any_thread_of with
984 find_any_thread_of_pid.
985 * inferiors.c (thread_pid_matches_callback): Remove.
986 (find_thread_process): Adjust to use find_any_thread_of_pid.
987
a059f00c
SDJ
9882017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
989
990 * regcache.c (get_thread_regcache): Guard calls to "memset"
991 with "!VEC_empty".
992
cc397f3a
SDJ
9932017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
994
995 * linux-low.c (handle_extended_wait): Use
996 "allocate_target_description" instead of "XNEW".
997 * linux-x86-low.c (initialize_low_arch): Likewise.
998
22916b07
YQ
9992017-09-05 Yao Qi <yao.qi@linaro.org>
1000
1001 * configure.srv (srv_i386_regobj): Remove.
1002 (srv_amd64_regobj): Remove.
1003 (srv_regobj): Set it to "" for x86 non-linux targets.
1004 * linux-x86-tdesc.c (i386_linux_read_description):
1005 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1006 (init_registers_i386): Remove the declaration.
1007 (tdesc_i386): Remove the declaration.
1008 (lynx_i386_arch_setup): Call i386_create_target_description.
1009 * nto-x86-low.c: Likewise.
1010 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1011 [!__x86_64__]: include arch/i386.h.
1012 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1013
38602d55
YQ
10142017-09-05 Yao Qi <yao.qi@linaro.org>
1015
1016 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1017 i386/amd64-XXX-linux from it.
1018
44b886ff
YQ
10192017-09-05 Yao Qi <yao.qi@linaro.org>
1020
1021 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1022 false.
1023 (ipa_amd64_linux_regobj): Remove.
1024 (ipa_x32_linux_regobj): Remove.
1025
b4570e4b
YQ
10262017-09-05 Yao Qi <yao.qi@linaro.org>
1027
1028 * Makefile.in (arch-amd64.o): New rule.
1029 * configure.srv: Append arch-amd64.o.
1030 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1031 (get_ipa_tdesc): Call amd64_linux_read_description.
1032 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1033 and init_registers_amd64_XXX.
1034 * linux-x86-low.c (x86_linux_read_description): Call
1035 amd64_linux_read_description.
1036 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1037 (initialize_low_arch): Don't call init_registers_x32_XXX and
1038 init_registers_amd64_XXX.
1039 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1040 and tdesc_amd64_XXX.
1041 [__x86_64__] (amd64_tdesc_test): New function.
1042 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1043 and init_registers_amd64_XXX.
1044 * linux-x86-tdesc.c: Include arch/amd64.h.
1045 (xcr0_to_tdesc_idx): New function.
1046 (i386_linux_read_description): New function.
1047 (amd64_get_ipa_tdesc_idx): New function.
1048 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1049 (amd64_get_ipa_tdesc): Declare.
1050
d1f28ea2
YQ
10512017-09-05 Yao Qi <yao.qi@linaro.org>
1052
1053 * configure.srv (srv_i386_linux_xmlfiles): Remove
1054 i386/i386-XXX-linux.xml from it.
1055
25a93583
YQ
10562017-09-05 Yao Qi <yao.qi@linaro.org>
1057
1058 * configure.srv: Set srv_i386_linux_regobj empty if $development
1059 is false.
1060 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1061 initialize_low_tdesc.
1062 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1063 with #if initialize_low_tdesc.
1064 * linux-x86-tdesc-selftest.c: New file.
1065 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1066
5f035c07
YQ
10672017-09-05 Yao Qi <yao.qi@linaro.org>
1068
1069 * Makefile.in (arch-i386.o): New rule.
1070 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1071 (x86_64-*-linux*): Likewise.
1072 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1073 include arch/i386.h.
1074 (i386_linux_read_description): Remove code and call
1075 i386_create_target_description.
1076 * tdesc.c (allocate_target_description): New function.
1077 * tdesc.h (set_tdesc_architecture): Remove declaration.
1078 (set_tdesc_osabi): Likewise.
1079
0abe8a89
YQ
10802017-09-05 Yao Qi <yao.qi@linaro.org>
1081
1082 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1083 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1084 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1085 .xmltarget.
1086 * server.c (get_features_xml): Call tdesc_get_features_xml.
1087 * tdesc.c (set_tdesc_architecture): New function.
1088 (set_tdesc_osabi): New function.
1089 (tdesc_get_features_xml): New function.
1090 (tdesc_create_feature): Add an argument.
1091 * tdesc.h (struct target_desc) <features>: New field.
1092 <arch, osabi>: New field.
1093 (~target_desc): xfree features, arch, and osabi.
1094 (target_desc::oerator==): Don't compare .xmltarget.
1095 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1096 (set_tdesc_osabi): Likewise.
1097 (tdesc_get_features_xml): Likewise.
1098
0a188386
YQ
10992017-09-05 Yao Qi <yao.qi@linaro.org>
1100
1101 * linux-x86-tdesc.c: Include selftest.h.
1102 (i386_tdesc_test): New function.
1103 (initialize_low_tdesc): Call selftests::register_test.
1104 * tdesc.h: Include regdef.h.
1105 (target_desc): Override operator == and !=.
1106
f49ff000
YQ
11072017-09-05 Yao Qi <yao.qi@linaro.org>
1108
1109 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1110 (ipa_obj): Likewise.
1111 * linux-i386-ipa.c: Include common/x86-xstate.h
1112 (get_ipa_tdesc): Call i386_linux_read_description.
1113 (initialize_low_tracepoint): Don't call init_registers_XXX
1114 functions, call initialize_low_tdesc instead.
1115 * linux-x86-low.c (x86_linux_read_description): Call
1116 i386_linux_read_description.
1117 (initialize_low_arch): Don't call init_registers_i386_XXX
1118 functions, call initialize_low_tdesc.
1119 * linux-x86-tdesc.c: New file.
1120 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1121 (i386_get_ipa_tdesc_idx): Declare.
1122 (i386_get_ipa_tdesc): Declare.
1123 (initialize_low_tdesc): Declare.
1124
2b68ef2f
YQ
11252017-09-05 Yao Qi <yao.qi@linaro.org>
1126
1127 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1128 instead of 0.
1129
f7000548
YQ
11302017-09-05 Yao Qi <yao.qi@linaro.org>
1131
1132 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1133 * regcache.c (get_thread_regcache): Use VEC_length.
1134 (init_register_cache): Likewise.
1135 (regcache_cpy): Likewise.
1136 (registers_to_string): Iterate reg_defs via VEC_iterate.
1137 (find_regno): Likewise.
1138 (find_register_by_number): Use VEC_index.
1139 (register_size): Call find_register_by_number.
1140 (register_data): Call find_register_by_number.
1141 (supply_regblock): Use VEC_length.
1142 (regcache_raw_read_unsigned): Likewise.
1143 * tdesc.c (init_target_desc): Iterate reg_defs via
1144 VEC_iterate.
1145 (default_description): Update initializer.
1146 (copy_target_description): Don't update field num_registers.
1147 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1148 <num_registers>: Remove.
1149
50a421ac
SM
11502017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1151
1152 * Makefile.in (.SECONDARY): Define target.
1153
23fdd69e
SM
11542017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1155
1156 * linux-low.c (linux_wait_1): Adjust.
1157 * server.c (queue_stop_reply_callback): Adjust.
1158
0a2dde4a
SDJ
11592017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1160
1161 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1162 QEnvironmentUnset and QEnvironmentReset packets.
1163 (handle_query): Inform remote that QEnvironmentHexEncoded,
1164 QEnvironmentUnset and QEnvironmentReset are supported.
1165
6afd337d
SM
11662017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1167
1168 * inferiors.h (inferior_target_data): Rename to ...
1169 (thread_target_data): ... this.
1170 (inferior_regcache_data): Rename to ...
1171 (thread_regcache_data): ... this.
1172 (set_inferior_regcache_data): Rename to ...
1173 (set_thread_regcache_data): ... this.
1174 * inferiors.c (inferior_target_data): Rename to ...
1175 (thread_target_data): ... this.
1176 (inferior_regcache_data): Rename to ...
1177 (thread_regcache_data): ... this.
1178 (set_inferior_regcache_data): Rename to ...
1179 (set_thread_regcache_data): ... this.
1180 (free_one_thread): Update.
1181 * linux-low.h (get_thread_lwp): Update.
1182 * regcache.c (get_thread_regcache): Update.
1183 (regcache_invalidate_thread): Update.
1184 (free_register_cache_thread): Update.
1185 * win32-i386-low.c (update_debug_registers_callback): Update.
1186 (win32_get_current_dr): Update.
1187 * win32-low.c (thread_rec): Update.
1188 (delete_thread_info): Update.
1189 (continue_one_thread): Update.
1190 (suspend_one_thread): Update.
1191
a160cc46
SM
11922017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1193
1194 * inferiors.c (set_inferior_target_data): Remove.
1195 * inferiors.h (set_inferior_target_data): Remove.
1196
6d580b63
YQ
11972017-08-18 Yao Qi <yao.qi@linaro.org>
1198
1199 * Makefile.in (OBS): Add selftest.o.
1200 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1201 * configure, config.in: Re-generated.
1202 * server.c: Include common/sefltest.h.
1203 (captured_main): Handle option --selftest.
1204
f5a29eb0
YQ
12052017-08-09 Yao Qi <yao.qi@linaro.org>
1206
1207 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1208 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1209 i386-avx-mpx.o and i386-mmx.o.
1210 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1211 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1212 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1213 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1214 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1215 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1216 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1217 i386/amd64-avx-mpx.xml.
1218
57757c2f
YQ
12192017-08-09 Yao Qi <yao.qi@linaro.org>
1220
1221 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1222 and x32-avx-avx512.o.
1223 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1224 i386/x32-avx-avx512.xml.
1225
229d26fc
SM
12262017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1227
1228 * tracepoint.h (enum class fast_tpoint_collect_result): New
1229 enumeration.
1230 (fast_tracepoint_collecting): Change return type to
1231 fast_tpoint_collect_result.
1232 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1233 * linux-low.h: Include tracepoint.h.
1234 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1235 fast_tpoint_collect_result.
1236 * linux-low.c (handle_tracepoints): Adjust.
1237 (linux_fast_tracepoint_collecting): Change return type to
1238 fast_tpoint_collect_result.
1239 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1240 linux_wait_1, stuck_in_jump_pad_callback,
1241 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1242 proceed_one_lwp): Adjust to type change.
1243
2e1e43e1
YQ
12442017-07-10 Yao Qi <yao.qi@linaro.org>
1245
1246 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1247
adc764e7
YQ
12482017-06-29 Yao Qi <yao.qi@linaro.org>
1249
1250 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1251 Remove.
1252 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1253
a206891a
SM
12542017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1255
1256 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1257
9a6c7d9c
SDJ
12582017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1259
1260 * linux-low.c (linux_create_inferior): Adjust code to access the
1261 environment information via 'gdb_environ' class.
1262 * lynx-low.c (lynx_create_inferior): Likewise.
1263 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1264 (get_environ): Return a pointer to 'our_environ'.
1265 (captured_main): Initialize 'our_environ'.
1266 * server.h (get_environ): Adjust prototype.
1267 * spu-low.c (spu_create_inferior): Adjust code to access the
1268 environment information via 'gdb_environ' class.
1269
ae3e2ccf
SM
12702017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1271
1272 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1273 usage of "register" keyword.
1274
3e019bdc
SM
12752017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1276
1277 * configure: Re-generate.
1278
8465943a
SM
12792017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1280
1281 * configure: Re-generate.
1282
cf0dd6f0
SM
12832017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1284
1285 * Makefile.in (COMPILE.pre): Add "-x c++".
1286
9845682b
SDJ
12872017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1288
1289 * fork-child.c: Conditionally include <signal.h>.
1290
aefd8b33
SDJ
12912017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1292
1293 * server.c (handle_general_set): Handle new packet
1294 "QStartupWithShell".
1295 (handle_query): Add "QStartupWithShell" to the list of supported
1296 packets.
1297 (gdbserver_usage): Add help text explaining the
1298 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1299 options.
1300 (captured_main): Recognize and act upon the presence of the new
1301 CLI options.
1302
2090129c
SDJ
13032017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1304 Pedro Alves <palves@redhat.com>
1305
1306 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1307 * configure: Regenerate.
1308 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1309 "fork-inferior.o".
1310 (i[34567]86-*-lynxos*): Likewise.
1311 (spu*-*-*): Likewise.
1312 * fork-child.c: New file.
1313 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1314 and "environ.h".
1315 (linux_ptrace_fun): New function.
1316 (linux_create_inferior): Adjust function prototype to reflect
1317 change on "target.h". Adjust function code to use
1318 "fork_inferior".
1319 (linux_request_interrupt): Delete "signal_pid".
1320 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1321 (lynx_ptrace_fun): New function.
1322 (lynx_create_inferior): Adjust function prototype to reflect
1323 change on "target.h". Adjust function code to use
1324 "fork_inferior".
1325 * nto-low.c (nto_create_inferior): Adjust function prototype and
1326 code to reflect change on "target.h". Update comments.
1327 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1328 "common-terminal.h" and "environ.h".
1329 (terminal_fd): Moved to fork-child.c.
1330 (old_foreground_pgrp): Likewise.
1331 (restore_old_foreground_pgrp): Likewise.
1332 (last_status): Make it global.
1333 (last_ptid): Likewise.
1334 (our_environ): New variable.
1335 (startup_with_shell): Likewise.
1336 (program_name): Likewise.
1337 (program_argv): Rename to...
1338 (program_args): ...this.
1339 (wrapper_argv): New variable.
1340 (start_inferior): Delete function.
1341 (get_exec_wrapper): New function.
1342 (get_exec_file): Likewise.
1343 (get_environ): Likewise.
1344 (prefork_hook): Likewise.
1345 (post_fork_inferior): Likewise.
1346 (postfork_hook): Likewise.
1347 (postfork_child_hook): Likewise.
1348 (handle_v_run): Update code to deal with arguments coming from the
1349 remote host. Update calls from "start_inferior" to
1350 "create_inferior".
1351 (captured_main): Likewise. Initialize environment variable. Call
1352 "have_job_control".
1353 * server.h (post_fork_inferior): New prototype.
1354 (get_environ): Likewise.
1355 (last_status): Declare.
1356 (last_ptid): Likewise.
1357 (signal_pid): Likewise.
1358 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1359 (spu_ptrace_fun): New function.
1360 (spu_create_inferior): Adjust function prototype to reflect change
1361 on "target.h". Adjust function code to use "fork_inferior".
1362 * target.c (target_terminal_init): New function.
1363 (target_terminal_inferior): Likewise.
1364 (target_terminal_ours): Likewise.
1365 * target.h: Include <vector>.
1366 (struct target_ops) <create_inferior>: Update prototype.
1367 (create_inferior): Update macro.
1368 * utils.c (gdb_flush_out_err): New function.
1369 * win32-low.c (win32_create_inferior): Adjust function prototype
1370 and code to reflect change on "target.h".
1371
043a4934
SDJ
13722017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1373
1374 * inferiors.c (switch_to_thread): New function.
1375
15652511
SDJ
13762017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1377
1378 * Makefile.in (SFILE): Add "common/job-control.c".
1379 (OBS): Add "job-control.o".
1380
21ea5acd
SDJ
13812017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1382
1383 * Makefile: Remove "@host_makefile_frag@".
1384
e13cb306
PA
13852017-05-05 Pedro Alves <palves@redhat.com>
1386
1387 * configure: Regenerate.
1388
c94fee56
SDJ
13892017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1390
1391 * configure: Regenerate.
1392
a0ff9e1a
SM
13932017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1394
1395 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1396 software_single_step change of return type to
1397 std::vector<CORE_ADDR>.
1398 * linux-low.c (install_software_single_step_breakpoints):
1399 Likewise.
1400 * linux-low.h (install_software_single_step_breakpoints):
1401 Likewise.
1402
be628ab8
SDJ
14032017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1404
1405 * remote-utils.c: Include "gdb_termios.h" instead of
1406 "terminal.h".
1407 * terminal.h: Delete file.
1408
7c5ded6a
SDJ
14092017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1410
1411 * server.c: Include <vector>.
1412 <program_argv, wrapper_argv>: Convert to std::vector.
1413 (start_inferior): Rewrite function to use C++.
1414 (handle_v_run): Likewise. Update code that calculates the argv
1415 based on the vRun packet; use C++.
1416 (captured_main): Likewise.
1417
436252de
SM
14182017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1419
1420 * server.c (handle_v_cont): Initialize thread_resume::thread
1421 with null_ptid.
1422
9bf2a700
PA
14232017-04-05 Pedro Alves <palves@redhat.com>
1424
1425 * configure: Regenerate.
1426
a121b7c1
PA
14272017-04-05 Pedro Alves <palves@redhat.com>
1428
1429 * gdbreplay.c (sync_error): Constify.
1430 * linux-x86-low.c (push_opcode): Constify.
1431
21c8a587
PA
14322017-04-05 Pedro Alves <palves@redhat.com>
1433
1434 * win32-low.c (get_child_debug_event)
1435 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1436 Report TARGET_WAITKIND_SPURIOUS instead.
1437
fb32b4f7
PA
14382017-04-05 Pedro Alves <palves@redhat.com>
1439
1440 * remote-utils.c (remote_prepare, remote_open): Constify.
1441 * remote-utils.h (remote_prepare, remote_open): Constify.
1442 * server.c (captured_main): Constify 'port' handling.
1443
65dd1e59
SM
14442017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1445
1446 * Makefile.in (clean): Clear .deps.
1447
8fa5b777
SM
14482017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1449
1450 * .gitignore: Remove generated files, replace with wildcard.
1451 * (clean): Replace removal of generated files with wildcard.
1452 (version.c): Replace with...
1453 (version-generated.c): ...this.
1454 (xml-builtin.c): Replace with...
1455 (xml-builtin-generated.c): ...this.
1456 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1457 (%.c: *regformats*): Replace with...
1458 (%-generated.c: *regformats*): ...this.
1459
a12e714b
MF
14602017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1461
1462 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1463 (xtensa_fill_gregset): Call collect_register_by_name for
1464 threadptr register.
1465 (xtensa_store_gregset): Call supply_register_by_name for
1466 threadptr register.
1467
1a09b50a
MF
14682017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1469
1470 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1471 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1472 (xtensa_store_gregset): Call supply_register for all registers in
1473 a0_regnum..a0_regnum + C0_NREGS range.
1474
1a01e7c6
SM
14752017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1476
1477 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1478 (ax-ipa.o: ax.c): Remove.
1479 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1480 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1481 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1482 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1483 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1484
36bc18a8
SM
14852017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1486
1487 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1488 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1489 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1490 (errors-ipa.o: ../common/errors.c): Remove.
1491 (format-ipa.o: ../common/format.c): Remove.
1492 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1493
a8ebe3d5
SM
14942017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1495
1496 * Makefile.in (%-ipa.o: %.c): New rule.
1497 (tracepoint-ipa.o: tracepoint.c): Remove.
1498 (utils-ipa.o: utils.c): Remove.
1499 (remote-utils-ipa.o: remote-utils.c): Remove.
1500 (regcache-ipa.o: regcache.c): Remove.
1501 (i386-linux-ipa.o: i386-linux.c): Remove.
1502 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1503 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1504 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1505 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1506 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1507 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1508 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1509 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1510 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1511 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1512 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1513 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1514 (aarch64-ipa.o: aarch64.c): Remove.
1515 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1516 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1517 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1518 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1519 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1520 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1521 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1522 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1523 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1524 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1525 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1526 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1527 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1528 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1529 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1530 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1531 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1532 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1533 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1534 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1535 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1536 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1537 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1538 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1539 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1540 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1541 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1542 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1543 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1544 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1545 (tdesc-ipa.o: tdesc.c): Remove.
1546 (x32-linux-ipa.o: x32-linux.c): Remove.
1547 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1548 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1549
50cfacb7
SM
15502017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1551
1552 * Makefile.in (%.o: ../arch/%.c): New rule.
1553 (arm.o: ../arch/arm.c): Remove.
1554 (arm-linux.o: ../arch/arm-linux.c): Remove.
1555 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1556 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1557
c5a22423
SM
15582017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1559
1560 * Makefile.in (%.o: ../nat/%.c): New rule.
1561 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1562 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1563 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1564 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1565 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1566 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1567 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1568 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1569 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1570 (linux-personality.o: ../nat/linux-personality.c): Remove.
1571 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1572 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1573 (x86-linux.o: ../nat/x86-linux.c): Remove.
1574 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1575 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1576
6bda016b
SM
15772017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1578
1579 * Makefile.in (%.o: ../common/%.c): New rule.
1580 (signals.o: ../common/signals.c): Remove.
1581 (print-utils.o: ../common/print-utils.c): Remove.
1582 (rsp-low.o: ../common/rsp-low.c): Remove.
1583 (common-utils.o: ../common/common-utils.c): Remove.
1584 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1585 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1586 (vec.o: ../common/vec.c): Remove.
1587 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1588 (xml-utils.o: ../common/xml-utils.c): Remove.
1589 (ptid.o: ../common/ptid.c): Remove.
1590 (buffer.o: ../common/buffer.c): Remove.
1591 (format.o: ../common/format.c): Remove.
1592 (filestuff.o: ../common/filestuff.c): Remove.
1593 (agent.o: ../common/agent.c): Remove.
1594 (errors.o: ../common/errors.c): Remove.
1595 (environ.o: ../common/environ.c): Remove.
1596 (common-debug.o: ../common/common-debug.c): Remove.
1597 (cleanups.o: ../common/cleanups.c): Remove.
1598 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1599 (fileio.o: ../common/fileio.c): Remove.
1600 (common-regcache.o: ../common/common-regcache.c): Remove.
1601 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1602 (new-op.o: ../common/new-op.c): Remove.
1603 (btrace-common.o: ../common/btrace-common.c): Remove.
1604
21122961
SM
16052017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1606
1607 * Makefile.in (%.o: ../target/%.c): New rule.
1608 (waitstatus.o: ../target/waitstatus.c): Remove.
1609
c362e621
SM
16102017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1611
1612 * Makefile.in
1613 (%.c: ../regformats/%.dat,
1614 (%.c: ../regformats/arm/%.dat,
1615 (%.c: ../regformats/i386/%.dat,
1616 (%.c: ../regformats/rs6000/%.dat): New rules.
1617 (aarch64.c): Remove.
1618 (reg-arm.c): Remove.
1619 (arm-with-iwmmxt.c): Remove.
1620 (arm-with-vfpv2.c): Remove.
1621 (arm-with-vfpv3.c): Remove.
1622 (arm-with-neon.c): Remove.
1623 (reg-bfin.c): Remove.
1624 (reg-cris.c): Remove.
1625 (reg-crisv32.c): Remove.
1626 (i386.c): Remove.
1627 (i386-linux.c): Remove.
1628 (i386-avx.c): Remove.
1629 (i386-avx-linux.c): Remove.
1630 (i386-avx-avx512.c): Remove.
1631 (i386-avx-avx512-linux.c): Remove.
1632 (i386-mpx.c): Remove.
1633 (i386-mpx-linux.c): Remove.
1634 (i386-avx-mpx-avx512-pku.c): Remove.
1635 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1636 (i386-avx-mpx.c): Remove.
1637 (i386-avx-mpx-linux.c): Remove.
1638 (i386-mmx.c): Remove.
1639 (i386-mmx-linux.c): Remove.
1640 (reg-ia64.c): Remove.
1641 (reg-m32r.c): Remove.
1642 (reg-m68k.c): Remove.
1643 (reg-cf.c): Remove.
1644 (mips-linux.c): Remove.
1645 (mips-dsp-linux.c): Remove.
1646 (mips64-linux.c): Remove.
1647 (mips64-dsp-linux.c): Remove.
1648 (nios2-linux.c): Remove.
1649 (powerpc-32.c): Remove.
1650 (powerpc-32l.c): Remove.
1651 (powerpc-altivec32l.c): Remove.
1652 (powerpc-cell32l.c): Remove.
1653 (powerpc-vsx32l.c): Remove.
1654 (powerpc-isa205-32l.c): Remove.
1655 (powerpc-isa205-altivec32l.c): Remove.
1656 (powerpc-isa205-vsx32l.c): Remove.
1657 (powerpc-e500l.c): Remove.
1658 (powerpc-64l.c): Remove.
1659 (powerpc-altivec64l.c): Remove.
1660 (powerpc-cell64l.c): Remove.
1661 (powerpc-vsx64l.c): Remove.
1662 (powerpc-isa205-64l.c): Remove.
1663 (powerpc-isa205-altivec64l.c): Remove.
1664 (powerpc-isa205-vsx64l.c): Remove.
1665 (s390-linux32.c): Remove.
1666 (s390-linux32v1.c): Remove.
1667 (s390-linux32v2.c): Remove.
1668 (s390-linux64.c): Remove.
1669 (s390-linux64v1.c): Remove.
1670 (s390-linux64v2.c): Remove.
1671 (s390-te-linux64.c): Remove.
1672 (s390-vx-linux64.c): Remove.
1673 (s390-tevx-linux64.c): Remove.
1674 (s390x-linux64.c): Remove.
1675 (s390x-linux64v1.c): Remove.
1676 (s390x-linux64v2.c): Remove.
1677 (s390x-te-linux64.c): Remove.
1678 (s390x-vx-linux64.c): Remove.
1679 (s390x-tevx-linux64.c): Remove.
1680 (tic6x-c64xp-linux.c): Remove.
1681 (tic6x-c64x-linux.c): Remove.
1682 (tic6x-c62x-linux.c): Remove.
1683 (reg-sh.c): Remove.
1684 (reg-sparc64.c): Remove.
1685 (reg-spu.c): Remove.
1686 (amd64.c): Remove.
1687 (amd64-linux.c): Remove.
1688 (amd64-avx.c): Remove.
1689 (amd64-avx-linux.c): Remove.
1690 (amd64-avx-avx512.c): Remove.
1691 (amd64-avx-avx512-linux.c): Remove.
1692 (amd64-mpx.c): Remove.
1693 (amd64-mpx-linux.c): Remove.
1694 (amd64-avx-mpx-avx512-pku.c): Remove.
1695 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1696 (amd64-avx-mpx.c): Remove.
1697 (amd64-avx-mpx-linux.c): Remove.
1698 (x32.c): Remove.
1699 (x32-linux.c): Remove.
1700 (x32-avx.c): Remove.
1701 (x32-avx-linux.c): Remove.
1702 (x32-avx-avx512.c): Remove.
1703 (x32-avx-avx512-linux.c): Remove.
1704 (reg-xtensa.c): Remove.
1705 (reg-tilegx.c): Remove.
1706 (reg-tilegx32.c): Remove.
1707
1672e0d9
SDJ
17082017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1709
1710 * Makefile.in (SFILES): Add "common/environ.c".
1711 (OBJS): Add "common/environ.h".
1712
239b6d10
WT
17132017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1714
1715 * configure.ac: Check if the fs_base and gs_base members of
1716 `struct user_regs_struct' exist.
1717 * config.in: Regenerated.
1718 * configure: Likewise.
1719
694b382c
AT
17202017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1721
1722 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1723 target_read_memory.
1724 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1725 (get_next_pcs_syscall_next_pc): Likewise.
1726
7dc53023
LM
17272016-12-23 Luis Machado <lgustavo@codesourcery.com>
1728
1729 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1730 * nto-x86-low.c: Likewise.
1731
ad02e4fe
SM
17322016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1733
1734 * Makefile.in: Include disable-implicit-rules.mk.
1735
dcb07cfa
PA
17362016-11-23 Pedro Alves <palves@redhat.com>
1737
1738 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1739 (debug_vprintf): Use std::chrono::steady_clock instead of
1740 gettimeofday. Use '.' instead of ':'.
1741 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1742 (get_timestamp): Use std::chrono::steady_clock instead of
1743 gettimeofday.
1744
8629c02c
SM
17452016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1746
1747 * Makefile.in: Fix whitespace formatting.
1748
b593ecca
SM
17492016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1750
1751 * Makefile.in (SFILES, OBS): Flatten list and order
1752 alphabetically.
1753
9986ba08
PA
17542016-11-23 Pedro Alves <palves@redhat.com>
1755
1756 * event-loop.c (handle_file_event): Use warning.
1757 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1758 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1759 Use warning.
1760
4eefa7bc
PA
17612016-11-23 Pedro Alves <palves@redhat.com>
1762
1763 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1764 output.
1765 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1766 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1767 debug_printf and debug_flush for debug output.
1768 * server.c (handle_general_set): Likewise.
1769 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1770 output.
1771
5443506e
SM
17722016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1773
1774 * Makefile.in (.c.o): Replace rule with ...
1775 (%.o: %.c): ... this one.
1776
3b165252
SM
17772016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1778
1779 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1780 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1781 make.
1782 * configure.ac: Remove checks for the make program.
1783 * configure: Re-generate.
1784
0bcda685
PA
17852016-10-28 Pedro Alves <palves@redhat.com>
1786
1787 * Makefile.in (CXX_DIALECT): Get from configure.
1788 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1789 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1790 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1791 * config.in: Regenerate.
1792 * configure: Regenerate.
1793
c3805894
YQ
17942016-10-27 Yao Qi <yao.qi@linaro.org>
1795
1796 * linux-low.c (linux_supports_range_stepping): Return true if
1797 can_software_single_step return true.
1798
89342618
YQ
17992016-10-27 Yao Qi <yao.qi@linaro.org>
1800
1801 * inferiors.c (find_inferior_in_random): New function.
1802 * inferiors.h (find_inferior_in_random): Declare.
1803 * linux-low.c (linux_wait_for_event_filtered): Call
1804 find_inferior_in_random instead of find_inferior.
1805
e3652c84
YQ
18062016-10-27 Yao Qi <yao.qi@linaro.org>
1807
1808 * linux-low.c (linux_wait_1): If single-step breakpoints are
1809 inserted, remove them.
1810
5a04c4cf
PA
18112016-10-26 Pedro Alves <palves@redhat.com>
1812
1813 * linux-low.c (handle_extended_wait): Link parent/child fork
1814 threads.
1815 (linux_wait_1): Unlink them.
1816 (linux_set_resume_request): Ignore resume requests for
1817 already-resumed and unhandled fork child threads.
1818 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1819 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1820 New functions.
1821 (handle_v_requests) <vCont>: Don't call require_running.
1822 * server.h (in_queued_stop_replies): New declaration.
1823
cb93dc7f
YQ
18242016-10-24 Yao Qi <yao.qi@linaro.org>
1825
1826 PR server/20733
1827 * linux-aarch64-low.c (append_insns): Cast the return value to
1828 'uint32_t *'.
1829
a1078bea
YQ
18302016-10-10 Yao Qi <yao.qi@linaro.org>
1831
1832 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1833
1fb77080
SDJ
18342016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1835
1836 * target.c (target_supports_multi_process): New function, moved
1837 from...
1838 * target.h (target_supports_multi_process): ... here. Remove
1839 macro.
1840
39b5a3b9
TT
18412016-10-05 Tom Tromey <tom@tromey.com>
1842
1843 PR remote/20655:
1844 * tracepoint.c (handle_tracepoint_bkpts): Check
1845 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1846
c1d0b70a
YQ
18472016-10-05 Yao Qi <yao.qi@linaro.org>
1848
1849 * configure.srv: Update the path of arm-*.xml files.
1850
0a69eedb
YQ
18512016-10-05 Terry Guo <terry.guo@arm.com>
1852 Yao Qi <yao.qi@linaro.org>
1853
1854 * Makefile.in: Adjust the path of rules.
1855 * configure.srv: Update the path of xml files.
1856 * regformats/arm-with-iwmmxt.dat: Regenerated.
1857 * regformats/arm-with-neon.dat: Likewise.
1858 * regformats/arm-with-vfpv2.dat: Likewise.
1859 * regformats/arm-with-vfpv3.dat Likewise.
1860
17e16485
YQ
18612016-09-30 Yao Qi <yao.qi@linaro.org>
1862
1863 PR gdbserver/20627
1864 * target.c (target_stop_and_wait): Don't call
1865 target_continue_no_signal, use resume_stop instead.
1866
edeeb602
YQ
18672016-09-26 Yao Qi <yao.qi@linaro.org>
1868
1869 * linux-low.c (linux_wait_1): Call debug_exit.
1870
503b1c39
PA
18712016-09-23 Pedro Alves <palves@redhat.com>
1872
1873 * Makefile.in (SFILES): Add common/new-op.c.
1874 (OBS): Add common/new-op.o.
1875 (new-op.o): New rule.
1876
74172ecf
SM
18772016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1878
1879 * .gitinore: Ignore more files.
1880
fc6cda2e
YQ
18812016-09-21 Yao Qi <yao.qi@linaro.org>
1882
1883 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1884 23.
1885
bc1e6c81
SDJ
18862016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1887
1888 * server.c (start_inferior): Call target_mourn_inferior instead of
1889 mourn_inferior; pass ptid_t argument to it.
1890 (resume): Likewise.
1891 (handle_target_event): Likewise.
1892 * target.c (target_mourn_inferior): New function.
1893 * target.h (mourn_inferior): Delete macro.
1894
0e00e962
AA
18952016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1896
1897 * linux-low.c (lwp_is_stepping): New function.
1898
1d8cb77d
CL
18992016-09-06 Carl Love <cel@us.ibm.com>
1900
1901 * server.c (start_inferior): Fixed comment, requested comment change
1902 didn't get updated correctly. Removed reference to ptrace () call as
1903 it is only true on Linux systems.
1904
7313bced
CL
19052016-09-06 Carl Love <cel@us.ibm.com>
1906
1907 * server.c (start_inferior): Do not call
1908 function target_post_create_inferior () if the
1909 inferior process has already exited.
1910
cf6de44d
PA
19112016-09-05 Pedro Alves <palves@redhat.com>
1912
1913 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1914 (COMPILE.pre, CC_LD): Use CXX directly.
1915 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1916 * acinclude.m4: Don't include build-with-cxx.m4.
1917 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1918 * configure: Regenerate.
1919
c1da6748
AT
19202016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1921
1922 PR gdb/19495
1923 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1924 call writing data to own_buf.
1925
f2b9e3df
SDJ
19262016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1927
1928 * target.c (mywait): Call target_wait instead of
1929 the_target->wait.
1930 (target_wait): New function.
1931
049a8570
SDJ
19322016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1933
1934 * server.c (start_inferior): New variable 'ptid'. Replace calls
1935 to the_target->resume by target_continue{,_no_signal}, depending
1936 on the case.
1937 * target.c (target_stop_and_wait): Call target_continue_no_signal
1938 instead of the_target->resume.
1939 (target_continue): New function.
1940
3aa5cfa0
AT
19412016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1942
1943 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1944
754653a7
AZ
19452016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1946
1947 PR server/20491
1948 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1949 ps_prochandle.
1950 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1951 * linux-arm-low.c (ps_get_thread_area): Likewise.
1952 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1953 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1954 * linux-mips-low.c (ps_get_thread_area): Likewise.
1955 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1956 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1957 * linux-x86-low.c (ps_get_thread_area): Likewise.
1958 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1959
ed036b40
PA
19602016-08-19 Pedro Alves <palves@redhat.com>
1961
1962 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1963
c8ef42ee
PA
19642016-08-19 Pedro Alves <palves@redhat.com>
1965
1966 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1967 comment. Use memcpy instead of casting through unsigned long.
1968
9c235a72
PA
19692016-08-19 Pedro Alves <palves@redhat.com>
1970
1971 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1972 allocating around 0x80000000.
1973
201506da
PA
19742016-08-19 Pedro Alves <palves@redhat.com>
1975
1976 PR gdb/20415
1977 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1978 (x32-avx512-linux-ipa.o): New rules.
1979 * configure.ac (x86_64-*-linux*): New x32 check.
1980 * configure.srv (ipa_x32_linux_regobj): New.
1981 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1982 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1983 descriptions.
1984 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1985 descriptions.
1986 * configure: Regenerate.
1987
f348d89a
PA
19882016-08-09 Pedro Alves <palves@redhat.com>
1989
1990 PR gdb/18653
1991 * Makefile.in (OBS): Add signals-state-save-restore.o.
1992 (signals-state-save-restore.o): New rule.
1993 * config.in: Regenerate.
1994 * configure: Regenerate.
1995 * linux-low.c: Include "signals-state-save-restore.h".
1996 (linux_create_inferior): Call
1997 restore_original_signals_state.
1998 * server.c: Include "dispositions-save-restore.h".
1999 (captured_main): Call save_original_signals_state.
2000
1baf5149
PA
20012016-08-05 Pedro Alves <palves@redhat.com>
2002
2003 * configure: Regenerate.
2004
fcd4a73d
YQ
20052016-08-04 Yao Qi <yao.qi@linaro.org>
2006
2007 * linux-low.c (regsets_fetch_inferior_registers): Check
2008 errno is ESRCH or not.
2009
979659d0
YQ
20102016-08-02 Yao Qi <yao.qi@linaro.org>
2011
2012 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2013 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2014 (thread_db_load_search): Update.
2015 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2016 td_ta_set_event and td_ta_event_getmsg.
2017
6598661d
PA
20182016-07-26 Pedro Alves <palves@redhat.com>
2019
2020 PR server/20414
2021 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2022 of unsigned long for 64-bit registers and use uint32_t instead of
2023 unsigned int for 32-bit registers.
2024
9cf12d57
PA
20252016-07-26 Pedro Alves <palves@redhat.com>
2026
2027 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2028 to 'ptrace'.
2029
305450ed
TT
20302016-07-21 Tom Tromey <tom@tromey.com>
2031
2032 * configure: Rebuild.
2033
2583da7c
YQ
20342016-07-21 Yao Qi <yao.qi@linaro.org>
2035
2036 * mem-break.c (find_gdb_breakpoint): Cast bp to
2037 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2038
21536b36
YQ
20392016-07-21 Yao Qi <yao.qi@linaro.org>
2040
2041 * server.c (handle_v_requests): Support s and S actions
2042 if target_supports_software_single_step return true.
2043
8901d193
YQ
20442016-07-21 Yao Qi <yao.qi@linaro.org>
2045
2046 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2047 is resume_step, call maybe_hw_step.
2048 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2049 and unstop them.
2050 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2051 breakpoints or not.
2052 (proceed_one_lwp): If resume request is resume_step, install
2053 reinsert breakpoints and call maybe_hw_step.
2054
0e9a339e
YQ
20552016-07-21 Yao Qi <yao.qi@linaro.org>
2056
2057 * linux-low.c (proceed_one_lwp): Declare.
2058 (linux_resume_one_thread): Remove local variable 'step'.
2059 Lift code enqueue signal. Call proceed_one_lwp instead of
2060 linux_resume_one_lwp.
2061
4281b351
YQ
20622016-07-21 Yao Qi <yao.qi@linaro.org>
2063
2064 * linux-low.c (linux_resume_one_thread): Call
2065 enqueue_pending_signal.
2066
984a2c04
YQ
20672016-07-21 Yao Qi <yao.qi@linaro.org>
2068
2069 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2070 * inferiors.c (do_restore_current_thread_cleanup): New function.
2071 (make_cleanup_restore_current_thread): Likewise.
2072 * linux-low.c (install_software_single_step_breakpoints): Call
2073 make_cleanup_restore_current_thread. Switch current_thread to
2074 thread.
2075
bec903c9
YQ
20762016-07-21 Yao Qi <yao.qi@linaro.org>
2077
2078 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2079 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2080 (clone_one_breakpoint): Likewise.
2081 (delete_reinsert_breakpoints): Change parameter to thread.
2082 Callers updated.
2083 (has_reinsert_breakpoints): Likewise.
2084 (uninsert_reinsert_breakpoints): Likewise.
2085 (reinsert_reinsert_breakpoints): Likewise.
2086 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2087 (delete_reinsert_breakpoints): Likewise.
2088 (reinsert_reinsert_breakpoints): Likewise.
2089 (uninsert_reinsert_breakpoints): Likewise.
2090 (has_reinsert_breakpoints): Likewise.
2091
63c40ec7
YQ
20922016-07-21 Yao Qi <yao.qi@linaro.org>
2093
2094 * inferiors.c (get_thread_process): Make parameter const.
2095 * inferiors.h (get_thread_process): Update declaration.
2096 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2097 Add new parameters child_thread and parent_thread. Callers
2098 updated.
2099 * mem-break.h (clone_all_breakpoints): Update declaration.
2100
9aa76cd0
YQ
21012016-07-21 Yao Qi <yao.qi@linaro.org>
2102
2103 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2104 <command_list, handler>: Remove.
2105 (struct gdb_breakpoint): New.
2106 (struct other_breakpoint): New.
2107 (struct reinsert_breakpoint): New.
2108 (is_gdb_breakpoint): New function.
2109 (any_persistent_commands): Update command_list if
2110 is_gdb_breakpoint returns true.
2111 (set_breakpoint): Create breakpoints according to their types.
2112 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2113 (set_gdb_breakpoint_1): Likewise.
2114 (set_gdb_breakpoint): Likewise.
2115 (clear_breakpoint_conditions): Change parameter type to
2116 'struct gdb_breakpoint *'.
2117 (clear_breakpoint_commands): Likewise.
2118 (clear_breakpoint_conditions_and_commands): Likewise.
2119 (add_condition_to_breakpoint): Likewise.
2120 (add_breakpoint_condition): Likewise.
2121 (add_commands_to_breakpoint): Likewise.
2122 (check_breakpoints): Check other_breakpoint.
2123 (clone_one_breakpoint): Clone breakpopint according to its type.
2124 * mem-break.h (struct gdb_breakpoint): Declare.
2125 (set_gdb_breakpoint): Update declaration.
2126 (clear_breakpoint_conditions_and_commands): Likewise.
2127 (add_breakpoint_condition): Likewise.
2128 (add_breakpoint_commands): Likewise.
2129 * server.c (process_point_options): Change parameter type to
2130 'struct gdb_breakpoint *'.
2131
811f8301
YQ
21322016-07-21 Yao Qi <yao.qi@linaro.org>
2133
2134 * mem-break.c (set_breakpoint_at): Rename it to ...
2135 (set_breakpoint_type_at): ... it.
2136 (set_breakpoint_at): Call set_breakpoint_type_at.
2137 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2138 * mem-break.h (set_breakpoint_at): Update comments.
2139
b1c51e36
CLT
21402016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2141
2142 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2143 to buf parameter.
2144 (nios2_store_gregset): Likewise.
2145
ced2dffb
PA
21462016-07-01 Pedro Alves <palves@redhat.com>
2147 Antoine Tremblay <antoine.tremblay@ericsson.com>
2148
2149 * linux-low.c: Change interface to take the target lwp_info
2150 pointer directly and return void. Handle detaching from a zombie
2151 thread.
2152 (linux_detach_lwp_callback): New function.
2153 (linux_detach): Detach from the leader thread after detaching from
2154 the clone threads.
2155
2ac09a5b
YQ
21562016-06-28 Yao Qi <yao.qi@linaro.org>
2157
2158 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2159 for variable new_offset.
2160 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2161 (aarch64_ftrace_insn_reloc_cb): Likewise.
2162 (aarch64_ftrace_insn_reloc_tb): Likewise.
2163 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2164 PRIx64 instead of PRIx32.
2165
79e7fd4f
YQ
21662016-06-28 Yao Qi <yao.qi@linaro.org>
2167
2168 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2169 (the_low_target): Install arm_get_syscall_trapinfo.
2170
061fc021
YQ
21712016-06-28 Yao Qi <yao.qi@linaro.org>
2172
2173 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2174 function.
2175 (the_low_target): Install aarch64_get_syscall_trapinfo.
2176
4cc32bec
YQ
21772016-06-28 Yao Qi <yao.qi@linaro.org>
2178
2179 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2180 Callers updated.
2181 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2182 Remove parameter sysno.
2183 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2184 sysret.
2185
782c1122
AA
21862016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2187
2188 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2189 (s390_emit_ne_goto): Likewise.
2190 (s390_emit_lt_goto): Likewise.
2191 (s390_emit_le_goto): Likewise.
2192 (s390_emit_gt_goto): Likewise.
2193 (s390_emit_ge_goto): Likewise.
2194 (s390x_emit_eq_goto): Likewise.
2195 (s390x_emit_ne_goto): Likewise.
2196 (s390x_emit_lt_goto): Likewise.
2197 (s390x_emit_le_goto): Likewise.
2198 (s390x_emit_gt_goto): Likewise.
2199 (s390x_emit_ge_goto): Likewise.
2200 (s390_emit_ops_impl): Mark variable static.
2201 (s390x_emit_ops): Likewise.
2202
2e7b624b
YQ
22032016-06-17 Yao Qi <yao.qi@linaro.org>
2204
2205 * linux-low.c (handle_extended_wait): Call
2206 uninsert_reinsert_breakpoints for the parent process. Remove
2207 reinsert breakpoints from the child process. Reinsert them to
2208 the parent process when vfork is done.
2209 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2210 (reinsert_reinsert_breakpoints): New function.
2211 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2212 (reinsert_reinsert_breakpoints): Declare.
2213
8a81c5d7
YQ
22142016-06-17 Yao Qi <yao.qi@linaro.org>
2215
2216 * linux-low.c (handle_extended_wait): If the parent is doing
2217 step-over, remove the reinsert breakpoints from the forked child.
2218
f50bf8e5
YQ
22192016-06-17 Yao Qi <yao.qi@linaro.org>
2220
2221 * linux-low.c (unsuspend_all_lwps): Declare.
2222 (linux_low_filter_event): If thread exited, call finish_step_over.
2223 If step-over is finished, unsuspend other threads.
2224
8376a3cb
YQ
22252016-06-17 Yao Qi <yao.qi@linaro.org>
2226
2227 * linux-low.c (linux_resume_one_lwp_throw): Assert
2228 has_reinsert_breakpoints returns false.
2229 * mem-break.c (delete_disabled_breakpoints): Assert
2230 bp type isn't reinsert_breakpoint.
2231
f79b145d
YQ
22322016-06-17 Yao Qi <yao.qi@linaro.org>
2233
2234 * linux-low.c (maybe_hw_step): New function.
2235 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2236 (finish_step_over): Switch current_thread to lwp temporarily,
2237 and assert has_reinsert_breakpoints returns true.
2238 (proceed_one_lwp): Call maybe_hw_step.
2239 * mem-break.c (has_reinsert_breakpoints): New function.
2240 * mem-break.h (has_reinsert_breakpoints): Declare.
2241
0ae534d2
JT
22422016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2243
2244 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2245
fcdad592
YQ
22462016-05-17 Yao Qi <yao.qi@linaro.org>
2247
2248 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2249 instead of find_inferior.
2250
9e784964
YQ
22512016-05-05 Yao Qi <yao.qi@linaro.org>
2252
2253 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2254 Initialize res to zero.
2255
cf2ebb6e
YQ
22562016-05-05 Yao Qi <yao.qi@linaro.org>
2257
2258 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2259 to uint32_t.
2260
c1aebf87
UW
22612016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2262
2263 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2264 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2265 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2266
35fd2deb 22672016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 2268 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
2269
2270 * tracepoint.c (write_inferior_int8): New function.
2271 (cmd_qtenable_disable): Write enable flag using
2272 write_inferior_int8.
2273
484b3c32
YQ
22742016-04-25 Yao Qi <yao.qi@linaro.org>
2275
2276 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2277 (need_step_over_p): Return zero if the LWP has pending signals
2278 can be delivered on software single step target.
2279
85ba7d86
YQ
22802016-04-25 Yao Qi <yao.qi@linaro.org>
2281
2282 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2283 return instead of error.
2284
3539aa13
YQ
22852016-04-22 Yao Qi <yao.qi@linaro.org>
2286
2287 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2288 to 23.
2289
5b061e98
YQ
22902016-04-22 Yao Qi <yao.qi@linaro.org>
2291
2292 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2293 signal when stepping over breakpoint with software single
2294 step.
2295
3451269c
PA
22962016-04-21 Pedro Alves <palves@redhat.com>
2297
2298 * linux-s390-low.c (s390_collect_ptrace_register)
2299 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2300 add casts.
2301 (s390_check_regset): Use void * instead of gdb_byte *.
2302
a2358508
PA
23032016-04-20 Pedro Alves <palves@redhat.com>
2304
2305 * configure: Renegerate.
2306
6885166d
YQ
23072016-04-20 Yao Qi <yao.qi@linaro.org>
2308
2309 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2310 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2311 number 16.
2312 (arm_store_gregset): Likewise.
2313
2b863f51
WT
23142016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2315
2316 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2317 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2318 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2319 (amd64-avx-mpx-linux.c): New rules.
2320 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2321 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2322 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2323 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2324 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2325 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2326 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2327 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2328 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2329 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2330 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2331 * linux-x86-low.c (x86_linux_read_description): Add case for
2332 X86_XSTATE_AVX_MPX_MASK.
2333 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2334 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2335 init_registers_i386_avx_mpx_linux.
2336 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2337 (initialize_low_tracepoint): Call
2338 init_registers_i386_avx_mpx_linux.
2339 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2340 (initialize_low_tracepoint): Call
2341 init_registers_amd64_avx_mpx_linux.
2342 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2343 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2344 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2345 declarations.
2346
9b30624b
PA
23472016-04-18 Pedro Alves <palves@redhat.com>
2348
2349 * configure: Regenerate.
2350
45e3745e
AT
23512016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2352
2353 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2354 (aarch64_emit_sub): Likewise.
2355
2afc13ff
PA
23562016-04-12 Pedro Alves <palves@redhat.com>
2357
2358 * utils.c (prepare_to_throw_exception): Delete.
2359
6e774b13
SM
23602016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2361
2362 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2363
4dca19f8
MK
23642016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2365
2366 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2367
d0a9981f
MK
23682016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2369
2370 * linux-aarch64-ipa.c: Add <elf.h> include.
2371 * linux-ppc-ipa.c: Add <elf.h> include.
2372 * linux-s390-ipa.c: Add <elf.h> include.
2373
252db07e
MK
23742016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2375
2376 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2377 (get_raw_reg_ptr): Likewise.
2378 (get_trace_state_variable_value_ptr): Likewise.
2379 (set_trace_state_variable_value_ptr): Likewise.
2380 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2381 char *.
2382
14e2b6d9
MK
23832016-03-31 Wei-cheng Wang <cole945@gmail.com>
2384 Marcin Kościelnicki <koriakin@0x04.net>
2385
2386 PR/17221
2387 * linux-ppc-low.c (emit_insns): New function.
2388 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2389 (ppc_emit_prologue): New function.
2390 (ppc_emit_epilogue): New function.
2391 (ppc_emit_add): New function.
2392 (ppc_emit_sub): New function.
2393 (ppc_emit_mul): New function.
2394 (ppc_emit_lsh): New function.
2395 (ppc_emit_rsh_signed): New function.
2396 (ppc_emit_rsh_unsigned): New function.
2397 (ppc_emit_ext): New function.
2398 (ppc_emit_zero_ext): New function.
2399 (ppc_emit_log_not): New function.
2400 (ppc_emit_bit_and): New function.
2401 (ppc_emit_bit_or): New function.
2402 (ppc_emit_bit_xor): New function.
2403 (ppc_emit_bit_not): New function.
2404 (ppc_emit_equal): New function.
2405 (ppc_emit_less_signed): New function.
2406 (ppc_emit_less_unsigned): New function.
2407 (ppc_emit_ref): New function.
2408 (ppc_emit_const): New function.
2409 (ppc_emit_reg): New function.
2410 (ppc_emit_pop): New function.
2411 (ppc_emit_stack_flush): New function.
2412 (ppc_emit_swap): New function.
2413 (ppc_emit_stack_adjust): New function.
2414 (ppc_emit_call): New function.
2415 (ppc_emit_int_call_1): New function.
2416 (ppc_emit_void_call_2): New function.
2417 (ppc_emit_if_goto): New function.
2418 (ppc_emit_goto): New function.
2419 (ppc_emit_eq_goto): New function.
2420 (ppc_emit_ne_goto): New function.
2421 (ppc_emit_lt_goto): New function.
2422 (ppc_emit_le_goto): New function.
2423 (ppc_emit_gt_goto): New function.
2424 (ppc_emit_ge_goto): New function.
2425 (ppc_write_goto_address): New function.
2426 (ppc_emit_ops_impl): New static variable.
2427 (ppc64v1_emit_prologue): New function.
2428 (ppc64v2_emit_prologue): New function.
2429 (ppc64_emit_epilogue): New function.
2430 (ppc64_emit_add): New function.
2431 (ppc64_emit_sub): New function.
2432 (ppc64_emit_mul): New function.
2433 (ppc64_emit_lsh): New function.
2434 (ppc64_emit_rsh_signed): New function.
2435 (ppc64_emit_rsh_unsigned): New function.
2436 (ppc64_emit_ext): New function.
2437 (ppc64_emit_zero_ext): New function.
2438 (ppc64_emit_log_not): New function.
2439 (ppc64_emit_bit_and): New function.
2440 (ppc64_emit_bit_or): New function.
2441 (ppc64_emit_bit_xor): New function.
2442 (ppc64_emit_bit_not): New function.
2443 (ppc64_emit_equal): New function.
2444 (ppc64_emit_less_signed): New function.
2445 (ppc64_emit_less_unsigned): New function.
2446 (ppc64_emit_ref): New function.
2447 (ppc64_emit_const): New function.
2448 (ppc64v1_emit_reg): New function.
2449 (ppc64v2_emit_reg): New function.
2450 (ppc64_emit_pop): New function.
2451 (ppc64_emit_stack_flush): New function.
2452 (ppc64_emit_swap): New function.
2453 (ppc64v1_emit_call): New function.
2454 (ppc64v2_emit_call): New function.
2455 (ppc64v1_emit_int_call_1): New function.
2456 (ppc64v2_emit_int_call_1): New function.
2457 (ppc64v1_emit_void_call_2): New function.
2458 (ppc64v2_emit_void_call_2): New function.
2459 (ppc64_emit_if_goto): New function.
2460 (ppc64_emit_eq_goto): New function.
2461 (ppc64_emit_ne_goto): New function.
2462 (ppc64_emit_lt_goto): New function.
2463 (ppc64_emit_le_goto): New function.
2464 (ppc64_emit_gt_goto): New function.
2465 (ppc64_emit_ge_goto): New function.
2466 (ppc64v1_emit_ops_impl): New static variable.
2467 (ppc64v2_emit_ops_impl): New static variable.
2468 (ppc_emit_ops): New function.
2469 (linux_low_target): Wire in ppc_emit_ops.
2470
a2174ba4
MK
24712016-03-31 Wei-cheng Wang <cole945@gmail.com>
2472 Marcin Kościelnicki <koriakin@0x04.net>
2473
2474 PR/17221
2475 * Makefile.in: Add powerpc-*-ipa.o
2476 * configure.srv: Add ipa_obj for powerpc*-linux.
2477 * linux-ppc-ipa.c: New file.
2478 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2479 includes.
2480 (PPC_FIELD): New macro.
2481 (PPC_SEXT): New macro.
2482 (PPC_OP6): New macro.
2483 (PPC_BO): New macro.
2484 (PPC_LI): New macro.
2485 (PPC_BD): New macro.
2486 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2487 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2488 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2489 (ppc_get_thread_area): New function.
2490 (is_elfv2_inferior): New function.
2491 (gen_ds_form): New function.
2492 (GEN_STD): New macro.
2493 (GEN_STDU): New macro.
2494 (GEN_LD): New macro.
2495 (GEN_LDU): New macro.
2496 (gen_d_form): New function.
2497 (GEN_ADDI): New macro.
2498 (GEN_ADDIS): New macro.
2499 (GEN_LI): New macro.
2500 (GEN_LIS): New macro.
2501 (GEN_ORI): New macro.
2502 (GEN_ORIS): New macro.
2503 (GEN_LWZ): New macro.
2504 (GEN_STW): New macro.
2505 (GEN_STWU): New macro.
2506 (gen_xfx_form): New function.
2507 (GEN_MFSPR): New macro.
2508 (GEN_MTSPR): New macro.
2509 (GEN_MFCR): New macro.
2510 (GEN_MTCR): New macro.
2511 (GEN_SYNC): New macro.
2512 (GEN_LWSYNC): New macro.
2513 (gen_x_form): New function.
2514 (GEN_OR): New macro.
2515 (GEN_MR): New macro.
2516 (GEN_LWARX): New macro.
2517 (GEN_STWCX): New macro.
2518 (GEN_CMPW): New macro.
2519 (gen_md_form): New function.
2520 (GEN_RLDICL): New macro.
2521 (GEN_RLDICR): New macro.
2522 (gen_i_form): New function.
2523 (GEN_B): New macro.
2524 (GEN_BL): New macro.
2525 (gen_b_form): New function.
2526 (GEN_BNE): New macro.
2527 (GEN_LOAD): New macro.
2528 (GEN_STORE): New macro.
2529 (gen_limm): New function.
2530 (gen_atomic_xchg): New function.
2531 (gen_call): New function.
2532 (ppc_relocate_instruction): New function.
2533 (ppc_install_fast_tracepoint_jump_pad): New function.
2534 (ppc_get_min_fast_tracepoint_insn_len): New function.
2535 (ppc_get_ipa_tdesc_idx): New function.
2536 (the_low_target): Wire in the new functions.
2537 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2538 tdescs.
2539 * linux-ppc-tdesc.h: New file.
2540
a13c4696
MK
25412016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2542
2543 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2544 (alloc_jump_pad_buffer): New function.
2545 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2546 (alloc_jump_pad_buffer): New function.
2547 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2548 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2549 (alloc_jump_pad_buffer): New function.
2550 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2551 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2552 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2553 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2554
1cda1512
MK
25552016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2556
2557 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2558 * linux-amd64-ipa.c: Likewise.
2559 * linux-i386-ipa.c: Likewise.
2560 * linux-s390-ipa.c: Likewise.
2561 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2562 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2563 set_trace_state_variable_value_ptr.
2564 (struct ipa_sym_addresses): Likewise.
2565 (symbol_list): Likewise.
2566 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2567 accessing gdb_collect directly.
2568 (gdb_collect_ptr_type): New typedef.
2569 (get_raw_reg_ptr_type): New typedef.
2570 (get_trace_state_variable_value_ptr_type): New typedef.
2571 (set_trace_state_variable_value_ptr_type): New typedef.
2572 (gdb_collect_ptr): New global.
2573 (get_raw_reg_ptr): New global.
2574 (get_trace_state_variable_value_ptr): New global.
2575 (set_trace_state_variable_value_ptr): New global.
2576 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2577 accessing get_raw_reg directly.
2578 (get_get_tsv_func_addr): Likewise for
2579 get_trace_state_variable_value_ptr.
2580 (get_set_tsv_func_addr): Likewise for
2581 set_trace_state_variable_value_ptr.
2582 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2583
72fb5488
SM
25842016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2585
2586 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2587
28170b88
MK
25882016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2589
2590 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2591 packets.
2592 (relocate_instruction): Remove own_buf.
2593 * server.c (own_buf): Make global.
2594 (handle_v_requests): Make global.
2595 * server.h (own_buf): New declaration.
2596 (handle_v_requests): New prototype.
2597
f39e8743
MK
25982016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2599
2600 PR 18377
2601 * linux-s390-low.c (add_insns): New function.
2602 (s390_emit_prologue): New function.
2603 (s390_emit_epilogue): New function.
2604 (s390_emit_add): New function.
2605 (s390_emit_sub): New function.
2606 (s390_emit_mul): New function.
2607 (s390_emit_lsh): New function.
2608 (s390_emit_rsh_signed): New function.
2609 (s390_emit_rsh_unsigned): New function.
2610 (s390_emit_ext): New function.
2611 (s390_emit_log_not): New function.
2612 (s390_emit_bit_and): New function.
2613 (s390_emit_bit_or): New function.
2614 (s390_emit_bit_xor): New function.
2615 (s390_emit_bit_not): New function.
2616 (s390_emit_equal): New function.
2617 (s390_emit_less_signed): New function.
2618 (s390_emit_less_unsigned): New function.
2619 (s390_emit_ref): New function.
2620 (s390_emit_if_goto): New function.
2621 (s390_emit_goto): New function.
2622 (s390_write_goto_address): New function.
2623 (s390_emit_litpool): New function.
2624 (s390_emit_const): New function.
2625 (s390_emit_call): New function.
2626 (s390_emit_reg): New function.
2627 (s390_emit_pop): New function.
2628 (s390_emit_stack_flush): New function.
2629 (s390_emit_zero_ext): New function.
2630 (s390_emit_swap): New function.
2631 (s390_emit_stack_adjust): New function.
2632 (s390_emit_set_r2): New function.
2633 (s390_emit_int_call_1): New function.
2634 (s390_emit_void_call_2): New function.
2635 (s390_emit_eq_goto): New function.
2636 (s390_emit_ne_goto): New function.
2637 (s390_emit_lt_goto): New function.
2638 (s390_emit_le_goto): New function.
2639 (s390_emit_gt_goto): New function.
2640 (s390_emit_ge_goto): New function.
2641 (s390x_emit_prologue): New function.
2642 (s390x_emit_epilogue): New function.
2643 (s390x_emit_add): New function.
2644 (s390x_emit_sub): New function.
2645 (s390x_emit_mul): New function.
2646 (s390x_emit_lsh): New function.
2647 (s390x_emit_rsh_signed): New function.
2648 (s390x_emit_rsh_unsigned): New function.
2649 (s390x_emit_ext): New function.
2650 (s390x_emit_log_not): New function.
2651 (s390x_emit_bit_and): New function.
2652 (s390x_emit_bit_or): New function.
2653 (s390x_emit_bit_xor): New function.
2654 (s390x_emit_bit_not): New function.
2655 (s390x_emit_equal): New function.
2656 (s390x_emit_less_signed): New function.
2657 (s390x_emit_less_unsigned): New function.
2658 (s390x_emit_ref): New function.
2659 (s390x_emit_if_goto): New function.
2660 (s390x_emit_const): New function.
2661 (s390x_emit_call): New function.
2662 (s390x_emit_reg): New function.
2663 (s390x_emit_pop): New function.
2664 (s390x_emit_stack_flush): New function.
2665 (s390x_emit_zero_ext): New function.
2666 (s390x_emit_swap): New function.
2667 (s390x_emit_stack_adjust): New function.
2668 (s390x_emit_int_call_1): New function.
2669 (s390x_emit_void_call_2): New function.
2670 (s390x_emit_eq_goto): New function.
2671 (s390x_emit_ne_goto): New function.
2672 (s390x_emit_lt_goto): New function.
2673 (s390x_emit_le_goto): New function.
2674 (s390x_emit_gt_goto): New function.
2675 (s390x_emit_ge_goto): New function.
2676 (s390_emit_ops): New function.
2677 (struct linux_target_ops): Fill in emit_ops hook.
2678
abd9baf9
MK
26792016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2680
2681 PR 18377
2682 * Makefile.in: Add s390 IPA files.
2683 * configure.srv: Build IPA for s390.
2684 * linux-s390-ipa.c: New file.
2685 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2686 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2687 (tdesc_s390_linux32): Likewise.
2688 (init_registers_s390_linux32v1): Likewise.
2689 (tdesc_s390_linux32v1): Likewise.
2690 (init_registers_s390_linux32v2): Likewise.
2691 (tdesc_s390_linux32v2): Likewise.
2692 (init_registers_s390_linux64): Likewise.
2693 (tdesc_s390_linux64): Likewise.
2694 (init_registers_s390_linux64v1): Likewise.
2695 (tdesc_s390_linux64v1): Likewise.
2696 (init_registers_s390_linux64v2): Likewise.
2697 (tdesc_s390_linux64v2): Likewise.
2698 (init_registers_s390_te_linux64): Likewise.
2699 (tdesc_s390_te_linux64): Likewise.
2700 (init_registers_s390_vx_linux64): Likewise.
2701 (tdesc_s390_vx_linux64): Likewise.
2702 (init_registers_s390_tevx_linux64): Likewise.
2703 (tdesc_s390_tevx_linux64): Likewise.
2704 (init_registers_s390x_linux64): Likewise.
2705 (tdesc_s390x_linux64): Likewise.
2706 (init_registers_s390x_linux64v1): Likewise.
2707 (tdesc_s390x_linux64v1): Likewise.
2708 (init_registers_s390x_linux64v2): Likewise.
2709 (tdesc_s390x_linux64v2): Likewise.
2710 (init_registers_s390x_te_linux64): Likewise.
2711 (tdesc_s390x_te_linux64): Likewise.
2712 (init_registers_s390x_vx_linux64): Likewise.
2713 (tdesc_s390x_vx_linux64): Likewise.
2714 (init_registers_s390x_tevx_linux64): Likewise.
2715 (tdesc_s390x_tevx_linux64): Likewise.
2716 (have_hwcap_s390_vx): New static variable.
2717 (s390_arch_setup): Fill have_hwcap_s390_vx.
2718 (s390_get_thread_area): New function.
2719 (s390_ft_entry_gpr_esa): New const.
2720 (s390_ft_entry_gpr_zarch): New const.
2721 (s390_ft_entry_misc): New const.
2722 (s390_ft_entry_fr): New const.
2723 (s390_ft_entry_vr): New const.
2724 (s390_ft_main_31): New const.
2725 (s390_ft_main_64): New const.
2726 (s390_ft_exit_fr): New const.
2727 (s390_ft_exit_vr): New const.
2728 (s390_ft_exit_misc): New const.
2729 (s390_ft_exit_gpr_esa): New const.
2730 (s390_ft_exit_gpr_zarch): New const.
2731 (append_insns): New function.
2732 (s390_relocate_instruction): New function.
2733 (s390_install_fast_tracepoint_jump_pad): New function.
2734 (s390_get_min_fast_tracepoint_insn_len): New function.
2735 (s390_get_ipa_tdesc_idx): New function.
2736 (struct linux_target_ops): Wire in the above functions.
2737 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2738 * linux-s390-tdesc.h: New file.
2739
a4105d04
MK
27402016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2741
2742 * linux-s390-low.c (s390_supports_tracepoints): New function.
2743 (struct linux_target_ops): Fill supports_tracepoints hook.
2744
35ac8b3e
YQ
27452016-03-18 Yao Qi <yao.qi@linaro.org>
2746
2747 * linux-low.c (lwp_signal_can_be_delivered): New function.
2748 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2749
94610ec4
YQ
27502016-03-18 Yao Qi <yao.qi@linaro.org>
2751
2752 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2753 0 if signal is enqueued. Remove 'signal' from one debugging
2754 message. Move one debugging message to some lines below.
2755 Remove code setting 'signal' to 0.
2756
80aea927
YQ
27572016-03-18 Yao Qi <yao.qi@linaro.org>
2758
2759 * linux-low.c (linux_low_filter_event): Remove redundant
2760 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2761
b04fd3be
MK
27622016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2763
2764 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2765 (struct linux_target_ops): Wire in the above.
2766
c40c8d4b
YQ
27672016-03-03 Yao Qi <yao.qi@linaro.org>
2768
2769 * linux-low.c: Update comments to start_step_over.
2770
0f8288ae
YQ
27712016-03-03 Yao Qi <yao.qi@linaro.org>
2772
2773 PR server/19736
2774 * linux-low.c (handle_extended_wait): Set child suspended
2775 if event_lwp->bp_reinsert isn't zero.
2776
fdbd04a8
YQ
27772016-03-02 Yao Qi <yao.qi@linaro.org>
2778
2779 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2780 enqueue_pending_signal.
2781
6896a8fa
MK
27822016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2783
2784 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2785 is actually loaded.
2786
ab503087
MK
27872016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2788
2789 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2790 (s390_regmap_3264) [!__s390x__]: New global.
2791 (s390_collect_ptrace_register): Skip map entries containing -1.
2792 (s390_supply_ptrace_register): Ditto.
2793 (s390_fill_gprs_high): New function.
2794 (s390_store_gprs_high): New function.
2795 (s390_regsets): Add NT_S390_HIGH_GPRS.
2796 (s390_get_hwcap): Enable on 31-bit.
2797 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2798 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2799 Detect NT_S390_HIGH_GPRS.
2800 (s390_usrregs_info_3264): Enable on 31-bit.
2801 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2802 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2803
ae91f625
MK
28042016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2805
2806 PR gdb/13808
2807 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2808 * configure.srv: Ditto.
2809 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2810 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2811 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2812 (init_registers_amd64_linux): Remove prototype.
2813 (tdesc_amd64_linux): Remove declaration.
2814 (get_ipa_tdesc): New function.
2815 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2816 initialize remaining tdescs.
2817 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2818 (init_registers_i386_linux): Remove prototype.
2819 (tdesc_i386_linux): Remove declaration.
2820 (get_ipa_tdesc): New function.
2821 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2822 initialize remaining tdescs.
2823 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2824 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2825 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2826 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2827 (x86_get_ipa_tdesc_idx): New function.
2828 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2829 * linux-x86-tdesc.h: New file.
2830 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2831 (target_get_ipa_tdesc_idx): New macro.
2832 * tracepoint.c (ipa_tdesc_idx): New macro.
2833 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2834 (symbol_list): Add ipa_tdesc_idx.
2835 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2836 (ipa_tdesc): Remove.
2837 (ipa_tdesc_idx): New variable.
2838 (get_context_regcache): Use get_ipa_tdesc.
2839 (gdb_collect): Ditto.
2840 (gdb_probe): Ditto.
2841 * tracepoint.h (get_ipa_tdesc): New prototype.
2842 (ipa_tdesc): Remove.
2843
e7ad2f14
PA
28442016-02-24 Pedro Alves <palves@redhat.com>
2845
2846 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2847 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2848 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2849 Factor out common code between the USE_SIGTRAP_SIGINFO and
2850 !USE_SIGTRAP_SIGINFO blocks.
2851 (linux_low_filter_event): Call save_stop_reason instead of
2852 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2853 Update comments.
2854 (linux_wait_1): Update comments.
2855
657f9cde
WW
28562016-02-24 Wei-cheng Wang <cole945@gmail.com>
2857
2858 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2859 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2860 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2861 ppc_insert_point, ppc_remove_point.
2862
b00b61e1
MK
28632016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2864
2865 * linux-s390-low.c (s390_supports_z_point_type): New function.
2866 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2867
553cb527
YQ
28682016-02-16 Yao Qi <yao.qi@linaro.org>
2869
2870 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2871 PC. Get pc from regcache_read_pc.
2872
a5652c21
YQ
28732016-02-12 Yao Qi <yao.qi@linaro.org>
2874
2875 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2876 or linux_get_pc_32bit.
2877 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2878
ed443b61
YQ
28792016-02-12 Yao Qi <yao.qi@linaro.org>
2880
2881 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2882 arm_linux_get_next_pcs_fixup.
2883
020ecd38
MK
28842016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2885
2886 * tracepoint.c (x_tracepoint_action_download): Change
2887 write_inferior_data_ptr to write_inferior_data_pointer.
2888 (cmd_qtstart): Likewise.
2889 (write_inferior_data_ptr): Remove.
2890 (download_agent_expr): Change write_inferior_data_ptr to
2891 write_inferior_data_pointer.
2892 (download_tracepoint_1): Likewise.
2893 (download_tracepoint): Likewise.
2894 (download_trace_state_variables): Likewise.
2895
7cae9051
WW
28962016-02-11 Wei-cheng Wang <cole945@gmail.com>
2897 Marcin Kościelnicki <koriakin@0x04.net>
2898
2899 * tracepoint.c (struct tracepoint_action_ops): Remove.
2900 (struct tracepoint_action): Remove ops.
2901 (m_tracepoint_action_download, r_tracepoint_action_download)
2902 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2903 size and offset accordingly.
2904 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2905 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2906 (tracepoint_action_send, tracepoint_action_download): New functions.
2907 Helpers for trace action handlers.
2908 (add_tracepoint_action): Remove setup actions ops.
2909 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2910
9f6a71b4
YQ
29112016-02-10 Yao Qi <yao.qi@linaro.org>
2912
2913 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2914
1e94266c
SM
29152016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2916
2917 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2918 to AC_OUTPUT.
2919 * configure: Regenerate.
2920
8adce034
SM
29212016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2922
2923 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2924 void * to gdb_byte *.
2925 * linux-low.c (siginfo_fixup): Likewise.
2926 (linux_xfer_siginfo): Likewise.
2927 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2928 Likewise.
2929 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2930
93813b37
WT
29312016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2932
2933 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2934 to srv_tgtobj.
2935 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2936 to srv_tgtobj.
2937 * linux-x86-low.c [__x86_64__]: Include
2938 "nat/amd64-linux-siginfo.h".
2939 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2940 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2941 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2942 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2943 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2944 (cpt_si_fd, si_timerid, si_overrun): Move from
2945 nat/amd64-linux-siginfo.c.
2946 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2947
8424cc97
SM
29482016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2949
2950 * server.c (skip_to_semicolon): Remove.
2951 (process_point_options): Use strchrnul instead of
2952 skip_to_semicolon.
2953
4d18591b
YQ
29542016-01-26 Yao Qi <yao.qi@linaro.org>
2955
2956 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2957 * linux-low.c (install_software_single_step_breakpoints): Don't
2958 call regcache_read_pc.
2959 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2960 argument pc.
2961
d8020970
YQ
29622016-01-26 Yao Qi <yao.qi@linaro.org>
2963
2964 * linux-low.c (install_software_single_step_breakpoints): Call
2965 regcache_read_pc instead of get_pc.
2966
8b207339
YQ
29672016-01-26 Yao Qi <yao.qi@linaro.org>
2968
2969 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2970 (unblock_async_io): Rename to ...
2971 (block_unblock_async_io): ... it. New function.
2972 (enable_async_io): Don't install SIGIO handler. Unblock it
2973 instead.
2974 (disable_async_io): Don't ignore SIGIO. Block it instead.
2975 (initialize_async_io): Install SIGIO handler. Don't call
2976 unblock_async_io.
2977
18879fef
YQ
29782016-01-26 Yao Qi <yao.qi@linaro.org>
2979
2980 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2981 first character is '\003', call *the_target->request_interrupt.
2982
a0f8e08a
YQ
29832016-01-25 Yao Qi <yao.qi@linaro.org>
2984
2985 * remote-utils.c (new_thread_notify): Remove.
2986 (dead_thread_notify): Likewise.
2987 * remote-utils.h (new_thread_notify): Remove declaration.
2988 (dead_thread_notify): Likewise.
2989
cc5fd9ab
MK
29902016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2991
2992 * gdb.trace/pending.exp: Fix expected message on continue.
2993
99e8eb11
MK
29942016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2995
2996 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2997 it works properly on big-endian machines where sizeof (CORE_ADDR)
2998 != sizeof (void *).
2999
a994041d
PA
30002016-01-21 Pedro Alves <palves@redhat.com>
3001
3002 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3003 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3004 * configure: Regenerate.
3005
f7a6a40d
YQ
30062016-01-21 Yao Qi <yao.qi@linaro.org>
3007
3008 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3009 is_thumb and set it according to CPSR saved on the stack.
3010 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3011 arm_sigreturn_next_pc.
3012
6f69e520
YQ
30132016-01-18 Yao Qi <yao.qi@linaro.org>
3014
3015 * linux-low.c (linux_set_pc_64bit): New function.
3016 (linux_get_pc_64bit): New function.
3017 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3018 Declare.
3019 * linux-sparc-low.c (debug_threads): Remove declaration.
3020 (sparc_get_pc): Remove.
3021 (the_low_target): Use linux_get_pc_64bit instead of
3022 sparc_get_pc.
3023 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3024 (the_low_target): Use linux_get_pc_64bit and
3025 linux_set_pc_64bit.
3026
276d4552
YQ
30272016-01-18 Yao Qi <yao.qi@linaro.org>
3028
3029 * linux-arm-low.c (debug_threads): Remove declaration.
3030 (arm_get_pc, arm_set_pc): Remove.
3031 (the_low_target): Use linux_get_pc_32bit and
3032 linux_set_pc_32bit.
3033 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3034 (the_low_target): Use linux_get_pc_32bit and
3035 linux_set_pc_32bit.
3036 * linux-cris-low.c (debug_threads): Remove declaration.
3037 (cris_get_pc, cris_set_pc,): Remove.
3038 (the_low_target): Use linux_get_pc_32bit and
3039 linux_set_pc_32bit.
3040 * linux-crisv32-low.c (debug_threads): Remove declaration.
3041 (cris_get_pc, cris_set_pc): Remove.
3042 (the_low_target): Use linux_get_pc_32bit and
3043 linux_set_pc_32bit.
3044 * linux-low.c: Include inttypes.h.
3045 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3046 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3047 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3048 (the_low_target): Use linux_get_pc_32bit and
3049 linux_set_pc_32bit.
3050 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3051 (the_low_target): Use linux_get_pc_32bit and
3052 linux_set_pc_32bit.
3053 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3054 (the_low_target): Use linux_get_pc_32bit and
3055 linux_set_pc_32bit.
3056 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3057 (the_low_target): Use linux_get_pc_32bit and
3058 linux_set_pc_32bit.
3059 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3060 (the_low_target): Use linux_get_pc_32bit and
3061 linux_set_pc_32bit.
3062
eb0edac8
GB
30632016-01-18 Gary Benson <gbenson@redhat.com>
3064
3065 * configure.ac (AC_FUNC_FORK): New check.
3066 * config.in: Regenerate.
3067 * configure: Likewise.
3068
1b451dda
YQ
30692016-01-14 Yao Qi <yao.qi@linaro.org>
3070
3071 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3072 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3073 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3074 arm_get_next_pcs_ctor.
3075
82075af2
JS
30762016-01-12 Josh Stone <jistone@redhat.com>
3077 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3078
3079 * inferiors.h: Include "gdb_vecs.h".
3080 (struct process_info): Add syscalls_to_catch.
3081 * inferiors.c (remove_process): Free syscalls_to_catch.
3082 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3083 syscall_return stops.
3084 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3085 * server.c (handle_general_set): Handle QCatchSyscalls.
3086 (handle_query): Report support for QCatchSyscalls.
3087 * target.h (struct target_ops): Add supports_catch_syscall.
3088 (target_supports_catch_syscall): New macro.
3089 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3090 (struct lwp_info): Add syscall_state.
3091 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3092 Maintain syscall_state and syscalls_to_catch across exec.
3093 (get_syscall_trapinfo): New function, proxy to the_low_target.
3094 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3095 (linux_low_filter_event): Toggle syscall_state entry/return for
3096 syscall traps, and set it ignored for all others.
3097 (gdb_catching_syscalls_p): New function.
3098 (gdb_catch_this_syscall_p): New function.
3099 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3100 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3101 (linux_supports_catch_syscall): New function.
3102 (linux_target_ops): Install it.
3103 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3104 (the_low_target): Install it.
3105
8f13a3ce
MF
31062016-01-12 Mike Frysinger <vapier@gentoo.org>
3107
3108 * acinclude.m4: Include new ../warning.m4 file.
3109 * configure: Regenerated.
3110 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3111
5b3da067
MF
31122016-01-12 Mike Frysinger <vapier@gentoo.org>
3113
3114 * ax.c (is_goto_target): Mark static.
3115 * linux-low.c (register_addr): Likewise.
3116 (linux_fetch_registers, linux_store_registers): Likewise.
3117 * mem-break.c (any_persistent_commands): Fix old prototype.
3118 (add_commands_to_breakpoint): Mark static.
3119 * regcache.c (find_register_by_name): Delete unused func.
3120 * remote-utils.c (hex_or_minus_one): Mark static.
3121 * server.c (monitor_show_help): Mark static.
3122 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3123 handle_v_requests): Likewise.
3124
bc504a31
PA
31252016-01-12 Pedro Alves <palves@redhat.com>
3126
3127 Remove use of the registered trademark symbol throughout.
3128
5a0dd67a
YQ
31292016-01-08 Yao Qi <yao.qi@linaro.org>
3130
3131 * remote-utils.c (getpkt): If c is '\003', call target hook
3132 request_interrupt.
3133
b2ca446f
YQ
31342016-01-06 Yao Qi <yao.qi@linaro.org>
3135
3136 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3137 linux-aarch32-low.c.
3138 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3139 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3140 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3141 (thumb2_breakpoint): Declare.
3142 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3143 linux-aarch32-low.h.
3144 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3145 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3146 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3147
edd88788
JB
31482016-01-01 Joel Brobecker <brobecker@adacore.com>
3149
3150 * gdbreplay.c (gdbreplay_version): Change copyright year in
3151 version message.
3152 * server.c (gdbserver_version): Likewise.
3153
65da7f14
PP
31542015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3155
3156 * server.c (crc32_table): Delete.
3157 (crc32): Use libiberty's xcrc32 function.
3158
4abd5ed2
JB
31592015-12-22 Joel Brobecker <brobecker@adacore.com>
3160
3161 * lynx-low.c (lynx_delete_thread_callback): New function.
3162 (lynx_mourn): Properly delete our process and all of its
3163 threads. Remove call to clear_inferiors.
3164
0e50fe5c
JB
31652015-12-22 Joel Brobecker <brobecker@adacore.com>
3166
3167 * target.c (thread_search_callback): Add check that
3168 the thread_stopped target callback is not NULL before
3169 calling it.
3170
35adc03f
YQ
31712015-12-21 Yao Qi <yao.qi@linaro.org>
3172
3173 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3174 arm breakpoint.
3175
bd2b2909
AT
31762015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3177
3178 * server.c (handle_query): Call target_supports_software_single_step.
3179
7fe5e27e
AT
31802015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3181
3182 * linux-low.c (single_step): New function.
3183 (linux_resume_one_lwp_throw): Call single_step.
3184 (start_step_over): Likewise.
3185
d9311bfa
AT
31862015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3187
3188 * Makefile.in (SFILES): Append arch/arm-linux.c,
3189 arch/arm-get-next-pcs.c.
3190 (arm-linux.o): New rule.
3191 (arm-get-next-pcs.o): New rule.
3192 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3193 arm-linux.o.
3194 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3195 to linux-aarch32-low.c.
3196 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3197 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3198 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3199 (thumb2_breakpoint_len): Likewise.
3200 (arm_is_thumb_mode): Make non-static.
3201 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3202 from linux-aarch32-low.c.
3203 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3204 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3205 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3206 (thumb2_breakpoint_len): Likewise.
3207 (arm_is_thumb_mode): New declaration.
3208 * linux-arm-low.c: Include arch/arm-linux.h
3209 aarch/arm-get-next-pcs.h, sys/syscall.h.
3210 (get_next_pcs_ops): New struct.
3211 (get_next_pcs_addr_bits_remove): New function.
3212 (get_next_pcs_is_thumb): New function.
3213 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3214 (arm_sigreturn_next_pc): Likewise.
3215 (get_next_pcs_syscall_next_pc): Likewise.
3216 (arm_gdbserver_get_next_pcs): Likewise.
3217 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3218 Initialize.
3219 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3220 * server.h: Include gdb_vecs.h.
3221
68ce2059
AT
32222015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3223
3224 * Makefile.in (SFILES): Append common/common-regcache.c.
3225 (OBS): Append common-regcache.o.
3226 (common-regcache.o): New rule.
3227 * regcache.c (init_register_cache): Initialize cache to
3228 REG_UNAVAILABLE.
3229 (regcache_raw_read_unsigned): New function.
3230 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3231 register_status enum.
3232
fa5308bd
AT
32332015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3234
3235 * linux-aarch64-low.c (the_low_targets): Rename
3236 breakpoint_reinsert_addr to get_next_pcs.
3237 * linux-arm-low.c (the_low_targets): Likewise.
3238 * linux-bfin-low.c (the_low_targets): Likewise.
3239 * linux-cris-low.c (the_low_targets): Likewise.
3240 * linux-crisv32-low.c (the_low_targets): Likewise.
3241 * linux-low.c (can_software_single_step): Likewise.
3242 (install_software_single_step_breakpoints): New function.
3243 (start_step_over): Use install_software_single_step_breakpoints.
3244 * linux-low.h: New CORE_ADDR vector.
3245 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3246 get_next_pcs.
3247 * linux-mips-low.c (the_low_targets): Likewise.
3248 * linux-nios2-low.c (the_low_targets): Likewise.
3249 * linux-sparc-low.c (the_low_targets): Likewise.
3250
4a6ed09b
PA
32512015-12-17 Pedro Alves <palves@redhat.com>
3252
3253 * linux-low.c (linux_kill_one_lwp): Remove references to
3254 LinuxThreads.
3255 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3256 to 'kill'.
3257 (linux_init_signals): Delete.
3258 (initialize_low): Adjust.
3259 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3260
7544db95
PA
32612015-12-16 Pedro Alves <palves@redhat.com>
3262
3263 * configure.ac (compiler warning flags): When testing a
3264 -Wno-foo option, check whether -Wfoo works instead.
3265 * configure: Regenerate.
3266
8020350c
DB
32672015-12-11 Don Breazeal <donb@codesourcery.com>
3268
3269 * server.c (process_serial_event): Don't exit from gdbserver
3270 in remote mode if there are still active inferiors.
3271
db91f502
YQ
32722015-12-11 Yao Qi <yao.qi@linaro.org>
3273
3274 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3275 arm_breakpoint_at if the process is 32-bit.
3276
b37a6290
YQ
32772015-12-11 Yao Qi <yao.qi@linaro.org>
3278
3279 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3280 arm breakpoint.
3281
17b1509a
YQ
32822015-12-07 Yao Qi <yao.qi@linaro.org>
3283
3284 * configure.srv: Append arm.o to srv_tgtobj for
3285 aarch64*-*-linux* target.
3286 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3287 from linux-arm-low.c.
3288 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3289 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3290 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3291 (thumb2_breakpoint_len): Likewise.
3292 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3293 (arm_breakpoint_kinds): Likewise.
3294 (arm_breakpoint_kind_from_pc): Likewise.
3295 (arm_sw_breakpoint_from_kind): Likewise.
3296 (arm_breakpoint_kind_from_current_state): Likewise.
3297 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3298 (arm_sw_breakpoint_from_kind): Declare.
3299 (arm_breakpoint_kind_from_current_state): Declare.
3300 (arm_breakpoint_at): Declare.
3301 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3302 arm_sw_breakpoint_from_kind if process is 32-bit.
3303 (aarch64_breakpoint_kind_from_pc): New function.
3304 (aarch64_breakpoint_kind_from_current_state): New function.
3305 (the_low_target): Initialize fields breakpoint_kind_from_pc
3306 and breakpoint_kind_from_current_state.
3307 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3308 linux-aarch32-low.c.
3309 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3310 (arm_breakpoint, arm_breakpoint_len): Likewise.
3311 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3312 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3313 (arm_is_thumb_mode): Likewise.
3314 (arm_breakpoint_at): Likewise.
3315 (arm_breakpoint_kind_from_pc): Likewise.
3316 (arm_sw_breakpoint_from_kind): Likewise.
3317 (arm_breakpoint_kind_from_current_state): Likewise.
3318
3319 Revert:
3320 2015-08-04 Yao Qi <yao.qi@linaro.org>
3321
3322 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3323 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3324 * server.c (extended_protocol): Remove "static".
3325 * server.h (extended_protocol): Declare it.
3326
ece66d65
JS
33272015-12-04 Josh Stone <jistone@redhat.com>
3328
3329 * target.h (struct target_ops) <arch_setup>: Rename to ...
3330 (struct target_ops) <post_create_inferior>: ... this.
3331 (target_arch_setup): Rename to ...
3332 (target_post_create_inferior): ... this, calling post_create_inferior.
3333 * server.c (start_inferior): Update target_arch_setup calls to
3334 target_post_create_inferior.
3335 * linux-low.c (linux_low_ptrace_options): Forward declare.
3336 (linux_arch_setup): Update its comment for general use.
3337 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3338 (struct linux_target_ops): Use linux_post_create_inferior.
3339 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3340 to post_create_inferior.
3341 * nto-low.c (struct nto_target_ops): Likewise.
3342 * spu-low.c (struct spu_target_ops): Likewise.
3343 * win32-low.c (struct win32_target_ops): Likewise.
3344
e58c48b4
AT
33452015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3346
3347 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3348
fbec8956
AT
33492015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3350
3351 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3352 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3353 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3354 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3355 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3356 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3357 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3358 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3359 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3360 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3361 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3362 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3363
9b4c5f87
AT
33642015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3365
3366 * linux-low.c (linux_look_up_symbols): Don't call
3367 linux_supports_traceclone.
3368 * linux-low.h (thread_db_init): Remove use_events argument.
3369 * thread-db.c (thread_db_use_event): Remove global variable.
3370 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3371 (struct thread_db) <td_create_bp>: Remove field.
3372 (thread_db_create_event): Remove function.
3373 (thread_db_enable_reporting): Likewise.
3374 (find_one_thread): Don't check for thread_db_use_events.
3375 (attach_thread): Likewise.
3376 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3377 (try_thread_db_load_1): Don't check for thread_db_use_events.
3378 (thread_db_init): Remove use_events argument and thread events
3379 handling.
3380 (remove_thread_event_breakpoints): Remove function.
3381 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3382
7d00775e
AT
33832015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3384
3385 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3386 New function.
3387 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3388 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3389 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3390 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3391 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3392 Initialize.
3393 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3394 New function.
3395 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3396 * linux-low.c (can_hardware_single_step): Use
3397 supports_hardware_single_step.
3398 (can_software_single_step): New function.
3399 (start_step_over): Call can_software_single_step.
3400 (linux_supports_hardware_single_step): New function.
3401 (struct target_ops) <supports_software_single_step>: Initialize.
3402 * linux-low.h (struct linux_target_ops)
3403 <supports_hardware_single_step>: Initialize.
3404 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3405 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3406 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3407 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3408 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3409 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3410 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3411 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3412 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3413 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3414 Initialize.
3415 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3416 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3417 Initialize.
3418 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3419 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3420 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3421 New function.
3422 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3423 * target.h (struct target_ops): <supports_software_single_step>:
3424 New field.
3425 (target_supports_software_single_step): New macro.
3426
2d97cd35
AT
34272015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3428
3429 * linux-low.c (linux_wait_1): Fix pc advance condition.
3430 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3431 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3432
769ef81f
AT
34332015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3434
3435 * linux-arm-low.c (arm_is_thumb_mode): New function.
3436 (arm_breakpoint_at): Use arm_is_thumb_mode.
3437 (arm_breakpoint_kind_from_current_state): New function.
3438 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3439 Initialize.
3440 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3441 (linux_breakpoint_kind_from_current_state): New function.
3442 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3443 * linux-low.h (struct linux_target_ops)
3444 <breakpoint_kind_from_current_state>: New field.
3445 * target.h (struct target_ops): Likewise.
3446 (target_breakpoint_kind_from_current_state): New macro.
3447
1bebeeca
PA
34482015-11-30 Pedro Alves <palves@redhat.com>
3449
3450 * linux-low.c (linux_resume): Wake up the event loop before
3451 returning.
3452
a67a9fae
PA
34532015-11-30 Pedro Alves <palves@redhat.com>
3454
3455 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3456 check.
3457 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3458 to -1.
3459 * target.c (struct thread_search): New structure.
3460 (thread_search_callback): New function.
3461 (prev_general_thread): New global.
3462 (prepare_to_access_memory, done_accessing_memory): New functions.
3463 * target.h (prepare_to_access_memory, done_accessing_memory):
3464 Replace macros with function declarations.
3465
f2faf941
PA
34662015-11-30 Pedro Alves <palves@redhat.com>
3467
3468 PR 14618
3469 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3470 report TARGET_WAITKIND_NO_RESUMED.
3471 * remote-utils.c (prepare_resume_reply): Handle
3472 TARGET_WAITKIND_NO_RESUMED.
3473 * server.c (report_no_resumed): New global.
3474 (handle_query) <qSupported>: Handle "no-resumed+". Report
3475 "no-resumed+" support.
3476 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3477 return error if the client doesn't support no-resumed events.
3478 (push_stop_notification): New function.
3479 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3480 events if the client supports them.
3481
a681f9c9
PA
34822015-11-30 Pedro Alves <palves@redhat.com>
3483
3484 * linux-low.c (thread_still_has_status_pending_p): Don't check
3485 vCont;t here.
3486 (lwp_resumed): New function.
3487 (status_pending_p_callback): Return early if the LWP is not
3488 supposed to be resumed.
3489
65706a29
PA
34902015-11-30 Pedro Alves <palves@redhat.com>
3491
3492 * linux-low.c (handle_extended_wait): Assert that the LWP's
3493 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3494 thread create events, leave the new child's status pending.
3495 (linux_low_filter_event): If GDB wants to hear about thread exit
3496 events, leave the LWP marked dead and don't delete it.
3497 (linux_wait_for_event_filtered): Don't check for thread exit.
3498 (filter_exit_event): New function.
3499 (linux_wait_1): Use it, when returning an exit event.
3500 (linux_resume_one_lwp_throw): Assert that the LWP's
3501 waitstatus is TARGET_WAITKIND_IGNORE.
3502 * remote-utils.c (prepare_resume_reply): Handle
3503 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3504 * server.c (report_thread_events): New global.
3505 (handle_general_set): Handle QThreadEvents.
3506 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3507 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3508 TARGET_WAITKIND_THREAD_EXITED.
3509 * server.h (report_thread_events): Declare.
3510
56cf4bed
PA
35112015-11-30 Pedro Alves <palves@redhat.com>
3512
3513 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3514 the thread's last_resume_kind was resume_stop.
3515
500c1d85
PA
35162015-11-30 Pedro Alves <palves@redhat.com>
3517
3518 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3519 before returning.
3520
de979965
PA
35212015-11-30 Pedro Alves <palves@redhat.com>
3522
3523 * server.c (handle_v_requests): Handle vCtrlC.
3524
34c65914
PA
35252015-11-30 Pedro Alves <palves@redhat.com>
3526
3527 * gdbthread.h (find_any_thread_of_pid): Declare.
3528 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3529 functions.
3530 * server.c (handle_query): If current_thread is NULL, look for
3531 another thread of the selected process.
3532
79efa585 35332015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3534 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3535
3536 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3537 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3538 name in reply.
3539 * target.h (struct target_ops) <thread_name>: New field.
3540 (target_thread_name): New macro.
3541
80d82c19
JB
35422015-11-23 Joel Brobecker <brobecker@adacore.com>
3543
3544 * regcache.h (regcache_invalidate_pid): Add declaration.
3545 * regcache.c (regcache_invalidate_pid): New function, extracted
3546 from regcache_invalidate.
3547 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3548 Add trivial documentation comment.
3549 * lynx-low.c: Use regcache_invalidate_pid instead of
3550 regcache_invalidate.
3551
64da5dd5
JB
35522015-11-23 Joel Brobecker <brobecker@adacore.com>
3553
3554 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3555 and Elf64_auxv_t if the target is Android.
3556
37ce4055
DE
35572015-11-22 Doug Evans <xdje42@gmail.com>
3558
3559 * target.h: #include <sys/types.h>.
3560
06e03fff
PA
35612015-11-19 Pedro Alves <palves@redhat.com>
3562
3563 * linux-low.c (linux_process_qsupported): Change prototype.
3564 Adjust.
3565 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3566 Change prototype.
3567 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3568 and adjust to loop over all features.
3569 * server.c (handle_query) <qSupported>: Adjust to call
3570 target_process_qsupported once, passing it a vector of unprocessed
3571 features.
3572 * target.h (struct target_ops) <process_qsupported>: Change
3573 prototype.
3574 (target_process_qsupported): Adjust.
3575
9a084706
PA
35762015-11-19 Pedro Alves <palves@redhat.com>
3577
3578 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3579 mode.
3580 * configure: Regenerate.
3581
dad44a1f
PA
35822015-11-19 Pedro Alves <palves@redhat.com>
3583
3584 * configure: Regenerate.
3585
231c0592
YQ
35862015-11-19 Yao Qi <yao.qi@linaro.org>
3587
3588 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3589 type to uint32_t.
3590
6c1c9a8b
YQ
35912015-11-19 Yao Qi <yao.qi@linaro.org>
3592
3593 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3594 (struct aarch64_operand): Move enum out.
3595
9caa3311
YQ
35962015-11-19 Yao Qi <yao.qi@linaro.org>
3597
3598 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3599 struct user_fpsimd_state *.
3600 (aarch64_store_fpregset): Likewise.
3601
6a69a054
YQ
36022015-11-19 Yao Qi <yao.qi@linaro.org>
3603
3604 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3605 struct user_pt_regs *.
3606 (aarch64_store_gregset): Likewise.
3607
1798301e
PA
36082015-11-18 Pedro Alves <palves@redhat.com>
3609
3610 * Makefile.in (all_object_files): Add $IPA_OBJS.
3611
ce7715e2
PA
36122015-11-17 Pedro Alves <palves@redhat.com>
3613
3614 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3615 GDB_SIGNAL_0 and gdb_signal_to_string.
3616
c0879059
PA
36172015-11-17 Pedro Alves <palves@redhat.com>
3618
3619 * win32-low.c (handle_output_debug_string): Remove parameter.
3620 (win32_kill): Remove our_status local and adjust call to
3621 handle_output_debug_string.
3622 (get_child_debug_event): Adjust call to
3623 handle_output_debug_string.
3624
1996e237
SM
36252015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3626
3627 * linux-mips-low.c (mips_fill_gregset): Add cast.
3628 (mips_store_gregset): Likewise.
3629 (mips_fill_fpregset): Likewise.
3630 (mips_store_fpregset): Likewise.
3631
cbec665b
SM
36322015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3633
3634 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3635 priv.
3636
eb3e3c67
SM
36372015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3638
3639 * linux-mips-low.c (mips_linux_new_thread): Change type of
3640 watch_type to enum target_hw_bp_type.
3641
171de4b8
SM
36422015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3643
3644 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3645 Change return type to arm_hwbp_type.
3646
04248ead
SM
36472015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3648
3649 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3650 (arm_store_gregset): Likewise.
3651 * linux-arm-low.c (arm_get_hwcap): Likewise.
3652 (arm_read_description): Likewise.
3653
04b3479c
SM
36542015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3655
3656 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3657
2bc84e8a
SM
36582015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3659
3660 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3661 (ppc_fill_vsxregset): Likewise.
3662 (ppc_store_vsxregset): Likewise.
3663 (ppc_fill_vrregset): Likewise.
3664 (ppc_store_vrregset): Likewise.
3665 (ppc_fill_evrregset): Likewise.
3666 (ppc_store_evrregset): Likewise.
3667
e6c5bb05
SM
36682015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3669
3670 * linux-ppc-low.c (ppc_usrregs_info): Remove
3671 forward-declaration.
3672 (ppc_arch_setup): Move lower in file.
3673
7ea45d72
SM
36742015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3675
3676 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3677 (ps_pdwrite): Likewise.
3678
69291610
HW
36792015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3680
3681 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3682 to after assert checks.
3683
b42945fd
SM
36842015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3685
3686 * proc-service.c (ps_pdread): Add/adjust casts.
3687 (ps_pdwrite): Add/adjust casts.
3688
d6f85c84
SM
36892015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3690
3691 * server.c (handle_search_memory_1): Cast return value of
3692 memmem.
3693
f98cd059
SM
36942015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3695
3696 * server.c (write_qxfer_response): Change type of data to
3697 gdb_byte *.
3698
d2412fa5
PA
36992015-10-29 Pedro Alves <palves@redhat.com>
3700
3701 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3702
c17414a2
PA
37032015-10-29 Pedro Alves <palves@redhat.com>
3704
3705 * tracepoint.c (clear_installed_tracepoints): Add casts.
3706
e053fbc4
PA
37072015-10-29 Pedro Alves <palves@redhat.com>
3708
3709 * server.c (handle_v_cont, process_serial_event): Add enum
3710 gdb_signal casts to signal parsing code.
3711
add67df8
PA
37122015-10-29 Pedro Alves <palves@redhat.com>
3713
3714 * linux-low.h (NULL_REGSET): Define.
3715 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3716 * linux-arm-low.c (arm_regsets): Likewise.
3717 * linux-crisv32-low.c (cris_regsets): Likewise.
3718 * linux-m68k-low.c (m68k_regsets): Likewise.
3719 * linux-mips-low.c (mips_regsets): Likewise.
3720 * linux-nios2-low.c (nios2_regsets): Likewise.
3721 * linux-ppc-low.c (ppc_regsets): Likewise.
3722 * linux-s390-low.c (s390_regsets): Likewise.
3723 * linux-sh-low.c (sh_regsets): Likewise.
3724 * linux-sparc-low.c (sparc_regsets): Likewise.
3725 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3726 * linux-tile-low.c (tile_regsets): Likewise.
3727 * linux-x86-low.c (x86_regsets): Likewise.
3728 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3729
50bc912a
PA
37302015-10-29 Pedro Alves <palves@redhat.com>
3731
3732 * linux-low.h (NULL_REGSET): Define.
3733 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3734 * linux-arm-low.c (arm_regsets): Likewise.
3735 * linux-crisv32-low.c (cris_regsets): Likewise.
3736 * linux-m68k-low.c (m68k_regsets): Likewise.
3737 * linux-mips-low.c (mips_regsets): Likewise.
3738 * linux-nios2-low.c (nios2_regsets): Likewise.
3739 * linux-ppc-low.c (ppc_regsets): Likewise.
3740 * linux-s390-low.c (s390_regsets): Likewise.
3741 * linux-sh-low.c (sh_regsets): Likewise.
3742 * linux-sparc-low.c (sparc_regsets): Likewise.
3743 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3744 * linux-tile-low.c (tile_regsets): Likewise.
3745 * linux-x86-low.c (x86_regsets): Likewise.
3746 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3747
682b2546
DE
37482015-10-26 Doug Evans <dje@google.com>
3749
3750 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3751
963843d4
DE
37522015-10-26 Doug Evans <dje@google.com>
3753
3754 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3755
d41401ac
DE
37562015-10-26 Doug Evans <dje@google.com>
3757
3758 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3759 for debug_printf.
3760 (attach_thread, find_new_threads_callback): Ditto.
3761
3db28855
AT
37622015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3763
3764 * mem-break.h (set_breakpoint_data): Remove.
3765
fb78e89c
AT
37662015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3767
3768 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3769 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3770 (initialize_low): Remove set_breakpoint_data call.
3771 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3772 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3773 (initialize_low): Remove set_breakpoint_data call.
3774 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3775 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3776 (initialize_low): Remove set_breakpoint_data call.
3777
2e6ee069
AT
37782015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3779
3780 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3781 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3782 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3783 * target.h (target_breakpoint_kind_from_pc): New macro.
3784
1652a986
AT
37852015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3786
3787 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3788 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3789 the default breakpoint kind.
3790
abeead09
AT
37912015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3792
3793 * linux-arm-low.c (arm_supports_z_point_type): Add software
3794 breakpoint support.
3795
b0b4b501
AT
37962015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3797
3798 * linux-arm-low.c: Refactor breakpoint definitions.
3799 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3800 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3801
8689682c
AT
38022015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3803
3804 * Makefile.in: Add arm.c/o.
3805 * configure.srv: Likewise.
3806 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3807 (arm_breakpoint_kind_from_pc): New function.
3808 (arm_sw_breakpoint_from_kind): Return proper kind.
3809 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3810
27165294
AT
38112015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3812
3813 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3814 removal.
3815 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3816 (struct raw_breakpoint) <size>: Remove.
3817 (struct raw_breakpoint) <kind>: Add.
3818 (bp_size): New function.
3819 (bp_opcode): Likewise.
3820 (find_raw_breakpoint_at): Adjust for kind.
3821 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3822 (remove_memory_breakpoint): Adjust for kind call bp_size.
3823 (set_raw_breakpoint_at): Adjust for kind.
3824 (set_breakpoint): Likewise.
3825 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3826 (delete_raw_breakpoint): Adjust for kind.
3827 (delete_breakpoint): Likewise.
3828 (find_gdb_breakpoint): Likewise.
3829 (set_gdb_breakpoint_1): Likewise.
3830 (set_gdb_breakpoint): Likewise.
3831 (delete_gdb_breakpoint_1): Likewise.
3832 (delete_gdb_breakpoint): Likewise.
3833 (uninsert_raw_breakpoint): Likewise.
3834 (reinsert_raw_breakpoint): Likewise.
3835 (set_breakpoint_data): Remove.
3836 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3837 (check_mem_read): Adjust for kind call bp_size.
3838 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3839 (clone_one_breakpoint): Adjust for kind.
3840 * mem-break.h (set_gdb_breakpoint): Likewise.
3841 (delete_gdb_breakpoint): Likewise.
3842 * server.c (process_serial_event): Likewise.
3843
dd373349
AT
38442015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3845
3846 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3847 (struct linux_target_ops) <breakpoint>: Remove.
3848 (struct linux_target_ops) <breakpoint_len>: Remove.
3849 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3850 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3851 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3852 (arm_sw_breakpoint_from_kind): New function.
3853 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3854 (struct linux_target_ops) <breakpoint>: Remove.
3855 (struct linux_target_ops) <breakpoint_len>: Remove.
3856 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3857 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3858 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3859 (struct linux_target_ops) <breakpoint>: Remove.
3860 (struct linux_target_ops) <breakpoint_len>: Remove.
3861 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3862 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3863 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3864 (struct linux_target_ops) <breakpoint>: Remove.
3865 (struct linux_target_ops) <breakpoint_len>: Remove.
3866 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3867 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3868 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3869 and sw_breakpoint_from_kind to increment the pc.
3870 (linux_breakpoint_kind_from_pc): New function.
3871 (linux_sw_breakpoint_from_kind): New function.
3872 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3873 (initialize_low): Call breakpoint_kind_from_pc and
3874 sw_breakpoint_from_kind to replace breakpoint_data/len.
3875 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3876 New field.
3877 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3878 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3879 (struct linux_target_ops) <breakpoint>: Remove.
3880 (struct linux_target_ops) <breakpoint_len>: Remove.
3881 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3882 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3883 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3884 (struct linux_target_ops) <breakpoint>: Remove.
3885 (struct linux_target_ops) <breakpoint_len>: Remove.
3886 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3887 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3888 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3889 (struct linux_target_ops) <breakpoint>: Remove.
3890 (struct linux_target_ops) <breakpoint_len>: Remove.
3891 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3892 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3893 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3894 (struct linux_target_ops) <breakpoint>: Remove.
3895 (struct linux_target_ops) <breakpoint_len>: Remove.
3896 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3897 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3898 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3899 (struct linux_target_ops) <breakpoint>: Remove.
3900 (struct linux_target_ops) <breakpoint_len>: Remove.
3901 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3902 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3903 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3904 (struct linux_target_ops) <breakpoint>: Remove.
3905 (struct linux_target_ops) <breakpoint_len>: Remove.
3906 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3907 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3908 * linux-sh-low.c (sh_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-sparc-low.c (sparc_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-tic6x-low.c (tic6x_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-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3924 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3925 (struct linux_target_ops) <breakpoint>: Remove.
3926 (struct linux_target_ops) <breakpoint_len>: Remove.
3927 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3928 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3929 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3930 (struct linux_target_ops) <breakpoint>: Remove.
3931 (struct linux_target_ops) <breakpoint_len>: Remove.
3932 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3933 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3934
4cd98a19
AT
39352015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3936
3937 * linux-cris-low.c (cris_get_pc): Remove void arg.
3938
774ee6d2
AR
39392015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3940
3941 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3942 variable name.
3943
833dcd29
AR
39442015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3945
3946 * inferiors.c (thread_pid_matches_callback): New function.
3947 (find_thread_process): New function.
3948 (remove_thread): Reset current_thread.
3949 (remove_process): Assert threads have been removed first.
3950
8d689ee5
YQ
39512015-10-15 Yao Qi <yao.qi@linaro.org>
3952
3953 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3954 if it is 3.
3955 (aarch64_remove_point): Likewise.
3956 * regcache.c (regcache_register_size): New function.
3957
1c2e1515
YQ
39582015-10-12 Yao Qi <yao.qi@linaro.org>
3959
3960 * linux-aarch64-low.c: Update all callers as emit_load_store
3961 is renamed to aarch64_emit_load_store.
3962
e1c587c3
YQ
39632015-10-12 Yao Qi <yao.qi@linaro.org>
3964
3965 * linux-aarch64-low.c: Update all callers of function renaming
3966 from emit_insn to aarch64_emit_insn.
3967
b6542f81
YQ
39682015-10-12 Yao Qi <yao.qi@linaro.org>
3969
3970 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3971 arch/aarch64-insn.h.
3972 (struct aarch64_memory_operand): Likewise.
3973 (ENCODE): Likewise.
3974 (emit_insn): Move to arch/aarch64-insn.c.
3975 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3976 (emit_load_store): Move to arch/aarch64-insn.c.
3977 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3978 (can_encode_int32): Remove.
3979
246994ce
YQ
39802015-10-12 Yao Qi <yao.qi@linaro.org>
3981
3982 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3983 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3984 (aarch64_relocate_instruction): Likewise.
3985 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3986 (struct aarch64_insn_visitor): Likewise.
3987
0badd99f
YQ
39882015-10-12 Yao Qi <yao.qi@linaro.org>
3989
3990 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3991 (struct aarch64_insn_visitor): New.
3992 (struct aarch64_insn_relocation_data): New.
3993 (aarch64_ftrace_insn_reloc_b): New function.
3994 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3995 (aarch64_ftrace_insn_reloc_cb): Likewise.
3996 (aarch64_ftrace_insn_reloc_tb): Likewise.
3997 (aarch64_ftrace_insn_reloc_adr): Likewise.
3998 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3999 (aarch64_ftrace_insn_reloc_others): Likewise.
4000 (visitor): New.
4001 (aarch64_relocate_instruction): Use visitor.
4002
dfaffe9d
YQ
40032015-10-12 Yao Qi <yao.qi@linaro.org>
4004
4005 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4006 int. Add argument buf.
4007 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4008 aarch64_relocate_instruction.
4009
70b439f0
YQ
40102015-10-12 Yao Qi <yao.qi@linaro.org>
4011
4012 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4013 argument insn. Remove local variable insn. Don't call
4014 target_read_uint32.
4015 (aarch64_install_fast_tracepoint_jump_pad): Call
4016 target_read_uint32.
4017
7781c06f
YQ
40182015-09-30 Yao Qi <yao.qi@linaro.org>
4019
4020 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4021 (emit_load_store_pair): Likewise.
4022
9a3c8263
SM
40232015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4024
4025 * dll.c (match_dll): Add cast(s).
4026 (unloaded_dll): Likewise.
4027 * linux-low.c (second_thread_of_pid_p): Likewise.
4028 (delete_lwp_callback): Likewise.
4029 (count_events_callback): Likewise.
4030 (select_event_lwp_callback): Likewise.
4031 (linux_set_resume_request): Likewise.
4032 * server.c (accumulate_file_name_length): Likewise.
4033 (emit_dll_description): Likewise.
4034 (handle_qxfer_threads_worker): Likewise.
4035 (visit_actioned_threads): Likewise.
4036 * thread-db.c (any_thread_of): Likewise.
4037 * tracepoint.c (same_process_p): Likewise.
4038 (match_blocktype): Likewise.
4039 (build_traceframe_info_xml): Likewise.
4040
224c3ddb
SM
40412015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4042
4043 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4044 assignment.
4045 (gdb_unparse_agent_expr): Likewise.
4046 * hostio.c (require_data): Likewise.
4047 (handle_pread): Likewise.
4048 * linux-low.c (disable_regset): Likewise.
4049 (fetch_register): Likewise.
4050 (store_register): Likewise.
4051 (get_dynamic): Likewise.
4052 (linux_qxfer_libraries_svr4): Likewise.
4053 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4054 (set_fast_tracepoint_jump): Likewise.
4055 (uninsert_fast_tracepoint_jumps_at): Likewise.
4056 (reinsert_fast_tracepoint_jumps_at): Likewise.
4057 (validate_inserted_breakpoint): Likewise.
4058 (clone_agent_expr): Likewise.
4059 * regcache.c (init_register_cache): Likewise.
4060 * remote-utils.c (putpkt_binary_1): Likewise.
4061 (decode_M_packet): Likewise.
4062 (decode_X_packet): Likewise.
4063 (look_up_one_symbol): Likewise.
4064 (relocate_instruction): Likewise.
4065 (monitor_output): Likewise.
4066 * server.c (handle_search_memory): Likewise.
4067 (handle_qxfer_exec_file): Likewise.
4068 (handle_qxfer_libraries): Likewise.
4069 (handle_qxfer): Likewise.
4070 (handle_query): Likewise.
4071 (handle_v_cont): Likewise.
4072 (handle_v_run): Likewise.
4073 (captured_main): Likewise.
4074 * target.c (write_inferior_memory): Likewise.
4075 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4076 * tracepoint.c (init_trace_buffer): Likewise.
4077 (add_tracepoint_action): Likewise.
4078 (add_traceframe): Likewise.
4079 (add_traceframe_block): Likewise.
4080 (cmd_qtdpsrc): Likewise.
4081 (cmd_qtdv): Likewise.
4082 (cmd_qtstatus): Likewise.
4083 (response_source): Likewise.
4084 (response_tsv): Likewise.
4085 (cmd_qtnotes): Likewise.
4086 (gdb_collect): Likewise.
4087 (initialize_tracepoint): Likewise.
4088
afbe19f8
PL
40892015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4090
4091 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4092 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4093 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4094 <NOP>: New.
4095 (enum aarch64_condition_codes): New enum.
4096 (w0): New static global.
4097 (fp): Likewise.
4098 (lr): Likewise.
4099 (struct aarch64_memory_operand) <type>: New
4100 MEMORY_OPERAND_POSTINDEX type.
4101 (postindex_memory_operand): New helper function.
4102 (emit_ret): New function.
4103 (emit_load_store_pair): New function, factored out of emit_stp
4104 with support for MEMORY_OPERAND_POSTINDEX.
4105 (emit_stp): Rewrite using emit_load_store_pair.
4106 (emit_ldp): New function.
4107 (emit_load_store): Likewise.
4108 (emit_ldr): Mention post-index instruction in comment.
4109 (emit_ldrh): New function.
4110 (emit_ldrb): New function.
4111 (emit_ldrsw): Mention post-index instruction in comment.
4112 (emit_str): Likewise.
4113 (emit_subs): New function.
4114 (emit_cmp): Likewise.
4115 (emit_and): Likewise.
4116 (emit_orr): Likewise.
4117 (emit_orn): Likewise.
4118 (emit_eor): Likewise.
4119 (emit_mvn): Likewise.
4120 (emit_lslv): Likewise.
4121 (emit_lsrv): Likewise.
4122 (emit_asrv): Likewise.
4123 (emit_mul): Likewise.
4124 (emit_sbfm): Likewise.
4125 (emit_sbfx): Likewise.
4126 (emit_ubfm): Likewise.
4127 (emit_ubfx): Likewise.
4128 (emit_csinc): Likewise.
4129 (emit_cset): Likewise.
4130 (emit_nop): Likewise.
4131 (emit_ops_insns): New helper function.
4132 (emit_pop): Likewise.
4133 (emit_push): Likewise.
4134 (aarch64_emit_prologue): New function.
4135 (aarch64_emit_epilogue): Likewise.
4136 (aarch64_emit_add): Likewise.
4137 (aarch64_emit_sub): Likewise.
4138 (aarch64_emit_mul): Likewise.
4139 (aarch64_emit_lsh): Likewise.
4140 (aarch64_emit_rsh_signed): Likewise.
4141 (aarch64_emit_rsh_unsigned): Likewise.
4142 (aarch64_emit_ext): Likewise.
4143 (aarch64_emit_log_not): Likewise.
4144 (aarch64_emit_bit_and): Likewise.
4145 (aarch64_emit_bit_or): Likewise.
4146 (aarch64_emit_bit_xor): Likewise.
4147 (aarch64_emit_bit_not): Likewise.
4148 (aarch64_emit_equal): Likewise.
4149 (aarch64_emit_less_signed): Likewise.
4150 (aarch64_emit_less_unsigned): Likewise.
4151 (aarch64_emit_ref): Likewise.
4152 (aarch64_emit_if_goto): Likewise.
4153 (aarch64_emit_goto): Likewise.
4154 (aarch64_write_goto_address): Likewise.
4155 (aarch64_emit_const): Likewise.
4156 (aarch64_emit_call): Likewise.
4157 (aarch64_emit_reg): Likewise.
4158 (aarch64_emit_pop): Likewise.
4159 (aarch64_emit_stack_flush): Likewise.
4160 (aarch64_emit_zero_ext): Likewise.
4161 (aarch64_emit_swap): Likewise.
4162 (aarch64_emit_stack_adjust): Likewise.
4163 (aarch64_emit_int_call_1): Likewise.
4164 (aarch64_emit_void_call_2): Likewise.
4165 (aarch64_emit_eq_goto): Likewise.
4166 (aarch64_emit_ne_goto): Likewise.
4167 (aarch64_emit_lt_goto): Likewise.
4168 (aarch64_emit_le_goto): Likewise.
4169 (aarch64_emit_gt_goto): Likewise.
4170 (aarch64_emit_ge_got): Likewise.
4171 (aarch64_emit_ops_impl): New static global variable.
4172 (aarch64_emit_ops): New target function, return
4173 &aarch64_emit_ops_impl.
4174 (struct linux_target_ops): Install it.
4175
bb903df0
PL
41762015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4177
4178 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4179 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4180 aarch64-ipa.o.
4181 * linux-aarch64-ipa.c: New file.
4182 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4183 and endian.h.
4184 (aarch64_get_thread_area): New target method.
4185 (extract_signed_bitfield): New helper function.
4186 (aarch64_decode_ldr_literal): New function.
4187 (enum aarch64_opcodes): New enum.
4188 (struct aarch64_register): New struct.
4189 (struct aarch64_operand): New struct.
4190 (x0): New static global.
4191 (x1): Likewise.
4192 (x2): Likewise.
4193 (x3): Likewise.
4194 (x4): Likewise.
4195 (w2): Likewise.
4196 (ip0): Likewise.
4197 (sp): Likewise.
4198 (xzr): Likewise.
4199 (aarch64_register): New helper function.
4200 (register_operand): Likewise.
4201 (immediate_operand): Likewise.
4202 (struct aarch64_memory_operand): New struct.
4203 (offset_memory_operand): New helper function.
4204 (preindex_memory_operand): Likewise.
4205 (enum aarch64_system_control_registers): New enum.
4206 (ENCODE): New macro.
4207 (emit_insn): New helper function.
4208 (emit_b): New function.
4209 (emit_bcond): Likewise.
4210 (emit_cb): Likewise.
4211 (emit_tb): Likewise.
4212 (emit_blr): Likewise.
4213 (emit_stp): Likewise.
4214 (emit_ldp_q_offset): Likewise.
4215 (emit_stp_q_offset): Likewise.
4216 (emit_load_store): Likewise.
4217 (emit_ldr): Likewise.
4218 (emit_ldrsw): Likewise.
4219 (emit_str): Likewise.
4220 (emit_ldaxr): Likewise.
4221 (emit_stxr): Likewise.
4222 (emit_stlr): Likewise.
4223 (emit_data_processing_reg): Likewise.
4224 (emit_data_processing): Likewise.
4225 (emit_add): Likewise.
4226 (emit_sub): Likewise.
4227 (emit_mov): Likewise.
4228 (emit_movk): Likewise.
4229 (emit_mov_addr): Likewise.
4230 (emit_mrs): Likewise.
4231 (emit_msr): Likewise.
4232 (emit_sevl): Likewise.
4233 (emit_wfe): Likewise.
4234 (append_insns): Likewise.
4235 (can_encode_int32_in): New helper function.
4236 (aarch64_relocate_instruction): New function.
4237 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4238 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4239 (struct linux_target_ops): Install aarch64_get_thread_area,
4240 aarch64_install_fast_tracepoint_jump_pad and
4241 aarch64_get_min_fast_tracepoint_insn_len.
4242
787749ea
PL
42432015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4244
4245 * Makefile.in (aarch64-insn.o): New rule.
4246 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4247
9812b2e6
YQ
42482015-09-21 Yao Qi <yao.qi@linaro.org>
4249
4250 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4251
18fe412b
YQ
42522015-09-21 Yao Qi <yao.qi@linaro.org>
4253
4254 * tracepoint.c (max_jump_pad_size): Remove.
4255
a0cc84cd
YQ
42562015-09-18 Yao Qi <yao.qi@linaro.org>
4257
4258 * linux-aarch64-low.c: Don't include sys/uio.h.
4259 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4260
d78908cf
WW
42612015-09-16 Wei-cheng Wang <cole945@gmail.com>
4262
4263 * tracepoint.c (eval_result_type): Change prototype.
4264 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4265
d57e0d50
PA
42662015-09-15 Pedro Alves <palves@redhat.com>
4267
4268 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4269 Check whether to report exec events instead of checking whether
4270 multiprocess is enabled.
4271
5a676acc
PA
42722015-09-15 Pedro Alves <palves@redhat.com>
4273
4274 PR remote/18965
4275 * remote-utils.c (prepare_resume_reply): Merge
4276 TARGET_WAITKIND_VFORK_DONE switch case with the
4277 TARGET_WAITKIND_FORKED case.
4278
7c5d0fad
YQ
42792015-09-15 Yao Qi <yao.qi@linaro.org>
4280
4281 * server.c (handle_query): Check string comparison using
4282 "else if" instead of "if".
4283
750ce8d1
YQ
42842015-09-15 Yao Qi <yao.qi@linaro.org>
4285
4286 * server.c (vCont_supported): New global variable.
4287 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4288 matches. Append ";vContSupported+" to own_buf.
4289 (handle_v_requests): Append ";s;S" to own_buf if target supports
4290 hardware single step or vCont_supported is false.
4291 (capture_main): Set vCont_supported to zero.
4292
70b90b91
YQ
42932015-09-15 Yao Qi <yao.qi@linaro.org>
4294
4295 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4296 it to ...
4297 (linux_supports_hardware_single_step): ... New function.
4298 (linux_target_ops): Update.
4299 * lynx-low.c (lynx_target_ops): Set field
4300 supports_hardware_single_step to target_can_do_hardware_single_step.
4301 * nto-low.c (nto_target_ops): Likewise.
4302 * spu-low.c (spu_target_ops): Likewise.
4303 * win32-low.c (win32_target_ops): Likewise.
4304 * target.c (target_can_do_hardware_single_step): New function.
4305 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4306 Remove. <supports_hardware_single_step>: New field.
4307 (target_supports_conditional_breakpoints): Remove.
4308 (target_supports_hardware_single_step): New macro.
4309 (target_can_do_hardware_single_step): Declare.
4310 * server.c (handle_query): Use target_supports_hardware_single_step
4311 instead of target_supports_conditional_breakpoints.
4312
ade90bde
YQ
43132015-09-15 Yao Qi <yao.qi@linaro.org>
4314
4315 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4316 function.
4317 (struct linux_target_ops the_low_target): Install
4318 aarch64_linux_siginfo_fixup.
4319
94585166
DB
43202015-09-11 Don Breazeal <donb@codesourcery.com>
4321 Luis Machado <lgustavo@codesourcery.com>
4322
4323 * linux-low.c (linux_mourn): Static declaration.
4324 (linux_arch_setup): Move in front of
4325 handle_extended_wait.
4326 (linux_arch_setup_thread): New function.
4327 (handle_extended_wait): Handle exec events. Call
4328 linux_arch_setup_thread. Make event_lwp argument a
4329 pointer-to-a-pointer.
4330 (check_zombie_leaders): Do not check stopped threads.
4331 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4332 (linux_low_filter_event): Add lwp and thread for exec'ing
4333 non-leader thread if leader thread has been deleted.
4334 Refactor code into linux_arch_setup_thread and call it.
4335 Pass child lwp pointer by reference to handle_extended_wait.
4336 (linux_wait_for_event_filtered): Update comment.
4337 (linux_wait_1): Prevent clobbering exec event status.
4338 (linux_supports_exec_events): New function.
4339 (linux_target_ops) <supports_exec_events>: Initialize new member.
4340 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4341 new member.
4342 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4343 * server.c (report_exec_events): New global variable.
4344 (handle_query): Handle qSupported query for exec-events feature.
4345 (captured_main): Initialize report_exec_events.
4346 * server.h (report_exec_events): Declare new global variable.
4347 * target.h (struct target_ops) <supports_exec_events>: New
4348 member.
4349 (target_supports_exec_events): New macro.
4350 * win32-low.c (win32_target_ops) <supports_exec_events>:
4351 Initialize new member.
4352
0568462b
MM
43532015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4354
4355 * linux-low.c (linux_low_enable_btrace): Remove.
4356 (linux_target_ops): Replace linux_low_enable_btrace with
4357 linux_enable_btrace.
4358
39edd165
YQ
43592015-09-03 Yao Qi <yao.qi@linaro.org>
4360
4361 * linux-aarch64-low.c (aarch64_insert_point): Call
4362 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4363 returns true.
4364
1db33b5a
UW
43652015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4366
4367 * linux-low.c (check_stopped_by_breakpoint): Use
4368 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4369
ab290430
PA
43702015-08-27 Pedro Alves <palves@redhat.com>
4371
4372 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4373
8d749320
SM
43742015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4375
6711b7f8
SM
4376 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4377 the XNEW-family equivalent.
8d749320
SM
4378 (compile_bytecodes): Likewise.
4379 * dll.c (loaded_dll): Likewise.
4380 * event-loop.c (append_callback_event): Likewise.
4381 (create_file_handler): Likewise.
4382 (create_file_event): Likewise.
4383 * hostio.c (handle_open): Likewise.
4384 * inferiors.c (add_thread): Likewise.
4385 (add_process): Likewise.
4386 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4387 * linux-arm-low.c (arm_new_process): Likewise.
4388 (arm_new_thread): Likewise.
4389 * linux-low.c (add_to_pid_list): Likewise.
4390 (linux_add_process): Likewise.
4391 (handle_extended_wait): Likewise.
4392 (add_lwp): Likewise.
4393 (enqueue_one_deferred_signal): Likewise.
4394 (enqueue_pending_signal): Likewise.
4395 (linux_resume_one_lwp_throw): Likewise.
4396 (linux_resume_one_thread): Likewise.
4397 (linux_read_memory): Likewise.
4398 (linux_write_memory): Likewise.
4399 * linux-mips-low.c (mips_linux_new_process): Likewise.
4400 (mips_linux_new_thread): Likewise.
4401 (mips_add_watchpoint): Likewise.
4402 * linux-x86-low.c (initialize_low_arch): Likewise.
4403 * lynx-low.c (lynx_add_process): Likewise.
4404 * mem-break.c (set_raw_breakpoint_at): Likewise.
4405 (set_breakpoint): Likewise.
4406 (add_condition_to_breakpoint): Likewise.
4407 (add_commands_to_breakpoint): Likewise.
4408 (clone_agent_expr): Likewise.
4409 (clone_one_breakpoint): Likewise.
4410 * regcache.c (new_register_cache): Likewise.
4411 * remote-utils.c (look_up_one_symbol): Likewise.
4412 * server.c (queue_stop_reply): Likewise.
4413 (start_inferior): Likewise.
4414 (queue_stop_reply_callback): Likewise.
4415 (handle_target_event): Likewise.
4416 * spu-low.c (fetch_ppc_memory): Likewise.
4417 (store_ppc_memory): Likewise.
4418 * target.c (set_target_ops): Likewise.
4419 * thread-db.c (thread_db_load_search): Likewise.
4420 (try_thread_db_load_1): Likewise.
4421 * tracepoint.c (add_tracepoint): Likewise.
4422 (add_tracepoint_action): Likewise.
4423 (create_trace_state_variable): Likewise.
4424 (cmd_qtdpsrc): Likewise.
4425 (cmd_qtro): Likewise.
4426 (add_while_stepping_state): Likewise.
4427 * win32-low.c (child_add_thread): Likewise.
4428 (get_image_name): Likewise.
4429
ed8b7b42
YQ
44302015-08-25 Yao Qi <yao.qi@linaro.org>
4431
4432 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4433
db3cb7cb
YQ
44342015-08-25 Yao Qi <yao.qi@linaro.org>
4435
4436 * Makefile.in (aarch64-linux.o): New rule.
4437 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4438 srv_tgtobj.
4439 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4440 (aarch64_init_debug_reg_state): Make it extern.
4441 (aarch64_linux_prepare_to_resume): Remove.
4442
f6011a1c
YQ
44432015-08-25 Yao Qi <yao.qi@linaro.org>
4444
4445 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4446 lwp_arch_private_info and ptid_of_lwp.
4447
88e2cf7e
YQ
44482015-08-25 Yao Qi <yao.qi@linaro.org>
4449
4450 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4451 Find proc_info by find_process_pid. All callers updated.
4452
5e35436e
YQ
44532015-08-25 Yao Qi <yao.qi@linaro.org>
4454
4455 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4456 Remove.
4457 (debug_reg_change_callback): Remove.
4458 (aarch64_notify_debug_reg_change): Remove.
4459
4a8a7965
YQ
44602015-08-25 Yao Qi <yao.qi@linaro.org>
4461
4462 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4463 Call current_lwp_ptid.
4464
32a271ee
YQ
44652015-08-25 Yao Qi <yao.qi@linaro.org>
4466
4467 * linux-aarch64-low.c (debug_reg_change_callback): Use
4468 debug_printf.
4469
0d51c8d7
YQ
44702015-08-25 Yao Qi <yao.qi@linaro.org>
4471
4472 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4473
31a43dd5
YQ
44742015-08-25 Yao Qi <yao.qi@linaro.org>
4475
4476 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4477
8ee52567
YQ
44782015-08-25 Yao Qi <yao.qi@linaro.org>
4479
4480 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4481 the code.
4482
ff3f0f45
YQ
44832015-08-25 Yao Qi <yao.qi@linaro.org>
4484
4485 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4486 Remove.
4487 (debug_reg_change_callback): Remove argument entry and add argument
4488 lwp. Remove local variable thread. Don't print thread id in the
4489 debugging output. Don't check whether pid of thread equals to pid.
4490 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4491 iterate_over_lwps instead find_inferior.
4492
3d40fbb5
PA
44932015-08-24 Pedro Alves <palves@redhat.com>
4494
4495 * inferiors.c (get_first_process): New function.
4496 * inferiors.h (get_first_process): New declaration.
4497 * remote-utils.c (read_ptid): Default to the first process in the
4498 list, instead of to the current thread's process.
4499
438e1e42
PA
45002015-08-24 Pedro Alves <palves@redhat.com>
4501
4502 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4503 * event-loop.c: Likewise.
4504 * remote-utils.c: Likewise.
4505 * tracepoint.c: Likewise.
4506
a8c6d4fc
PA
45072015-08-24 Pedro Alves <palves@redhat.com>
4508
4509 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4510 ptid_get_lwp.
4511
99b0bb12
PA
45122015-08-21 Pedro Alves <palves@redhat.com>
4513
4514 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4515 instead of literal 1.
4516
f8904751
PA
45172015-08-21 Pedro Alves <palves@redhat.com>
4518
4519 * tdesc.c (default_description): Explicitly zero-initialize.
4520
465a859e
PA
45212015-08-21 Pedro Alves <palves@redhat.com>
4522
4523 PR gdb/18749
4524 * inferiors.c (remove_thread): Discard any pending stop reply for
4525 this thread.
4526 * server.c (remove_all_on_match_pid): Rename to ...
4527 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4528 instead of a pid.
4529 (discard_queued_stop_replies): Change parameter to a ptid. Now
4530 extern.
4531 (handle_v_kill, kill_inferior_callback, captured_main)
4532 (process_serial_event): Adjust.
4533 * server.h (discard_queued_stop_replies): Declare.
4534
f0db101d
PA
45352015-08-21 Pedro Alves <palves@redhat.com>
4536
4537 * linux-low.c (wait_for_sigstop): Always switch to no thread
4538 selected if the previously current thread dies.
4539 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4540 process instead of the current thread's.
4541 * remote-utils.c (input_interrupt): Don't check if there's no
4542 current thread.
4543 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4544 current thread to the general thread fails, error out.
4545 (handle_qxfer_auxv, handle_qxfer_libraries)
4546 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4547 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4548 (handle_query): Check if there's a thread selected instead of
4549 checking whether there's any thread in the thread list.
4550 (handle_qxfer_threads, handle_qxfer_btrace)
4551 (handle_qxfer_btrace_conf): Don't error out early if there's no
4552 thread in the thread list.
4553 (handle_v_cont, myresume): Don't set the current thread to the
4554 continue thread.
4555 (process_serial_event) <Hg handling>: Also set thread_id if the
4556 previous general thread is still alive.
4557 (process_serial_event) <g/G handling>: If setting the current
4558 thread to the general thread fails, error out.
4559 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4560 thread's lwp instead of the current thread's.
4561 * target.c (set_desired_thread): If the desired thread was not
4562 found, leave the current thread pointing to NULL. Return an int
4563 (boolean) indicating success.
4564 * target.h (set_desired_thread): Change return type to int.
4565
40045d91
MF
45662015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4567
4568 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4569 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4570 #includes.
4571 (ps_get_thread_area): New function.
4572
45face3b
GB
45732015-08-19 Gary Benson <gbenson@redhat.com>
4574
4575 * hostio.c (handle_pread): Do not attempt to read more data
4576 than hostio_reply_with_data can fit in a packet.
4577
16d5f642
JB
45782015-08-18 Joel Brobecker <brobecker@adacore.com>
4579
4580 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4581
a738da3a
MF
45822015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4583
4584 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4585
33ebda9d
PA
45862015-08-06 Pedro Alves <palves@redhat.com>
4587
4588 * tracepoint.c (expr_eval_result): Now an int.
4589
a44892be
PA
45902015-08-06 Pedro Alves <palves@redhat.com>
4591
4592 * gdbthread.h (struct regcache): Forward declare.
4593 (struct thread_info) <regcache_data>: Now a struct regcache
4594 pointer.
4595 * inferiors.c (inferior_regcache_data)
4596 (set_inferior_regcache_data): Now work with struct regcache
4597 pointers.
4598 * inferiors.h (struct regcache): Forward declare.
4599 (inferior_regcache_data, set_inferior_regcache_data): Now work
4600 with struct regcache pointers.
4601 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4602 (free_register_cache_thread): Remove struct regcache pointer
4603 casts.
4604
608a1e46
PA
46052015-08-06 Pedro Alves <palves@redhat.com>
4606
4607 * server.c (captured_main): On error, print the exception message
4608 to stderr, and if run_once is set, throw a quit.
4609
f0ce0d3a
PA
46102015-08-06 Pedro Alves <palves@redhat.com>
4611
4612 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4613 the current thread.
4614
bf47e248
PA
46152015-08-06 Pedro Alves <palves@redhat.com>
4616
4617 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4618 reading beyond the passed in buffer length.
4619
b6b9ffcc
PL
46202015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4621
4622 * tracepoint.c (symbol_list) <required>: Remove.
4623
863d01bd
PA
46242015-08-06 Pedro Alves <palves@redhat.com>
4625
4626 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4627 count if stopping and suspending threads.
4628 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4629 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4630 (linux_detach): Complete an ongoing step-over.
4631 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4632 throughout.
4633 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4634 (linux_wait_1): If passing a signal to the inferior after
4635 finishing a step-over, unsuspend and re-resume all lwps. If we
4636 see a single-step event but the thread should be continuing, don't
4637 pass the trap to gdb.
4638 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4639 internal_error instead of gdb_assert.
4640 (enqueue_pending_signal): New function.
4641 (check_ptrace_stopped_lwp_gone): Add debug output.
4642 (start_step_over): Use internal_error instead of gdb_assert.
4643 (complete_ongoing_step_over): New function.
4644 (linux_resume_one_thread): Don't resume a suspended thread.
4645 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4646 it stepping.
4647
00db26fa
PA
46482015-08-06 Pedro Alves <palves@redhat.com>
4649
4650 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4651 (linux_thread_alive): Use lwp_is_marked_dead.
4652 (extended_event_reported): Delete.
4653 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4654 instead of extended_event_reported.
4655 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4656 as well.
4657 (lwp_is_marked_dead): New function.
4658 (lwp_running): Use lwp_is_marked_dead.
4659 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4660 comment.
4661
ad071a30
PA
46622015-08-06 Pedro Alves <palves@redhat.com>
4663
4664 * linux-low.c (linux_wait_1): Move fork event output out of the
4665 !report_to_gdb check. Pass event_child->waitstatus to
4666 target_waitstatus_to_string instead of ourstatus.
4667
524b57e6
YQ
46682015-08-04 Yao Qi <yao.qi@linaro.org>
4669
4670 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4671 if current_thread is 32 bit.
4672
6085d6f6
YQ
46732015-08-04 Yao Qi <yao.qi@linaro.org>
4674
4675 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4676 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4677 * server.c (extended_protocol): Remove "static".
4678 * server.h (extended_protocol): Declare it.
4679
8a7e4587
YQ
46802015-08-04 Yao Qi <yao.qi@linaro.org>
4681
4682 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4683 both aarch64 and aarch32.
4684 (aarch64_set_pc): Likewise.
4685
3b53ae99
YQ
46862015-08-04 Yao Qi <yao.qi@linaro.org>
4687
4688 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4689 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4690 arm-with-neon.xml to srv_xmlfiles.
4691 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4692 (is_64bit_tdesc): New function.
4693 (aarch64_linux_read_description): New function.
4694 (aarch64_arch_setup): Call aarch64_linux_read_description.
4695 (regs_info): Rename to regs_info_aarch64.
4696 (aarch64_regs_info): Return right regs_info.
4697 (initialize_low_arch): Call initialize_low_arch_aarch32.
4698
bd9e6534
YQ
46992015-08-04 Yao Qi <yao.qi@linaro.org>
4700
4701 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4702 * linux-aarch32-low.c: New file.
4703 * linux-aarch32-low.h: New file.
4704 * linux-arm-low.c (arm_fill_gregset): Move it to
4705 linux-aarch32-low.c.
4706 (arm_store_gregset): Likewise.
4707 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4708 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4709 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4710 (regs_info): Rename to regs_info_arm.
4711 (arm_regs_info): Return regs_info_aarch32 if
4712 have_ptrace_getregset is 1 and target description is
4713 arm_with_neon or arm_with_vfpv3.
4714 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4715 Call initialize_low_arch_aarch32 instead.
4716
ded48a5e
YQ
47172015-08-04 Yao Qi <yao.qi@linaro.org>
4718
4719 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4720 * linux-low.c: ... here.
4721 * linux-low.h (have_ptrace_getregset): Declare it.
4722
96e9210f
PA
47232015-08-04 Pedro Alves <palves@redhat.com>
4724
4725 * thread-db.c (struct thread_db): Use new typedefs.
4726 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4727 CHK calls.
4728 (disable_thread_event_reporting): Cast result of dlsym to
4729 destination function pointer type.
4730 (thread_db_mourn): Use td_ta_delete_ftype.
4731
af60a1ef
SL
47322015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4733
4734 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4735 arch variant.
4736 (CDX_BREAKPOINT): Define for R2.
4737 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4738 (the_low_target): Add comments.
4739
e8b41681
YQ
47402015-07-30 Yao Qi <yao.qi@linaro.org>
4741
4742 * linux-arm-low.c (arm_hwcap): Remove it.
4743 (arm_read_description): New local variable arm_hwcap. Don't
4744 set arm_hwcap to zero.
4745
89abb039
YQ
47462015-07-30 Yao Qi <yao.qi@linaro.org>
4747
4748 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4749 Use regcache->tdesc instead.
4750 (arm_store_wmmxregset): Likewise.
4751 (arm_fill_vfpregset): Likewise.
4752 (arm_store_vfpregset): Likewise.
4753
deca266c
YQ
47542015-07-30 Yao Qi <yao.qi@linaro.org>
4755
4756 * linux-arm-low.c: Include arch/arm.h.
4757 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4758 (arm_store_gregset): Likewise.
4759
aa58a496
SM
47602015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4761
4762 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4763 ptrace's 4th parameter.
4764
50904b25
YQ
47652015-07-27 Yao Qi <yao.qi@linaro.org>
4766
4767 * configure.srv (case aarch64*-*-linux*): Don't set
4768 srv_linux_usrregs.
4769
5826e159
PA
47702015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4771
4772 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4773 sys/ptrace.h.
4774 * linux-arm-low.c: Likewise.
4775 * linux-cris-low.c: Likewise.
4776 * linux-crisv32-low.c: Likewise.
4777 * linux-low.c: Likewise.
4778 * linux-m68k-low.c: Likewise.
4779 * linux-mips-low.c: Likewise.
4780 * linux-nios2-low.c: Likewise.
4781 * linux-s390-low.c: Likewise.
4782 * linux-sparc-low.c: Likewise.
4783 * linux-tic6x-low.c: Likewise.
4784 * linux-tile-low.c: Likewise.
4785 * linux-x86-low.c: Likewise.
4786
54019719
PA
47872015-07-24 Pedro Alves <palves@redhat.com>
4788
4789 * config.in: Regenerate.
4790 * configure: Regenerate.
4791
eb7aa561
PA
47922015-07-24 Pedro Alves <palves@redhat.com>
4793
4794 * acinclude.m4: Include ../ptrace.m4.
4795 * configure.ac: Call GDB_AC_PTRACE.
4796 * config.in, configure: Regenerate.
4797
55d7b841
YQ
47982015-07-24 Yao Qi <yao.qi@linaro.org>
4799
4800 * linux-low.c (linux_create_inferior): Remove setting to
4801 proc->priv->new_inferior.
4802 (linux_attach): Likewise.
4803 (linux_low_filter_event): Likewise.
4804 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4805
c06cbd92
YQ
48062015-07-24 Yao Qi <yao.qi@linaro.org>
4807
4808 * linux-low.c (linux_arch_setup): New function.
4809 (linux_low_filter_event): If proc->tdesc is NULL and
4810 proc->attached is true, call the_low_target.arch_setup.
4811 Otherwise, keep status pending, and return.
4812 (linux_resume_one_lwp_throw): Don't call get_pc if
4813 thread->while_stepping isn't NULL. Don't call
4814 get_thread_regcache if proc->tdesc is NULL.
4815 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4816 (linux_target_ops): Install arch_setup.
4817 * server.c (start_inferior): Call the_target->arch_setup.
4818 * target.h (struct target_ops) <arch_setup>: New field.
4819 (target_arch_setup): New marco.
4820 * lynx-low.c (lynx_target_ops): Update.
4821 * nto-low.c (nto_target_ops): Update.
4822 * spu-low.c (spu_target_ops): Update.
4823 * win32-low.c (win32_target_ops): Update.
4824
5ae3ebba
YQ
48252015-07-24 Yao Qi <yao.qi@linaro.org>
4826
4827 * linux-low.c (linux_add_process): Don't set
4828 proc->priv->new_inferior.
4829 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4830 (linux_attach): Likewise.
4831
eb97750b
YQ
48322015-07-24 Yao Qi <yao.qi@linaro.org>
4833
4834 * server.c (start_inferior): Code refactor.
4835
51aee833
YQ
48362015-07-24 Yao Qi <yao.qi@linaro.org>
4837
4838 * server.c (process_serial_event): Set general_thread.
4839
af1b22f3
YQ
48402015-07-21 Yao Qi <yao.qi@linaro.org>
4841
4842 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4843 aarch64_linux_get_debug_reg_capacity.
4844
554717a3
YQ
48452015-07-17 Yao Qi <yao.qi@linaro.org>
4846
4847 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4848 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4849 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4850 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4851 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4852 (AARCH64_HWP_ALIGNMENT): Likewise.
4853 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4854 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4855 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4856 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4857 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4858 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4859 (struct aarch64_debug_reg_state): Likewise.
4860 (struct arch_lwp_info): Likewise.
4861 (aarch64_align_watchpoint): Likewise.
4862 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4863 (aarch64_watchpoint_length): Likewise.
4864 (aarch64_point_encode_ctrl_reg): Likewise
4865 (aarch64_point_is_aligned): Likewise.
4866 (aarch64_align_watchpoint): Likewise.
4867 (aarch64_linux_set_debug_regs):
4868 (aarch64_dr_state_insert_one_point): Likewise.
4869 (aarch64_dr_state_remove_one_point): Likewise.
4870 (aarch64_handle_breakpoint): Likewise.
4871 (aarch64_handle_aligned_watchpoint): Likewise.
4872 (aarch64_handle_unaligned_watchpoint): Likewise.
4873 (aarch64_handle_watchpoint): Likewise.
4874
c67ca4de
YQ
48752015-07-17 Yao Qi <yao.qi@linaro.org>
4876
4877 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4878 and don't aarch64_get_debug_reg_state. All callers update.
4879 (aarch64_handle_aligned_watchpoint): Likewise.
4880 (aarch64_handle_unaligned_watchpoint): Likewise.
4881 (aarch64_handle_watchpoint): Likewise.
4882 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4883 (aarch64_remove_point): Likewise.
4884
25abf979
YQ
48852015-07-17 Yao Qi <yao.qi@linaro.org>
4886
4887 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4888 debug_printf.
4889 (aarch64_handle_unaligned_watchpoint): Likewise.
4890
db1ff28b
JK
48912015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4892
4893 Revert the previous 3 commits:
4894 Move gdb_regex* to common/
4895 Move linux_find_memory_regions_full & co.
4896 gdbserver build-id attribute generator
4897
700ca40f
JK
48982015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4899 Jan Kratochvil <jan.kratochvil@redhat.com>
4900
4901 gdbserver build-id attribute generator.
4902 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4903 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4904 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4905 (find_phdr): New.
4906 (get_dynamic): Use find_pdhr to traverse program headers.
4907 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4908 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4909 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4910 (get_hex_build_id): New.
4911 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4912 to reply XML document.
4913
9904185c
JK
49142015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4915 Jan Kratochvil <jan.kratochvil@redhat.com>
4916
4917 * target.c: Include target/target-utils.h and fcntl.h.
4918 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4919 (target_fileio_read_stralloc): New functions.
4920
6e5b4429
JK
49212015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4922
4923 * Makefile.in (OBS): Add gdb_regex.o.
4924 (gdb_regex.o): New.
4925 * config.in: Rebuilt.
4926 * configure: Rebuilt.
4927
ddc98fbf
JK
49282015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4929 Jan Kratochvil <jan.kratochvil@redhat.com>
4930
4931 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4932 * Makefile.in (OBS): Add target-utils.o.
4933 (linux-maps.o, target-utils.o): New.
4934 * configure.srv (srv_linux_obj): Add linux-maps.o.
4935
e57bb7a0
PL
49362015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4937
4938 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4939 function, return 1.
4940 (the_low_target): Install it.
4941
586b02a9
PA
49422015-07-14 Pedro Alves <palves@redhat.com>
4943
4944 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4945 Instead, ignore ECHILD, and throw an error for other errnos.
4946
58c1b36c
PA
49472015-07-10 Pedro Alves <palves@redhat.com>
4948
4949 * event-loop.c (struct callback_event) <data>: Change type to
4950 gdb_client_data instance instead of gdb_client_data pointer.
4951 (append_callback_event): Adjust.
4952
421530db
PL
49532015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4954
4955 * linux-aarch64-low.c: Add comments for each linux_target_ops
4956 method. Remove comments already covered in target_ops and
4957 linux_target_ops definitions.
4958 (the_low_target): Add comments for each unimplemented method.
4959
c2d65f38
YQ
49602015-07-09 Yao Qi <yao.qi@linaro.org>
4961
4962 * linux-aarch64-low.c (aarch64_regmap): Remove.
4963 (aarch64_usrregs_info): Remove.
4964 (regs_info): Set field usrregs to NULL.
4965
b20a6524
MM
49662015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4967
4968 * linux-low.c: Include "rsp-low.h"
4969 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4970 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4971 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4972 (handle_btrace_enable_pt): New.
4973 (handle_btrace_general_set): Support "pt".
4974 (handle_btrace_conf_general_set): Support "pt:size".
4975
96c97461
PL
49762015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4977
4978 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4979 Z_PACKET_SW_BP.
4980
37d66942
PL
49812015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4982
4983 * linux-aarch64-low.c: Remove comment about endianness.
4984 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4985 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4986 memcmp.
4987
dc06243f
GB
49882015-06-24 Gary Benson <gbenson@redhat.com>
4989
4990 * linux-i386-ipa.c (stdint.h): Do not include.
4991 * lynx-i386-low.c (stdint.h): Likewise.
4992 * lynx-ppc-low.c (stdint.h): Likewise.
4993 * mem-break.c (stdint.h): Likewise.
4994 * thread-db.c (stdint.h): Likewise.
4995 * tracepoint.c (stdint.h): Likewise.
4996 * win32-low.c (stdint.h): Likewise.
4997
124e13d9
SM
49982015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4999
5000 * server.c (write_qxfer_response): Update call to
5001 remote_escape_output.
5002
909c2cda
JK
50032015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5004 Jan Kratochvil <jan.kratochvil@redhat.com>
5005
5006 Merge multiple hex conversions.
5007 * gdbreplay.c (tohex): Rename to 'fromhex'.
5008 (logchar): Use fromhex.
5009
24c05f46
JK
50102015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5011
5012 * server.c (handle_qxfer_libraries): Set `version' attribute for
5013 <library-list>.
5014
14d2069a
GB
50152015-06-10 Gary Benson <gbenson@redhat.com>
5016
5017 * target.h (struct target_ops) <multifs_open>: New field.
5018 <multifs_unlink>: Likewise.
5019 <multifs_readlink>: Likewise.
5020 * linux-low.c (nat/linux-namespaces.h): New include.
5021 (linux_target_ops): Initialize the_target->multifs_open,
5022 the_target->multifs_unlink and the_target->multifs_readlink.
5023 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5024 * hostio.c (hostio_fs_pid): New static variable.
5025 (hostio_handle_new_gdb_connection): New function.
5026 (handle_setfs): Likewise.
5027 (handle_open): Use the_target->multifs_open as appropriate.
5028 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5029 (handle_readlink): Use the_target->multifs_readlink as
5030 appropriate.
5031 (handle_vFile): Handle vFile:setfs packets.
5032 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5033 after target_handle_new_gdb_connection.
5034
4b8b5e72
GB
50352015-06-10 Gary Benson <gbenson@redhat.com>
5036
5037 * configure.ac (AC_CHECK_FUNCS): Add setns.
5038 * config.in: Regenerate.
5039 * configure: Likewise.
5040 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5041 (linux-namespaces.o): New rule.
5042 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5043
3ac2e371
GB
50442015-06-09 Gary Benson <gbenson@redhat.com>
5045
5046 * hostio.c (handle_open): Process mode argument with
5047 fileio_to_host_mode.
5048
ca9b78ce
YQ
50492015-06-01 Yao Qi <yao.qi@linaro.org>
5050
5051 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5052 * linux-x86-low.c: Likewise.
5053
bfacd19d
DB
50542015-05-28 Don Breazeal <donb@codesourcery.com>
5055
5056 * linux-low.c (handle_extended_wait): Initialize
5057 thread_info.last_resume_kind for new fork children.
5058
452003ef
PA
50592015-05-15 Pedro Alves <palves@redhat.com>
5060
5061 * target.h (target_handle_new_gdb_connection): Rewrite using if
5062 wrapped in do/while.
5063
1041a03c
JB
50642015-05-14 Joel Brobecker <brobecker@adacore.com>
5065
5066 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5067 * configure, config.in: Regenerate.
5068 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5069 Declare typedef.
5070
c269dbdb
DB
50712015-05-12 Don Breazeal <donb@codesourcery.com>
5072
5073 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5074 PTRACE_EVENT_VFORK_DONE.
5075 (linux_low_ptrace_options, extended_event_reported): Add vfork
5076 events.
5077 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5078 and "vforkdone" for RSP 'T' Stop Reply Packet.
5079 * server.h (report_vfork_events): Declare
5080 global variable.
5081
3a8a0396
DB
50822015-05-12 Don Breazeal <donb@codesourcery.com>
5083
5084 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5085 (the_low_target) <new_fork>: Initialize new member.
5086 * linux-arm-low.c (arm_new_fork): New function.
5087 (the_low_target) <new_fork>: Initialize new member.
5088 * linux-low.c (handle_extended_wait): Call new target function
5089 new_fork.
5090 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5091 * linux-mips-low.c (mips_add_watchpoint): New function
5092 extracted from mips_insert_point.
5093 (the_low_target) <new_fork>: Initialize new member.
5094 (mips_linux_new_fork): New function.
5095 (mips_insert_point): Call mips_add_watchpoint.
5096 * linux-x86-low.c (x86_linux_new_fork): New function.
5097 (the_low_target) <new_fork>: Initialize new member.
5098
de0d863e
DB
50992015-05-12 Don Breazeal <donb@codesourcery.com>
5100
5101 * linux-low.c (handle_extended_wait): Implement return value,
5102 rename argument 'event_child' to 'event_lwp', handle
5103 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5104 (linux_low_ptrace_options): New function.
5105 (linux_low_filter_event): Call linux_low_ptrace_options,
5106 use different argument fo linux_enable_event_reporting,
5107 use return value from handle_extended_wait.
5108 (extended_event_reported): New function.
5109 (linux_wait_1): Call extended_event_reported and set
5110 status to report fork events.
5111 (linux_write_memory): Add pid to debug message.
5112 (reset_lwp_ptrace_options_callback): New function.
5113 (linux_handle_new_gdb_connection): New function.
5114 (linux_target_ops): Initialize new structure member.
5115 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5116 * lynx-low.c: Initialize new structure member.
5117 * remote-utils.c (prepare_resume_reply): Implement stop reason
5118 "fork" for "T" stop message.
5119 * server.c (handle_query): Call handle_new_gdb_connection.
5120 * server.h (report_fork_events): Declare global flag.
5121 * target.h (struct target_ops) <handle_new_gdb_connection>:
5122 New member.
5123 (target_handle_new_gdb_connection): New macro.
5124 * win32-low.c: Initialize new structure member.
5125
ddcbc397
DB
51262015-05-12 Don Breazeal <donb@codesourcery.com>
5127
5128 * mem-break.c (APPEND_TO_LIST): Define macro.
5129 (clone_agent_expr): New function.
5130 (clone_one_breakpoint): New function.
5131 (clone_all_breakpoints): New function.
5132 * mem-break.h: Declare new functions.
5133
89245bc0
DB
51342015-05-12 Don Breazeal <donb@codesourcery.com>
5135
5136 * linux-low.c (linux_supports_fork_events): New function.
5137 (linux_supports_vfork_events): New function.
5138 (linux_target_ops): Initialize new structure members.
5139 (initialize_low): Call linux_check_ptrace_features.
5140 * lynx-low.c (lynx_target_ops): Initialize new structure
5141 members.
5142 * server.c (report_fork_events, report_vfork_events):
5143 New global flags.
5144 (handle_query): Add new features to qSupported packet and
5145 response.
5146 (captured_main): Initialize new global variables.
5147 * target.h (struct target_ops) <supports_fork_events>:
5148 New member.
5149 <supports_vfork_events>: New member.
5150 (target_supports_fork_events): New macro.
5151 (target_supports_vfork_events): New macro.
5152 * win32-low.c (win32_target_ops): Initialize new structure
5153 members.
5154
835205d0
GB
51552015-05-12 Gary Benson <gbenson@redhat.com>
5156
5157 * server.c (handle_qxfer_exec_file): Use current process
5158 if annex is empty.
5159
21e94bd9
SL
51602015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5161
5162 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5163 Remove HAVE_PTRACE_GETREGS conditionals.
5164 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5165 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5166
45614f15
YQ
51672015-05-08 Yao Qi <yao.qi@linaro.org>
5168
5169 * linux-low.c (linux_supports_conditional_breakpoints): New
5170 function.
5171 (linux_target_ops): Install new target method.
5172 * lynx-low.c (lynx_target_ops): Install NULL hook for
5173 supports_conditional_breakpoints.
5174 * nto-low.c (nto_target_ops): Likewise.
5175 * spu-low.c (spu_target_ops): Likewise.
5176 * win32-low.c (win32_target_ops): Likewise.
5177 * server.c (handle_query): Check
5178 target_supports_conditional_breakpoints.
5179 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5180 New field.
5181 (target_supports_conditional_breakpoints): New macro.
5182
80ad801e
PA
51832015-05-06 Pedro Alves <palves@redhat.com>
5184
5185 PR server/18081
5186 * server.c (start_inferior): If the process exits, mourn it.
5187
819843c7
GB
51882015-04-21 Gary Benson <gbenson@redhat.com>
5189
5190 * hostio.c (fileio_open_flags_to_host): Factored out to
5191 fileio_to_host_openflags in common/fileio.c. Single use
5192 updated.
5193
a2d5a9d7
MF
51942015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5195
5196 * linux-xtensa-low.c (xtensa_fill_gregset)
5197 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5198 XCHAL_HAVE_LOOP.
5199
deb44829
MF
52002015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5201
5202 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5203 (regs_info): Replace usrregs pointer with NULL.
5204
e57f1de3
GB
52052015-04-17 Gary Benson <gbenson@redhat.com>
5206
5207 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5208 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5209 * server.c (handle_qxfer_exec_file): New function.
5210 (qxfer_packets): Add exec-file entry.
5211 (handle_query): Report qXfer:exec-file:read as supported packet.
5212
62828379
RN
52132015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5214
5215 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5216
b88bb450
GB
52172015-04-09 Gary Benson <gbenson@redhat.com>
5218
5219 * hostio-errno.c (errno_to_fileio_error): Remove function.
5220 Update caller to use remote_fileio_to_fio_error.
5221
c8f4bfdd
YQ
52222015-04-09 Yao Qi <yao.qi@linaro.org>
5223
5224 * linux-low.c (linux_insert_point): Call
5225 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5226 (linux_remove_point): Call remove_memory_breakpoint if type is
5227 raw_bkpt_type_sw.
5228 * linux-x86-low.c (x86_insert_point): Don't call
5229 insert_memory_breakpoint.
5230 (x86_remove_point): Don't call remove_memory_breakpoint.
5231
41f98f02
PA
52322015-04-01 Pedro Alves <palves@redhat.com>
5233 Cleber Rosa <crosa@redhat.com>
5234
5235 * server.c (gdbserver_usage): Reorganize and extend the usage
5236 message.
5237
2bf6fb9d
PA
52382015-03-24 Pedro Alves <palves@redhat.com>
5239
5240 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5241 output. Also dump TRAP_TRACE.
5242 (linux_low_filter_event): In debug output, distinguish a
5243 resume_stop SIGSTOP from a delayed SIGSTOP.
5244
369f6daa
GB
52452015-03-24 Gary Benson <gbenson@redhat.com>
5246
5247 * linux-x86-low.c (x86_linux_new_thread): Moved to
5248 nat/x86-linux.c.
5249 (x86_linux_prepare_to_resume): Likewise.
5250
8e5d4070
GB
52512015-03-24 Gary Benson <gbenson@redhat.com>
5252
5253 * Makefile.in (x86-linux-dregs.o): New rule.
5254 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5255 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5256 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5257 (x86_linux_dr_get): Likewise.
5258 (x86_linux_dr_set): Likewise.
5259 (update_debug_registers_callback): Likewise.
5260 (x86_linux_dr_set_addr): Likewise.
5261 (x86_linux_dr_get_addr): Likewise.
5262 (x86_linux_dr_set_control): Likewise.
5263 (x86_linux_dr_get_control): Likewise.
5264 (x86_linux_dr_get_status): Likewise.
5265 (x86_linux_update_debug_registers): Likewise.
5266
2b95d440
GB
52672015-03-24 Gary Benson <gbenson@redhat.com>
5268
5269 * linux-x86-low.c (x86_linux_update_debug_registers):
5270 New function, factored out from...
5271 (x86_linux_prepare_to_resume): ...this.
5272
14b0bc68
GB
52732015-03-24 Gary Benson <gbenson@redhat.com>
5274
5275 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5276 (x86_linux_dr_set): Likewise.
5277 (update_debug_registers_callback): Likewise.
5278 (x86_linux_dr_set_addr): Likewise.
5279 (x86_linux_dr_get_addr): Likewise.
5280 (x86_linux_dr_set_control): Likewise.
5281 (x86_linux_dr_get_control): Likewise.
5282 (x86_linux_dr_get_status): Likewise.
5283 (x86_linux_prepare_to_resume): Likewise.
5284
5dfe6ca8
GB
52852015-03-24 Gary Benson <gbenson@redhat.com>
5286
5287 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5288 Use perror_with_name. Pass string through gettext.
5289 (x86_linux_dr_set): Likewise.
5290
d33472ad
GB
52912015-03-24 Gary Benson <gbenson@redhat.com>
5292
5293 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5294 (x86_linux_dr_set_addr): ...this.
5295 (x86_dr_low_get_addr): Rename to...
5296 (x86_linux_dr_get_addr): ...this.
5297 (x86_dr_low_set_control): Rename to...
5298 (x86_linux_dr_set_control): ...this.
5299 (x86_dr_low_get_control): Rename to...
5300 (x86_linux_dr_get_control): ...this.
5301 (x86_dr_low_get_status): Rename to...
5302 (x86_linux_dr_get_status): ...this.
5303 (x86_dr_low): Update with new function names.
5304
4b134ca1
GB
53052015-03-24 Gary Benson <gbenson@redhat.com>
5306
5307 * Makefile.in (x86-linux.o): New rule.
5308 * configure.srv: Add x86-linux.o to relevant targets.
5309 * linux-low.c (lwp_set_arch_private_info): New function.
5310 (lwp_arch_private_info): Likewise.
5311 * linux-x86-low.c: Include nat/x86-linux.h.
5312 (arch_lwp_info): Removed structure.
5313 (update_debug_registers_callback):
5314 Use lwp_set_debug_registers_changed.
5315 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5316 and lwp_set_debug_registers_changed.
5317 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5318
34c703da
GB
53192015-03-24 Gary Benson <gbenson@redhat.com>
5320
5321 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5322 * linux-arm-low.c (arm_new_thread): Likewise.
5323 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5324 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5325 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5326 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5327
cff068da
GB
53282015-03-24 Gary Benson <gbenson@redhat.com>
5329
5330 * linux-low.c (ptid_of_lwp): New function.
5331 (lwp_is_stopped): Likewise.
5332 (lwp_stop_reason): Likewise.
5333 * linux-x86-low.c (update_debug_registers_callback):
5334 Use lwp_is_stopped.
5335 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5336 lwp_stop_reason.
5337
b2f7c7e8
GB
53382015-03-24 Gary Benson <gbenson@redhat.com>
5339
5340 * linux-low.h (linux_stop_lwp): Remove declaration.
5341
6d4ee8c6
GB
53422015-03-24 Gary Benson <gbenson@redhat.com>
5343
5344 * linux-low.h: Include nat/linux-nat.h.
5345 * linux-low.c (iterate_over_lwps_args): New structure.
5346 (iterate_over_lwps_filter): New function.
5347 (iterate_over_lwps): Likewise.
5348 * linux-x86-low.c (update_debug_registers_callback):
5349 Update signature to what iterate_over_lwps expects.
5350 Remove PID check that iterate_over_lwps now performs.
5351 (x86_dr_low_set_addr): Use iterate_over_lwps.
5352 (x86_dr_low_set_control): Likewise.
5353
70a0bb6b
GB
53542015-03-24 Gary Benson <gbenson@redhat.com>
5355
5356 * linux-x86-low.c (x86_debug_reg_state): New function.
5357 (x86_linux_prepare_to_resume): Use the above.
5358
7b669087
GB
53592015-03-24 Gary Benson <gbenson@redhat.com>
5360
5361 * linux-low.c (current_lwp_ptid): New function.
5362 * linux-x86-low.c: Include nat/linux-nat.h.
5363 (x86_dr_low_get_addr): Use current_lwp_ptid.
5364 (x86_dr_low_get_control): Likewise.
5365 (x86_dr_low_get_status): Likewise.
5366
eef49a3d
PA
53672015-03-20 Pedro Alves <palves@redhat.com>
5368
5369 * tracepoint.c (cmd_qtstatus): Make "str" const.
5370
b2333d22
PA
53712015-03-20 Pedro Alves <palves@redhat.com>
5372
5373 * server.c (handle_general_set): Make "req_str" const.
5374
23f238d3
PA
53752015-03-19 Pedro Alves <palves@redhat.com>
5376
5377 * linux-low.c (linux_resume_one_lwp): Rename to ...
5378 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5379 instead call perror_with_name.
5380 (check_ptrace_stopped_lwp_gone): New function.
5381 (linux_resume_one_lwp): Reimplement as wrapper around
5382 linux_resume_one_lwp_throw that swallows errors if the LWP is
5383 gone.
5384
91baf43f
PA
53852015-03-19 Pedro Alves <palves@redhat.com>
5386
5387 * linux-low.c (count_events_callback, select_event_lwp_callback):
5388 No longer check whether the thread has resume_stop as last resume
5389 kind.
5390
8bf3b159
PA
53912015-03-19 Pedro Alves <palves@redhat.com>
5392
5393 * linux-low.c (count_events_callback, select_event_lwp_callback):
5394 Use the lwp's status_pending_p field, not the thread's.
5395
b90fc188
PA
53962015-03-19 Pedro Alves <palves@redhat.com>
5397
5398 * linux-low.c (select_event_lwp_callback): Update comments to
5399 no longer mention SIGTRAP.
5400
464b0089
GB
54012015-03-18 Gary Benson <gbenson@redhat.com>
5402
5403 * server.c (handle_query): Do not report vFile:fstat as supported.
5404
aa9e327f
GB
54052015-03-11 Gary Benson <gbenson@redhat.com>
5406
5407 * hostio.c (sys/types.h): New include.
5408 (sys/stat.h): Likewise.
5409 (common-remote-fileio.h): Likewise.
5410 (handle_fstat): New function.
5411 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 5412
791c0056
GB
54132015-03-11 Gary Benson <gbenson@redhat.com>
5414
5415 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5416 struct stat.st_blocks and struct stat.st_blksize.
5417 * configure: Regenerate.
5418 * config.in: Likewise.
5419 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5420 (OBS): Add common-remote-fileio.o.
5421 (common-remote-fileio.o): New rule.
5422
9a9df970
PA
54232015-03-09 Pedro Alves <palves@redhat.com>
5424
5425 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5426 'struct sockaddr' pointer in 'accept' call.
5427
9eb1356e
PA
54282015-03-09 Pedro Alves <palves@redhat.com>
5429
5430 Revert:
5431 2015-03-07 Pedro Alves <palves@redhat.com>
5432 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5433 or <winsock2.h> here. Instead include "gdb_socket.h".
5434 (remote_open): Use union gdb_sockaddr_u.
5435 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5436 or <winsock2.h> here. Instead include "gdb_socket.h".
5437 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5438 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5439 or <sys/un.h>.
5440 (init_named_socket, gdb_agent_helper_thread): Use union
5441 gdb_sockaddr_u.
5442
aac331e4
PA
54432015-03-07 Pedro Alves <palves@redhat.com>
5444
5445 * configure.ac (build_warnings): Move
5446 -Wdeclaration-after-statement to the C-specific set.
5447 * configure: Regenerate.
5448
366c75fc
PA
54492015-03-07 Pedro Alves <palves@redhat.com>
5450
5451 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5452 or <winsock2.h> here. Instead include "gdb_socket.h".
5453 (remote_open): Use union gdb_sockaddr_u.
5454 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5455 or <winsock2.h> here. Instead include "gdb_socket.h".
5456 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5457 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5458 or <sys/un.h>.
5459 (init_named_socket, gdb_agent_helper_thread): Use union
5460 gdb_sockaddr_u.
5461
492d29ea
PA
54622015-03-07 Pedro Alves <palves@redhat.com>
5463
5464 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5465 instead.
5466
60a191ed
YQ
54672015-03-06 Yao Qi <yao.qi@linaro.org>
5468
5469 * linux-aarch64-low.c (aarch64_insert_point): Use
5470 show_debug_regs as a boolean.
5471 (aarch64_remove_point): Likewise.
5472
f5771b1d
PA
54732015-03-05 Pedro Alves <palves@redhat.com>
5474
5475 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5476 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5477 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5478 * nto-low.c (nto_target_ops): Likewise.
5479 * spu-low.c (spu_target_ops): Likewise.
5480 * win32-low.c (win32_target_ops): Likewise.
5481
3e572f71
PA
54822015-03-04 Pedro Alves <palves@redhat.com>
5483
72f4393d 5484 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
5485 Decide whether a breakpoint triggered based on the SIGTRAP's
5486 siginfo.si_code.
72f4393d
L
5487 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5488 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
5489 (linux_low_filter_event): Check for breakpoints before checking
5490 watchpoints.
5491 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5492 siginfo.si_code.
72f4393d
L
5493 (linux_stopped_by_sw_breakpoint)
5494 (linux_supports_stopped_by_sw_breakpoint)
5495 (linux_stopped_by_hw_breakpoint)
5496 (linux_supports_stopped_by_hw_breakpoint): New functions.
5497 (linux_target_ops): Install new target methods.
3e572f71 5498
1ec68e26
PA
54992015-03-04 Pedro Alves <palves@redhat.com>
5500
5501 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5502 * server.c (swbreak_feature, hwbreak_feature): New globals.
5503 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5504 (captured_main): Clear swbreak_feature and hwbreak_feature.
5505 * server.h (swbreak_feature, hwbreak_feature): Declare.
5506 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5507 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5508 supports_stopped_by_hw_breakpoint>: New fields.
5509 (target_supports_stopped_by_sw_breakpoint)
5510 (target_stopped_by_sw_breakpoint)
5511 (target_supports_stopped_by_hw_breakpoint)
5512 (target_stopped_by_hw_breakpoint): Declare.
5513
15c66dd6
PA
55142015-03-04 Pedro Alves <palves@redhat.com>
5515
5516 enum lwp_stop_reason -> enum target_stop_reason
5517 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5518 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5519 (linux_wait_1, stuck_in_jump_pad_callback)
5520 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5521 (linux_stopped_by_watchpoint):
5522 * linux-low.h (enum lwp_stop_reason): Delete.
5523 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5524 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5525
98fc70d6
YQ
55262015-03-04 Yao Qi <yao.qi@linaro.org>
5527
5528 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5529
dd2ac174
GB
55302015-03-03 Gary Benson <gbenson@redhat.com>
5531
5532 * hostio.c (handle_vFile): Fix prefix lengths.
5533
d68e53f4
MM
55342015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5535
5536 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5537 ptr_bits.
5538
bf2d68ab
AA
55392015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5540
5541 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5542 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5543 (clean): Add "rm -f" for above C files.
5544 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5545 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5546 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5547 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5548 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5549 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5550 (init_registers_s390x_vx_linux64)
5551 (init_registers_s390x_tevx_linux64)
5552 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5553 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5554 declarations.
5555 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5556 (s390_store_vxrs_high): New functions.
5557 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5558 NT_S390_VXRS_HIGH.
5559 (s390_arch_setup): Add logic for selecting one of the new target
5560 descriptions. Activate the new vector regsets if applicable.
5561 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5562 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5563 and init_registers_s390x_tevx_linux64.
5564
c966a859
PA
55652015-03-01 Pedro Alves <palves@redhat.com>
5566
5567 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5568 parameter.
5569
4180215b
PA
55702015-02-27 Pedro Alves <palves@redhat.com>
5571
5572 * linux-x86-low.c (u_debugreg_offset): New function.
5573 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5574
749bab01
PA
55752015-02-27 Pedro Alves <palves@redhat.com>
5576
5577 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5578 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5579 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5580 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5581 (ps_lsetfpregs, ps_getpid)
5582 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5583 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5584 (ps_lsetxregs, ps_plog): Declare.
5585
3c14e5a3
PA
55862015-02-27 Pedro Alves <palves@redhat.com>
5587
5588 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5589 IP_AGENT_EXPORT_FUNC.
5590 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5591 IP_AGENT_EXPORT_FUNC.
5592 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5593 (IP_AGENT_EXPORT): Delete.
5594 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5595 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5596 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5597 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5598 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5599 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5600 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5601 (traceframe_read_count, traceframe_write_count)
5602 (traceframes_created, trace_state_variables, get_raw_reg)
5603 (get_trace_state_variable_value, set_trace_state_variable_value)
5604 (ust_loaded, helper_thread_id, cmd_buf): Use
5605 IPA_SYM_EXPORTED_NAME.
5606 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5607 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5608 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5609 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5610 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5611 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5612 EXTERN_C_PUSH/EXTERN_C_POP.
5613 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5614 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5615 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5616 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5617 (traceframe_write_count, traceframe_read_count)
5618 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5619 (about_to_request_buffer_space, get_trace_state_variable_value)
5620 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5621 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5622 EXTERN_C_PUSH/EXTERN_C_POP.
5623 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5624 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5625 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5626 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5627 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5628 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5629 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5630 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5631 Define.
5632 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5633 (IP_AGENT_EXPORT_VAR_DECL): Define.
5634 (tracing): Declare.
5635 (gdb_agent_get_raw_reg): Declare.
5636
fe978cb0
PA
56372015-02-27 Tom Tromey <tromey@redhat.com>
5638 Pedro Alves <palves@redhat.com>
5639
5640 Rename symbols whose names are reserved C++ keywords throughout.
5641
3bc3d82a
PA
56422015-02-27 Pedro Alves <palves@redhat.com>
5643
5644 * Makefile.in (COMPILER): New, get it from autoconf.
5645 (CXX): Get from autoconf instead.
5646 (COMPILE.pre): Use COMPILER.
5647 (CC-LD): Rename to ...
5648 (CC_LD): ... this. Use COMPILER.
5649 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5650 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5651 * acinclude.m4: Include build-with-cxx.m4.
5652 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5653 Disable -Werror by default if building in C++ mode.
5654 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5655 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5656 the C++ compiler. Save/restore CXXFLAGS too.
5657 * configure: Regenerate.
5658
07697489
PA
56592015-02-27 Pedro Alves <palves@redhat.com>
5660
5661 * acinclude.m4: Include libiberty.m4.
5662 * configure.ac: Call libiberty_INIT.
5663 * config.in, configure: Regenerate.
5664
9beb7c4e
PA
56652015-02-26 Pedro Alves <palves@redhat.com>
5666
5667 * linux-low.c (linux_wait_1): When incrementing the PC past a
5668 program breakpoint always use the_low_target.breakpoint_len as
5669 increment, rather than the maximum between that and
5670 the_low_target.decr_pc_after_break.
5671
8090aef2
PA
56722015-02-23 Pedro Alves <palves@redhat.com>
5673
5674 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5675 thread was doing a step-over; always adjust the PC if
5676 we stepped over a permanent breakpoint.
5677 (linux_wait_1): If we stepped over breakpoint that was on top of a
5678 permanent breakpoint, manually advance the PC past it.
5679
bc9540e8
PA
56802015-02-23 Pedro Alves <palves@redhat.com>
5681
5682 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5683 modes.
5684 (x86_fill_gregset, x86_store_gregset): Use it when handling
5685 $orig_eax.
5686
2db9a427
PA
56872015-02-20 Pedro Alves <palves@redhat.com>
5688
5689 * thread-db.c: Include "nat/linux-procfs.h".
5690 (thread_db_init): Skip listing new threads if the kernel supports
5691 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5692
afa8d396
PA
56932015-02-20 Pedro Alves <palves@redhat.com>
5694
5695 * linux-low.c (status_pending_p_callback): Use ptid_match.
5696
c9587f88
AT
56972015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5698
5699 PR breakpoints/16812
5700 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5701 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5702 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5703
b05ec7a5
AT
57042015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5705
5706 PR breakpoints/15956
5707 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5708
d33501a5
MM
57092015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5710
5711 * linux-low.c (linux_low_btrace_conf): Print size.
5712 * server.c (handle_btrace_conf_general_set): New.
5713 (hanle_general_set): Call handle_btrace_conf_general_set.
5714 (handle_query): Report Qbtrace-conf:bts:size as supported.
5715
f4abbc16
MM
57162015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5717
5718 * linux-low.c (linux_low_enable_btrace): Update parameters.
5719 (linux_low_btrace_conf): New.
5720 (linux_target_ops)<to_btrace_conf>: Initialize.
5721 * server.c (current_btrace_conf): New.
5722 (handle_btrace_enable): Rename to ...
5723 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5724 to target_enable_btrace. Update comment. Update users.
5725 (handle_qxfer_btrace_conf): New.
5726 (qxfer_packets): Add btrace-conf entry.
5727 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5728 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5729 (target_ops)<read_btrace_conf>: New.
5730 (target_enable_btrace): Update parameters.
5731 (target_read_btrace_conf): New.
5732
043c3577
MM
57332015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5734
5735 * server.c (handle_btrace_general_set): Remove call to
5736 target_supports_btrace.
5737 (supported_btrace_packets): New.
5738 (handle_query): Call supported_btrace_packets.
5739 * target.h: include btrace-common.h.
5740 (btrace_target_info): Removed.
5741 (supports_btrace, target_supports_btrace): Update parameters.
5742
734b0e4b
MM
57432015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5744
5745 * Makefile.in (SFILES): Add common/btrace-common.c.
5746 (OBS): Add common/btrace-common.o.
5747 (btrace-common.o): Add build rules.
5748 * linux-low: Include btrace-common.h.
5749 (linux_low_read_btrace): Use struct btrace_data. Call
5750 btrace_data_init and btrace_data_fini.
5751
d6c146e9
PA
57522015-02-06 Pedro Alves <palves@redhat.com>
5753
5754 * thread-db.c (find_new_threads_callback): Add debug output.
5755
20ba1ce6
PA
57562015-02-04 Pedro Alves <palves@redhat.com>
5757
5758 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5759 (resume_stopped_resumed_lwps): New function.
5760 (linux_wait_for_event_filtered): Use it.
5761
8cc73a39
SDJ
57622015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5763
5764 * Makefile.in (SFILES): Add linux-personality.c.
5765 (linux-personality.o): New rule.
5766 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5767 list of objects to be built.
5768 * linux-low.c: Include nat/linux-personality.h.
5769 (linux_create_inferior): Remove code to disable address space
5770 randomization (moved to ../nat/linux-personality.c). Create
5771 cleanup to disable address space randomization.
5772
fb23d554
SDJ
57732015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5774
5775 * Makefile.in (posix-strerror.o): New rule.
5776 (mingw-strerror.o): Likewise.
5777 * configure: Regenerated.
5778 * configure.ac: Source file ../common/common.host. Initialize new
5779 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5780
cdf43629
YQ
57812015-01-14 Yao Qi <yao@codesourcery.com>
5782
5783 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5784 (ppc-linux.o): New rule.
5785 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5786 * configure.ac: AC_CHECK_FUNCS(getauxval).
5787 * config.in: Re-generated.
5788 * configure: Re-generated.
5789 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5790 ppc64_64bit_inferior_p
5791
514c5338
YQ
57922015-01-14 Yao Qi <yao@codesourcery.com>
5793
5794 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5795 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5796 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5797 (PT_ORIG_R3, PT_TRAP): Likewise.
5798 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5799 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5800 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5801
3368c1e5
JB
58022015-01-10 Joel Brobecker <brobecker@adacore.com>
5803
5804 * i387-fp.c (i387_cache_to_xsave): In look over
5805 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5806 zmmh_low_space field by use of zmmh_high_space.
5807
582511be
PA
58082015-01-09 Pedro Alves <palves@redhat.com>
5809
5810 * linux-low.c (step_over_bkpt): Move higher up in the file.
5811 (handle_extended_wait): Don't store the stop_pc here.
5812 (get_stop_pc): Adjust comments and rename to ...
5813 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5814 stopped for a software breakpoint or hardware breakpoint.
5815 (thread_still_has_status_pending_p): New function.
5816 (status_pending_p_callback): Use
5817 thread_still_has_status_pending_p. If the event is no longer
5818 interesting, resume the LWP.
5819 (handle_tracepoints): Add assert.
5820 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5821 (wstatus_maybe_breakpoint): New function.
5822 (cancel_breakpoint): Delete function.
5823 (check_stopped_by_watchpoint): New function, factored out from
5824 linux_low_filter_event.
5825 (lp_status_maybe_breakpoint): Delete function.
5826 (linux_low_filter_event): Remove filter_ptid argument.
5827 Leave thread group exits pending here. Store the LWP's stop PC.
5828 Always leave events pending.
5829 (linux_wait_for_event_filtered): Pull all events out of the
5830 kernel, and leave them all pending.
5831 (count_events_callback, select_event_lwp_callback): Consider all
5832 events.
5833 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5834 (select_event_lwp): Only give preference to the stepping LWP in
5835 all-stop mode. Adjust comments.
5836 (ignore_event): New function.
5837 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5838 references to cancel_breakpoints. Adjust to renames. Also give
5839 equal priority to all LWPs that have had events in non-stop mode.
5840 If reporting a software breakpoint event, unadjust the LWP's PC.
5841 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5842 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5843 Adjust.
5844 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5845 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5846 (linux_stopped_by_watchpoint): Adjust.
5847 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5848 * linux-low.h (enum lwp_stop_reason): New.
5849 (struct lwp_info) <stop_pc>: Adjust comment.
5850 <stopped_by_watchpoint>: Delete field.
5851 <stop_reason>: New field.
5852 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5853 * mem-break.c (software_breakpoint_inserted_here)
5854 (hardware_breakpoint_inserted_here): New function.
5855 * mem-break.h (software_breakpoint_inserted_here)
5856 (hardware_breakpoint_inserted_here): Declare.
5857 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5858 (cancel_breakpoints): Delete.
5859 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5860 (upload_fast_traceframes): Remove references to
5861 cancel_breakpoints.
5862
a33e3959
PA
58632015-01-09 Pedro Alves <palves@redhat.com>
5864
5865 * thread-db.c (find_new_threads_callback): Ignore thread if the
5866 kernel thread ID is -1.
5867
8784d563
PA
58682015-01-09 Pedro Alves <palves@redhat.com>
5869
5870 * linux-low.c (linux_attach_fail_reason_string): Move to
5871 nat/linux-ptrace.c, and rename.
5872 (linux_attach_lwp): Update comment.
5873 (attach_proc_task_lwp_callback): New function.
5874 (linux_attach): Adjust to rename and use
5875 linux_proc_attach_tgid_threads.
5876 (linux_attach_fail_reason_string): Delete declaration.
5877
76f2b779
JB
58782015-01-01 Joel Brobecker <brobecker@adacore.com>
5879
5880 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5881 * server.c (gdbserver_version): Likewise.
5882
fafcc06a
SDJ
58832014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5884
5885 * remote-utils.c: Include ctype.h.
5886 (input_interrupt): Explicitly handle the case when the char
5887 received is the NUL byte. Improve the printing of non-ASCII
5888 characters.
5889
beed38b8
JB
58902014-12-16 Joel Brobecker <brobecker@adacore.com>
5891
5892 * linux-low.c (linux_low_filter_event): Update call to
5893 linux_enable_event_reporting following the addition of
5894 a new parameter to that function.
5895
bf330350
CU
58962014-12-16 Catalin Udma <catalin.udma@freescale.com>
5897
5898 PR server/17457
5899 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5900 (AARCH64_FPCR_REGNO): Likewise.
5901 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5902 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5903 (aarch64_store_fpregset): Likewise.
5904
5227d625
JB
59052014-12-15 Joel Brobecker <brobecker@adacore.com>
5906
5907 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5908 Remove FIXME comment about assumption about N.
5909
f93b65a0
JB
59102014-12-13 Joel Brobecker <brobecker@adacore.com>
5911
5912 * configure.ac: If large-file support is disabled in GDBserver,
5913 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5914 * configure: Regenerate.
5915
e5a9158d
AA
59162014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5917
5918 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5919 warning upon ENODATA from ptrace.
5920 * linux-s390-low.c (s390_store_tdb): New.
5921 (s390_regsets): Add regset for NT_S390_TDB.
5922
feea5f36
AA
59232014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5924
5925 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5926 without a fill_function.
5927 * linux-s390-low.c (s390_fill_last_break): Remove.
5928 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5929 (s390_arch_setup): Use regset's size instead of fill_function for
5930 loop end condition.
5931
098dbe61
AA
59322014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5933
5934 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5935 the regset's store function when ptrace returned an error.
5936 * regcache.c (get_thread_regcache): Invalidate register cache
5937 before fetching inferior's registers.
5938
28eef672
AA
59392014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5940
5941 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5942 while-loop as for-loop.
5943 (regsets_store_inferior_registers): Likewise.
5944
bdca27a2
YQ
59452014-11-28 Yao Qi <yao@codesourcery.com>
5946
5947 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5948 * config.in, configure: Re-generate.
5949 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5950 is defined.
5951
9c232dda
YQ
59522014-11-21 Yao Qi <yao@codesourcery.com>
5953
5954 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5955 (AC_CHECK_HEADERS): Remove malloc.h.
5956 * configure: Re-generated.
5957 * config.in: Re-generated.
5958 * server.h: Don't include alloca.h and malloc.h.
5959 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5960 Don't include malloc.h.
5961
43968415
JB
59622014-11-17 Joel Brobecker <brobecker@adacore.com>
5963
5964 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5965 corresponding ERRNO check in same block.
5966
40e91bc7
PA
59672014-11-12 Pedro Alves <palves@redhat.com>
5968
5969 * server.c (cont_thread): Update comment.
5970 (start_inferior, attach_inferior): No longer clear cont_thread.
5971 (handle_v_cont): No longer set cont_thread.
5972 (captured_main): Clear cont_thread each time a GDB connects.
5973
c2c118cf
PA
59742014-11-12 Pedro Alves <palves@redhat.com>
5975
5976 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5977 thread, and don't resume all threads if the Hc thread has exited.
5978
78708b7c
PA
59792014-11-12 Pedro Alves <palves@redhat.com>
5980
5981 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5982 the process group instead of to a specific LWP.
5983
a2abc7de
PA
59842014-10-15 Pedro Alves <palves@redhat.com>
5985
5986 PR server/17487
5987 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5988 parameter.
5989 (arm_set_thread_context): Delete.
5990 (the_low_target): Adjust.
5991 * win32-i386-low.c (debug_registers_changed)
5992 (debug_registers_used): Delete.
5993 (update_debug_registers_callback): New function.
5994 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5995 needing to update their debug registers.
5996 (win32_get_current_dr): New function.
5997 (x86_dr_low_get_addr, x86_dr_low_get_control)
5998 (x86_dr_low_get_status): Fetch the debug register from the thread
5999 record's context.
6000 (i386_initial_stuff): Adjust.
6001 (i386_get_thread_context): Remove current_event parameter. Don't
6002 clear debug_registers_changed nor copy DR values to
6003 debug_reg_state.
6004 (i386_set_thread_context): Delete.
6005 (i386_prepare_to_resume): New function.
6006 (i386_thread_added): Mark the thread as needing to update irs
6007 debug registers.
6008 (the_low_target): Remove i386_set_thread_context and install
6009 i386_prepare_to_resume.
6010 * win32-low.c (win32_get_thread_context): Adjust.
6011 (win32_set_thread_context): Use SetThreadContext
6012 directly.
6013 (win32_prepare_to_resume): New function.
6014 (win32_require_context): New function, factored out from ...
6015 (thread_rec): ... this.
6016 (continue_one_thread): Call win32_prepare_to_resume on each thread
6017 we're about to continue.
6018 (win32_resume): Call win32_prepare_to_resume on the event thread.
6019 * win32-low.h (struct win32_thread_info)
6020 <debug_registers_changed>: New field.
6021 (struct win32_target_ops): Change prototype of set_thread_context,
6022 delete set_thread_context and add prepare_to_resume.
6023 (win32_require_context): New declaration.
6024
a442d071
GB
60252014-10-08 Gary Benson <gbenson@redhat.com>
6026
6027 * server.h: Do not include common-exceptions.h.
6028
6f1947e8
GB
60292014-10-08 Gary Benson <gbenson@redhat.com>
6030
6031 * server.h: Do not include cleanups.h.
6032
63b434a4
JH
60332014-09-30 James Hogan <james.hogan@imgtec.com>
6034
6035 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6036 mips64-dsp-linux.c.
6037
c4d9ceb6
YQ
60382014-09-23 Yao Qi <yao@codesourcery.com>
6039
6040 * linux-low.c (lp_status_maybe_breakpoint): New function.
6041 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6042 (count_events_callback): Likewise.
6043 (select_event_lwp_callback): Likewise.
6044 (cancel_breakpoints_callback): Likewise.
6045
89a5711c
DB
60462014-09-19 Don Breazeal <donb@codesourcery.com>
6047
6048 * linux-low.c (handle_extended_wait): Call
6049 linux_ptrace_get_extended_event.
6050 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6051 linux_is_extended_waitstatus.
6052
bffc0964
JB
60532014-09-16 Joel Brobecker <brobecker@adacore.com>
6054
6055 * Makefile.in (CPPFLAGS): Define.
6056 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6057 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6058
0bfdf32f
GB
60592014-09-16 Gary Benson <gbenson@redhat.com>
6060
6061 * inferiors.h (current_inferior): Renamed as...
6062 (current_thread): New variable. All uses updated.
6063 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6064 (maybe_move_out_of_jump_pad): Likewise.
6065 (cancel_breakpoint): Likewise.
6066 (linux_low_filter_event): Likewise.
6067 (wait_for_sigstop): Likewise.
6068 (linux_resume_one_lwp): Likewise.
6069 (need_step_over_p): Likewise.
6070 (start_step_over): Likewise.
6071 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6072 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6073 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6074 and save_inferior as saved_thread.
6075 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6076 saved_thread.
6077 (regcache_invalidate_thread): Likewise.
6078 * remote-utils.c (prepare_resume_reply): Likewise.
6079 * thread-db.c (thread_db_get_tls_address): Likewise.
6080 (disable_thread_event_reporting): Likewise.
6081 (remove_thread_event_breakpoints): Likewise.
6082 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6083 as saved_thread.
6084 * target.h (set_desired_inferior): Renamed as...
6085 (set_desired_thread): New declaration. All uses updated.
6086 * server.c (myresume): Updated comment to reference thread instead
6087 of inferior.
6088 (handle_serial_event): Likewise.
6089 (handle_target_event): Likewise.
6090
361c8ade
GB
60912014-09-12 Tom Tromey <tromey@redhat.com>
6092 Gary Benson <gbenson@redhat.com>
6093
6094 * regcache.h: Include common-regcache.h.
6095 (regcache_read_pc): Don't declare.
6096 * regcache.c (get_thread_regcache_for_ptid): New function.
6097
bd9269f7
GB
60982014-09-11 Tom Tromey <tromey@redhat.com>
6099 Gary Benson <gbenson@redhat.com>
6100
6101 * symbol.c: New file.
6102 * Makefile.in (SFILES): Add symbol.c.
6103 (OBS): Add symbol.o.
6104
f8c1d06b
GB
61052014-09-11 Gary Benson <gbenson@redhat.com>
6106
6107 * target.c (target_stop_ptid, target_continue_ptid): New
6108 functions.
6109
721ec300
GB
61102014-09-11 Tom Tromey <tromey@redhat.com>
6111 Gary Benson <gbenson@redhat.com>
6112
6113 * target.h: Include target/target.h.
6114 * target.c (target_read_memory, target_read_uint32)
6115 (target_write_memory): New functions.
6116
c5e92cca
GB
61172014-09-11 Gary Benson <gbenson@redhat.com>
6118
6119 * server.h (debug_hw_points): Don't declare.
6120 * server.c (debug_hw_points): Don't define. Replace all uses
6121 with show_debug_regs.
6122 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6123 all uses with show_debug_regs.
6124
2e4bb98a
EBM
61252014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6126
6127 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6128 endianness into account.
6129 (ppc_supply_ptrace_register): Likewise.
6130
ac740bc7
JH
61312014-09-03 James Hogan <james.hogan@imgtec.com>
6132
6133 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6134 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6135
97ea6506
GB
61362014-09-03 Gary Benson <gbenson@redhat.com>
6137
6138 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6139 ALL_DEBUG_ADDRESS_REGISTERS.
6140
df7e5265
GB
61412014-09-02 Gary Benson <gbenson@redhat.com>
6142
6143 * i386-low.h: Renamed as...
6144 * x86-low.h: New file. All type, function and variable name
6145 prefixes changed from "i386_" to "x86_". All references updated.
6146 * i386-low.c: Renamed as...
6147 * x86-low.c: New file. All type, function and variable name
6148 prefixes changed from "i386_" to "x86_". All references updated.
6149
ed859da7
GB
61502014-09-02 Gary Benson <gbenson@redhat.com>
6151
6152 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6153 (x86_linux_new_thread): Likewise.
6154
860789c7
GB
61552014-08-29 Gary Benson <gbenson@redhat.com>
6156
6157 * server.h (setjmp.h): Do not include.
6158 (toplevel): Do not declare.
6159 (common-exceptions.h): Include.
6160 (cleanups.h): Likewise.
6161 * server.c (toplevel): Do not define.
6162 (exit_code): New static global.
6163 (detach_or_kill_for_exit_cleanup): New function.
6164 (main): New function. Original main renamed to...
6165 (captured_main): New function.
6166 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6167
ff55e1b5
GB
61682014-08-29 Gary Benson <gbenson@redhat.com>
6169
6170 * Makefile.in (SFILES): Add common/common-exceptions.c.
6171 (OBS): Add common-exceptions.o.
6172 (common-exceptions.o): New rule.
6173 * utils.c (prepare_to_throw_exception): New function.
6174
e9bcb658
GB
61752014-08-29 Gary Benson <gbenson@redhat.com>
6176
6177 * config.in: Regenerate.
6178 * configure: Likewise.
6179
e3180625
GB
61802014-08-29 Gary Benson <gbenson@redhat.com>
6181
6182 * Makefile.in (SFILES): Add common/cleanups.c.
6183 (OBS): cleanups.o.
6184 (cleanups.o): New rule.
6185
e3d6ba5d
GB
61862014-08-29 Gary Benson <gbenson@redhat.com>
6187
6188 * utils.c (internal_vwarning): New function.
6189
7096e886
GB
61902014-08-28 Gary Benson <gbenson@redhat.com>
6191
6192 * utils.h (fatal): Remove declaration.
6193 * utils.c (fatal): Remove function.
6194
14ce3192
GB
61952014-08-28 Gary Benson <gbenson@redhat.com>
6196
6197 * tracepoint.c (gdb_agent_init): Replace fatal with
6198 perror_with_name.
6199 (initialize_tracepoint): Likewise.
6200
50278d59
GB
62012014-08-28 Gary Benson <gbenson@redhat.com>
6202
6203 * remote-utils.c (remote_prepare): Replace fatal with error.
6204
aa96c426
GB
62052014-08-28 Gary Benson <gbenson@redhat.com>
6206
6207 * linux-low.c (linux_async): Replace fatal with warning.
6208 Tidy up and return.
6209 (linux_start_non_stop): Return -1 if linux_async failed.
6210
f7160e97
GB
62112014-08-28 Gary Benson <gbenson@redhat.com>
6212
6213 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6214 gdb_assert.
6215 (i386_dr_low_get_addr): Remove vague comment.
6216 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6217 gdb_assert.
6218
38e08fca
GB
62192014-08-28 Gary Benson <gbenson@redhat.com>
6220
6221 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6222 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6223 internal_error.
6224 (linux_resume_one_lwp): Likewise.
6225 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6226 gdb_assert.
6227 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6228 with internal_error.
6229 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6230 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6231 (find_register_by_name): Replace fatal with internal_error.
6232 (find_regno): Likewise.
6233 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6234 * thread-db.c (thread_db_create_event): Likewise.
6235 (thread_db_load_search): Likewise.
6236 (try_thread_db_load_1): Likewise.
6237 * tracepoint.c (get_jump_space_head): Replace fatal with
6238 internal_error.
6239 (claim_trampoline_space): Likewise.
6240 (have_fast_tracepoint_trampoline_buffer): Likewise.
6241 (cmd_qtstart): Likewise.
6242 (stop_tracing): Likewise.
6243 (fast_tracepoint_collecting): Likewise.
6244 (target_malloc): Likewise.
6245 (download_tracepoint): Likewise.
6246 (download_trace_state_variables): Replace check with gdb_assert.
6247 (upload_fast_traceframes): Replace fatal with internal_error.
6248
34abf635
GB
62492014-08-19 Tom Tromey <tromey@redhat.com>
6250 Gary Benson <gbenson@redhat.com>
6251
6252 * Makefile.in (SFILES): Add common/common-debug.c.
6253 (OBS): Add common-debug.o.
6254 (common-debug.o): New rule.
6255 * debug.h (debug_printf): Don't declare.
6256 * debug.c (debug_printf): Renamed and rewritten as...
6257 (debug_vprintf): New function.
6258
f6e94d78
GB
62592014-08-19 Gary Benson <gbenson@redhat.com>
6260
6261 * utils.h: Do not include print-utils.h.
6262
9239eeab
GB
62632014-08-19 Tom Tromey <tromey@redhat.com>
6264 Gary Benson <gbenson@redhat.com>
6265
6266 * server.h: Add static assertion.
6267 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6268
ef87c8bb
GB
62692014-08-19 Tom Tromey <tromey@redhat.com>
6270 Gary Benson <gbenson@redhat.com>
6271
6272 * Makefile.in (SFILES): Add common/errors.c.
6273 (OBS): Add errors.o.
6274 (IPA_OBS): Add errors-ipa.o.
6275 (errors.o): New rule.
6276 (errors-ipa.o): Likewise.
6277 * utils.h (perror_with_name, error, warning): Don't declare.
6278 * utils.c (warning): Renamed and rewritten as...
6279 (vwarning): New function.
6280 (error): Renamed and rewritten as...
6281 (verror): New function.
6282 (internal_error): Renamed and rewritten as...
6283 (internal_verror): New function.
6284
bb974a24
GB
62852014-08-07 Gary Benson <gbenson@redhat.com>
6286
6287 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6288 * configure: Regenerate.
6289 * config.in: Likewise.
6290 * server.h: Do not include errno.h.
6291 * event-loop.c: Likewise.
6292 * hostio-errno.c: Likewise.
6293 * linux-low.c: Likewise.
6294 * remote-utils.c: Likewise.
6295 * spu-low.c: Likewise.
6296 * utils.c: Likewise.
6297 * gdbreplay.c: Unconditionally include errno.h.
6298
6d3d12eb
GB
62992014-08-07 Gary Benson <gbenson@redhat.com>
6300
6301 * server.h: Do not include string.h.
6302 * event-loop.c: Likewise.
6303 * linux-low.c: Likewise.
6304 * regcache.c: Likewise.
6305 * remote-utils.c: Likewise.
6306 * spu-low.c: Likewise.
6307 * utils.c: Likewise.
6308
dccbb609
GB
63092014-08-07 Gary Benson <gbenson@redhat.com>
6310
6311 * server.h: Do not include gdb_assert.h.
6312
e76df0d0
GB
63132014-08-07 Gary Benson <gbenson@redhat.com>
6314
6315 * server.h: Do not include common-utils.h.
6316
4cb9c816
GB
63172014-08-07 Gary Benson <gbenson@redhat.com>
6318
6319 * server.h: Do not include ptid.h.
6320 * notif.h: Likewise.
6321
3995eeee
GB
63222014-08-07 Gary Benson <gbenson@redhat.com>
6323
6324 * server.h: Do not include gdb_locale.h.
6325
cb9f1a9b
GB
63262014-08-07 Gary Benson <gbenson@redhat.com>
6327
6328 * server.h: Do not include gdb/signals.h.
6329 * win32-low.c: Likewise.
6330
a5fceff8
GB
63312014-08-07 Gary Benson <gbenson@redhat.com>
6332
6333 * server.h: Do not include pathmax.h.
6334
b9391142
GB
63352014-08-07 Gary Benson <gbenson@redhat.com>
6336
6337 * server.h: Do not include libiberty.h.
6338 * linux-bfin-low.c: Likewise.
6339
0e443c87
GB
63402014-08-07 Gary Benson <gbenson@redhat.com>
6341
6342 * server.h: Do not include ansidecl.h.
6343
8ebb3f56
GB
63442014-08-07 Gary Benson <gbenson@redhat.com>
6345
6346 * linux-x86-low.c: Do not include stddef.h.
6347 * lynx-ppc-low.c: Likewise.
6348 * tracepoint.c: Likewise.
6349
8980bdf6
GB
63502014-08-07 Gary Benson <gbenson@redhat.com>
6351
6352 * server.h: Do not include stdarg.h.
6353 * nto-low.c: Likewise.
6354
d7096f71
GB
63552014-08-07 Gary Benson <gbenson@redhat.com>
6356
6357 * server.h: Do not include stdlib.h.
6358 * inferiors.c: Likewise.
6359 * linux-low.c: Likewise.
6360 * regcache.c: Likewise.
6361 * spu-low.c: Likewise.
6362 * tracepoint.c: Likewise.
6363 * utils.c: Likewise.
6364
d02f550d
GB
63652014-08-07 Gary Benson <gbenson@redhat.com>
6366
6367 * server.h: Do not include stdio.h.
6368 * linux-low.c: Likewise.
6369 * remote-utils.c: Likewise.
6370 * spu-low.c: Likewise.
6371 * utils.c: Likewise.
6372 * wincecompat.c: Likewise.
6373
87f6c4e3
GB
63742014-08-06 Gary Benson <gbenson@redhat.com>
6375
6376 * regcache.c (init_register_cache): Move conditionals inside if.
6377
7089dca4
GB
63782014-08-06 Gary Benson <gbenson@redhat.com>
6379
6380 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6381
462f517e
GB
63822014-07-31 Gary Benson <gbenson@redhat.com>
6383
6384 * ax.h: Do not include server.h.
6385 * gdbthread.h: Likewise.
6386 * lynx-low.h: Likewise.
6387 * notif.h: Likewise.
6388
976411d6
GB
63892014-07-30 Gary Benson <gbenson@redhat.com>
6390
6391 * server.h: Include common-defs.h.
6392 Do not include config.h or build-gnulib-gdbserver/config.h.
6393
d41f6d8e
GB
63942014-07-30 Gary Benson <gbenson@redhat.com>
6395
6396 * hostio-errno.c: Move server.h to top of includes list.
6397 * inferiors.c: Likewise.
6398 * linux-x86-low.c: Likewise.
6399 * notif.c: Include server.h.
6400
314c6a35
TT
64012014-07-24 Tom Tromey <tromey@redhat.com>
6402 Gary Benson <gbenson@redhat.com>
6403
6404 * server.h (CORE_ADDR): Now unsigned.
6405
69ff6be5
PA
64062014-07-16 Pedro Alves <palves@redhat.com>
6407
6408 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6409
ce9e3fe7
PA
64102014-07-15 Pedro Alves <palves@redhat.com>
6411
6412 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6413 copy.
6414
e76126e8
PA
64152014-07-11 Pedro Alves <palves@redhat.com>
6416
6417 * linux-low.c (kill_wait_lwp): New function, based on
6418 kill_one_lwp_callback, but use my_waitpid directly.
6419 (kill_one_lwp_callback, linux_kill): Use it.
6420
8e9db26e
PA
64212014-06-23 Pedro Alves <palves@redhat.com>
6422
6423 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6424 before setting DR0..DR3.
6425
698b3e08
GB
64262014-06-20 Gary Benson <gbenson@redhat.com>
6427
6428 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6429 * configure: Regenerated.
6430 * config.in: Likewise.
6431
125f8a3d
GB
64322014-06-20 Gary Benson <gbenson@redhat.com>
6433
6434 * Makefile.in (SFILES): Update locations for files moved
6435 from common to nat.
6436 (object file files): Reordered.
6437
42995dbd
GB
64382014-06-20 Gary Benson <gbenson@redhat.com>
6439
6440 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6441 (i386_dr_low_set_addr): Likewise.
6442 (i386_dr_low_get_addr): Likewise.
6443 (i386_dr_low_can_set_control): Likewise.
6444 (i386_dr_low_set_control): Likewise.
6445 (i386_dr_low_get_control): Likewise.
6446 (i386_dr_low_get_status): Likewise.
6447 (i386_get_debug_register_length): Likewise.
6448 * linux-x86-low.c (i386_dr_low_set_addr):
6449 Changed signature. Made static.
6450 (i386_dr_low_get_addr): Likewise.
6451 (i386_dr_low_set_control): Likewise.
6452 (i386_dr_low_get_control): Likewise.
6453 (i386_dr_low_get_status): Likewise.
6454 (i386_dr_low): New global variable.
6455 * win32-i386-low.c (i386_dr_low_set_addr):
6456 Changed signature. Made static.
6457 (i386_dr_low_get_addr): Likewise.
6458 (i386_dr_low_set_control): Likewise.
6459 (i386_dr_low_get_control): Likewise.
6460 (i386_dr_low_get_status): Likewise.
6461 (i386_dr_low): New global variable.
6462
e1d2394b
MS
64632014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6464
6465 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6466 * Makefile.in (AR, AR_FLAGS): Define.
6467 * configure: Regenerate.
6468
3a8ee006
GB
64692014-06-19 Gary Benson <gbenson@redhat.com>
6470
6471 * Makefile.in (i386-dregs.o): New rule.
6472 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6473 * i386-low.c (target.h): Remove include.
6474 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6475 (DR_CONTROL_SHIFT): Likewise.
6476 (DR_CONTROL_SIZE): Likewise.
6477 (DR_RW_EXECUTE): Likewise.
6478 (DR_RW_WRITE): Likewise.
6479 (DR_RW_READ): Likewise.
6480 (DR_RW_IORW): Likewise.
6481 (DR_LEN_1): Likewise.
6482 (DR_LEN_2): Likewise.
6483 (DR_LEN_4): Likewise.
6484 (DR_LEN_8): Likewise.
6485 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6486 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6487 (DR_ENABLE_SIZE): Likewise.
6488 (DR_LOCAL_SLOWDOWN): Likewise.
6489 (DR_GLOBAL_SLOWDOWN): Likewise.
6490 (DR_CONTROL_RESERVED): Likewise.
6491 (I386_DR_CONTROL_MASK): Likewise.
6492 (I386_DR_VACANT): Likewise.
6493 (I386_DR_LOCAL_ENABLE): Likewise.
6494 (I386_DR_GLOBAL_ENABLE): Likewise.
6495 (I386_DR_DISABLE): Likewise.
6496 (I386_DR_SET_RW_LEN): Likewise.
6497 (I386_DR_GET_RW_LEN): Likewise.
6498 (I386_DR_WATCH_HIT): Likewise.
6499 (i386_wp_op_t): Likewise.
6500 (i386_show_dr): Likewise.
6501 (i386_length_and_rw_bits): Likewise.
6502 (i386_insert_aligned_watchpoint): Likewise.
6503 (i386_remove_aligned_watchpoint): Likewise.
6504 (i386_handle_nonaligned_watchpoint): Likewise.
6505 i386_update_inferior_debug_regs(): Likewise.
6506 (i386_dr_insert_watchpoint): Likewise.
6507 (i386_dr_remove_watchpoint): Likewise.
6508 (i386_dr_region_ok_for_watchpoint): Likewise.
6509 (i386_dr_stopped_data_address): Likewise.
6510 (i386_dr_stopped_by_watchpoint): Likewise.
6511
8f26655c
GB
65122014-06-19 Gary Benson <gbenson@redhat.com>
6513
6514 * i386-low.c (i386_dr_show): Renamed to
6515 i386_show_dr and made static. All uses updated.
6516 (i386_dr_length_and_rw_bits): Renamed to
6517 i386_length_and_rw_bits and made static.
6518 All uses updated.
6519 (i386_dr_insert_aligned_watchpoint): Renamed to
6520 i386_insert_aligned_watchpoint and made static.
6521 All uses updated.
6522 (i386_dr_remove_aligned_watchpoint): Renamed to
6523 i386_remove_aligned_watchpoint and made static.
6524 All uses updated.
6525 (i386_dr_update_inferior_debug_regs): Renamed to
6526 i386_update_inferior_debug_regs and made static.
6527 All uses updated.
6528
b9228891
GB
65292014-06-18 Gary Benson <gbenson@redhat.com>
6530
5171def3
GB
6531 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6532 (i386_dr_low_can_set_control): Likewise.
6533 (i386_get_debug_register_length): Likewise.
6534 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6535 (i386_dr_low_can_set_control): Likewise.
6536 (i386_get_debug_register_length): Likewise.
6537
65382014-06-17 Gary Benson <gbenson@redhat.com>
6539
b9228891
GB
6540 * i386-low.h (i386-dregs.h): New include.
6541 (DR_FIRSTADDR): Now in i386-dregs.h.
6542 (DR_LASTADDR): Likewise.
6543 (DR_NADDR): Likewise.
6544 (DR_STATUS): Likewise.
6545 (DR_CONTROL): Likewise.
6546 (i386_debug_reg_state): Likewise.
6547 (i386_dr_insert_watchpoint): Likewise.
6548 (i386_dr_remove_watchpoint): Likewise.
6549 (i386_dr_region_ok_for_watchpoint): Likewise.
6550 (i386_dr_stopped_data_address): Likewise.
6551 (i386_dr_stopped_by_watchpoint): Likewise.
6552 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6553
4be83cc2
GB
65542014-06-18 Gary Benson <gbenson@redhat.com>
6555
6556 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6557 i386_dr_insert_watchpoint.
6558 (i386_low_remove_watchpoint): Renamed to
6559 i386_dr_remove_watchpoint.
6560 (i386_low_region_ok_for_watchpoint): Renamed to
6561 i386_dr_region_ok_for_watchpoint.
6562 (i386_low_stopped_data_address): Renamed to
6563 i386_dr_stopped_data_address.
6564 (i386_low_stopped_by_watchpoint): Renamed to
6565 i386_dr_stopped_by_watchpoint.
6566 * i386-low.c (i386_show_dr): Renamed to
6567 i386_dr_show and made nonstatic. All uses updated.
6568 (i386_length_and_rw_bits): Renamed to
6569 i386_dr_length_and_rw_bits and made nonstatic.
6570 All uses updated.
6571 (i386_insert_aligned_watchpoint): Renamed to
6572 i386_dr_insert_aligned_watchpoint and made nonstatic.
6573 All uses updated.
6574 (i386_remove_aligned_watchpoint): Renamed to
6575 i386_dr_remove_aligned_watchpoint and made nonstatic.
6576 All uses updated.
6577 (i386_update_inferior_debug_regs): Renamed to
6578 i386_dr_update_inferior_debug_regs and made nonstatic.
6579 All uses updated.
6580 (i386_low_insert_watchpoint): Renamed to
6581 i386_dr_insert_watchpoint. All uses updated.
6582 (i386_low_remove_watchpoint): Renamed to
6583 i386_dr_remove_watchpoint. All uses updated.
6584 (i386_low_region_ok_for_watchpoint): Renamed to
6585 i386_dr_region_ok_for_watchpoint. All uses updated.
6586 (i386_low_stopped_data_address): Renamed to
6587 i386_dr_stopped_data_address. All uses updated.
6588 (i386_low_stopped_by_watchpoint): Renamed to
6589 i386_dr_stopped_by_watchpoint. All uses updated.
6590
131aa0d4
GB
65912014-06-18 Gary Benson <gbenson@redhat.com>
6592
6593 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6594 (i386_dr_low_can_set_control): Likewise.
6595 (i386_insert_aligned_watchpoint): New check.
6596
d9305f7f
GB
65972014-06-18 Gary Benson <gbenson@redhat.com>
6598
6599 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6600 Renamed to state.
6601
e927c9fc
GB
66022014-06-18 Gary Benson <gbenson@redhat.com>
6603
6604 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6605 instead of fatal and error.
6606 (i386_handle_nonaligned_watchpoint): Likewise.
6607
1b6d4134
GB
66082014-06-18 Gary Benson <gbenson@redhat.com>
6609
6610 * i386-low.c (i386_get_debug_register_length): New macro.
6611 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6612 (i386_show_dr): Use debug_printf instead of fprintf. Use
6613 phex to format values.
6614
6e62758f
GB
66152014-06-18 Gary Benson <gbenson@redhat.com>
6616
6617 * i386-low.h: Comment changes.
6618 * i386-low.c: Likewise.
6619
fc6e2f03
GB
66202014-06-18 Gary Benson <gbenson@redhat.com>
6621
6622 * i386-low.c: Whitespace changes.
6623
f9d1eeed
TT
66242014-06-12 Tom Tromey <tromey@redhat.com>
6625
6626 * utils.c (freeargv): Remove.
6627
0b04e523
TT
66282014-06-12 Tom Tromey <tromey@redhat.com>
6629
6630 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6631 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6632 (parse_debug_format_options): Likewise.
6633 (gdbserver_usage): Likewise.
6634 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6635 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6636 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6637 against libiberty.
6638 ($(LIBGNU)): Depend on libiberty.
6639 (all-lib): Recurse into all subdirs.
6640 (install-only): Invoke "install" target in subdirs.
6641 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6642 targets.
6643 * configure: Rebuild.
6644 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6645 for vasprintf, vsnprintf, or gettimeofday.
6646 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6647 srv_tgtobj.
6648
270c9937
JB
66492014-06-05 Joel Brobecker <brobecker@adacore.com>
6650
6651 * development.sh: Delete.
6652 * Makefile.in (config.status): Adjust dependency on development.sh.
6653 * configure.ac: Adjust development.sh source call.
6654 * configure: Regenerate.
6655
0a261ed8
PA
66562014-06-02 Pedro Alves <palves@redhat.com>
6657
6658 * ax.c (gdb_free_agent_expr): New function.
6659 * ax.h (gdb_free_agent_expr): New declaration.
6660 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6661 list.
6662 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6663 static.
6664 (clear_breakpoint_conditions_and_commands): New function.
6665 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6666 (clear_breakpoint_conditions_and_commands): New declaration.
6667
e9dae05e
RR
66682014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6669
6670 * linux-aarch64-low.c (asm/ptrace.h): Include.
6671
5876f503
JK
66722014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6673
6674 Fix TLS access for -static -pthread.
6675 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6676 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6677 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6678
802e8e6d
PA
66792014-05-20 Pedro Alves <palves@redhat.com>
6680
6681 * linux-aarch64-low.c (aarch64_insert_point)
6682 (aarch64_remove_point): No longer check whether the type is
6683 supported here. Adjust to new interface.
6684 (the_low_target): Install aarch64_supports_z_point_type as
6685 supports_z_point_type method.
6686 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6687 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6688 instead of a Z packet char. Adjust.
6689 (arm_supports_z_point_type): New function.
6690 (arm_insert_point, arm_remove_point): Adjust to new interface.
6691 (the_low_target): Install arm_supports_z_point_type.
6692 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6693 (cris_insert_point, cris_remove_point): Adjust to new interface.
6694 Don't check whether the type is supported here.
6695 (the_low_target): Install cris_supports_z_point_type.
6696 * linux-low.c (linux_supports_z_point_type): New function.
6697 (linux_insert_point, linux_remove_point): Adjust to new interface.
6698 * linux-low.h (struct linux_target_ops) <insert_point,
6699 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6700 raw_breakpoint pointer parameter.
6701 <supports_z_point_type>: New method.
6702 * linux-mips-low.c (mips_supports_z_point_type): New function.
6703 (mips_insert_point, mips_remove_point): Adjust to new interface.
6704 Use mips_supports_z_point_type.
6705 (the_low_target): Install mips_supports_z_point_type.
6706 * linux-ppc-low.c (the_low_target): Install NULL as
6707 supports_z_point_type method.
6708 * linux-s390-low.c (the_low_target): Install NULL as
6709 supports_z_point_type method.
6710 * linux-sparc-low.c (the_low_target): Install NULL as
6711 supports_z_point_type method.
6712 * linux-x86-low.c (x86_supports_z_point_type): New function.
6713 (x86_insert_point): Adjust to new insert_point interface. Use
6714 insert_memory_breakpoint. Adjust to new
6715 i386_low_insert_watchpoint interface.
6716 (x86_remove_point): Adjust to remove_point interface. Use
6717 remove_memory_breakpoint. Adjust to new
6718 i386_low_remove_watchpoint interface.
6719 (the_low_target): Install x86_supports_z_point_type.
6720 * lynx-low.c (lynx_target_ops): Install NULL as
6721 supports_z_point_type callback.
6722 * nto-low.c (nto_supports_z_point_type): New.
6723 (nto_insert_point, nto_remove_point): Adjust to new interface.
6724 (nto_target_ops): Install nto_supports_z_point_type.
6725 * mem-break.c: Adjust intro comment.
6726 (struct raw_breakpoint) <raw_type, size>: New fields.
6727 <inserted>: Update comment.
6728 <shlib_disabled>: Delete field.
6729 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6730 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6731 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6732 (raw_bkpt_type_to_target_hw_bp_type): New function.
6733 (find_enabled_raw_code_breakpoint_at): New function.
6734 (find_raw_breakpoint_at): New type and size parameters. Use them.
6735 (insert_memory_breakpoint): New function, based off
6736 set_raw_breakpoint_at.
6737 (remove_memory_breakpoint): New function.
6738 (set_raw_breakpoint_at): Reimplement.
6739 (set_breakpoint): New, based on set_breakpoint_at.
6740 (set_breakpoint_at): Reimplement.
6741 (delete_raw_breakpoint): Go through the_target->remove_point
6742 instead of assuming memory breakpoints.
6743 (find_gdb_breakpoint_at): Delete.
6744 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6745 (find_gdb_breakpoint): New function.
6746 (set_gdb_breakpoint_at): Delete.
6747 (z_type_supported): New function.
6748 (set_gdb_breakpoint_1): New function, loosely based off
6749 set_gdb_breakpoint_at.
6750 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6751 (delete_gdb_breakpoint_at): Delete.
6752 (delete_gdb_breakpoint_1): New function, loosely based off
6753 delete_gdb_breakpoint_at.
6754 (delete_gdb_breakpoint): New function.
6755 (clear_gdb_breakpoint_conditions): Rename to ...
6756 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6757 breakpoint.
6758 (add_condition_to_breakpoint): Make static.
6759 (add_breakpoint_condition): Take a struct breakpoint pointer
6760 instead of an address. Adjust.
6761 (gdb_condition_true_at_breakpoint): Rename to ...
6762 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6763 z_type parameter.
6764 (gdb_condition_true_at_breakpoint): Reimplement.
6765 (add_breakpoint_commands): Take a struct breakpoint pointer
6766 instead of an address. Adjust.
6767 (gdb_no_commands_at_breakpoint): Rename to ...
6768 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6769 parameter. Return true if no breakpoint was found. Change debug
6770 output.
6771 (gdb_no_commands_at_breakpoint): Reimplement.
6772 (run_breakpoint_commands): Rename to ...
6773 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6774 and change return type to boolean.
6775 (run_breakpoint_commands): New function.
6776 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6777 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6778 breakpoint. Go through the_target->remove_point instead of
6779 assuming memory breakpoint.
6780 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6781 software and hardware breakpoints.
6782 (reinsert_raw_breakpoint): Go through the_target->insert_point
6783 instead of assuming memory breakpoint.
6784 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6785 software and hardware breakpoints.
6786 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6787 Check both software and hardware breakpoints.
6788 (validate_inserted_breakpoint): Assert the breakpoint is a
6789 software breakpoint. Set the inserted flag to -1 instead of
6790 setting shlib_disabled.
6791 (delete_disabled_breakpoints): Adjust.
6792 (validate_breakpoints): Only validate software breakpoints.
6793 Adjust to inserted flag change.
6794 (check_mem_read, check_mem_write): Skip breakpoint types other
6795 than software breakpoints. Adjust to inserted flag change.
6796 * mem-break.h (enum raw_bkpt_type): New enum.
6797 (raw_breakpoint, struct process_info): Forward declare.
6798 (Z_packet_to_target_hw_bp_type): Delete declaration.
6799 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6800 (set_gdb_breakpoint, delete_gdb_breakpoint)
6801 (clear_breakpoint_conditions): New declarations.
6802 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6803 (breakpoint_inserted_here): Update comment.
6804 (add_breakpoint_condition, add_breakpoint_commands): Replace
6805 address parameter with a breakpoint pointer parameter.
6806 (gdb_breakpoint_here): Update comment.
6807 (delete_gdb_breakpoint_at): Delete.
6808 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6809 * server.c (process_point_options): Take a struct breakpoint
6810 pointer instead of an address. Adjust.
6811 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6812 delete_gdb_breakpoint.
6813 * spu-low.c (spu_target_ops): Install NULL as
6814 supports_z_point_type method.
6815 * target.h: Include mem-break.h.
6816 (struct target_ops) <prepare_to_access_memory>: Update comment.
6817 <supports_z_point_type>: New field.
6818 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6819 instead of a char. Also take a raw breakpoint pointer.
6820 * win32-arm-low.c (the_low_target): Install NULL as
6821 supports_z_point_type.
6822 * win32-i386-low.c (i386_supports_z_point_type): New function.
6823 (i386_insert_point, i386_remove_point): Adjust to new interface.
6824 (the_low_target): Install i386_supports_z_point_type.
6825 * win32-low.c (win32_supports_z_point_type): New function.
6826 (win32_insert_point, win32_remove_point): Adjust to new interface.
6827 (win32_target_ops): Install win32_supports_z_point_type.
6828 * win32-low.h (struct win32_target_ops):
6829 <supports_z_point_type>: New method.
6830 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6831 instead of a char. Also take a raw breakpoint pointer.
6832
932539e3
PA
68332014-05-20 Pedro Alves <palves@redhat.com>
6834
6835 * mem-break.h: Include break-common.h.
6836 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6837 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6838 (Z_packet_to_target_hw_bp_type): New declaration.
6839 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6840 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6841 (Z_PACKET_ACCESS_WP): Delete macros.
6842 (Z_packet_to_hw_type): Delete function.
6843 * i386-low.h: Don't include break-common.h here.
6844 (Z_packet_to_hw_type): Delete declaration.
6845 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6846 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6847 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6848 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6849 * linux-aarch64-low.c: Don't include break-common.h here.
6850 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6851 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6852 (Z_packet_to_target_hw_bp_type): Delete function.
6853 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6854 function.
6855 (mips_insert_point, mips_remove_point): Use
6856 Z_packet_to_target_hw_bp_type.
6857
4ff0d3d8
PA
68582014-05-20 Pedro Alves <palves@redhat.com>
6859
6860 * linux-aarch64-low.c: Include break-common.h.
6861 (enum target_point_type): Delete.
6862 (Z_packet_to_point_type): Rename to ...
6863 (Z_packet_to_target_hw_bp_type): ... this, and return a
6864 target_hw_bp_type instead.
6865 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6866 instead of an enum target_point_type.
6867 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6868 breakpoint type.
6869 (aarch64_dr_state_insert_one_point)
6870 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6871 (aarch64_handle_aligned_watchpoint)
6872 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6873 Take an enum target_hw_bp_type instead of an enum
6874 target_point_type.
6875 (aarch64_supports_z_point_type): New function.
6876 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6877 use Z_packet_to_target_hw_bp_type.
6878
786dc519
JB
68792014-05-20 Joel Brobecker <brobecker@adacore.com>
6880
6881 * configure.ac: Only use -Werror by default when DEVELOPMENT
6882 is true.
6883 * configure: Regenerate.
6884
9e0aa64f
JK
68852014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6886
6887 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6888 * linux-x86-low.c (X86_64_USER_REGS): New.
6889 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6890
2b577b92
YQ
68912014-04-28 Yao Qi <yao@codesourcery.com>
6892
6893 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6894 name.
6895
94611da2
PA
68962014-04-25 Pedro Alves <palves@redhat.com>
6897
6898 PR server/16255
6899 * linux-low.c (linux_attach_fail_reason_string): New function.
6900 (linux_attach_lwp): Delete.
6901 (linux_attach_lwp_1): Rename to ...
6902 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6903 argument. Remove "initial" parameter. Return int instead of
6904 void. Don't error or warn here.
6905 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6906 failure to attach to the tgid. Call warning when failing to
6907 attach to an lwp.
6908 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6909 argument. Remove "initial" parameter. Return int instead of
6910 void. Don't error or warn here.
6911 (linux_attach_fail_reason_string): New declaration.
6912 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6913 interface change. Use linux_attach_fail_reason_string.
6914
01f9f808
MS
69152014-04-24 Michael Sturm <michael.sturm@mintel.com>
6916 Walfred Tedeschi <walfred.tedeschi@intel.com>
6917
6918 * Makefile.in: Added rules to handle new files
6919 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6920 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6921 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6922 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6923 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6924 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6925 x32-avx512-linux.o.
6926 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6927 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6928 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6929 i386/x32-avx512.xml.
6930 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6931 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6932 i386/x32-avx512-linux.xml.
6933 * i387-fp.c (num_avx512_k_registers): New constant for number
6934 of K registers.
6935 (num_avx512_zmmh_low_registers): New constant for number of
6936 lower ZMM registers (0-15).
6937 (num_avx512_zmmh_high_registers): New constant for number of
6938 higher ZMM registers (16-31).
6939 (num_avx512_ymmh_registers): New contant for number of higher
6940 YMM registers (ymm16-31 added by avx521 on x86_64).
6941 (num_avx512_xmm_registers): New constant for number of higher
6942 XMM registers (xmm16-31 added by AVX512 on x86_64).
6943 (struct i387_xsave): Add space for AVX512 registers.
6944 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6945 Add code to handle AVX512 registers.
6946 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6947 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6948 prototypei from generated file.
6949 (tdesc_amd64_avx512_linux): Likewise.
6950 (init_registers_x32_avx512_linux): Likewise.
6951 (tdesc_x32_avx512_linux): Likewise.
6952 (init_registers_i386_avx512_linux): Likewise.
6953 (tdesc_i386_avx512_linux): Likewise.
6954 (x86_64_regmap): Add AVX512 registers.
6955 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6956 mask.
6957 (initialize_low_arch): Add code to initialize AVX512 registers.
6958
51aa91f9
PA
69592014-04-23 Pedro Alves <palves@redhat.com>
6960
6961 * mem-break.c (find_gdb_breakpoint_at): Make static.
6962 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6963
a4165e94
PA
69642014-04-23 Pedro Alves <palves@redhat.com>
6965
6966 * i386-low.c: Don't include break-common.h here.
6967 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6968 prototype to take target_hw_bp_type as argument instead of a Z
6969 packet char.
6970 * i386-low.h: Include break-common.h here.
6971 (Z_packet_to_hw_type): Declare.
6972 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6973 prototypes.
6974 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6975 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6976 (x86_remove_point): Convert the packet number to a
6977 target_hw_bp_type before calling i386_low_remove_watchpoint.
6978 * win32-i386-low.c (i386_insert_point): Convert the packet number
6979 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6980 (i386_remove_point): Convert the packet number to a
6981 target_hw_bp_type before calling i386_low_remove_watchpoint.
6982
b8acf843
PA
69832014-04-23 Pedro Alves <palves@redhat.com>
6984
6985 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6986
d708bcd1
PA
69872014-04-10 Pedro Alves <palves@redhat.com>
6988
6989 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6990 Check if the condition or command is NULL before checking if the
6991 breakpoint is known. On success, return true.
6992 * mem-break.h (add_breakpoint_condition): Document return.
6993 (add_breakpoint_commands): Add describing comment.
6994 * server.c (skip_to_semicolon): New function.
6995 (process_point_options): Use it.
6996
2eec7d5b
PA
69972014-04-09 Pedro Alves <palves@redhat.com>
6998
6999 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7000 to lwpid_of.
7001
fa96cb38
PA
70022014-02-27 Pedro Alves <palves@redhat.com>
7003
7004 PR 12702
7005 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7006 macros.
7007 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7008 output.
7009 (last_thread_of_process_p): Take a PID argument instead of a
7010 thread pointer.
7011 (linux_wait_for_lwp): Delete.
7012 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7013 functions.
7014 (linux_low_filter_event): New function, party factored out from
7015 linux_wait_for_event.
7016 (linux_wait_for_event): Rename to ...
7017 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7018 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7019 sigsuspend. Check for zombie leaders.
7020 (linux_wait_for_event): Reimplement as wrapper around
7021 linux_wait_for_event_filtered.
7022 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7023 a normal or signal exit is seen, it's the whole process exiting.
7024 (wait_for_sigstop): No longer a for_each_inferior callback.
7025 Rewrite on top of linux_wait_for_event_filtered.
7026 (stop_all_lwps): Call wait_for_sigstop directly.
7027 * server.c (resume, handle_target_event): Handle
7028 TARGET_WAITKIND_NO_RESUMED.
7029
d763de10
JB
70302014-02-26 Joel Brobecker <brobecker@adacore.com>
7031
7032 * win32-low.c (psapi_get_dll_name,
7033 * win32_CreateToolhelp32Snapshot): Delete.
7034 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7035 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7036 Delete.
7037 (handle_load_dll): Add function description.
7038 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7039
850a0f76
JB
70402014-02-26 Joel Brobecker <brobecker@adacore.com>
7041
7042 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7043 Add comment.
7044 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7045 base address when calling win32_add_one_solib.
7046 (handle_load_dll): Delete local variable load_addr.
7047 Remove 0x1000 offset applied to DLL base address when calling
7048 win32_add_one_solib.
7049 (handle_unload_dll): Add comment.
7050
f25b3fc3
JB
70512014-02-26 Joel Brobecker <brobecker@adacore.com>
7052
7053 * win32-low.c (win32_add_all_dlls): Renames
7054 win32_ensure_ntdll_loaded. Rewrite function documentation.
7055 Adjust implementation to always load all DLLs.
7056 Add 0x1000 offset to DLL base address when calling
7057 win32_add_one_solib.
7058 (child_initialization_done): New static global.
7059 (do_initial_child_stuff): Set child_initialization_done to
7060 zero during child initialization, and 1 after. Replace call
7061 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7062 Add comment.
7063 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7064 (handle_unload_dll): Add function documentation.
7065 (get_child_debug_event): Ignore load and unload DLL events
7066 during child initialization.
7067
d86d4aaf
DE
70682014-02-20 Doug Evans <dje@google.com>
7069
3bc32da3 7070 Remove global all_lwps.
d86d4aaf
DE
7071 * inferiors.h (ptid_of): Move here from linux-low.h.
7072 (pid_of, lwpid_of): Ditto.
7073 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7074 parameter is a struct thread_info * now.
7075 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7076 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7077 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7078 directly.
7079 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7080 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7081 * linux-arm-low.c (update_registers_callback): Update, "entry"
7082 parameter is a struct thread_info * now.
7083 Fetch lwpid from current_inferior directly.
7084 (arm_insert_point): Pass &all_threads to find_inferior instead of
7085 &all_lwps.
7086 (arm_remove_point): Ditto.
7087 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7088 (arm_prepare_to_resume): Fetch pid from thread.
7089 (arm_read_description): Fetch lwpid from current_inferior directly.
7090 * linux-low.c (all_lwps): Delete.
7091 (delete_lwp): Delete call to remove_inferior.
7092 (handle_extended_wait): Fetch lwpid from thread.
7093 (add_lwp): Don't set lwp->entry.id. Remove call to
7094 add_inferior_to_list.
7095 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7096 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7097 (kill_one_lwp_callback): Ditto.
7098 (linux_kill): Don't dereference NULL pointer.
7099 Fetch ptid,lwpid from thread.
7100 (get_detach_signal): Fetch ptid from thread.
7101 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7102 Simplify call to regcache_invalidate_thread.
7103 (delete_lwp_callback): Update, "entry" parameter is a
7104 struct thread_info * now. Fetch pid from thread.
7105 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7106 (status_pending_p_callback): Update, "entry" parameter is a
7107 struct thread_info * now. Fetch ptid from thread.
7108 (find_lwp_pid): Update, "entry" parameter is a
7109 struct thread_info * now.
7110 (linux_wait_for_lwp): Fetch pid from thread.
7111 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7112 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7113 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7114 (dequeue_one_deferred_signal): Ditto.
7115 (cancel_breakpoint): Fetch ptid from current_inferior.
7116 (linux_wait_for_event): Pass &all_threads to find_inferior,
7117 not &all_lwps. Fetch ptid, lwpid from thread.
7118 (count_events_callback): Update, "entry" parameter is a
7119 struct thread_info * now.
7120 (select_singlestep_lwp_callback): Ditto.
7121 (select_event_lwp_callback): Ditto.
7122 (cancel_breakpoints_callback): Ditto.
7123 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7124 not &all_lwps.
7125 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7126 (unsuspend_one_lwp): Update, "entry" parameter is a
7127 struct thread_info * now.
7128 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7129 not &all_lwps.
7130 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7131 Fetch lwpid from thread, not lwp.
7132 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7133 Pass &all_threads to find_inferior, not &all_lwps.
7134 (send_sigstop): Fetch lwpid from thread, not lwp.
7135 (send_sigstop_callback): Update, "entry" parameter is a
7136 struct thread_info * now.
7137 (suspend_and_send_sigstop_callback): Ditto.
7138 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7139 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7140 struct thread_info * now.
7141 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7142 from thread, lwp.
7143 (lwp_running): Update, "entry" parameter is a
7144 struct thread_info * now.
7145 (stop_all_lwps): Fetch ptid from thread.
7146 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7147 (linux_resume_one_lwp): Fetch lwpid from thread.
7148 (linux_set_resume_request): Update, "entry" parameter is a
7149 struct thread_info * now. Fetch pid, lwpid from thread.
7150 (resume_status_pending_p): Update, "entry" parameter is a
7151 struct thread_info * now.
7152 (need_step_over_p): Ditto. Fetch lwpid from thread.
7153 (start_step_over): Fetch lwpid from thread.
7154 (linux_resume_one_thread): Update, "entry" parameter is a
7155 struct thread_info * now. Fetch lwpid from thread.
7156 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7157 (proceed_one_lwp): Update, "entry" parameter is a
7158 struct thread_info * now. Fetch lwpid from thread.
7159 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7160 struct thread_info * now.
7161 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7162 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7163 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7164 directly.
7165 (regsets_store_inferior_registers): Ditto.
7166 (fetch_register, store_register): Ditto.
7167 (linux_read_memory, linux_write_memory): Ditto.
7168 (linux_request_interrupt): Ditto.
7169 (linux_read_auxv): Ditto.
7170 (linux_xfer_siginfo): Ditto.
7171 (linux_qxfer_spu): Ditto.
7172 (linux_qxfer_libraries_svr4): Ditto.
7173 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7174 moved to inferiors.h.
7175 (get_lwp): Delete.
7176 (get_thread_lwp): Update.
7177 (struct lwp_info): Delete member "entry". Simplify comment for
7178 member "thread".
7179 (all_lwps): Delete.
7180 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7181 current_inferior directly.
7182 (update_watch_registers_callback): Update, "entry" parameter is a
7183 struct thread_info * now. Fetch pid from thread.
7184 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7185 (mips_insert_point): Fetch lwpid from current_inferior.
7186 Pass &all_threads to find_inferior, not &all_lwps.
7187 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7188 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7189 directly.
7190 (mips_stopped_data_address): Ditto.
7191 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7192 directly.
7193 * linux-tile-low.c (tile_arch_setup): Ditto.
7194 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7195 (update_debug_registers_callback): Update, "entry" parameter is a
7196 struct thread_info * now. Fetch pid from thread.
7197 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7198 Pass &all_threads to find_inferior, not &all_lwps.
7199 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7200 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7201 Pass &all_threads to find_inferior, not &all_lwps.
7202 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7203 (i386_dr_low_get_status): Ditto.
7204 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7205 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7206 (x86_linux_read_description): Ditto.
7207 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7208
3b8361aa
DE
72092014-02-20 Doug Evans <dje@google.com>
7210
7211 * inferiors.c (get_first_inferior): Fix buglet.
7212
f7667f0d
DE
72132014-02-19 Doug Evans <dje@google.com>
7214
7215 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7216 * inferiors.c (add_thread): Change result type to struct thread_info *.
7217 All callers updated.
7218 (add_lwp): Call add_thread here instead of in callers.
7219 All callers updated.
7220 * linux-low.h (get_lwp_thread): Rewrite.
7221 (struct lwp_info): New member "thread".
7222
b3312d80
DE
72232014-02-19 Doug Evans <dje@google.com>
7224
7225 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7226 All callers updated.
7227
ecc6f45c
DE
72282014-02-19 Doug Evans <dje@google.com>
7229
7230 * inferiors.c (add_thread): Fix whitespace.
7231
649ebbca
DE
72322014-02-19 Doug Evans <dje@google.com>
7233
7234 * dll.c (clear_dlls): Replace accessing list implemention details
7235 with API function.
7236 * gdbthread.h (get_first_thread): Declare.
7237 * inferiors.c (for_each_inferior_with_data): New function.
7238 (get_first_thread): New function.
7239 (find_thread_ptid): Simplify.
7240 (get_first_inferior): New function.
7241 (clear_list): Delete.
7242 (one_inferior_p): New function.
7243 (clear_inferior_list): New function.
7244 (clear_inferiors): Update.
7245 * inferiors.h (for_each_inferior_with_data): Declare.
7246 (clear_inferior_list): Declare.
7247 (one_inferior_p): Declare.
7248 (get_first_inferior): Declare.
7249 * linux-low.c (linux_wait_for_event): Replace accessing list
7250 implemention details with API function.
7251 * server.c (target_running): Ditto.
7252 (accumulate_file_name_length): New function.
7253 (emit_dll_description): New function.
7254 (handle_qxfer_libraries): Replace accessing list implemention
7255 details with API function.
7256 (handle_qxfer_threads_worker): New function.
7257 (handle_qxfer_threads_proper): Replace accessing list implemention
7258 details with API function.
7259 (handle_query): Ditto.
7260 (visit_actioned_threads_callback_ftype): New typedef.
7261 (visit_actioned_threads_data): New struct.
7262 (visit_actioned_threads): Rewrite to be find_inferior callback.
7263 (resume): Call find_inferior.
7264 (handle_status): Replace accessing list implemention
7265 details with API function.
7266 (process_serial_event): Replace accessing list implemention details
7267 with API function.
7268 * target.c (set_desired_inferior): Replace accessing list implemention
7269 details with API function.
7270 * tracepoint.c (same_process_p): New function.
7271 (gdb_agent_about_to_close): Replace accessing list implemention
7272 details with API function.
7273 * win32-low.c (child_delete_thread): Replace accessing list
7274 implemention details with API function.
7275 (match_dll_by_basename): New function.
7276 (dll_is_loaded_by_basename): New function.
7277 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7278 details call to dll_is_loaded_by_basename.
7279
80894984
DE
72802014-02-19 Doug Evans <dje@google.com>
7281
7282 * dll.h (struct dll_info): Add comment.
7283 * gdbthread.h (struct thread_info): Add comment.
7284 (current_ptid): Simplify.
7285 * inferiors.c (add_process): Update.
7286 (remove_process): Update.
7287 * inferiors.h (struct process_info): Rename member "head" to "entry".
7288 * linux-low.c (delete_lwp): Update.
7289 (add_lwp): Update.
7290 (last_thread_of_process_p): Update.
7291 (kill_one_lwp_callback, linux_kill): Update.
7292 (status_pending_p_callback): Update.
7293 (wait_for_sigstop): Update. Simplify read of ptid.
7294 (start_step_over): Update.
7295 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7296 (get_lwp_thread): Update.
7297 (struct lwp_info): Rename member "head" to "entry".
7298 * regcache.h (inferior_list_entry): Delete.
7299 * server.c (kill_inferior_callback): Update.
7300 (detach_or_kill_inferior_callback): Update.
7301 (print_started_pid): Update.
7302 (print_attached_pid): Update.
7303 (process_serial_event): Simplify read of ptid.
7304 * thread-db.c (thread_db_create_event): Update.
7305 (thread_db_get_tls_address): Update.
7306 * win32-low.c (current_inferior_ptid): Simplify.
7307
46917d26
TT
73082014-02-19 Tom Tromey <tromey@redhat.com>
7309
7310 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7311 argument.
7312 (target_supports_btrace): Update.
7313
0759a81e
YQ
73142014-02-14 Yao Qi <yao@codesourcery.com>
7315
7316 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7317 (rsp-low-ipa.o): New target.
7318
a7191e8b
TT
73192014-02-12 Tom Tromey <tromey@redhat.com>
7320
7321 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7322 convert_ascii_to_int.
7323 * regcache.c (registers_to_string): Likewise.
7324 * remote-utils.c (decode_M_packet): Likewise.
7325 * server.c (process_serial_event): Likewise.
7326
ff0e980e
TT
73272014-02-12 Tom Tromey <tromey@redhat.com>
7328
7329 * server.c (handle_query, handle_v_run): Use hex2bin, not
7330 unhexify.
7331 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7332
e9371aff
TT
73332014-02-12 Tom Tromey <tromey@redhat.com>
7334
7335 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7336 convert_int_to_ascii.
7337 * regcache.c (registers_to_string, collect_register_as_string):
7338 Likewise.
7339 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7340 Likewise.
7341 * server.c (process_serial_event): Likewise.
7342 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7343 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7344
971dc0b8
TT
73452014-02-12 Tom Tromey <tromey@redhat.com>
7346
7347 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7348 bin2hex, not hexify.
7349 * tracepoint.c (cmd_qtstatus): Likewise.
7350
0a822afb
TT
73512014-02-12 Tom Tromey <tromey@redhat.com>
7352
7353 * remote-utils.c (monitor_output): Pass explicit length to
7354 hexify.
7355
9c3d6531
TT
73562014-02-12 Tom Tromey <tromey@redhat.com>
7357
7358 * tracepoint.c: Include rsp-low.h.
7359 * server.c: Include rsp-low.h.
7360 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7361 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7362 declare.
7363 * remote-utils.c: Include rsp-low.h.
7364 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7365 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7366 (convert_int_to_ascii, convert_ascii_to_int): Move to
7367 common/rsp-low.c.
7368 * regcache.c: Include rsp-low.h.
7369 * ax.c: Include rsp-low.h.
7370 * Makefile.in (SFILES): Add common/rsp-low.c.
7371 (OBS): Add rsp-low.o.
7372 (rsp-low.o): New target.
7373
01fd3ea5
TT
73742014-02-12 Tom Tromey <tromey@redhat.com>
7375
7376 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7377 Include print-utils.h.
7378 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7379 (plongest, thirty_two, phex_nz): Remove.
7380 * Makefile.in (SFILES): Add common/print-utils.c.
7381 (OBS): Add print-utils.o.
7382 (print-utils-ipa.o): New target.
7383 (print-utils.o): New target.
7384 (IPA_OBJS): Add print-utils-ipa.o.
7385
e99dc820
TT
73862014-02-06 Tom Tromey <tromey@redhat.com>
7387
7388 * Makefile.in (SFILES): Fix indentation.
7389
ee1e2d4f
DE
73902014-02-05 Doug Evans <dje@google.com>
7391
7392 * linux-low.c (linux_wait_for_event): Improve comment.
7393 (linux_wait_1): Keep current_inferior in sync with event_child.
7394
f5a02773
DE
73952014-01-22 Doug Evans <dje@google.com>
7396
7397 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7398
87ce2a04
DE
73992014-01-22 Doug Evans <dje@google.com>
7400
7401 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7402 * configure: Regenerate.
7403 * config.in: Regenerate.
7404 * Makefile.in (SFILES): Add debug.c.
7405 (OBS): Add debug.o.
7406 * debug.c: New file.
7407 * debug.h: New file.
7408 * linux-aarch64-low.c (*): Update all debugging printfs to use
7409 debug_printf instead of fprintf.
7410 * linux-arm-low.c (*): Ditto.
7411 * linux-cris-low.c (*): Ditto.
7412 * linux-crisv32-low.c (*): Ditto.
7413 * linux-m32r-low.c (*): Ditto.
7414 * linux-sparc-low.c (*): Ditto.
7415 * linux-x86.c (*): Ditto.
7416 * linux-low.c (*): Ditto.
7417 (linux_wait_1): Add calls to debug_enter, debug_exit.
7418 (linux_wait): Remove redundant debugging printf.
7419 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7420 (linux_resume, unstop_all_lwps): Ditto.
7421 * mem-break.c (*): Update all debugging printfs to use
7422 debug_printf instead of fprintf.
7423 * remote-utils.c (*): Ditto.
7424 * thread-db.c (*): Ditto.
7425 * server.c #include <ctype.h>, "gdb_vecs.h".
7426 (debug_threads): Moved to debug.c.
7427 (*): Update all debugging printfs to use debug_printf instead of
7428 fprintf.
7429 (start_inferior): Replace call to fflush with call to debug_flush.
7430 (monitor_show_help): Mention set debug-format.
7431 (parse_debug_format_options): New function.
7432 (handle_monitor_command): Handle "monitor set debug-format".
7433 (gdbserver_usage): Mention --debug-format.
7434 (main): Parse --debug-format.
7435 * server.h (debug_threads): Declaration moved to debug.h.
7436 #include "debug.h".
7437 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7438 trace_debug_1 that uses debug_printf.
7439 (tracepoint_look_up_symbols): Update all debugging printfs to use
7440 debug_printf instead of fprintf.
7441
e671835b
BS
74422014-01-20 Baruch Siach <baruch@tkos.co.il>
7443
7444 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7445 sys/ptrace.h.
7446
b5737fa9
PA
74472014-01-17 Pedro Alves <palves@redhat.com>
7448
ea38d2a9 7449 PR build/16445
c7faa97a
PA
7450 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7451 defined after including gdb_proc_service.h.
b5737fa9 7452
40ed484e
DE
74532014-01-16 Doug Evans <dje@google.com>
7454
7455 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7456 (match_dll): Use it.
7457
969c39fb
MM
74582014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7459
7460 * target.h (target_ops) <read_btrace>: Change parameters and
7461 return type to allow error reporting.
7462 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7463 trace reading errors on.
7464 * linux-low.c (linux_low_read_btrace): Pass trace reading
7465 errors on.
7466 (linux_low_disable_btrace): New.
7467
ab7f45ba
DE
74682014-01-15 Doug Evans <dje@google.com>
7469
7470 * inferiors.c (thread_id_to_gdb_id): Delete.
7471 * inferiors.h (thread_id_to_gdb_id): Delete.
7472
66af0f44
EZ
74732014-01-13 Eli Zaretskii <eliz@gnu.org>
7474
7475 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7476 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7477 versions.
7478
9939e131
PA
74792014-01-08 Pedro Alves <palves@redhat.com>
7480
7481 * server.c (handle_status): Don't discard previous queued stop
7482 replies or thread's pending status here.
7483 (main) <disconnection>: Do it here instead.
7484
b7ea362b
PA
74852014-01-08 Pedro Alves <palves@redhat.com>
7486
7487 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7488 * server.c (visit_actioned_threads, handle_pending_status): New
7489 function.
7490 (handle_v_cont): Factor out parts to ...
7491 (resume): ... this new function. If in all-stop, and a thread
7492 being resumed has a pending status, report it without actually
7493 resuming.
7494 (myresume): Adjust to use the new 'resume' function.
7495 (clear_pending_status_callback, set_pending_status_callback)
7496 (find_status_pending_thread_callback): New functions.
7497 (handle_status): Handle the case of multiple threads having
7498 interesting statuses to report. Report threads' real last signal
7499 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7500 with an interesting thread to report the status for, instead of
7501 always reporting the status of the first thread.
7502
28498c42
JB
75032014-01-01 Joel Brobecker <brobecker@adacore.com>
7504
7505 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7506 * gdbreplay.c (gdbreplay_version): Likewise.
7507
f45c82da
YZ
75082013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7509
7510 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7511 iov.iov_len with the real length in use.
7512
379a5e2d
JB
75132013-12-13 Joel Brobecker <brobecker@adacore.com>
7514
7515 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7516 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7517 for all targets that use win32-low.c.
7518 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7519 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7520
4210d83e
PA
75212013-12-13 Pedro Alves <palves@redhat.com>
7522
7523 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7524 if equal to TARGET_WAITKIND_LOADED.
7525 * win32-low.c (cached_status): New static global.
7526 (win32_wait): Add declaration.
7527 (do_initial_child_stuff): Flush all initial pending debug events
7528 up to the initial breakpoint.
7529 (win32_wait): If CACHED_STATUS was set, return that instead
7530 of doing a real wait. Remove the code resuming the execution
7531 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7532 during the initial phase. Also remove the code changing
7533 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7534 TARGET_WAITKIND_STOPPED.
7535
e7f0d979
YQ
75362013-12-11 Yao Qi <yao@codesourcery.com>
7537
7538 * notif.c (handle_notif_ack): Return 0 if no notification
7539 matches.
7540
ebcf782c
DE
75412013-11-20 Doug Evans <dje@google.com>
7542
7543 * linux-low.c (linux_set_resume_request): Fix comment.
7544
20ad9378
DE
75452013-11-20 Doug Evans <dje@google.com>
7546
7547 * linux-low.c (resume_status_pending_p): Tweak comment.
7548
a196ebeb
WT
75492013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7550
7551 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7552 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7553 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7554 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7555 (srv_amd64_regobj): Add amd64-mpx.o.
7556 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7557 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7558 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7559 * i387-fp.c (num_pl_bnd_register) Added constant.
7560 (num_pl_bnd_cfg_registers) Added constant.
7561 (struct i387_xsave) Added reserved area and MPX fields.
7562 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7563 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7564 function.
7565 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7566 (init_registers_amd64_mpx_linux): Declare new function.
7567 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7568 (x86_64_regmap): Add MPX registers.
7569 (x86_linux_read_description): Add MPX case.
7570 (initialize_low_arch): Initialize MPX targets.
7571
0080a2f6
TT
75722013-11-18 Tom Tromey <tromey@redhat.com>
7573
7574 * configure: Rebuild.
7575 * configure.ac: Don't check for stdlib.h.
7576 * gdbreplay.c: Unconditionally include stdlib.h.
7577
2978b111
TT
75782013-11-18 Tom Tromey <tromey@redhat.com>
7579
7580 * config.in: Rebuild.
7581 * configure: Rebuild.
7582 * configure.ac: Don't use AC_HEADER_DIRENT.
7583
a3d08894
TT
75842013-11-18 Tom Tromey <tromey@redhat.com>
7585
7586 * server.h: Don't check HAVE_STRING_H.
7587 * gdbreplay.c: Don't check HAVE_STRING_H.
7588 * configure: Rebuild.
7589
0a5dd17d
TT
75902013-11-18 Tom Tromey <tromey@redhat.com>
7591
7592 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7593 LIBGNU.
7594
1bd2f0ba
TT
75952013-11-08 Tom Tromey <tromey@redhat.com>
7596
7597 * configure, config.in: Rebuild.
7598 * configure.ac: Remove unused configury.
7599
3266f10b
TT
76002013-11-08 Tom Tromey <tromey@redhat.com>
7601
7602 * acinclude.m4: Include common.m4, codeset.m4.
7603 * configure, config.in: Rebuild.
7604 * configure.ac: Use GDB_AC_COMMON.
7605
6682d959
AA
76062013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7607
7608 * linux-s390-low.c (HWCAP_S390_TE): New define.
7609 (s390_arch_setup): Consider the TE field in the HWCAP for
7610 determining 'have_regset_tdb'.
7611
fd0a4d76
SDJ
76122013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7613
7614 PR gdb/16014
7615 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7616 call to sizeof.
7617
1a3d890b
PA
76182013-10-02 Pedro Alves <palves@redhat.com>
7619
7620 * server.c (process_serial_event): Don't output "GDBserver
7621 exiting" if GDB is connected through stdio.
7622 * target.c (mywait): Likewise, be silent if GDB is connected
7623 through stdio.
7624
97ad4581
JB
76252013-10-01 Joel Brobecker <brobecker@adacore.com>
7626
7627 * lynx-low.c (lynx_add_threads_after_attach): New function.
7628 (lynx_attach): Remove call to add_thread. Add call to
7629 lynx_add_threads_after_attach instead.
7630
5b4e221c
MF
76312013-09-28 Mike Frysinger <vapier@gentoo.org>
7632
7633 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7634 * config.in, configure: Regenerated.
7635
ee47b2f8
YQ
76362013-09-18 Yao Qi <yao@codesourcery.com>
7637
7638 PR server/15959
7639 * server.c (start_inferior): Clear 'resume_info'.
7640
d6707650 76412013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7642
d6707650
JW
7643 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7644 for each register.
7645
9243dd0e 76462013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7647
9243dd0e
JW
7648 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7649 linux-tile-low.o to srv_tgtobj.
7650
c623a6ef
WN
76512013-09-16 Will Newton <will.newton@linaro.org>
7652
7653 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7654 out regs.
7655
fb71d39e
PA
76562013-09-06 Pedro Alves <palves@redhat.com>
7657
7658 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7659 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7660 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7661 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7662 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7663 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7664
8e7e9910
PA
76652013-09-06 Pedro Alves <palves@redhat.com>
7666
7667 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7668 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7669
7c3a12ca
PA
76702013-09-06 Pedro Alves <palves@redhat.com>
7671
7672 * linux-amd64-ipa.c: Include tracepoint.h.
7673 * linux-i386-ipa.c: Include tracepoint.h.
7674
8eb3d7b6
RW
76752013-09-06 Ricard Wanderlof <ricardw@axis.com>
7676
7677 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7678 (ps_get_thread_area): New function.
7679
eddddb9d
RW
76802013-09-06 Ricard Wanderlof <ricardw@axis.com>
7681
7682 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7683 (initialize_low_arch): Call init_registers_crisv32 rather than
7684 init_register_crisv32.
7685
533b0600
PA
76862013-09-05 Pedro Alves <palves@redhat.com>
7687
7688 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7689 to ...
7690 * hostio.h: ... this new file.
7691 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7692 win32-low.c: Include hostio.h.
7693
0ce3d3b5
PA
76942013-09-05 Pedro Alves <palves@redhat.com>
7695
7696 * server.h (gdb_client_data, handler_func, callback_handler_func)
7697 (delete_file_handler, add_file_handler, append_callback_event)
7698 (delete_callback_event, start_event_loop, initialize_event_loop):
7699 Move to event-loop.h and include it.
7700 * event-loop.h: New file.
7701
799cdc37
PA
77022013-09-05 Pedro Alves <palves@redhat.com>
7703
7704 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7705 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7706 (loaded_dll, unloaded_dll): Move to ...
7707 * dll.h: ... this new file.
7708 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7709
6a6bbd9d
PA
77102013-09-05 Pedro Alves <palves@redhat.com>
7711
7712 * server.h (current_process, get_thread_process, all_processes)
7713 (add_inferior_to_list, for_each_inferior, current_inferior)
7714 (remove_inferior, add_process, remove_process, find_process_pid)
7715 (have_started_inferiors_p, have_attached_inferiors_p)
7716 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7717 (clear_inferiors, find_inferior, find_inferior_id)
7718 (inferior_target_data, set_inferior_target_data)
7719 (inferior_regcache_data, set_inferior_regcache_data): Move to
7720 inferiors.h, and include it.
7721 * inferiors.h: New file.
7722
f699aaba
PA
77232013-09-05 Pedro Alves <palves@redhat.com>
7724
7725 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7726 Move ...
72f4393d 7727 * ax.h: ... here.
f699aaba 7728
c144c7a0
PA
77292013-09-05 Pedro Alves <palves@redhat.com>
7730
7731 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7732 tracepoint.h.
7733 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7734 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7735 (handle_tracepoint_general_set, handle_tracepoint_query)
7736 (tracepoint_finished_step, tracepoint_was_hit)
7737 (release_while_stepping_state_list, current_traceframe)
7738 (in_readonly_region, traceframe_read_mem)
7739 (fetch_traceframe_registers, traceframe_read_sdata)
7740 (traceframe_read_info, struct fast_tpoint_collect_status)
7741 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7742 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7743 (supply_fast_tracepoint_registers)
7744 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7745 (ipa_tdesc, claim_trampoline_space)
7746 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7747 (agent_mem_read, agent_get_trace_state_variable_value)
7748 (agent_set_trace_state_variable_value, agent_tsv_read)
7749 (agent_mem_read_string, get_raw_reg_func_addr)
7750 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7751 * tracepoint.h: ... this new file.
7752
ff42e6ab
PA
77532013-09-05 Pedro Alves <palves@redhat.com>
7754
7755 * server.h (perror_with_name, error, fatal, warning, paddress)
7756 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7757 include it.
7758 * utils.h: New file.
7759
541af0f4
PA
77602013-09-05 Pedro Alves <palves@redhat.com>
7761
7762 * server.h (remote_debug, noack_mode, transport_is_reliable)
7763 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7764 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7765 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7766 (write_enn, initialize_async_io, enable_async_io)
7767 (disable_async_io, check_remote_input_interrupt_request)
7768 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7769 (dead_thread_notify, prepare_resume_reply)
7770 (decode_address_to_semicolon, decode_address, decode_m_packet)
7771 (decode_M_packet, decode_X_packet, decode_xfer_write)
7772 (decode_search_memory_packet, unhexify, hexify)
7773 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7774 (look_up_one_symbol, relocate_instruction)
7775 (monitor_output): Move to remote-utils.h, and include it.
7776 * remote-utils.h: New file.
7777
eebdf26b
PA
77782013-09-05 Pedro Alves <palves@redhat.com>
7779
7780 * server.h (_): Delete.
7781
3aafd2ff
PA
77822013-09-02 Pedro Alves <palves@redhat.com>
7783
7784 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7785 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7786 allocated.
7787 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7788
cee83bcb
PM
77892013-09-02 Pierre Muller <muller@sourceware.org>
7790
7791 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7792 or WriteProcessMemory complete successfully and handle
7793 ERROR_PARTIAL_COPY error.
7794
9a13b2fa
PA
77952013-09-02 Pedro Alves <palves@redhat.com>
7796
7797 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7798 error instead of EIO.
7799
602e3198
JK
78002013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7801
7802 PR server/15604
7803 * linux-low.c: Include filestuff.h.
7804 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7805 * lynx-low.c: Include filestuff.h.
7806 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7807 * server.c: Include filestuff.h.
7808 (main): Call notice_open_fds.
7809 * spu-low.c: Include filestuff.h.
7810 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7811
96d7229d
LM
78122013-08-22 Luis Machado <lgustavo@codesourcery.com>
7813
7814 * Makefile.in: Explain why ../target and ../nat are not
7815 listed as include file search paths.
7816 (linux-waitpid.o): New object file rule.
7817 * configure.srv (srv_native_linux_obj): New variable.
7818 Replace all occurrences of linux native object files with
7819 $srv_native_linux_obj.
7820 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7821 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7822 (linux_enable_event_reporting): Remove declaration.
7823 (my_waitpid): Moved to common/linux-waitpid.c.
7824 (linux_wait_for_event): Pass ptid when calling
7825 linux_enable_event_reporting.
7826 (linux_supports_tracefork_flag): Remove.
7827 (linux_enable_event_reporting): Likewise.
7828 (linux_tracefork_grandchild): Remove.
7829 (STACK_SIZE): Moved to common/linux-ptrace.c.
7830 (linux_tracefork_child): Remove.
7831 (linux_test_for_tracefork): Remove.
7832 (linux_look_up_symbols): Call linux_supports_traceclone.
7833 (initialize_low): Remove call to linux_test_for_tracefork.
7834 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7835 common/linux-ptrace.h.
7836 (PTRACE_TYPE_ARG4): Likewise.
7837 Include linux-ptrace.h.
7838
32940073
PA
78392013-08-21 Pedro Alves <palves@redhat.com>
7840
7841 * config.in: Renegerate.
7842
33b60d58 78432013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7844
33b60d58
LM
7845 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7846 (SFILES): Remove $(srcdir)/common/target-common.c and
7847 add $(srcdir)/target/waitstatus.c.
7848 (OBS): Remove target-common.o and add waitstatus.o.
7849 (server_h): Remove $(srcdir)/../common/target-common.h and
7850 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7851 and $(srcdir)/../target/waitstatus.h.
7852 (target-common.o): Remove.
7853 (waitstatus.o): New target object file.
7854 * target.h: Do not include target-common.h and
7855 include target/resume.h, target/wait.h and
7856 target/waitstatus.h.
7857
b8e1b30e
LM
78582013-08-13 Luis Machado <lgustavo@codesourcery.com>
7859
7860 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7861 to PTRACE_TYPE_ARG3.
7862 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7863 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7864 PTRACE_TYPE_ARG4.
7865 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7866 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7867
7a60ad40
YQ
78682013-07-27 Jie Zhang <jie@codesourcery.com>
7869 Daniel Jacobowitz <dan@codesourcery.com>
7870 Yao Qi <yao@codesourcery.com>
7871
7872 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7873 (mips-linux-watch.o): New rule.
7874 (mips_linux_watch_h): New variable.
7875 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7876 srv_tgtobj.
7877 * linux-mips-low.c: Include mips-linux-watch.h.
7878 (struct arch_process_info, struct arch_lwp_info): New.
7879 (update_watch_registers_callback): New function.
7880 (mips_linux_new_process, mips_linux_new_thread) New functions.
7881 (mips_linux_prepare_to_resume, mips_insert_point): New
7882 functions.
7883 (mips_remove_point, mips_stopped_by_watchpoint): New
7884 functions.
7885 (rsp_bp_type_to_target_hw_bp_type): New function.
7886 (mips_stopped_data_address): New function.
7887 (the_low_target): Add watchpoint support functions.
7888
de6f69ad
YQ
78892013-07-27 Yao Qi <yao@codesourcery.com>
7890
7891 * i386-low.c: Include break-common.h.
7892 (enum target_hw_bp_type): Remove.
7893
3360c0bf
LM
78942013-07-24 Luis Machado <lgustavo@codesourcery.com>
7895
7896 * Makefile.in (SFILES): /common/target-common.c.
7897 (OBS): Add target-common.o.
7898 (server_h): Add $(srcdir)/../common/target-common.h.
7899 (target-common.o): New target.
7900 * server.c (queue_stop_reply_callback): Free
7901 status string after use.
7902 * target.c (target_waitstatus_to_string): Remove.
7903 * target.h: Include target-common.h.
7904 (resume_kind): Likewise.
7905 (target_waitkind): Likewise.
7906 (target_waitstatus): Likewise.
7907 (TARGET_WNOHANG): Likewise.
7908
bd885420
YQ
79092013-07-04 Yao Qi <yao@codesourcery.com>
7910
7911 * Makefile.in (host_alias): Use @host_noncanonical@.
7912 (target_alias): Use @target_noncanonical@.
7913 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7914 ACX_NONCANONICAL_HOST.
7915 * configure: Regenerated.
7916
7917 Revert:
7918 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7919
7920 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7921 * configure: Rebuild.
7922 * Makefile.in (version_host, version_target): Get from configure.
7923 (version.c): Use $(version_host) and $(version_target).
7924
17ef446e
PA
79252013-07-03 Pedro Alves <palves@redhat.com>
7926
7927 * Makefile.in (config.status): Depend on development.sh.
7928 * acinclude.m4: Include libmcheck.m4.
7929 * configure: Regenerate.
7930
7a9a7487
MG
79312013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7932
7933 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7934 attribute inside the parentheses.
7935 (winapi_DebugSetProcessKillOnExit): Ditto.
7936 (winapi_DebugBreakProcess): Ditto.
7937 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7938
49b64de6
MG
79392013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7940
7941 * notif.h (notif_event): Add a dummy member to avoid compiler
7942 errors.
7943
d5749ee7
PA
79442013-07-01 Pedro Alves <palves@redhat.com>
7945
7946 * hostio.c (HOSTIO_PATH_MAX): Define.
7947 (require_filename, handle_open, handle_unlink, handle_readlink):
7948 Use it.
7949
d8d2a3ee
PA
79502013-07-01 Pedro Alves <palves@redhat.com>
7951
7952 * server.h: Include "pathmax.h".
7953 * linux-low.c: Don't include sys/param.h.
7954 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7955 MAXPATHLEN.
7956 * win32-low.c: Don't include sys/param.h.
7957 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7958
bc7dea8d
PA
79592013-07-01 Pedro Alves <palves@redhat.com>
7960
7961 * event-loop.c: Don't check HAVE_UNISTD_H before including
7962 <unistd.h>.
7963 * gdbreplay.c: Likewise.
7964 * remote-utils.c: Likewise.
7965 * server.c: Likewise.
7966 * configure.ac: Don't check for unistd.h.
7967 * configure: Regenerate.
7968
d6c2da54
TT
79692013-06-28 Tom Tromey <tromey@redhat.com>
7970
7971 * Makefile.in (version.c): Use version.in, not
7972 common/version.in.
7973
257b6bec
MG
79742013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7975
7976 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7977 * configure: Rebuild.
7978 * Makefile.in (version_host, version_target): Get from configure.
7979 (version.c): Use $(version_host) and $(version_target).
7980
86ebe149
DK
79812013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7982
7983 Fix trace-status to output user name without trailing colon.
7984 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7985
f30aa5af
DK
79862013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7987
7988 Fix trace-status to output proper start-time and stop-time.
7989 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7990 output start time and stop time in hex as gdb expects.
7991
28a93511
YQ
79922013-06-26 Pedro Alves <pedro@codesourcery.com>
7993
7994 * tracepoint.c (build_traceframe_info_xml): Output trace state
7995 variables present in the trace buffer.
7996
01208463
TT
79972013-06-24 Tom Tromey <tromey@redhat.com>
7998
7999 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8000 create-version.sh.
8001 (version.o): Remove.
8002 * gdbreplay.c: Include version.h.
8003 (version, host_name): Don't declare.
8004 * server.h: Include version.h.
8005 (version, host_name): Don't declare.
8006
760256f9
PA
80072013-06-12 Pedro Alves <palves@redhat.com>
8008
8009 * linux-x86-low.c (linux_is_elf64): Delete global.
8010 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8011 with local linux_pid_exe_is_elf_64_file use.
8012
030031ee
PA
80132013-06-11 Pedro Alves <palves@redhat.com>
8014
8015 * linux-low.c (regset_disabled, disable_regset): New functions.
8016 (regsets_fetch_inferior_registers)
8017 (regsets_store_inferior_registers): Use them.
8018 (initialize_regsets_info); Don't allocate the disabled_regsets
8019 array here.
8020 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8021 comment.
8022
5da6eb0a
PA
80232013-06-11 Pedro Alves <palves@redhat.com>
8024
8025 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8026 xmalloc.
8027
7e5aaa09
PA
80282013-06-11 Pedro Alves <palves@redhat.com>
8029
8030 * linux-x86-low.c (initialize_low_arch): Call
8031 init_registers_x32_avx_linux.
8032
d878444c
JK
80332013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8034
8035 Fix compatibility with Android Bionic.
8036 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8037 it is not empty.
8038
3aee8918
PA
80392013-06-07 Pedro Alves <palves@redhat.com>
8040
5f2b57b5 8041 PR server/14823
3aee8918
PA
8042 * Makefile.in (OBS): Add tdesc.o.
8043 (IPA_OBJS): Add tdesc-ipa.o.
8044 (tdesc-ipa.o): New rule.
8045 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8046 interface.
8047 * linux-low.c (new_inferior): Delete.
8048 (disabled_regsets, num_regsets): Delete.
8049 (linux_add_process): Adjust to set the new per-process
8050 new_inferior flag.
8051 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8052 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8053 was a stop. When calling arch_setup, switch the current inferior
8054 to the thread that got an event.
8055 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8056 (regsets_fetch_inferior_registers)
8057 (regsets_store_inferior_registers): New regsets_info parameter.
8058 Adjust to use it.
8059 (linux_register_in_regsets): New regs_info parameter. Adjust to
8060 use it.
8061 (register_addr, fetch_register, store_register): New usrregs_info
8062 parameter. Adjust to use it.
8063 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8064 parameter regs_info. Adjust to use it.
8065 (linux_fetch_registers): Get the current inferior's regs_info, and
8066 adjust to use it.
8067 (linux_store_registers): Ditto.
8068 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8069 (initialize_low): Don't initialize the target_regsets here. Call
8070 initialize_low_arch.
8071 * linux-low.h (target_regsets): Delete declaration.
8072 (struct regsets_info): New.
8073 (struct usrregs_info): New.
8074 (struct regs_info): New.
8075 (struct process_info_private) <new_inferior>: New field.
8076 (struct linux_target_ops): Delete the num_regs, regmap, and
8077 regset_bitmap fields. New field regs_info.
8078 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8079 * i387-fp.c (num_xmm_registers): Delete.
8080 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8081 calls to new interface.
8082 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8083 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8084 Infer the number of xmm registers from the regcache's target
8085 description.
8086 * i387-fp.h (num_xmm_registers): Delete.
8087 * inferiors.c (add_thread): Don't install the thread's regcache
8088 here.
8089 * proc-service.c (gregset_info): Fetch the current inferior's
8090 regs_info. Adjust to use it.
8091 * regcache.c: Include tdesc.h.
8092 (register_bytes, reg_defs, num_registers)
8093 (gdbserver_expedite_regs): Delete.
8094 (get_thread_regcache): If the thread doesn't have a regcache yet,
8095 create one, instead of aborting gdbserver.
8096 (regcache_invalidate_one): Rename to ...
8097 (regcache_invalidate_thread): ... this.
8098 (regcache_invalidate_one): New.
8099 (regcache_invalidate): Only invalidate registers of the current
8100 process.
8101 (init_register_cache): Add target_desc parameter, and use it.
8102 (new_register_cache): Ditto. Assert the target description has a
8103 non zero registers_size.
8104 (regcache_cpy): Add assertions. Adjust.
8105 (realloc_register_cache, set_register_cache): Delete.
8106 (registers_to_string, registers_from_string): Adjust.
8107 (find_register_by_name, find_regno, find_register_by_number)
8108 (register_cache_size): Add target_desc parameter, and use it.
8109 (free_register_cache_thread, free_register_cache_thread_one)
8110 (regcache_release, register_cache_size): New.
8111 (register_size): Add target_desc parameter, and use it.
8112 (register_data, supply_register, supply_register_zeroed)
8113 (supply_regblock, supply_register_by_name, collect_register)
8114 (collect_register_as_string, collect_register_by_name): Adjust.
8115 * regcache.h (struct target_desc): Forward declare.
8116 (struct regcache) <tdesc>: New field.
8117 (init_register_cache, new_register_cache): Add target_desc
8118 parameter.
8119 (regcache_invalidate_thread): Declare.
8120 (regcache_invalidate_one): Delete declaration.
8121 (regcache_release): Declare.
8122 (find_register_by_number, register_cache_size, register_size)
8123 (find_regno): Add target_desc parameter.
8124 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8125 declarations.
8126 * remote-utils.c: Include tdesc.h.
8127 (outreg, prepare_resume_reply): Adjust.
8128 * server.c: Include tdesc.h.
8129 (gdbserver_xmltarget): Delete declaration.
8130 (get_features_xml, process_serial_event): Adjust.
8131 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8132 declare.
8133 (struct process_info) <tdesc>: New field.
8134 (ipa_tdesc): Declare.
8135 * tdesc.c: New file.
8136 * tdesc.h: New file.
8137 * tracepoint.c: Include tdesc.h.
8138 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8139 (get_context_regcache): Adjust to pass ipa_tdesc down.
8140 (do_action_at_tracepoint): Adjust to get the register cache size
8141 from the context regcache's description.
8142 (traceframe_walk_blocks): Adjust to get the register cache size
8143 from the current trace frame's description.
8144 (traceframe_get_pc): Adjust to get current trace frame's
8145 description and pass it down.
8146 (gdb_collect): Adjust to get the register cache size from the
8147 IPA's description.
8148 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8149 (gdbserver_xmltarget): Delete.
8150 (initialize_low_tracepoint): Set the ipa's target description.
8151 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8152 (initialize_low_tracepoint): Set the ipa's target description.
8153 * linux-x86-low.c: Include tdesc.h.
8154 [__x86_64__] (is_64bit_tdesc): New.
8155 (ps_get_thread_area, x86_get_thread_area): Use it.
8156 (i386_cannot_store_register): Rename to ...
8157 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8158 (i386_cannot_fetch_register): Rename to ...
8159 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8160 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8161 to new interface.
8162 (target_regsets): Rename to ...
8163 (x86_regsets): ... this.
8164 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8165 interface.
8166 (x86_siginfo_fixup): Use is_64bit_tdesc.
8167 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8168 (tdesc_x32_avx_linux, tdesc_x32_linux)
8169 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8170 Declare.
8171 (x86_linux_update_xmltarget): Delete.
8172 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8173 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8174 (AMD64_LINUX_USER64_CS): New.
8175 (x86_linux_read_description): New, based on
8176 x86_linux_update_xmltarget.
8177 (same_process_callback): New.
8178 (x86_arch_setup_process_callback): New.
8179 (x86_linux_update_xmltarget): New.
8180 (x86_regsets_info): New.
8181 (amd64_linux_regs_info): New.
8182 (i386_linux_usrregs_info): New.
8183 (i386_linux_regs_info): New.
8184 (x86_linux_regs_info): New.
8185 (x86_arch_setup): Reimplement.
8186 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8187 (x86_emit_ops): Ditto.
8188 (the_low_target): Adjust. Install x86_linux_regs_info,
8189 x86_cannot_fetch_register, and x86_cannot_store_register.
8190 (initialize_low_arch): New.
8191 * linux-ia64-low.c (tdesc_ia64): Declare.
8192 (ia64_fetch_register): Adjust.
8193 (ia64_usrregs_info, regs_info): New globals.
8194 (ia64_regs_info): New function.
8195 (the_low_target): Adjust.
8196 (initialize_low_arch): New function.
8197 * linux-sparc-low.c (tdesc_sparc64): Declare.
8198 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8199 Adjust.
8200 (sparc_arch_setup): New function.
8201 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8202 (the_low_target): Adjust.
8203 (initialize_low_arch): New function.
8204 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8205 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8206 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8207 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8208 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8209 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8210 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8211 (tdesc_powerpc_isa205_vsx64l): Declare.
8212 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8213 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8214 (ppc_set_pc, ppc_get_hwcap): Adjust.
8215 (ppc_usrregs_info): Forward declare.
8216 (!__powerpc64__) ppc_regmap_adjusted: New global.
8217 (ppc_arch_setup): Adjust to the current process'es target
8218 description.
8219 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8220 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8221 (ppc_store_evrregset): Adjust.
8222 (target_regsets): Rename to ...
8223 (ppc_regsets): ... this, and make static.
8224 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8225 (ppc_regs_info): New function.
8226 (the_low_target): Adjust.
8227 (initialize_low_arch): New function.
8228 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8229 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8230 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8231 (tdesc_s390x_linux64v2): Declare.
8232 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8233 (s390_fill_gregset, s390_store_last_break): Adjust.
8234 (target_regsets): Rename to ...
8235 (s390_regsets): ... this, and make static.
8236 (s390_get_pc, s390_set_pc): Adjust.
8237 (s390_get_hwcap): New target_desc parameter, and use it.
8238 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8239 (s390_arch_setup): Adjust to set the current process'es target
8240 description. Don't adjust the regmap.
8241 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8242 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8243 (regs_info_3264): New globals.
8244 (s390_regs_info): New function.
8245 (the_low_target): Adjust.
8246 (initialize_low_arch): New function.
8247 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8248 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8249 [__mips64] (init_registers_mips_linux)
8250 (init_registers_mips_dsp_linux): Delete defines.
8251 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8252 (have_dsp): New global.
8253 (mips_read_description): New, based on mips_arch_setup.
8254 (mips_arch_setup): Reimplement.
8255 (get_usrregs_info): New function.
8256 (mips_cannot_fetch_register, mips_cannot_store_register)
8257 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8258 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8259 (target_regsets): Rename to ...
8260 (mips_regsets): ... this, and make static.
8261 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8262 (dsp_regs_info, regs_info): New globals.
8263 (mips_regs_info): New function.
8264 (the_low_target): Adjust.
8265 (initialize_low_arch): New function.
8266 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8267 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8268 Declare.
8269 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8270 (arm_read_description): New, with bits factored from
8271 arm_arch_setup.
8272 (arm_arch_setup): Reimplement.
8273 (target_regsets): Rename to ...
8274 (arm_regsets): ... this, and make static.
8275 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8276 (arm_regs_info): New function.
8277 (the_low_target): Adjust.
8278 (initialize_low_arch): New function.
8279 * linux-m68k-low.c (tdesc_m68k): Declare.
8280 (target_regsets): Rename to ...
8281 (m68k_regsets): ... this, and make static.
8282 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8283 (m68k_regs_info): New function.
8284 (m68k_arch_setup): New function.
8285 (the_low_target): Adjust.
8286 (initialize_low_arch): New function.
8287 * linux-sh-low.c (tdesc_sharch): Declare.
8288 (target_regsets): Rename to ...
8289 (sh_regsets): ... this, and make static.
8290 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8291 (sh_regs_info, sh_arch_setup): New functions.
8292 (the_low_target): Adjust.
8293 (initialize_low_arch): New function.
8294 * linux-bfin-low.c (tdesc_bfin): Declare.
8295 (bfin_arch_setup): New function.
8296 (bfin_usrregs_info, regs_info): New globals.
8297 (bfin_regs_info): New function.
8298 (the_low_target): Adjust.
8299 (initialize_low_arch): New function.
8300 * linux-cris-low.c (tdesc_cris): Declare.
8301 (cris_arch_setup): New function.
8302 (cris_usrregs_info, regs_info): New globals.
8303 (cris_regs_info): New function.
8304 (the_low_target): Adjust.
8305 (initialize_low_arch): New function.
8306 * linux-cris-low.c (tdesc_crisv32): Declare.
8307 (cris_arch_setup): New function.
8308 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8309 (cris_regs_info): New function.
8310 (the_low_target): Adjust.
8311 (initialize_low_arch): New function.
8312 * linux-m32r-low.c (tdesc_m32r): Declare.
8313 (m32r_arch_setup): New function.
8314 (m32r_usrregs_info, regs_info): New globals.
8315 (m32r_regs_info): Adjust.
8316 (initialize_low_arch): New function.
8317 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8318 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8319 (tic6x_usrregs_info): Forward declare.
8320 (tic6x_read_description): New function, based on ...
8321 (tic6x_arch_setup): ... this. Reimplement.
8322 (target_regsets): Rename to ...
8323 (tic6x_regsets): ... this, and make static.
8324 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8325 (tic6x_regs_info): New function.
8326 (the_low_target): Adjust.
8327 (initialize_low_arch): New function.
8328 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8329 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8330 (target_regsets): Rename to ...
8331 (xtensa_regsets): ... this, and make static.
8332 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8333 globals.
8334 (xtensa_arch_setup, xtensa_regs_info): New functions.
8335 (the_low_target): Adjust.
8336 (initialize_low_arch): New function.
8337 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8338 (nios2_arch_setup): Set the current process'es tdesc.
8339 (target_regsets): Rename to ...
8340 (nios2_regsets): ... this.
8341 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8342 (nios2_regs_info): New function.
8343 (the_low_target): Adjust.
8344 (initialize_low_arch): New function.
a261b8f5
PA
8345 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8346 (aarch64_arch_setup): Set the current process'es tdesc.
8347 (target_regsets): Rename to ...
8348 (aarch64_regsets): ... this.
8349 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8350 (aarch64_regs_info): New function.
8351 (the_low_target): Adjust.
8352 (initialize_low_arch): New function.
3aee8918
PA
8353 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8354 globals.
8355 (target_regsets): Rename to ...
8356 (tile_regsets): ... this.
8357 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8358 (tile_regs_info): New function.
8359 (tile_arch_setup): Set the current process'es tdesc.
8360 (the_low_target): Adjust.
8361 (initialize_low_arch): New function.
8362 * spu-low.c (tdesc_spu): Declare.
8363 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8364 * win32-arm-low.c (tdesc_arm): Declare.
8365 (arm_arch_setup): New function.
8366 (the_low_target): Install arm_arch_setup instead of
8367 init_registers_arm.
8368 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8369 (init_windows_x86): Rename to ...
8370 (i386_arch_setup): ... this. Set `win32_tdesc'.
8371 (the_low_target): Adjust.
8372 * win32-low.c (win32_tdesc): New global.
8373 (child_add_thread): Don't create the thread cache here.
8374 (do_initial_child_stuff): Set the new process'es tdesc.
8375 * win32-low.h (struct target_desc): Forward declare.
8376 (win32_tdesc): Declare.
8377 * lynx-i386-low.c (tdesc_i386): Declare global.
8378 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8379 * lynx-low.c (lynx_tdesc): New global.
8380 (lynx_add_process): Set the new process'es tdesc.
8381 * lynx-low.h (struct target_desc): Forward declare.
8382 (lynx_tdesc): Declare global.
8383 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8384 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8385 * nto-low.c (nto_tdesc): New global.
8386 (do_attach): Set the new process'es tdesc.
8387 * nto-low.h (struct target_desc): Forward declare.
8388 (nto_tdesc): Declare.
8389 * nto-x86-low.c (tdesc_i386): Declare.
8390 (nto_x86_arch_setup): Set `nto_tdesc'.
8391
b1fbec62
GB
83922013-06-04 Gary Benson <gbenson@redhat.com>
8393
8394 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8395 to qSupported response when appropriate.
8396 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8397 with nonzero-length annex.
8398 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8399 arguments supplied in annex.
8400
d1ec4ce7
DE
84012013-05-31 Doug Evans <dje@google.com>
8402
ac44adcb 8403 PR server/15594
d1ec4ce7
DE
8404 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8405 64 bits in 64-cross-32 environment.
8406
9b25f2d3
PA
84072013-05-28 Pedro Alves <palves@redhat.com>
8408
8409 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8410 (aarch64-without-fpu.c): Delete rule.
8411 * configure.srv (aarch64*-*-linux*): Remove references to
8412 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8413 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8414 declaration.
8415
6740dc9c
PA
84162013-05-24 Pedro Alves <palves@redhat.com>
8417
8418 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8419 instead of strchr/decode_address. Error if the range isn't split
8420 with a ','. Don't assume there's be a ':' in the action.
8421
c2d6af84
PA
84222013-05-23 Yao Qi <yao@codesourcery.com>
8423 Pedro Alves <palves@redhat.com>
8424
8425 * linux-low.c (lwp_in_step_range): New function.
8426 (linux_wait_1): If the thread was range stepping and stopped
8427 outside the stepping range, report the stop to GDB. Otherwise,
8428 continue stepping. Add range stepping debug output.
8429 (linux_set_resume_request): Copy the step range from the resume
8430 request to the lwp.
8431 (linux_supports_range_stepping): New.
8432 (linux_target_ops) <supports_range_stepping>: Set to
8433 linux_supports_range_stepping.
8434 * linux-low.h (struct linux_target_ops)
8435 <supports_range_stepping>: New field.
8436 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8437 * linux-x86-low.c (x86_supports_range_stepping): New.
8438 (the_low_target) <supports_range_stepping>: Set to
8439 x86_supports_range_stepping.
8440 * server.c (handle_v_cont): Handle 'r' action.
8441 (handle_v_requests): Append ";r" if the target supports range
8442 stepping.
8443 * target.h (struct thread_resume) <step_range_start,
8444 step_range_end>: New fields.
8445 (struct target_ops) <supports_range_stepping>:
8446 New field.
8447 (target_supports_range_stepping): New macro.
8448
58794e1a
JB
84492013-05-17 Joel Brobecker <brobecker@adacore.com>
8450
8451 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8452 confusion in comment.
8453
d631c5a7
JB
84542013-05-17 Joel Brobecker <brobecker@adacore.com>
8455
8456 * lynx-low.c (struct process_info_private): New type.
8457 (lynx_add_process): New function.
8458 (lynx_create_inferior, lynx_attach): Replace calls to
8459 add_process by calls to lynx_add_process.
8460 (lynx_resume): If PTID is null, then try using
8461 current_process()->private->last_wait_event_ptid.
8462 Add comments.
8463 (lynx_clear_inferiors): Delete. The contents of that function
8464 has been inlined in lynx_mourn;
8465 (lynx_wait_1): Save the ptid in the process's private data.
8466 (lynx_mourn): Free the process' private data. Replace call
8467 to lynx_clear_inferiors by call to clear_inferiors.
8468
96f7a20f
YQ
84692013-05-17 Yao Qi <yao@codesourcery.com>
8470
8471 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8472 the right place.
8473
db0dfaa0
LM
84742013-05-16 Luis Machado <lgustavo@codesourcery.com>
8475
8476 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8477 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8478 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8479 PT_TEXT_END_ADDR guards. Update comments.
8480 (linux_target_op) <read_offsets>: Conditionally define to
8481 linux_read_offsets if the target is UCLIBC and if it defines
8482 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8483
68f5f838
SL
84842013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8485 Andrew Jenner <andrew@codesourcery.com>
8486
8487 * Makefile.in (SFILES): Add linux-nios2-low.c.
8488 (clean): Add action to delete nios2-linux.c.
8489 (nios2-linux.c): New rule.
8490 * configure.srv: Add nios2*-*-linux*.
8491 * linux-nios2-low.c: New.
8492
1ebff1fd
HAQ
84932013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8494
8495 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8496
f6150862
HZ
84972013-04-25 Hui Zhu <hui@codesourcery.com>
8498
8499 PR gdb/15186
f6150862
HZ
8500 * ax.c (ax_printf): Add fflush.
8501
614c279d
TT
85022013-04-22 Tom Tromey <tromey@redhat.com>
8503
8504 * Makefile.in (SFILES): Add filestuff.c.
8505 (OBS): Add filestuff.o.
8506 (filestuff.o): New target.
8507 * config.in, configure: Rebuild.
8508 * configure.ac: Check for fdwalk, pipe2.
8509
7d4e5717
PA
85102013-04-17 Pedro Alves <palves@redhat.com>
8511
8512 * configure.ac (USE_THREAD_DB): Delete variable.
8513 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8514 Don't AC_SUBST USE_THREAD_DB.
8515 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8516 * config.in, configure: Regenerate.
8517
d5c93e41
PA
85182013-04-16 Pedro Alves <palves@redhat.com>
8519
8520 * linux-low.h (struct lwp_info) <thread_known>: Move under
8521 the USE_THREAD_DB #ifdef.
8522
04f5fe89
PA
85232013-04-16 Pedro Alves <palves@redhat.com>
8524
8525 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8526 (linux-low.o): Delete rule.
8527 * linux-low.h: Always include "gdb_thread_db.h" instead of
8528 conditionally including thread_db.h.
8529 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8530 HAVE_THREAD_DB_H.
8531
480b27bf
JK
85322013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8533
8534 * Makefile.in (install-only): Fix make install regression.
8535
43662968
JK
85362013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8537
8538 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8539 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8540 installation.
8541 * gdbserver.1: Remove.
8542
3e74e146
PA
85432013-03-22 Pedro Alves <palves@redhat.com>
8544
8545 * linux-low.c (handle_extended_wait): Don't call
8546 linux_enable_event_reporting.
8547
a8347a2a
TT
85482013-03-15 Tony Theodore <tonyt@logyst.com>
8549
8550 PR build/9098:
8551 * Makefile.in (SHELL): Use @SHELL@.
8552
eeb56fa7
SDJ
85532013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8554
8555 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8556 compiler warning.
8557
4fa7e2ff
JB
85582013-03-13 Joel Brobecker <brobecker@adacore.com>
8559
8560 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8561 Remove extraneous NULL element.
8562
8ddb1965
YQ
85632013-03-13 Yao Qi <yao@codesourcery.com>
8564
8565 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8566 'V' block in trace frame.
8567
9accd112
MM
85682013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8569
8570 * target.h (struct target_ops): Add btrace ops.
8571 (target_supports_btrace): New macro.
8572 (target_enable_btrace): New macro.
8573 (target_disable_btrace): New macro.
8574 (target_read_btrace): New macro.
8575 * gdbthread.h (struct thread_info): Add btrace field.
8576 * server.c: Include btrace-common.h.
8577 (handle_btrace_general_set): New function.
8578 (handle_btrace_enable): New function.
8579 (handle_btrace_disable): New function.
8580 (handle_general_set): Call handle_btrace_general_set.
8581 (handle_qxfer_btrace): New function.
8582 (struct qxfer qxfer_packets[]): Add btrace entry.
8583 * inferiors.c (remove_thread): Disable btrace.
8584 * linux-low: Include linux-btrace.h.
8585 (linux_low_enable_btrace): New function.
8586 (linux_low_read_btrace): New function.
8587 (linux_target_ops): Add btrace ops.
8588 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8589 Add srv_linux_btrace=yes.
8590 (x86_64-*-linux*): Add linux-btrace.o.
8591 Add srv_linux_btrace=yes.
8592 * configure.ac: Define HAVE_LINUX_BTRACE.
8593 * config.in: Regenerated.
8594 * configure: Regenerated.
8595
5cc22e4c
MM
85962013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8597
8598 * server.c (handle_qxfer): Preserve error message if -3 is
8599 returned.
8600 (qxfer): Document the -3 return value.
8601
7c97f91e
MM
86022013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8603
8604 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8605 (linux_btrace_h): New variable.
8606 (linux-btrace.o): New rule.
8607
be9a119c 86082013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8609 Hafiz Abid Qadeer <abidh@codesourcery.com>
8610
8611 * tracepoint.c (trace_buffer_size): New global.
8612 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8613 (init_trace_buffer): Change to one-argument function. Allocate
8614 trace buffer memory.
8615 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8616 handle QTBuffer:size packet.
8617 (cmd_bigqtbuffer_size): New function.
8618 (initialize_tracepoint): Call init_trace_buffer with
8619 DEFAULT_TRACE_BUFFER_SIZE.
8620 * server.c (handle_query): Add QTBuffer:size in the
8621 supported packets.
8622
e64f7499
YQ
86232013-03-07 Yao Qi <yao@codesourcery.com>
8624
8625 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8626 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8627 of -1.
8628 (cmd_qtsp): Adjust condition. Do post increment.
8629 Set cur_action and cur_step_action back to 0.
8630
f0ae6fc3
PA
86312013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8632
8633 PR server/15236
8634 * linux-low.c (linux_write_memory): Return early success if LEN is
8635 zero.
8636
b5b0b0af
CV
86372013-03-05 Corinna Vinschen <vinschen@redhat.de>
8638
334ad4a8 8639 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8640
589bc927
TT
86412013-02-28 Tom Tromey <tromey@redhat.com>
8642
8643 * configure.ac: Invoke AC_SYS_LARGEFILE.
8644 * configure, config.in: Rebuild.
8645
dfe07582
CV
86462013-02-28 Corinna Vinschen <vinschen@redhat.com>
8647
8648 * win32-low.c: Throughout, fix format strings and casts of
8649 printf-like functions to avoid type related warnings on all
8650 platforms.
8651 (get_child_debug_event): Print dwDebugEventCode as hex since
8652 that's how it's usually documented.
8653
736cd585
YQ
86542013-02-28 Yao Qi <yao@codesourcery.com>
8655
8656 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8657 pulongest.
8658
e1f58301
JW
86592013-02-27 Jiong Wang <jiwang@tilera.com>
8660
8661 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8662 (reg-tilegx32.c): New rule.
8663 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8664 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8665 different register info initializer according to elf class.
8666 (init_registers_tilgx32): New function. The tilegx32 register info
8667 initializer.
8668 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8669 (tile_store_gregset): Likewise.
8670
d171ca78
YQ
86712013-02-27 Yao Qi <yao@codesourcery.com>
8672
8673 * server.c (process_point_options): Print debug message when
8674 debug_threads is true.
8675
282bbdf3
YQ
86762013-02-26 Yao Qi <yao@codesourcery.com>
8677
8678 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8679
aca22551
PA
86802013-02-19 Pedro Alves <palves@redhat.com>
8681 Kai Tietz <ktietz@redhat.com>
8682
8683 PR gdb/15161
8684
8685 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8686 instead of strtoul to extract address from packet.
8687 (process_serial_event) <'z'>: Likewise.
8688
4f3cee1c
YQ
86892013-02-18 Yao Qi <yao@codesourcery.com>
8690
8691 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8692
8e1d55a3
PA
86932013-02-14 Pedro Alves <palves@redhat.com>
8694
8695 Plug memory leak.
8696
8697 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8698 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8699
458820da
PA
87002013-02-14 Pedro Alves <palves@redhat.com>
8701
8702 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8703
baea0dae
PA
87042013-02-14 Pedro Alves <palves@redhat.com>
8705
8706 * tracepoint.c (save_string): Delete.
8707 (add_tracepoint_action): Use savestring instead of save_string.
8708
0b1afbb3
PA
87092013-02-12 Pedro Alves <palves@redhat.com>
8710
8711 * linux-xtensa-low.c: Ditto.
8712 * xtensa-xtregs.c: Ditto.
8713
8a4ac37e
PA
87142013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8715
8716 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8717 thread_db.
8718
148de6bb
MS
87192013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8720
8721 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8722 aarch64_num_wp_regs and aarch64_num_bp_regs to
8723 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8724
55fac6e0
MS
87252013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8726
8727 * linux-aarch64-low.c (ps_get_thread_area): Replace
8728 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8729
176eb98c
MS
87302013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8731 Marcus Shawcroft <marcus.shawcroft@arm.com>
8732 Nigel Stephens <nigel.stephens@arm.com>
8733 Yufeng Zhang <yufeng.zhang@arm.com>
8734
8735 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8736 (aarch64.c, aarch64-without-fpu.c): New targets.
8737 * configure.srv (aarch64*-*-linux*): New.
8738 * linux-aarch64-low.c: New file.
8739
56f7af9c
MS
87402013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8741
43aaf8b6 8742 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8743 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8744 (dequeue_one_deferred_signal, linux_resume_one_thread)
8745 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8746 (linux_tracefork_grandchild, linux_test_for_tracefork)
8747 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8748 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8749 where the argument is 0.
8750
60f662b0
YQ
87512013-01-25 Yao Qi <yao@codesourcery.com>
8752
8753 * event-loop.c: Include "queue.h".
8754 (gdb_event_p): New typedef.
8755 (struct gdb_event) <next_event>: Remove.
8756 (event_queue): Change to QUEUE(gdb_event_p).
8757 (async_queue_event): Remove.
8758 (gdb_event_xfree): New.
8759 (initialize_event_loop): New.
8760 (process_event): Use API from QUEUE.
8761 (wait_for_event): Likewise.
8762 * server.c (main): Call initialize_event_loop.
8763 * server.h (initialize_event_loop): Declare.
8764
5ae4861a
YQ
87652013-01-18 Yao Qi <yao@codesourcery.com>
8766
8767 * ax.h (struct eval_agent_expr_context): New.
8768 (gdb_eval_agent_expr): Update declaration.
8769 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8770 TFRAME. Add new argument CTX.
8771 * server.h (struct eval_agent_expr_context): Declare.
8772 (agent_mem_read, agent_tsv_read): Update declaration.
8773 (agent_mem_read_string): Likewise.
8774 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8775 (add_traceframe_block): Add new argument TPOINT.
8776 Increase TPOINT->traceframe_usage.
8777 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8778 eval_tracepoint_agent_expr.
8779 (condition_true_at_tracepoint): Likewise.
8780 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8781 (agent_mem_read_string, agent_tsv_read): Likewise.
8782
85e00e85
YQ
87832013-01-16 Yao Qi <yao@codesourcery.com>
8784
8785 * linux-low.c (linux_resume_one_lwp): Don't check
8786 'lwp->bp_reinsert != 0'.
8787
4039cf45
JB
87882013-01-07 Joel Brobecker <brobecker@adacore.com>
8789 Pedro Alves <palves@redhat.com>
8790
8791 * lynx-low.c (ptrace_request_to_str): Define a temporary
8792 macro and use it to simplify this function's implementation.
8793
9044dee2
JB
87942013-01-07 Joel Brobecker <brobecker@adacore.com>
8795
8796 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8797 sets errno.
8798
e6352c8f
JB
87992013-01-07 Joel Brobecker <brobecker@adacore.com>
8800
8801 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8802
50681a27
JB
88032013-01-07 Joel Brobecker <brobecker@adacore.com>
8804
8805 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8806
3f6e77ef
JB
88072013-01-07 Joel Brobecker <brobecker@adacore.com>
8808
8809 * lynx-low.c (lynx_resume): Use the resume_info parameter
8810 to determine the ptid for the lynx_ptrace call, unless
8811 it is equal to minus_one_ptid, in which case we use the
8812 ptid of the current_inferior.
8813 (lynx_wait_1): After having received a thread create/exit
8814 event, resume the inferior's execution using the signaling
8815 thread's ptid, rather than the old ptid.
8816
7fda33ae
JB
88172013-01-07 Joel Brobecker <brobecker@adacore.com>
8818
8819 * lynx-low.c (lynx_resume): Delete variable ret.
8820
b9786c74
JB
88212013-01-01 Joel Brobecker <brobecker@adacore.com>
8822
8823 * gdbreplay.c (gdbreplay_version): Update copyright year.
8824 * server.c (gdbserver_version): Likewise.
8825
8b93d60f
JB
88262012-12-17 Joel Brobecker <brobecker@adacore.com>
8827
8828 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8829 new thread.
8830
037335a7
JB
88312012-12-17 Joel Brobecker <brobecker@adacore.com>
8832
8833 * lynx-low.c (ptrace_request_to_str): Add handling for
8834 PTRACE_GETTRACESIG.
8835
52d4cbd8
JB
88362012-12-17 Joel Brobecker <brobecker@adacore.com>
8837
8838 * lynx-low.c (lynx_attach): Delete variable new_process.
8839
ab8f6ca9
JB
88402012-12-17 Joel Brobecker <brobecker@adacore.com>
8841
8842 * lynx-low.c (lynx_create_inferior): Delete variable
8843 new_process.
8844
78cbc024
JB
88452012-12-17 Joel Brobecker <brobecker@adacore.com>
8846
8847 * lynx-low.c (ptrace_request_to_str): Do not handle
8848 PTRACE_GETTHREADLIST if this macro does not exist.
8849
14a00470
YQ
88502012-12-15 Yao Qi <yao@codesourcery.com>
8851
8852 * Makefile.in (OBS): Add notif.o.
8853 * notif.c, notif.h: New.
8854 * server.c: Include "notif.h".
8855 (struct vstop_notif) <next>: Remove.
8856 <base>: New field.
8857 (queue_stop_reply): Update.
8858 (push_event, send_next_stop_reply): Remove.
8859 (discard_queued_stop_replies): Update.
8860 (notif_stop): New variable.
8861 (handle_v_stopped): Remove.
8862 (handle_v_requests): Don't call handle_v_stopped. Call
8863 handle_ack_notif instead.
8864 (queue_stop_reply_callback): Call notif_event_enque instead
8865 of queue_stop_reply.
8866 (handle_status): Don't call send_next_stop_reply, call
8867 notif_write_event instead.
8868 (kill_inferior_callback): Likewise.
8869 (detach_or_kill_inferior_callback): Likewise.
8870 (main): Call initialize_notif.
8871 (process_serial_event): Call QUEUE_is_empty.
8872 (handle_target_event): Call notif_push instead of push event.
8873 * server.h (push_event): Remove declaration.
8874
61c125b9
TT
88752012-12-10 Tom Tromey <tromey@redhat.com>
8876
8877 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8878 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8879 macros.
8880 (.c.o): Rewrite.
8881 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8882 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8883 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8884 (amd64-linux-ipa.o, ax.o): Rewrite.
8885 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8886 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8887 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8888 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8889 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8890 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8891 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8892 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8893 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8894 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8895 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8896 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8897 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8898 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8899 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8900 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8901 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8902 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8903 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8904 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8905 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8906 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8907 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8908 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8909 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8910 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8911 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8912 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8913 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8914 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8915 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8916 (reg-tilegx.o): Remove.
8917 (all_object_files): New macro.
8918 Include .deps files.
8919 * aclocal.m4, configure: Rebuild.
8920 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8921 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8922 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8923
e90e9ad9
TT
89242012-12-05 Tom Tromey <tromey@redhat.com>
8925
8926 PR gdb/14917:
8927 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8928
02d403bf 89292012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8930
8931 * configure.ac: Check for linux/perf_event.h.
8932 * config.in: Regenerated.
8933 * configure: Regenerated.
8934
0270a750
PA
89352012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8936
8937 * hostio.c (handle_readlink): Decrease buffer size
8938 parameter passed to readlink by one byte.
8939
8c29b58e
YQ
89402012-11-26 Yao Qi <yao@codesourcery.com>
8941
8942 * configure.ac (build_warnings): Append '-Wempty-body'.
8943 * configure: Regenerated.
8944 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8945 body.
8946
8bdce1ff
PM
89472012-11-15 Pierre Muller <muller@sourceware.org>
8948
8949 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8950 * config.in: Regenerate.
8951 * configure: Regenerate.
8952 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8953 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8954 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8955 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8956 header.
8957 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8958 instead of <sys/wait.h> header.
8959 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8960
02d403bf 89612012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8962
8963 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8964 (various make rules): Remove -DGDBSERVER
8965
fbd5db48
YQ
89662012-11-09 Yao Qi <yao@codesourcery.com>
8967
8968 * spu-low.c (current_ptid): Move it to ..
8969 * gdbthread.h: ... here. New.
8970 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8971 * server.c (myresume, process_serial_event): Likewise.
8972 * thread-db.c (thread_db_find_new_threads): Likewise.
8973 * tracepoint.c (run_inferior_command): Likewise.
8974
b3dc46ff
AB
89752012-10-01 Andrew Burgess <aburgess@broadcom.com>
8976
8977 * server.c (handle_search_memory_1): Include access length in
8978 warning message.
8979
07c04788
HPN
89802012-09-05 Michael Brandt <michael.brandt@axis.com>
8981
8982 * linux-crisv32-low.c: Fix compile errors.
8983
918d227b
YQ
89842012-09-04 Yao Qi <yao@codesourcery.com>
8985
8986 * tracepoint.c (cmd_qtsv): Adjust debug message.
8987 Don't check CUR_TPOINT.
8988
18c1b81a
YQ
89892012-08-28 Yao Qi <yao@codesourcery.com>
8990
8991 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8992 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8993 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8994 Remove declarations of xmalloc, xreallloc, xstrdup and
8995 freeargv.
8996 * Makefile.in (libiberty_h): New.
8997 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8998 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8999
dc82f37b
YQ
90002012-08-23 Yao Qi <yao@codesourcery.com>
9001
9002 * server.h: Remove declaration of 'xsnprintf'.
9003
406b1477
KS
90042012-08-22 Keith Seitz <keiths@redhat.com>
9005
9006 * server.h: Include build-gnulib-gbserver/config.h.
9007 * gdbreplay.c: Likewise.
9008
e6712ff1
DE
90092012-08-08 Doug Evans <dje@google.com>
9010
9011 * Makefile.in (SFILES): Add gdb_vecs.c.
9012 (OBS): Add gdb_vecs.o.
9013 (gdb_vecs_h, host_defs_h): New variables.
9014 (thread-db.o): Add $(gdb_vecs_h) dependency.
9015 (gdb_vecs.o): New rule.
9016 * thread-db.c: #include "gdb_vecs.h".
9017 (thread_db_load_search): Use a vector to iterate over path elements.
9018 Handle text appearing after "$pdir".
9019
9020 * configure.ac: Add check for strstr.
9021 * config.in: Regenerate.
9022 * configure: Regenerate.
9023
7c3270ae
UW
90242012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9025
9026 * hostio.c (handle_pread): If pread fails, fall back to attempting
9027 lseek/read.
9028 (handle_pwrite): Likewise for pwrite.
9029
b62e2b27
UW
90302012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9031
9032 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9033 between unsupported TYPE and unimplementable ADDR/LEN combination.
9034 (arm_insert_point): Act on new return value.
9035
78a99e91
PA
90362012-07-31 Pedro Alves <palves@redhat.com>
9037
9038 * server.c (process_point_options): Only skip tokens if we find
9039 one that is unrecognized. Don't treat 'X' specially while
9040 skipping unrecognized tokens.
9041
fcf303ab
UW
90422012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9043
9044 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9045 to 4-byte-align HW breakpoint addresses for Thumb.
9046
7255706c
YQ
90472012-07-27 Yao Qi <yao@codesourcery.com>
9048
9049 PR remote/14161.
9050
9051 * server.h: Declare gdb_agent_about_to_close.
9052 * target.c (kill_inferior): Include "agent.h".
9053 New. Send command 'kill'.
9054 * target.h (kill_inferior): Removed macro.
9055 * tracepoint.c (gdb_agent_about_to_close): New.
9056 (gdb_agent_helper_thread): Handle command 'close'.
9057 Wait endlessly until the inferior stops.
9058 Install gdb_agent_remove_socket to atexit hook.
9059 (agent_socket_name): New static variable.
9060 (gdb_agent_socket_init): Replace local variable 'name' with
9061 'agent_socket_name'.
9062 (gdb_agent_remove_socket): New.
9063
5a3f286f
YQ
90642012-07-27 Yao Qi <yao@codesourcery.com>
9065
9066 * server.c (process_point_options): Stop at 'X' when parsing.
9067
961bd387
ME
90682012-07-19 Michael Eager <eager@eagercon.com>
9069
a261b8f5 9070 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
9071 to hw_execute.
9072 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9073 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9074 hardware breakpoint.
9075
aa7c7447
JK
90762012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9077
9078 * gdbserver/linux-low.c (initialize_low): Call
9079 linux_ptrace_init_warnings.
9080
7f216e7c
DE
90812012-07-02 Doug Evans <dje@google.com>
9082
9083 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9084 pointer to int.
9085
d3ce09f5
SS
90862012-07-02 Stan Shebs <stan@codesourcery.com>
9087
9088 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9089 (ax.o): Add it to build rule.
9090 (ax-ipa.o): Ditto.
9091 (OBS): Add format.o.
9092 (IPA_OBS): Add format.o.
9093 * server.c (handle_query): Claim support for breakpoint commands.
9094 (process_point_options): Add command case.
9095 (process_serial_event): Leave running if there are printfs in
9096 effect.
9097 * mem-break.h (any_persistent_commands): Declare.
9098 (add_breakpoint_commands): Declare.
9099 (gdb_no_commands_at_breakpoint): Declare.
9100 (run_breakpoint_commands): Declare.
9101 * mem-break.c (struct point_command_list): New struct.
9102 (struct breakpoint): New field command_list.
9103 (any_persistent_commands): New function.
9104 (add_commands_to_breakpoint): New function.
9105 (add_breakpoint_commands): New function.
9106 (gdb_no_commands_at_breakpoint): New function.
9107 (run_breakpoint_commands): New function.
9108 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9109 locally.
9110 * ax.c: Include format.h.
9111 (ax_printf): New function.
9112 (gdb_eval_agent_expr): Add printf opcode.
9113
2f8f6aed
YQ
91142012-06-13 Yao Qi <yao@codesourcery.com>
9115
9116 * server.c (start_inferior): Remove duplicated writes to fields
9117 'last_resume_kind' and 'last_status' of 'current_inferior'.
9118
0c9070b3
YQ
91192012-06-12 Yao Qi <yao@codesourcery.com>
9120 Pedro Alves <palves@redhat.com>
9121
9122 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9123 comment.
9124 * server.c (handle_v_cont): Extend comment.
9125
c52daf70
YQ
91262012-06-11 Yao Qi <yao@codesourcery.com>
9127
9128 * linux-low.c (linux_attach): Add 'static'.
9129
d38bbb0a
YQ
91302012-06-06 Yao Qi <yao@codesourcery.com>
9131
9132 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9133
89dc0afd
JK
91342012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9135
9136 Fix gcc -flto compilation warning.
9137 * server.c (main): Make variable multi_mode and attach volatile.
9138
75f62ce7
TJB
91392012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9140
9141 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9142 if the platform doesn't know about it.
9143
65f479b6
PA
91442012-05-30 Jeff Kenton <jkenton@tilera.com>
9145
9146 * Makefile.in (SFILES): Add linux-tile-low.c.
9147 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9148 * configure.srv: Handle tilegx-*-linux*.
9149 * linux-tile-low.c: New file.
9150
0c5bf5a9
JK
91512012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9152
9153 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9154
a493e3e2
PA
91552012-05-24 Pedro Alves <palves@redhat.com>
9156
9157 PR gdb/7205
9158
43aaf8b6 9159 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 9160
2ea28649
PA
91612012-05-24 Pedro Alves <palves@redhat.com>
9162
9163 PR gdb/7205
9164
9165 Replace target_signal with gdb_signal throughout.
9166
8d409d16
MR
91672012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9168
9169 * linux-low.c (linux_store_registers): Avoid the copying sequence
9170 when no data has been retrieved by ptrace.
9171
23512c01
MGD
91722012-05-22 Will Deacon <will.deacon@arm.com>
9173
9174 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9175 Include asm/ptrace.h.
9176 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9177 already defined.
9178
4934b29e
MR
91792012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9180
9181 * linux-low.c (linux_store_registers): Don't re-retrieve data
9182 with ptrace that has already been obtained from /proc. Always
9183 copy any data retrieved with ptrace to the buffer supplied.
9184
bde24c0a
PA
91852012-05-11 Yao Qi <yao@codesourcery.com>
9186 Pedro Alves <palves@redhat.com>
9187
9188 * linux-low.c (enum stopping_threads_kind): New.
9189 (stopping_threads): Change type to `enum stopping_threads_kind'.
9190 (handle_extended_wait): If stopping and suspending threads, leave
9191 the new_lwp suspended too.
9192 (linux_wait_for_event): Adjust.
9193 (stop_all_lwps): Set `stopping_threads' to
9194 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9195 whether we're suspending threads or just stopping them. Assert no
9196 recursion happens.
9197
623b6bdf
YQ
91982012-04-29 Yao Qi <yao@codesourcery.com>
9199
9200 * server.h: Move some code to ...
9201 * gdbthread.h: ... here. New.
9202 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9203 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9204 (nto-low.o, win32-low.o): Likewise.
9205 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9206 * regcache.c, remote-utils.c, server.c: Likewise.
9207 * target.c, tracepoint.c, win32-low.c: Likewise.
9208
f15f9948
TJB
92092012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9210
9211 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9212 (PTRACE_ARG4_TYPE): Likewise.
9213 (PTRACE_XFER_TYPE): Likewise.
9214 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9215 ptrace to PTRACE_ARG3_TYPE.
9216 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9217 (PTRACE_ARG4_TYPE): Likewise.
9218 (PTRACE_XFER_TYPE): Likewise.
9219 (linux_detach_one_lwp): Cast fourth argument of
9220 ptrace to long then PTRACE_ARG4_TYPE.
9221 (regsets_fetch_inferior_registers): Cast third argument of
9222 ptrace to long then PTRACE_ARG3_TYPE.
9223 (regsets_store_inferior_registers): Likewise.
9224
38ea300a
PA
92252012-04-20 Pedro Alves <palves@redhat.com>
9226
9227 * configure: Regenerate.
9228
c971b7fa
PA
92292012-04-19 Pedro Alves <palves@redhat.com>
9230
43aaf8b6 9231 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 9232 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
9233 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9234 (all, install-only, uninstall, clean-info, all-lib, clean): No
9235 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9236 (maintainer-clean realclean distclean): Use subdir_do.
9237 (subdir_do): New.
9238 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 9239 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
9240 * acinclude.m4: Include acx_configure_dir.m4.
9241 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9242 calls. Call AC_PROG_RANLIB. Configure gnulib using
9243 ACX_CONFIGURE_DIR.
9244 (GNULIB): New.
9245 (GNULIB_STDINT_H): Adjust.
9246 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9247 * gdbreplay.c: Include build-gnulib/config.h.
9248 * server.h: Likewise.
9249 * aclocal.m4: Regenerate.
9250 * config.in: Regenerate.
9251 * configure: Regenerate.
c971b7fa 9252
809277f8
PA
92532012-04-19 Pedro Alves <palves@redhat.com>
9254
9255 * Makefile.in (LIBGNU, INCGNU): Adjust.
9256 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9257 (all, install-only, uninstall, clean-info, all-lib, clean)
9258 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9259 * configure.ac: Adjust AC_OUTPUT output.
9260 * aclocal.m4: Regenerate.
9261 * configure: Regenerate.
9262
fd9bb8b8
PA
92632012-04-19 Pedro Alves <palves@redhat.com>
9264
9265 * Makefile.in (generated_files): New.
9266 (server_h): Remove the explicit dependency on config.h, and depend
9267 on $generated_files.
9268
1c298c66
PA
92692012-04-19 Pedro Alves <palves@redhat.com>
9270
9271 * Makefile.in (INCGNU): Add -Ignulib.
9272
57c4b50b
PA
92732012-04-19 Pedro Alves <palves@redhat.com>
9274
9275 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9276 (INCGNU): ... this, and spell out -I here.
9277 (GNULIB_LIB): Rename to ...
9278 (LIBGNU): ... this.
9279 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9280
1030e047
PA
92812012-04-19 Pedro Alves <palves@redhat.com>
9282
9283 * config.in: Regenerate.
9284
447d4319
PA
92852012-04-19 Pedro Alves <palves@redhat.com>
9286
9287 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9288 * server.h (memmem): Remove declaration.
9289 * config.in: Regenerate.
9290 * configure: Regenerate.
9291
aad9eab9
YQ
92922012-04-19 Yao Qi <yao@codesourcery.com>
9293
9294 * Makefile.in (SFILES): Add common/vec.c.
9295 (OBS): Add vec.o.
9296 (vec.o): New rule.
9297
3e10640f
YQ
92982012-04-19 Yao Qi <yao@codesourcery.com>
9299
9300 * remote-utils.c (prepare_resume_reply): Replace with macro
9301 target_core_of_thread.
9302 * server.c (handle_qxfer_threads_proper): Likewise.
9303 * target.h (traget_core_of_thread): New macro.
9304
71622373
PA
93052012-04-18 Pedro Alves <palves@redhat.com>
9306
9307 * aclocal.m4: Regenerate.
9308 * configure: Regenerate.
9309
80d26939
YQ
93102012-04-16 Yao Qi <yao@codesourcery.com>
9311
9312 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9313 duplicated on address.
9314
42476b70
YQ
93152012-04-16 Yao Qi <yao@codesourcery.com>
9316
9317 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9318 (struct tracepoint_action_ops) <send>: New field.
9319 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9320 (agent_expr_send, x_tracepoint_action_send): New.
9321 (l_tracepoint_action_send): New.
9322 (cmd_qtdp): Download and install tracepoint
9323 according to `use_agent'.
9324 (run_inferior_command): Add one more parameter `len'.
9325 Update callers.
9326 (tracepoint_send_agent): New.
9327 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9328
7bc83639
YQ
93292012-04-16 Yao Qi <yao@codesourcery.com>
9330
9331 * tracepoint.c (download_tracepoints): Moved to ...
9332 (cmd_qtstart): ... here.
9333
5f18041e
YQ
93342012-04-14 Yao Qi <yao@codesourcery.com>
9335
9336 * tracepoint.c: Include inttypes.h.
9337 (struct collect_memory_action): Use sized types.
9338 (struct tracepoint): Likewise.
9339 (cmd_qtdp, stop_tracing): Update print specifiers.
9340 (cmd_qtp, response_tracepoint): Likewise.
9341 (collect_data_at_tracepoint): Likewise.
9342 (collect_data_at_step): Likewise.
9343
55a8c076
YQ
93442012-04-14 Yao Qi <yao@codesourcery.com>
9345
9346 Import gnulib module inttypes.
9347 * aclocal.m4, config.in, configure: Regenerated.
9348
dc750257
YQ
93492012-04-14 Yao Qi <yao@codesourcery.com>
9350
9351 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9352 Makefile and config.status at last.
9353
0ab5faf9
YQ
93542012-04-13 Yao Qi <yao@codesourcery.com>
9355
9356 * tracepoint.c: Include stdint.h unconditionally.
9357
18f5fd81
TJB
93582012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9359
9360 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9361 on BFD_HAVE_SYS_PROCFS_TYPE.
9362 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9363 * configure: Regenerate.
9364 * config.in: Likewise.
9365
4d47af5c
L
93662012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9367
9368 * Makefile.in (clean): Also remove x32.c x32-linux.c
9369 x32-avx.c x32-avx-linux.c.
9370 (x32.o): New target.
9371 (x32.c): Likewise.
9372 (x32-linux.o): Likewise.
9373 (x32-linux.c): Likewise.
9374 (x32-avx.o): Likewise.
9375 (x32-avx.c): Likewise.
9376 (x32-avx-linux.o): Likewise.
9377 (x32-avx-linux.c): Likewise.
9378
9379 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9380 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9381 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9382 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9383 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9384 i386/x32-avx-linux.xml.
9385
9386 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9387 (init_registers_x32_avx_linux): Likwise.
9388 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9389 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9390
ecedbe58
PA
93912012-04-13 Pedro Alves <palves@redhat.com>
9392
9393 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9394 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9395 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9396 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9397 the sub-make.
9398
c92b5177
L
93992012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9400
9401 * linux-x86-low.c (compat_x32_clock_t): New.
9402 (compat_x32_siginfo_t): Likewise.
9403 (compat_x32_siginfo_from_siginfo): Likewise.
9404 (siginfo_from_compat_x32_siginfo): Likewise.
9405 (linux_is_elf64): Likewise.
9406 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9407 and siginfo_from_compat_x32_siginfo for x32.
9408 (x86_arch_setup): Set linux_is_elf64.
9409
214d508e
L
94102012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9411
9412 PR gdb/13969
9413 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9414 e_machine field.
9415 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9416 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9417 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9418 compatible with process.
9419
c9a1864a
YQ
94202012-04-12 Yao Qi <yao@codesourcery.com>
9421
9422 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9423 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9424 (install-only, install-info, clean): Handle sub dir gnulib.
9425 (all-lib, am--refresh): New targets.
9426 (memmem.o): Remove target.
9427 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9428 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9429 (AC_REPLACE_FUNCS): Remove memmem.
9430 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9431 (AC_OUTPUT): Generate Makefile in gnulib/.
9432 * aclocal.m4, config.in, configure: Regenerated.
9433
367ba2c2
MR
94342012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9435
9436 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9437
9d236627
PA
94382012-04-05 Pedro Alves <palves@redhat.com>
9439
9440 -Werror=strict-aliasing
9441
9442 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9443 pointer.
9444
111217b3
PA
94452012-04-04 Pedro Alves <palves@redhat.com>
9446
9447 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9448 (sparc_store_gregset_from_stack, sparc_store_gregset)
9449 (sparc_breakpoint_at): Fix formatting.
9450
8365dcf5
TJB
94512012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9452
9453 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9454 are available.
9455 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9456 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9457 * config.in: Regenerate.
9458 * configure: Likewise.
9459
689cc2ae
PA
94602012-03-29 Pedro Alves <palves@redhat.com>
9461
9462 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9463 Correct ptrace arguments.
9464
c14dfd32
PA
94652012-03-28 Pedro Alves <palves@redhat.com>
9466
9467 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9468 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9469 (IA64_FR1_REGNUM): New defines.
9470 (ia64_fetch_register): New.
9471 (the_low_target): Install it.
9472 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9473 field.
9474 * linux-low.c (linux_fetch_registers): Try the
9475 the_low_target.fetch_register hook first.
9476
9477 * linux-arm-low.c (the_low_target): Adjust.
9478 * linux-bfin-low.c (the_low_target): Adjust.
9479 * linux-cris-low.c (the_low_target): Adjust.
9480 * linux-crisv32-low.c (the_low_target): Adjust.
9481 * linux-m32r-low.c (the_low_target): Adjust.
9482 * linux-m68k-low.c (the_low_target): Adjust.
9483 * linux-mips-low.c (the_low_target): Adjust.
9484 * linux-ppc-low.c (the_low_target): Adjust.
9485 * linux-s390-low.c (the_low_target): Adjust.
9486 * linux-sh-low.c (the_low_target): Adjust.
9487 * linux-sparc-low.c (the_low_target): Adjust.
9488 * linux-tic6x-low.c (the_low_target): Adjust.
9489 * linux-x86-low.c (the_low_target): Adjust.
9490 * linux-xtensa-low.c (the_low_target): Adjust.
9491
63c88e13
PA
94922012-03-26 Pedro Alves <palves@redhat.com>
9493
9494 * server.c (handle_qxfer_libraries): Don't bail early if
9495 the_target->qxfer_libraries_svr4 is not NULL.
9496
fb723180
PA
94972012-03-26 Pedro Alves <palves@redhat.com>
9498
9499 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9500
0afae3cf
PA
95012012-03-23 Pedro Alves <palves@redhat.com>
9502
9503 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9504 "library-list-svr4" element's start tag when the the DSO list is
9505 empty.
9506
485f1ee4
PA
95072012-03-23 Pedro Alves <palves@redhat.com>
9508
9509 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9510 a variable whose type size is the same as the inferior's pointer
9511 size.
9512
a5362b9a
TS
95132012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9514
9515 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9516 struct siginfo.
9517 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9518 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9519 * linux-low.h: Include <signal.h>.
9520 (struct siginfo): Remove forward declaration.
9521 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9522 struct siginfo.
9523
d226c142
MF
95242012-03-21 Mike Frysinger <vapier@gentoo.org>
9525
9526 * .gitignore: Ignore more files.
9527
122f36ef
PA
95282012-03-19 Pedro Alves <palves@redhat.com>
9529 Jan Kratochvil <jan.kratochvil@redhat.com>
9530
9531 * server.c (cont_thread, general_thread): Add describing comments.
9532 (start_inferior): Clear `cont_thread'.
9533 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9534 of a process.
9535
fc3e5175
YQ
95362012-03-15 Yao Qi <yao@codesourcery.com>
9537
9538 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9539 handling to ...
9540 (cmd_qtdp): ... here.
9541
8d0d92cd
YQ
95422012-03-15 Yao Qi <yao@codesourcery.com>
9543
9544 * tracepoint.c (struct tracepoint_action_ops): New.
9545 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9546 (m_tracepoint_action_download): New.
9547 (r_tracepoint_action_download): New.
9548 (x_tracepoint_action_download): New.
9549 (l_tracepoint_action_download): New.
9550 (add_tracepoint_action): Install `action->ops' according type.
9551 (download_tracepoint_1): Move code `download' function pointer
9552 of various tracepoint_action_ops.
9553
87b0bb13
JK
95542012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9555
9556 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9557 linux_ptrace_attach_warnings.
9558
5f572dec
JK
95592012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9560
9561 * Makefile.in (linux-ptrace.o): New.
9562 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9563 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9564 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9565 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9566 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9567 of these targets.
9568 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9569
f4647387
YQ
95702012-03-08 Yao Qi <yao@codesourcery.com>
9571 Pedro Alves <palves@redhat.com>
9572
9573 Fix PR server/13392.
9574 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9575 offset of JMP insn.
9576 * tracepoint.c (remove_tracepoint): New.
9577 (cmd_qtdp): Call remove_tracepoint when failed to install.
9578
9b224c5e
PA
95792012-03-07 Pedro Alves <palves@redhat.com>
9580
9581 * linux-low.c (get_detach_signal): New.
9582 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9583 Pass on pending signals to PTRACE_DETACH. Check the result of the
9584 ptrace call.
9585 * server.c (program_signals, program_signals_p): New.
9586 (handle_general_set): Handle QProgramSignals.
9587 * server.h (program_signals, program_signals_p): Declare.
9588
e237a7e2
JK
95892012-03-05 Pedro Alves <palves@redhat.com>
9590 Jan Kratochvil <jan.kratochvil@redhat.com>
9591
9592 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9593 New comment why.
9594
5808517f
YQ
95952012-03-03 Yao Qi <yao@codesourcery.com>
9596
9597 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9598 agent_look_up_symbols.
9599
58b4daa5
YQ
96002012-03-03 Yao Qi <yao@codesourcery.com>
9601
9602 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9603 (linux-x86-low.o): Likewise.
9604 * server.h: Remove in_process_agent_loaded.
9605 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9606 common/agent.c.
9607 Update callers.
9608
8ffcbaaf
YQ
96092012-03-03 Yao Qi <yao@codesourcery.com>
9610
9611 * tracepoint.c (gdb_agent_capability): New global.
9612 (in_process_agent_loaded_ust): Renamed to
9613 `in_process_agent_supports_ust'.
9614 Update callers.
9615 (in_process_agent_supports_ust): Call agent_capability_check.
9616 (clear_installed_tracepoints): Assert that agent supports
9617 agent.
9618
d1feda86
YQ
96192012-03-03 Yao Qi <yao@codesourcery.com>
9620
9621 * linux-low.c (linux_supports_agent): New.
9622 (linux_target_ops): Initialize field `supports_agent' with
9623 linux_supports_agent.
9624 * target.h (struct target_ops) <supports_agent>: New.
9625 (target_supports_agent): New macro.
9626 * server.c (handle_general_set): Handle packet 'QAgent'.
9627 (handle_query): Send `QAgent+'.
9628 * Makefile.in (server.o): Depends on agent.h.
9629
2fa291ac
YQ
96302012-03-03 Yao Qi <yao@codesourcery.com>
9631
9632 * Makefile.in (OBS): Add agent.o.
9633 Add new rule for agent.o.
9634 Track dependence of tracepoint.c on agent.h.
9635 * tracepoint.c (run_inferior_command_1):
9636 (run_inferior_command): Call agent_run_command.
9637 (gdb_ust_connect_sync_socket): Deleted. Move it to
9638 common/agent.c.
9639 (resume_thread, stop_thread): Likewise.
9640 (gdb_ust_socket_init): Renamed to ...
9641 (gdb_agent_socket_init): ... New.
9642 (gdb_ust_thread): Renamed to ...
9643 (gdb_agent_helper_thread): ... New.
9644 (gdb_ust_init): Move some code to ...
9645 (gdb_agent_init): ... here. New.
9646 [HAVE_UST]: Call gdb_ust_init.
9647 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9648 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9649 * config.in, configure: Regenerated.
9650
05044653
PA
96512012-03-02 Pedro Alves <palves@redhat.com>
9652
9653 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9654 * linux-low.c (struct simple_pid_list): New.
9655 (stopped_pids): New a struct simple_pid_list pointer.
9656 (add_to_pid_list, pull_pid_from_list): New.
9657 (handle_extended_wait): Don't assume the first signal new children
9658 report is SIGSTOP. Adjust call to pull_pid_from_list.
9659 (linux_wait_for_lwp): Adjust.
9660
8d00225b
YQ
96612012-03-02 Yao Qi <yao@codesourcery.com>
9662
9663 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9664 debug log.
9665
19560ba5
YQ
96662012-03-02 Yao Qi <yao@codesourcery.com>
9667
9668 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9669 `stop_pc' and `tpoint'. Update caller.
9670
1faeff08
MR
96712012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9672
9673 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9674 * linux-low.c (use_linux_regsets): New macro.
9675 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9676 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9677 (linux_register_in_regsets): New function.
9678 (usr_fetch_inferior_registers): Skip registers covered by
9679 regsets.
9680 (usr_store_inferior_registers): Likewise.
9681 (usr_fetch_inferior_registers): New macro.
9682 (usr_store_inferior_registers): Likewise.
9683 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9684 (linux_store_registers): Likewise.
9685 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9686 prototype.
9687 (init_registers_mips64_dsp_linux): Likewise.
9688 (init_registers_mips_linux): New macro.
9689 (init_registers_mips_dsp_linux): Likewise.
9690 (mips_dsp_num_regs): Likewise.
9691 (DSP_BASE, DSP_CONTROL): New fallback macros.
9692 (mips_base_regs): New macro.
9693 (mips_regmap): Use it. Fix the size.
9694 (mips_dsp_regmap): New variable.
9695 (mips_dsp_regset_bitmap): Likewise.
9696 (mips_arch_setup): New function.
9697 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9698 than mips_regmap.
9699 (mips_cannot_store_register): Likewise.
9700 (the_low_target): Update .arch_setup, .num_regs and .regmap
9701 initializers. Add .regset_bitmap initializer.
9702 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9703 initializer.
9704 * linux-bfin-low.c (the_low_target): Likewise.
9705 * linux-cris-low.c (the_low_target): Likewise.
9706 * linux-crisv32-low.c (the_low_target): Likewise.
9707 * linux-ia64-low.c (the_low_target): Likewise.
9708 * linux-m32r-low.c (the_low_target): Likewise.
9709 * linux-m68k-low.c (the_low_target): Likewise.
9710 * linux-ppc-low.c (the_low_target): Likewise.
9711 * linux-s390-low.c (the_low_target): Likewise.
9712 * linux-sh-low.c (the_low_target): Likewise.
9713 * linux-sparc-low.c (the_low_target): Likewise.
9714 * linux-tic6x-low.c (the_low_target): Likewise.
9715 * linux-x86-low.c (the_low_target): Likewise.
9716 * linux-xtensa-low.c (the_low_target): Likewise.
9717 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9718 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9719 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9720 srv_xmlfiles.
9721 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9722 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9723
c03e6ccc
YQ
97242012-02-29 Yao Qi <yao@codesourcery.com>
9725 Pedro Alves <palves@redhat.com>
9726
9727 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9728 `step_over_finished' is true.
9729
644cebc9
PA
97302012-02-27 Pedro Alves <palves@redhat.com>
9731
9732 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9733 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9734
c14d7ab2
PA
97352012-02-27 Pedro Alves <palves@redhat.com>
9736
9737 PR server/9684
9738 * linux-low.c (pid_is_stopped): New.
9739 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9740
412c89dd
LM
97412012-02-25 Luis Machado <lgustavo@codesourcery.com>
9742
9743 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9744 of conditions.
9745
b745defe
MR
97462012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9747
9748 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9749
9f3a5c85
LM
97502012-02-24 Luis Machado <lgustavo@codesourcery>
9751
9752 * server.c (handle_query): Advertise support for target-side
9753 breakpoint condition evaluation.
9754 (process_point_options): New function.
9755 (process_serial_event): When inserting a breakpoint, check for
9756 a target-side condition that should be evaluated.
9757
9758 * mem-break.c: Include regcache.h and ax.h.
9759 (point_cond_list_t): New data structure.
9760 (breakpoint) <cond_list>: New field.
9761 (find_gdb_breakpoint_at): Make non-static.
9762 (delete_gdb_breakpoint_at): Clear any target-side
9763 conditions.
9764 (clear_gdb_breakpoint_conditions): New function.
9765 (add_condition_to_breakpoint): Likewise.
9766 (add_breakpoint_condition): Likewise.
9767 (gdb_condition_true_at_breakpoint): Likewise.
9768 (gdb_breakpoint_here): Return result directly instead
9769 of going through a local variable.
9770
9771 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9772 (clear_gdb_breakpoint_conditions): Likewise.
9773 (add_breakpoint_condition): Likewise.
9774 (gdb_condition_true_at_breakpoint): Likewise.
9775
9776 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9777 (need_step_over_p): Take target-side breakpoint condition into
9778 consideration.
9779
5e1dc496
LM
97802012-02-24 Luis Machado <lgustavo@codesourcery>
9781
9782 * server.h: Include tracepoint.h.
9783 (agent_mem_read, agent_get_trace_state_variable_value,
9784 agent_set_trace_state_variable_value,
9785 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9786 get_set_tsv_func_addr): New prototypes.
9787
9788 * ax.h: New include file.
9789 * ax.c: New source file.
9790
9791 * tracepoint.c: Include ax.h.
9792 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9793 agent_expr, eval_result_type): Move to ax.h.
9794 (parse_agent_expr): Rename to ...
9795 (gdb_parse_agent_expr): ... this, make it non-static and move
9796 to ax.h.
9797 (unparse_agent_expr) Rename to ...
9798 (gdb_unparse_agent_expr): ... this, make it non-static and move
9799 to ax.h.
9800 (eval_agent_expr): Rename to ...
9801 (eval_tracepoint_agent_expr): ... this.
9802 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9803 forward declarations.
9804 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9805 (agent_get_trace_state_variable_value): New function.
9806 (agent_set_trace_state_variable_value): New function.
9807 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9808 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9809 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9810 (condition_true_at_tracepoint): Likewise.
9811 (parse_agent_expr): Rename to ...
9812 (gdb_parse_agent_expr): ... this and move to ax.c.
9813 (unparse_agent_expr): Rename to ...
9814 (gdb_unparse_agent_expr): ... this and move to ax.c.
9815 (gdb_agent_op_name): Move to ax.c.
9816 (eval_agent_expr): Rename to ...
9817 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9818 and move to ax.c.
9819 (eval_tracepoint_agent_expr): New function.
9820 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9821 non-static.
5e1dc496
LM
9822 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9823 ax.c.
9824 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9825 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9826 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9827 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9828 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9829 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9830 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9831 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9832 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9833 (compile_bytecodes): Remove forward declaration.
9834 (is_goto_target): Move to ax.c.
9835 (compile_bytecodes): Move to ax.c and call
9836 agent_get_trace_state_variable_value (...) and
9837 agent_set_trace_state_variable_value (...).
9838
9839 * Makefile.in: Update ax.c and IPA dependencies.
9840
277e4e52
PA
98412012-02-24 Pedro Alves <palves@redhat.com>
9842
9843 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9844 (cmd_bigqtbuffer_circular): ... this. Only handle
9845 'QTBuffer:circular:'.
9846 (handle_tracepoint_general_set): Adjust.
9847
bf4c19f7
YQ
98482012-02-16 Yao Qi <yao@codesourcery.com>
9849
9850 * inferiors.c: Move code to ...
9851 * dll.c: .... here. New.
9852 * server.h: Declare clear_dlls.
9853 * Makefile.in (SFILES): Add dll.c.
9854 (OBS): Add dll.o
9855 (dll.o): New rule.
9856
d73f2619
YQ
98572012-02-11 Yao Qi <yao@codesourcery.com>
9858
9859 * server.c: (handle_monitor_command): Add a new parameter
9860 `own_buf'.
9861 (handle_query): Update caller.
9862
f8255c2a
JB
98632012-02-09 Joel Brobecker <brobecker@adacore.com>
9864
9865 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9866 * configure, config.in: Regenerate.
9867 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9868 is not defined.
9869
da84f473
PA
98702012-02-02 Pedro Alves <palves@redhat.com>
9871
9872 Try SIGKILL first, then PTRACE_KILL.
9873 * linux-low.c (linux_kill_one_lwp): New.
9874 (linux_kill_one_lwp): Rename to ...
9875 (kill_one_lwp_callback): ... this. Use the new
9876 linux_kill_one_lwp.
9877
e886a173
PA
98782012-02-02 Pedro Alves <palves@redhat.com>
9879
9880 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9881 inferior.
9882
be07f1a2
PA
98832012-01-27 Pedro Alves <palves@redhat.com>
9884
9885 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9886 (elf_64_file_p): Make static.
9887 (linux_pid_exe_is_elf_64_file): New.
9888 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9889 Delete declarations.
9890 (linux_pid_exe_is_elf_64_file): Declare.
9891 * linux-x86-low.c (x86_arch_setup): Use
9892 linux_pid_exe_is_elf_64_file.
9893
d8301ad1
JK
98942012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9895
9896 * linux-low.c (linux_wait_for_event_1): Rename to ...
9897 (linux_wait_for_event): ... here and merge it with former
9898 linux_wait_for_event - new variable wait_ptid, use it.
9899 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9900
01b17894
PA
99012012-01-23 Pedro Alves <palves@redhat.com>
9902
9903 * server.c (main): Avoid yet another case of infinite loop while
9904 detaching/killing after a longjmp.
9905
e825046f
JK
99062012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9907
9908 Code cleanup.
9909 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9910
b9e7b9c3
UW
99112012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9912
9913 * hostio.c (handle_readlink): New function.
9914 (handle_vFile): Call it to handle "vFile:readlink" packets.
9915
901f9912
UW
99162012-01-20 Pedro Alves <palves@redhat.com>
9917 Ulrich Weigand <ulrich.weigand@linaro.org>
9918
9919 * server.c (handle_v_requests): Only support vAttach and vRun to
9920 start multiple processes when in extended protocol mode.
9921
fc1ab1a0
PA
99222012-01-17 Pedro Alves <palves@redhat.com>
9923
9924 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9925 memalign plus mprotect to allocate the scratch buffer.
9926
7d5d4e98
PA
99272012-01-13 Pedro Alves <palves@redhat.com>
9928
9929 * server.c (attach_inferior): Clear `cont_thread'.
9930
f128d5e9
PA
99312012-01-13 Pedro Alves <palves@redhat.com>
9932
9933 * server.c (main): Avoid infinite loop while detaching/killing
9934 after a longjmp.
9935
06db92f0
DE
99362012-01-09 Doug Evans <dje@google.com>
9937
9938 * server.c (start_inferior): Set last_ptid in --wrapper case.
9939
32d92999
YQ
99402012-01-06 Yao Qi <yao@codesourcery.com>
9941
9942 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9943 defined.
9944 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9945
5e0a92a9
YQ
99462012-01-04 Yao Qi <yao@codesourcery.com>
9947
9948 * tracepoint.c (cmd_qtdp): Print debug message
9949 for static tracepoint.
9950
ae639e8c
YQ
99512012-01-04 Yao Qi <yao@codesourcery.com>
9952
9953 * tracepoint.c (trace_vdebug): Differentiate debug message
9954 between gdbserver and IPA.
9955
f72429c5
YQ
99562012-01-03 Yao Qi <yao@codesourcery.com>
9957
9958 * tracepoint.c (tracepoint_was_hit): Don't collect for
9959 static tracepoint.
9960
12c3e59c
JB
99612012-01-02 Joel Brobecker <brobecker@adacore.com>
9962
9963 * terminal.h: Reformat copyright header.
9964
67827812
JB
99652012-01-02 Joel Brobecker <brobecker@adacore.com>
9966
9967 * server.c (gdbserver_version): Update copyright year.
9968 * gdbreplay.c (gdbreplay_version): Likewise.
9969
3e52c33d
JK
99702011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9971
9972 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9973
9974 Revert:
9975 2011-12-18 Hui Zhu <teawater@gmail.com>
9976 * linux-low.c (linux_create_inferior): Save return value to ret.
9977
66f1260e
HZ
99782011-12-18 Hui Zhu <teawater@gmail.com>
9979
9980 * linux-low.c (linux_create_inferior): Save return value to ret.
9981
e77616d7
DE
99822011-12-16 Doug Evans <dje@google.com>
9983
e7b06c57
DE
9984 * linux-low.c (linux_create_inferior): If stdio connection,
9985 redirect stdin from /dev/null, stdout to stderr.
9986 * remote-utils.c (remote_is_stdio): New static global.
9987 (remote_connection_is_stdio): New function.
9988 (remote_prepare): Handle stdio connection.
9989 (remote_open): Ditto.
9990 (remote_close): Don't close stdin for stdio connections.
9991 (read_prim,write_prim): New functions. Replace all calls to
9992 read/write to these.
9993 * server.c (main): Watch for "-" argument. Move call to
9994 remote_prepare before start_inferior.
9995 * server.h (STDIO_CONNECTION_NAME): New macro.
9996 (remote_connection_is_stdio): Declare.
9997
e77616d7
DE
9998 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9999 in debugging output.
10000
82067193
YQ
100012011-12-15 Yao Qi <yao@codesourcery.com>
10002
10003 * tracepoint.c: Include sys/syscall.h.
10004 (gdb_ust_thread): Remove preprocessor conditional.
10005
82bfbe7e
PA
100062011-12-14 Pedro Alves <pedro@codesourcery.com>
10007
10008 * linux-low.c (linux_detach_one_lwp): Call
10009 the_low_target.prepare_to_resume before detaching.
10010
712c6575
YQ
100112011-12-14 Yao Qi <yao@codesourcery.com>
10012
10013 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10014 of write.
10015
d54d1edf
YQ
100162011-12-14 Yao Qi <yao@codesourcery.com>
10017
10018 * i386-low.c (i386_low_stopped_data_address): Initialize local
10019 variable `control'.
10020
6210a125
PA
100212011-12-13 Pedro Alves <pedro@codesourcery.com>
10022
10023 PR remote/13492
10024
10025 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10026 DR_CONTROL unless necessary. Extend comments.
10027 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10028 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10029
2ece8244
YQ
100302011-12-13 Yao Qi <yao@codesourcery.com>
10031
10032 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10033 macros.
10034 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10035
784867a5
JK
100362011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10037
10038 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10039 Print new debug message for such case.
10040
6bf36717
JK
100412011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10042
10043 Fix overlapping memcpy.
10044 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10045 the read_inferior_memory transfer.
10046 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10047 write_inferior_memory transfer.
10048 (set_fast_tracepoint_jump): New variable buf. Use it for the
10049 read_inferior_memory and write_inferior_memory transfers.
10050 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10051 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10052 Use it for the write_inferior_memory transfer.
10053 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10054 buffers.
10055
50275556
MR
100562011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10057
10058 * linux-low.c (fetch_register, store_register): Make code
10059 consistent, fix formatting.
10060
7325beb4
MR
100612011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10062
10063 * linux-low.c (usr_store_inferior_registers): Factor out code
10064 to handle individual registers into...
10065 (store_register): ... this new function.
10066
c642a434
UW
100672011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10068
10069 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10070 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10071 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10072 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10073 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10074 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10075 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10076 (srv_xmlfiles): Add new XML files.
10077
10078 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10079 and <sys/uio.h>.
10080 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10081 (init_registers_s390_linux32v1): Add prototype.
10082 (init_registers_s390_linux32v2): Likewise.
10083 (init_registers_s390_linux64v1): Likewise.
10084 (init_registers_s390_linux64v2): Likewise.
10085 (init_registers_s390x_linux64v1): Likewise.
10086 (init_registers_s390x_linux64v2): Likewise.
10087 (s390_num_regs): Increment to 52.
10088 (s390_regmap): Add orig_r2 register.
10089 (s390_num_regs_3264): Increment to 68.
10090 (s390_regmap_3264): Add orig_r2 register.
10091 (s390_collect_ptrace_register): Handle orig_r2 register.
10092 (s390_supply_ptrace_register): Likewise.
10093 (s390_fill_last_break): New function.
10094 (s390_store_last_break): Likewise.
10095 (s390_fill_system_call): New function.
10096 (s390_store_system_call): Likewise.
10097 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10098 register sets.
10099 (s390_check_regset): New function.
10100 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10101 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10102 Update target_regsets for available register sets.
10103
2268b414
JK
101042011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10105 Jan Kratochvil <jan.kratochvil@redhat.com>
10106
10107 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10108 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10109 New.
10110 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10111 * linux-low.h (struct process_info_private): New member r_debug.
10112 * server.c (handle_qxfer_libraries): Call
10113 the_target->qxfer_libraries_svr4.
10114 (handle_qxfer_libraries_svr4): New function.
10115 (qxfer_packets): New entry "libraries-svr4".
10116 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10117 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10118 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10119 PACKET_qXfer_libraries_svr4.
10120
d6db1fab
UW
101212011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10122
10123 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10124 PSW address/mask between 8-byte and 16-byte formats.
10125 (s390_supply_ptrace_register): Likewise.
10126 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10127 basic addressing mode bit.
10128
242f5f1c
SS
101292011-11-24 Stan Shebs <stan@codesourcery.com>
10130
10131 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10132
f196051f
SS
101332011-11-17 Stan Shebs <stan@codesourcery.com>
10134
10135 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10136 (tracing_start_time): New global.
10137 (tracing_stop_time): New global.
10138 (tracing_user_name): New global.
10139 (tracing_notes): New global.
10140 (tracing_stop_note): New global.
10141 (cmd_qtstart): Set traceframe_usage, start_time.
10142 (stop_tracing): Set stop_time.
10143 (cmd_qtstatus): Report additional status.
10144 (cmd_qtp): New function.
10145 (handle_tracepoint_query): Call it.
10146 (cmd_qtnotes): New function.
10147 (handle_tracepoint_general_set): Call it.
10148 (get_timestamp): Rename from tsv_get_timestamp.
10149
405f8e94
SS
101502011-11-14 Stan Shebs <stan@codesourcery.com>
10151 Kwok Cheung Yeung <kcy@codesourcery.com>
10152
10153 * linux-x86-low.c (small_jump_insn): New.
10154 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10155 trampoline and error message, build a trampoline and issue a small
10156 jump instruction to it.
10157 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10158 trampoline and error message.
10159 (x86_get_min_fast_tracepoint_insn_len): New.
10160 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10161 * linux-low.h (struct linux_target_ops): Add arguments to
10162 install_fast_tracepoint_jump_pad operation, add new operation.
10163 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10164 arguments.
10165 (linux_get_min_fast_tracepoint_insn_len): New function.
10166 (linux_target_op): Add new operation.
10167 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10168 (gdb_trampoline_buffer_end): Ditto.
10169 (gdb_trampoline_buffer_error): Ditto.
10170 (struct ipa_sym_addresses): Add fields for new IPA variables.
10171 (symbol_list): Add entries for new IPA variables.
10172 (struct tracepoint): Add fields to hold the address range of the
10173 trampoline used by the tracepoint.
10174 (trampoline_buffer_head): New static variable.
10175 (trampoline_buffer_tail): Ditto.
10176 (claim_trampoline_space): New function.
10177 (have_fast_tracepoint_trampoline_buffer): New function.
10178 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10179 structure.
10180 (install_fast_tracepoint): Ditto, also add error buffer argument.
10181 (cmd_qtminftpilen): New function.
10182 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10183 (fast_tracepoint_from_trampoline_address): New function.
10184 (fast_tracepoint_collecting): Handle trampoline as part of jump
10185 pad space.
10186 (set_trampoline_buffer_space): New function.
10187 (initialize_tracepoint): Initialize new IPA variables.
10188 * target.h (struct target_ops): Add arguments to
10189 install_fast_tracepoint_jump_pad operation, add new
10190 get_min_fast_tracepoint_insn_len operation.
10191 (target_get_min_fast_tracepoint_insn_len): New.
10192 (install_fast_tracepoint_jump_pad): Add arguments.
10193 * server.h (IPA_BUFSIZ): Define.
10194 * linux-i386-ipa.c: Include extra header files.
10195 (initialize_fast_tracepoint_trampoline_buffer): New function.
10196 (initialize_low_tracepoint): Call it.
10197 * server.h (set_trampoline_buffer_space): Declare.
10198 (claim_trampoline_space): Ditto.
10199 (have_fast_tracepoint_trampoline_buffer): Ditto.
10200
1e4d1764
YQ
102012011-11-14 Yao Qi <yao@codesourcery.com>
10202
10203 * server.c (handle_query): Handle InstallInTrace for qSupported.
10204 * tracepoint.c (add_tracepoint): Sort list.
10205 (install_tracepoint, download_tracepoint): New.
10206 (cmd_qtdp): Call them to install and download tracepoints.
10207 (sort_tracepoints): Removed.
10208 (cmd_qtstart): Update.
10209
5c73ff4e
YQ
102102011-11-14 Yao Qi <yao@codesourcery.com>
10211
10212 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10213 * mem-break.h: Declare.
10214 * tracepoint.c (cmd_qtstart): Move some code to ...
10215 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10216 New.
10217 (download_tracepoints): Move some code to ...
10218 (download_tracepoint_1): ... here. New.
10219
86a30030
YQ
102202011-11-08 Yao Qi <yao@codesourcery.com>
10221
10222 * remote-utils.c (relocate_instruction): A comment fix.
10223
8d26e50c
JB
102242011-11-07 Joel Brobecker <brobecker@adacore.com>
10225
10226 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10227 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10228 dr_status_mirror and dr_control_mirror from debug_reg_state.
10229 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10230 (i386_initial_stuff): Remove use of deleted globals.
10231 (i386_get_thread_context, i386_set_thread_context,
10232 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10233 from debug_reg_state.
10234
a59306a3
YQ
102352011-11-05 Yao Qi <yao@codesourcery.com>
10236
10237 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10238 address as TPOINT's.
10239
3065dfb6
SS
102402011-11-02 Stan Shebs <stan@codesourcery.com>
10241
10242 * tracepoint.c (agent_mem_read_string): New function.
10243 (eval_agent_expr): Call it for tracenz.
10244 * server.c (handle_query): Report support for tracenz.
10245
fd0d8c7c
YQ
102462011-11-02 Yao Qi <yao@codesourcery.com>
10247
10248 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10249
609086b1
YQ
102502011-11-02 Yao Qi <yao@codesourcery.com>
10251
10252 * target.h: Fix a typo in comment.
10253
b9fd1791
PA
102542011-10-31 Pedro Alves <pedro@codesourcery.com>
10255
10256 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10257 clobber the breakpoints' shadows with fast tracepoint jumps.
10258 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10259 * target.c (write_inferior_memory): Also pass MYADDR down to
10260 check_mem_write.
10261
03583c20
UW
102622011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10263
10264 * configure.ac: Check support for personality routine.
10265 * configure: Regenerate.
10266 * config.in: Likewise.
10267 * linux-low.c: Include <sys/personality.h>.
10268 Define ADDR_NO_RANDOMIZE if necessary.
10269 (linux_create_inferior): Disable address space randomization when
10270 forking inferior, if requested.
10271 (linux_supports_disable_randomization): New function.
10272 (linux_target_ops): Install it.
10273 * server.h (disable_randomization): Declare.
10274 * server.c (disable_randomization): New global variable.
10275 (handle_general_set): Handle QDisableRandomization.
10276 (handle_query): Likewise for qSupported.
10277 (main): Support --disable-randomization and --no-disable-randomization
10278 command line arguments.
10279 * target.h (struct target_ops): Add supports_disable_randomization.
10280 (target_supports_disable_randomization): New macro.
10281
723b724b
MF
102822011-09-29 Mike Frysinger <vapier@gentoo.org>
10283
10284 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10285 ifdef check.
10286 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10287 [!PT_GETDSBT] (target_loadmap): New definition.
10288 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10289 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10290 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10291 and PT_GETDSBT to LINUX_LOADMAP.
10292 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10293 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10294
55329a5c 102952011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
10296
10297 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10298 (arm_linux_hwbp_cap): New static variable.
10299 (arm_linux_get_hwbp_cap): Replace by ...
10300 (arm_linux_init_hwbp_cap): ... this new function.
10301 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10302 (arm_linux_get_hw_watchpoint_count): Likewise.
10303 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10304 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10305 (arm_prepare_to_resume): Use perror_with_name instead of error.
10306
55329a5c 103072011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
10308
10309 * linux-arm-low.c: Include <signal.h>.
10310 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10311 (struct arm_linux_hwbp_cap): New data type.
10312 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10313 (struct arm_linux_hw_breakpoint): New data type.
10314 (MAX_BPTS, MAX_WPTS): Define.
10315 (struct arch_process_info, struct arch_lwp_info): New data types.
10316 (arm_linux_get_hwbp_cap): New function.
10317 (arm_linux_get_hw_breakpoint_count): Likewise.
10318 (arm_linux_get_hw_watchpoint_count): Likewise.
10319 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10320 (arm_hwbp_control_initialize): Likewise.
10321 (arm_hwbp_control_is_enabled): Likewise.
10322 (arm_hwbp_control_is_initialized): Likewise.
10323 (arm_hwbp_control_disable): Likewise.
10324 (arm_linux_hw_breakpoint_equal): Likewise.
10325 (arm_linux_hw_point_initialize): Likewise.
10326 (struct update_registers_data): New data structure.
10327 (update_registers_callback: New function.
10328 (arm_insert_point): Likewise.
10329 (arm_remove_point): Likewise.
10330 (arm_stopped_by_watchpoint): Likewise.
10331 (arm_stopped_data_address): Likewise.
10332 (arm_new_process): Likewise.
10333 (arm_new_thread): Likewise.
10334 (arm_prepare_to_resume): Likewise.
10335 (the_low_target): Register arm_insert_point, arm_remove_point,
10336 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10337 arm_new_thread, and arm_prepare_to_resume.
10338
6b9801d4
SS
103392011-09-15 Stan Shebs <stan@codesourcery.com>
10340
10341 * server.h (struct emit_ops): Add compare-goto fields.
10342 * tracepoint.c (gdb_agent_op_sizes): New table.
10343 (emit_eq_goto): New function.
10344 (emit_ne_goto): New function.
10345 (emit_lt_goto): New function.
10346 (emit_le_goto): New function.
10347 (emit_gt_goto): New function.
10348 (emit_ge_goto): New function.
10349 (is_goto_target): New function.
10350 (compile_bytecodes): Recognize special cases of compare-goto
10351 combinations and call specialized emitters for them.
10352 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10353 (amd64_emit_ne_goto): New function.
10354 (amd64_emit_lt_goto): New function.
10355 (amd64_emit_le_goto): New function.
10356 (amd64_emit_gt_goto): New function.
10357 (amd64_emit_ge_goto): New function.
10358 (amd64_emit_ops): Add the new functions.
10359 (i386_emit_eq_goto): New function.
10360 (i386_emit_ne_goto): New function.
10361 (i386_emit_lt_goto): New function.
10362 (i386_emit_le_goto): New function.
10363 (i386_emit_gt_goto): New function.
10364 (i386_emit_ge_goto): New function.
10365 (i386_emit_ops): Add the new functions.
10366
bf15cbda
SS
103672011-09-08 Stan Shebs <stan@codesourcery.com>
10368
10369 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10370 (i386_emit_epilogue): Restore %ebx.
10371
943ca1dd
JZ
103722011-08-31 Jie Zhang <jzhang918@gmail.com>
10373
10374 * server.c (step_thread): Remove definition.
10375 (process_serial_event): Don't handle Hs.
10376 * server.h (step_thread): Remove declaration.
10377 * target.c (set_desired_inferior): Remove use of step_thread.
10378
e3deef73
LM
103792011-08-24 Luis Machado <lgustavo@codesourcery.com>
10380
10381 * linux-low.c: Include linux-procfs.h.
10382 (linux_attach_lwp_1): Update comments.
10383 (linux_attach): Scan for existing threads when attaching to a
10384 process that is the tgid.
10385 * Makefile.in: Update dependencies.
10386
13da1c97
LM
103872011-08-24 Luis Machado <lgustavo@codesourcery.com>
10388
10389 * configure.srv: Add linux-procfs.o dependencies.
10390
881127c9
YQ
103912011-08-14 Yao Qi <yao@codesourcery.com>
10392
10393 * target.h (struct target_ops): Fix indent.
10394 * win32-low.c (win32_target_ops): Fix comment.
10395
58dbd541
YQ
103962011-08-14 Andrew Jenner <andrew@codesourcery.com>
10397 Yao Qi <yao@codesourcery.com>
10398
10399 * Makefile.in (clean): Remove tic6x-*.c files.
10400 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10401 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10402 (tic6x-c64xp-linux.c): Likewise.
10403 * configure.srv: Add support for tic6x-*-uclinux.
10404 * linux-tic6x-low.c: New.
10405 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10406
78d85199
YQ
104072011-08-14 Andrew Stubbs <ams@codesourcery.com>
10408 Yao Qi <yao@codesourcery.com>
10409
10410 * target.h (struct target_ops): Add read_loadmap.
10411 * linux-low.c (struct target_loadseg): New type.
10412 (struct target_loadmap): New type.
10413 (linux_read_loadmap): New function.
10414 (linux_target_ops): Add linux_read_loadmap.
10415 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
10416 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10417 to NULL.
78d85199 10418
a959a88d
EZ
104192011-08-05 Eli Zaretskii <eliz@gnu.org>
10420
10421 * win32-low.c: Include <stdint.h>.
10422
1ced966e
PA
104232011-07-22 Pedro Alves <pedro@codesourcery.com>
10424
10425 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10426 to the inferior here.
10427 (i386_remove_aligned_watchpoint): Ditto.
10428 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10429 fit part of the watchpoint in the debug registers.
10430 (i386_update_inferior_debug_regs): New.
10431 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10432 registers, and only update the inferior on success.
10433 (i386_low_remove_watchpoint): Ditto.
10434
d26e3629
KY
104352011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10436
10437 * linux-low.c (compare_ints, unique, list_threads, show_process,
10438 linux_core_of_thread): Delete.
10439 (linux_target_ops): Change linux_core_of_thread to
10440 linux_common_core_of_thread.
10441 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10442 * utils.c (malloc_failure): Change type of argument.
10443 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10444 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10445 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10446 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10447 (IPA_OBJS): Add common-utils-ipa.o.
10448 (ptid_h, linux_osdata_h): New macros.
10449 (server_h): Add common/common-utils.h, common/xml-utils.h,
10450 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10451 common/ptid.h.
10452 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10453 ptid.o, buffer.o): New rules.
10454 (linux-low.o): Add common/linux-osdata.h as a dependency.
10455 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10456 * configure.ac: Add AC_HEADER_DIRENT check.
10457 * config.in: Regenerate.
10458 * configure: Regenerate.
10459 * remote-utils.c (xml_escape_text): Delete.
10460 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10461 buffer_xml_printf): Move to common/buffer.c.
10462 * server.c (main): Remove call to initialize_inferiors.
10463 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10464 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10465 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10466 internal_error, gdb_assert, gdb_assert_fail): Delete.
10467 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10468 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10469 common/buffer.h.
10470 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10471 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10472 initialize_inferiors): Delete.
10473
2275a1a7
PA
104742011-07-20 Pedro Alves <pedro@codesourcery.com>
10475
10476 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10477 symbol error.
10478
0a5b1e09
PA
104792011-05-31 Pedro Alves <pedro@codesourcery.com>
10480
10481 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10482 assertion.
10483 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10484
6938fd34
YQ
104852011-05-26 Yao Qi <yao@codesourcery.com>
10486
10487 * Makefile.in (thread-db.o): Track dependence to
10488 common/gdb_thread_db.h.
10489 * thread-db.c: include gdb_thread_db.h from right place.
10490
b481f9e0
TT
104912011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10492
10493 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10494 __FILE__ and __LINE__ to internal_error.
10495
98a5dd13
DE
104962011-05-13 Doug Evans <dje@google.com>
10497
10498 * thread-db.c (try_thread_db_load_from_sdir): New function.
10499 (try_thread_db_load_from_dir): New function.
10500 (thread_db_load_search): Handle $sdir, ignore $pdir.
10501 Remove trying of system directories if search of
10502 libthread-db-search-path fails, that is now done via $sdir.
10503
d248b706
KY
105042011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10505
10506 * server.c (handle_query): Add EnableDisableTracepoints to the list
10507 of supported features.
43aaf8b6 10508 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10509 tracepoints.
43aaf8b6
PA
10510 (cmd_qtenable_disable): New.
10511 (cmd_qtstart): Install tracepoints even if disabled.
10512 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10513 receiving a QTEnable or QTDisable packet.
10514 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10515 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10516 tracepoints.
10517 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10518
84e578fb
DE
105192011-05-10 Doug Evans <dje@google.com>
10520
10521 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10522
71f55dd8
DE
105232011-05-04 Doug Evans <dje@google.com>
10524
10525 * linux-low.c (linux_join): Skip process lookup.
10526 * spu-low.c (spu_join): Ditto.
10527 * server.c (join_inferiors_callback): Delete.
10528 (process_serial_event): For 'D' packet (detach) call join_inferior
10529 directly.
10530
4d393d60
JM
105312011-05-04 Joseph Myers <joseph@codesourcery.com>
10532
10533 * README: Don't mention xscale*-*-linux*.
10534 * configure.srv (xscale*-*-linux*): Don't handle target.
10535
b00ad6ff
NF
105362011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10537
10538 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10539 casting pointers.
10540 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10541 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10542 (i386_emit_void_call_2): Likewise.
10543
af96c192
YQ
105442011-04-26 Yao Qi <yao@codesourcery.com>
10545
43aaf8b6
PA
10546 * linux-low.c: Move common macros to linux-ptrace.h.
10547 Include linux-ptrace.h.
af96c192
YQ
10548 * Makefile.in (linux_ptrace_h): New.
10549 (linux-low.o): Depends on linux-ptrace.h.
10550
03f2bd59
JK
105512011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10552
10553 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10554 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10555 (remote_prepare): New function with most of the TCP code from ...
10556 (remote_open): ... here. Detect PORT here unconditionally. Move also
10557 setting transport_is_reliable.
10558 * server.c (run_once): New variable.
10559 (gdbserver_usage): Document it.
10560 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10561 the first run if RUN_ONCE.
10562 * server.h (run_once, remote_prepare): New declarations.
10563
7a9dd1b2
TT
105642011-04-19 Tom Tromey <tromey@redhat.com>
10565
10566 * win32-low.c (handle_load_dll): Remove duplicate "the".
10567
81239425
PM
105682011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10569
10570 Remove support for old Cygwin 1.5 versions.
10571 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10572 function to avoid warning.
10573 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10574 warning.
10575
9e0627f1
PM
105762011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10577
10578 * gdbserver/server.h (Macro _): Define it if not available.
10579
588eebee
MS
105802011-03-14 Michael Snyder <msnyder@vmware.com>
10581
348af9f7 10582 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10583
43f70d4c
JB
105842011-03-10 Joel Brobecker <brobecker@adacore.com>
10585
10586 * Makefile.in (maintainer-clean realclean distclean): Remove
10587 "make ... subdir_do" command.
10588
348af9f7
MS
105892011-03-10 Michael Snyder <msnyder@vmware.com>
10590
10591 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10592
10593 * server.c (handle_v_run): Free alloced buffer on early return.
10594
e637a4f5
YQ
105952011-03-09 Yao Qi <yao@codesourcery.com>
10596
10597 Revert:
10598 2011-03-04 Yao Qi <yao@codesourcery.com>
10599
10600 * Makefile.in: Remove GNU make feature --directory.
10601
10602 2011-03-05 Yao Qi <yao@codesourcery.com>
10603
10604 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10605 (subdir_do): New make target. Copied from gdb/Makefile.
10606 (maintainer-clean, realclean, distclean, clean): Call corresponding
10607 make targets in common/Makefile.
10608
10609 2011-02-11 Yao Qi <yao@codesourcery.com>
10610
10611 * configure.ac: Call AC_PROG_RANLIB.
10612 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10613 * configure: Regenerate.
10614
e6edda56
JK
106152011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10616
10617 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10618
e5141119
JB
106192011-03-06 Yao Qi <yao@codesourcery.com>
10620
10621 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10622
64794aa4
JB
106232011-03-05 Yao Qi <yao@codesourcery.com>
10624
10625 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10626 (subdir_do): New make target. Copied from gdb/Makefile.
10627 (maintainer-clean, realclean, distclean, clean): Call corresponding
10628 make targets in common/Makefile.
10629
7a762829
YQ
106302011-03-04 Yao Qi <yao@codesourcery.com>
10631
10632 * Makefile.in: Remove GNU make feature --directory.
10633
348af9f7
MS
106342011-03-04 Michael Snyder <msnyder@vmware.com>
10635
10636 * server.c (queue_stop_reply): Call xmalloc not malloc.
10637
106382011-03-02 Michael Snyder <msnyder@vmware.com>
10639
10640 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10641
9f72fee2
MS
106422011-02-28 Michael Snyder <msnyder@vmware.com>
10643
588eebee
MS
10644 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10645 (cmd_qtframe): Ditto.
10646 (cmd_qtbuffer): Ditto.
10647 (cmd_bigqtbuffer): Ditto.
10648
9f72fee2
MS
10649 * utils.c (decimal2str): Initialize 'width' to nine, then
10650 don't mess with it.
10651
8040bd49
UW
106522011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10653
10654 * hostio.c (require_data): Free *data, not data.
10655
7e52cbd0
JK
106562011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10657
10658 * hostio.c (require_data): Use free, not xfree.
10659
9130f83e
MS
106602011-02-27 Michael Snyder <msnyder@vmware.com>
10661
4b812f4e
MS
10662 * server.c (handle_query): Discard unused value.
10663
9130f83e
MS
10664 * hostio.c (require_data): Free malloc memory before returning
10665 error.
10666
69d37113
MS
106672011-02-26 Michael Snyder <msnyder@vmware.com>
10668
10669 * linux-low.c (list_threads): Call closedir for dirent.
10670
35f5825a
MS
106712011-02-27 Michael Snyder <msnyder@vmware.com>
10672
2a589cef
MS
10673 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10674 a case statement falls through.
10675
0adea5f7
MS
10676 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10677
35f5825a
MS
10678 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10679 in comparison.
10680
238f1c74
MS
106812011-02-26 Michael Snyder <msnyder@vmware.com>
10682
10683 * utils.c (decimal2str): Eliminate dead code and dead param.
10684 (pulongest): Drop dead param from call to decimal2str.
10685 (plongest): Ditto.
10686
633ff500
JB
106872011-02-24 Joel Brobecker <brobecker@adacore.com>
10688
10689 Revert the following patch (not approved yet):
10690 2011-02-21 Hui Zhu <teawater@gmail.com>
10691 * tracepoint.c (tp_printf): New function.
10692 (eval_agent_expr): Handle gdb_agent_op_printf.
10693
f9c6ff72
HZ
106942011-02-21 Hui Zhu <teawater@gmail.com>
10695
10696 * tracepoint.c (tp_printf): New function.
10697 (eval_agent_expr): Handle gdb_agent_op_printf.
10698
94d5e490
TT
106992011-02-18 Tom Tromey <tromey@redhat.com>
10700
10701 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10702 (tracepoint.o): Likewise.
10703 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10704 (gdb_agent_op_names): Likewise.
10705
c7f96d2b
TT
107062011-02-18 Tom Tromey <tromey@redhat.com>
10707
10708 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10709 gdb_agent_op_rot>: New constants.
10710 (gdb_agent_op_names): Add pick and roll.
10711 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10712 cases.
10713
0feedb2c
JK
107142011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10715
10716 * aclocal.m4: Regenerated with aclocal-1.11.1.
10717
b3b9301e
PA
107182011-02-14 Pedro Alves <pedro@codesourcery.com>
10719
10720 * server.c (handle_qxfer_traceframe_info): New.
10721 (qxfer_packets): Register "traceframe-info".
10722 (handle_query): Report support for qXfer:traceframe-info:read+.
10723 * tracepoint.c (match_blocktype): New.
10724 (traceframe_find_block_type): Rename to ...
10725 (traceframe_walk_blocks): ... this. Add callback filter argument,
10726 and use it.
10727 (traceframe_find_block_type): New, reimplemented on top of
10728 traceframe_walk_blocks.
10729 (build_traceframe_info_xml): New.
10730 (traceframe_read_info): New.
10731 * server.h (traceframe_read_info): Declare.
10732
4f3e6fb7
YQ
107332011-02-11 Yao Qi <yao@codesourcery.com>
10734
10735 * configure.ac: Call AC_PROG_RANLIB.
10736 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10737 * configure: Regenerate.
10738
764880b7
PA
107392011-02-07 Pedro Alves <pedro@codesourcery.com>
10740
10741 * server.c (gdb_read_memory): Change return semantics to allow
10742 partial transfers.
10743 (handle_search_memory_1): Adjust.
10744 (process_serial_event) <'m' packet>: Handle partial transfers.
10745 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10746
1c79eb8a
PA
107472011-01-28 Pedro Alves <pedro@codesourcery.com>
10748
10749 * regcache.c (init_register_cache): Initialize
10750 regcache->register_status.
10751 (free_register_cache): Release regcache->register_status.
10752 (regcache_cpy): Copy register_status.
10753 (registers_to_string): Print 'x's for unavailable registers.
10754 (supply_register): Mark the register's status valid or
10755 unavailable, depending on whether a buffer was passed in or not.
10756 (supply_register_zeroed): New.
10757 (supply_regblock): Mark the registers' status valid or
10758 unavailable, depending on whether a buffer was passed in or not.
10759 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10760 (struct regcache): New `register_status' field.
10761 (supply_register_zeroed): Declare.
10762 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10763 supply_register_zeroed, rather than passing a NULL buffer to
10764 supply_register.
10765 * tracepoint.c (fetch_traceframe_registers): Update comment.
10766
85724a0e
PA
107672011-01-28 Pedro Alves <pedro@codesourcery.com>
10768
10769 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10770 buffer explicit.
10771
d08aafef
PA
107722011-01-25 Pedro Alves <pedro@codesourcery.com>
10773
10774 * server.h (decode_xfer_write): Change prototype.
10775 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10776 and don't extract the annex here.
10777 * server.c (decode_xfer_read): Remove `annex' parameter,
10778 and don't extract the annex here.
10779 (decode_xfer): New.
10780 (struct qxfer): New.
10781 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10782 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10783 (handle_qxfer_statictrace): New functions, abstracted out from
10784 handle_query, and made to use the struct qxfer interface.
10785 (handle_threads_qxfer_proper): Rename to ...
10786 (handle_qxfer_threads_proper): ... this.
10787 (handle_threads_qxfer): Rename to ...
10788 (handle_qxfer_threads): ... this. Adjust.
10789 (qxfer_packets): New array.
10790 (handle_qxfer): New function.
10791 (handle_query): Use handle_qxfer.
10792
493e2a69
MS
107932011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10794
10795 * gdbreplay.c: Shorten lines of >= 80 columns.
10796 * linux-low.c: Ditto.
10797 * linux-ppc-low.c: Ditto.
10798 * linux-s390-low.c: Ditto.
10799 * linux-sparc-low.c: Ditto.
10800 * linux-x86-low.c: Ditto.
10801 * linux-xtensa-low.c: Ditto.
10802 * mem-break.c: Ditto.
10803 * nto-low.c: Ditto.
10804 * regcache.h: Ditto.
10805 * remote-utils.c: Ditto.
10806 * server.c: Ditto.
10807 * server.h: Ditto.
10808 * thread-db.c: Ditto.
10809 * tracepoint.c: Ditto.
10810 * utils.c: Ditto.
10811 * win32-low.h: Ditto.
10812
44944448
JB
108132011-01-05 Joel Brobecker <brobecker@adacore.com>
10814
10815 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10816 update.
10817
71ce852c
JB
108182011-01-01 Joel Brobecker <brobecker@adacore.com>
10819
10820 * server.c (gdbserver_version): Update copyright year in version
10821 output.
10822 * gdbreplay.c (gdbreplay_version): Ditto.
10823
eb826dc6
MF
108242010-12-29 Jie Zhang <jie.zhang@analog.com>
10825
10826 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10827 * linux-bfin-low.c: New file.
10828 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10829 PT_DATA_ADDR for BFIN targets.
10830 * Makefile.in (SFILES): Add linux-bfin-low.c.
10831 (clean): Remove reg-bfin.c.
10832 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10833 * README: Mention supported Blackfin targets.
10834
39ab222a
MF
108352010-12-23 Mike Frysinger <vapier@gentoo.org>
10836
10837 * .gitignore: New file.
10838
a1f2ce7d
MF
108392010-11-16 Mike Frysinger <vapier@gentoo.org>
10840
10841 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10842
f474844c
JZ
108432010-10-22 Jie Zhang <jie@codesourcery.com>
10844
10845 * Makefile.in: Add FLAGS_TO_PASS variable.
10846 (install): Remove dependency of install-only and recursively
10847 invoke make for install-only.
10848
f1048712
DE
108492010-10-04 Doug Evans <dje@google.com>
10850
10851 * Makefile.in (uninstall): Use $(DESTDIR).
10852
b53a1623
PA
108532010-09-24 Pedro Alves <pedro@codesourcery.com>
10854
e6ee044d
PA
10855 PR gdb/11842
10856
b53a1623
PA
10857 * linux-x86-low.c (compat_siginfo_from_siginfo)
10858 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10859 si_code is < 0. Check for si_code == SI_TIMER before checking for
10860 si_code < 0.
10861
fa1bd1e4
JB
108622010-09-13 Joel Brobecker <brobecker@adacore.com>
10863
10864 * lynx-i386-low.c: New file.
10865 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10866
47fac8f8
JB
108672010-09-13 Joel Brobecker <brobecker@adacore.com>
10868
10869 * lynx-low.c (ptrace_request_to_str): Remove handling for
10870 request values that have been removed in LynxOS 5.x.
10871
1adfc54d
JB
108722010-09-13 Joel Brobecker <brobecker@adacore.com>
10873
10874 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10875 <ptrace.h>
10876
c2a66c29
NS
108772010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10878
10879 * configure.ac: Add --enable-inprocess-agent option.
10880 * configure: Rebuilt.
10881
32fcada3
YQ
108822010-09-06 Yao Qi <yao@codesourcery.com>
10883
10884 * linux-low.c (linux_kill): Remove unused variable.
10885 (linux_stabilize_threads): Likewise.
10886 * server.c (start_inferior): Likewise.
10887 (queue_stop_reply_callback): Likewise.
10888 * tracepoint.c (do_action_at_tracepoint): Likewise.
10889
0cccb683
YQ
108902010-09-06 Yao Qi <yao@codesourcery.com>
10891
10892 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10893 on return.
10894
423ec54c
JK
108952010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10896
10897 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10898
12ac6819
PA
108992010-09-06 Pedro Alves <pedro@codesourcery.com>
10900
10901 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10902 "$(IPA_DEPFILES)".
10903
8ed54b31
JB
109042010-09-01 Joel Brobecker <brobecker@adacore.com>
10905
10906 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10907 gdbserver/lynx-ppc-low.c: New files.
10908 * Makefile.in (lynx_low_h): New variable.
10909 (lynx-low.o, lynx-ppc-low.o): New rules.
10910 * configure.ac: On LynxOS, link with -lnetinet.
10911 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10912 * configure: regenerate.
10913
bb0116a4
JB
109142010-09-01 Joel Brobecker <brobecker@adacore.com>
10915
10916 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10917 * configure.ac: Add check for vasprintf and vsnprintf.
10918 * configure, config.in: Regenerate.
10919 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10920
a778ab81 109212010-09-01 Joel Brobecker <brobecker@adacore.com>
10922
10923 * gdbreplay.c: Move include of alloca.h up, next to include of
10924 malloc.h.
10925 * server.h: Add include of malloc.h.
10926 * mem-break.c: Remove include of malloc.h.
10927 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10928
8b034a19 109292010-09-01 Joel Brobecker <brobecker@adacore.com>
10930
10931 * Makefile.in (memmem.o): Build with -Wno-error.
10932
109332010-09-01 Joel Brobecker <brobecker@adacore.com>
10934
10935 * utils.c (xsnprintf): Make non-static.
10936 * server.h: Add xsnprintf declaration.
10937 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10938 replace calls to snprintf by calls to xsnprintf throughout.
10939
109402010-09-01 Joel Brobecker <brobecker@adacore.com>
10941
10942 * configure.ac: Add configure check for alloca.
10943 * configure, config.in: Regenerate.
10944 * server.h: Include alloca.h if it exists.
10945 * gdbreplay.c: Include alloca.h if it exists.
10946
1a981360
PA
109472010-08-28 Pedro Alves <pedro@codesourcery.com>
10948
10949 * linux-low.c (__SIGRTMIN): Define if not already defined.
10950 (linux_create_inferior): Check for __ANDROID__ rather than
10951 __SIGRTMIN.
10952 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10953 are already deferred.
10954 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10955 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10956 stopped and already has a pending signal to report.
10957 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10958 a pending signal to report or is moving out of a jump pad.
10959 (linux_init_signals): Check for __ANDROID__ rather than
10960 __SIGRTMIN.
10961
b4d51a55
PA
109622010-08-28 Pedro Alves <pedro@codesourcery.com>
10963
10964 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10965 debug_threads check. Avoid a linear search when not doing debug
10966 output.
10967
ec48365d
PA
109682010-08-27 Pedro Alves <pedro@codesourcery.com>
10969
10970 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10971 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10972 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10973 (process_event): Change local fd's type to gdb_fildes_t.
10974 (create_file_handler): Adjust prototype.
10975 (delete_file_handler): Adjust prototype.
10976 (handle_file_event): Adjust prototype. Use pfildes.
10977 (create_file_event): Adjsut prototype.
10978 * remote-utils.c (remote_desc, listen_desc): Change type to
10979 gdb_fildes_t.
10980 * server.h: New gdb_fildes_t typedef.
10981 [USE_WIN32API]: Include winsock2.h.
10982 (delete_file_handler, add_file_handler): Adjust prototypes.
10983 (pfildes): Declare.
10984 * utils.c (pfildes): New.
10985
854d88f0
PA
109862010-08-27 Pedro Alves <pedro@codesourcery.com>
10987
10988 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10989 * configure: Regenerate.
10990
0146f85b
PA
109912010-08-27 Pedro Alves <pedro@codesourcery.com>
10992
10993 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10994 (linux_done_accessing_memory): ... this.
10995 (linux_target_ops): Adjust.
10996 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10997 * nto-low.c (nto_target_ops): Adjust comment.
10998 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10999 * spu-low.c (spu_target_ops): Adjust comment.
11000 * target.h (target_ops): Rename unprepare_to_access_memory field
11001 to done_accessing_memory.
11002 (unprepare_to_access_memory): Rename to ...
11003 (done_accessing_memory): ... this.
11004
90d74c30
PA
110052010-08-26 Pedro Alves <pedro@codesourcery.com>
11006
11007 * linux-low.c (linux_prepare_to_access_memory): New.
11008 (linux_unprepare_to_access_memory): New.
11009 (linux_target_ops): Install them.
11010 * server.c (read_memory): Rename to ...
11011 (gdb_read_memory): ... this. Use
11012 prepare_to_access_memory/prepare_to_access_memory.
11013 (write_memory): Rename to ...
11014 (gdb_write_memory): ... this. Use
11015 prepare_to_access_memory/prepare_to_access_memory.
11016 (handle_search_memory_1): Adjust.
11017 (process_serial_event): Adjust.
11018 * target.h (struct target_ops): New fields
11019 prepare_to_access_memory and unprepare_to_access_memory.
11020 (prepare_to_access_memory, unprepare_to_access_memory): New.
11021 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11022 prepare_to_access_memory/prepare_to_access_memory.
11023 * nto-low.c (nto_target_ops): Adjust.
11024 * spu-low.c (spu_target_ops): Adjust.
11025 * win32-low.c (win32_target_ops): Adjust.
11026
fd467969
PA
110272010-08-26 Pedro Alves <pedro@codesourcery.com>
11028
11029 * Makefile.in (WARN_CFLAGS): Get it from configure.
11030 (WERROR_CFLAGS): New.
11031 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11032 * configure.ac: Introduce --enable-werror, which adds -Werror to
11033 the compiler command line. Enabled by default. Disable with
11034 --disable-werror. Add -Wdeclaration-after-statement
11035 Wpointer-arith and -Wformat-nonliteral to warning flags.
11036 * configure: Regenerate.
11037
331e2f5f
PA
110382010-08-26 Pedro Alves <pedro@codesourcery.com>
11039
11040 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11041
e581f2b4
PA
110422010-08-26 Pedro Alves <pedro@codesourcery.com>
11043
11044 * gdbreplay.c (remote_error): New.
11045 (gdbchar): New.
11046 (expect): Use gdbchar. Check for error reading from GDB.
11047 Clarify sync error output.
11048 (play): Check for errors writing to GDB.
11049 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11050 * remote-utils.c (getpkt): Check for errors writing to the remote
11051 descriptor.
11052
3c11dd79
PA
110532010-08-25 Pedro Alves <pedro@codesourcery.com>
11054
11055 * linux-low.c (linux_wait_1): Move non-debugging code out of
11056 `debug_threads' control.
11057
d20a8ad9
PA
110582010-08-25 Pedro Alves <pedro@codesourcery.com>
11059
11060 * linux-low.c (linux_wait_1): Don't set last_status here.
11061 * server.c (push_event, queue_stop_reply_callback): Assert we're
11062 not pushing a TARGET_WAITKIND_IGNORE event.
11063 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11064 (myresume, handle_target_event): Set the thread's last_resume_kind
11065 and last_status from the target returned status.
11066
964e4306
PA
110672010-08-25 Pedro Alves <pedro@codesourcery.com>
11068
11069 PR threads/10729
11070
11071 * linux-x86-low.c (update_debug_registers_callback): New.
11072 (i386_dr_low_set_addr): Use it.
11073 (i386_dr_low_get_addr): New.
11074 (i386_dr_low_set_control): Use update_debug_registers_callback.
11075 (i386_dr_low_get_control): New.
11076 (i386_dr_low_get_status): Adjust.
11077 * linux-low.c (linux_stop_lwp): New.
11078 * linux-low.h (linux_stop_lwp): Declare.
11079
11080 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11081 argument instead of a i386_debug_reg_state.
11082 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11083 a i386_debug_reg_state.
11084 (i386_insert_aligned_watchpoint): Adjust.
11085 (i386_remove_aligned_watchpoint): Adjust.
11086 (i386_low_stopped_data_address): Read the debug registers from the
11087 inferior instead of from the mirrors.
11088 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11089 (i386_dr_low_get_addr): Declare.
11090 (i386_dr_low_get_control): Declare.
11091 (i386_dr_low_get_status): Change prototype.
11092
11093 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11094 (i386_dr_low_get_addr): New.
11095 (i386_dr_low_get_control): New.
11096 (i386_dr_low_get_status): Adjust prototype. Return
11097 dr_status_mirror.
11098 (i386_initial_stuff): Clear dr_status_mirror and
11099 dr_control_mirror.
11100 (i386_get_thread_context): Adjust.
11101 (i386_set_thread_context): Adjust.
11102 (i386_thread_added): Adjust.
11103
5f21a75b
PA
111042010-08-24 Pedro Alves <pedro@codesourcery.com>
11105
11106 * linux-low.h (linux_thread_area): Delete declaration.
11107
3e4c1235
TS
111082010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11109
11110 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11111 after its termination.
11112
1971b033
PA
111132010-08-09 Pedro Alves <pedro@codesourcery.com>
11114
11115 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11116 (gdb_wants_all_stopped): Delete.
11117 (linux_wait_1): Don't call them.
11118 * server.c (handle_v_cont): Tag all threads as want-stopped.
11119 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11120 stopped as "client-wants-stopped".
11121
310444ac
PA
111222010-07-31 Pedro Alves <pedro@codesourcery.com>
11123
11124 * Makefile.in (signals_h): New.
11125 (server_h): Depend on it.
11126 (server.o): Don't depend on $(signals_def).
11127 (signals.o): Depend on $(signals_def).
11128
a19cae16
JK
111292010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11130
11131 * Makefile.in (signals_def): New.
11132 (server_h): Append include/gdb/signals.h and signals_def.
11133 (server.o): Append signals_def.
11134
30d50328
JK
111352010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11136
11137 * server.c (handle_target_event): Use target_signal_to_host for
11138 resume_info.sig initialization.
11139 * target.h (struct thread_resume) <sig>: New comment.
11140
5c3216e2
OS
111412010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11142
c6f46ca0
OS
11143 * server.c (handle_query): strcpy() the returned string from paddress()
11144 instead of sprintf().
5c3216e2
OS
11145 * utils.c (paddress): Return phex_nz().
11146
6bd31874
JB
111472010-07-07 Joel Brobecker <brobecker@adacore.com>
11148
11149 * server.c (handle_v_cont): Call mourn_inferior if process
11150 just exited.
11151 (myresume): Likewise.
11152
0fb4aa4b
PA
111532010-07-01 Pedro Alves <pedro@codesourcery.com>
11154
11155 Static tracepoints, and integration with UST.
11156
11157 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11158 * mem-break.c (uninsert_all_breakpoints)
11159 (reinsert_all_breakpoints): New.
11160 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11161 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11162 (gdb_agent_ust_loaded, helper_thread_id)
11163 (gdb_agent_helper_thread_id): New macros.
11164 (struct ipa_sym_addresses): Add addr_ust_loaded,
11165 addr_helper_thread_id, addr_cmd_buf.
11166 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11167 (in_process_agent_loaded_ust): New.
11168 (write_e_ust_not_loaded): New.
11169 (maybe_write_ipa_ust_not_loaded): New.
11170 (struct collect_static_trace_data_action): New.
11171 (enum tracepoint_type) <static_tracepoint>: New.
11172 (struct tracepoint) <handle>: Mention static tracepoints.
11173 (struct static_tracepoint_ctx): New.
11174 (CMD_BUF_SIZE): New.
11175 (add_tracepoint_action): Handle static tracepoint actions.
11176 (unprobe_marker_at): New.
11177 (clear_installed_tracepoints): Handle static tracepoints.
11178 (cmd_qtdp): Handle static tracepoints.
11179 (probe_marker_at): New.
11180 (cmd_qtstart): Handle static tracepoints.
11181 (response_tracepoint): Handle static tracepoints.
11182 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11183 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11184 (get_context_regcache): Handle static tracepoints.
11185 (do_action_at_tracepoint): Handle static tracepoint actions.
11186 (traceframe_find_block_type): Handle static trace data blocks.
11187 (traceframe_read_sdata): New.
11188 (download_tracepoints): Download static tracepoint actions.
11189 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11190 (GDB_PROBE_NAME): New.
11191 (ust_ops): New.
11192 (GET_UST_SYM): New.
11193 (USTF): New.
11194 (dlsym_ust): New.
11195 (ust_marker_to_static_tracepoint): New.
11196 (gdb_probe): New.
11197 (collect_ust_data_at_tracepoint): New.
11198 (gdb_ust_probe): New.
11199 (UNIX_PATH_MAX, SOCK_DIR): New.
11200 (gdb_ust_connect_sync_socket): New.
11201 (resume_thread, stop_thread): New.
11202 (run_inferior_command): New.
11203 (init_named_socket): New.
11204 (gdb_ust_socket_init): New.
11205 (cstr_to_hexstr): New.
11206 (next_st): New.
11207 (first_marker, next_marker): New.
11208 (response_ust_marker): New.
11209 (cmd_qtfstm, cmd_qtsstm): New.
11210 (unprobe_marker_at, probe_marker_at): New.
11211 (cmd_qtstmat, gdb_ust_thread): New.
11212 (gdb_ust_init): New.
11213 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11214 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11215 (ST_REGENTRY): New.
11216 (x86_64_st_collect_regmap): New.
11217 (X86_64_NUM_ST_COLLECT_GREGS): New.
11218 (AMD64_RIP_REGNUM): New.
11219 (supply_static_tracepoint_registers): New.
11220 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11221 (ST_REGENTRY): New.
11222 (i386_st_collect_regmap): New.
11223 (i386_NUM_ST_COLLECT_GREGS): New.
11224 (supply_static_tracepoint_registers): New.
11225 * server.c (handle_query): Handle qXfer:statictrace:read.
11226 <qSupported>: Report support for StaticTracepoints, and
11227 qXfer:statictrace:read features.
11228 * server.h (traceframe_read_sdata)
11229 (supply_static_tracepoint_registers): Declare.
11230 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11231 (unpack_varlen_hex): Include in IPA build.
11232 * Makefile.in (ustlibs, ustinc): New.
11233 (IPA_OBJS): Add remote-utils-ipa.o.
11234 ($(IPA_LIB)): Link -ldl and -lpthread.
11235 (UST_CFLAGS): New.
11236 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11237 * config.in, configure: Regenerate.
11238
9e4344e5
PA
112392010-06-20 Ian Lance Taylor <iant@google.com>
11240 Pedro Alves <pedro@codesourcery.com>
11241
11242 * linux-x86-low.c (always_true): Delete.
11243 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11244 trying to fool the compiler with always_true.
11245
c6beb2cb
PA
112462010-06-20 Pedro Alves <pedro@codesourcery.com>
11247
11248 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11249 conditions in gdbserver.
11250
d2ed6730
UW
112512010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11252
11253 * spu-low.c (spu_read_memory): Wrap around local store limit.
11254 (spu_write_memory): Likewise.
11255
4e29fb54
PA
112562010-06-15 Pedro Alves <pedro@codesourcery.com>
11257
11258 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11259 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11260 LONGEST uses.
11261 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11262 uses.
11263 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11264 uses with LONGEST uses.
11265
6a271cae
PA
112662010-06-14 Stan Shebs <stan@codesourcery.com>
11267 Pedro Alves <pedro@codesourcery.com>
11268
11269 Bytecode compiler.
11270
11271 * linux-x86-low.c: Include limits.h.
11272 (add_insns): New.
11273 (always_true): New.
11274 (EMIT_ASM): New.
11275 (EMIT_ASM32): New.
11276 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11277 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11278 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11279 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11280 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11281 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11282 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11283 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11284 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11285 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11286 (amd64_emit_void_call_2): New.
11287 (amd64_emit_ops): New.
11288 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11289 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11290 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11291 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11292 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11293 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11294 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11295 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11296 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11297 (i386_emit_stack_adjust, i386_emit_int_call_1)
11298 (i386_emit_void_call_2): New.
11299 (i386_emit_ops): New.
11300 (x86_emit_ops): New.
11301 (the_low_target): Install x86_emit_ops.
11302 * server.h (struct emit_ops): New.
11303 (get_raw_reg_func_addr): Declare.
11304 (current_insn_ptr, emit_error): Declare.
11305 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11306 (set_trace_state_variable_value): New defines.
11307 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11308 addr_get_trace_state_variable_value and
11309 addr_set_trace_state_variable_value.
11310 (symbol_list): New fields for get_raw_reg,
11311 get_trace_state_variable_value and set_trace_state_variable_value.
11312 (condfn): New typedef.
11313 (struct tracepoint): New field `compiled_cond'.
11314 (do_action_at_tracepoint): Clear compiled_cond.
11315 (get_trace_state_variable_value, set_trace_state_variable_value):
11316 Export in the IPA.
11317 (condition_true_at_tracepoint): If there's a compiled condition,
11318 run that.
11319 (current_insn_ptr, emit_error): New globals.
11320 (struct bytecode_address): New.
11321 (get_raw_reg_func_addr): New.
11322 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11323 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11324 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11325 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11326 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11327 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11328 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11329 (compile_tracepoint_condition, compile_bytecodes): New.
11330 * target.h (emit_ops): Forward declare.
11331 (struct target_ops): New field emit_ops.
11332 (target_emit_ops): New.
11333 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11334 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11335 * linux-low.c (linux_emit_ops): New.
11336 (linux_target_ops): Install it.
11337 * linux-low.h (struct linux_target_ops): New field emit_ops.
11338
92b72907
UW
113392010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11340
11341 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11342 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11343
fa593d66
PA
113442010-06-01 Pedro Alves <pedro@codesourcery.com>
11345 Stan Shebs <stan@codesourcery.com>
11346
11347 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11348 (all): Depend on $(extra_libraries).
11349 (install-only): Install the IPA.
11350 (IPA_OBJS, IPA_LIB): New.
11351 (clean): Remove the IPA lib.
11352 (IPAGENT_CFLAGS): New.
11353 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11354 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11355 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11356 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11357 * configure.ac: Check for atomic builtins support in the compiler.
11358 (IPA_DEPFILES, extra_libraries): Define.
11359 * configure.srv (ipa_obj): Add description.
11360 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11361 (i[34567]86-*-linux*): Set ipa_obj.
11362 (x86_64-*-linux*): Set ipa_obj.
11363 * linux-low.c (stabilizing_threads): New.
11364 (supports_fast_tracepoints): New.
11365 (linux_detach): Stabilize threads before detaching.
11366 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11367 the lwp is either not stabilizing, or is moving out of a jump pad.
11368 (linux_fast_tracepoint_collecting): New.
11369 (maybe_move_out_of_jump_pad): New.
11370 (enqueue_one_deferred_signal): New.
11371 (dequeue_one_deferred_signal): New.
11372 (linux_wait_for_event_1): If moving out of a jump pad, defer
11373 pending signals to later.
11374 (linux_stabilize_threads): New.
11375 (linux_wait_1): Check if threads need moving out of jump pads, and
11376 do it if so.
11377 (stuck_in_jump_pad_callback): New.
11378 (move_out_of_jump_pad_callback): New.
11379 (lwp_running): New.
11380 (linux_resume_one_lwp): Handle moving out of jump pads.
11381 (linux_set_resume_request): Dequeue deferred signals.
11382 (need_step_over_p): Also step over fast tracepoint jumps.
11383 (start_step_over): Also uninsert fast tracepoint jumps.
11384 (finish_step_over): Also reinsert fast tracepoint jumps.
11385 (linux_install_fast_tracepoint_jump): New.
11386 (linux_target_ops): Install linux_stabilize_threads and
11387 linux_install_fast_tracepoint_jump_pad.
11388 * linux-low.h (linux_target_ops) <get_thread_area,
11389 install_fast_tracepoint_jump_pad>: New fields.
11390 (struct lwp_info) <collecting_fast_tracepoint,
11391 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11392 (linux_get_thread_area): Declare.
11393 * linux-x86-low.c (jump_insn): New.
11394 (x86_get_thread_area): New.
11395 (append_insns): New.
11396 (push_opcode): New.
11397 (amd64_install_fast_tracepoint_jump_pad): New.
11398 (i386_install_fast_tracepoint_jump_pad): New.
11399 (x86_install_fast_tracepoint_jump_pad): New.
11400 (the_low_target): Install x86_get_thread_area and
11401 x86_install_fast_tracepoint_jump_pad.
11402 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11403 (struct fast_tracepoint_jump): New.
11404 (fast_tracepoint_jump_insn): New.
11405 (fast_tracepoint_jump_shadow): New.
11406 (find_fast_tracepoint_jump_at): New.
11407 (fast_tracepoint_jump_here): New.
11408 (delete_fast_tracepoint_jump): New.
11409 (set_fast_tracepoint_jump): New.
11410 (uninsert_fast_tracepoint_jumps_at): New.
11411 (reinsert_fast_tracepoint_jumps_at): New.
11412 (set_breakpoint_at): Use write_inferior_memory.
11413 (uninsert_raw_breakpoint): Use write_inferior_memory.
11414 (check_mem_read): Mask out fast tracepoint jumps.
11415 (check_mem_write): Mask out fast tracepoint jumps.
11416 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11417 (set_fast_tracepoint_jump): Declare.
11418 (delete_fast_tracepoint_jump)
11419 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11420 (reinsert_fast_tracepoint_jumps_at): Declare.
11421 * regcache.c: Don't compile many functions when building the
11422 in-process agent library.
11423 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11424 the register buffer in the heap.
11425 (free_register_cache): If the register buffer isn't owned by the
11426 regcache, don't free it.
11427 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11428 pre-existing register caches.
11429 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11430 type.
11431 (convert_ascii_to_int): : Constify `from' parameter type.
11432 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11433 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11434 the needed buffer in-place.
11435 (relocate_instruction): New.
11436 * server.c (handle_query) <qSymbols>: If the target supports
11437 tracepoints, give it a chance of looking up symbols. Report
11438 support for fast tracepoints.
11439 (handle_status): Stabilize threads.
11440 (process_serial_event): Adjust.
11441 * server.h (struct fast_tracepoint_jump): Forward declare.
11442 (struct process_info) <fast_tracepoint_jumps>: New field.
11443 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11444 (decode_X_packet, decode_M_packet): Adjust.
11445 (relocate_instruction): Declare.
11446 (in_process_agent_loaded): Declare.
11447 (tracepoint_look_up_symbols): Declare.
11448 (struct fast_tpoint_collect_status): Declare.
11449 (fast_tracepoint_collecting): Declare.
11450 (force_unlock_trace_buffer): Declare.
11451 (handle_tracepoint_bkpts): Declare.
11452 (initialize_low_tracepoint)
11453 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11454 * target.h (struct target_ops) <stabilize_threads,
11455 install_fast_tracepoint_jump_pad>: New fields.
11456 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11457 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11458 [HAVE_STDINT_H]: Include stdint.h.
11459 (trace_debug_1): Rename to ...
11460 (trace_vdebug): ... this.
11461 (trace_debug): Rename to ...
11462 (trace_debug_1): ... this. Add `level' parameter.
11463 (trace_debug): New.
11464 (ATTR_USED, ATTR_NOINLINE): New.
11465 (IP_AGENT_EXPORT): New.
11466 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11467 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11468 (about_to_request_buffer_space, trace_buffer_is_full)
11469 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11470 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11471 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11472 (traceframe_write_count, traceframes_created)
11473 (trace_state_variables)
11474 New renaming defines.
11475 (struct ipa_sym_addresses): New.
11476 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11477 (symbol_list): New.
11478 (ipa_sym_addrs): New.
11479 (all_tracepoint_symbols_looked_up): New.
11480 (in_process_agent_loaded): New.
11481 (write_e_ipa_not_loaded): New.
11482 (maybe_write_ipa_not_loaded): New.
11483 (tracepoint_look_up_symbols): New.
11484 (debug_threads) [IN_PROCESS_AGENT]: New.
11485 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11486 (UNKNOWN_SIDE_EFFECTS): New.
11487 (stop_tracing): New.
11488 (flush_trace_buffer): New.
11489 (stop_tracing_bkpt): New.
11490 (flush_trace_buffer_bkpt): New.
11491 (read_inferior_integer): New.
11492 (read_inferior_uinteger): New.
11493 (read_inferior_data_pointer): New.
11494 (write_inferior_data_pointer): New.
11495 (write_inferior_integer): New.
11496 (write_inferior_uinteger): New.
11497 (struct collect_static_trace_data_action): Delete.
11498 (enum tracepoint_type): New.
11499 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11500 <actions_str, step_actions, step_actions_str>: Only include in
11501 GDBserver.
fa593d66
PA
11502 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11503 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11504 (tracepoints): Use IP_AGENT_EXPORT.
11505 (last_tracepoint): Don't include in the IPA.
11506 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11507 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11508 (alloced_trace_state_variables): New.
11509 (trace_state_variables): Use IP_AGENT_EXPORT.
11510 (traceframe_t): Delete unused variable.
11511 (circular_trace_buffer): Don't include in the IPA.
11512 (trace_buffer_start): Delete.
11513 (struct trace_buffer_control): New.
11514 (trace_buffer_free): Delete.
11515 (struct ipa_trace_buffer_control): New.
11516 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11517 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11518 New.
11519 (trace_buffer_ctrl): New.
11520 (TRACE_BUFFER_CTRL_CURR): New.
11521 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11522 Reimplement as macros.
11523 (trace_buffer_wrap): Delete.
11524 (traceframe_write_count, traceframe_read_count)
11525 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11526 (struct tracepoint_hit_ctx) <type>: New field.
11527 (struct fast_tracepoint_ctx): New.
11528 (memory_barrier): New.
11529 (cmpxchg): New.
11530 (record_tracepoint_error): Update atomically in the IPA.
11531 (clear_inferior_trace_buffer): New.
11532 (about_to_request_buffer_space): New.
11533 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11534 updating the same buffer.
11535 (add_tracepoint): Default the tracepoint's type to trap
11536 tracepoint, and orig_size to -1.
11537 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11538 internal variables.
11539 (create_trace_state_variable): New parameter `gdb'. Handle it.
11540 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11541 (cmd_qtdp): Handle fast tracepoints.
11542 (cmd_qtdv): Adjust.
11543 (max_jump_pad_size): New.
11544 (gdb_jump_pad_head): New.
11545 (get_jump_space_head): New.
11546 (claim_jump_space): New.
11547 (sort_tracepoints): New.
11548 (MAX_JUMP_SIZE): New.
11549 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11550 IPA.
11551 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11552 support. Upload fast traceframes, and delete internal IPA
11553 breakpoints.
11554 (stop_tracing_handler): New.
11555 (flush_trace_buffer_handler): New.
11556 (cmd_qtstop): Upload fast tracepoints.
11557 (response_tracepoint): Handle fast tracepoints.
11558 (tracepoint_finished_step): Upload fast traceframes. Set the
11559 tracepoint hit context's tracepoint type.
11560 (handle_tracepoint_bkpts): New.
11561 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11562 type. Add comment about fast tracepoints.
11563 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11564 non-existing action_str field.
11565 (get_context_regcache): Handle fast tracepoints.
11566 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11567 to the regcache.
11568 (fast_tracepoint_from_jump_pad_address): New.
11569 (fast_tracepoint_from_ipa_tpoint_address): New.
11570 (collecting_t): New.
11571 (force_unlock_trace_buffer): New.
11572 (fast_tracepoint_collecting): New.
11573 (collecting): New.
11574 (gdb_collect): New.
11575 (write_inferior_data_ptr): New.
11576 (target_tp_heap): New.
11577 (target_malloc): New.
11578 (download_agent_expr): New.
11579 (UALIGN): New.
11580 (download_tracepoints): New.
11581 (download_trace_state_variables): New.
11582 (upload_fast_traceframes): New.
11583 (IPA_FIRST_TRACEFRAME): New.
11584 (IPA_NEXT_TRACEFRAME_1): New.
11585 (IPA_NEXT_TRACEFRAME): New.
11586 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11587 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11588 (gdb_jump_pad_buffer_end): New.
11589 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11590 (initialize_tracepoint): Adjust.
11591 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11592 buffer. Initialize the low module.
11593 * utils.c (PREFIX, TOOLNAME): New.
11594 (malloc_failure): Use PREFIX.
11595 (error): In the IPA, an error causes an exit.
11596 (fatal, warning): Use PREFIX.
11597 (internal_error): Use TOOLNAME.
11598 (NUMCELLS): Increase to 10.
11599 * configure, config.in: Regenerate.
11600
d149dd1d
PA
116012010-06-01 Pedro Alves <pedro@codesourcery.com>
11602
11603 * server.c (handle_query) <qSupported>: Do two passes over the
11604 qSupported string to avoid nesting strtok.
11605
f6528abd
JK
116062010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11607
11608 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11609 (CDEPS): New.
11610 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11611 -Wl,--dynamic-list.
11612 * configure: Regenerate.
11613 * proc-service.list: New.
11614
ca2a87a0
JK
116152010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11616
11617 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11618 New comment.
11619
363a6e9f
OS
116202010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11621
11622 * gdbreplay.c (remote_open): Check error return from socket() call by
11623 its equality to -1 not by it being negative.
11624 * remote-utils.c (remote_open): Likewise.
11625
d23b6cb1
PA
116262010-05-23 Pedro Alves <pedro@codesourcery.com>
11627
11628 * config.h: Regenerate.
11629
28d3cf85
MK
116302010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11631
11632 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11633 doesn't provide PTRACE_GET_THREAD_AREA.
11634
fea36a59
MK
116352010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11636
11637 * linux-m68k-low.c: Include <asm/ptrace.h>
11638 (ps_get_thread_area): Implement.
11639
24b066ba
DE
116402010-05-03 Doug Evans <dje@google.com>
11641
11642 * event-loop.c (struct callback_event): New struct.
11643 (callback_list): New global.
11644 (append_callback_event, delete_callback_event): New functions.
11645 (process_callback): New function.
11646 (start_event_loop): Call it.
11647 * remote-utils.c (NOT_SCHEDULED): Define.
11648 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11649 moved out of readchar.
11650 (readchar): Rewrite. Call reschedule before returning.
11651 (reset_readchar): New function.
11652 (remote_close): Call it.
11653 (process_remaining, reschedule): New functions.
11654 * server.h (callback_handler_func): New typedef.
11655 (append_callback_event, delete_callback_event): Declare.
11656
9836d6ea
PA
116572010-05-03 Pedro Alves <pedro@codesourcery.com>
11658
11659 * proc-service.c (ps_pglobal_lookup): Use
11660 thread_db_look_up_one_symbol.
11661 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11662 parameter. Use it instead of all_symbols_looked_up.
11663 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11664 field.
11665 (all_symbols_looked_up): Don't declare.
11666 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11667 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11668 field.
11669 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11670 Set all_symbols_looked_up here.
11671 (thread_db_look_up_one_symbol): New.
11672 (thread_db_get_tls_address): Adjust.
11673 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11674 thread_db object on the heap, and tentatively set it in the
11675 process structure.
11676 (thread_db_init): Don't set all_symbols_looked_up here.
11677 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11678
7984d532
PA
116792010-05-03 Pedro Alves <pedro@codesourcery.com>
11680
11681 * linux-low.c (linux_kill, linux_detach): Adjust.
11682 (status_pending_p_callback): Remove redundant statement. Check
11683 for !TARGET_WAITIKIND_IGNORE, instead of
11684 TARGET_WAITKIND_STOPPED.
11685 (handle_tracepoints): Make sure LWP is locked. Adjust.
11686 (linux_wait_for_event_1): Adjust.
11687 (linux_cancel_breakpoints): New.
11688 (unsuspend_one_lwp): New.
11689 (unsuspend_all_lwps): New.
11690 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11691 (send_sigstop_callback): Change return type to int, add new
11692 `except' parameter and handle it.
11693 (suspend_and_send_sigstop_callback): New.
11694 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11695 pass them down. If SUSPEND, also increment the lwp's suspend
11696 count.
11697 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11698 (need_step_over_p): Don't consider suspended LWPs.
11699 (start_step_over): Adjust.
11700 (proceed_one_lwp): Change return type to int, add new `except'
11701 parameter and handle it.
11702 (unsuspend_and_proceed_one_lwp): New.
11703 (proceed_all_lwps): Use find_inferior instead of
11704 for_each_inferior.
11705 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11706 also decrement the suspend count of LWPs. Pass `except' down,
11707 instead of hacking its suspend count.
11708 (linux_pause_all): Add `freeze' parameter. Adjust.
11709 (linux_unpause_all): New.
11710 (linux_target_ops): Install linux_unpause_all.
11711 * server.c (handle_status): Adjust.
11712 * target.h (struct target_ops): New fields `unpause_all' and
11713 `cancel_breakpoints'. Add new parameter to `pause_all'.
11714 (pause_all): Add new `freeze' parameter.
11715 (unpause_all): New.
11716 (cancel_breakpoints): New.
11717 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11718 cancel breakpoints.
11719 (cmd_qtstart): Pause threads.
11720 (stop_tracing): Pause threads, and cancel breakpoints.
11721 * win32-low.c (win32_target_ops): Adjust.
11722
e471f25b
PA
117232010-05-03 Pedro Alves <pedro@codesourcery.com>
11724
11725 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11726 the inferior right away from here...
11727 (linux_wait_1): ... to here, and adjust to check the thread's
11728 last_resume_kind instead of the lwp's step or stop_expected flags.
11729
1915ef4f
PA
117302010-05-02 Pedro Alves <pedro@codesourcery.com>
11731
11732 * README: Use consistent `GDB' and `GDBserver' spellings.
11733
f9e39928
PA
117342010-05-02 Pedro Alves <pedro@codesourcery.com>
11735
11736 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11737 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11738 (linux_detach_one_lwp): Assume the lwp is stopped.
11739 (any_thread_of): Delete.
11740 (linux_detach): Stop all lwps here. Don't blindly delete all
11741 breakpoints.
11742 (delete_lwp_callback): New.
11743 (linux_mourn): Delete all lwps of the process that is gone.
11744 (linux_wait_1): Don't delete the last lwp of the process here.
11745 * mem-break.h (mark_breakpoints_out): Declare.
11746 * mem-break.c (mark_breakpoints_out): New.
11747 (free_all_breakpoints): Use it.
11748 * server.c (handle_target_event): If the process is gone, mark
11749 breakpoints out.
11750 * thread-db.c (struct thread_db) <create_bp>: New field.
11751 (thread_db_enable_reporting): Fix prototype. Store a thread event
11752 breakpoint reference in the thread_db struct.
11753 (thread_db_load_search): Clear the thread_db object.
11754 (try_thread_db_load_1): Ditto.
11755 (switch_to_process): New.
11756 (disable_thread_event_reporting): Use it.
11757 (remove_thread_event_breakpoints): New.
11758 (thread_db_detach, thread_db_mourn): Use it.
11759
1e7fc18c
PA
117602010-05-01 Pedro Alves <pedro@codesourcery.com>
11761
11762 * linux-low.c (linux_enable_event_reporting): New.
11763 (linux_wait_for_event_1, handle_extended_wait): Use it.
11764
02fc4de7
PA
117652010-04-30 Pedro Alves <pedro@codesourcery.com>
11766
11767 * linux-low.c (linux_kill_one_lwp, linux_kill)
11768 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11769 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11770 SIGSTOP even if the LWP is stopped.
11771 (send_sigstop_callback): New.
11772 (stop_all_lwps): Use send_sigstop_callback instead.
11773 (linux_resume_one_thread): Adjust.
11774 (proceed_one_lwp): Still proceed an LWP that the client has
11775 requested to stop, if we haven't reported it as stopped yet. Make
11776 sure that LWPs the client want stopped, have a pending SIGSTOP.
11777
bc3b5632
DE
117782010-04-26 Doug Evans <dje@google.com>
11779
ae1ada35
DE
11780 * server.c (handle_general_set): Make static.
11781
bc3b5632
DE
11782 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11783 Print received char after testing for error/eof instead of before.
11784 (input_interrupt): Tweak comment.
11785
65730243
DE
117862010-04-23 Doug Evans <dje@google.com>
11787
11788 * server.c (start_inferior): Print inferior argv if --debug.
11789
a8ae7dc0
AR
117902010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11791
11792 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11793 * nto-x86-low.c: Include server.h
11794
1c07cc19
PM
117952010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11796
11797 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11798 be consistent with other sources of this directory.
11799 (init_registers_amd64): Correct name of source file of this function
11800 in the comment.
11801
e0a61e09
PM
118022010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11803
11804 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11805 64-bit executables.
11806
54709339
PM
118072010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11808
11809 * win32-i386-low.c: Add 64-bit support.
11810 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11811 (init_registers_amd64): Declare.
11812 (mappings): Add 64-bit version of array.
11813 (init_windows_x86): New function.
11814 (the_low_target): Change init_arch field to init_windows_x86.
11815
e8f0053d
PM
118162010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11817
11818 * win32-low.c: Adapt to support also 64-bit architecture.
11819 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11820 (get_image_name): Use SIZE_T type for local variable `done'.
11821 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11822 (toolhelp_get_dll_name): Idem.
11823 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11824 Use uintptr_t typecast to avoid warning.
11825 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11826 (handle_exception): Use phex_nz to avoid warning.
11827 (win32_wait): Remove unused local variable `process'.
11828
c481e77e
PM
118292010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11830
11831 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11832 `amd64-avx.o'.
11833
12ea4b69
PM
118342010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11835
11836 * configure.ac: Use `ws2_32' library for srv_mingw.
11837 * configure: Regenerate.
11838 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11839 * remote-utils.c: Likewise.
11840
f6d1620c
L
118412010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11842
11843 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11844 if __x86_64__ is defined.
11845
8e642873
PM
118462010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11847
11848 * configure: Regenerate.
11849
711e434b
PM
118502010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11851
11852 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11853 * target.h (target_ops): New get_tib_address field.
11854 * win32-low.h (win32_thread_info): Add thread_local_base field.
11855 * win32-low.c (child_add_thread): Add tlb argument.
11856 Set thread_local_base field to TLB.
11857 (get_child_debug_event): Adapt to child_add_thread change.
11858 (win32_get_tib_address): New function.
11859 (win32_target_ops): Set get_tib_address field to
11860 win32_get_tib_address.
11861 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11862
505106cd
PA
118632010-04-12 Pedro Alves <pedro@codesourcery.com>
11864
505106cd
PA
11865 * linux-low.c (linux_mourn): Also remove the process.
11866 * server.c (handle_target_event): Don't remove the process here.
11867 * nto-low.c (nto_mourn): New.
11868 (nto_target_ops): Install it.
11869 * spu-low.c (spu_mourn): New.
11870 (spu_target_ops): Install it.
11871 * win32-low.c (win32_mourn): New.
11872 (win32_target_ops): Install it.
11873
e8470a06
PA
118742010-04-12 Pedro Alves <pedro@codesourcery.com>
11875
11876 * server.h (buffer_xml_printf): Remove redundant `;'.
11877
45ba0d02
PA
118782010-04-12 Pedro Alves <pedro@codesourcery.com>
11879
11880 * regcache.c (set_register_cache): Invalidate regcaches before
11881 changing the register cache layout.
11882 (regcache_invalidate_one): Allow a NULL regcache.
11883 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11884 regcaches before changing the register cache layout or the target
11885 regsets.
11886
59e04013
L
118872010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11888
11889 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11890 variable warning on Linux/x86-64.
11891
8336d594
PA
118922010-04-11 Pedro Alves <pedro@codesourcery.com>
11893
11894 GDBserver disconnected tracing support.
11895
11896 * linux-low.c (linux_remove_process): Delete.
11897 (add_lwp): Don't set last_resume_kind here.
11898 (linux_kill): Use `mourn'.
11899 (linux_detach): Use `thread_db_detach', and `mourn'.
11900 (linux_mourn): New.
11901 (linux_attach_lwp_1): Adjust comment.
11902 (linux_attach): last_resume_kind moved the thread_info; adjust.
11903 (status_pending_p_callback): Adjust.
11904 (linux_wait_for_event_1): Adjust.
11905 (count_events_callback, select_singlestep_lwp_callback)
11906 (select_event_lwp_callback, cancel_breakpoints_callback)
11907 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11908 (proceed_one_lwp): Adjust.
11909 (linux_async): Add debug output.
11910 (linux_thread_stopped): New.
11911 (linux_pause_all): New.
11912 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11913 linux_pause_all.
11914 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11915 (thread_db_free): Delete declaration.
11916 (thread_db_detach, thread_db_mourn): Declare.
11917 * thread-db.c (thread_db_init): Use thread_db_mourn.
11918 (thread_db_free): Delete, split in two.
11919 (disable_thread_event_reporting): New.
11920 (thread_db_detach): New.
11921 (thread_db_mourn): New.
11922
11923 * server.h (struct thread_info) <last_resume_kind>: New field.
11924 <attached>: Add comment.
11925 <gdb_detached>: New field.
11926 (handler_func): Change return type to int.
11927 (handle_serial_event, handle_target_event): Ditto.
11928 (gdb_connected): Declare.
11929 (tracing): Delete.
11930 (disconnected_tracing): Declare.
11931 (stop_tracing): Declare.
11932
11933 * server.c (handle_query) <qSupported>: Report support for
11934 disconnected tracing.
11935 (queue_stop_reply_callback): Account for running threads.
11936 (gdb_wants_thread_stopped): New.
11937 (gdb_wants_all_threads_stopped): New.
11938 (gdb_reattached_process): New.
11939 (handle_status): Clear the `gdb_detached' flag of all processes.
11940 In all-stop, stop all threads.
11941 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11942 (process_serial_event): If the remote connection breaks, or if an
11943 exit was forced with "monitor exit", force an event loop exit.
11944 Handle disconnected tracing on detach.
11945 (handle_serial_event): Adjust.
11946 (handle_target_event): If GDB isn't connected, forward events back
11947 to the inferior, unless the last process exited, in which case,
11948 exit gdbserver. Adjust interface.
11949
11950 * remote-utils.c (remote_open): Don't block in accept. Instead
11951 register an event loop source on the listen socket file
11952 descriptor. Refactor bits into ...
11953 (listen_desc): ... this new global.
11954 (gdb_connected): ... this new function.
11955 (enable_async_notification): ... this new function.
11956 (handle_accept_event): ... this new function.
11957 (remote_close): Clear remote_desc.
11958
11959 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11960
11961 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11962 New fields.
11963 (mourn_inferior): Define.
11964 (target_process_qsupported): Avoid the dangling else problem.
11965 (thread_stopped): Define.
11966 (pause_all): Define.
11967 (target_waitstatus_to_string): Declare.
11968 * target.c (target_waitstatus_to_string): New.
11969
11970 * tracepoint.c (tracing): Make extern.
11971 (disconnected_tracing): New.
11972 (stop_tracing): Make extern. Handle tracing stops due to GDB
11973 disconnecting.
11974 (cmd_qtdisconnected): New.
11975 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11976 (handle_tracepoint_general_set): Handle QTDisconnected.
11977
11978 * event-loop.c (event_handler_func): Change return type to int.
11979 (process_event): Bail out if the event handler wants the event
11980 loop to stop.
11981 (handle_file_event): Ditto.
11982 (start_event_loop): Bail out if the event handler wants the event
11983 loop to stop.
11984
11985 * nto-low.c (nto_target_ops): Adjust.
11986 * spu-low.c (spu_wait): Don't remove the process here.
11987 (spu_target_ops): Adjust.
11988 * win32-low.c (win32_wait): Don't remove the process here.
11989 (win32_target_ops): Adjust.
11990
5d267c4c
PA
119912010-04-11 Pedro Alves <pedro@codesourcery.com>
11992
11993 * regcache.c (realloc_register_cache): Invalidate inferior's
11994 regcache before recreating it.
11995
623ccd72
PA
119962010-04-09 Pedro Alves <pedro@codesourcery.com>
11997
11998 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11999
219f2f23
PA
120002010-04-09 Stan Shebs <stan@codesourcery.com>
12001 Pedro Alves <pedro@codesourcery.com>
12002
12003 * server.h (LONGEST): New.
12004 (struct thread_info) <while_stepping>: New field.
12005 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12006 Declare.
12007 (initialize_tracepoint, handle_tracepoint_general_set)
12008 (handle_tracepoint_query, tracepoint_finished_step)
12009 (tracepoint_was_hit, release_while_stepping_state_list):
12010 (current_traceframe): Declare.
12011 * server.c (handle_general_set): Handle tracepoint packets.
12012 (read_memory): New.
12013 (write_memory): New.
12014 (handle_search_memory_1): Use read_memory.
12015 (handle_query): Report support for conditional tracepoints, trace
12016 state variables, and tracepoint sources. Handle tracepoint
12017 queries.
12018 (main): Initialize the tracepoints module.
12019 (process_serial_event): Handle traceframe reads/writes.
12020
12021 * linux-low.c (handle_tracepoints): New.
12022 (linux_wait_1): Call it.
12023 (linux_resume_one_lwp): Handle while-stepping.
12024 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12025 (linux_target_ops): Install them.
12026 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12027 New field.
12028 * linux-x86-low.c (x86_supports_tracepoints): New.
12029 (the_low_target). Install it.
12030
12031 * mem-break.h (delete_breakpoint): Declare.
12032 * mem-break.c (delete_breakpoint): Make external.
12033
12034 * target.h (struct target_ops): Add `supports_tracepoints',
12035 `read_pc', and `write_pc' fields.
12036 (target_supports_tracepoints): Define.
12037 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12038 (phex_nz): New.
12039
12040 * regcache.h (struct regcache) <registers_owned>: New field.
12041 (init_register_cache, regcache_cpy): Declare.
12042 (regcache_read_pc, regcache_write_pc): Declare.
12043 (register_cache_size): Declare.
12044 (supply_regblock): Declare.
12045 * regcache.c (init_register_cache): New.
12046 (new_register_cache): Use it.
12047 (regcache_cpy): New.
12048 (register_cache_size): New.
12049 (supply_regblock): New.
12050 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 12051
219f2f23
PA
12052 * tracepoint.c: New.
12053
12054 * Makefile.in (OBS): Add tracepoint.o.
12055 (tracepoint.o): New rule.
12056
3a13a53b
L
120572010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12058
12059 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12060 (i386-mmx.o): New.
12061 (i386-mmx.c): Likewise.
12062 (i386-mmx-linux.o): Likewise.
12063 (i386-mmx-linux.c): Likewise.
12064
12065 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12066 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12067 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12068 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12069
12070 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12071 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12072 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12073
1570b33e
L
120742010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12075
12076 * Makefile.in (clean): Updated.
12077 (i386-avx.o): New.
12078 (i386-avx.c): Likewise.
12079 (i386-avx-linux.o): Likewise.
12080 (i386-avx-linux.c): Likewise.
12081 (amd64-avx.o): Likewise.
12082 (amd64-avx.c): Likewise.
12083 (amd64-avx-linux.o): Likewise.
12084 (amd64-avx-linux.c): Likewise.
12085
12086 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12087 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12088 (srv_amd64_regobj): Add amd64-avx.o.
12089 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12090 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12091 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12092 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12093 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12094 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12095 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12096
12097 * i387-fp.c: Include "i386-xstate.h".
12098 (i387_xsave): New.
12099 (i387_cache_to_xsave): Likewise.
12100 (i387_xsave_to_cache): Likewise.
12101 (x86_xcr0): Likewise.
12102
12103 * i387-fp.h (i387_cache_to_xsave): Likewise.
12104 (i387_xsave_to_cache): Likewise.
12105 (x86_xcr0): Likewise.
12106
12107 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12108 * linux-crisv32-low.c (target_regsets): Likewise.
12109 * linux-m68k-low.c (target_regsets): Likewise.
12110 * linux-mips-low.c (target_regsets): Likewise.
12111 * linux-ppc-low.c (target_regsets): Likewise.
12112 * linux-s390-low.c (target_regsets): Likewise.
12113 * linux-sh-low.c (target_regsets): Likewise.
12114 * linux-sparc-low.c (target_regsets): Likewise.
12115 * linux-xtensa-low.c (target_regsets): Likewise.
12116
12117 * linux-low.c: Include <sys/uio.h>.
12118 (regsets_fetch_inferior_registers): Support nt_type.
12119 (regsets_store_inferior_registers): Likewise.
12120 (linux_process_qsupported): New.
12121 (linux_target_ops): Add linux_process_qsupported.
12122
12123 * linux-low.h (regset_info): Add nt_type.
12124 (linux_target_ops): Add process_qsupported.
12125
12126 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12127 and <sys/uio.h>.
12128 (init_registers_i386_avx_linux): New.
12129 (init_registers_amd64_avx_linux): Likewise.
12130 (xmltarget_i386_linux_no_xml): Likewise.
12131 (xmltarget_amd64_linux_no_xml): Likewise.
12132 (PTRACE_GETREGSET): Likewise.
12133 (PTRACE_SETREGSET): Likewise.
12134 (x86_fill_xstateregset): Likewise.
12135 (x86_store_xstateregset): Likewise.
12136 (use_xml): Likewise.
12137 (x86_linux_update_xmltarget): Likewise.
12138 (x86_linux_process_qsupported): Likewise.
12139 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12140 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12141 init_registers_i386_linux here. Call
12142 x86_linux_update_xmltarget.
12143 (the_low_target): Add x86_linux_process_qsupported.
12144
12145 * server.c (handle_query): Call target_process_qsupported.
12146
12147 * target.h (target_ops): Add process_qsupported.
12148 (target_process_qsupported): New.
12149
fc7238bb
PA
121502010-04-03 Pedro Alves <pedro@codesourcery.com>
12151
12152 * inferiors.c (add_thread): Set last_status kind to
12153 TARGET_WAITKIND_IGNORE.
12154 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12155 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12156 (linux_wait_1): Move `thread' local definition to block that uses
12157 it. Don't NULL initialize `event_child'.
12158 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12159 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12160 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12161
bdabb078
PA
121622010-04-01 Pedro Alves <pedro@codesourcery.com>
12163
12164 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12165 an extended waitstatus, or by a watchpoint.
12166 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12167 thread was stepping or has been stopped by a watchpoint.
12168
d3bbe7a0
PA
121692010-04-01 Pedro Alves <pedro@codesourcery.com>
12170
12171 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12172 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12173 of another, then delete the previous, and validate all
12174 breakpoints.
12175 (validate_inserted_breakpoint): New.
12176 (delete_disabled_breakpoints): New.
12177 (validate_breakpoints): New.
12178 (check_mem_read): Validate breakpoints before trusting their
12179 shadow. Delete disabled breakpoints.
12180 (check_mem_write): Validate breakpoints before trusting they
12181 should be inserted. Delete disabled breakpoints.
12182 * mem-break.h (validate_breakpoints):
12183 * server.c (handle_query): Validate breakpoints when we see a
12184 qSymbol query.
12185
8b07ae33
PA
121862010-04-01 Pedro Alves <pedro@codesourcery.com>
12187
12188 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12189 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12190 if we could tell there's a GDB breakpoint at stop_pc.
12191 (need_step_over_p): Don't do a step over if we find a GDB
12192 breakpoint at the resume PC.
12193
12194 * mem-break.c (struct raw_breakpoint): New.
12195 (enum bkpt_type): New type `gdb_breakpoint'.
12196 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12197 fields. New field `raw'.
12198 (find_raw_breakpoint_at): New.
12199 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12200 breakpoint instead.
12201 (set_breakpoint_at): Adjust.
12202 (delete_raw_breakpoint): New.
12203 (release_breakpoint): New.
12204 (delete_breakpoint): Rename to...
12205 (delete_breakpoint_1): ... this. Add proc parameter. Use
12206 release_breakpoint. Return ENOENT.
12207 (delete_breakpoint): Reimplement.
12208 (find_breakpoint_at): Delete.
12209 (find_gdb_breakpoint_at): New.
12210 (delete_breakpoint_at): Delete.
12211 (set_gdb_breakpoint_at): New.
12212 (delete_gdb_breakpoint_at): New.
12213 (gdb_breakpoint_here): New.
12214 (set_reinsert_breakpoint): Use release_breakpoint.
12215 (uninsert_breakpoint): Rename to ...
12216 (uninsert_raw_breakpoint): ... this.
12217 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12218 (reinsert_raw_breakpoint): Change parameter type to
12219 raw_breakpoint.
12220 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12221 instead.
12222 (check_breakpoints): Adjust. Use release_breakpoint.
12223 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12224 (breakpoint_inserted_here): Ditto.
12225 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12226 Don't trust the breakpoint's shadow if it is not inserted.
12227 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12228 (delete_all_breakpoints): Adjust.
12229 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12230 use delete_breakpoint_1.
12231
12232 * mem-break.h (breakpoints_supported): Delete declaration.
12233 (set_gdb_breakpoint_at): Declare.
12234 (gdb_breakpoint_here): Declare.
12235 (delete_breakpoint_at): Delete.
12236 (delete_gdb_breakpoint_at): Declare.
12237
12238 * server.h (struct raw_breakpoint): Forward declare.
12239 (struct process_info): New field `raw_breakpoints'.
12240
12241 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12242 breakpoints.
12243
6bf5e0ba
PA
122442010-03-24 Pedro Alves <pedro@codesourcery.com>
12245
12246 * linux-low.c (status_pending_p_callback): Fix comment.
12247 (linux_wait_for_event_1): Move most of the internal breakpoint
12248 handling from here...
12249 (linux_wait_1): ... to here.
12250 (count_events_callback): New.
12251 (select_singlestep_lwp_callback): New.
12252 (select_event_lwp_callback): New.
12253 (cancel_breakpoints_callback): New.
12254 (select_event_lwp): New.
12255 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12256 priority to all LWPs that have had events that should be reported
12257 to the client. Cancel breakpoints when about to reporting the
12258 event to the client, not while stopping lwps. No longer cancel
12259 finished single-steps here.
12260 (cancel_finished_single_step): Delete.
12261 (cancel_finished_single_steps): Delete.
12262
414a389f
PA
122632010-03-24 Pedro Alves <pedro@codesourcery.com>
12264
12265 * mem-break.c (enum bkpt_type): New.
12266 (struct breakpoint): New field `type'.
12267 (set_breakpoint_at): Change return type to struct breakpoint
12268 pointer. Set type to `other_breakpoint' by default.
12269 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12270 in the breakpoint list.
12271 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12272 (reinsert_breakpoint): Rename to ...
12273 (reinsert_raw_breakpoint): ... this.
12274 (reinsert_breakpoints_at): Adjust.
12275 * mem-break.h (struct breakpoint): Declare.
12276 (set_breakpoint_at): Change return type to struct breakpoint
12277 pointer.
12278
2280c721
PA
122792010-03-24 Pedro Alves <pedro@codesourcery.com>
12280
12281 * server.c (handle_query): Assign, not compare.
12282
d50171e4
PA
122832010-03-24 Pedro Alves <pedro@codesourcery.com>
12284
12285 Teach linux gdbserver to step-over-breakpoints.
12286
12287 * linux-low.c (can_hardware_single_step): New.
12288 (supports_breakpoints): New.
12289 (handle_extended_wait): If stopping threads, read the stop pc of
12290 the new cloned LWP.
12291 (get_pc): New.
12292 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12293 low target doesn't support retrieving the PC.
12294 (add_lwp): Set last_resume_kind to resume_continue.
12295 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12296 (linux_attach): Don't clear stop_expected. Set the lwp's
12297 last_resume_kind to resume_stop.
12298 (linux_detach_one_lwp): Don't check for removed breakpoints.
12299 (check_removed_breakpoint): Delete.
12300 (status_pending_p): Rename to ...
12301 (status_pending_p_callback): ... this. Don't check for removed
12302 breakpoints. Don't consider threads that are stopped from GDB's
12303 perspective.
12304 (linux_wait_for_lwp): Always read the stop_pc here.
12305 (cancel_breakpoint): New.
12306 (step_over_bkpt): New global.
12307 (linux_wait_for_event_1): Implement stepping over breakpoints.
12308 (gdb_wants_lwp_stopped): New.
12309 (gdb_wants_all_stopped): New.
12310 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12311 single-step traps here. Store the thread's last reported target
12312 wait status.
12313 (send_sigstop): Don't clear stop_expected. Always set it,
12314 instead.
12315 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12316 (cancel_finished_single_step): New.
12317 (cancel_finished_single_steps): New.
12318 (wait_for_sigstop): Don't cancel finished single-step traps here.
12319 (linux_resume_one_lwp): Don't check for removed breakpoints.
12320 Don't set `step' on non-hardware step archs.
12321 (linux_set_resume_request): Ignore resume_stop requests if already
12322 stopping or stopped. Set the lwp's last_resume_kind.
12323 (resume_status_pending_p): Don't check for removed breakpoints.
12324 (need_step_over_p): New.
12325 (start_step_over): New.
12326 (finish_step_over): New.
12327 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12328 requests. Clear the thread's last reported target waitstatus.
12329 Don't use the `suspended' flag. Don't consider pending breakpoints.
12330 (linux_resume): Start a step-over if necessary.
12331 (proceed_one_lwp): New.
12332 (proceed_all_lwps): New.
12333 (unstop_all_lwps): New.
12334 * linux-low.h (struct lwp_info): Rewrite comment for the
12335 `suspended' flag. Add the `stop_pc' field. Delete the
12336 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12337 Add `'last_resume_kind' and `need_step_over' fields.
12338 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12339 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12340 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12341 (set_raw_breakpoint_at): New.
12342 (set_breakpoint_at): Rewrite to use it.
12343 (reinsert_breakpoint_handler): Delete.
12344 (set_reinsert_breakpoint): New.
12345 (reinsert_breakpoint_by_bp): Delete.
12346 (delete_reinsert_breakpoints): New.
12347 (uninsert_breakpoint): Rewrite.
12348 (uninsert_breakpoints_at): New.
12349 (reinsert_breakpoint): Rewrite.
12350 (reinsert_breakpoints_at): New.
12351 (check_breakpoints): Rewrite.
12352 (breakpoint_here): New.
12353 (breakpoint_inserted_here): New.
12354 (check_mem_read): Adjust.
12355 * mem-break.h (breakpoints_supported, breakpoint_here)
12356 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12357 (reinsert_breakpoint_by_bp): Delete declaration.
12358 (delete_reinsert_breakpoints): Declare.
12359 (reinsert_breakpoint): Delete declaration.
12360 (reinsert_breakpoints_at): Declare.
12361 (uninsert_breakpoint): Delete declaration.
12362 (uninsert_breakpoints_at): Declare.
12363 (check_breakpoints): Adjust prototype.
12364 * server.h: Adjust include order.
12365 (struct thread_info): Declare here. Add a `last_status' field.
12366
30ba68cb
MS
123672010-03-23 Michael Snyder <msnyder@vmware.com>
12368
12369 * server.c (crc32): New function.
12370 (handle_query): Add handling for 'qCRC:' request.
12371
b9a881c2
PA
123722010-03-23 Pedro Alves <pedro@codesourcery.com>
12373
12374 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12375 lwp had been stopped by a watchpoint.
12376
e92d13d5
PA
123772010-03-16 Pedro Alves <pedro@codesourcery.com>
12378
12379 * server.h (internal_error): Declare.
12380 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12381 * utils.c (internal_error): New function.
12382
64daa791
AS
123832010-03-15 Andreas Schwab <schwab@redhat.com>
12384
12385 * configure.srv: Fix typo setting srv_regobj.
12386
f52cd8cd
PA
123872010-03-15 Pedro Alves <pedro@codesourcery.com>
12388
12389 * linux-low.c (fetch_register): Avoid passing a non string literal
12390 format to `error'.
12391 (usr_store_inferior_registers): Ditto.
12392
93ae6fdc
PA
123932010-03-14 Pedro Alves <pedro@codesourcery.com>
12394
12395 * linux-low.c (linux_write_memory): Bail out early if peeking
12396 memory failed.
12397
c3adc08c
PA
123982010-03-14 Pedro Alves <pedro@codesourcery.com>
12399
12400 * linux-low.h (struct lwp_info): New fields
12401 `stopped_by_watchpoint' and `stopped_data_address'.
12402 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12403 here, and cache them in the lwp object.
12404 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12405 directly.
12406 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12407 field.
12408 (linux_stopped_by_watchpoint): Rewrite.
12409 (linux_stopped_data_address): Rewrite.
12410
bce522a2
PA
124112010-03-06 Simo Melenius <simo.melenius@iki.fi>
12412
12413 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12414 switching the current inferior, not before.
12415
90884b2b
L
124162010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12417
12418 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12419 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12420 i386-linux.c and amd64-linux.c.
12421 (reg-i386.o): Removed.
12422 (reg-i386.c): Likewise.
12423 (reg-i386-linux.o): Likewise.
12424 (reg-i386-linux.c): Likewise.
12425 (reg-x86-64.o): Likewise.
12426 (reg-x86-64.c): Likewise.
12427 (reg-x86-64-linux.o): Likewise.
12428 (reg-x86-64-linux.c): Likewise.
12429 (i386.o): New.
12430 (i386.c): Likewise.
12431 (i386-linux.o): Likewise.
12432 (i386-linux.c): Likewise.
12433 (amd64.o): Likewise.
12434 (amd64.c): Likewise.
12435 (amd64-linux.o): Likewise.
12436 (amd64-linux.c): Likewise.
12437
12438 * configure.srv (srv_i386_regobj): New.
12439 (srv_i386_linux_regobj): Likewise.
12440 (srv_amd64_regobj): Likewise.
12441 (srv_amd64_linux_regobj): Likewise.
12442 (srv_i386_32bit_xmlfiles): Likewise.
12443 (srv_i386_64bit_xmlfiles): Likewise.
12444 (srv_i386_xmlfiles): Likewise.
12445 (srv_amd64_xmlfiles): Likewise.
12446 (srv_i386_linux_xmlfiles): Likewise.
12447 (srv_amd64_linux_xmlfiles): Likewise.
12448 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12449 srv_xmlfiles to $srv_i386_xmlfiles.
12450 (i[34567]86-*-mingw32ce*): Likewise.
12451 (i[34567]86-*-mingw*): Likewise.
12452 (i[34567]86-*-nto*): Likewise.
12453 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12454 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12455 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12456 (x86_64-*-linux*): Likewise.
12457
12458 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12459 (init_registers_amd64_linux): New.
12460 (x86_arch_setup): Replace init_registers_x86_64_linux with
12461 init_registers_amd64_linux.
12462
193f13e6
MK
124632010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12464
12465 * configure.ac: Check for libdl. If it is not available link against
12466 static libthread_db.
12467 * configure: Regenerate.
12468
85d721b8
PA
124692010-02-22 Pedro Alves <pedro@codesourcery.com>
12470
12471 PR9605
12472
12473 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12474 handing a read watchpoint.
12475 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12476
6076632b
DE
124772010-02-12 Doug Evans <dje@google.com>
12478
12479 * linux-low.c (linux_supports_tracefork_flag): Document.
12480 (linux_look_up_symbols): Add comment.
12481
3327ccf7
L
124822010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12483
12484 * regcache.c (supply_register): Clear regcache if buf is NULL.
12485
0718675c 124862010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 12487 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
12488
12489 * inferiors.c (find_inferior): Add function documentation.
12490 (unloaded_dll): Handle the case where the unloaded dll has not
12491 been previously registered in the dll list.
12492
177321bd
DJ
124932010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12494
12495 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12496 (thumb2_breakpoint): New.
12497 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12498
2b009048
DJ
124992010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12500
12501 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12502 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12503 breakpoints.
12504
3be029c7
PA
125052010-01-21 Pedro Alves <pedro@codesourcery.com>
12506
12507 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12508
18f5de3b
JK
125092010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12510
12511 * linux-s390-low.c (s390_collect_ptrace_register)
12512 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12513
3743bb4f
DE
125142010-01-21 Doug Evans <dje@google.com>
12515
14ce3065
DE
12516 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12517 (PTRACE_ARG4_TYPE): New macro.
12518 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12519 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12520 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12521 (usr_store_inferior_registers): Ditto.
12522 (linux_read_memory, linux_write_memory): Ditto.
12523 (linux_test_for_tracefork): Ditto.
12524
3743bb4f
DE
12525 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12526 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12527
8b315be5
PA
125282010-01-21 Pedro Alves <pedro@codesourcery.com>
12529
12530 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12531 target.
12532
85492558
PA
125332010-01-21 Pedro Alves <pedro@codesourcery.com>
12534
12535 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12536 prototype to take a regcache. Adjust.
12537
442ea881
PA
125382010-01-20 Pedro Alves <pedro@codesourcery.com>
12539
12540 * regcache.h (struct thread_info): Forward declare.
12541 (struct regcache): New.
12542 (new_register_cache): Adjust prototype.
12543 (get_thread_regcache): Declare.
12544 (free_register_cache): Adjust prototype.
12545 (registers_to_string, registers_from_string): Ditto.
12546 (supply_register, supply_register_by_name, collect_register)
12547 (collect_register_as_string, collect_register_by_name): Ditto.
12548 * regcache.c (struct inferior_regcache_data): Delete.
12549 (get_regcache): Rename to ...
12550 (get_thread_regcache): ... this. Adjust. Switch inferior before
12551 fetching registers.
12552 (regcache_invalidate_one): Adjust.
12553 (regcache_invalidate): Fix prototype.
12554 (new_register_cache): Return the new register cache.
12555 (free_register_cache): Change prototype.
12556 (realloc_register_cache): Adjust.
12557 (registers_to_string): Change prototype to take a regcache. Adjust.
12558 (registers_from_string): Ditto.
12559 (register_data): Ditto.
12560 (supply_register): Ditto.
12561 (supply_register_by_name): Ditto.
12562 (collect_register): Ditto.
12563 (collect_register_as_string): Ditto.
12564 (collect_register_by_name): Ditto.
12565 * server.c (process_serial_event): Adjust.
12566 * linux-low.h (regset_fill_func, regset_store_func): Change
12567 prototype.
12568 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12569 Change prototype.
12570 * linux-low.c (get_stop_pc): Adjust.
12571 (check_removed_breakpoint): Adjust.
12572 (linux_wait_for_event): Adjust.
12573 (linux_resume_one_lwp): Adjust.
12574 (fetch_register): Add regcache parameter. Adjust.
12575 (usr_store_inferior_registers): Ditto.
12576 (regsets_fetch_inferior_registers): Ditto.
12577 (regsets_store_inferior_registers): Ditto.
12578 (linux_fetch_registers, linux_store_registers): Ditto.
12579 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12580 regcache. Adjust.
43aaf8b6
PA
12581 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12582 Ditto.
442ea881
PA
12583 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12584 prototype to take a regcache.
12585 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12586 * remote-utils.c (convert_ascii_to_int, outreg)
12587 (prepare_resume_reply): Change prototype to take a regcache.
12588 Adjust.
12589 * target.h (struct target_ops) <fetch_registers, store_registers>:
12590 Change prototype to take a regcache.
12591 (fetch_inferior_registers, store_inferior_registers): Change
12592 prototype to take a regcache. Adjust.
12593 * proc-service.c (ps_lgetregs): Adjust.
12594 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12595 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12596 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12597 take a regcache. Adjust.
12598 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12599 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12600 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12601 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12602 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12603 (cris_cannot_fetch_register):
12604 (cris_breakpoint_at): Change prototype to take a regcache.
12605 Adjust.
12606 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12607 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12608 to take a regcache. Adjust.
12609 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12610 Adjust.
12611 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12612 take a regcache. Adjust.
12613 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12614 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12615 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12616 * linux-mips-low.c (mips_get_pc):
12617 (mips_set_pc): Change prototype to take a regcache. Adjust.
12618 (mips_reinsert_addr): Adjust.
12619 (mips_collect_register): Change prototype to take a regcache.
12620 Adjust.
12621 (mips_supply_register):
12622 (mips_collect_register_32bit, mips_supply_register_32bit)
12623 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12624 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12625 * linux-ppc-low.c (ppc_supply_ptrace_register)
12626 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12627 (parse_spufs_run): Adjust.
12628 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12629 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12630 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12631 take a regcache. Adjust.
12632 * linux-s390-low.c (s390_collect_ptrace_register)
12633 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12634 (s390_set_pc): Change prototype to take a regcache. Adjust.
12635 (s390_arch_setup): Adjust.
12636 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12637 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12638 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12639 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12640 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12641 regcache. Adjust.
12642 (sparc_breakpoint_at): Adjust.
12643 * linux-xtensa-low.c (xtensa_fill_gregset):
12644 (xtensa_store_gregset):
12645 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12646 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12647 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12648 prototype to take a regcache. Adjust.
12649 * win32-arm-low.c (arm_fetch_inferior_register)
12650 (arm_store_inferior_register): Change prototype to take a
12651 regcache. Adjust.
12652 * win32-i386-low.c (i386_fetch_inferior_register)
12653 (i386_store_inferior_register): Change prototype to take a
12654 regcache. Adjust.
12655 * win32-low.c (child_fetch_inferior_registers)
12656 (child_store_inferior_registers): Change prototype to take a
12657 regcache. Adjust.
12658 (win32_wait): Adjust.
12659 (win32_fetch_inferior_registers): Change prototype to take a
12660 regcache. Adjust.
12661 (win32_store_inferior_registers): Adjust.
12662 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12663 store_inferior_register>: Change prototype to take a regcache.
12664
60c3d7b0
DE
126652010-01-20 Doug Evans <dje@google.com>
12666
12667 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12668 #ifdef.
12669 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12670 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12671
dc146f7c
VP
126722010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12673
12674 * linux-low.c (linux_core_of_thread): New.
12675 (compare_ints, show_process, list_threads): New.
12676 (linux_qxfer_osdata): Report threads and cores.
12677 (linux_target_op): Register linux_core_of_thread.
12678 * remote-utils.c (prepare_resume_reply): Report the core.
12679 (buffer_xml_printf): Support %d specifier.
12680 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12681 New.
12682 (handle_query): Handle qXfer:threads. Announce availability
12683 thereof.
12684 * target.h (struct target_ops): New field core_of_thread.
12685
7803799a
UW
126862010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12687
12688 * Makefile.in (clean): Remove new generated files.
12689 (reg-s390.o, reg-s390.c): Remove rules.
12690 (reg-s390x.o, reg-s390x.c): Likewise.
12691 (s390-linux32.o, s390-linux32.c): Add rules.
12692 (s390-linux64.o, s390-linux64.c): Likewise.
12693 (s390x-linux64.o, s390x-linux64.c): Likewise.
12694 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12695 * linux-s390-low.c: Include <elf.h>.
12696 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12697 (init_registers_s390): Remove prototype.
12698 (init_registers_s390x): Likewise.
12699 (init_registers_s390_linux32): Add prototype.
12700 (init_registers_s390_linux64): Likewise.
12701 (init_registers_s390x_linux64): Likewise.
12702 (s390_num_regs_3264): New define.
12703 (s390_regmap_3264): New global variable.
12704 (s390_cannot_fetch_register): Remove obsolete check.
12705 (s390_cannot_store_register): Likewise.
12706 (s390_collect_ptrace_register): Handle upper/lower register halves.
12707 (s390_supply_ptrace_register): Likewise.
12708 (s390_fill_gregset): Update to register number changes.
12709 (s390_get_hwcap): New routine.
12710 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12711 Install appropriate regmap and register set.
12712
6e7ffa39
JB
127132010-01-01 Joel Brobecker <brobecker@adacore.com>
12714
12715 * server.c (gdbserver_version): Update copyright year to 2010.
12716 * gdbreplay.c (gdbreplay_version): Likewise.
12717
957f3f49
DE
127182009-12-28 Doug Evans <dje@google.com>
12719
12720 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12721 elf/external.h. Include <elf.h> instead but only if necessary.
12722
ca5c370d
PA
127232009-12-28 Pedro Alves <pedro@codesourcery.com>
12724
12725 * linux-low.c (linux_remove_process): Remove `detaching'
12726 parameter. Don't release/detach from thread_db here.
12727 (linux_kill): Release/detach from thread_db here, ...
12728 (linux_detach): ... and here, before actually detaching.
12729 (linux_wait_1): ... and here, when a process exits.
12730 * thread-db.c (any_thread_of): New.
12731 (thread_db_free): Switch the current inferior to a thread of the
12732 passed in process.
12733
4ee62156
DE
127342009-12-21 Doug Evans <dje@google.com>
12735
d90e6a88
DE
12736 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12737
c5f62d5f
DE
12738 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12739 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12740 warning ifndef __NR_tkill. Move setting of errno there too.
12741 Delete unnecessary resetting of errno after syscall.
12742 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12743
10e86dd7
DE
12744 * configure.ac: Check for dladdr.
12745 * config.in: Regenerate.
12746 * configure: Regenerate.
12747 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12748 (try_thread_db_load): Update.
12749
4ee62156
DE
12750 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12751
00f515da
DE
127522009-12-18 Doug Evans <dje@google.com>
12753
e9464885
DE
12754 * event-loop.c: Include unistd.h if it exists.
12755
07d4f67e
DE
12756 * linux-low.c (my_waitpid): Move definition away from being in
12757 between linux_tracefork_child/linux_test_for_tracefork.
12758
00f515da
DE
12759 * gdb_proc_service.h (psaddr_t): Fix type.
12760 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12761 signature to match glibc.
12762
1de1badb
DE
127632009-12-16 Doug Evans <dje@google.com>
12764
12765 * linux-low.c (linux_read_memory): Fix argument to read.
12766
aeeb81d1
PA
127672009-11-26 Pedro Alves <pedro@codesourcery.com>
12768
12769 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12770 events, don't leave current_inferior pointing at null.
12771
10357975
PA
127722009-11-26 Pedro Alves <pedro@codesourcery.com>
12773
12774 * win32-low.c (LOG): Delete.
12775 (OUTMSG): Output to stderr.
12776 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12777 on compile time LOG macro.
12778 (win32_wait): Fix debug output.
12779
cf6e3471
PA
127802009-11-26 Pedro Alves <pedro@codesourcery.com>
12781
12782 * win32-low.c (win32_add_one_solib): If the dll name is
12783 "ntdll.dll", prepend the system directory to the dll path.
12784
0c85e18e
MK
127852009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12786
12787 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12788
9ac544ce 127892009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12790 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12791
12792 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12793 * configure.ac: Check for __mcoldfire__ and set
12794 gdb_cv_m68k_is_coldfire.
12795 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12796 reg-cf.o and reg-m68k.o.
12797 * configure: Regenerated.
12798
fd7dd3e6
PA
127992009-11-16 Pedro Alves <pedro@codesourcery.com>
12800
12801 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12802 Pass it to thread_db_free.
12803 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12804 proper `detaching' argument to linux_remove_process.
12805 * linux-low.h (thread_db_free): Add `detaching' parameter.
12806 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12807 to thread_db_free.
12808 (thread_db_free): Add `detaching' parameter. Only
12809 call td_ta_clear_event if detaching from process.
12810
75aa492e
MK
128112009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12812
12813 * thread-db.c (thread_db_free): Fix typo.
12814
21e1bee4
PP
128152009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12816
12817 PR gdb/10838
12818 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12819
8838b45e
NS
128202009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12821
12822 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12823 with an i686 compiler.
12824 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12825 needed.
12826 * configure: Rebuilt.
12827
8a35fb51
SL
128282009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12829
12830 PR gdb/10783
12831
12832 * server.c (handle_search_memory_1): Correct read_addr initialization
12833 in loop for searching subsequent chunks.
12834
96f15937
PP
128352009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12836
12837 * configure.ac: New --with-libthread-db option.
12838 * thread-db.c: Allow direct dependence on libthread_db.
12839 (thread_db_free): Adjust.
12840 * config.in: Regenerate.
12841 * configure: Likewise.
889bf7c5 12842
5f7d1694
PP
128432009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12844
12845 PR gdb/10757
12846 * thread-db.c (attach_thread): New function.
12847 (maybe_attach_thread): Return success/failure.
12848 (find_new_threads_callback): Adjust.
889bf7c5
PA
12849 (thread_db_find_new_threads): Loop until no new threads.
12850
88e3b899
PA
128512009-10-13 Pedro Alves <pedro@codesourcery.com>
12852
12853 * proc-service.c (ps_lgetregs): Formatting.
12854
cdbfd419
PP
128552009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12856
12857 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12858 * configure.ac: Adjust.
12859 * linux-low.h (struct process_info_private): Move members to struct
12860 thread_db.
12861 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12862 * linux-low.c (linux_remove_process): Adjust.
12863 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12864 * server.c (handle_query): Move code ...
12865 (handle_monitor_command): ... here. New function.
12866 * target.h (struct target_ops): New member.
12867 * thread-db.c (struct thread_db): New.
12868 (libthread_db_search_path): New variable.
12869 (thread_db_create_event, thread_db_enable_reporting)
12870 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12871 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12872 (try_thread_db_load_1, dladdr_to_soname): New functions.
12873 (try_thread_db_load, thread_db_load_search): New functions.
12874 (thread_db_init): Search for libthread_db.
12875 (thread_db_free): New function.
12876 (thread_db_handle_monitor_command): Likewise.
12877 * config.in: Regenerate.
12878 * configure: Regenerate.
889bf7c5 12879
4168d2d6
UW
128802009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12881
12882 * spu-low.c (spu_kill): Wait for inferior to terminate.
12883 Call clear_inferiors.
12884 (spu_detach): Call clear_inferiors.
12885
81ecdfbb
RW
128862009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12887
12888 * aclocal.m4: Regenerate.
12889 * config.in: Likewise.
12890 * configure: Likewise.
12891
0b9ff2c0
UW
128922009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12893
12894 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12895 (parse_spufs_run): New function.
12896 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12897 (ppc_breakpoint_at): Handle SPU breakpoints.
12898
efcbbd14
UW
128992009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12900
12901 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12902 (SPUFS_MAGIC): Define.
12903 (spu_enumerate_spu_ids): New function.
12904 (linux_qxfer_spu): New function.
12905 (linux_target_ops): Install linux_qxfer_spu.
12906
f4d9bade
UW
129072009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12908
12909 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12910 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12911 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12912 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12913 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12914 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12915 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12916 (init_registers_powerpc_cell32l): Add prototype.
12917 (init_registers_powerpc_cell64l): Likewise.
12918 (ppc_arch_setup): Detect Cell/B.E. architecture.
12919
96e946ca
RW
129202009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12921
12922 * Makefile.in (datarootdir): New variable.
12923
58d6951d
DJ
129242009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12925
12926 * linux-low.c (linux_write_memory): Update debugging output.
12927 * Makefile.in (clean): Add new descriptions.
12928 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12929 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12930 * configure.srv: Add new files for arm*-*-linux*.
12931 * linux-arm-low.c: Add new declarations.
12932 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12933 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12934 (HWCAP_VFPv3D16): New.
12935 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12936 instead of __IWMMXT__.
12937 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12938 (arm_arch_setup): New.
12939 (target_regsets): Remove #ifdef. Add VFP regset.
12940 (the_low_target): Use arm_arch_setup.
12941
12b42a12
DJ
129422009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12943
12944 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12945 the main thread again.
12946
ac8c974e
AR
129472009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12948
12949 Adding Neutrino gdbserver.
12950 * configure: Regenerated.
12951 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12952 * configure.srv (i[34567]86-*-nto*): New target.
12953 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12954 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12955 (nto_comctrl) [__QNX__]: New function.
12956 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12957
4424e0c3 129582009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12959
12960 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12961 srv_tgtobj.
12962
912cf4ba
PA
129632009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12964 Pedro Alves <pedro@codesourcery.com>
12965
12966 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12967 don't support CONTEXT_EXTENDED_REGISTERS.
12968 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12969 (the_low_target): Install them.
12970 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12971 failing with ERROR_PIPE_NOT_CONNECTED.
12972
aa5ca48f
DE
129732009-06-30 Doug Evans <dje@google.com>
12974 Pierre Muller <muller@ics.u-strasbg.fr>
12975
12976 Add h/w watchpoint support to x86-linux, win32-i386.
12977 * Makefile.in (SFILES): Add i386-low.c
12978 (i386_low_h): Define.
12979 (i386-low.o): Add dependencies.
12980 (linux-x86-low.o): Add i386-low.h dependency.
12981 (win32-i386-low.o): Ditto.
12982 * i386-low.c: New file.
12983 * i386-low.h: New file.
12984 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12985 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12986 * linux-low.c (linux_add_process): Initialize arch_private.
12987 (linux_remove_process): Free arch_private.
12988 (add_lwp): Initialize arch_private.
12989 (delete_lwp): Free arch_private.
12990 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12991 provided.
12992 * linux-low.h (process_info_private): New member arch_private.
12993 (lwp_info): New member arch_private.
12994 (linux_target_ops): New members new_process, new_thread,
12995 prepare_to_resume.
12996 (ptid_of): New macro.
12997 * linux-x86-low.c: Include stddef.h, i386-low.h.
12998 (arch_process_info): New struct.
12999 (arch_lwp_info): New struct.
13000 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13001 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13002 (i386_dr_low_get_status): New function.
13003 (x86_insert_point, x86_remove_point): New functions.
13004 (x86_stopped_by_watchpoint): New function.
13005 (x86_stopped_data_address): New function.
13006 (x86_linux_new_process, x86_linux_new_thread): New functions.
13007 (x86_linux_prepare_to_resume): New function.
13008 (the_low_target): Add entries for insert_point, remove_point,
13009 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13010 prepare_to_resume.
13011 * server.c (debug_hw_points): New global.
13012 (monitor_show_help): Document set debug-hw-points.
13013 (handle_query): Process "set debug-hw-points".
13014 * server.h (debug_hw_points): Declare.
13015 (paddress): Declare.
13016 * utils.c (NUMCELLS, CELLSIZE): New macros.
13017 (get_sell, xsnprintf, paddress): New functions.
13018 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13019 remove_point, stopped_by_watchpoint, stopped_data_address.
13020 * win32-i386-low.c: Include i386-low.h.
13021 (debug_reg_state): Replaces dr.
13022 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13023 (i386_dr_low_get_status): New function.
13024 (i386_insert_point, i386_remove_point): New functions.
13025 (i386_stopped_by_watchpoint): New function.
13026 (i386_stopped_data_address): New function.
13027 (i386_initial_stuff): Update.
13028 (get_thread_context,set_thread_context,i386_thread_added): Update.
13029 (the_low_target): Add entries for insert_point,
13030 remove_point, stopped_by_watchpoint, stopped_data_address.
13031 * win32-low.c (win32_insert_watchpoint): New function.
13032 (win32_remove_watchpoint): New function.
13033 (win32_stopped_by_watchpoint): New function.
13034 (win32_stopped_data_address): New function.
13035 (win32_target_ops): Add entries for insert_watchpoint,
13036 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13037 * win32-low.h (win32_target_ops): New members insert_point,
13038 remove_point, stopped_by_watchpoint, stopped_data_address.
13039
d993e290
PA
130402009-06-25 Pedro Alves <pedro@codesourcery.com>
13041
13042 * server.c (process_serial_event): Re-return unsupported, not
13043 error, if the type isn't recognized. Re-allow supporting only
13044 insert or remove packets. Also call require_running for
13045 breakpoints. Add missing break statement to default case. Tidy.
13046 * target.h (struct target_ops): Rename insert_watchpoint to
13047 insert_point, and remove_watchpoint to remove_point.
13048
13049 * linux-low.h (struct linux_target_ops): Likewise.
13050 * linux-low.c (linux_insert_watchpoint): Rename to ...
13051 (linux_insert_point): ... this. Adjust.
13052 (linux_remove_watchpoint): Rename to ...
13053 (linux_remove_point): ... this. Adjust.
13054 (linux_target_ops): Adjust.
13055 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13056 (cris_insert_point): ... this.
13057 (cris_remove_watchpoint): Rename to ...
13058 (cris_remove_point): ... this.
13059 (the_low_target): Adjust.
13060
0f54c268
PM
130612009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13062
13063 * server.c (handle_v_kill): Pass signal_pid to
13064 kill_inferior if multi_process is zero.
13065
c6314022
AR
130662009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13067
13068 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13069 * target.h (target_ops): Comment for *_watchpoint to make it clear
13070 the functions can get types '0' and '1'.
13071
4463ce24
AR
130722009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13073
13074 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13075 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13076 * regcache.c (get_regcache): Likewise.
13077 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13078 * win32-low.c (child_fetch_inferior_registers): Remove check for
13079 regno 0.
13080
cf8fd78b
PA
130812009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13082 Pedro Alves <pedro@codesourcery.com>
13083
13084 * target.h (struct target_ops) <supports_multi_process>: New
13085 callback.
13086 (target_supports_multi_process): New.
13087 * server.c (handle_query): Even if GDB reports support, only
13088 enable multi-process if the target also supports it. Report
13089 multi-process support only if the target backend supports it.
13090 * linux-low.c (linux_supports_multi_process): New function.
13091 (linux_target_ops): Install it as target_supports_multi_process
13092 callback.
13093
47c0c975
DE
130942009-05-24 Doug Evans <dje@google.com>
13095
e09875d4
DE
13096 Global renaming of find_thread_pid to find_thread_ptid.
13097 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13098 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13099 All callers updated.
13100
e27d73f6
DE
13101 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13102 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13103 directly.
13104
47c0c975
DE
13105 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13106 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13107 (linux_resume_one_lwp): Ditto.
13108
2acc282a
DE
131092009-05-23 Doug Evans <dje@google.com>
13110
13111 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13112 from struct inferior_list_entry * to struct lwp_info *.
13113 All callers updated.
13114
9f1036c1
DE
131152009-05-13 Doug Evans <dje@google.com>
13116
13117 * linux-x86-low.c: Don't include assert.h.
13118 (x86_siginfo_fixup): Use fatal, not assert.
13119 (x86_arch_setup): Fix comment.
13120
d0722149
DE
131212009-05-12 Doug Evans <dje@google.com>
13122
13123 Biarch support for i386/amd64 gdbserver.
13124 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13125 Add linux-x86-low.c.
13126 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13127 (linux-x86-low.o): Add.
13128 * linux-x86-64-low.c: Delete.
13129 * linux-i386-low.c: Delete.
13130 * linux-x86-low.c: New file.
13131 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13132 linux-x86-low.o.
13133 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13134 linux-x86-low.o.
13135 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13136 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13137 (linux_child_pid_to_exec_file): New function.
13138 (elf_64_header_p, elf_64_file_p): New functions.
13139 (siginfo_fixup): New function.
13140 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13141 give target a chance to convert layout.
13142 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13143 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13144
fdeb2a12
DE
131452009-05-07 Doug Evans <dje@google.com>
13146
13147 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13148 (regsets_store_inferior_registers): Ditto.
13149
a6dbe5df
PA
131502009-05-06 Pedro Alves <pedro@codesourcery.com>
13151
13152 PR server/10048
13153
13154 * linux-low.c (must_set_ptrace_flags): Delete.
13155 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13156 of the global.
13157 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13158 `lwp->must_set_ptrace_flags' instead.
ba42693b 13159 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
13160 (linux_wait_1): ... not here.
13161
5091eb23
DE
131622009-04-30 Doug Evans <dje@google.com>
13163
9f767825
DE
13164 * inferiors.c (started_inferior_callback): New function.
13165 (attached_inferior_callback): New function.
13166 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13167 * server.c (print_started_pid, print_attached_pid): New functions.
13168 (detach_or_kill_for_exit): New function.
13169 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13170 * server.h (have_started_inferiors_p): Declare.
13171 (have_attached_inferiors_p): Declare.
13172
5091eb23
DE
13173 * inferiors.c (remove_process): Fix memory leak, free process.
13174 * linux-low.c (linux_remove_process): New function.
13175 (linux_kill): Call it instead of remove_process.
13176 (linux_detach, linux_wait_1): Ditto.
13177
155c8968
PA
131782009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13179
13180 * configure.srv: Add x86 Windows CE target.
13181
7fe519cb
UW
131822009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13183
13184 * inferiors.c (get_thread_process): Make global.
13185 * server.h (get_thread_process): Add prototype.
13186 * thread-db.c (find_one_thread): Use get_thread_process
13187 instead of current_process.
13188 (thread_db_get_tls_address): Do not crash if called when
13189 thread layer is not yet initialized.
13190
5472f405
UW
131912009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13192
13193 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13194 * spu-low.c (current_tid): Rename to ...
13195 (current_ptid): ... this.
13196 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13197 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13198 ptid_get_lwp (current_ptid) instead of current_tid.
13199 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13200 instead of current_tid. Use find_process_pid to verify pid
13201 argument is valid. Pass proper argument to remove_process.
13202 (spu_thread_alive): Compare current_ptid instead of current_tid.
13203 (spu_resume): Likewise.
13204
55ac2b99
PA
132052009-04-02 Pedro Alves <pedro@codesourcery.com>
13206
13207 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13208 variable.
13209
95954743
PA
132102009-04-01 Pedro Alves <pedro@codesourcery.com>
13211
13212 Implement the multiprocess extensions, and add linux multiprocess
13213 support.
13214
13215 * server.h (ULONGEST): Declare.
13216 (struct ptid, ptid_t): New.
13217 (minus_one_ptid, null_ptid): Declare.
13218 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13219 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13220 (struct inferior_list_entry): Change `id' type from unsigned from
13221 to ptid_t.
13222 (struct sym_cache, struct breakpoint, struct
13223 process_info_private): Forward declare.
13224 (struct process_info): Declare.
13225 (current_process): Declare.
13226 (all_processes): Declare.
13227 (initialize_inferiors): Declare.
13228 (add_thread): Adjust to use ptid_t.
13229 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13230 (add_process, remove_process, find_thread_pid): Declare.
13231 (find_inferior_id): Adjust to use ptid_t.
13232 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13233 (multi_process): Declare.
13234 (push_event): Adjust to use ptid_t.
13235 (read_ptid, write_ptid): Declare.
13236 (prepare_resume_reply): Adjust to use ptid_t.
13237 (clear_symbol_cache): Declare.
13238 * inferiors.c (all_processes): New.
13239 (null_ptid, minus_one_ptid): New.
13240 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13241 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13242 (add_thread): Change unsigned long to ptid. Remove gdb_id
13243 parameter. Adjust.
13244 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13245 (gdb_id_to_thread): Rename to ...
13246 (find_thread_pid): ... this. Change unsigned long to ptid.
13247 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13248 (loaded_dll, pull_pid_from_list): Adjust.
13249 (add_process, remove_process, find_process_pid)
13250 (get_thread_process, current_process, initialize_inferiors): New.
13251 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13252 (struct target_waitstatus) <related_pid>: Ditto.
13253 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13254 return type to int.
13255 (struct target_ops) <join>: Add `pid' argument.
13256 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13257 (struct target_ops) <wait>: Add `ptid' field. Change return type
13258 to ptid.
13259 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13260 (mywait): Add `ptid' argument. Change return type to ptid_t.
13261 (target_pid_to_str): Declare.
13262 * target.c (set_desired_inferior): Adjust to use ptids.
13263 (mywait): Add new `ptid' argument. Adjust.
13264 (target_pid_to_str): New.
13265 * mem-break.h (free_all_breakpoints): Declare.
13266 * mem-break.c (breakpoints): Delelete.
13267 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13268 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13269 to use per-process breakpoint list.
13270 (free_all_breakpoints): New.
13271 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13272 (symbol_cache, all_symbols_looked_up): Delete.
13273 (hexchars): New.
13274 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13275 read_ptid): New.
13276 (prepare_resume_reply): Change ptid argument's type from unsigned
13277 long to ptid_t. Adjust. Implement W;process and X;process.
13278 (free_sym_cache, clear_symbol_cache): New.
13279 (look_up_one_symbol): Adjust to per-process symbol cache. *
13280 * server.c (cont_thread, general_thread, step_thread): Change type
13281 to ptid_t.
13282 (attached): Delete.
13283 (multi_process): New.
13284 (last_ptid): Change type to ptid_t.
13285 (struct vstop_notif) <ptid>: Change type to ptid_t.
13286 (queue_stop_reply, push_event): Change `ptid' argument's type to
13287 ptid_t.
13288 (discard_queued_stop_replies): Add `pid' argument.
13289 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13290 changes. Don't reference the `attached' global.
13291 (attach_inferior): Adjust to mywait interface changes.
13292 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13293 features. Handle and report "multiprocess+". Handle
13294 "qAttached:PID".
13295 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13296 changes.
13297 (handle_v_kill): New.
13298 (handle_v_stopped): Adjust to use target_pid_to_str.
13299 (handle_v_requests): Allow multiple attaches and runs when
13300 multiprocess extensions are in effect. Handle "vKill".
13301 (myresume): Adjust to use ptids.
13302 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13303 (handle_status): Adjust to discard_queued_stop_replies interface
13304 change.
13305 (first_thread_of, kill_inferior_callback)
13306 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13307 (main): Call initialize_inferiors. Adjust to use ptids, killing
13308 and detaching from all inferiors. Handle multiprocess packet
13309 variants.
13310 * linux-low.h: Include gdb_proc_service.h.
13311 (struct process_info_private): New.
13312 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13313 <lwpid_of>: Use ptid_get_lwp.
13314 (get_lwp_thread): Adjust.
13315 (struct lwp_info): Add `dead' member.
13316 (find_lwp_pid): Declare.
13317 * linux-low.c (thread_db_active): Delete.
13318 (new_inferior): Adjust comment.
13319 (inferior_pid): Delete.
13320 (linux_add_process): New.
13321 (handle_extended_wait): Adjust.
13322 (add_lwp): Change unsigned long to ptid.
13323 (linux_create_inferior): Add process to processes table. Adjust
13324 to use ptids. Don't set new_inferior here.
13325 (linux_attach_lwp): Rename to ...
13326 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13327 it. Adjust to use ptids.
13328 (linux_attach_lwp): New.
13329 (linux_attach): Add process to processes table. Don't set
13330 new_inferior here.
13331 (struct counter): New.
13332 (second_thread_of_pid_p, last_thread_of_process_p): New.
13333 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13334 multiple processes.
13335 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13336 processes. Remove process from process table.
13337 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13338 to multiple processes.
13339 (any_thread_of): New.
13340 (linux_detach): Add `pid' argument, and handle it. Remove process
13341 from processes table.
13342 (linux_join): Add `pid' argument. Handle it.
13343 (linux_thread_alive): Change unsighed long argument to ptid_t.
13344 Consider dead lwps as not being alive.
13345 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13346 threads we're not interested in.
13347 (same_lwp, find_lwp_pid): New.
13348 (linux_wait_for_lwp): Change `pid' argument's type from int to
13349 ptid_t. Adjust.
13350 (linux_wait_for_event): Rename to ...
13351 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13352 from int to ptid_t. Adjust.
13353 (linux_wait_for_event): New.
13354 (linux_wait_1): Add `ptid' argument. Change return type to
13355 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13356 that exit from the process table.
13357 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13358 Adjust.
13359 (mark_lwp_dead): New.
13360 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13361 stopping all threads, mark its main lwp as dead.
13362 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13363 ptids.
13364 (fetch_register, usr_store_inferior_registers)
13365 (regsets_fetch_inferior_registers)
13366 (regsets_store_inferior_registers, linux_read_memory)
13367 (linux_write_memory): Inline `inferior_pid'.
13368 (linux_look_up_symbols): Adjust to use per-process
13369 `thread_db_active'.
13370 (linux_request_interrupt): Adjust to use ptids.
13371 (linux_read_auxv): Inline `inferior_pid'.
13372 (initialize_low): Don't reference thread_db_active.
13373 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13374 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13375 (ps_getpid): Return the pid of the current inferior.
13376 * thread-db.c (proc_handle, thread_agent): Delete.
13377 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13378 per-process data.
13379 (find_one_thread): Change argument type to ptid_t. Adjust to
13380 per-process data.
13381 (maybe_attach_thread): Adjust to per-process data and ptids.
13382 (thread_db_find_new_threads): Ditto.
13383 (thread_db_init): Ditto.
13384 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13385 processes table. Adjust to use ptids.
13386 (spu_kill, spu_detach): Adjust interface. Remove process from
13387 processes table.
13388 (spu_join, spu_thread_alive): Adjust interface.
13389 (spu_wait): Adjust interface. Remove process from processes
13390 table. Adjust to use ptids.
13391 * win32-low.c (current_inferior_tid): Delete.
13392 (current_inferior_ptid): New.
13393 (debug_event_ptid): New.
13394 (thread_rec): Take a ptid. Adjust.
13395 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13396 (child_delete_thread): Ditto.
13397 (do_initial_child_stuff): Add `attached' argument. Add process to
13398 processes table.
13399 (child_fetch_inferior_registers, child_store_inferior_registers):
13400 Adjust.
13401 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13402 (win32_attach): Pass 1 to do_initial_child_stuff.
13403 (win32_kill): Adjust interface. Remove process from processes
13404 table.
13405 (win32_detach): Ditto.
13406 (win32_join): Adjust interface.
13407 (win32_thread_alive): Take a ptid.
13408 (win32_resume): Adjust to use ptids.
13409 (get_child_debug_event): Ditto.
13410 (win32_wait): Adjust interface. Remove exiting process from
13411 processes table.
13412
bd99dc85
PA
134132009-04-01 Pedro Alves <pedro@codesourcery.com>
13414
13415 Non-stop mode support.
13416
13417 * server.h (non_stop): Declare.
13418 (gdb_client_data, handler_func): Declare.
13419 (delete_file_handler, add_file_handler, start_event_loop):
13420 Declare.
13421 (handle_serial_event, handle_target_event, push_event)
13422 (putpkt_notif): Declare.
13423 * target.h (enum resume_kind): New.
13424 (struct thread_resume): Replace `step' field by `kind' field.
13425 (TARGET_WNOHANG): Define.
13426 (struct target_ops) <wait>: Add `options' argument.
13427 <supports_non_stop, async, start_non_stop>: New fields.
13428 (target_supports_non_stop, target_async): New.
13429 (start_non_stop): Declare.
13430 (mywait): Add `options' argument.
13431 * target.c (mywait): Add `options' argument. Print child exit
13432 notifications here.
13433 (start_non_stop): New.
13434 * server.c (non_stop, own_buf, mem_buf): New globals.
13435 (struct vstop_notif): New.
13436 (notif_queue): New global.
13437 (queue_stop_reply, push_event, discard_queued_stop_replies)
13438 (send_next_stop_reply): New.
13439 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13440 interface changes.
13441 (attach_inferior): In non-stop mode, don't wait for the target
13442 here.
13443 (handle_general_set): Handle QNonStop.
13444 (handle_query): When handling qC, return the current general
13445 thread, instead of the first thread of the list.
13446 (handle_query): If the backend supports non-stop mode, include
13447 QNonStop+ in the qSupported query response.
13448 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13449 and non-stop mode.
13450 (handle_v_attach, handle_v_run): Handle non-stop mode.
13451 (handle_v_stopped): New.
13452 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13453 (myresume): Adjust to use resume_kind. Handle non-stop.
13454 (queue_stop_reply_callback): New.
13455 (handle_status): Handle non-stop mode.
13456 (main): Clear non_stop flag on reconnection. Use the event-loop.
13457 Refactor serial protocol handling from here ...
13458 (process_serial_event): ... to this new function. When GDB
13459 selects any thread, select one here. In non-stop mode, wait until
13460 GDB acks all pending events before exiting.
13461 (handle_serial_event, handle_target_event): New.
13462 * remote-utils.c (remote_open): Install remote_desc in the event
13463 loop.
13464 (remote_close): Remove remote_desc from the event loop.
13465 (putpkt_binary): Rename to...
13466 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13467 (putpkt_binary): New as wrapper around putpkt_binary_1.
13468 (putpkt_notif): New.
13469 (prepare_resume_reply): In non-stop mode, don't change the
13470 general_thread.
13471 * event-loop.c: New.
13472 * Makefile.in (OBJ): Add event-loop.o.
13473 (event-loop.o): New rule.
13474
13475 * linux-low.h (pid_of): Moved here.
13476 (lwpid_of): New.
13477 (get_lwp_thread): Use lwpid_of.
13478 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13479 * linux-low.c (pid_of): Delete.
13480 (inferior_pid): Use lwpid_of.
13481 (linux_event_pipe): New.
13482 (target_is_async_p): New.
13483 (delete_lwp): New.
13484 (handle_extended_wait): Use lwpid_of.
13485 (add_lwp): Don't set lwpid field.
13486 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13487 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13488 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13489 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13490 first. Adjust to linux_wait_for_event interface changes. Use
13491 lwpid_of.
13492 (linux_detach): Don't delete the main lwp here.
13493 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13494 (status_pending_p): Don't consider explicitly suspended lwps.
13495 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13496 pointer. Add OPTIONS argument. Change return type to int. Use
13497 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13498 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13499 pointer. Add status pointer argument. Return a pid instead of a
13500 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13501 changes. In non-stop mode, don't switch to a random thread.
13502 (linux_wait): Rename to...
13503 (linux_wait_1): ... this. Add target_options argument, and handle
13504 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13505 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13506 clean exit and signal exit code. Don't stop all threads in
13507 non-stop mode. In all-stop mode, only stop all threads when
13508 reporting a stop to GDB. Handle explicit thread stop requests.
13509 (async_file_flush, async_file_mark): New.
13510 (linux_wait): New.
13511 (send_sigstop): Use lwpid_of.
13512 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13513 interface changes. In non-stop mode, don't switch to a random
13514 thread.
13515 (linux_resume_one_lwp): Use lwpid_of.
13516 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13517 (linux_resume_one_thread): ... this. Handle resume_stop. In
13518 non-stop mode, don't look for pending flag in all threads.
13519 (resume_status_pending_p): Don't consider explicitly suspended
13520 threads.
13521 (my_waitpid): Reimplement. Emulate __WALL.
13522 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13523 Use lwpid_of.
13524 (sigchld_handler, linux_supports_non_stop, linux_async)
13525 (linux_start_non_stop): New.
13526 (linux_target_ops): Register linux_supports_non_stop, linux_async
13527 and linux_start_non_stop.
13528 (initialize_low): Install SIGCHLD handler.
13529 * thread-db.c (thread_db_create_event, find_one_thread)
13530 (thread_db_get_tls_address): Use lwpid_of.
13531 * win32-low.c (win32_detach): Adjust to use resume_kind.
13532 (win32_wait): Add `options' argument.
13533 * spu-low.c (spu_resume): Adjust to use resume_kind.
13534 (spu_wait): Add `options' argument.
13535
5b1c542e
PA
135362009-04-01 Pedro Alves <pedro@codesourcery.com>
13537
13538 Decouple target code from remote protocol.
13539
13540 * target.h (enum target_waitkind): New.
13541 (struct target_waitstatus): New.
13542 (struct target_ops) <wait>: Return an unsigned long. Take a
13543 target_waitstatus pointer instead of a char pointer.
13544 (mywait): Likewise.
13545 * target.c (mywait): Change prototype to return an unsigned long.
13546 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13547 * server.h (thread_from_wait, old_thread_from_wait): Delete
13548 declarations.
13549 (prepare_resume_reply): Change prototype to take a
13550 target_waitstatus.
13551 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13552 (last_status, last_ptid): New.
13553 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13554 pid instead of a signal.
13555 (attach_inferior): Remove "status" and "signal" parameters.
13556 Adjust.
13557 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13558 not as an address.
13559 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13560 (handle_v_requests, myresume): Remove "status" and "signal"
13561 parameters. Adjust.
13562 (handle_status): New.
13563 (main): Delete local `status'. Adjust.
13564 * remote-utils.c: Include target.h.
13565 (prepare_resume_reply): Change prototype to take a
13566 target_waitstatus. Adjust.
13567
13568 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13569 interface.
13570 * spu-low.c (spu_wait): Adjust.
13571 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13572 Delete.
13573 (win32_wait): Adjust.
13574
2bd7c093
PA
135752009-04-01 Pedro Alves <pedro@codesourcery.com>
13576
13577 * target.h (struct thread_resume): Delete leave_stopped member.
13578 (struct target_ops): Add a `n' argument to the `resume' callback.
13579 * server.c (start_inferior): Adjust.
13580 (handle_v_cont, myresume): Adjust.
13581 * linux-low.c (check_removed_breakpoint): Adjust to resume
13582 interface change, and to removed leave_stopped field.
13583 (resume_ptr): Delete.
13584 (struct thread_resume_array): New.
13585 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13586 resume interface change.
13587 (linux_continue_one_thread, linux_queue_one_thread)
13588 (resume_status_pending_p): Check if the resume field is NULL
13589 instead of checking the leave_stopped member.
13590 (linux_resume): Adjust to the target resume interface change.
13591 * spu-low.c (spu_resume): Adjust to the target resume interface
13592 change.
13593 * win32-low.c (win32_detach, win32_resume): Ditto.
13594
c35fafde
PA
135952009-04-01 Pedro Alves <pedro@codesourcery.com>
13596
13597 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13598 flag.
13599 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13600 pending.
13601 (linux_continue_one_thread): Only preserve the stepping flag if
13602 there's a pending breakpoint.
13603
0a59d50b
PA
136042009-03-31 Pedro Alves <pedro@codesourcery.com>
13605
13606 * server.c (main): After the inferior having exited, call
13607 remote_close before exiting gdbserver.
13608
f04c6d38
TJB
136092009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13610
13611 Fix size of FPSCR in Power 7 processors.
13612 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13613 (PPC_FEATURE_HAS_DFP): New #define.
13614 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13615 size of the FPSCR.
13616
78e5cee6
PA
136172009-03-23 Pedro Alves <pedro@codesourcery.com>
13618
13619 * server.c (handle_query) Whitespace and formatting.
13620
1b3f6016
PA
136212009-03-22 Pedro Alves <pedro@codesourcery.com>
13622
13623 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13624 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13625 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13626 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13627 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13628 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13629 Makefile.in, configure.ac: Fix whitespace throughout.
13630 * configure: Regenerate.
13631
a07b2135
PA
136322009-03-22 Pedro Alves <pedro@codesourcery.com>
13633
13634 * inferiors.c (find_inferior): Make it safe for the callback
13635 function to delete the currently iterated inferior.
13636
67cc2626
PA
136372009-03-22 Pedro Alves <pedro@codesourcery.com>
13638
13639 * Makefile.in (linuw_low_h): Move higher.
13640 (thread-db.o): Depend on $(linux_low_h).
13641
54a0b537
PA
136422009-03-17 Pedro Alves <pedro@codesourcery.com>
13643
13644 Rename "process" to "lwp" throughout.
13645
13646 * linux-low.c (all_processes): Rename to...
13647 (all_lwps): ... this.
13648 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13649 (add_process): Rename to ...
13650 (add_lwp): ... this. Adjust.
13651 (linux_create_inferior): Adjust.
13652 (linux_attach_lwp): Adjust.
13653 (linux_attach): Adjust.
13654 (linux_kill_one_process): Rename to ...
13655 (linux_kill_one_lwp): ... this. Adjust.
13656 (linux_kill): Adjust.
13657 (linux_detach_one_process): Rename to ...
13658 (linux_detach_one_lwp): ... this. Adjust.
13659 (linux_detach): Adjust.
13660 (check_removed_breakpoint): Adjust.
13661 (status_pending_p): Adjust.
13662 (linux_wait_for_process): Rename to ...
13663 (linux_wait_for_lwp): ... this. Adjust.
13664 (linux_wait_for_event): Adjust.
13665 (send_sigstop): Adjust.
13666 (wait_for_sigstop): Adjust.
13667 (stop_all_processes): Rename to ...
13668 (stop_all_lwps): ... this.
13669 (linux_resume_one_process): Rename to ...
13670 (linux_resume_one_lwp): ... this. Adjust.
13671 (linux_set_resume_request, linux_continue_one_thread)
13672 (linux_queue_one_thread, resume_status_pending_p)
13673 (usr_store_inferior_registers, regsets_store_inferior_registers)
13674 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13675 Adjust.
13676 * linux-low.h (get_process): Rename to ...
13677 (get_lwp): ... this. Adjust.
13678 (get_thread_process): Rename to ...
13679 (get_thread_lwp): ... this. Adjust.
13680 (get_process_thread): Rename to ...
13681 (get_lwp_thread): ... this. Adjust.
13682 (struct process_info): Rename to ...
13683 (struct lwp_info): ... this.
13684 (all_processes): Rename to ...
13685 (all_lwps): ... this.
13686 * proc-service.c (ps_lgetregs): Adjust.
13687 * thread-db.c (thread_db_create_event, find_one_thread)
13688 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13689
0b16c5cf
PA
136902009-03-14 Pedro Alves <pedro@codesourcery.com>
13691
13692 * server.c (handle_query): Handle "qAttached".
13693
32de4b9d
NS
136942009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13695
13696 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13697 GPLv3, update license URL.
13698
2aecd87f
DE
136992009-03-01 Doug Evans <dje@google.com>
13700
93efd302 13701 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13702 (server_h): Add gdb_signals.h.
13703 (signals.o): Update.
13704 * server.h (target_signal_from_host,target_signal_to_host_p)
13705 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13706
86b1f9c5
PM
137072009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13708
13709 * remote-utils.c (getpkt): Also generate remote-debug
13710 information if noack_mode is set.
13711
4aa995e1
PA
137122009-02-06 Pedro Alves <pedro@codesourcery.com>
13713
13714 * server.c (handle_query): Report qXfer:siginfo:read and
13715 qXfer:siginfo:write as supported and handle them.
13716 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13717 * linux-low.c (linux_xfer_siginfo): New.
13718 (linux_target_ops): Set it.
13719
62709adf
PA
137202009-01-26 Pedro Alves <pedro@codesourcery.com>
13721
13722 * server.c (gdbserver_usage): Mention --remote-debug.
13723 (main): Accept '--remote-debug' switch.
13724
aef93bd7
DE
137252009-01-18 Doug Evans <dje@google.com>
13726
13727 * regcache.c (new_register_cache): No need to check result of xcalloc.
13728 * server.c (handle_search_memory): Back out calls to xmalloc,
13729 result is checked and error is returned to user upon failure.
13730 (handle_query): Ditto. Add more checks for result of malloc.
13731 (handle_v_cont): Check result of malloc, report error back to
13732 user upon failure.
13733 (handle_v_run): Ditto. Call freeargv.
13734 * server.h (freeargv): Declare.
13735 * utils.c (freeargv): New fn.
13736
54363045
DE
137372009-01-15 Doug Evans <dje@google.com>
13738
f626972c
DE
13739 * gdbreplay.c (perror_with_name): Make arg const char *.
13740 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13741 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13742 * utils.c (perror_with_name): Make arg const char *.
54363045 13743
18aae699
PA
137442009-01-14 Pedro Alves <pedro@codesourcery.com>
13745
13746 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13747 when handling a EXIT_PROCESS_DEBUG_EVENT.
13748
ff703abe
JB
137492009-01-06 Joel Brobecker <brobecker@adacore.com>
13750
13751 * gdbreplay.c (gdbreplay_version): Update copyright year.
13752 * server.c (gdbserver_version): Likewise.
13753
f21cc1a2 137542009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13755
13756 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13757 (handle_extended_wait): Improve comment.
0e21c1ec 13758
bca929d3
DE
137592008-12-13 Doug Evans <dje@google.com>
13760
13761 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13762 * server.h (ATTR_MALLOC): New macro.
13763 (xmalloc,xcalloc,xstrdup): Declare.
13764 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13765 * inferiors.c: Ditto.
13766 * linux-low.c: Ditto.
13767 * mem-break.c: Ditto.
13768 * regcache.c: Ditto.
13769 * remote-utils.c: Ditto.
13770 * server.c: Ditto.
13771 * target.c: Ditto.
13772 * win32-low.c: Ditto.
13773
97438e3f
DE
137742008-12-12 Doug Evans <dje@google.com>
13775
896c7fbb
DE
13776 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13777 in debugging printf.
13778
97438e3f
DE
13779 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13780
e3b886f8
DE
137812008-12-09 Doug Evans <dje@google.com>
13782
13783 * linux-low.h (struct process_info): Delete member tid, unused.
13784 * thread-db.c (find_one_thread): Update.
13785 (maybe_attach_thread): Update.
13786
07e059b5
VP
137872008-12-02 Pedro Alves <pedro@codesourcery.com>
13788
889bf7c5
PA
13789 * target.h (struct target_ops): Add qxfer_osdata member.
13790 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13791 and dirent.h.
13792 (linux_qxfer_osdata): New functions.
13793 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13794 callback.
13795 * server.c (handle_query): Handle "qXfer:osdata:read:".
13796 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13797 (buffer_xml_printf): New functions.
13798 * server.h (struct buffer): New.
13799 (buffer_grow_str, buffer_grow_str0): New macros.
13800 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13801 (buffer_xml_printf): Declare.
07e059b5 13802
4cab47ab
DE
138032008-11-24 Doug Evans <dje@google.com>
13804
13805 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13806
f142445f
DJ
138072008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13808
13809 * server.c (handle_v_run): Always use the supplied argument list.
13810
d0107bb6 138112008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13812
d0107bb6
BW
13813 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13814 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13815
2c4ad781
TJB
138162008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13817
13818 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13819 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13820 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13821 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13822 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13823 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13824 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13825 XML target descriptions.
13826 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13827 when inferior is running on an ISA 2.05 or later processor. Add
13828 special case to return offset for full 64-bit slot of FPSCR when
13829 in 32-bits.
13830
dfb64f85
DJ
138312008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13832
13833 * Makefile.in (SFILES, clean): Added sparc64 files.
13834 (reg-sparc64.o, reg-sparc64.c): New.
13835 * configure.srv (sparc*-*-linux*): New configuration.
13836 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13837 syscall arguments for SPARC.
13838 (regsets_store_inferior_registers): Likewise.
13839 * linux-sparc-low.c: New file.
13840
66b6e1dd
DE
138412008-10-21 Doug Evans <dje@google.com>
13842
13843 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13844 (READLINE_DIR,READLINE_DEP): Delete.
13845 (INTERNAL_CFLAGS): Update.
13846 (LINTFLAGS): Update.
13847
9b710a42
PA
138482008-10-10 Pedro Alves <pedro@codesourcery.com>
13849
13850 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13851 whole argv from the last run, not just argv[0].
13852
5822d809
PA
138532008-09-08 Pedro Alves <pedro@codesourcery.com>
13854
13855 * regcache.c (new_register_cache): Return NULL if the register
13856 cache size isn't known yet.
13857 (free_register_cache): Avoid dereferencing a NULL regcache.
13858
74aac56f
DJ
138592008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13860
13861 * configure.srv: Merge MIPS and MIPS64.
13862
400b20f5
MR
138632008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13864
13865 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13866
677c5bb1
LM
138672008-08-18 Luis Machado <luisgpm@br.ibm.com>
13868
13869 * Makefile.in: Add required vsx dependencies.
13870
13871 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13872 Declare init_registers_powerpc_vsx32l.
13873 Declare init_registers_powerpc_vsx64l.
13874 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13875 (ppc_arch_setup): Check for VSX in hwcap.
13876 (ppc_fill_vsxregset): New function.
13877 (ppc_store_vsxregset): New function.
13878 Add new VSX entry in regset_info target_regsets.
13879
13880 * configure.srv: Add new VSX dependencies.
13881
a6f3e723
SL
138822008-08-12 Pedro Alves <pedro@codesourcery.com>
13883
13884 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13885 (remote_open): Set or clear transport_is_reliable.
13886 (putpkt_binary): Don't expect acks in noack mode.
13887 (getpkt): Don't send ack/nac in noack mode.
13888 * server.c (handle_general_set): Handle QStartNoAckMode.
13889 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13890 qSupported.
13891 (main): Reset noack_mode on every connection.
13892 * server.h (noack_mode): Declare.
13893
a417dc56
RW
138942008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13895
13896 * Makefile.in (GDBREPLAY_OBS): New variable.
13897 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13898
3221518c
UW
138992008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13900 Daniel Jacobowitz <dan@codesourcery.com>
13901
13902 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13903 (usr_store_inferior_registers): Likewise.
13904 (regsets_store_inferior_registers): Likewise.
13905
ec56be1b
PA
139062008-07-31 Rolf Jansen <rj@surtec.com>
13907 Pedro Alves <pedro@codesourcery.com>
13908
13909 * configure.ac: Check for memmem declaration.
13910 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13911 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13912 (disable_packet_qfThreadInfo): Unconditionally compile.
13913 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13914 * configure, config.in: Regenerate.
13915
2fe5e3ff
DE
139162008-07-28 Doug Kwan <dougkwan@google.com>
13917
13918 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13919 (linux_write_memory): Remove declaration of errno.
13920
836acd6d
UW
139212008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13922
13923 * linux-low.c (handle_extended_wait): Do not use "status"
13924 variable uninitialized.
13925
aeba519e
PA
139262008-07-07 Pedro Alves <pedro@codesourcery.com>
13927
13928 * server.c (handle_v_attach): Inhibit reporting dll changes.
13929
db42f210
PA
139302008-06-27 Pedro Alves <pedro@codesourcery.com>
13931
13932 * remote-utils.c (prepare_resume_reply): If requested, don't
13933 output "thread:TID" in the T stop reply.
13934
13935 * server.c (disable_packet_vCont, disable_packet_Tthread)
13936 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13937 (handle_query): If requested, disable support for qC, qfThreadInfo
13938 and qsThreadInfo.
13939 (handle_v_requests): If requested, disable support for vCont.
13940 (gdbserver_show_disableable): New.
13941 (main): Handle --disable-packet and --disable-packet=LIST.
13942
13943 * server.h (disable_packet_vCont, disable_packet_Tthread)
13944 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13945
8e4c5421
CD
139462008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13947
13948 * server.c (gdbserver_usage): Mention --version.
13949
6e23a804
DJ
139502008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13951
13952 * Makefile.in (gdbreplay.o): New rule.
13953
90aa6a40
JM
139542008-06-06 Joseph Myers <joseph@codesourcery.com>
13955
13956 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13957 message, not gdbserver.
13958
c16158bc 139592008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13960 Nathan Sidwell <nathan@codesourcery.com>
13961 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13962
13963 * acinclude.m4: Include ../../config/acx.m4.
13964 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13965 * configure, config.in: Regenerate.
13966 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13967 * server.c (gdbserver_version): Print PKGVERSION.
13968 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13969 (main): Adjust gdbserver_usage calls.
13970 * gdbreplay.c (version, host_name): Add declarations.
13971 (gdbreplay_version, gdbreplay_usage): New.
13972 (main): Accept --version and --help options.
13973
aeb75bf5
DJ
139742008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13975
13976 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13977 (arm_breakpoint_at): Handle Thumb.
13978 (the_low_target): Add comment.
13979
76b233dd
UW
139802008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13981
13982 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13983
08388c79
DE
139842008-05-09 Doug Evans <dje@google.com>
13985
a3c83fae
DE
13986 * server.h (decode_search_memory_packet): Declare.
13987 * remote-utils.c (decode_search_memory_packet): New fn.
13988 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13989 (handle_search_memory): New fn.
13990 (handle_query): Process qSearch:memory packets.
13991
bb9c3d36
UW
139922008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13993
13994 * regcache.c (registers_length): Remove.
13995 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13996 full register packet.
13997 * regcache.h (registers_length): Remove prototype.
13998 * server.h (PBUFSIZ): Define to 16384.
13999
7284e1be
UW
140002008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14001
14002 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14003 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14004 powerpc-64l.o, and powerpc-altivec64l.o.
14005 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14006 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14007 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14008 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14009 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14010 to srv_xmlfiles.
14011
14012 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14013 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14014 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14015 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14016 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14017 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14018 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14019 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14020 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14021 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14022 (clean): Update.
14023
14024 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14025 (init_registers_powerpc_32l): ... this new prototype.
14026 (init_registers_powerpc_32): Remove, replace by ...
14027 (init_registers_powerpc_altivec32l): ... this new prototype.
14028 (init_registers_powerpc_e500): Remove, replace by ...
14029 (init_registers_powerpc_e500l): ... this new prototype.
14030 (init_registers_ppc64): Remove, replace by ...
14031 (init_registers_powerpc_64l): ... this new prototype.
14032 (init_registers_powerpc_64): Remove, replace by ...
14033 (init_registers_powerpc_altivec64l): ... this new prototype.
14034 (ppc_num_regs): Set to 73.
14035 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14036 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14037 (ppc_cannot_store_register): Handle orig_r3 and trap.
14038 (ppc_arch_setup): Update init_registers_... calls.
14039 (ppc_fill_gregset): Handle orig_r3 and trap.
14040
14041 * inferiors.c (clear_inferiors): Reset current_inferior.
14042
fdc59709
PB
140432008-04-23 Paolo Bonzini <bonzini@gnu.org>
14044
889bf7c5
PA
14045 * acinclude.m4: Add override.m4.
14046 * configure: Regenerate.
fdc59709 14047
c9b2f845
UW
140482008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14049
14050 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14051 initial call to init_register_ppc64.
14052
550512b8
UW
140532008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14054
43aaf8b6
PA
14055 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14056 single powerpc*-*-linux* case.
550512b8
UW
14057 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14058
b6430ec3
UW
140592008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14060
14061 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 14062 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
14063 from reg_xmlfiles.
14064 * linux-ppc-low.c: Include <elf.h>.
14065 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14066 (ppc_hwcap): New global variable.
14067 (ppc_regmap): Remove __SPE__ #ifdef sections.
14068 (ppc_regmap_e500): New global variable.
14069 (ppc_cannot_store_register): Update __SPE__ special case.
14070 (ppc_get_hwcap): New function.
14071 (ppc_arch_setup): Use it to determine whether inferior supports
14072 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14073 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14074 Do not access registers if target does not support AltiVec.
14075 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14076 Do not access registers if target does not support SPE.
14077 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14078
52fa2412
UW
140792008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14080
14081 * linux-low.c (disabled_regsets, num_regsets): New.
14082 (use_regsets_p): Delete.
14083 (linux_wait_for_process): Clear disabled_regsets.
14084 (regsets_fetch_inferior_registers): Check and set it.
14085 (regsets_store_inferior_registers): Likewise.
14086 (linux_fetch_registers, linux_store_registers): Do not use
14087 use_regsets_p.
14088 (initialize_low): Allocate disabled_regsets.
14089
e28b3332
DJ
140902008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14091
14092 * Makefile.in (LIBOBJS): New.
14093 (OBS): Use LIBOBJS.
14094 (memmem.o): New rule.
14095 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14096 * configure: Regenerated.
14097
4536995d
UW
140982008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14099
14100 * server.c (handle_query): Never return "unsupported" for
14101 qXfer:features:read queries.
14102
221c031f
UW
141032008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14104
14105 * server.c (get_features_xml): Fix inverted condition.
14106 (handle_query): Always support qXfer:feature:read.
14107
ccd213ac
DJ
141082008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14109
14110 * server.c (wrapper_argv): New.
14111 (start_inferior): Handle wrapper_argv. If set, expect an extra
14112 trap.
14113 (gdbserver_usage): Document --wrapper.
14114 (main): Parse --wrapper.
14115
6fe305f7
UW
141162008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14117
14118 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14119 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14120 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14121 (ppc_set_pc): Likewise.
14122 (ppc_arch_setup): New function.
14123 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14124 of collect_register.
889bf7c5 14125 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 14126
5b0a002e
UW
141272008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14128
14129 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14130 instead of linux-ppc64-low.o.
14131 * linux-ppc64-low.c: Remove file.
14132 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14133 (linux-ppc64-low.o): Remove rule.
14134
14135 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14136 (init_registers_powerpc_64): Likewise.
14137 (ppc_regmap): Conditionally define depending on __powerpc64__.
14138 (ppc_cannot_store_register): Do not special-case "fpscr" when
14139 compiled on __powerpc64__.
14140 (ppc_collect_ptrace_register): New function.
14141 (ppc_supply_ptrace_register): New function.
14142 (ppc_breakpoint): Change type to "unsigned int".
14143 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14144 (the_low_target): Conditionally provide initializers for the
889bf7c5 14145 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
14146 collect_ptrace_register and supply_ptrace_register members.
14147
9b4b61c8
UW
141482008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14149
14150 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14151 * server.c (gdbserver_xmltarget): Define.
14152 (get_features_xml): Use it to replace "target.xml" and arch_string.
14153
14154 * configure.srv: Remove srv_xmltarget. Add XML files that were
14155 mentioned there to srv_xmlfiles instead. Remove conditional tests
14156 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14157 srv_xmlfiles and srv_regobj to include all possible choices.
14158 * configure.ac (srv_xmltarget): Remove.
14159 (srv_xmlfiles): Do not add "target.xml".
14160 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14161 checks for supplementary target information.
14162 * configure: Regenerate.
14163 * Makefile.in (XML_TARGET): Remove.
14164 (target.xml): Remove rule.
14165 (clean): Do not clean up target.xml.
14166 (.PRECIOUS): Do not mention target.xml.
14167
14168 * target.h (struct target_ops): Remove arch_string member.
14169 * linux-low.c (linux_arch_string): Remove.
14170 (linux_target_ops): Remove arch_string initializer.
14171 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14172 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14173 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14174 * spu-low.c (spu_arch_string): Remove.
14175 (spu_target_ops): Remove arch_string initializer.
14176 * win32-low.c (win32_arch_string): Remove.
14177 (win32_target_ops): Remove arch_string initializer.
14178 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14179 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14180 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14181
ee1a7ae4
UW
141822008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14183
14184 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14185 by collect_ptrace_register and supply_ptrace_register hooks.
14186 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14187 instead of checking for the_low_target.left_pad_xfer.
14188 (usr_store_inferior_registers): Use collect_ptrace_register callback
14189 instead of checking for the_low_target.left_pad_xfer.
14190
14191 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14192 (s390_supply_ptrace_register): Likewise.
14193 (s390_fill_gregset): Call s390_collect_ptrace_register.
14194 (the_low_target): Update.
14195
14196 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14197 (ppc_supply_ptrace_register): Likewise.
14198 (the_low_target): Update.
14199
14200 * linux-i386-low.c (the_low_target): Update.
14201 * linux-x86-64-low.c (the_low_target): Update.
14202
d61ddec4
UW
142032008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14204
14205 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14206 reg-s390.o and reg-s390x.o.
14207
14208 * linux-low.c (new_inferior): New global variable.
14209 (linux_create_inferior, linux_attach): Set it.
14210 (linux_wait_for_process): Call the_low_target.arch_setup after the
14211 target has stopped for the first time.
14212 (initialize_low): Do not call the_low_target.arch_setup.
14213
14214 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14215 (s390_set_pc): Likewise.
14216 (s390_arch_setup): New function.
14217 (the_low_target): Use s390_arch_setup as arch_setup routine.
14218
14219 * regcache.c (realloc_register_cache): New function.
14220 (set_register_cache): Call it for each existing regcache.
14221
d05b4ac3
UW
142222008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14223
14224 * server.h (init_registers): Remove prototype.
14225
14226 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14227 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14228 instead of init_registers ().
14229 * linux-arm-low.c (init_registers_arm): Add prototype.
14230 (init_registers_arm_with_iwmmxt): Likewise.
14231 (the_low_target): Add initializer for arch_setup field.
14232 * linux-cris-low.c (init_registers_cris): Add prototype.
14233 (the_low_target): Add initializer for arch_setup field.
14234 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14235 (the_low_target): Add initializer for arch_setup field.
14236 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14237 (the_low_target): Add initializer for arch_setup field.
14238 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14239 (the_low_target): Add initializer for arch_setup field.
14240 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14241 (the_low_target): Add initializer for arch_setup field.
14242 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14243 (the_low_target): Add initializer for arch_setup field.
14244 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14245 (init_registers_mips64_linux): Likewise.
14246 (the_low_target): Add initializer for arch_setup field.
14247 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14248 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14249 (the_low_target): Add initializer for arch_setup field.
14250 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14251 (init_registers_powerpc_64): Likewise.
14252 (the_low_target): Add initializer for arch_setup field.
14253 * linux-s390-low.c (init_registers_s390): Add prototype.
14254 (init_registers_s390x): Likewise.
14255 (the_low_target): Add initializer for arch_setup field.
14256 * linux-sh-low.c (init_registers_sh): Add prototype.
14257 (the_low_target): Add initializer for arch_setup field.
14258 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14259 (the_low_target): Add initializer for arch_setup field.
14260 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14261 (the_low_target): Add initializer for arch_setup field.
14262
14263 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14264 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14265 instead of init_registers ().
14266 * win32-arm-low.c (init_registers_arm): Add prototype.
14267 (the_low_target): Add initializer for arch_setup field.
14268 * win32-i386-low.c (init_registers_i386): Add prototype.
14269 (the_low_target): Add initializer for arch_setup field.
14270
14271 * spu-low.c (init_registers_spu): Add prototype.
14272 (initialize_low): Call initialie_registers_spu () instead of
14273 initialize_registers ().
14274
fd96d250
PA
142752008-02-19 Pedro Alves <pedro@codesourcery.com>
14276
14277 * server.c (handle_v_requests): When handling the vRun and vAttach
14278 packets, if already debugging a process, don't kill it. Return an
14279 error instead.
14280
d41b6bb4
DJ
142812008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14282
14283 * server.c (handle_query): Correct length check.
14284
5ac588cf
PA
142852008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14286
14287 * win32-low.c (do_initial_child_stuff): Add process handle
14288 parameter. Set current_process_handle and current_process_id from the
14289 parameters. Clear globals.
14290 (win32_create_inferior): Don't set current_process_handle and
14291 current_process_id here. Instead pass them on the call to
14292 do_initial_child_stuff.
14293 (win32_attach): Likewise.
14294 (win32_clear_inferiors): New.
14295 (win32_kill): Don't close the current process handle or the
14296 current thread handle here. Instead call win32_clear_inferiors.
14297 (win32_detach): Don't open a new handle to the process. Call
14298 win32_clear_inferiors.
14299 (win32_join): Don't rely on current_process_handle; open a new
14300 handle using the process id.
14301 (win32_wait): Call win32_clear_inferiors when the inferior process
14302 has exited.
14303
ecd7ecbc
DJ
143042008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14305
14306 * server.c (monitor_show_help): Add "exit".
14307
1525d545
MG
143082008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14309
ecd7ecbc 14310 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
14311 (clean): Add reg-xtensa.c.
14312 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
14313 * configure.srv (xtensa*-*-linux*) New target.
14314 * linux-xtensa-low.c: New.
14315 * xtensa-xtregs.c: New.
1525d545 14316
59a016f0
PA
143172008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14318
14319 * hostio.c: Don't include errno.h.
14320 (errno_to_fileio_errno): Move to hostio-errno.
14321 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14322 error number outputting to the target->hostio_last_error callback.
14323 (hostio_packet_error): Use FILEIO_EINVAL directly.
14324 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14325 calls to hostio_error.
14326 * hostio-errno.c: New.
14327 * server.h (hostio_last_error_from_errno): Declare.
14328 * target.h (target_ops): Add hostio_last_error member.
14329 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14330 as hostio_last_error handler.
889bf7c5 14331 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
14332 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14333 (wince_hostio_last_error): New functions.
14334 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14335 as hostio_last_error handler.
14336 (win32_target_ops) [!_WIN32_WCE]: Register
14337 hostio_last_error_from_errno as hostio_last_error handler.
14338 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14339 (hostio-errno.o): New rule.
14340 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14341 * configure.srv (srv_hostio_err_objs): New variable. Default to
14342 hostio-errno.o.
14343 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14344 * configure: Regenerate.
14345
2d717e4f
DJ
143462008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14347
14348 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14349 (linux_kill, linux_detach): Clean up the process list.
14350 * remote-utils.c (remote_open): Improve port number parsing.
14351 (putpkt_binary, input_interrupt): Only send interrupts if the target
14352 is running.
14353 * server.c (extended_protocol): Make static.
14354 (attached): Define earlier.
14355 (exit_requested, response_needed, program_argv): New variables.
14356 (target_running): New.
14357 (start_inferior): Clear attached here.
14358 (attach_inferior): Set attached here.
14359 (require_running): Define.
14360 (handle_query): Use require_running and target_running. Implement
14361 "monitor exit".
14362 (handle_v_attach, handle_v_run): New.
14363 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14364 (gdbserver_usage): Update.
14365 (main): Redo argument parsing. Handle --debug and --multi. Handle
14366 --attach along with other options or after the port. Save
14367 program_argv. Support no initial program. Resynchronize
14368 communication with GDB after an error. Handle "monitor exit".
14369 Use require_running and target_running. Always allow the extended
14370 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14371 restart in extended mode.
14372 * README: Refer to the GDB manual. Update --attach usage.
14373
7407e2de
AS
143742007-12-20 Andreas Schwab <schwab@suse.de>
14375
14376 * linux-low.c (STACK_SIZE): Define.
14377 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14378 (linux_test_for_tracefork): Likewise.
14379
b65d95c5
DJ
143802007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14381
14382 * linux-low.c (linux_wait_for_event): Update messages. Do not
14383 reinsert auto-delete breakpoints.
14384 * mem-break.c (struct breakpoint): Change return type of handler to
14385 int.
14386 (set_breakpoint_at): Update handler type.
14387 (reinsert_breakpoint_handler): Return 1 instead of calling
14388 delete_breakpoint.
14389 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14390 setting a new one.
14391 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14392 * mem-break.h (set_breakpoint_at): Update handler type.
14393 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14394 * win32-low.c (auto_delete_breakpoint): New.
14395 (get_child_debug_event): Use it.
14396
4e799345
DJ
143972007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14398
14399 * configure.ac: Check for pread and pwrite.
14400 * hostio.c (handle_pread): Fall back to lseek and read.
14401 (handle_pwrite): Fall back to lseek and write.
14402 * config.in, configure: Regenerated.
14403
27524b67
DJ
144042007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14405
14406 * server.c (myresume): Add own_buf argument.
14407 (main): Update calls.
14408
a20d5e98
DJ
144092007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14410
14411 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14412 * remote-utils.c (remote_open): Do not call disable_async_io.
14413 (block_async_io): Delete.
14414 (unblock_async_io): Make static.
14415 (initialize_async_io): New.
14416 * server.c (handle_v_cont): Handle async I/O here.
14417 (myresume): Likewise. Move other common resume tasks here...
14418 (main): ... from here. Call initialize_async_io. Disable async
14419 I/O before the main loop.
14420 * server.h (initialize_async_io): Declare.
14421 (block_async_io, unblock_async_io): Delete prototypes.
14422 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14423
b79d787e
DJ
144242007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14425
14426 * remote-utils.c (readchar): Allow binary data in received messages.
14427
d97903b2
PA
144282007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14429
14430 * win32-low.c (attaching): New global.
14431 (win32_create_inferior): Clear the `attaching' global.
14432 (win32_attach): Set the `attaching' global.
14433 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14434 attaching. Only set a breakpoint at the entry point if not
14435 attaching.
14436
311de423
PA
144372007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14438
14439 * server.c (main): Don't report dll events on the initial
14440 connection on attaches.
14441
6c2d16d2
PA
144422007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14443
14444 * server.c (main): Relax numerical bases supported for the pid of
14445 the --attach command line argument.
14446
5ca906e6
PA
144472007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14448
14449 * win32-low.c (win32_attach): Call OpenProcess before
14450 DebugActiveProcess, not after. Add last error output to error
14451 call.
14452
9c6c8194
PA
144532007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14454
14455 * win32-low.c (win32_get_thread_context)
14456 (win32_set_thread_context): New functions.
14457 (thread_rec): Use win32_get_thread_context.
14458 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14459 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14460 field.
14461
4d5d1aaa
PA
144622007-12-03 Leo Zayas
14463 Pedro Alves <pedro_alves@portugalmail.pt>
14464
14465 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14466 global variables.
14467 (child_add_thread): Minor cleanup.
14468 (child_continue): Resume artificially suspended threads before
14469 calling ContinueDebugEvent.
14470 (suspend_one_thread): New.
14471 (fake_breakpoint_event): New.
14472 (get_child_debug_event): Change return type to int. Check here if
14473 gdb sent an interrupt request. If a soft interrupt was requested,
14474 fake a breakpoint event. Return 0 if there is no event to handle,
14475 and 1 otherwise.
14476 (win32_wait): Don't check here if gdb sent an interrupt request.
14477 Ensure there is a valid event to handle.
14478 (win32_request_interrupt): Add soft interruption method as last
14479 resort.
14480
c436e841
PA
144812007-12-03 Leo Zayas
14482 Pedro Alves <pedro_alves@portugalmail.pt>
14483
14484 * win32-low.h (win32_thread_info): Add descriptions to the
14485 structure members. Replace `suspend_count' counter by a
14486 `suspended' flag.
14487 * win32-low.c (thread_rec): Update condition of when to get the
14488 context from the inferior. Rely on ContextFlags being set if it
14489 has already been retrieved. Only suspend the inferior thread if
14490 we haven't already. Warn if that fails.
14491 (continue_one_thread): s/suspend_count/suspended/. Only call
14492 ResumeThread once. Warn if that fails.
14493
e7b5fa67
PA
144942007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14495
14496 * win32-low.c (win32_wait): Don't read from the inferior when it
14497 has already exited.
14498
a385171d
PA
144992007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14500
14501 * Makefile.in (win32_low_h): New variable.
14502 (win32-low.o): Add dependency on $(win32_low_h).
14503 (win32-arm-low.o, win32-i386-low.o): New rules.
14504
f80c84b3
DJ
145052007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14506
14507 * hostio.c: Correct copyright year.
14508
a6b151f1
DJ
145092007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14510
14511 * Makefile.in (OBS): Add hostio.o.
14512 (hostio.o): New rule.
14513 * server.h (handle_vFile): Declare.
14514 * hostio.c: New file.
14515 * server.c (handle_v_requests): Take packet_len and new_packet_len
14516 for binary packets. Call handle_vFile.
14517 (main): Update call to handle_v_requests.
14518
f9387fc3
DJ
145192007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14520
14521 * linux-low.c: Include <sched.h>.
14522
51c2684e
DJ
145232007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14524
14525 * linux-low.c (linux_tracefork_grandchild): New.
14526 (linux_tracefork_child): Use clone.
14527 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14528
75f83163
JB
145292007-10-31 Joel Brobecker <brobecker@adacore.com>
14530
14531 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14532
da5898ce
DJ
145332007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14534
14535 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14536
24a09b5f
DJ
145372007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14538
14539 * inferiors.c (change_inferior_id): Delete.
14540 (add_pid_to_list, pull_pid_from_list): New.
14541 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14542 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14543 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14544 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14545 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14546 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14547 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14548 (using_threads): Always set to 1.
14549 (handle_extended_wait): New.
14550 (add_process): Do not set TID.
14551 (linux_create_inferior): Set must_set_ptrace_flags.
14552 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14553 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14554 (linux_thread_alive): Rename TID argument to LWPID.
14555 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14556 (linux_wait_for_event): Do not use TID or check using_threads. Update
14557 call to dead_thread_notify. Call handle_extended_wait.
14558 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14559 (send_sigstop): Delete sigstop_sent.
14560 (wait_for_sigstop): Avoid TID.
14561 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14562 (linux_test_for_tracefork): New.
14563 (linux_lookup_signals): Use thread_db_active and
14564 linux_supports_tracefork_flag.
14565 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14566 * linux-low.h (get_process_thread): Avoid TID.
14567 (struct process_ifo): Move thread_known and tid to the end. Remove
14568 sigstop_sent.
14569 (linux_attach_lwp, thread_db_init): Update prototypes.
14570 * server.h (change_inferior_id): Delete prototype.
14571 (add_pid_to_list, pull_pid_from_list): New prototypes.
14572 * thread-db.c (thread_db_use_events): New.
14573 (find_first_thread): Rename to...
14574 (find_one_thread): ...this. Update callers and messages. Do not
14575 call fatal. Check thread_db_use_events. Do not call
14576 change_inferior_id or new_thread_notify.
14577 (maybe_attach_thread): Update. Do not call new_thread_notify.
14578 (thread_db_init): Set thread_db_use_events. Check use_events.
14579 * utils.c (fatal, warning): Correct message prefix.
14580
30ed0a8f
DJ
145812007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14582
14583 * Makefile.in (clean): Remove new files.
14584 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14585 (powerpc-64.o, powerpc-64.c): New rules.
14586 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14587 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14588 with SPE.
14589 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14590 SPE targets.
14591 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14592 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14593 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14594 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14595 (target_regsets): Add AltiVec and SPE register sets.
14596 * configure.ac: Check for AltiVec and SPE.
14597 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14598 (ppc_fill_vrregset, ppc_store_vrregset): New.
14599 (target_regsets): Add AltiVec register set.
14600 * configure: Regenerated.
14601
fd462a61
DJ
146022007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14603
14604 * linux-low.c (O_LARGEFILE): Define.
14605 (linux_read_memory): Use /proc/PID/mem.
14606 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14607 * configure, config.in: Regenerated.
14608
69f223ed
DJ
146092007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14610
14611 * linux-low.c (linux_wait_for_event): Do not pass signals while
14612 single-stepping.
14613
aec18585
PA
146142007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14615
14616 * win32-low.c (create_process): New.
14617 (win32_create_inferior): Use create_process instead of
14618 CreateProcess. If create_process failed retry appending an ".exe"
14619 suffix. Store the GetLastError result immediatelly after
14620 create_process calls and use it on the call to error.
14621
34d86ddd
PA
146222007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14623
14624 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14625
5a0e3bd0
JB
146262007-08-23 Joel Brobecker <brobecker@adacore.com>
14627
14628 * configure.ac: Switch license to GPLv3.
14629
f88c79e6
MS
146302007-08-01 Michael Snyder <msnyder@access-company.com>
14631
14632 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14633
6b3d9b83
PA
146342007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14635
14636 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14637 typedef.
14638 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14639 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14640 CloseToolhelp32Snapshot.
14641 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14642 CloseToolhelp32Snapshot.
14643
c588c53c
MS
146442007-07-27 Michael Snyder <michael.snyder@access-company.com>
14645
14646 * server.c (main): Check for inferior exit before main loop.
14647
aa0403d9
PA
146482007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14649
14650 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14651 instead of on tmp_desc.
14652
255e7678
DJ
146532007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14654 Daniel Jacobowitz <dan@codesourcery.com>
14655
14656 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14657 (add_thread): Minor cleanups.
14658 (clear_inferiors): Move lower in the file. Clear the DLL
14659 list.
14660 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14661 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14662 (xml_escape_text): New.
14663 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14664 for qSupported.
14665 (handle_v_cont): Report errors.
14666 (gdbserver_version): Update.
14667 (main): Correct size of own_buf. Do not report initial DLL events.
14668 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14669 (unloaded_dll, xml_escape_text): New.
14670 * win32-low.c (enum target_waitkind): Update comments.
14671 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14672 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14673 (win32_EnumProcessModules, win32_GetModuleInformation)
14674 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14675 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14676 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14677 (win32_Module32First, win32_Module32Next, load_toolhelp)
14678 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14679 (get_child_debug_event): Handle DLL events.
14680 (win32_wait): Likewise.
14681
0d37add9
DJ
146822007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14683
14684 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14685 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14686
45e2715e
PA
146872007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14688
14689 * win32-low.c (handle_output_debug_string): Ignore event if not
14690 waiting.
14691
c5674cf1
PA
146922007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14693
14694 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14695
2bbe3cc1
DJ
146962007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14697
14698 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14699
ae13219e
DJ
147002007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14701
14702 * inferiors.c (change_inferior_id): Add comment.
14703 * linux-low.c (check_removed_breakpoint): Add an early
14704 prototype. Improve debug output.
14705 (linux_attach): Doc update.
14706 (linux_detach_one_process, linux_detach): Clean up before releasing
14707 each process.
14708 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14709 * linux-low.h (struct process_info): Doc improvement.
14710 * mem-break.c (delete_all_breakpoints): New.
14711 * mem-break.h (delete_all_breakpoints): New prototype.
14712 * thread-db.c (find_first_thread): New.
14713 (thread_db_create_event): Call it instead of
14714 thread_db_find_new_threads. Clean up unused variables.
14715 (maybe_attach_thread): Remove first thread handling.
14716 (thread_db_find_new_threads): Use find_first_thread.
14717 (thread_db_get_tls_address): Likewise.
14718
4105de34
DJ
147192007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14720
14721 * thread-db.c (thread_db_find_new_threads): Add prototype.
14722 (thread_db_create_event): Check for the main thread before adding
14723 a new thread.
14724 (maybe_attach_thread): Only enable event reporting if TID == 0.
14725 (thread_db_get_tls_address): Check for new threads.
14726
2b876972
DJ
147272007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14728
14729 * linux-low.c (linux_create_inferior): Try execv before execvp.
14730 * spu-low.c (spu_create_inferior): Likewise.
14731
7a245884
DJ
147322007-06-13 Mike Frysinger <vapier@gentoo.org>
14733
14734 * linux-low.c (linux_create_inferior): Change execv to execvp.
14735 * spu-low.c (spu_create_inferior): Likewies.
14736
117ce543
DJ
147372007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14738
14739 * Makefile.in (clean): Clean new files instead of deleted ones.
14740 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14741 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14742 rules.
14743 * configure.srv: Specify XML files and new regformats for MIPS and
14744 MIPS64 GNU/Linux.
14745 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14746 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14747 an entry for the restart register.
14748 (mips_cannot_fetch_register, mips_cannot_store_register)
14749 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14750 register names to match the XML descriptions.
14751 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14752 restart register instead of $0.
14753
0e7f50da
UW
147542007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14755 Markus Deuling <deuling@de.ibm.com>
14756
14757 * remote-utils.c (decode_xfer_write): New function.
14758 * server.h (decode_xfer_write): Add prototype.
14759 * server.c (handle_query): Add PACKET_LEN argument. Support
14760 qXfer:spu:read and qXfer:spu:write packets.
14761 (main): Pass packet_len to handle_query.
14762 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14763 * target.h (target_ops): Add qxfer_spu.
14764
374c1d38
UW
147652007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14766
14767 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14768 accessing non-seekable spufs files.
14769
bb63802a
UW
147702007-05-16 Markus Deuling <deuling@de.ibm.com>
14771
889bf7c5 14772 * server.c (handle_query): Add reply for qC packet.
bb63802a 14773
7390519e
PA
147742007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14775 Leo Zayas <lerele@champenstudios@com>
14776
14777 * server.h (check_remote_input_interrupt_request): New function.
14778 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14779 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14780 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14781 (check_remote_input_interrupt_request): New function.
14782 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14783 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14784 winapi_GenerateConsoleCtrlEvent): New typedefs.
14785 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14786 to 250 ms.
14787 (win32_wait): Check for remote interrupt request
14788 with check_remote_input_interrupt_request.
14789 (win32_request_interrupt): New function.
14790 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14791
34b34921
PA
147922007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14793
14794 * win32-low.c (debug_registers_changed,
14795 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14796 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14797 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14798 (thread_rec): Get context using the low target.
14799 (child_add_thread): Call thread_added on the low target,
14800 which does the same thing.
14801 (regptr): Delete.
14802 (do_initial_child_stuff): Remove debug registers references.
14803 Set context using the low target. Resume threads after
14804 setting the contexts.
14805 (child_continue): Remove dead variable. Remove debug
14806 registers references.
14807 (child_fetch_inferior_registers): Go through the low target.
14808 (do_child_store_inferior_registers): Remove.
14809 (child_store_inferior_registers): Go through the low target.
14810 (win32_resume): Remove debug registers references.
14811 Set context using the low target.
14812 (handle_exception): Change return type to void. Don't record
14813 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14814 first chance exception.
889bf7c5 14815 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14816 goto loop. Always return after waiting for debug event.
14817 (win32_wait): Convert to switch statement. Handle spurious
14818 events.
14819
14820 * win32-i386-low.c (debug_registers_changed,
14821 debug_registers_used): New.
14822 (initial_stuff): Rename to ...
14823 (i386_initial_stuff): ... this. Clear debug registers
14824 state variables.
14825 (store_debug_registers): Delete.
14826 (i386_get_thread_context): New.
14827 (load_debug_registers): Delete.
14828 (i386_set_thread_context): New.
14829 (i386_thread_added): New.
14830 (single_step): Rename to ...
14831 (i386_single_step): ... this.
14832 (do_fetch_inferior_registers): Rename to ...
14833 (i386_fetch_inferior_register): ... this.
14834 (i386_store_inferior_register): New.
14835 (the_low_target): Adapt to new interface.
14836
14837 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14838 (arm_get_thread_context): New.
14839 (arm_set_thread_context): New.
14840 (regptr): New.
14841 (do_fetch_inferior_registers): Rename to ...
14842 (arm_fetch_inferior_register): ... this.
14843 (arm_store_inferior_register): New.
14844 (arm_wince_breakpoint): Reimplement as unsigned long.
14845 (arm_wince_breakpoint_len): Define.
14846 (the_low_target): Adapt to new interface.
14847
14848 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14849 load_debug_registers. Add get_thread_context, set_thread_context,
14850 thread_added and store_inferior_register. Rename
14851 fetch_inferior_registers to fetch_inferior_register.
14852 (regptr): Remove declaration.
14853
dd6953e1
PA
148542007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14855
14856 * linux-low.c (linux_detach): Change return type to int. Return 0.
14857 * spu-low.c (spu_detach): Likewise.
14858
444d6139
PA
148592007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14860
14861 * target.h (target_ops): Change return type of detach to int.
14862 Add join.
14863 (join_inferior): New.
14864 * server.c (main): Don't skip detach support on mingw32.
14865 If the inferior doesn't support detaching return error.
14866 Call join_inferior instead of using waitpid.
14867 * linux-low.c (linux_join): New.
14868 (linux_target_op): Add linux_join.
14869 * spu-low.c (spu_join): New.
14870 (spu_target_ops): Add spu_join.
14871 * win32-low.c (win32_detach): Adapt to new interface.
14872 Reopen current_process_handle before detaching. Issue a child
14873 resume before detaching.
14874 (win32_join): New.
14875 (win32_target_op): Add win32_join.
14876
1d5315fe
PA
148772007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14878
14879 * win32-low.c (win32-attach): Fix return value.
14880 * target.h (target_ops): Describe ATTACH return values.
14881
bf914831
PA
148822007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14883
14884 * win32-low.c (GETPROCADDRESS): Define.
14885 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14886 (winapi_DebugSetProcessKillOnExit): Likewise.
14887 (win32_create_inferior): Force usage of ansi CreateProcessA.
14888 (win32_attach): Use GETPROCADDRESS.
14889 (win32_detach): Likewise.
14890
f72f3e60
PA
148912007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14892
14893 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14894
ed50f18f
PA
148952007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14896
14897 * win32-low.c: Commit leftover changes from 2007-03-29.
14898
0c2ead7e
DJ
148992007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14900
14901 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14902 fields short instead of int. Add explicit padding.
14903 (i387_cache_to_fsave): Remove unnecessary casts.
14904 (i387_fsave_to_cache): Doc fix.
14905 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14906
73725ff3
DJ
149072007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14908
14909 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14910 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14911
d99f33d8
PA
149122007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14913
14914 * configure.srv (arm*-*-mingw32ce*): Move near the other
14915 arm targets.
14916
68070c10
PA
149172007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14918
2482afc6 14919 * configure.ac: Add errno checking.
68070c10
PA
14920 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14921 sys/file.h and malloc.h.
14922 (AC_CHECK_DECLS): Add perror.
14923 (srv_mingwce): Handle.
2482afc6 14924 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14925 win32-i386-low.o to srv_tgtobj.
14926 (i[34567]86-*-mingw*): Likewise.
14927 (arm*-*-mingw32ce*): Add case.
14928 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14929 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14930 [__MINGW32CE__] (strerror): New function.
14931 [__MINGW32CE__] (errno): Define to GetLastError.
14932 [__MINGW32CE__] (COUNTOF): New macro.
14933 (remote_open): Remove extra close call.
14934 * mem-break.c (delete_breakpoint_at): New function.
14935 * mem-break.h (delete_breakpoint_at): Declare.
14936 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14937 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14938 [USE_WIN32API] (read, write): Add char* casts.
14939 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14940 * server.h: Include wincecompat.h on Windows CE.
14941 [HAVE_ERRNO_H]: Check.
14942 (perror): Declare if not declared.
14943 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14944 (perror_with_name): Remove errno declaration.
14945 * wincecompat.h: New.
14946 * wincecompat.c: New.
14947 * win32-low.h: New.
14948 * win32-arm-low.c: New.
14949 * win32-i386-low.c: New.
14950 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14951 (OUTMSG2): Make it safe.
14952 (_T): New macro.
14953 (COUNTOF): New macro.
14954 (NUM_REGS): Get it from the low target.
14955 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14956 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14957 (thread_rec): Let low target handle debug registers.
14958 (child_add_thread): Likewise.
14959 (child_init_thread_list): Likewise.
14960 (continue_one_thread): Likewise.
14961 (regptr): New.
14962 (do_child_fetch_inferior_registers): Move to ...
14963 * win32-i386-low.c: ... here, and rename to ...
14964 (do_fetch_inferior_registers): ... this.
889bf7c5 14965 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14966 Go through the low target.
14967 (do_child_store_inferior_registers): Use regptr.
14968 (strwinerror): New function.
14969 (win32_create_inferior): Handle Windows CE.
14970 Use strwinerror instead of strerror on Windows error
14971 codes. Add program to the error output.
14972 Don't close the main thread handle on Windows CE.
14973 (win32_attach): Use coredll.dll on Windows CE.
14974 (win32_kill): Close current process and current
14975 thread handles.
14976 (win32_detach): Use coredll.dll on Windows CE.
14977 (win32_resume): Let low target handle debug registers, and
14978 step request.
14979 (handle_exception): Add/Remove initial breakpoint. Avoid
14980 non-existant WSTOPSIG on Windows CE.
14981 (win32_read_inferior_memory): Cast to remove warning.
14982 (win32_arch_string): Go through the low target.
14983 (initialize_low): Call set_breakpoint_data with the low
14984 target's breakpoint.
14985 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14986 FOP_REGNUM, mappings): Move to ...
14987 * win32-i386-low.c: ... here.
14988 * win32-low.c (win32_thread_info): Move to ...
14989 * win32-low.h: ... here.
14990 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14991 win32-arm-low.c and wincecompat.c.
14992 (all:): Add $EXEEXT.
14993 (install-only:): Likewise.
14994 (gdbserver:): Likewise.
14995 (gdbreplay:): Likewise.
14996 * config.in: Regenerate.
14997 * configure: Regenerate.
14998
41093d81
PA
149992007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15000
15001 * win32-low.c: Rename typedef thread_info to
15002 win32_thread_info throughout.
15003
544afa54
PA
150042007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15005
15006 * win32-i386-low.c: Rename to ...
15007 * win32-low.c: ... this.
15008 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15009 * Makefile.in: Likewise.
15010
bce7165d
PA
150112007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15012
15013 * remote-utils.c (monitor_output): Constify msg parameter.
15014 * server.h (monitor_output): Likewise.
15015 * win32-i386-low.c (handle_output_debug_string): New.
15016 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15017 handle_output_debug_string.
15018 (get_child_debug_event): Likewise.
15019
506c7aa0
DJ
150202007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15021
15022 * server.c (main): Correct strtoul check.
15023
42c81e2a
DJ
150242007-03-27 Jon Ringle <jon@ringle.org>
15025
15026 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15027
9453113a
DJ
150282007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15029
15030 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15031
64a69107
DJ
150322007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15033
15034 * terminal.h: Check HAVE_SGTTY_H.
15035
150362007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
15037
15038 * remote-utils.c (remote_open): Print out the assigned port number.
15039
c74d0ad8
DJ
150402007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15041
15042 * remote-utils.c (monitor_output): New function.
15043 * server.c (debug_threads): Define here.
15044 (monitor_show_help): New function.
15045 (handle_query): Handle qRcmd.
15046 (main): Do not handle 'd' packet.
15047 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15048 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15049 of debug_threads.
15050
de7c3b4a
PA
150512007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15052
15053 * Makefile.in (EXEEXT): New.
15054 (clean): Use $(EXEEXT).
15055
ef57601b
PA
150562007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15057
15058 * target.h (target_ops): Rename send_signal to request_interrupt,
15059 and remove enum target_signal parameter.
15060 * linux-low.c (linux_request_interrupt): Rename from
15061 linux_send_signal, and always send SIGINT.
15062 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15063 and always send SIGINT.
15064 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15065 of send_signal.
15066 (input_interrupt): Likewise.
15067
820f2bda
PA
150682007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15069
15070 * server.c (get_features_xml): Check if target implemented
15071 arch_string.
15072 * win32-i386-low.c (win32_arch_string): New.
15073 (win32_target_ops): Add win32_arch_string as arch_string member.
15074
ab39bf24
UW
150752007-02-22 Markus Deuling <deuling@de.ibm.com>
15076
15077 * spu-low.c (spu_arch_string): New.
15078 (spu_target_ops): Add spu_arch_string.
15079
61ff6e04
DJ
150802007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15081
15082 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15083 * configure.ac: Do not check for terminal.h.
15084 * configure, config.in: Regenerated.
15085
fb1e4ffc
DJ
150862007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15087
15088 * Makefile.in (OBS): Add $(XML_BUILTIN).
15089 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15090 (clean): Update.
15091 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15092 (arm-with-iwmmxt.c): New.
15093 * config.in, configure: Regenerate.
15094 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15095 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15096 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15097 (arm*-*-linux*): Add iWMMXt and regset support.
15098 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15099 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15100 (arm_store_wmmxregset, target_regsets): New.
15101 * server.c (get_features_xml): Take annex argument. Check builtin
15102 XML documents.
15103 (handle_query): Handle multiple annexes.
15104
0f48aa01
DJ
151052007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15106
15107 * remote-utils.c [USE_WIN32API] (read, write): Define.
15108 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15109 write.
15110
23181151
DJ
151112007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15112
15113 * linux-i386-low.c (the_low_target): Set arch_string.
15114 * linux-x86-64-low.c (the_low_target): Likewise.
15115 * linux-low.c (linux_arch_string): New.
15116 (linux_target_ops): Add it.
15117 * linux-low.h (struct linux_target_ops): Add arch_string.
15118 * server.c (write_qxfer_response): Use const void * for DATA.
15119 (get_features_xml): New.
15120 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15121 * target.h (struct target_ops): Add arch_string method.
15122
9d606399
DJ
151232007-01-03 Denis Pilat <denis.pilat@st.com>
15124 Daniel Jacobowitz <dan@codesourcery.com>
15125
15126 * linux-low.c (linux_kill): Handle being called with no threads.
15127 * win32-i386-low.c (win32_kill): Likewise.
15128 (get_child_debug_event): Clear current_process_handle.
15129
151302006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
15131 Daniel Jacobowitz <dan@codesourcery.com>
15132
15133 * remote-utils.c (remote_open): Check the type of specified
15134 serial port devices before opening them.
15135 * server.c (main): Kill the inferior if an error occurs during
15136 the first remote_open.
15137
a5e13d24
DJ
151382006-12-05 Markus Deuling <deuling@de.ibm.com>
15139
15140 * README: Update supported targets.
15141
186947f7
DJ
151422006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15143
15144 * Makefile.in (clean): Remove reg-mips64.c.
15145 (reg-mips64.c, reg-mips64.o): New rules.
15146 * configure.srv: Handle mips64. Include regset support for mips.
15147 * linux-mips-low.c (union mips_register): New.
15148 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15149 (mips_breakpoint, mips_breakpoint_at): Use int.
15150 (mips_collect_register, mips_supply_register)
15151 (mips_collect_register_32bit, mips_supply_register_32bit)
15152 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15153 (mips_store_fpregset, target_regsets): New.
15154 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15155
a13e2c95
UW
151562006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15157
15158 * configure.srv: Add target "spu*-*-*".
15159 * Makefile.in (clean): Remove reg-spu.c.
15160 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15161 * spu-low.c: New file.
15162
cb7283db
DJ
151632006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15164
15165 * configure.ac: Correct td_thr_tls_get_addr test.
15166 * configure: Regenerated.
15167
89be2091
DJ
151682006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15169
15170 * linux-low.c (linux_wait_for_event): Reformat. Use the
15171 pass_signals array.
15172 * remote-utils.c (decode_address_to_semicolon): New.
15173 * server.c (pass_signals, handle_general_set): New.
15174 (handle_query): Mention QPassSignals for qSupported.
15175 (main): Call handle_general_set.
15176 * server.h (pass_signals, decode_address_to_semicolon): New.
15177
000ef4f0
DJ
151782006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15179
15180 * server.c (handle_query): Correct error handling for read_auxv.
15181
b7149293
UW
151822005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15183
15184 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15185 and srv_linux_thread_db to yes.
15186 * linux-s390-low.c (s390_fill_gregset): New function.
15187 (target_regsets): Define data structure.
15188
dae5f5cf
DJ
151892006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15190
15191 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15192 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15193 * config.in, configure: Regenerated.
15194 * inferiors.c (gdb_id_to_thread): New function.
15195 (gdb_id_to_thread_id): Use it.
15196 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15197 * linux-low.h (struct process_info): Add th member.
15198 (thread_db_get_tls_address): New prototype.
15199 * remote-utils.c (decode_address): Make non-static.
15200 * server.c (handle_query): Handle qGetTLSAddr.
15201 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15202 * target.h (struct target_ops): Add get_tls_address.
15203 * thread-db.c (maybe_attach_thread): Save the thread handle.
15204 (thread_db_get_tls_address): New.
15205
32ca6d61
DJ
152062006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15207
15208 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15209 (linux_resume_one_process): Take a siginfo_t *. Update all
15210 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15211 (struct pending_signals): Add a siginfo_t.
15212 (linux_wait_for_process): Always set last_status.
15213 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15214 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15215 * linux-low.h (struct process_info): Add last_status.
15216
5ffff7c1
DJ
152172006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15218
15219 * remote-utils.c (try_rle): New function.
15220 (putpkt_binary): Use it.
15221
8695c747
DJ
152222006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15223
15224 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15225 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15226 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15227 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15228 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15229 point registers.
15230
290fadea
RS
152312006-08-08 Richard Sandiford <richard@codesourcery.com>
15232
15233 * server.c (terminal_fd): New variable.
15234 (old_foreground_pgrp): Likewise.
15235 (restore_old_foreground_pgrp): New function.
15236 (start_inferior): Record the terminal file descriptor in terminal_fd
15237 and its original foreground group in old_foreground_pgrp. Register
15238 restore_old_foreground_pgrp with atexit().
15239
9f2e1e63
DJ
152402006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15241
15242 * server.c (handle_query): Correct qPart to qXfer.
15243
b80864fb
DJ
152442006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15245
15246 * configure.ac: Check for more headers which are missing on
15247 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15248 * configure.srv: Add Cygwin and mingw32.
15249 * remote-utils.c: Don't include headers unconditionally which
15250 are missing on mingw32. Include <winsock.h> for mingw32.
15251 (remote_open): Adjust for mingw32 support. Flush
15252 standard error after writing to it.
15253 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15254 (unblock_async_io, enable_async_io, disable_async_io)
15255 (readchar, getpkt): Update for Winsock support.
15256 (prepare_resume_reply): Expect a protocol signal number.
15257 * server.c: Disable <sys/wait.h> on mingw32.
15258 (start_inferior): Adjust for mingw32 support. Flush
15259 standard error after writing to it.
15260 (attach_inferior): Likewise. Use protocol signal
15261 numbers.
15262 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15263 and names.
15264 * win32-i386-low.c: New file.
15265 * Makefile.in (XM_CLIBS): Set.
15266 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15267 (win32-i386-low.o): New dependency rule.
15268 * linux-low.c (linux_wait): Use target signal numbers.
15269 * target.h (struct target_ops): Doc fix.
15270 * server.h (target_signal_to_name): New prototype.
15271 * gdbreplay.c: Don't include headers unconditionally which
15272 are missing on mingw32. Include <winsock.h> for mingw32.
15273 (remote_close, remote_open): Adjust for Winsock support.
15274 * configure, config.in: Regenerated.
15275
0876f84a
DJ
152762006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15277
15278 * server.c (decode_xfer_read, write_qxfer_response): New.
15279 (handle_query): Take a packet length argument. Handle
15280 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15281 the qSupported response.
15282 (main): Update call to handle_query.
15283
01f9e8fa
DJ
152842006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15285
15286 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15287 (putpkt_binary): Renamed from putpkt and adjusted for binary
15288 data.
15289 (putpkt): New wrapper for putpkt_binary.
15290 (readchar): Don't mask off the high bit.
15291 (decode_X_packet): New function.
15292 * server.c (main): Call putpkt_binary if a handler sets the packet
15293 length. Save the length of the incoming packet. Handle 'X'.
15294 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15295
be2a5f71
DJ
152962006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15297
15298 * server.c (handle_query): Handle qSupported.
15299
ea025f5f
DJ
153002006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15301
15302 * remote-utils.c (all_symbols_looked_up): New variable.
15303 (look_up_one_symbol): Check it.
15304 * server.h (look_up_one_symbol): New declaration.
15305 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15306
9308fc88
DJ
153072006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15308
15309 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 15310 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
15311 (PTRACE_GET_THREAD_AREA): Define.
15312 (ps_get_thread_area): New function.
15313
52fb6437
NS
153142006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15315
15316 * configure.srv (m68k*-*-uclinux*): New target.
15317 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15318 (linux_resume_one_process): Remove extraneous cast.
15319 (linux_read_offsets): New.
15320 (linux_target_op): Add linux_read_offsets on mmuless systems.
15321 * server.c (handle_query): Add qOffsets logic.
15322 * target.h (struct target_ops): Add read_offsets.
15323
21b0f40c
DJ
153242006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15325
15326 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15327 (PTRACE_GET_THREAD_AREA): Define.
15328 (ps_get_thread_area): New function.
15329 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15330 (linux-x86-64-low.o): Update.
15331
0050a760
DJ
153322006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15333
15334 * configure.ac: Remove checks for prfpregset_t.
15335 * gdb_proc_service.h: New file.
15336 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15337 new "gdb_proc_service.h".
15338 * proc-service.c: Likewise.
15339 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15340 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15341 * Makefile.in (gdb_proc_service_h): Updated.
15342 * configure, config.in: Regenerated.
15343
b92a518e
DJ
153442006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15345
15346 * remote-utils.c (prepare_resume_reply): Move declaration
15347 of gdb_id_from_wait to the top of the block.
15348
545587ee
DJ
153492006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15350
15351 * linux-low.c (regsets_store_inferior_registers): Read the regset
15352 from the target before filling it.
15353
9db87ebd
DJ
153542006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15355
15356 * server.c (attach_inferior): Return SIGTRAP for a successful
15357 attach.
15358
dd24457d
DJ
153592006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15360
15361 * Makefile.in (OBS): Add version.o.
15362 (STAGESTUFF): Delete.
15363 (version.o): Add dependencies.
15364 (version.c): Replace rule.
15365 (clean): Remove version.c.
15366 * server.c (gdbserver_version): New.
15367 (gdbserver_usage): Use printf.
15368 (main): Handle --version and --help.
15369 * server.h (version, host_name): Add declarations.
15370
6f0f660e
EZ
153712005-12-23 Eli Zaretskii <eliz@gnu.org>
15372
889bf7c5
PA
15373 * linux-arm-low.c:
15374 * linux-arm-low.c:
15375 * inferiors.c:
15376 * i387-fp.h:
15377 * i387-fp.c:
15378 * gdbreplay.c:
15379 * regcache.c:
15380 * proc-service.c:
15381 * mem-break.h:
15382 * mem-break.c:
15383 * linux-x86-64-low.c:
15384 * linux-sh-low.c:
15385 * linux-s390-low.c:
15386 * linux-ppc64-low.c:
15387 * linux-ppc-low.c:
15388 * linux-mips-low.c:
15389 * linux-m68k-low.c:
15390 * linux-m32r-low.c:
15391 * linux-low.h:
15392 * linux-low.c:
15393 * linux-ia64-low.c:
15394 * linux-i386-low.c:
15395 * linux-crisv32-low.c:
15396 * thread-db.c:
15397 * terminal.h:
15398 * target.h:
15399 * target.c:
15400 * server.h:
15401 * server.c:
15402 * remote-utils.c:
15403 * regcache.h:
15404 * utils.c:
15405 * Makefile.in:
15406 * configure.ac:
6f0f660e
EZ
15407 * gdbserver.1: Add (C) after Copyright. Update the FSF
15408 address.
15409
9d1fb177
DJ
154102005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15411
15412 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15413 (arm_breakpoint_at): Recognize both breakpoints.
15414 (the_low_target): Use the correct breakpoint instruction.
15415
011a70c2
DJ
154162005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15417
15418 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15419 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15420 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15421 (the_low_target): Update.
15422
7fb85e41
AS
154232005-10-25 Andreas Schwab <schwab@suse.de>
15424
15425 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15426
15427 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15428 (ia64_num_regs): Reduce to 462.
15429
3db0444b
DJ
154302005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15431
15432 * acinclude.m4: Correct quoting.
15433 * aclocal.m4: Regenerated.
15434
15435 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15436 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15437 (thread_db_init): Call thread_db_err_str.
15438 * configure.ac: Check for TD_VERSION.
15439 * config.in, configure: Regenerated.
15440
bee0189a
DJ
154412005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15442
15443 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15444
e9d25b98
DJ
154452005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15446
15447 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15448 is not available. Define HAVE_PTRACE_GETREGS if it is.
15449 * config.in, configure: Regenerated.
15450 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15451 * linux-i386-low.c, linux-m68k-low.c: Update to use
15452 HAVE_PTRACE_GETREGS.
15453 * linux-low.c (regsets_fetch_inferior_registers)
15454 (regsets_store_inferior_registers): Only return 0 if we processed
15455 GENERAL_REGS.
15456 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15457 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15458
a06660f7
DJ
154592005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15460
15461 * inferiors.c (struct thread_info): Add gdb_id.
15462 (add_thread): Add gdb_id argument.
15463 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15464 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15465 calls to add_thread.
15466 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15467 * server.c (handle_query): Use thread_to_gdb_id.
15468 (handle_v_cont, main): Use gdb_id_to_thread_id.
15469 * server.h (add_thread): Update prototype.
15470 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15471 prototypes.
15472
5a1f5858
DJ
154732005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15474
15475 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15476 left-padded registers.
15477 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15478 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15479
e122f1f5
SE
154802005-07-01 Steve Ellcey <sje@cup.hp.com>
15481
15482 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15483 * configure: Regenerate.
15484 * config.in: Regenerate.
15485 * server.h (NEED_DECLARATION_STRERROR):
15486 Replace with !HAVE_DECL_STRERROR.
15487
d592fa2f
DJ
154882005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15489
15490 * linux-low.c (linux_wait, linux_send_signal): Don't test
15491 an unsigned long variable for > 0 if it could be MAX_ULONG.
15492 * server.c (myresume): Likewise.
15493 * target.c (set_desired_inferior): Likewise.
15494
ccbd4912
MK
154952005-06-13 Mark Kettenis <kettenis@gnu.org>
15496
15497 * configure.ac: Simplify and improve check for socklen_t.
15498 * configure, config.in: Regenerate.
15499
f450004a
DJ
155002005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15501
15502 * acconfig.h: Remove.
15503 * configure.ac: Add a test for socklen_t. Use three-argument
15504 AC_DEFINE throughout.
15505 * config.in: Regenerated using autoheader 2.59.
15506 * configure: Regenerated.
15507
15508 * gdbreplay.c (socklen_t): Provide a default.
15509 (remote_open): Use socklen_t.
15510 * remote-utils.c (socklen_t): Provide a default.
15511 (remote_open): Use socklen_t.
15512 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15513 unsigned char.
15514
15515 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15516 char for buffers.
15517 * linux-low.c (linux_read_memory, linux_write_memory)
15518 (linux_read_auxv): Likewise.
15519 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15520 (check_mem_write): Likewise.
15521 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15522 Likewise.
15523 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15524 (registers_from_string, register_data): Likewise.
15525 * server.c (handle_query, main): Likewise.
15526 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15527 (decode_M_packet): Likewise.
15528 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15529 * target.h (struct target_ops): Update read_memory, write_memory,
15530 and read_auxv.
15531 (read_inferior_memory, write_inferior_memory): Update.
15532 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15533 to unsigned char *.
15534 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15535 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15536 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15537 linux-s390-low.c, linux-sh-low.c: Update for changes in
15538 read_inferior_memory and the_low_target->breakpoint.
15539
eee84df1
DJ
155402005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15541
15542 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15543 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15544 * configure.srv: Add powerpc64-*-linux*.
15545 * linux-ppc64-low.c: New file.
15546
45b134e5
OF
155472005-05-23 Orjan Friberg <orjanf@axis.com>
15548
15549 * linux-cris-low.c: New file with support for CRIS.
15550 * linux-crisv32-low.c: Ditto for CRISv32.
15551 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15552 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15553 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15554 reg-crisv32.o, and reg-crisv32.c to make rules.
15555 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15556 recognized targets.
15557
48d93c75
UW
155582005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15559
15560 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15561 of sizeof (PTRACE_XFER_TYPE).
15562 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15563
e013ee27
OF
155642005-05-12 Orjan Friberg <orjanf@axis.com>
15565
889bf7c5 15566 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15567 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15568 pointers for hardware watchpoint support.
15569 * linux-low.h (struct linux_target_ops): Ditto.
15570 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15571 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15572 to linux_target_ops.
15573 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15574 reply packet.
15575 * server.c (main): Recognize 'Z' and 'z' packets.
15576
b0ded00b
UW
155772005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15578
15579 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15580 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15581 (the_low_target): Add new members.
15582
8643e2ad
DJ
155832005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15584
15585 * proc-service.c (ps_lgetregs): Search all_processes instead of
15586 all_threads.
15587
fc620387
DJ
155882005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15589
15590 * server.c (start_inferior): Change return type to int.
15591 (attach_inferior): Change sigptr to int *.
15592 (handle_v_cont, handle_v_requests): Change signal to int *.
15593 (main): Change signal to int.
15594
155952005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15596
15597 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15598 * configure.srv: Add m32r*-*-linux*.
15599 * linux-m32r-low.c: New file.
15600
e0e76420
DJ
156012005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15602
15603 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15604
a1928bad
DJ
156052005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15606
15607 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15608 Take unsigned long arguments for PIDs.
15609 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15610 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15611 (wait_for_sigstop, linux_resume_one_process)
15612 (regsets_fetch_inferior_registers, linux_send_signal)
15613 (linux_read_auxv): Likewise. Update the types of variables holding
15614 PIDs. Update format string specifiers.
15615 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15616 * remote-utils.c (prepare_resume_reply): Likewise.
15617 * server.c (cont_thread, general_thread, step_thread)
15618 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15619 unsigned long.
15620 (handle_query): Update format specifiers.
15621 (handle_v_cont, main): Use strtoul for thread IDs.
15622 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15623 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15624 (general_thread, step_thread, thread_from_wait)
15625 (old_thread_from_wait): Update.
15626 * target.h (struct thread_resume): Use unsigned long for THREAD.
15627 (struct target_ops): Use unsigned long for arguments to attach and
15628 thread_alive.
15629
dcdb98d2
DJ
156302005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15631
15632 * acinclude.m4: Include bfd/bfd.m4 directly.
15633 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15634 <agriffis@toolchain.org>.
15635 * aclocal.m4, configure: Regenerated.
15636
bec39cab
AC
156372005-01-07 Andrew Cagney <cagney@gnu.org>
15638
15639 * configure.ac: Rename configure.in, require autoconf 2.59.
15640 * configure: Re-generate.
15641
434c4c77
DJ
156422004-12-08 Daniel Jacobowitz <dan@debian.org>
15643
15644 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15645 LIBS when finished.
15646 * aclocal.m4: Regenerated.
15647 * configure: Regenerated.
15648
db1d3e1b
AS
156492004-11-21 Andreas Schwab <schwab@suse.de>
15650
15651 * linux-m68k-low.c (m68k_num_gregs): Define.
15652 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15653 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15654 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15655 (m68k_breakpoint_at): New. Add to the_low_target.
15656
15657 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15658 srv_linux_thread_db to yes.
15659
43360365
JB
156602004-10-20 Joel Brobecker <brobecker@gnat.com>
15661
15662 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15663 (ARCH_SET_FS): Likewise.
15664 (ARCH_GET_FS): Likewise.
15665 (ARCH_GET_GS): Likewise.
15666
fd500816
DJ
156672004-10-16 Daniel Jacobowitz <dan@debian.org>
15668
15669 * linux-i386-low.c (ps_get_thread_area): New.
15670 * linux-x86-64-low.c (ps_get_thread_area): New.
15671 * linux-low.c: Include <sys/syscall.h>.
15672 (linux_kill_one_process): Don't kill the first thread here.
15673 (linux_kill): Kill the first thread here.
15674 (kill_lwp): New function.
15675 (send_sigstop, linux_send_signal): Use it.
15676 * proc-service.c: Clean up #ifdefs.
15677 (fpregset_info): Delete.
15678 (ps_lgetregs): Update and enable implementation.
15679 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15680 implementations.
15681 * remote-utils.c (struct sym_cache, symbol_cache): New.
15682 (input_interrupt): Print a clearer message.
15683 (async_io_enabled): New variable.
15684 (enable_async_io, disable_async_io): Use it. Update comments.
15685 (look_up_one_symbol): Use the symbol cache.
15686 * thread-db.c (thread_db_look_up_symbols): New function.
15687 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15688
f6de3c42
DJ
156892004-10-16 Daniel Jacobowitz <dan@debian.org>
15690
15691 * configure.in: Test for -rdynamic.
15692 * configure: Regenerated.
15693 * Makefile (INTERNAL_LDFLAGS): New.
15694 (gdbserver, gdbreplay): Use it.
15695
2c0fc042
AC
156962004-09-02 Andrew Cagney <cagney@gnu.org>
15697
15698 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15699
075b3282
DJ
157002004-03-23 Daniel Jacobowitz <drow@mvista.com>
15701
15702 * linux-low.c (linux_wait): Clear all_processes list also.
15703
fa6a77dc
DJ
157042004-03-12 Daniel Jacobowitz <drow@mvista.com>
15705
15706 * linux-low.c: Include <errno.h>. Remove extern declaration of
15707 errno.
15708
6d782a97
DJ
157092004-03-12 Daniel Jacobowitz <drow@mvista.com>
15710
15711 * gdbreplay.c, server.h, utils.c: Update copyright years.
15712
3a7fb99b
DJ
157132004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15714
15715 * server.c (main): Print child status or termination signal from
15716 variable 'signal', not 'sig'.
15717
c3e735a6
DJ
157182004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15719
15720 * linux-low.c (linux_read_memory): Change return type to
15721 int. Check for and return error from ptrace().
15722 * target.c (read_inferior_memory): Change return type to int. Pass
15723 back return status from the_target->read_memory().
15724 * target.h (struct target_ops): Adapt *read_memory() prototype.
15725 Update comment.
15726 (read_inferior_memory): Adapt prototype.
15727 * server.c (main): Return an error packet if
15728 read_inferior_memory() returns an error.
15729
a59d1c82
DJ
157302004-03-04 Daniel Jacobowitz <drow@mvista.com>
15731
15732 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15733 Unify with other clean targets.
15734
dc3f8883
DJ
157352004-02-29 Daniel Jacobowitz <drow@mvista.com>
15736
15737 * server.c (handle_v_cont): Call set_desired_inferior.
15738
89a208da
DJ
157392004-02-29 Daniel Jacobowitz <drow@mvista.com>
15740
15741 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15742
62ea82f5
DJ
157432004-02-29 Daniel Jacobowitz <drow@mvista.com>
15744
15745 * linux-low.c (linux_wait): Unblock async I/O.
15746 (linux_resume): Block and enable async I/O.
15747 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15748 * server.h (block_async_io, unblock_async_io): Add prototypes.
15749
6910d122
DJ
157502004-02-29 Daniel Jacobowitz <drow@mvista.com>
15751
15752 * remote-utils.c (remote_open): Print a status notice after
15753 opening a TCP port.
15754 * server.c (attach_inferior): Print a status notice after
15755 attaching.
15756
157572004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15758
15759 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15760
c89dc5d4
DJ
157612004-02-26 Daniel Jacobowitz <drow@mvista.com>
15762
15763 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15764 error packet.
15765 * server.c, target.h: Update copyright years.
15766
4b8dad4a
RM
157672004-02-25 Roland McGrath <roland@redhat.com>
15768
15769 * target.h (struct target_ops): New member `read_auxv'.
15770 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15771 * linux-low.c (linux_read_auxv): New function.
15772 (linux_target_ops): Initialize `read_auxv' member to that.
15773
d7446758
JB
157742004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15775
15776 Committed by Jim Blandy <jimb@redhat.com>.
15777
15778 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15779 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15780 instead of GPR_SIZE to distiguish s390 and s390x targets.
15781
5544ad89
DJ
157822004-01-31 Daniel Jacobowitz <drow@mvista.com>
15783
15784 * linux-low.c: Update copyright year.
15785 (check_removed_breakpoint): Clear pending_is_breakpoint.
15786 (linux_set_resume_request, linux_queue_one_thread)
15787 (resume_status_pending_p): New functions.
15788 (linux_continue_one_thread): Use process->resume.
15789 (linux_resume): Only resume threads if there are no pending events.
15790 * linux-low.h (struct process_info): Add resume request
15791 pointer.
15792
2a68b70e
DJ
157932004-01-30 Daniel Jacobowitz <drow@mvista.com>
15794
15795 * regcache.c (new_register_cache): Clear the allocated register
15796 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15797
64386c31
DJ
157982003-10-13 Daniel Jacobowitz <drow@mvista.com>
15799
15800 * linux-low.c (linux_resume): Take a struct thread_resume *
15801 argument.
15802 (linux_wait): Update call.
15803 (resume_ptr): New static variable.
15804 (linux_continue_one_thread): Renamed from
15805 linux_continue_one_process. Use resume_ptr.
15806 (linux_resume): Use linux_continue_one_thread.
15807 * server.c (handle_v_cont, handle_v_requests): New functions.
15808 (myresume): New function.
15809 (main): Handle 'v' case.
15810 * target.h (struct thread_resume): New type.
15811 (struct target_ops): Change argument of "resume" to struct
15812 thread_resume *.
15813 (myresume): Delete macro.
15814
c938e9b0
L
158152003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15816
15817 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15818 (uninstall): Support DESTDIR.
15819
7f313d07
BC
15820Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15821
15822 * configure.srv: Add xscale*linux copy of arm*linux entry.
15823
3b2fc2ea
DJ
158242003-07-24 Daniel Jacobowitz <drow@mvista.com>
15825
15826 * linux-arm-low.c (arm_reinsert_addr): New function.
15827 (the_low_target): Add arm_reinsert_addr.
15828
1c0a559e
MK
158292003-07-08 Mark Kettenis <kettenis@gnu.org>
15830
15831 * mem-break.c: Remove whitespace at end of file.
15832
43d5792c
DJ
158332003-06-28 Daniel Jacobowitz <drow@mvista.com>
15834
15835 * configure.in: Check whether we need to prototype strerror.
15836 * server.h: Optionally prototype strerror.
15837 * gdbreplay.c (perror_with_name): Use strerror.
15838 * linux-low.c (linux_attach_lwp): Use strerror.
15839 * utils.c (perror_with_name): Use strerror.
15840 * config.in, configure: Regenerated.
15841
c8a86edf
DJ
158422003-06-28 Daniel Jacobowitz <drow@mvista.com>
15843
15844 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15845 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15846
73d37363
DJ
158472003-06-20 Daniel Jacobowitz <drow@mvista.com>
15848
15849 * Makefile.in (SFILES): Update.
15850 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15851 low-sun3.c: Remove files.
15852
6ad8ae5c
DJ
158532003-06-17 Daniel Jacobowitz <drow@mvista.com>
15854
15855 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15856 (linux_detach_one_process, linux_detach): New functions.
15857 (linux_target_ops): Add linux_detach.
15858 * server.c (main): Handle 'D' packet.
15859 * target.h (struct target_ops): Add "detach" member.
15860 (detach_inferior): Define.
15861
1581182a
MK
158622003-06-13 Mark Kettenis <kettenis@gnu.org>
15863
15864 From Kelley Cook <kelleycook@wideopenwest.com>:
15865 * configure.srv: Accept i[34567]86 variants.
15866
e5379b03
DJ
158672003-06-05 Daniel Jacobowitz <drow@mvista.com>
15868
15869 * linux-low.c (linux_wait_for_event): Correct comment typos.
15870 (linux_resume_one_process): Call check_removed_breakpoint.
15871 (linux_send_signal): New function.
15872 (linux_target_ops): Add linux_send_signal.
15873 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15874 of kill.
15875 * target.h (struct target_ops): Add send_signal.
15876
2ff29de4
JB
158772003-05-29 Jim Blandy <jimb@redhat.com>
15878
15879 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15880 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15881 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15882 away part of the register's value.
15883
254787d4
DJ
158842003-03-26 Daniel Jacobowitz <drow@mvista.com>
15885
15886 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15887 (linux_wait_for_event, linux_init_signals): Likewise.
15888
94e10508
DJ
158892003-03-17 Daniel Jacobowitz <drow@mvista.com>
15890
15891 * configure.in: Check for stdlib.h.
15892 * configure: Regenerated.
15893 * config.in: Regenerated.
15894
4c0711e0
DJ
158952003-01-04 Andreas Schwab <schwab@suse.de>
15896
15897 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15898
ef66e766
AC
158992003-01-02 Andrew Cagney <ac131313@redhat.com>
15900
15901 * Makefile.in: Remove obsolete code.
15902
a1358604
DJ
159032002-11-20 Daniel Jacobowitz <drow@mvista.com>
15904
15905 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15906 defined(PT_FPR0_HI).
15907
23ce3b1c
DJ
159082002-11-17 Stuart Hughes <seh@zee2.com>
15909
15910 * linux-arm-low.c (arm_num_regs): Increase.
15911 (arm_regmap): Include status register.
15912
159132002-11-17 Daniel Jacobowitz <drow@mvista.com>
15914
15915 * linux-low.c (register_addr): Remove incorrect -1 check.
15916
a9fa9f7d
DJ
159172002-08-29 Daniel Jacobowitz <drow@mvista.com>
15918
15919 * linux-low.c (linux_create_inferior): Call setpgid. Return
15920 the new PID.
15921 (unstopped_p, linux_signal_pid): Remove.
15922 (linux_target_ops): Remove linux_signal_pid.
15923 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15924 global instead of target method.
15925 * target.h (struct target_ops): Remove signal_pid. Update comment
15926 for create_inferior.
15927 * server.c (signal_pid): New variable.
15928 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15929 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15930 (attach_inferior): Set signal_pid.
15931
17574093
DJ
159322002-08-23 Daniel Jacobowitz <drow@mvista.com>
15933
15934 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15935
159362002-08-20 Jim Blandy <jimb@redhat.com>
15937
15938 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15939 default for this.
15940
159412002-08-01 Andrew Cagney <cagney@redhat.com>
15942
15943 * Makefile.in: Make chill references obsolete.
15944
159452002-07-24 Kevin Buettner <kevinb@redhat.com>
15946
15947 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15948 * configure: Regenerate.
15949 * config.in: Regenerate.
15950
159512002-07-09 David O'Brien <obrien@FreeBSD.org>
15952
15953 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15954 (perror_with_name, remote_close, remote_open, expect, play): Static.
15955
159562002-07-04 Michal Ludvig <mludvig@suse.cz>
15957
4b8dad4a 15958 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15959 byte offsets instead of an array of indexes.
15960 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15961
159622002-06-13 Daniel Jacobowitz <drow@mvista.com>
15963
15964 * regcache.c: Add comment.
15965
159662002-06-11 Daniel Jacobowitz <drow@mvista.com>
15967
15968 * thread-db.c: New file.
15969 * proc-service.c: New file.
15970 * acinclude.m4: New file.
15971 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15972 proc-service.o, and thread-db.o.
15973 (linux-low.o): Add USE_THREAD_DB.
15974 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15975 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15976 * aclocal.m4: Regenerated.
15977 * config.in: Regenerated.
15978 * configure: Regenerated.
15979 * configure.in: Check for proc_service.h, sys/procfs.h,
15980 thread_db.h, and linux/elf.h headrs.
15981 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15982 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15983 Check for -lthread_db and thread support.
15984 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15985 PowerPC, and SuperH.
15986 * i387-fp.c: Constify arguments.
15987 * i387-fp.h: Likewise.
15988 * inferiors.c: (struct thread_info): Renamed from
15989 `struct inferior_info'. Remove PID member. Use generic inferior
15990 list header. All uses updated.
15991 (inferiors, signal_pid): Removed.
15992 (all_threads): New variable.
15993 (get_thread): Define.
15994 (add_inferior_to_list): New function.
15995 (for_each_inferior): New function.
15996 (change_inferior_id): New function.
15997 (add_inferior): Removed.
15998 (remove_inferior): New function.
15999 (add_thread): New function.
16000 (free_one_thread): New function.
16001 (remove_thread): New function.
16002 (clear_inferiors): Use for_each_inferior and free_one_thread.
16003 (find_inferior): New function.
16004 (find_inferior_id): New function.
16005 (inferior_target_data): Update argument type.
16006 (set_inferior_target_data): Likewise.
16007 (inferior_regcache_data): Likewise.
16008 (set_inferior_regcache_data): Likewise.
16009 * linux-low.c (linux_bp_reinsert): Remove.
16010 (all_processes, stopping_threads, using_thrads)
16011 (struct pending_signals, debug_threads, pid_of): New.
16012 (inferior_pid): Replace with macro.
16013 (struct inferior_linux_data): Remove.
16014 (get_stop_pc, add_process): New functions.
16015 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16016 Use add_process and add_thread.
16017 (linux_attach_lwp): New function, based on old linux_attach. Use
16018 add_process and add_thread. Set stop_expected for new threads.
16019 (linux_attach): New function.
16020 (linux_kill_one_process): New function.
16021 (linux_kill): Kill all LWPs.
16022 (linux_thread_alive): Use find_inferior_id.
16023 (check_removed_breakpoints, status_pending_p): New functions.
16024 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16025 Update. Use WNOHANG. Wait for cloned processes also. Update process
16026 struct for the found process.
16027 (linux_wait_for_event): New function.
16028 (linux_wait): Use it. Support LWPs.
16029 (send_sigstop, wait_for_sigstop, stop_all_processes)
16030 (linux_resume_one_process, linux_continue_one_process): New functions.
16031 (linux_resume): Support LWPs.
16032 (REGISTER_RAW_SIZE): Remove.
16033 (fetch_register): Use register_size instead. Call supply_register.
16034 (usr_store_inferior_registers): Likewise. Call collect_register.
16035 Fix recursive case.
16036 (regsets_fetch_inferior_registers): Improve error message.
16037 (regsets_store_inferior_registers): Add debugging.
16038 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16039 (unstopped_p, linux_signal_pid): New functions.
16040 (linux_target_ops): Add linux_signal_pid.
16041 (linux_init_signals): New function.
16042 (initialize_low): Call it. Initialize using_threads.
16043 * regcache.c (inferior_regcache_data): Add valid
16044 flag.
16045 (get_regcache): Fetch registers lazily. Add fetch argument
16046 and update all callers.
16047 (regcache_invalidate_one, regcache_invalidate): New
16048 functions.
16049 (new_register_cache): Renamed from create_register_cache.
16050 Return the new regcache.
16051 (free_register_cache): Change argument to a void *.
16052 (registers_to_string, registers_from_string): Call get_regcache
16053 with fetch flag set.
16054 (register_data): Make static. Pass fetch flag to get_regcache.
16055 (supply_register): Call get_regcache with fetch flag clear.
16056 (collect_register): Call get_regcache with fetch flag set.
16057 (collect_register_as_string): New function.
16058 * regcache.h: Update.
16059 * remote-utils.c (putpkt): Flush after debug output and use
16060 stderr.
16061 Handle input interrupts while waiting for an ACK.
16062 (input_interrupt): Use signal_pid method.
16063 (getpkt): Flush after debug output and use stderr.
16064 (outreg): Use collect_register_as_string.
16065 (new_thread_notify, dead_thread_notify): New functions.
16066 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16067 and general_thread.
16068 (look_up_one_symbol): Flush after debug output.
16069 * server.c (step_thread, server_waiting): New variables.
16070 (start_inferior): Don't use signal_pid. Update call to mywait.
16071 (attach_inferior): Update call to mywait.
16072 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16073 (main): Don't fetch/store registers explicitly. Use
16074 set_desired_inferior. Support proposed ``Hs'' packet. Update
16075 calls to mywait.
16076 * server.h: Update.
16077 (struct inferior_list, struct_inferior_list_entry): New.
16078 * target.c (set_desired_inferior): New.
16079 (write_inferior_memory): Constify.
16080 (mywait): New function.
16081 * target.h: Update.
16082 (struct target_ops): New signal_pid method.
16083 (mywait): Removed macro, added prototype.
16084
16085 * linux-low.h (regset_func): Removed.
16086 (regset_fill_func, regset_store_func): New.
16087 (enum regset_type): New.
16088 (struct regset_info): Add type field. Use new operation types.
16089 (struct linux_target_ops): stop_pc renamed to get_pc.
16090 Add decr_pc_after_break and breakpoint_at.
16091 (get_process, get_thread_proess, get_process_thread)
16092 (strut process_info, all_processes, linux_attach_lwp)
16093 (thread_db_init): New.
16094
16095 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16096 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16097 (the_low_target): Add new members.
16098 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16099 (i386_store_fpxregset): Constify.
16100 (target_regsets): Add new kind identifier.
16101 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16102 (i386_set_pc): Add debugging.
16103 (i386_breakpoint_at): New function.
16104 (the_low_target): Add new members.
16105 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16106 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16107 (mips_breakpoint_at): New.
16108 (the_low_target): Add new members.
16109 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16110 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16111 (the_low_target): Add new members.
16112 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16113 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16114 (the_low_target): Add new members.
16115 * linux-x86-64-low.c (target_regsets): Add new kind
16116 identifier.
16117
161182002-05-15 Daniel Jacobowitz <drow@mvista.com>
16119
16120 From Martin Pool <mbp@samba.org>:
16121 * server.c (gdbserver_usage): New function.
16122 (main): Call it.
16123
161242002-05-14 Daniel Jacobowitz <drow@mvista.com>
16125
16126 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16127 stop_at -> stop_pc.
16128
161292002-05-04 Andrew Cagney <ac131313@redhat.com>
16130
16131 * Makefile.in: Remove obsolete code.
16132
161332002-04-24 Michal Ludvig <mludvig@suse.cz>
16134
16135 * linux-low.c (regsets_fetch_inferior_registers),
16136 (regsets_store_inferior_registers): Removed cast to int from
16137 ptrace() calls.
16138 * regcache.h: Added declaration of struct inferior_info.
16139
161402002-04-20 Daniel Jacobowitz <drow@mvista.com>
16141
16142 * inferiors.c (struct inferior_info): Add regcache_data.
16143 (add_inferior): Call create_register_cache.
16144 (clear_inferiors): Call free_register_cache.
16145 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16146 * regcache.c (struct inferior_regcache_data): New.
16147 (registers): Remove.
16148 (get_regcache): New function.
16149 (create_register_cache, free_register_cache): New functions.
16150 (set_register_cache): Don't initialize the register cache here.
16151 (registers_to_string, registers_from_string, register_data): Call
16152 get_regcache.
16153 * regcache.h: Add prototypes.
16154 * server.h: Likewise.
16155
161562002-04-20 Daniel Jacobowitz <drow@mvista.com>
16157
16158 * mem-break.c: New file.
16159 * mem-break.h: New file.
16160 * Makefile.in: Add mem-break.o rule; update server.h
16161 dependencies.
16162 * inferiors.c (struct inferior_info): Add target_data
16163 member.
16164 (clear_inferiors): Free target_data member if set.
16165 (inferior_target_data, set_inferior_target_data): New functions.
16166 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16167 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16168 * linux-low.c (linux_bp_reinsert): New variable.
16169 (struct inferior_linux_data): New.
16170 (linux_create_inferior): Use set_inferior_target_data.
16171 (linux_attach): Likewise. Call add_inferior.
16172 (linux_wait_for_one_inferior): New function.
16173 (linux_wait): Call it.
16174 (linux_write_memory): Add const.
16175 (initialize_low): Call set_breakpoint_data.
16176 * linux-low.h (struct linux_target_ops): Add breakpoint
16177 handling members.
16178 * server.c (attach_inferior): Remove extra add_inferior
16179 call.
16180 * server.h: Include mem-break.h. Update inferior.c
16181 prototypes.
16182 * target.c (read_inferior_memory)
16183 (write_inferior_memory): New functions.
16184 * target.h (read_inferior_memory)
16185 (write_inferior_memory): Change macros to prototypes.
16186 (struct target_ops): Update comments. Add const to write_memory
16187 definition.
16188
161892002-04-11 Daniel Jacobowitz <drow@mvista.com>
16190
16191 * linux-low.c (usr_store_inferior_registers): Support
16192 registers which are allowed to fail to store.
16193 * linux-low.h (linux_target_ops): Likewise.
16194 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16195 (ppc_cannot_store_register): FPSCR may not be storable.
16196
161972002-04-09 Daniel Jacobowitz <drow@mvista.com>
16198
16199 * server.h: Include <string.h> if HAVE_STRING_H.
16200 * ChangeLog: Correct paths in last ChangeLog entry.
16201
162022002-04-09 Daniel Jacobowitz <drow@mvista.com>
16203
16204 * linux-low.h: Remove obsolete prototypes.
16205 (struct linux_target_ops): New.
16206 (extern the_low_target): New.
16207 * linux-low.c (num_regs, regmap): Remove declarations.
16208 (register_addr): Use the_low_target explicitly.
16209 (fetch_register): Likewise.
16210 (usr_fetch_inferior_registers): Likewise.
16211 (usr_store_inferior_registers): Likewise.
16212 * linux-arm-low.c (num_regs): Remove.
16213 (arm_num_regs): Define.
16214 (arm_regmap): Renamed from regmap, made static.
16215 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16216 made static.
16217 (arm_cannot_store_register): Renamed from cannot_store_register,
16218 made static.
16219 (the_low_target): New.
16220 * linux-i386-low.c (num_regs): Remove.
16221 (i386_num_regs): Define.
16222 (i386_regmap): Renamed from regmap, made static.
16223 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16224 made static.
16225 (i386_cannot_store_register): Renamed from cannot_store_register,
16226 made static.
16227 (the_low_target): New.
16228 * linux-ia64-low.c (num_regs): Remove.
16229 (ia64_num_regs): Define.
16230 (ia64_regmap): Renamed from regmap, made static.
16231 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16232 made static.
16233 (ia64_cannot_store_register): Renamed from cannot_store_register,
16234 made static.
16235 (the_low_target): New.
16236 * linux-m68k-low.c (num_regs): Remove.
16237 (m68k_num_regs): Define.
16238 (m68k_regmap): Renamed from regmap, made static.
16239 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16240 made static.
16241 (m68k_cannot_store_register): Renamed from cannot_store_register,
16242 made static.
16243 (the_low_target): New.
16244 * linux-mips-low.c (num_regs): Remove.
16245 (mips_num_regs): Define.
16246 (mips_regmap): Renamed from regmap, made static.
16247 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16248 made static.
16249 (mips_cannot_store_register): Renamed from cannot_store_register,
16250 made static.
16251 (the_low_target): New.
16252 * linux-ppc-low.c (num_regs): Remove.
16253 (ppc_num_regs): Define.
16254 (ppc_regmap): Renamed from regmap, made static.
16255 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16256 made static.
16257 (ppc_cannot_store_register): Renamed from cannot_store_register,
16258 made static.
16259 (the_low_target): New.
16260 * linux-s390-low.c (num_regs): Remove.
16261 (s390_num_regs): Define.
16262 (s390_regmap): Renamed from regmap, made static.
16263 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16264 made static.
16265 (s390_cannot_store_register): Renamed from cannot_store_register,
16266 made static.
16267 (the_low_target): New.
16268 * linux-sh-low.c (num_regs): Remove.
16269 (sh_num_regs): Define.
16270 (sh_regmap): Renamed from regmap, made static.
16271 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16272 made static.
16273 (sh_cannot_store_register): Renamed from cannot_store_register,
16274 made static.
16275 (the_low_target): New.
16276 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16277 (the_low_target): New.
16278
162792002-04-09 Daniel Jacobowitz <drow@mvista.com>
16280
16281 * Makefile.in: Add stamp-h target.
16282 * configure.in: Create stamp-h.
16283 * configure: Regenerated.
16284
162852002-04-09 Daniel Jacobowitz <drow@mvista.com>
16286
16287 * inferiors.c: New file.
16288 * target.c: New file.
16289 * target.h: New file.
16290 * Makefile.in: Add target.o and inferiors.o. Update
16291 dependencies.
16292 * linux-low.c (inferior_pid): New static variable,
16293 moved from server.c.
16294 (linux_create_inferior): Renamed from create_inferior.
16295 Call add_inferior. Return 0 on success instead of a PID.
16296 (linux_attach): Renamed from myattach.
16297 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16298 (linux_thread_alive): Renamed from mythread_alive.
16299 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16300 child dies.
16301 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16302 (regsets_store_inferior_registers): Correct error message.
16303 Add missing ``return 0''.
16304 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16305 (linux_store_registers): Renamed from store_inferior_registers.
16306 (linux_read_memory): Renamed from read_inferior_memory.
16307 (linux_write_memory): Renamed from write_inferior_memory.
16308 (linux_target_ops): New structure.
16309 (initialize_low): Call set_target_ops ().
16310 * remote-utils.c (unhexify): New function.
16311 (hexify): New function.
16312 (input_interrupt): Send signals to ``signal_pid''.
16313 * server.c (inferior_pid): Remove.
16314 (start_inferior): Update create_inferior call.
16315 (attach_inferior): Call add_inferior.
16316 (handle_query): New function.
16317 (main): Call handle_query for `q' packets.
16318 * server.h: Include "target.h". Remove obsolete prototypes.
16319 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16320
163212002-04-09 Daniel Jacobowitz <drow@mvista.com>
16322
16323 * Makefile.in: Add WARN_CFLAGS. Update configury
16324 dependencies.
16325 * configure.in: Check for <string.h>
16326 * configure: Regenerate.
16327 * config.in: Regenerate.
16328 * gdbreplay.c: Include needed system headers.
16329 (remote_open): Remove strchr prototype.
16330 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16331 * regcache.c (supply_register): Change buf argument to const void *.
16332 (supply_register_by_name): Likewise.
16333 (collect_register): Change buf argument to void *.
16334 (collect_register_by_name): Likewise.
16335 * regcache.h: Add missing prototypes.
16336 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16337 * server.c (handle_query): New function.
16338 (attached): New static variable, moved out of main.
16339 (main): Quiet longjmp clobber warnings.
16340 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16341 * utils.c (error): Remove NORETURN.
16342 (fatal): Likewise.
This page took 1.971398 seconds and 4 git commands to generate.