]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Testsuite: fully migrate to use_gdb_stub convenience func
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
f69c5afb
AA
12018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
2
3 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
4
ce29f843
AA
52018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6
7 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
8 S390_TDESC_GS.
9 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
10 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
11 and init_registers_s390_gs_linux64.
12
c49bd90b
AA
132018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
14
15 * linux-s390-low.c (s390_fill_gs): Remove function.
16 (s390_fill_gsbc): Remove function.
17 (s390_regsets): Set fill functions for the guarded storage regsets
18 to NULL.
19
7edb9bd3
AA
202018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
21
22 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
23 the word size. Add comment.
24 (s390_get_wordsize): New function.
25 (s390_arch_setup): No longer select a temporary tdesc to fetch the
26 pswm with it. Instead, use s390_get_wordsize to determine the
27 word size first and derive the correct tdesc from that directly.
28
39be3c7e
SM
292018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
30
31 * Makefile.in: Include silent-rules.mk.
32 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
33 (COMPILE): Add ECHO_CXX.
34 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
35 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
36 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
37 (version-generated.c): Add ECHO_GEN.
38 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
39 (IPAGENT_COMPILE): Add ECHO_CXX.
40 (%-generated.c): Add ECHO_REGDAT.
41
3ae9ce5d
TT
422018-03-14 Tom Tromey <tom@tromey.com>
43
44 PR cli/14977:
45 * ax.c (ax_printf): Special case for NULL.
46
e6a58aa8
SM
472018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
48
49 * linux-low.c (linux_qxfer_libraries_svr4): Use
50 xml_escape_text_append.
51
f6e8a41e
SM
522018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
53
54 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
55
b9671caf
SM
562018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
57
58 * server.c (handle_general_set): Remove unnecessary xstrdup.
59
e80aaf61
SM
602018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
61
62 * server.c (parse_debug_format_options): Adjust to
63 delim_string_to_char_ptr_vec changes.
64 * thread-db.c (thread_db_load_search): Adjust to
65 dirnames_to_char_ptr_vec changes.
66
b1223e78
MM
672018-03-01 Markus Metzger <markus.t.metzger@intel.com>
68
69 * target.h (target_enable_btrace, target_disable_btrace)
70 (target_read_btrace, target_read_btrace_conf): Turn macro into
71 inline function. Throw error if target method is not defined.
72 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
73 check for btrace target method. Be prepared to handle exceptions
74 from btrace target methods.
75
81561546
SDJ
762018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
77
78 * server.c (captured_main): Change order of error message printed
79 when the current working directory cannot be found.
80
25e3c82c
SDJ
812018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
82
83 * server.c: Include "filenames.h" and "pathstuff.h".
84 (program_name): Delete variable.
85 (program_path): New anonymous class.
86 (get_exec_wrapper): Use "program_path" instead of
87 "program_name".
88 (handle_v_run): Likewise.
89 (captured_main): Likewise.
90 (process_serial_event): Likewise.
91
b4987c95
SDJ
922018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
93
94 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
95 (OBJS): Add "pathstuff.o".
96 * server.c (current_directory): New global variable.
97 (captured_main): Initialize "current_directory".
98
f46cd62a
AH
992018-02-26 Alan Hayward <alan.hayward@arm.com>
100
101 * tdesc.c: Use common/tdesc.h.
102 * tdesc.h: Likewise.
103
a543c5ca
AH
1042018-02-20 Alan Hayward <alan.hayward@arm.com>
105 Simon Marchi <simon.marchi@ericsson.com>
106
107 * Makefile.in: Switch order of make rules.
108
b5884fa7
AH
1092018-02-19 Alan Hayward <alan.hayward@arm.com>
110
111 * Makefile.in: Add common directory in build.
112 * configure.ac: Add common reference.
113 * configure: Regenerate.
114
de6242d3
MM
1152018-02-09 Markus Metzger <markus.t.metzger@intel.com>
116
117 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
118 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
119 * spu-low.c (spu_target_ops): Likewise.
120 * win32-low.c (win32_target_ops): Likewise.
121 * server.c (supported_btrace_packets): Report packets unconditionally.
122 * target.h (target_ops) <supports_btrace>: Remove.
123 (target_supports_btrace): Remove.
124
9ee23a85
MM
1252018-02-09 Markus Metzger <markus.t.metzger@intel.com>
126
127 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
128 (handle_btrace_disable): Change return type to void. Use exceptions
129 to report errors.
130 (handle_btrace_general_set): Catch exception and copy message to
131 return message.
132
8ce47547
TT
1332018-02-08 Tom Tromey <tom@tromey.com>
134
135 * linux-low.c (install_software_single_step_breakpoints): Use
136 make_scoped_restore.
137 * inferiors.c (make_cleanup_restore_current_thread): Remove.
138 (do_restore_current_thread_cleanup): Remove.
139 * gdbthread.h (make_cleanup_restore_current_thread): Don't
140 declare.
141
45dd3607
TT
1422018-02-08 Tom Tromey <tom@tromey.com>
143
144 * mem-break.c (set_raw_breakpoint_at): Use
145 gdb::unique_xmalloc_ptr.
146
e671cd59
PA
1472018-01-30 Pedro Alves <palves@redhat.com>
148
149 PR gdb/13211
150 * target.c (target_terminal::terminal_state): Rename to ...
151 (target_terminal::m_terminal_state): ... this.
152
a0aad537
JC
1532018-01-19 James Clarke <jrtc27@jrtc27.com>
154
155 * linux-low.c (handle_extended_wait): Surround call to
156 thread_db_notice_clone with #ifdef USE_THREAD_DB.
157
4d9b86e1
SM
1582018-01-17 Simon Marchi <simon.marchi@ericsson.com>
159
160 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
161 linux_ptrace_attach_fail_reason_string now returning an
162 std::string.
163 (linux_attach): Likewise.
164 * thread-db.c (attach_thread): Likewise.
165
f517c180
EA
1662018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
167
168 PR gdb/21559
169 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
170 checking for fs_base/gs_base fields in struct user_regs_struct.
171 * configure: Regenerate.
172
9a70f35c
YQ
1732018-01-16 Yao Qi <yao.qi@linaro.org>
174
175 PR gdb/18749
176 * linux-low.c (fetch_register): Call supply_register instead of
177 error.
178
605fd3c6
YQ
1792018-01-08 Yao Qi <yao.qi@linaro.org>
180 Simon Marchi <simon.marchi@ericsson.com>
181
182 * Makefile.in (OBS): Remove selftest.o.
183 * configure.ac: Set srv_selftest_objs if $development is true.
184 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
185 * configure: Re-generated.
186 * server.c (captured_main): Wrap variable selftest_filter with
187 GDB_SELF_TEST.
188
2cc05030
SM
1892018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
190
191 * server.c (parse_debug_format_options): Return std::string.
192 (handle_monitor_command, captured_main): Adjust.
193
e379cee6
PA
1942018-01-05 Pedro Alves <palves@redhat.com>
195
196 PR gdb/18653
197 * server.c (captured_main): Pass quiet=false to
198 save_original_signals_state.
199
82e1e79a
JB
2002018-01-01 Joel Brobecker <brobecker@adacore.com>
201
202 * gdbreplay.c (gdbreplay_version): Update copyright year in
203 version message.
204 * server.c (gdbserver_version): Likewise.
205
8e481c3b
TT
2062017-12-08 Tom Tromey <tom@tromey.com>
207
208 * ax.c (ax_printf): Update.
209
a8806230
YQ
2102017-12-07 Yao Qi <yao.qi@linaro.org>
211
212 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
213 aarch64_linux_read_description.
214 * linux-amd64-ipa.c (idx2mask): New array.
215 (get_ipa_tdesc): Move idx2mask out.
216 (initialize_low_tracepoint): Initialize target descriptions.
217 * linux-i386-ipa.c (idx2mask): New array.
218 (get_ipa_tdesc): Move idx2mask out.
219 (initialize_low_tracepoint): Initialize target descriptions.
220
d4a0e8b5
SM
2212017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
222
223 * tdesc.c (struct tdesc_type): Change return type.
224 (tdesc_add_flag): Change parameter type.
225 (tdesc_add_bitfield): Likewise.
226 (tdesc_add_field): Likewise.
227 (tdesc_set_struct_size): Likewise.
228
798a7429
SM
2292017-12-05 Simon Marchi <simon.marchi@ericsson.com>
230
231 * regcache.c (registers_to_string): Remove unused variable.
232
c0e15c9b
SM
2332017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
234
235 * inferiors.c (for_each_inferior_with_data): Remove.
236 * inferiors.h (for_each_inferior_with_data): Remove.
237 * server.c (handle_qxfer_threads_worker): Change parameter type.
238 (handle_qxfer_threads_proper): Use for_each_thread.
239
f0045347
SM
2402017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
241
242 * inferiors.c (for_each_inferior): Remove.
243 (clear_inferiors): Use for_each_thread.
244 * inferiors.h (for_each_inferior): Remove.
245 * linux-low.c (linux_wait_for_event_filtered): Use
246 for_each_thread.
247 (linux_stabilize_threads): Likewise.
248 * regcache.c (regcache_release): Likewise.
249 * server.c (gdb_wants_all_threads_stopped): Likewise.
250 (clear_pending_status_callback): Remove.
251 (handle_status): Use for_each_thread.
252 (captured_main): Likewise.
253 * win32-low.c (child_init_thread_list): Likewise.
254 (win32_clear_inferiors): Likewise.
255 (fake_breakpoint_event): Likewise.
256
9521758b
SM
2572017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
258
259 * inferiors.h (find_inferior): Remove.
260 * inferiors.c (find_inferior): Remove.
261
8f86d7aa
SM
2622017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
263
264 * linux-low.c (resume_status_pending_p): Update comment.
265 (need_step_over_p): Update comment.
266
e2b44075
SM
2672017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
268
269 * linux-low.c (proceed_one_lwp): Return void, change parameter
270 type.
271 (unsuspend_and_proceed_one_lwp): Likewise.
272 (proceed_all_lwps): Use for_each_thread.
273 (unstop_all_lwps): Likewise.
274
c80825ff
SM
2752017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
276
277 * linux-low.c (linux_resume_one_thread): Return void, take
278 parameter directly.
279 (linux_resume): Use for_each_thread.
280
df3e4dbe
SM
2812017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
282
283 * linux-low.c (send_sigstop_callback): Return void, change
284 parameter type. Rename to...
285 (send_sigstop): ... this.
286 (suspend_and_send_sigstop_callback): Return void, change parameter
287 type. Rename to...
288 (suspend_and_send_sigstop): ... this.
289 (stop_all_lwps): Use for_each_thread.
290
5a6b0a41
SM
2912017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
292
293 * linux-low.c (lwp_running): Return bool, remove unused
294 argument.
295 (linux_stabilize_threads): Use find_thread.
296
39a64da5
SM
2972017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
298
299 * linux-low.c (select_singlestep_lwp_callback): Remove.
300 (count_events_callback): Remove.
301 (select_event_lwp_callback): Remove.
302 (select_event_lwp): Use find_thread/for_each_thread.
303
a1385b7b
SM
3042017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
305
306 * linux-low.c (not_stopped_callback): Return bool, take filter
307 argument directly.
308 (linux_wait_for_event_filtered): Use find_thread.
309 (linux_wait_1): Likewise.
310
454296a2
SM
3112017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
312
313 * linux-low.c (same_lwp): Remove.
314 (find_lwp_pid): Use find_thread.
315
6b2a85da
SM
3162017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
317
318 * linux-low.c (delete_lwp_callback): Remove.
319 (linux_mourn): Use for_each_thread.
320
798a38e8
SM
3212017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
322
323 * linux-low.c (linux_detach_lwp_callback): Return void, remove
324 args parameter, don't check for pid.
325 (linux_detach): Use for_each_thread.
326
e4eb0dec
SM
3272017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
328
329 * linux-low.c (struct counter): Remove.
330 (second_thread_of_pid_p): Remove.
331 (last_thread_of_process_p): Use find_thread.
332
83e1b6c1
SM
3332017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
334
335 * inferiors.c (find_inferior_in_random): Remove.
336 * inferiors.h (find_inferior_in_random): Remove.
337 * linux-low.c (status_pending_p_callback): Return bool, accept
338 parameter ptid directly.
339 (linux_wait_for_event_filtered): Use find_thread_in_random.
340 (linux_wait_1): Likewise.
341
8dc7b443
SM
3422017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
343
344 * inferiors.c (find_inferior_id): Remove.
345 (find_thread_ptid): Move implemention from find_inferior_id to
346 here.
347 * inferiors.h (find_inferior_id): Remove.
348 * server.c (handle_status): Use find_thread_ptid.
349 (process_serial_event): Likewise.
350 * thread-db.c (find_one_thread): Likewise.
351 (thread_db_thread_handle): Likewise.
352 * win32-low.c (thread_rec): Likewise.
353 (child_delete_thread): Likewise.
354 (win32_thread_alive): Likewise.
355 (get_child_debug_event): Likewise.
356
da25033c
SM
3572017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
358
359 * linux-mips-low.c (update_watch_registers_callback): Return
360 void, remove pid_p parameter, don't check for pid.
361 (mips_insert_point, mips_remove_point): Use for_each_thread.
362
c91bb56b
SM
3632017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
364
365 * lynx.low (lynx_delete_thread_callback): Remove.
366 (lynx_mourn): Use for_each_thread.
367
634a3254
SM
3682017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
369
370 * regcache.c (regcache_invalidate_one): Remove.
371 (regcache_invalidate_pid): use for_each_thread.
372
41272101
TT
3732017-11-26 Tom Tromey <tom@tromey.com>
374
375 * linux-low.c (linux_create_inferior): Update.
376
f5291a6f
UW
3772017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
378
379 * spu-low.c (spu_create_inferior): Fix typo in argument name.
380
6654d750
AH
3812017-11-24 Alan Hayward <alan.hayward@arm.com>
382
383 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
384 * linux-aarch64-low.c (initialize_low_arch): Call init func.
385 * linux-aarch64-tdesc-selftest.c: New file.
386 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
387
3882017-11-24 Alan Hayward <alan.hayward@arm.com>
389
390 * configure.srv: Add new file.
391 * linux-aarch64-low.c (initialize_low_arch): Call init func.
392 * linux-aarch64-tdesc-selftest.c: New file.
393 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
394
49bdb7ee
AH
3952017-11-24 Alan Hayward <alan.hayward@arm.com>
396
397 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
398 * linux-aarch64-low.c (initialize_low_arch): Remove init.
399 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
400
d6d7ce56
AH
4012017-11-24 Alan Hayward <alan.hayward@arm.com>
402
403 * configure.srv: Add new files.
404 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
405 aarch64_linux_read_description.
406 * linux-aarch64-low.c (aarch64_linux_read_description):
407 Merge with aarch64_arch_setup.
408 (aarch64_arch_setup): Call aarch64_linux_read_description.
409 * linux-aarch64-tdesc.c: New file.
410 * linux-aarch64-tdesc.h: New file.
411
506fe5f4
YQ
4122017-11-24 Yao Qi <yao.qi@linaro.org>
413
414 * configure.srv: Set $srv_regobj for tic6x-linux.
415 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
416 (tic6x_read_description): Move some code to tic6x_arch_setup.
417 (tic6x_tdesc_test): New function.
418 (initialize_low_arch): Call selftests::register_test.
419
29f9a567
YQ
4202017-11-22 Yao Qi <yao.qi@linaro.org>
421
422 * remote-utils.c (prepare_resume_reply): Use memcpy.
423
578290ec
SM
4242017-11-19 Simon Marchi <simon.marchi@ericsson.com>
425
426 * linux-low.c (kill_one_lwp_callback): Return void, take
427 argument directly, don't filter on pid.
428 (linux_kill): Use for_each_thread.
429
eca55aec
SM
4302017-11-19 Simon Marchi <simon.marchi@ericsson.com>
431
432 * linux-low.c (need_step_over_p): Return bool, remove dummy
433 argument.
434 (linux_resume, proceed_all_lwps): Use find_thread.
435
25c28b4d
SM
4362017-11-19 Simon Marchi <simon.marchi@ericsson.com>
437
438 * linux-low.c (resume_status_pending_p): Return bool, remove
439 flag_p argument.
440 (linux_resume): Use find_thread.
441
5fdda392
SM
4422017-11-19 Simon Marchi <simon.marchi@ericsson.com>
443
444 * linux-low.c (struct thread_resume_array): Remove.
445 (linux_set_resume_request): Return void, take arguments
446 directly.
447 (linux_resume): Use for_each_thread.
448
fcb056a5
SM
4492017-11-19 Simon Marchi <simon.marchi@ericsson.com>
450
451 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
452 return bool, remove data argument.
453 (linux_stabilize_threads): Use find_thread.
454
139720c5
SM
4552017-11-19 Simon Marchi <simon.marchi@ericsson.com>
456
457 * linux-low.c (unsuspend_one_lwp): Remove.
458 (unsuspend_all_lwps): Use for_each_thread, inline code from
459 unsuspend_one_lwp.
460
6d1e5673
SM
4612017-11-19 Simon Marchi <simon.marchi@ericsson.com>
462
463 * gdbthread.h (find_thread): Add overload with ptid_t filter.
464 * linux-low.c (struct iterate_over_lwps_args): Remove.
465 (iterate_over_lwps_filter): Remove.
466 (iterate_over_lwps): Use find_thread.
467
bbf550d5
SM
4682017-11-19 Simon Marchi <simon.marchi@ericsson.com>
469
470 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
471 (linux_handle_new_gdb_connection): Use for_each_thread, inline
472 code from reset_lwp_ptrace_options_callback.
473
00192f77
SM
4742017-11-19 Simon Marchi <simon.marchi@ericsson.com>
475
476 * linux-arm-low.c (struct update_registers_data): Remove.
477 (update_registers_callback): Return void, take arguments
478 directly, don't check thread's pid.
479 (arm_insert_point, arm_remove_point): Use for_each_thread.
480
2bee2b6c
SM
4812017-11-19 Simon Marchi <simon.marchi@ericsson.com>
482
483 * win32-low.c (continue_one_thread): Return void, take argument
484 directly.
485 (child_continue): Use for_each_thread.
486
0b360f19
SM
4872017-11-19 Simon Marchi <simon.marchi@ericsson.com>
488
489 * win32-i386-low.c (update_debug_registers_callback): Rename
490 to ...
491 (update_debug_registers): ... this, return void, remove pid_p arg.
492 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
493
f27866ba
SM
4942017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
495
496 * inferiors.h (struct process_info): Add constructor, initialize
497 fields..
498 <syscalls_to_catch>: Change type to std::vector<int>.
499 * inferiors.c (add_process): Allocate process_info with new.
500 (remove_process): Free process_info with delete.
501 * linux-low.c (handle_extended_wait): Adjust.
502 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
503 * server.c (handle_general_set): Adjust.
504
e849ea89
PA
5052017-11-16 Pedro Alves <palves@redhat.com>
506
507 * remote-utils.c (remote_close): Block SIGIO signals instead of
508 uninstalling the SIGIO handler.
509
1d0aa65c
AH
5102017-11-16 Alan Hayward <alan.hayward@arm.com>
511
512 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
513
3491a34c
YQ
5142017-11-16 Yao Qi <yao.qi@linaro.org>
515
516 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
517 (tic6x_store_gregset): Likewise.
518 (tic6x_usrregs_info): Move it up.
519
a602f924
AH
5202017-11-15 Alan Hayward <alan.hayward@arm.com>
521
522 * Makefile.in: Update arch rules.
523 * configure.srv: Explicitly mark arch/ files.
524
5616b6c3
AS
5252017-11-13 Andreas Schwab <schwab@suse.de>
526
527 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
528 function.
529 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
530
d1928160
PA
5312017-11-06 Pedro Alves <palves@redhat.com>
532
533 * config.in, configure: Regenerate.
534
bac608e7
SM
5352017-10-27 Simon Marchi <simon.marchi@ericsson.com>
536
537 * target.c (struct thread_search): Remove.
538 (thread_search_callback): Remove.
539 (prepare_to_access_memory): Use for_each_thread instead of
540 find_inferior. Inline code from thread_search_callback.
541
eaddb425
SM
5422017-10-27 Simon Marchi <simon.marchi@ericsson.com>
543
544 * server.c (struct visit_actioned_threads_data): Remove.
545 (visit_actioned_threads): Change prototype to take arguments
546 directly.
547 (resume): Use find_thread instead of find_inferior.
548
99078d34
SM
5492017-10-27 Simon Marchi <simon.marchi@ericsson.com>
550
551 * server.c (queue_stop_reply_callback): Change prototype, return
552 void.
553 (find_status_pending_thread_callback): Remove.
554 (handle_status): Replace find_inferior with find_thread and
555 for_each_thread.
556
cc628f3d
AH
5572017-10-25 Alan Hayward <alan.hayward@arm.com>
558
559 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
560 with REGNO.
561 (aarch64_store_gregset): Likewise.
562 (aarch64_fill_fpregset): Likewise.
563 (aarch64_store_fpregset): Likewise.
564
4d3bb80e
SM
5652017-10-21 Simon Marchi <simon.marchi@ericsson.com>
566
567 * gdbthread.h (find_thread, for_each_thread): New functions.
568 * inferiors.c (thread_of_pid): Remove.
569 (find_any_thread_of_pid): Use find_thread.
570 * linux-low.c (num_lwps): Use for_each_thread.
571
7a7cdfa0
YQ
5722017-10-17 Yao Qi <yao.qi@linaro.org>
573
574 * Makefile.in: Remove one rule.
575 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
576
e675d170
YQ
5772017-10-17 Yao Qi <yao.qi@linaro.org>
578
579 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
580 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
581
7eb4e0f9
YQ
5822017-10-17 Yao Qi <yao.qi@linaro.org>
583
584 * configure.srv: Rename arm.o with arch/arm.o.
585
60d6cfc9
YQ
5862017-10-17 Yao Qi <yao.qi@linaro.org>
587
588 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
589 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
590 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
591 (arch-i386.o, arch-amd64.o): Remove rules.
592 (arch/%.o): New rule.
593 Update POSTCOMPILE and COMPILE.pre.
594 * configure.ac: Invoke AC_CONFIG_COMMANDS.
595 * configure: Re-generated.
596 * configure.srv: Replace arch-i386.o with arch/i386.o.
597 Replace arch-amd64.o with arch/amd64.o.
598
5bfda255
YQ
5992017-10-16 Yao Qi <yao.qi@linaro.org>
600
601 * configure: Regenerated.
602
9c80ecd6
SM
6032017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
604
605 * inferiors.h: (struct inferior_list): Remove.
606 (struct inferior_list_entry); Remove.
607 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
608 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
609 get_first_inferior): Remove.
610 (for_each_inferior, for_each_inferior_with_data, find_inferior,
611 find_inferior_id, find_inferior_in_random): Change signature.
612 * inferiors.c (all_threads): Change type to
613 std::list<thread_info *>.
614 (get_thread): Remove macro.
615 (find_inferior, find_inferior_id): Change signature, implement
616 using find_thread.
617 (find_inferior_in_random): Change signature, implement using
618 find_thread_in_random.
619 (for_each_inferior, for_each_inferior_with_data): Change
620 signature, implement using for_each_thread.
621 (add_inferior_to_list, remove_inferior): Remove.
622 (add_thread, get_first_thread, thread_of_pid,
623 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
624 (get_first_inferior, one_inferior_p, clear_inferior_list):
625 Remove.
626 (clear_inferiors, get_thread_process): Update.
627 * gdbthread.h: Include <list>.
628 (struct thread_info) <entry>: Remove field.
629 <id>: New field.
630 (all_threads): Change type to std::list<thread_info *>.
631 (get_first_inferior): Add doc.
632 (find_thread, for_each_thread, find_thread_in_random): New
633 functions.
634 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
635 * linux-arm-low.c (update_registers_callback): Update.
636 * linux-low.c (second_thread_of_pid_p): Update.
637 (kill_one_lwp_callback, linux_detach_lwp_callback,
638 delete_lwp_callback, status_pending_p_callback, same_lwp,
639 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
640 iterate_over_lwps, not_stopped_callback,
641 resume_stopped_resumed_lwps, count_events_callback,
642 select_singlestep_lwp_callback, select_event_lwp_callback,
643 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
644 suspend_and_send_sigstop_callback, wait_for_sigstop,
645 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
646 lwp_running, linux_set_resume_request, resume_status_pending_p,
647 need_step_over_p, start_step_over, linux_resume_one_thread,
648 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
649 reset_lwp_ptrace_options_callback): Update.
650 * linux-mips-low.c (update_watch_registers_callback): Update.
651 * regcache.c (regcache_invalidate_one, regcache_invalidate):
652 Update.
653 (free_register_cache_thread_one): Remove.
654 (regcache_release): Update.
655 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
656 handle_qxfer_threads_worker): Update.
657 (handle_query): Update, use list iterator.
658 (visit_actioned_threads, handle_pending_status,
659 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
660 clear_pending_status_callback, set_pending_status_callback,
661 find_status_pending_thread_callback, handle_status,
662 process_serial_event): Update.
663 * target.c (thread_search_callback): Update.
664 * thread-db.c (thread_db_get_tls_address): Update.
665 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
666 Update.
667 * win32-i386-low.c (update_debug_registers_callback): Update.
668 * win32-low.c (delete_thread_info, child_delete_thread,
669 continue_one_thread, suspend_one_thread,
670 get_child_debug_event): Adjust.
671
9179355e
SM
6722017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
673
674 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
675 * inferiors.h: Include <list>.
676 (struct process_info) <entry>: Remove field.
677 <pid>: New field.
678 (pid_of): Change macro to function.
679 (ptid_of, lwpid_of): Remove macro.
680 (all_processes): Change type to std::list<process_info *>.
681 (ALL_PROCESSES): Remove macro.
682 (for_each_process, find_process): New function.
683 * inferiors.c (all_processes): Change type to
684 std::list<process_info *>.
685 (find_thread_process): Adjust.
686 (add_process): Likewise.
687 (remove_process): Likewise.
688 (find_process_pid): Likewise.
689 (get_first_process): Likewise.
690 (started_inferior_callback): Remove.
691 (have_started_inferiors_p): Adjust.
692 (attached_inferior_callback): Remove.
693 (have_attached_inferiors_p): Adjust.
694 * linux-low.c (check_zombie_leaders): Likewise.
695 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
696 (x86_linux_update_xmltarget): Adjust.
697 * server.c (handle_query): Likewise.
698 (gdb_reattached_process): Remove.
699 (handle_status): Adjust.
700 (kill_inferior_callback): Likewise.
701 (detach_or_kill_inferior): Remove.
702 (print_started_pid): Likewise.
703 (print_attached_pid): Likewise.
704 (detach_or_kill_for_exit): Update.
705 (process_serial_event): Likewise.
706 * linux-arm-low.c (arm_new_fork): Likewise.
707
c9cb8905
SM
7082017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
709
710 * dll.h: Include <list>.
711 (struct dll_info): Add constructor.
712 <entry>: Remove field.
713 (all_dlls): Change type to std::list<dll_info>.
714 * dll.c: Include <algorithm>.
715 (get_dll): Remove macro.
716 (all_dlls): Change type to std::list<dll_info *>.
717 (free_one_dll): Remove.
718 (match_dll): Likewise.
719 (loaded_dll): Adjust.
720 (unloaded_dll): Adjust to all_dlls type change, use
721 std::find_if. Inline code from match_dll.
722 (clear_dlls): Adjust to all_dlls type change.
723 * server.c (emit_dll_description): Remove.
724 (handle_qxfer_libraries): Adjust to all_dlls type change,
725 integrate emit_dll_description's functionality.
726
04ec7890
SM
7272017-10-12 Simon Marchi <simon.marchi@ericsson.com>
728
729 * linux-low.h (struct linux_target_ops) <delete_process>: New
730 field.
731 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
732 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
733 (struct linux_target_ops): Add delete_process callback.
734 * linux-arm-low.c (arm_delete_process): New.
735 (struct linux_target_ops): Add delete_process callback.
736 * linux-bfin-low.c (struct linux_target_ops): Likewise.
737 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
738 * linux-m32r-low.c (struct linux_target_ops): Likewise.
739 * linux-mips-low.c (mips_linux_delete_process): New.
740 (struct linux_target_ops): Add delete_process callback.
741 * linux-ppc-low.c (struct linux_target_ops): Likewise.
742 * linux-s390-low.c (struct linux_target_ops): Likewise.
743 * linux-sh-low.c (struct linux_target_ops): Likewise.
744 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
745 * linux-tile-low.c (struct linux_target_ops): Likewise.
746 * linux-x86-low.c (x86_linux_delete_process): New.
747 (struct linux_target_ops): Add delete_process callback.
748 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
749
466eecee
SM
7502017-10-12 Simon Marchi <simon.marchi@ericsson.com>
751
752 * linux-aarch64-low.c (the_low_target): Add thread delete
753 callback.
754 * linux-arm-low.c (arm_delete_thread): New function.
755 (the_low_target): Add thread delete callback.
756 * linux-bfin-low.c (the_low_target): Likewise.
757 * linux-crisv32-low.c (the_low_target): Likewise.
758 * linux-low.c (delete_lwp): Invoke delete_thread callback if
759 set.
760 * linux-low.h (struct linux_target_ops) <delete_thread>: New
761 field.
762 * linux-m32r-low.c (the_low_target): Add thread delete callback.
763 * linux-mips-low.c (mips_linux_delete_thread): New function.
764 (the_low_target): Add thread delete callback.
765 * linux-ppc-low.c (the_low_target): Likewise.
766 * linux-s390-low.c (the_low_target): Likewise.
767 * linux-sh-low.c (the_low_target): Likewise.
768 * linux-tic6x-low.c (the_low_target): Likewise.
769 * linux-tile-low.c (the_low_target): Likewise.
770 * linux-x86-low.c (the_low_target): Likewise.
771 * linux-xtensa-low.c (the_low_target): Likewise.
772
b79f7801
YZ
7732017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
774
775 * win32-low.c: Include "common-inferior.h".
776
bc3b087d
SDJ
7772017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
778
779 * inferiors.c (set_inferior_cwd): New function.
780 * server.c (handle_general_set): Handle QSetWorkingDir packet.
781 (handle_query): Inform that QSetWorkingDir is supported.
782 * win32-low.c (create_process): Pass the inferior's cwd to
783 CreateProcess.
784
d092c5a2
SDJ
7852017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
786
787 * inferiors.c (current_inferior_cwd): New global variable.
788 (get_inferior_cwd): New function.
789 * inferiors.h (struct process_info) <cwd>: New field.
790
7da0a886
SDJ
7912017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
792
793 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
794 (OBS): Add gdb_tilde_expand.o.
795
289a6840
SM
7962017-10-02 Simon Marchi <simon.marchi@ericsson.com>
797
798 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
799 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
800
256642e8
PA
8012017-09-29 Pedro Alves <palves@redhat.com>
802
803 * ax.c (gdb_parse_agent_expr): Constify.
804 * ax.h (gdb_parse_agent_expr): Constify.
805 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
806 Constify.
807 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
808 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
809 * remote-utils.h (read_ptid): Constify.
810 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
811 (process_point_options, process_serial_event): Constify.
812 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
813 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
814 (cmd_qtbuffer): Constify.
815
5b9ca4d4
PA
8162017-09-29 Pedro Alves <palves@redhat.com>
817
818 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
819 fails.
820
94c207e0
PA
8212017-09-29 Pedro Alves <palves@redhat.com>
822
823 * linux-low.c (handle_extended_wait): Pass parent thread instead
824 of process to thread_db_notice_clone.
825 * linux-low.h (thread_db_notice_clone): Replace parent process
826 parameter with parent thread parameter.
827 * thread-db.c (find_one_thread): Add comment.
828 (thread_db_notice_clone): Replace parent process parameter with
829 parent thread parameter. Temporarily switch to the parent thread.
830
75352e28
SDJ
8312017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
832
833 * gdbthread.h: Include "common-gdbthread.h".
834 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
835 "if" when validating the ptid.
836 * remote-utils.c: Include "gdbthread.h".
837 (prepare_resume_reply): Use "switch_to_thread".
838 * target.c (done_accessing_memory): Likewise.
839
ad339634
AA
8402017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
841
842 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
843 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
844 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
845 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
846 s390x-gs-linux64-ipa.o to ipa_obj.
847 * linux-s390-low.c (HWCAP_S390_GS): New define.
848 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
849 New functions.
850 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
851 (s390_arch_setup): Check for guarded-storage support and choose
852 appropriate tdesc.
853 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
854 init_registers_s390x_gs_linux64.
855 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
856 enum value.
857 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
858 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
859
cc4d742f
SM
8602017-09-22 Simon Marchi <simon.marchi@ericsson.com>
861
862 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
863
f6327dcb
KB
8642017-09-21 Kevin Buettner <kevinb@redhat.com>
865
866 * linux-low.h (struct lwp_info): Add new field, thread_handle.
867 (thread_db_thread_handle): Declare.
868 * linux-low.c (linux_target_ops): Initialize thread_handle.
869 * server.c (handle_qxfer_threads_worker): Add support for
870 "handle" attribute.
871 * target.h (struct target_ops): Add new function pointer,
872 thread_handle.
873 (target_thread_handle): Define.
874 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
875 field in lwp.
876 (thread_db_thread_handle): New function.
877
86299109
KB
8782017-09-21 Kevin Buettner <kevinb@redhat.com>
879
880 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
881 * linux-low.h (thread_db_notice_clone): Declare.
882 * thread-db.c (thread_db_notice_clone): New function.
883
f557a88a
PA
8842017-09-21 Pedro Alves <palves@redhat.com>
885
886 * server.c (gdb_read_memory, handle_status, process_serial_event)
887 (handle_serial_event, handle_target_event): Adjust to
888 set_desired_thread prototype change.
889 * target.c (set_desired_thread): Remove 'use_general' parameter
890 and adjust.
891 * target.h (set_desired_thread): Remove 'use_general' parameter.
892
223ffa71
TT
8932017-09-20 Tom Tromey <tom@tromey.com>
894
895 * target.c (target_terminal::terminal_state): Define.
896 (target_terminal::init): Rename from target_terminal_init.
897 (target_terminal::inferior): Rename from
898 target_terminal_inferior.
899 (target_terminal::ours): Rename from target_terminal_ours.
900 (target_terminal::ours_for_output, target_terminal::info): New.
901
04fd3ba9
SM
9022017-09-16 Simon Marchi <simon.marchi@ericsson.com>
903
904 * server.c (accumulate_file_name_length): Remove.
905 (emit_dll_description): Adjust to std::string change.
906 (handle_qxfer_libraries): Use std::string to hold document.
907
5e187554
SM
9082017-09-16 Simon Marchi <simon.marchi@ericsson.com>
909
910 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
911 return type of xml_escape_text.
912 * server.c (emit_dll_description): Likewise.
913
1526853e
SM
9142017-09-16 Simon Marchi <simon.marchi@ericsson.com>
915
916 * server.c (captured_main): Accept argument for --selftest.
917 Update run_tests call.
918 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
919 when registering selftests.
920
c4dfafab
SDJ
9212017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
922
923 * regcache.c (get_thread_regcache): Update code to use "std::vector"
924 instead of "VEC" for "target_desc.reg_defs".
925 (regcache_cpy): Likewise.
926 (registers_to_string): Likewise.
927 (registers_from_string): Likewise.
928 (find_regno): Likewise.
929 (supply_regblock): Likewise.
930 (regcache_raw_read_unsigned): Likewise.
931 * tdesc.c (init_target_desc): Likewise.
932 (tdesc_create_reg): Likewise.
933 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
934 (struct target_desc) <reg_defs>: Convert to "std::vector".
935 (target_desc): Do not initialize "reg_defs".
936 (~target_desc): Update code to use "std::vector" instead of "VEC"
937 for "target_desc.reg_defs".
938 (operator==): Likewise.
939
124aceb4
SM
9402017-09-15 Simon Marchi <simon.marchi@ericsson.com>
941
942 * inferiors.h (thread_to_gdb_id): Remove.
943 * inferiors.c (thread_to_gdb_id): Remove.
944 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
945 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
946 lynx_store_registers, lynx_read_memory, lynx_write_memory):
947 Likewise.
948 * nto-low.c (nto_fetch_registers, nto_store_registers,
949 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
950
96cde54f
SM
9512017-09-15 Simon Marchi <simon.marchi@ericsson.com>
952
953 * inferiors.h (gdb_id_to_thread_id): Remove.
954 * inferiors.c (gdb_id_to_thread_id): Remove.
955 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
956 removal. Move pid declaration closer to where it's used.
957
e8ca139e
SM
9582017-09-15 Simon Marchi <simon.marchi@ericsson.com>
959
960 * server.c (handle_detach): New function.
961 (process_serial_event): Move code out, call handle_detach.
962
f8a4e119
SM
9632017-09-15 Simon Marchi <simon.marchi@ericsson.com>
964
965 * server.c (require_running): Rename to ...
966 (require_running_or_return): ... this ...
967 (require_running_or_break): ... and this.
968 (handle_query, process_serial_event): Adjust.
969
0eb0a407
SM
9702017-09-15 Simon Marchi <simon.marchi@ericsson.com>
971
972 * linux-low.c (linux_set_resume_request): Remove unused
973 variables.
974
785922a5
SM
9752017-09-15 Simon Marchi <simon.marchi@ericsson.com>
976
977 * server.c (first_thread_of): Remove.
978 (process_serial_event): Replace usage of first_thread_of with
979 find_any_thread_of_pid.
980 * tracepoint.c (same_process_p): Remove.
981 (gdb_agent_about_to_close): Replace usage of same_process_p with
982 find_any_thread_of_pid.
983 * linux-x86-low.c (same_process_callback): Remove.
984 (x86_arch_setup_process_callback): Replace usage of
985 same_process_callback with find_any_thread_of_pid.
986 * thread-db.c (any_thread_of): Remove.
987 (switch_to_process): Replace usage of any_thread_of with
988 find_any_thread_of_pid.
989 * inferiors.c (thread_pid_matches_callback): Remove.
990 (find_thread_process): Adjust to use find_any_thread_of_pid.
991
a059f00c
SDJ
9922017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
993
994 * regcache.c (get_thread_regcache): Guard calls to "memset"
995 with "!VEC_empty".
996
cc397f3a
SDJ
9972017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
998
999 * linux-low.c (handle_extended_wait): Use
1000 "allocate_target_description" instead of "XNEW".
1001 * linux-x86-low.c (initialize_low_arch): Likewise.
1002
22916b07
YQ
10032017-09-05 Yao Qi <yao.qi@linaro.org>
1004
1005 * configure.srv (srv_i386_regobj): Remove.
1006 (srv_amd64_regobj): Remove.
1007 (srv_regobj): Set it to "" for x86 non-linux targets.
1008 * linux-x86-tdesc.c (i386_linux_read_description):
1009 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1010 (init_registers_i386): Remove the declaration.
1011 (tdesc_i386): Remove the declaration.
1012 (lynx_i386_arch_setup): Call i386_create_target_description.
1013 * nto-x86-low.c: Likewise.
1014 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1015 [!__x86_64__]: include arch/i386.h.
1016 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1017
38602d55
YQ
10182017-09-05 Yao Qi <yao.qi@linaro.org>
1019
1020 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1021 i386/amd64-XXX-linux from it.
1022
44b886ff
YQ
10232017-09-05 Yao Qi <yao.qi@linaro.org>
1024
1025 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1026 false.
1027 (ipa_amd64_linux_regobj): Remove.
1028 (ipa_x32_linux_regobj): Remove.
1029
b4570e4b
YQ
10302017-09-05 Yao Qi <yao.qi@linaro.org>
1031
1032 * Makefile.in (arch-amd64.o): New rule.
1033 * configure.srv: Append arch-amd64.o.
1034 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1035 (get_ipa_tdesc): Call amd64_linux_read_description.
1036 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1037 and init_registers_amd64_XXX.
1038 * linux-x86-low.c (x86_linux_read_description): Call
1039 amd64_linux_read_description.
1040 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1041 (initialize_low_arch): Don't call init_registers_x32_XXX and
1042 init_registers_amd64_XXX.
1043 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1044 and tdesc_amd64_XXX.
1045 [__x86_64__] (amd64_tdesc_test): New function.
1046 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1047 and init_registers_amd64_XXX.
1048 * linux-x86-tdesc.c: Include arch/amd64.h.
1049 (xcr0_to_tdesc_idx): New function.
1050 (i386_linux_read_description): New function.
1051 (amd64_get_ipa_tdesc_idx): New function.
1052 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1053 (amd64_get_ipa_tdesc): Declare.
1054
d1f28ea2
YQ
10552017-09-05 Yao Qi <yao.qi@linaro.org>
1056
1057 * configure.srv (srv_i386_linux_xmlfiles): Remove
1058 i386/i386-XXX-linux.xml from it.
1059
25a93583
YQ
10602017-09-05 Yao Qi <yao.qi@linaro.org>
1061
1062 * configure.srv: Set srv_i386_linux_regobj empty if $development
1063 is false.
1064 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1065 initialize_low_tdesc.
1066 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1067 with #if initialize_low_tdesc.
1068 * linux-x86-tdesc-selftest.c: New file.
1069 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1070
5f035c07
YQ
10712017-09-05 Yao Qi <yao.qi@linaro.org>
1072
1073 * Makefile.in (arch-i386.o): New rule.
1074 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1075 (x86_64-*-linux*): Likewise.
1076 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1077 include arch/i386.h.
1078 (i386_linux_read_description): Remove code and call
1079 i386_create_target_description.
1080 * tdesc.c (allocate_target_description): New function.
1081 * tdesc.h (set_tdesc_architecture): Remove declaration.
1082 (set_tdesc_osabi): Likewise.
1083
0abe8a89
YQ
10842017-09-05 Yao Qi <yao.qi@linaro.org>
1085
1086 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1087 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1088 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1089 .xmltarget.
1090 * server.c (get_features_xml): Call tdesc_get_features_xml.
1091 * tdesc.c (set_tdesc_architecture): New function.
1092 (set_tdesc_osabi): New function.
1093 (tdesc_get_features_xml): New function.
1094 (tdesc_create_feature): Add an argument.
1095 * tdesc.h (struct target_desc) <features>: New field.
1096 <arch, osabi>: New field.
1097 (~target_desc): xfree features, arch, and osabi.
1098 (target_desc::oerator==): Don't compare .xmltarget.
1099 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1100 (set_tdesc_osabi): Likewise.
1101 (tdesc_get_features_xml): Likewise.
1102
0a188386
YQ
11032017-09-05 Yao Qi <yao.qi@linaro.org>
1104
1105 * linux-x86-tdesc.c: Include selftest.h.
1106 (i386_tdesc_test): New function.
1107 (initialize_low_tdesc): Call selftests::register_test.
1108 * tdesc.h: Include regdef.h.
1109 (target_desc): Override operator == and !=.
1110
f49ff000
YQ
11112017-09-05 Yao Qi <yao.qi@linaro.org>
1112
1113 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1114 (ipa_obj): Likewise.
1115 * linux-i386-ipa.c: Include common/x86-xstate.h
1116 (get_ipa_tdesc): Call i386_linux_read_description.
1117 (initialize_low_tracepoint): Don't call init_registers_XXX
1118 functions, call initialize_low_tdesc instead.
1119 * linux-x86-low.c (x86_linux_read_description): Call
1120 i386_linux_read_description.
1121 (initialize_low_arch): Don't call init_registers_i386_XXX
1122 functions, call initialize_low_tdesc.
1123 * linux-x86-tdesc.c: New file.
1124 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1125 (i386_get_ipa_tdesc_idx): Declare.
1126 (i386_get_ipa_tdesc): Declare.
1127 (initialize_low_tdesc): Declare.
1128
2b68ef2f
YQ
11292017-09-05 Yao Qi <yao.qi@linaro.org>
1130
1131 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1132 instead of 0.
1133
f7000548
YQ
11342017-09-05 Yao Qi <yao.qi@linaro.org>
1135
1136 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1137 * regcache.c (get_thread_regcache): Use VEC_length.
1138 (init_register_cache): Likewise.
1139 (regcache_cpy): Likewise.
1140 (registers_to_string): Iterate reg_defs via VEC_iterate.
1141 (find_regno): Likewise.
1142 (find_register_by_number): Use VEC_index.
1143 (register_size): Call find_register_by_number.
1144 (register_data): Call find_register_by_number.
1145 (supply_regblock): Use VEC_length.
1146 (regcache_raw_read_unsigned): Likewise.
1147 * tdesc.c (init_target_desc): Iterate reg_defs via
1148 VEC_iterate.
1149 (default_description): Update initializer.
1150 (copy_target_description): Don't update field num_registers.
1151 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1152 <num_registers>: Remove.
1153
50a421ac
SM
11542017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1155
1156 * Makefile.in (.SECONDARY): Define target.
1157
23fdd69e
SM
11582017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1159
1160 * linux-low.c (linux_wait_1): Adjust.
1161 * server.c (queue_stop_reply_callback): Adjust.
1162
0a2dde4a
SDJ
11632017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1164
1165 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1166 QEnvironmentUnset and QEnvironmentReset packets.
1167 (handle_query): Inform remote that QEnvironmentHexEncoded,
1168 QEnvironmentUnset and QEnvironmentReset are supported.
1169
6afd337d
SM
11702017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1171
1172 * inferiors.h (inferior_target_data): Rename to ...
1173 (thread_target_data): ... this.
1174 (inferior_regcache_data): Rename to ...
1175 (thread_regcache_data): ... this.
1176 (set_inferior_regcache_data): Rename to ...
1177 (set_thread_regcache_data): ... this.
1178 * inferiors.c (inferior_target_data): Rename to ...
1179 (thread_target_data): ... this.
1180 (inferior_regcache_data): Rename to ...
1181 (thread_regcache_data): ... this.
1182 (set_inferior_regcache_data): Rename to ...
1183 (set_thread_regcache_data): ... this.
1184 (free_one_thread): Update.
1185 * linux-low.h (get_thread_lwp): Update.
1186 * regcache.c (get_thread_regcache): Update.
1187 (regcache_invalidate_thread): Update.
1188 (free_register_cache_thread): Update.
1189 * win32-i386-low.c (update_debug_registers_callback): Update.
1190 (win32_get_current_dr): Update.
1191 * win32-low.c (thread_rec): Update.
1192 (delete_thread_info): Update.
1193 (continue_one_thread): Update.
1194 (suspend_one_thread): Update.
1195
a160cc46
SM
11962017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1197
1198 * inferiors.c (set_inferior_target_data): Remove.
1199 * inferiors.h (set_inferior_target_data): Remove.
1200
6d580b63
YQ
12012017-08-18 Yao Qi <yao.qi@linaro.org>
1202
1203 * Makefile.in (OBS): Add selftest.o.
1204 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1205 * configure, config.in: Re-generated.
1206 * server.c: Include common/sefltest.h.
1207 (captured_main): Handle option --selftest.
1208
f5a29eb0
YQ
12092017-08-09 Yao Qi <yao.qi@linaro.org>
1210
1211 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1212 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1213 i386-avx-mpx.o and i386-mmx.o.
1214 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1215 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1216 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1217 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1218 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1219 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1220 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1221 i386/amd64-avx-mpx.xml.
1222
57757c2f
YQ
12232017-08-09 Yao Qi <yao.qi@linaro.org>
1224
1225 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1226 and x32-avx-avx512.o.
1227 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1228 i386/x32-avx-avx512.xml.
1229
229d26fc
SM
12302017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1231
1232 * tracepoint.h (enum class fast_tpoint_collect_result): New
1233 enumeration.
1234 (fast_tracepoint_collecting): Change return type to
1235 fast_tpoint_collect_result.
1236 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1237 * linux-low.h: Include tracepoint.h.
1238 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1239 fast_tpoint_collect_result.
1240 * linux-low.c (handle_tracepoints): Adjust.
1241 (linux_fast_tracepoint_collecting): Change return type to
1242 fast_tpoint_collect_result.
1243 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1244 linux_wait_1, stuck_in_jump_pad_callback,
1245 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1246 proceed_one_lwp): Adjust to type change.
1247
2e1e43e1
YQ
12482017-07-10 Yao Qi <yao.qi@linaro.org>
1249
1250 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1251
adc764e7
YQ
12522017-06-29 Yao Qi <yao.qi@linaro.org>
1253
1254 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1255 Remove.
1256 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1257
a206891a
SM
12582017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1259
1260 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1261
9a6c7d9c
SDJ
12622017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1263
1264 * linux-low.c (linux_create_inferior): Adjust code to access the
1265 environment information via 'gdb_environ' class.
1266 * lynx-low.c (lynx_create_inferior): Likewise.
1267 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1268 (get_environ): Return a pointer to 'our_environ'.
1269 (captured_main): Initialize 'our_environ'.
1270 * server.h (get_environ): Adjust prototype.
1271 * spu-low.c (spu_create_inferior): Adjust code to access the
1272 environment information via 'gdb_environ' class.
1273
ae3e2ccf
SM
12742017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1275
1276 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1277 usage of "register" keyword.
1278
3e019bdc
SM
12792017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1280
1281 * configure: Re-generate.
1282
8465943a
SM
12832017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1284
1285 * configure: Re-generate.
1286
cf0dd6f0
SM
12872017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1288
1289 * Makefile.in (COMPILE.pre): Add "-x c++".
1290
9845682b
SDJ
12912017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1292
1293 * fork-child.c: Conditionally include <signal.h>.
1294
aefd8b33
SDJ
12952017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1296
1297 * server.c (handle_general_set): Handle new packet
1298 "QStartupWithShell".
1299 (handle_query): Add "QStartupWithShell" to the list of supported
1300 packets.
1301 (gdbserver_usage): Add help text explaining the
1302 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1303 options.
1304 (captured_main): Recognize and act upon the presence of the new
1305 CLI options.
1306
2090129c
SDJ
13072017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1308 Pedro Alves <palves@redhat.com>
1309
1310 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1311 * configure: Regenerate.
1312 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1313 "fork-inferior.o".
1314 (i[34567]86-*-lynxos*): Likewise.
1315 (spu*-*-*): Likewise.
1316 * fork-child.c: New file.
1317 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1318 and "environ.h".
1319 (linux_ptrace_fun): New function.
1320 (linux_create_inferior): Adjust function prototype to reflect
1321 change on "target.h". Adjust function code to use
1322 "fork_inferior".
1323 (linux_request_interrupt): Delete "signal_pid".
1324 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1325 (lynx_ptrace_fun): New function.
1326 (lynx_create_inferior): Adjust function prototype to reflect
1327 change on "target.h". Adjust function code to use
1328 "fork_inferior".
1329 * nto-low.c (nto_create_inferior): Adjust function prototype and
1330 code to reflect change on "target.h". Update comments.
1331 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1332 "common-terminal.h" and "environ.h".
1333 (terminal_fd): Moved to fork-child.c.
1334 (old_foreground_pgrp): Likewise.
1335 (restore_old_foreground_pgrp): Likewise.
1336 (last_status): Make it global.
1337 (last_ptid): Likewise.
1338 (our_environ): New variable.
1339 (startup_with_shell): Likewise.
1340 (program_name): Likewise.
1341 (program_argv): Rename to...
1342 (program_args): ...this.
1343 (wrapper_argv): New variable.
1344 (start_inferior): Delete function.
1345 (get_exec_wrapper): New function.
1346 (get_exec_file): Likewise.
1347 (get_environ): Likewise.
1348 (prefork_hook): Likewise.
1349 (post_fork_inferior): Likewise.
1350 (postfork_hook): Likewise.
1351 (postfork_child_hook): Likewise.
1352 (handle_v_run): Update code to deal with arguments coming from the
1353 remote host. Update calls from "start_inferior" to
1354 "create_inferior".
1355 (captured_main): Likewise. Initialize environment variable. Call
1356 "have_job_control".
1357 * server.h (post_fork_inferior): New prototype.
1358 (get_environ): Likewise.
1359 (last_status): Declare.
1360 (last_ptid): Likewise.
1361 (signal_pid): Likewise.
1362 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1363 (spu_ptrace_fun): New function.
1364 (spu_create_inferior): Adjust function prototype to reflect change
1365 on "target.h". Adjust function code to use "fork_inferior".
1366 * target.c (target_terminal_init): New function.
1367 (target_terminal_inferior): Likewise.
1368 (target_terminal_ours): Likewise.
1369 * target.h: Include <vector>.
1370 (struct target_ops) <create_inferior>: Update prototype.
1371 (create_inferior): Update macro.
1372 * utils.c (gdb_flush_out_err): New function.
1373 * win32-low.c (win32_create_inferior): Adjust function prototype
1374 and code to reflect change on "target.h".
1375
043a4934
SDJ
13762017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1377
1378 * inferiors.c (switch_to_thread): New function.
1379
15652511
SDJ
13802017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1381
1382 * Makefile.in (SFILE): Add "common/job-control.c".
1383 (OBS): Add "job-control.o".
1384
21ea5acd
SDJ
13852017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1386
1387 * Makefile: Remove "@host_makefile_frag@".
1388
e13cb306
PA
13892017-05-05 Pedro Alves <palves@redhat.com>
1390
1391 * configure: Regenerate.
1392
c94fee56
SDJ
13932017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1394
1395 * configure: Regenerate.
1396
a0ff9e1a
SM
13972017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1398
1399 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1400 software_single_step change of return type to
1401 std::vector<CORE_ADDR>.
1402 * linux-low.c (install_software_single_step_breakpoints):
1403 Likewise.
1404 * linux-low.h (install_software_single_step_breakpoints):
1405 Likewise.
1406
be628ab8
SDJ
14072017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1408
1409 * remote-utils.c: Include "gdb_termios.h" instead of
1410 "terminal.h".
1411 * terminal.h: Delete file.
1412
7c5ded6a
SDJ
14132017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1414
1415 * server.c: Include <vector>.
1416 <program_argv, wrapper_argv>: Convert to std::vector.
1417 (start_inferior): Rewrite function to use C++.
1418 (handle_v_run): Likewise. Update code that calculates the argv
1419 based on the vRun packet; use C++.
1420 (captured_main): Likewise.
1421
436252de
SM
14222017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1423
1424 * server.c (handle_v_cont): Initialize thread_resume::thread
1425 with null_ptid.
1426
9bf2a700
PA
14272017-04-05 Pedro Alves <palves@redhat.com>
1428
1429 * configure: Regenerate.
1430
a121b7c1
PA
14312017-04-05 Pedro Alves <palves@redhat.com>
1432
1433 * gdbreplay.c (sync_error): Constify.
1434 * linux-x86-low.c (push_opcode): Constify.
1435
21c8a587
PA
14362017-04-05 Pedro Alves <palves@redhat.com>
1437
1438 * win32-low.c (get_child_debug_event)
1439 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1440 Report TARGET_WAITKIND_SPURIOUS instead.
1441
fb32b4f7
PA
14422017-04-05 Pedro Alves <palves@redhat.com>
1443
1444 * remote-utils.c (remote_prepare, remote_open): Constify.
1445 * remote-utils.h (remote_prepare, remote_open): Constify.
1446 * server.c (captured_main): Constify 'port' handling.
1447
65dd1e59
SM
14482017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1449
1450 * Makefile.in (clean): Clear .deps.
1451
8fa5b777
SM
14522017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1453
1454 * .gitignore: Remove generated files, replace with wildcard.
1455 * (clean): Replace removal of generated files with wildcard.
1456 (version.c): Replace with...
1457 (version-generated.c): ...this.
1458 (xml-builtin.c): Replace with...
1459 (xml-builtin-generated.c): ...this.
1460 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1461 (%.c: *regformats*): Replace with...
1462 (%-generated.c: *regformats*): ...this.
1463
a12e714b
MF
14642017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1465
1466 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1467 (xtensa_fill_gregset): Call collect_register_by_name for
1468 threadptr register.
1469 (xtensa_store_gregset): Call supply_register_by_name for
1470 threadptr register.
1471
1a09b50a
MF
14722017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1473
1474 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1475 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1476 (xtensa_store_gregset): Call supply_register for all registers in
1477 a0_regnum..a0_regnum + C0_NREGS range.
1478
1a01e7c6
SM
14792017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1480
1481 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1482 (ax-ipa.o: ax.c): Remove.
1483 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1484 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1485 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1486 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1487 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1488
36bc18a8
SM
14892017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1490
1491 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1492 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1493 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1494 (errors-ipa.o: ../common/errors.c): Remove.
1495 (format-ipa.o: ../common/format.c): Remove.
1496 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1497
a8ebe3d5
SM
14982017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1499
1500 * Makefile.in (%-ipa.o: %.c): New rule.
1501 (tracepoint-ipa.o: tracepoint.c): Remove.
1502 (utils-ipa.o: utils.c): Remove.
1503 (remote-utils-ipa.o: remote-utils.c): Remove.
1504 (regcache-ipa.o: regcache.c): Remove.
1505 (i386-linux-ipa.o: i386-linux.c): Remove.
1506 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1507 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1508 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1509 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1510 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1511 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1512 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1513 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1514 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1515 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1516 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1517 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1518 (aarch64-ipa.o: aarch64.c): Remove.
1519 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1520 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1521 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1522 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1523 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1524 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1525 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1526 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1527 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1528 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1529 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1530 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1531 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1532 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1533 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1534 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1535 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1536 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1537 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1538 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1539 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1540 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1541 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1542 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1543 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1544 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1545 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1546 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1547 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1548 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1549 (tdesc-ipa.o: tdesc.c): Remove.
1550 (x32-linux-ipa.o: x32-linux.c): Remove.
1551 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1552 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1553
50cfacb7
SM
15542017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1555
1556 * Makefile.in (%.o: ../arch/%.c): New rule.
1557 (arm.o: ../arch/arm.c): Remove.
1558 (arm-linux.o: ../arch/arm-linux.c): Remove.
1559 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1560 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1561
c5a22423
SM
15622017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1563
1564 * Makefile.in (%.o: ../nat/%.c): New rule.
1565 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1566 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1567 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1568 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1569 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1570 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1571 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1572 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1573 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1574 (linux-personality.o: ../nat/linux-personality.c): Remove.
1575 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1576 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1577 (x86-linux.o: ../nat/x86-linux.c): Remove.
1578 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1579 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1580
6bda016b
SM
15812017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1582
1583 * Makefile.in (%.o: ../common/%.c): New rule.
1584 (signals.o: ../common/signals.c): Remove.
1585 (print-utils.o: ../common/print-utils.c): Remove.
1586 (rsp-low.o: ../common/rsp-low.c): Remove.
1587 (common-utils.o: ../common/common-utils.c): Remove.
1588 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1589 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1590 (vec.o: ../common/vec.c): Remove.
1591 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1592 (xml-utils.o: ../common/xml-utils.c): Remove.
1593 (ptid.o: ../common/ptid.c): Remove.
1594 (buffer.o: ../common/buffer.c): Remove.
1595 (format.o: ../common/format.c): Remove.
1596 (filestuff.o: ../common/filestuff.c): Remove.
1597 (agent.o: ../common/agent.c): Remove.
1598 (errors.o: ../common/errors.c): Remove.
1599 (environ.o: ../common/environ.c): Remove.
1600 (common-debug.o: ../common/common-debug.c): Remove.
1601 (cleanups.o: ../common/cleanups.c): Remove.
1602 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1603 (fileio.o: ../common/fileio.c): Remove.
1604 (common-regcache.o: ../common/common-regcache.c): Remove.
1605 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1606 (new-op.o: ../common/new-op.c): Remove.
1607 (btrace-common.o: ../common/btrace-common.c): Remove.
1608
21122961
SM
16092017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1610
1611 * Makefile.in (%.o: ../target/%.c): New rule.
1612 (waitstatus.o: ../target/waitstatus.c): Remove.
1613
c362e621
SM
16142017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1615
1616 * Makefile.in
1617 (%.c: ../regformats/%.dat,
1618 (%.c: ../regformats/arm/%.dat,
1619 (%.c: ../regformats/i386/%.dat,
1620 (%.c: ../regformats/rs6000/%.dat): New rules.
1621 (aarch64.c): Remove.
1622 (reg-arm.c): Remove.
1623 (arm-with-iwmmxt.c): Remove.
1624 (arm-with-vfpv2.c): Remove.
1625 (arm-with-vfpv3.c): Remove.
1626 (arm-with-neon.c): Remove.
1627 (reg-bfin.c): Remove.
1628 (reg-cris.c): Remove.
1629 (reg-crisv32.c): Remove.
1630 (i386.c): Remove.
1631 (i386-linux.c): Remove.
1632 (i386-avx.c): Remove.
1633 (i386-avx-linux.c): Remove.
1634 (i386-avx-avx512.c): Remove.
1635 (i386-avx-avx512-linux.c): Remove.
1636 (i386-mpx.c): Remove.
1637 (i386-mpx-linux.c): Remove.
1638 (i386-avx-mpx-avx512-pku.c): Remove.
1639 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1640 (i386-avx-mpx.c): Remove.
1641 (i386-avx-mpx-linux.c): Remove.
1642 (i386-mmx.c): Remove.
1643 (i386-mmx-linux.c): Remove.
1644 (reg-ia64.c): Remove.
1645 (reg-m32r.c): Remove.
1646 (reg-m68k.c): Remove.
1647 (reg-cf.c): Remove.
1648 (mips-linux.c): Remove.
1649 (mips-dsp-linux.c): Remove.
1650 (mips64-linux.c): Remove.
1651 (mips64-dsp-linux.c): Remove.
1652 (nios2-linux.c): Remove.
1653 (powerpc-32.c): Remove.
1654 (powerpc-32l.c): Remove.
1655 (powerpc-altivec32l.c): Remove.
1656 (powerpc-cell32l.c): Remove.
1657 (powerpc-vsx32l.c): Remove.
1658 (powerpc-isa205-32l.c): Remove.
1659 (powerpc-isa205-altivec32l.c): Remove.
1660 (powerpc-isa205-vsx32l.c): Remove.
1661 (powerpc-e500l.c): Remove.
1662 (powerpc-64l.c): Remove.
1663 (powerpc-altivec64l.c): Remove.
1664 (powerpc-cell64l.c): Remove.
1665 (powerpc-vsx64l.c): Remove.
1666 (powerpc-isa205-64l.c): Remove.
1667 (powerpc-isa205-altivec64l.c): Remove.
1668 (powerpc-isa205-vsx64l.c): Remove.
1669 (s390-linux32.c): Remove.
1670 (s390-linux32v1.c): Remove.
1671 (s390-linux32v2.c): Remove.
1672 (s390-linux64.c): Remove.
1673 (s390-linux64v1.c): Remove.
1674 (s390-linux64v2.c): Remove.
1675 (s390-te-linux64.c): Remove.
1676 (s390-vx-linux64.c): Remove.
1677 (s390-tevx-linux64.c): Remove.
1678 (s390x-linux64.c): Remove.
1679 (s390x-linux64v1.c): Remove.
1680 (s390x-linux64v2.c): Remove.
1681 (s390x-te-linux64.c): Remove.
1682 (s390x-vx-linux64.c): Remove.
1683 (s390x-tevx-linux64.c): Remove.
1684 (tic6x-c64xp-linux.c): Remove.
1685 (tic6x-c64x-linux.c): Remove.
1686 (tic6x-c62x-linux.c): Remove.
1687 (reg-sh.c): Remove.
1688 (reg-sparc64.c): Remove.
1689 (reg-spu.c): Remove.
1690 (amd64.c): Remove.
1691 (amd64-linux.c): Remove.
1692 (amd64-avx.c): Remove.
1693 (amd64-avx-linux.c): Remove.
1694 (amd64-avx-avx512.c): Remove.
1695 (amd64-avx-avx512-linux.c): Remove.
1696 (amd64-mpx.c): Remove.
1697 (amd64-mpx-linux.c): Remove.
1698 (amd64-avx-mpx-avx512-pku.c): Remove.
1699 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1700 (amd64-avx-mpx.c): Remove.
1701 (amd64-avx-mpx-linux.c): Remove.
1702 (x32.c): Remove.
1703 (x32-linux.c): Remove.
1704 (x32-avx.c): Remove.
1705 (x32-avx-linux.c): Remove.
1706 (x32-avx-avx512.c): Remove.
1707 (x32-avx-avx512-linux.c): Remove.
1708 (reg-xtensa.c): Remove.
1709 (reg-tilegx.c): Remove.
1710 (reg-tilegx32.c): Remove.
1711
1672e0d9
SDJ
17122017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1713
1714 * Makefile.in (SFILES): Add "common/environ.c".
1715 (OBJS): Add "common/environ.h".
1716
239b6d10
WT
17172017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1718
1719 * configure.ac: Check if the fs_base and gs_base members of
1720 `struct user_regs_struct' exist.
1721 * config.in: Regenerated.
1722 * configure: Likewise.
1723
694b382c
AT
17242017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1725
1726 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1727 target_read_memory.
1728 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1729 (get_next_pcs_syscall_next_pc): Likewise.
1730
7dc53023
LM
17312016-12-23 Luis Machado <lgustavo@codesourcery.com>
1732
1733 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1734 * nto-x86-low.c: Likewise.
1735
ad02e4fe
SM
17362016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1737
1738 * Makefile.in: Include disable-implicit-rules.mk.
1739
dcb07cfa
PA
17402016-11-23 Pedro Alves <palves@redhat.com>
1741
1742 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1743 (debug_vprintf): Use std::chrono::steady_clock instead of
1744 gettimeofday. Use '.' instead of ':'.
1745 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1746 (get_timestamp): Use std::chrono::steady_clock instead of
1747 gettimeofday.
1748
8629c02c
SM
17492016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1750
1751 * Makefile.in: Fix whitespace formatting.
1752
b593ecca
SM
17532016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1754
1755 * Makefile.in (SFILES, OBS): Flatten list and order
1756 alphabetically.
1757
9986ba08
PA
17582016-11-23 Pedro Alves <palves@redhat.com>
1759
1760 * event-loop.c (handle_file_event): Use warning.
1761 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1762 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1763 Use warning.
1764
4eefa7bc
PA
17652016-11-23 Pedro Alves <palves@redhat.com>
1766
1767 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1768 output.
1769 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1770 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1771 debug_printf and debug_flush for debug output.
1772 * server.c (handle_general_set): Likewise.
1773 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1774 output.
1775
5443506e
SM
17762016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1777
1778 * Makefile.in (.c.o): Replace rule with ...
1779 (%.o: %.c): ... this one.
1780
3b165252
SM
17812016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1782
1783 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1784 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1785 make.
1786 * configure.ac: Remove checks for the make program.
1787 * configure: Re-generate.
1788
0bcda685
PA
17892016-10-28 Pedro Alves <palves@redhat.com>
1790
1791 * Makefile.in (CXX_DIALECT): Get from configure.
1792 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1793 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1794 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1795 * config.in: Regenerate.
1796 * configure: Regenerate.
1797
c3805894
YQ
17982016-10-27 Yao Qi <yao.qi@linaro.org>
1799
1800 * linux-low.c (linux_supports_range_stepping): Return true if
1801 can_software_single_step return true.
1802
89342618
YQ
18032016-10-27 Yao Qi <yao.qi@linaro.org>
1804
1805 * inferiors.c (find_inferior_in_random): New function.
1806 * inferiors.h (find_inferior_in_random): Declare.
1807 * linux-low.c (linux_wait_for_event_filtered): Call
1808 find_inferior_in_random instead of find_inferior.
1809
e3652c84
YQ
18102016-10-27 Yao Qi <yao.qi@linaro.org>
1811
1812 * linux-low.c (linux_wait_1): If single-step breakpoints are
1813 inserted, remove them.
1814
5a04c4cf
PA
18152016-10-26 Pedro Alves <palves@redhat.com>
1816
1817 * linux-low.c (handle_extended_wait): Link parent/child fork
1818 threads.
1819 (linux_wait_1): Unlink them.
1820 (linux_set_resume_request): Ignore resume requests for
1821 already-resumed and unhandled fork child threads.
1822 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1823 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1824 New functions.
1825 (handle_v_requests) <vCont>: Don't call require_running.
1826 * server.h (in_queued_stop_replies): New declaration.
1827
cb93dc7f
YQ
18282016-10-24 Yao Qi <yao.qi@linaro.org>
1829
1830 PR server/20733
1831 * linux-aarch64-low.c (append_insns): Cast the return value to
1832 'uint32_t *'.
1833
a1078bea
YQ
18342016-10-10 Yao Qi <yao.qi@linaro.org>
1835
1836 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1837
1fb77080
SDJ
18382016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1839
1840 * target.c (target_supports_multi_process): New function, moved
1841 from...
1842 * target.h (target_supports_multi_process): ... here. Remove
1843 macro.
1844
39b5a3b9
TT
18452016-10-05 Tom Tromey <tom@tromey.com>
1846
1847 PR remote/20655:
1848 * tracepoint.c (handle_tracepoint_bkpts): Check
1849 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1850
c1d0b70a
YQ
18512016-10-05 Yao Qi <yao.qi@linaro.org>
1852
1853 * configure.srv: Update the path of arm-*.xml files.
1854
0a69eedb
YQ
18552016-10-05 Terry Guo <terry.guo@arm.com>
1856 Yao Qi <yao.qi@linaro.org>
1857
1858 * Makefile.in: Adjust the path of rules.
1859 * configure.srv: Update the path of xml files.
1860 * regformats/arm-with-iwmmxt.dat: Regenerated.
1861 * regformats/arm-with-neon.dat: Likewise.
1862 * regformats/arm-with-vfpv2.dat: Likewise.
1863 * regformats/arm-with-vfpv3.dat Likewise.
1864
17e16485
YQ
18652016-09-30 Yao Qi <yao.qi@linaro.org>
1866
1867 PR gdbserver/20627
1868 * target.c (target_stop_and_wait): Don't call
1869 target_continue_no_signal, use resume_stop instead.
1870
edeeb602
YQ
18712016-09-26 Yao Qi <yao.qi@linaro.org>
1872
1873 * linux-low.c (linux_wait_1): Call debug_exit.
1874
503b1c39
PA
18752016-09-23 Pedro Alves <palves@redhat.com>
1876
1877 * Makefile.in (SFILES): Add common/new-op.c.
1878 (OBS): Add common/new-op.o.
1879 (new-op.o): New rule.
1880
74172ecf
SM
18812016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1882
1883 * .gitinore: Ignore more files.
1884
fc6cda2e
YQ
18852016-09-21 Yao Qi <yao.qi@linaro.org>
1886
1887 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1888 23.
1889
bc1e6c81
SDJ
18902016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1891
1892 * server.c (start_inferior): Call target_mourn_inferior instead of
1893 mourn_inferior; pass ptid_t argument to it.
1894 (resume): Likewise.
1895 (handle_target_event): Likewise.
1896 * target.c (target_mourn_inferior): New function.
1897 * target.h (mourn_inferior): Delete macro.
1898
0e00e962
AA
18992016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1900
1901 * linux-low.c (lwp_is_stepping): New function.
1902
1d8cb77d
CL
19032016-09-06 Carl Love <cel@us.ibm.com>
1904
1905 * server.c (start_inferior): Fixed comment, requested comment change
1906 didn't get updated correctly. Removed reference to ptrace () call as
1907 it is only true on Linux systems.
1908
7313bced
CL
19092016-09-06 Carl Love <cel@us.ibm.com>
1910
1911 * server.c (start_inferior): Do not call
1912 function target_post_create_inferior () if the
1913 inferior process has already exited.
1914
cf6de44d
PA
19152016-09-05 Pedro Alves <palves@redhat.com>
1916
1917 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1918 (COMPILE.pre, CC_LD): Use CXX directly.
1919 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1920 * acinclude.m4: Don't include build-with-cxx.m4.
1921 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1922 * configure: Regenerate.
1923
c1da6748
AT
19242016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1925
1926 PR gdb/19495
1927 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1928 call writing data to own_buf.
1929
f2b9e3df
SDJ
19302016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1931
1932 * target.c (mywait): Call target_wait instead of
1933 the_target->wait.
1934 (target_wait): New function.
1935
049a8570
SDJ
19362016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1937
1938 * server.c (start_inferior): New variable 'ptid'. Replace calls
1939 to the_target->resume by target_continue{,_no_signal}, depending
1940 on the case.
1941 * target.c (target_stop_and_wait): Call target_continue_no_signal
1942 instead of the_target->resume.
1943 (target_continue): New function.
1944
3aa5cfa0
AT
19452016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1946
1947 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1948
754653a7
AZ
19492016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1950
1951 PR server/20491
1952 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1953 ps_prochandle.
1954 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1955 * linux-arm-low.c (ps_get_thread_area): Likewise.
1956 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1957 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1958 * linux-mips-low.c (ps_get_thread_area): Likewise.
1959 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1960 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1961 * linux-x86-low.c (ps_get_thread_area): Likewise.
1962 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1963
ed036b40
PA
19642016-08-19 Pedro Alves <palves@redhat.com>
1965
1966 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1967
c8ef42ee
PA
19682016-08-19 Pedro Alves <palves@redhat.com>
1969
1970 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1971 comment. Use memcpy instead of casting through unsigned long.
1972
9c235a72
PA
19732016-08-19 Pedro Alves <palves@redhat.com>
1974
1975 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1976 allocating around 0x80000000.
1977
201506da
PA
19782016-08-19 Pedro Alves <palves@redhat.com>
1979
1980 PR gdb/20415
1981 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1982 (x32-avx512-linux-ipa.o): New rules.
1983 * configure.ac (x86_64-*-linux*): New x32 check.
1984 * configure.srv (ipa_x32_linux_regobj): New.
1985 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1986 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1987 descriptions.
1988 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1989 descriptions.
1990 * configure: Regenerate.
1991
f348d89a
PA
19922016-08-09 Pedro Alves <palves@redhat.com>
1993
1994 PR gdb/18653
1995 * Makefile.in (OBS): Add signals-state-save-restore.o.
1996 (signals-state-save-restore.o): New rule.
1997 * config.in: Regenerate.
1998 * configure: Regenerate.
1999 * linux-low.c: Include "signals-state-save-restore.h".
2000 (linux_create_inferior): Call
2001 restore_original_signals_state.
2002 * server.c: Include "dispositions-save-restore.h".
2003 (captured_main): Call save_original_signals_state.
2004
1baf5149
PA
20052016-08-05 Pedro Alves <palves@redhat.com>
2006
2007 * configure: Regenerate.
2008
fcd4a73d
YQ
20092016-08-04 Yao Qi <yao.qi@linaro.org>
2010
2011 * linux-low.c (regsets_fetch_inferior_registers): Check
2012 errno is ESRCH or not.
2013
979659d0
YQ
20142016-08-02 Yao Qi <yao.qi@linaro.org>
2015
2016 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2017 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2018 (thread_db_load_search): Update.
2019 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2020 td_ta_set_event and td_ta_event_getmsg.
2021
6598661d
PA
20222016-07-26 Pedro Alves <palves@redhat.com>
2023
2024 PR server/20414
2025 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2026 of unsigned long for 64-bit registers and use uint32_t instead of
2027 unsigned int for 32-bit registers.
2028
9cf12d57
PA
20292016-07-26 Pedro Alves <palves@redhat.com>
2030
2031 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2032 to 'ptrace'.
2033
305450ed
TT
20342016-07-21 Tom Tromey <tom@tromey.com>
2035
2036 * configure: Rebuild.
2037
2583da7c
YQ
20382016-07-21 Yao Qi <yao.qi@linaro.org>
2039
2040 * mem-break.c (find_gdb_breakpoint): Cast bp to
2041 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2042
21536b36
YQ
20432016-07-21 Yao Qi <yao.qi@linaro.org>
2044
2045 * server.c (handle_v_requests): Support s and S actions
2046 if target_supports_software_single_step return true.
2047
8901d193
YQ
20482016-07-21 Yao Qi <yao.qi@linaro.org>
2049
2050 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2051 is resume_step, call maybe_hw_step.
2052 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2053 and unstop them.
2054 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2055 breakpoints or not.
2056 (proceed_one_lwp): If resume request is resume_step, install
2057 reinsert breakpoints and call maybe_hw_step.
2058
0e9a339e
YQ
20592016-07-21 Yao Qi <yao.qi@linaro.org>
2060
2061 * linux-low.c (proceed_one_lwp): Declare.
2062 (linux_resume_one_thread): Remove local variable 'step'.
2063 Lift code enqueue signal. Call proceed_one_lwp instead of
2064 linux_resume_one_lwp.
2065
4281b351
YQ
20662016-07-21 Yao Qi <yao.qi@linaro.org>
2067
2068 * linux-low.c (linux_resume_one_thread): Call
2069 enqueue_pending_signal.
2070
984a2c04
YQ
20712016-07-21 Yao Qi <yao.qi@linaro.org>
2072
2073 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2074 * inferiors.c (do_restore_current_thread_cleanup): New function.
2075 (make_cleanup_restore_current_thread): Likewise.
2076 * linux-low.c (install_software_single_step_breakpoints): Call
2077 make_cleanup_restore_current_thread. Switch current_thread to
2078 thread.
2079
bec903c9
YQ
20802016-07-21 Yao Qi <yao.qi@linaro.org>
2081
2082 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2083 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2084 (clone_one_breakpoint): Likewise.
2085 (delete_reinsert_breakpoints): Change parameter to thread.
2086 Callers updated.
2087 (has_reinsert_breakpoints): Likewise.
2088 (uninsert_reinsert_breakpoints): Likewise.
2089 (reinsert_reinsert_breakpoints): Likewise.
2090 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2091 (delete_reinsert_breakpoints): Likewise.
2092 (reinsert_reinsert_breakpoints): Likewise.
2093 (uninsert_reinsert_breakpoints): Likewise.
2094 (has_reinsert_breakpoints): Likewise.
2095
63c40ec7
YQ
20962016-07-21 Yao Qi <yao.qi@linaro.org>
2097
2098 * inferiors.c (get_thread_process): Make parameter const.
2099 * inferiors.h (get_thread_process): Update declaration.
2100 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2101 Add new parameters child_thread and parent_thread. Callers
2102 updated.
2103 * mem-break.h (clone_all_breakpoints): Update declaration.
2104
9aa76cd0
YQ
21052016-07-21 Yao Qi <yao.qi@linaro.org>
2106
2107 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2108 <command_list, handler>: Remove.
2109 (struct gdb_breakpoint): New.
2110 (struct other_breakpoint): New.
2111 (struct reinsert_breakpoint): New.
2112 (is_gdb_breakpoint): New function.
2113 (any_persistent_commands): Update command_list if
2114 is_gdb_breakpoint returns true.
2115 (set_breakpoint): Create breakpoints according to their types.
2116 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2117 (set_gdb_breakpoint_1): Likewise.
2118 (set_gdb_breakpoint): Likewise.
2119 (clear_breakpoint_conditions): Change parameter type to
2120 'struct gdb_breakpoint *'.
2121 (clear_breakpoint_commands): Likewise.
2122 (clear_breakpoint_conditions_and_commands): Likewise.
2123 (add_condition_to_breakpoint): Likewise.
2124 (add_breakpoint_condition): Likewise.
2125 (add_commands_to_breakpoint): Likewise.
2126 (check_breakpoints): Check other_breakpoint.
2127 (clone_one_breakpoint): Clone breakpopint according to its type.
2128 * mem-break.h (struct gdb_breakpoint): Declare.
2129 (set_gdb_breakpoint): Update declaration.
2130 (clear_breakpoint_conditions_and_commands): Likewise.
2131 (add_breakpoint_condition): Likewise.
2132 (add_breakpoint_commands): Likewise.
2133 * server.c (process_point_options): Change parameter type to
2134 'struct gdb_breakpoint *'.
2135
811f8301
YQ
21362016-07-21 Yao Qi <yao.qi@linaro.org>
2137
2138 * mem-break.c (set_breakpoint_at): Rename it to ...
2139 (set_breakpoint_type_at): ... it.
2140 (set_breakpoint_at): Call set_breakpoint_type_at.
2141 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2142 * mem-break.h (set_breakpoint_at): Update comments.
2143
b1c51e36
CLT
21442016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2145
2146 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2147 to buf parameter.
2148 (nios2_store_gregset): Likewise.
2149
ced2dffb
PA
21502016-07-01 Pedro Alves <palves@redhat.com>
2151 Antoine Tremblay <antoine.tremblay@ericsson.com>
2152
2153 * linux-low.c: Change interface to take the target lwp_info
2154 pointer directly and return void. Handle detaching from a zombie
2155 thread.
2156 (linux_detach_lwp_callback): New function.
2157 (linux_detach): Detach from the leader thread after detaching from
2158 the clone threads.
2159
2ac09a5b
YQ
21602016-06-28 Yao Qi <yao.qi@linaro.org>
2161
2162 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2163 for variable new_offset.
2164 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2165 (aarch64_ftrace_insn_reloc_cb): Likewise.
2166 (aarch64_ftrace_insn_reloc_tb): Likewise.
2167 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2168 PRIx64 instead of PRIx32.
2169
79e7fd4f
YQ
21702016-06-28 Yao Qi <yao.qi@linaro.org>
2171
2172 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2173 (the_low_target): Install arm_get_syscall_trapinfo.
2174
061fc021
YQ
21752016-06-28 Yao Qi <yao.qi@linaro.org>
2176
2177 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2178 function.
2179 (the_low_target): Install aarch64_get_syscall_trapinfo.
2180
4cc32bec
YQ
21812016-06-28 Yao Qi <yao.qi@linaro.org>
2182
2183 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2184 Callers updated.
2185 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2186 Remove parameter sysno.
2187 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2188 sysret.
2189
782c1122
AA
21902016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2191
2192 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2193 (s390_emit_ne_goto): Likewise.
2194 (s390_emit_lt_goto): Likewise.
2195 (s390_emit_le_goto): Likewise.
2196 (s390_emit_gt_goto): Likewise.
2197 (s390_emit_ge_goto): Likewise.
2198 (s390x_emit_eq_goto): Likewise.
2199 (s390x_emit_ne_goto): Likewise.
2200 (s390x_emit_lt_goto): Likewise.
2201 (s390x_emit_le_goto): Likewise.
2202 (s390x_emit_gt_goto): Likewise.
2203 (s390x_emit_ge_goto): Likewise.
2204 (s390_emit_ops_impl): Mark variable static.
2205 (s390x_emit_ops): Likewise.
2206
2e7b624b
YQ
22072016-06-17 Yao Qi <yao.qi@linaro.org>
2208
2209 * linux-low.c (handle_extended_wait): Call
2210 uninsert_reinsert_breakpoints for the parent process. Remove
2211 reinsert breakpoints from the child process. Reinsert them to
2212 the parent process when vfork is done.
2213 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2214 (reinsert_reinsert_breakpoints): New function.
2215 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2216 (reinsert_reinsert_breakpoints): Declare.
2217
8a81c5d7
YQ
22182016-06-17 Yao Qi <yao.qi@linaro.org>
2219
2220 * linux-low.c (handle_extended_wait): If the parent is doing
2221 step-over, remove the reinsert breakpoints from the forked child.
2222
f50bf8e5
YQ
22232016-06-17 Yao Qi <yao.qi@linaro.org>
2224
2225 * linux-low.c (unsuspend_all_lwps): Declare.
2226 (linux_low_filter_event): If thread exited, call finish_step_over.
2227 If step-over is finished, unsuspend other threads.
2228
8376a3cb
YQ
22292016-06-17 Yao Qi <yao.qi@linaro.org>
2230
2231 * linux-low.c (linux_resume_one_lwp_throw): Assert
2232 has_reinsert_breakpoints returns false.
2233 * mem-break.c (delete_disabled_breakpoints): Assert
2234 bp type isn't reinsert_breakpoint.
2235
f79b145d
YQ
22362016-06-17 Yao Qi <yao.qi@linaro.org>
2237
2238 * linux-low.c (maybe_hw_step): New function.
2239 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2240 (finish_step_over): Switch current_thread to lwp temporarily,
2241 and assert has_reinsert_breakpoints returns true.
2242 (proceed_one_lwp): Call maybe_hw_step.
2243 * mem-break.c (has_reinsert_breakpoints): New function.
2244 * mem-break.h (has_reinsert_breakpoints): Declare.
2245
0ae534d2
JT
22462016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2247
2248 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2249
fcdad592
YQ
22502016-05-17 Yao Qi <yao.qi@linaro.org>
2251
2252 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2253 instead of find_inferior.
2254
9e784964
YQ
22552016-05-05 Yao Qi <yao.qi@linaro.org>
2256
2257 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2258 Initialize res to zero.
2259
cf2ebb6e
YQ
22602016-05-05 Yao Qi <yao.qi@linaro.org>
2261
2262 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2263 to uint32_t.
2264
c1aebf87
UW
22652016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2266
2267 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2268 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2269 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2270
35fd2deb 22712016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 2272 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
2273
2274 * tracepoint.c (write_inferior_int8): New function.
2275 (cmd_qtenable_disable): Write enable flag using
2276 write_inferior_int8.
2277
484b3c32
YQ
22782016-04-25 Yao Qi <yao.qi@linaro.org>
2279
2280 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2281 (need_step_over_p): Return zero if the LWP has pending signals
2282 can be delivered on software single step target.
2283
85ba7d86
YQ
22842016-04-25 Yao Qi <yao.qi@linaro.org>
2285
2286 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2287 return instead of error.
2288
3539aa13
YQ
22892016-04-22 Yao Qi <yao.qi@linaro.org>
2290
2291 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2292 to 23.
2293
5b061e98
YQ
22942016-04-22 Yao Qi <yao.qi@linaro.org>
2295
2296 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2297 signal when stepping over breakpoint with software single
2298 step.
2299
3451269c
PA
23002016-04-21 Pedro Alves <palves@redhat.com>
2301
2302 * linux-s390-low.c (s390_collect_ptrace_register)
2303 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2304 add casts.
2305 (s390_check_regset): Use void * instead of gdb_byte *.
2306
a2358508
PA
23072016-04-20 Pedro Alves <palves@redhat.com>
2308
2309 * configure: Renegerate.
2310
6885166d
YQ
23112016-04-20 Yao Qi <yao.qi@linaro.org>
2312
2313 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2314 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2315 number 16.
2316 (arm_store_gregset): Likewise.
2317
2b863f51
WT
23182016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2319
2320 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2321 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2322 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2323 (amd64-avx-mpx-linux.c): New rules.
2324 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2325 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2326 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2327 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2328 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2329 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2330 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2331 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2332 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2333 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2334 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2335 * linux-x86-low.c (x86_linux_read_description): Add case for
2336 X86_XSTATE_AVX_MPX_MASK.
2337 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2338 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2339 init_registers_i386_avx_mpx_linux.
2340 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2341 (initialize_low_tracepoint): Call
2342 init_registers_i386_avx_mpx_linux.
2343 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2344 (initialize_low_tracepoint): Call
2345 init_registers_amd64_avx_mpx_linux.
2346 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2347 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2348 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2349 declarations.
2350
9b30624b
PA
23512016-04-18 Pedro Alves <palves@redhat.com>
2352
2353 * configure: Regenerate.
2354
45e3745e
AT
23552016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2356
2357 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2358 (aarch64_emit_sub): Likewise.
2359
2afc13ff
PA
23602016-04-12 Pedro Alves <palves@redhat.com>
2361
2362 * utils.c (prepare_to_throw_exception): Delete.
2363
6e774b13
SM
23642016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2365
2366 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2367
4dca19f8
MK
23682016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2369
2370 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2371
d0a9981f
MK
23722016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2373
2374 * linux-aarch64-ipa.c: Add <elf.h> include.
2375 * linux-ppc-ipa.c: Add <elf.h> include.
2376 * linux-s390-ipa.c: Add <elf.h> include.
2377
252db07e
MK
23782016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2379
2380 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2381 (get_raw_reg_ptr): Likewise.
2382 (get_trace_state_variable_value_ptr): Likewise.
2383 (set_trace_state_variable_value_ptr): Likewise.
2384 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2385 char *.
2386
14e2b6d9
MK
23872016-03-31 Wei-cheng Wang <cole945@gmail.com>
2388 Marcin Kościelnicki <koriakin@0x04.net>
2389
2390 PR/17221
2391 * linux-ppc-low.c (emit_insns): New function.
2392 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2393 (ppc_emit_prologue): New function.
2394 (ppc_emit_epilogue): New function.
2395 (ppc_emit_add): New function.
2396 (ppc_emit_sub): New function.
2397 (ppc_emit_mul): New function.
2398 (ppc_emit_lsh): New function.
2399 (ppc_emit_rsh_signed): New function.
2400 (ppc_emit_rsh_unsigned): New function.
2401 (ppc_emit_ext): New function.
2402 (ppc_emit_zero_ext): New function.
2403 (ppc_emit_log_not): New function.
2404 (ppc_emit_bit_and): New function.
2405 (ppc_emit_bit_or): New function.
2406 (ppc_emit_bit_xor): New function.
2407 (ppc_emit_bit_not): New function.
2408 (ppc_emit_equal): New function.
2409 (ppc_emit_less_signed): New function.
2410 (ppc_emit_less_unsigned): New function.
2411 (ppc_emit_ref): New function.
2412 (ppc_emit_const): New function.
2413 (ppc_emit_reg): New function.
2414 (ppc_emit_pop): New function.
2415 (ppc_emit_stack_flush): New function.
2416 (ppc_emit_swap): New function.
2417 (ppc_emit_stack_adjust): New function.
2418 (ppc_emit_call): New function.
2419 (ppc_emit_int_call_1): New function.
2420 (ppc_emit_void_call_2): New function.
2421 (ppc_emit_if_goto): New function.
2422 (ppc_emit_goto): New function.
2423 (ppc_emit_eq_goto): New function.
2424 (ppc_emit_ne_goto): New function.
2425 (ppc_emit_lt_goto): New function.
2426 (ppc_emit_le_goto): New function.
2427 (ppc_emit_gt_goto): New function.
2428 (ppc_emit_ge_goto): New function.
2429 (ppc_write_goto_address): New function.
2430 (ppc_emit_ops_impl): New static variable.
2431 (ppc64v1_emit_prologue): New function.
2432 (ppc64v2_emit_prologue): New function.
2433 (ppc64_emit_epilogue): New function.
2434 (ppc64_emit_add): New function.
2435 (ppc64_emit_sub): New function.
2436 (ppc64_emit_mul): New function.
2437 (ppc64_emit_lsh): New function.
2438 (ppc64_emit_rsh_signed): New function.
2439 (ppc64_emit_rsh_unsigned): New function.
2440 (ppc64_emit_ext): New function.
2441 (ppc64_emit_zero_ext): New function.
2442 (ppc64_emit_log_not): New function.
2443 (ppc64_emit_bit_and): New function.
2444 (ppc64_emit_bit_or): New function.
2445 (ppc64_emit_bit_xor): New function.
2446 (ppc64_emit_bit_not): New function.
2447 (ppc64_emit_equal): New function.
2448 (ppc64_emit_less_signed): New function.
2449 (ppc64_emit_less_unsigned): New function.
2450 (ppc64_emit_ref): New function.
2451 (ppc64_emit_const): New function.
2452 (ppc64v1_emit_reg): New function.
2453 (ppc64v2_emit_reg): New function.
2454 (ppc64_emit_pop): New function.
2455 (ppc64_emit_stack_flush): New function.
2456 (ppc64_emit_swap): New function.
2457 (ppc64v1_emit_call): New function.
2458 (ppc64v2_emit_call): New function.
2459 (ppc64v1_emit_int_call_1): New function.
2460 (ppc64v2_emit_int_call_1): New function.
2461 (ppc64v1_emit_void_call_2): New function.
2462 (ppc64v2_emit_void_call_2): New function.
2463 (ppc64_emit_if_goto): New function.
2464 (ppc64_emit_eq_goto): New function.
2465 (ppc64_emit_ne_goto): New function.
2466 (ppc64_emit_lt_goto): New function.
2467 (ppc64_emit_le_goto): New function.
2468 (ppc64_emit_gt_goto): New function.
2469 (ppc64_emit_ge_goto): New function.
2470 (ppc64v1_emit_ops_impl): New static variable.
2471 (ppc64v2_emit_ops_impl): New static variable.
2472 (ppc_emit_ops): New function.
2473 (linux_low_target): Wire in ppc_emit_ops.
2474
a2174ba4
MK
24752016-03-31 Wei-cheng Wang <cole945@gmail.com>
2476 Marcin Kościelnicki <koriakin@0x04.net>
2477
2478 PR/17221
2479 * Makefile.in: Add powerpc-*-ipa.o
2480 * configure.srv: Add ipa_obj for powerpc*-linux.
2481 * linux-ppc-ipa.c: New file.
2482 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2483 includes.
2484 (PPC_FIELD): New macro.
2485 (PPC_SEXT): New macro.
2486 (PPC_OP6): New macro.
2487 (PPC_BO): New macro.
2488 (PPC_LI): New macro.
2489 (PPC_BD): New macro.
2490 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2491 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2492 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2493 (ppc_get_thread_area): New function.
2494 (is_elfv2_inferior): New function.
2495 (gen_ds_form): New function.
2496 (GEN_STD): New macro.
2497 (GEN_STDU): New macro.
2498 (GEN_LD): New macro.
2499 (GEN_LDU): New macro.
2500 (gen_d_form): New function.
2501 (GEN_ADDI): New macro.
2502 (GEN_ADDIS): New macro.
2503 (GEN_LI): New macro.
2504 (GEN_LIS): New macro.
2505 (GEN_ORI): New macro.
2506 (GEN_ORIS): New macro.
2507 (GEN_LWZ): New macro.
2508 (GEN_STW): New macro.
2509 (GEN_STWU): New macro.
2510 (gen_xfx_form): New function.
2511 (GEN_MFSPR): New macro.
2512 (GEN_MTSPR): New macro.
2513 (GEN_MFCR): New macro.
2514 (GEN_MTCR): New macro.
2515 (GEN_SYNC): New macro.
2516 (GEN_LWSYNC): New macro.
2517 (gen_x_form): New function.
2518 (GEN_OR): New macro.
2519 (GEN_MR): New macro.
2520 (GEN_LWARX): New macro.
2521 (GEN_STWCX): New macro.
2522 (GEN_CMPW): New macro.
2523 (gen_md_form): New function.
2524 (GEN_RLDICL): New macro.
2525 (GEN_RLDICR): New macro.
2526 (gen_i_form): New function.
2527 (GEN_B): New macro.
2528 (GEN_BL): New macro.
2529 (gen_b_form): New function.
2530 (GEN_BNE): New macro.
2531 (GEN_LOAD): New macro.
2532 (GEN_STORE): New macro.
2533 (gen_limm): New function.
2534 (gen_atomic_xchg): New function.
2535 (gen_call): New function.
2536 (ppc_relocate_instruction): New function.
2537 (ppc_install_fast_tracepoint_jump_pad): New function.
2538 (ppc_get_min_fast_tracepoint_insn_len): New function.
2539 (ppc_get_ipa_tdesc_idx): New function.
2540 (the_low_target): Wire in the new functions.
2541 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2542 tdescs.
2543 * linux-ppc-tdesc.h: New file.
2544
a13c4696
MK
25452016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2546
2547 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2548 (alloc_jump_pad_buffer): New function.
2549 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2550 (alloc_jump_pad_buffer): New function.
2551 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2552 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2553 (alloc_jump_pad_buffer): New function.
2554 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2555 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2556 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2557 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2558
1cda1512
MK
25592016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2560
2561 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2562 * linux-amd64-ipa.c: Likewise.
2563 * linux-i386-ipa.c: Likewise.
2564 * linux-s390-ipa.c: Likewise.
2565 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2566 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2567 set_trace_state_variable_value_ptr.
2568 (struct ipa_sym_addresses): Likewise.
2569 (symbol_list): Likewise.
2570 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2571 accessing gdb_collect directly.
2572 (gdb_collect_ptr_type): New typedef.
2573 (get_raw_reg_ptr_type): New typedef.
2574 (get_trace_state_variable_value_ptr_type): New typedef.
2575 (set_trace_state_variable_value_ptr_type): New typedef.
2576 (gdb_collect_ptr): New global.
2577 (get_raw_reg_ptr): New global.
2578 (get_trace_state_variable_value_ptr): New global.
2579 (set_trace_state_variable_value_ptr): New global.
2580 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2581 accessing get_raw_reg directly.
2582 (get_get_tsv_func_addr): Likewise for
2583 get_trace_state_variable_value_ptr.
2584 (get_set_tsv_func_addr): Likewise for
2585 set_trace_state_variable_value_ptr.
2586 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2587
72fb5488
SM
25882016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2589
2590 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2591
28170b88
MK
25922016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2593
2594 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2595 packets.
2596 (relocate_instruction): Remove own_buf.
2597 * server.c (own_buf): Make global.
2598 (handle_v_requests): Make global.
2599 * server.h (own_buf): New declaration.
2600 (handle_v_requests): New prototype.
2601
f39e8743
MK
26022016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2603
2604 PR 18377
2605 * linux-s390-low.c (add_insns): New function.
2606 (s390_emit_prologue): New function.
2607 (s390_emit_epilogue): New function.
2608 (s390_emit_add): New function.
2609 (s390_emit_sub): New function.
2610 (s390_emit_mul): New function.
2611 (s390_emit_lsh): New function.
2612 (s390_emit_rsh_signed): New function.
2613 (s390_emit_rsh_unsigned): New function.
2614 (s390_emit_ext): New function.
2615 (s390_emit_log_not): New function.
2616 (s390_emit_bit_and): New function.
2617 (s390_emit_bit_or): New function.
2618 (s390_emit_bit_xor): New function.
2619 (s390_emit_bit_not): New function.
2620 (s390_emit_equal): New function.
2621 (s390_emit_less_signed): New function.
2622 (s390_emit_less_unsigned): New function.
2623 (s390_emit_ref): New function.
2624 (s390_emit_if_goto): New function.
2625 (s390_emit_goto): New function.
2626 (s390_write_goto_address): New function.
2627 (s390_emit_litpool): New function.
2628 (s390_emit_const): New function.
2629 (s390_emit_call): New function.
2630 (s390_emit_reg): New function.
2631 (s390_emit_pop): New function.
2632 (s390_emit_stack_flush): New function.
2633 (s390_emit_zero_ext): New function.
2634 (s390_emit_swap): New function.
2635 (s390_emit_stack_adjust): New function.
2636 (s390_emit_set_r2): New function.
2637 (s390_emit_int_call_1): New function.
2638 (s390_emit_void_call_2): New function.
2639 (s390_emit_eq_goto): New function.
2640 (s390_emit_ne_goto): New function.
2641 (s390_emit_lt_goto): New function.
2642 (s390_emit_le_goto): New function.
2643 (s390_emit_gt_goto): New function.
2644 (s390_emit_ge_goto): New function.
2645 (s390x_emit_prologue): New function.
2646 (s390x_emit_epilogue): New function.
2647 (s390x_emit_add): New function.
2648 (s390x_emit_sub): New function.
2649 (s390x_emit_mul): New function.
2650 (s390x_emit_lsh): New function.
2651 (s390x_emit_rsh_signed): New function.
2652 (s390x_emit_rsh_unsigned): New function.
2653 (s390x_emit_ext): New function.
2654 (s390x_emit_log_not): New function.
2655 (s390x_emit_bit_and): New function.
2656 (s390x_emit_bit_or): New function.
2657 (s390x_emit_bit_xor): New function.
2658 (s390x_emit_bit_not): New function.
2659 (s390x_emit_equal): New function.
2660 (s390x_emit_less_signed): New function.
2661 (s390x_emit_less_unsigned): New function.
2662 (s390x_emit_ref): New function.
2663 (s390x_emit_if_goto): New function.
2664 (s390x_emit_const): New function.
2665 (s390x_emit_call): New function.
2666 (s390x_emit_reg): New function.
2667 (s390x_emit_pop): New function.
2668 (s390x_emit_stack_flush): New function.
2669 (s390x_emit_zero_ext): New function.
2670 (s390x_emit_swap): New function.
2671 (s390x_emit_stack_adjust): New function.
2672 (s390x_emit_int_call_1): New function.
2673 (s390x_emit_void_call_2): New function.
2674 (s390x_emit_eq_goto): New function.
2675 (s390x_emit_ne_goto): New function.
2676 (s390x_emit_lt_goto): New function.
2677 (s390x_emit_le_goto): New function.
2678 (s390x_emit_gt_goto): New function.
2679 (s390x_emit_ge_goto): New function.
2680 (s390_emit_ops): New function.
2681 (struct linux_target_ops): Fill in emit_ops hook.
2682
abd9baf9
MK
26832016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2684
2685 PR 18377
2686 * Makefile.in: Add s390 IPA files.
2687 * configure.srv: Build IPA for s390.
2688 * linux-s390-ipa.c: New file.
2689 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2690 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2691 (tdesc_s390_linux32): Likewise.
2692 (init_registers_s390_linux32v1): Likewise.
2693 (tdesc_s390_linux32v1): Likewise.
2694 (init_registers_s390_linux32v2): Likewise.
2695 (tdesc_s390_linux32v2): Likewise.
2696 (init_registers_s390_linux64): Likewise.
2697 (tdesc_s390_linux64): Likewise.
2698 (init_registers_s390_linux64v1): Likewise.
2699 (tdesc_s390_linux64v1): Likewise.
2700 (init_registers_s390_linux64v2): Likewise.
2701 (tdesc_s390_linux64v2): Likewise.
2702 (init_registers_s390_te_linux64): Likewise.
2703 (tdesc_s390_te_linux64): Likewise.
2704 (init_registers_s390_vx_linux64): Likewise.
2705 (tdesc_s390_vx_linux64): Likewise.
2706 (init_registers_s390_tevx_linux64): Likewise.
2707 (tdesc_s390_tevx_linux64): Likewise.
2708 (init_registers_s390x_linux64): Likewise.
2709 (tdesc_s390x_linux64): Likewise.
2710 (init_registers_s390x_linux64v1): Likewise.
2711 (tdesc_s390x_linux64v1): Likewise.
2712 (init_registers_s390x_linux64v2): Likewise.
2713 (tdesc_s390x_linux64v2): Likewise.
2714 (init_registers_s390x_te_linux64): Likewise.
2715 (tdesc_s390x_te_linux64): Likewise.
2716 (init_registers_s390x_vx_linux64): Likewise.
2717 (tdesc_s390x_vx_linux64): Likewise.
2718 (init_registers_s390x_tevx_linux64): Likewise.
2719 (tdesc_s390x_tevx_linux64): Likewise.
2720 (have_hwcap_s390_vx): New static variable.
2721 (s390_arch_setup): Fill have_hwcap_s390_vx.
2722 (s390_get_thread_area): New function.
2723 (s390_ft_entry_gpr_esa): New const.
2724 (s390_ft_entry_gpr_zarch): New const.
2725 (s390_ft_entry_misc): New const.
2726 (s390_ft_entry_fr): New const.
2727 (s390_ft_entry_vr): New const.
2728 (s390_ft_main_31): New const.
2729 (s390_ft_main_64): New const.
2730 (s390_ft_exit_fr): New const.
2731 (s390_ft_exit_vr): New const.
2732 (s390_ft_exit_misc): New const.
2733 (s390_ft_exit_gpr_esa): New const.
2734 (s390_ft_exit_gpr_zarch): New const.
2735 (append_insns): New function.
2736 (s390_relocate_instruction): New function.
2737 (s390_install_fast_tracepoint_jump_pad): New function.
2738 (s390_get_min_fast_tracepoint_insn_len): New function.
2739 (s390_get_ipa_tdesc_idx): New function.
2740 (struct linux_target_ops): Wire in the above functions.
2741 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2742 * linux-s390-tdesc.h: New file.
2743
a4105d04
MK
27442016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2745
2746 * linux-s390-low.c (s390_supports_tracepoints): New function.
2747 (struct linux_target_ops): Fill supports_tracepoints hook.
2748
35ac8b3e
YQ
27492016-03-18 Yao Qi <yao.qi@linaro.org>
2750
2751 * linux-low.c (lwp_signal_can_be_delivered): New function.
2752 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2753
94610ec4
YQ
27542016-03-18 Yao Qi <yao.qi@linaro.org>
2755
2756 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2757 0 if signal is enqueued. Remove 'signal' from one debugging
2758 message. Move one debugging message to some lines below.
2759 Remove code setting 'signal' to 0.
2760
80aea927
YQ
27612016-03-18 Yao Qi <yao.qi@linaro.org>
2762
2763 * linux-low.c (linux_low_filter_event): Remove redundant
2764 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2765
b04fd3be
MK
27662016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2767
2768 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2769 (struct linux_target_ops): Wire in the above.
2770
c40c8d4b
YQ
27712016-03-03 Yao Qi <yao.qi@linaro.org>
2772
2773 * linux-low.c: Update comments to start_step_over.
2774
0f8288ae
YQ
27752016-03-03 Yao Qi <yao.qi@linaro.org>
2776
2777 PR server/19736
2778 * linux-low.c (handle_extended_wait): Set child suspended
2779 if event_lwp->bp_reinsert isn't zero.
2780
fdbd04a8
YQ
27812016-03-02 Yao Qi <yao.qi@linaro.org>
2782
2783 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2784 enqueue_pending_signal.
2785
6896a8fa
MK
27862016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2787
2788 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2789 is actually loaded.
2790
ab503087
MK
27912016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2792
2793 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2794 (s390_regmap_3264) [!__s390x__]: New global.
2795 (s390_collect_ptrace_register): Skip map entries containing -1.
2796 (s390_supply_ptrace_register): Ditto.
2797 (s390_fill_gprs_high): New function.
2798 (s390_store_gprs_high): New function.
2799 (s390_regsets): Add NT_S390_HIGH_GPRS.
2800 (s390_get_hwcap): Enable on 31-bit.
2801 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2802 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2803 Detect NT_S390_HIGH_GPRS.
2804 (s390_usrregs_info_3264): Enable on 31-bit.
2805 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2806 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2807
ae91f625
MK
28082016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2809
2810 PR gdb/13808
2811 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2812 * configure.srv: Ditto.
2813 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2814 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2815 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2816 (init_registers_amd64_linux): Remove prototype.
2817 (tdesc_amd64_linux): Remove declaration.
2818 (get_ipa_tdesc): New function.
2819 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2820 initialize remaining tdescs.
2821 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2822 (init_registers_i386_linux): Remove prototype.
2823 (tdesc_i386_linux): Remove declaration.
2824 (get_ipa_tdesc): New function.
2825 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2826 initialize remaining tdescs.
2827 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2828 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2829 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2830 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2831 (x86_get_ipa_tdesc_idx): New function.
2832 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2833 * linux-x86-tdesc.h: New file.
2834 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2835 (target_get_ipa_tdesc_idx): New macro.
2836 * tracepoint.c (ipa_tdesc_idx): New macro.
2837 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2838 (symbol_list): Add ipa_tdesc_idx.
2839 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2840 (ipa_tdesc): Remove.
2841 (ipa_tdesc_idx): New variable.
2842 (get_context_regcache): Use get_ipa_tdesc.
2843 (gdb_collect): Ditto.
2844 (gdb_probe): Ditto.
2845 * tracepoint.h (get_ipa_tdesc): New prototype.
2846 (ipa_tdesc): Remove.
2847
e7ad2f14
PA
28482016-02-24 Pedro Alves <palves@redhat.com>
2849
2850 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2851 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2852 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2853 Factor out common code between the USE_SIGTRAP_SIGINFO and
2854 !USE_SIGTRAP_SIGINFO blocks.
2855 (linux_low_filter_event): Call save_stop_reason instead of
2856 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2857 Update comments.
2858 (linux_wait_1): Update comments.
2859
657f9cde
WW
28602016-02-24 Wei-cheng Wang <cole945@gmail.com>
2861
2862 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2863 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2864 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2865 ppc_insert_point, ppc_remove_point.
2866
b00b61e1
MK
28672016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2868
2869 * linux-s390-low.c (s390_supports_z_point_type): New function.
2870 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2871
553cb527
YQ
28722016-02-16 Yao Qi <yao.qi@linaro.org>
2873
2874 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2875 PC. Get pc from regcache_read_pc.
2876
a5652c21
YQ
28772016-02-12 Yao Qi <yao.qi@linaro.org>
2878
2879 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2880 or linux_get_pc_32bit.
2881 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2882
ed443b61
YQ
28832016-02-12 Yao Qi <yao.qi@linaro.org>
2884
2885 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2886 arm_linux_get_next_pcs_fixup.
2887
020ecd38
MK
28882016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2889
2890 * tracepoint.c (x_tracepoint_action_download): Change
2891 write_inferior_data_ptr to write_inferior_data_pointer.
2892 (cmd_qtstart): Likewise.
2893 (write_inferior_data_ptr): Remove.
2894 (download_agent_expr): Change write_inferior_data_ptr to
2895 write_inferior_data_pointer.
2896 (download_tracepoint_1): Likewise.
2897 (download_tracepoint): Likewise.
2898 (download_trace_state_variables): Likewise.
2899
7cae9051
WW
29002016-02-11 Wei-cheng Wang <cole945@gmail.com>
2901 Marcin Kościelnicki <koriakin@0x04.net>
2902
2903 * tracepoint.c (struct tracepoint_action_ops): Remove.
2904 (struct tracepoint_action): Remove ops.
2905 (m_tracepoint_action_download, r_tracepoint_action_download)
2906 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2907 size and offset accordingly.
2908 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2909 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2910 (tracepoint_action_send, tracepoint_action_download): New functions.
2911 Helpers for trace action handlers.
2912 (add_tracepoint_action): Remove setup actions ops.
2913 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2914
9f6a71b4
YQ
29152016-02-10 Yao Qi <yao.qi@linaro.org>
2916
2917 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2918
1e94266c
SM
29192016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2920
2921 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2922 to AC_OUTPUT.
2923 * configure: Regenerate.
2924
8adce034
SM
29252016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2926
2927 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2928 void * to gdb_byte *.
2929 * linux-low.c (siginfo_fixup): Likewise.
2930 (linux_xfer_siginfo): Likewise.
2931 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2932 Likewise.
2933 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2934
93813b37
WT
29352016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2936
2937 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2938 to srv_tgtobj.
2939 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2940 to srv_tgtobj.
2941 * linux-x86-low.c [__x86_64__]: Include
2942 "nat/amd64-linux-siginfo.h".
2943 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2944 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2945 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2946 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2947 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2948 (cpt_si_fd, si_timerid, si_overrun): Move from
2949 nat/amd64-linux-siginfo.c.
2950 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2951
8424cc97
SM
29522016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2953
2954 * server.c (skip_to_semicolon): Remove.
2955 (process_point_options): Use strchrnul instead of
2956 skip_to_semicolon.
2957
4d18591b
YQ
29582016-01-26 Yao Qi <yao.qi@linaro.org>
2959
2960 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2961 * linux-low.c (install_software_single_step_breakpoints): Don't
2962 call regcache_read_pc.
2963 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2964 argument pc.
2965
d8020970
YQ
29662016-01-26 Yao Qi <yao.qi@linaro.org>
2967
2968 * linux-low.c (install_software_single_step_breakpoints): Call
2969 regcache_read_pc instead of get_pc.
2970
8b207339
YQ
29712016-01-26 Yao Qi <yao.qi@linaro.org>
2972
2973 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2974 (unblock_async_io): Rename to ...
2975 (block_unblock_async_io): ... it. New function.
2976 (enable_async_io): Don't install SIGIO handler. Unblock it
2977 instead.
2978 (disable_async_io): Don't ignore SIGIO. Block it instead.
2979 (initialize_async_io): Install SIGIO handler. Don't call
2980 unblock_async_io.
2981
18879fef
YQ
29822016-01-26 Yao Qi <yao.qi@linaro.org>
2983
2984 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2985 first character is '\003', call *the_target->request_interrupt.
2986
a0f8e08a
YQ
29872016-01-25 Yao Qi <yao.qi@linaro.org>
2988
2989 * remote-utils.c (new_thread_notify): Remove.
2990 (dead_thread_notify): Likewise.
2991 * remote-utils.h (new_thread_notify): Remove declaration.
2992 (dead_thread_notify): Likewise.
2993
cc5fd9ab
MK
29942016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2995
2996 * gdb.trace/pending.exp: Fix expected message on continue.
2997
99e8eb11
MK
29982016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2999
3000 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3001 it works properly on big-endian machines where sizeof (CORE_ADDR)
3002 != sizeof (void *).
3003
a994041d
PA
30042016-01-21 Pedro Alves <palves@redhat.com>
3005
3006 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3007 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3008 * configure: Regenerate.
3009
f7a6a40d
YQ
30102016-01-21 Yao Qi <yao.qi@linaro.org>
3011
3012 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3013 is_thumb and set it according to CPSR saved on the stack.
3014 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3015 arm_sigreturn_next_pc.
3016
6f69e520
YQ
30172016-01-18 Yao Qi <yao.qi@linaro.org>
3018
3019 * linux-low.c (linux_set_pc_64bit): New function.
3020 (linux_get_pc_64bit): New function.
3021 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3022 Declare.
3023 * linux-sparc-low.c (debug_threads): Remove declaration.
3024 (sparc_get_pc): Remove.
3025 (the_low_target): Use linux_get_pc_64bit instead of
3026 sparc_get_pc.
3027 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3028 (the_low_target): Use linux_get_pc_64bit and
3029 linux_set_pc_64bit.
3030
276d4552
YQ
30312016-01-18 Yao Qi <yao.qi@linaro.org>
3032
3033 * linux-arm-low.c (debug_threads): Remove declaration.
3034 (arm_get_pc, arm_set_pc): Remove.
3035 (the_low_target): Use linux_get_pc_32bit and
3036 linux_set_pc_32bit.
3037 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3038 (the_low_target): Use linux_get_pc_32bit and
3039 linux_set_pc_32bit.
3040 * linux-cris-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-crisv32-low.c (debug_threads): Remove declaration.
3045 (cris_get_pc, cris_set_pc): Remove.
3046 (the_low_target): Use linux_get_pc_32bit and
3047 linux_set_pc_32bit.
3048 * linux-low.c: Include inttypes.h.
3049 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3050 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3051 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3052 (the_low_target): Use linux_get_pc_32bit and
3053 linux_set_pc_32bit.
3054 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3055 (the_low_target): Use linux_get_pc_32bit and
3056 linux_set_pc_32bit.
3057 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3058 (the_low_target): Use linux_get_pc_32bit and
3059 linux_set_pc_32bit.
3060 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3061 (the_low_target): Use linux_get_pc_32bit and
3062 linux_set_pc_32bit.
3063 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3064 (the_low_target): Use linux_get_pc_32bit and
3065 linux_set_pc_32bit.
3066
eb0edac8
GB
30672016-01-18 Gary Benson <gbenson@redhat.com>
3068
3069 * configure.ac (AC_FUNC_FORK): New check.
3070 * config.in: Regenerate.
3071 * configure: Likewise.
3072
1b451dda
YQ
30732016-01-14 Yao Qi <yao.qi@linaro.org>
3074
3075 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3076 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3077 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3078 arm_get_next_pcs_ctor.
3079
82075af2
JS
30802016-01-12 Josh Stone <jistone@redhat.com>
3081 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3082
3083 * inferiors.h: Include "gdb_vecs.h".
3084 (struct process_info): Add syscalls_to_catch.
3085 * inferiors.c (remove_process): Free syscalls_to_catch.
3086 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3087 syscall_return stops.
3088 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3089 * server.c (handle_general_set): Handle QCatchSyscalls.
3090 (handle_query): Report support for QCatchSyscalls.
3091 * target.h (struct target_ops): Add supports_catch_syscall.
3092 (target_supports_catch_syscall): New macro.
3093 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3094 (struct lwp_info): Add syscall_state.
3095 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3096 Maintain syscall_state and syscalls_to_catch across exec.
3097 (get_syscall_trapinfo): New function, proxy to the_low_target.
3098 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3099 (linux_low_filter_event): Toggle syscall_state entry/return for
3100 syscall traps, and set it ignored for all others.
3101 (gdb_catching_syscalls_p): New function.
3102 (gdb_catch_this_syscall_p): New function.
3103 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3104 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3105 (linux_supports_catch_syscall): New function.
3106 (linux_target_ops): Install it.
3107 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3108 (the_low_target): Install it.
3109
8f13a3ce
MF
31102016-01-12 Mike Frysinger <vapier@gentoo.org>
3111
3112 * acinclude.m4: Include new ../warning.m4 file.
3113 * configure: Regenerated.
3114 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3115
5b3da067
MF
31162016-01-12 Mike Frysinger <vapier@gentoo.org>
3117
3118 * ax.c (is_goto_target): Mark static.
3119 * linux-low.c (register_addr): Likewise.
3120 (linux_fetch_registers, linux_store_registers): Likewise.
3121 * mem-break.c (any_persistent_commands): Fix old prototype.
3122 (add_commands_to_breakpoint): Mark static.
3123 * regcache.c (find_register_by_name): Delete unused func.
3124 * remote-utils.c (hex_or_minus_one): Mark static.
3125 * server.c (monitor_show_help): Mark static.
3126 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3127 handle_v_requests): Likewise.
3128
bc504a31
PA
31292016-01-12 Pedro Alves <palves@redhat.com>
3130
3131 Remove use of the registered trademark symbol throughout.
3132
5a0dd67a
YQ
31332016-01-08 Yao Qi <yao.qi@linaro.org>
3134
3135 * remote-utils.c (getpkt): If c is '\003', call target hook
3136 request_interrupt.
3137
b2ca446f
YQ
31382016-01-06 Yao Qi <yao.qi@linaro.org>
3139
3140 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3141 linux-aarch32-low.c.
3142 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3143 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3144 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3145 (thumb2_breakpoint): Declare.
3146 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3147 linux-aarch32-low.h.
3148 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3149 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3150 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3151
edd88788
JB
31522016-01-01 Joel Brobecker <brobecker@adacore.com>
3153
3154 * gdbreplay.c (gdbreplay_version): Change copyright year in
3155 version message.
3156 * server.c (gdbserver_version): Likewise.
3157
65da7f14
PP
31582015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3159
3160 * server.c (crc32_table): Delete.
3161 (crc32): Use libiberty's xcrc32 function.
3162
4abd5ed2
JB
31632015-12-22 Joel Brobecker <brobecker@adacore.com>
3164
3165 * lynx-low.c (lynx_delete_thread_callback): New function.
3166 (lynx_mourn): Properly delete our process and all of its
3167 threads. Remove call to clear_inferiors.
3168
0e50fe5c
JB
31692015-12-22 Joel Brobecker <brobecker@adacore.com>
3170
3171 * target.c (thread_search_callback): Add check that
3172 the thread_stopped target callback is not NULL before
3173 calling it.
3174
35adc03f
YQ
31752015-12-21 Yao Qi <yao.qi@linaro.org>
3176
3177 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3178 arm breakpoint.
3179
bd2b2909
AT
31802015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3181
3182 * server.c (handle_query): Call target_supports_software_single_step.
3183
7fe5e27e
AT
31842015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3185
3186 * linux-low.c (single_step): New function.
3187 (linux_resume_one_lwp_throw): Call single_step.
3188 (start_step_over): Likewise.
3189
d9311bfa
AT
31902015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3191
3192 * Makefile.in (SFILES): Append arch/arm-linux.c,
3193 arch/arm-get-next-pcs.c.
3194 (arm-linux.o): New rule.
3195 (arm-get-next-pcs.o): New rule.
3196 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3197 arm-linux.o.
3198 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3199 to linux-aarch32-low.c.
3200 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3201 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3202 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3203 (thumb2_breakpoint_len): Likewise.
3204 (arm_is_thumb_mode): Make non-static.
3205 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3206 from linux-aarch32-low.c.
3207 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3208 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3209 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3210 (thumb2_breakpoint_len): Likewise.
3211 (arm_is_thumb_mode): New declaration.
3212 * linux-arm-low.c: Include arch/arm-linux.h
3213 aarch/arm-get-next-pcs.h, sys/syscall.h.
3214 (get_next_pcs_ops): New struct.
3215 (get_next_pcs_addr_bits_remove): New function.
3216 (get_next_pcs_is_thumb): New function.
3217 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3218 (arm_sigreturn_next_pc): Likewise.
3219 (get_next_pcs_syscall_next_pc): Likewise.
3220 (arm_gdbserver_get_next_pcs): Likewise.
3221 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3222 Initialize.
3223 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3224 * server.h: Include gdb_vecs.h.
3225
68ce2059
AT
32262015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3227
3228 * Makefile.in (SFILES): Append common/common-regcache.c.
3229 (OBS): Append common-regcache.o.
3230 (common-regcache.o): New rule.
3231 * regcache.c (init_register_cache): Initialize cache to
3232 REG_UNAVAILABLE.
3233 (regcache_raw_read_unsigned): New function.
3234 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3235 register_status enum.
3236
fa5308bd
AT
32372015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3238
3239 * linux-aarch64-low.c (the_low_targets): Rename
3240 breakpoint_reinsert_addr to get_next_pcs.
3241 * linux-arm-low.c (the_low_targets): Likewise.
3242 * linux-bfin-low.c (the_low_targets): Likewise.
3243 * linux-cris-low.c (the_low_targets): Likewise.
3244 * linux-crisv32-low.c (the_low_targets): Likewise.
3245 * linux-low.c (can_software_single_step): Likewise.
3246 (install_software_single_step_breakpoints): New function.
3247 (start_step_over): Use install_software_single_step_breakpoints.
3248 * linux-low.h: New CORE_ADDR vector.
3249 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3250 get_next_pcs.
3251 * linux-mips-low.c (the_low_targets): Likewise.
3252 * linux-nios2-low.c (the_low_targets): Likewise.
3253 * linux-sparc-low.c (the_low_targets): Likewise.
3254
4a6ed09b
PA
32552015-12-17 Pedro Alves <palves@redhat.com>
3256
3257 * linux-low.c (linux_kill_one_lwp): Remove references to
3258 LinuxThreads.
3259 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3260 to 'kill'.
3261 (linux_init_signals): Delete.
3262 (initialize_low): Adjust.
3263 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3264
7544db95
PA
32652015-12-16 Pedro Alves <palves@redhat.com>
3266
3267 * configure.ac (compiler warning flags): When testing a
3268 -Wno-foo option, check whether -Wfoo works instead.
3269 * configure: Regenerate.
3270
8020350c
DB
32712015-12-11 Don Breazeal <donb@codesourcery.com>
3272
3273 * server.c (process_serial_event): Don't exit from gdbserver
3274 in remote mode if there are still active inferiors.
3275
db91f502
YQ
32762015-12-11 Yao Qi <yao.qi@linaro.org>
3277
3278 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3279 arm_breakpoint_at if the process is 32-bit.
3280
b37a6290
YQ
32812015-12-11 Yao Qi <yao.qi@linaro.org>
3282
3283 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3284 arm breakpoint.
3285
17b1509a
YQ
32862015-12-07 Yao Qi <yao.qi@linaro.org>
3287
3288 * configure.srv: Append arm.o to srv_tgtobj for
3289 aarch64*-*-linux* target.
3290 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3291 from linux-arm-low.c.
3292 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3293 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3294 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3295 (thumb2_breakpoint_len): Likewise.
3296 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3297 (arm_breakpoint_kinds): Likewise.
3298 (arm_breakpoint_kind_from_pc): Likewise.
3299 (arm_sw_breakpoint_from_kind): Likewise.
3300 (arm_breakpoint_kind_from_current_state): Likewise.
3301 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3302 (arm_sw_breakpoint_from_kind): Declare.
3303 (arm_breakpoint_kind_from_current_state): Declare.
3304 (arm_breakpoint_at): Declare.
3305 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3306 arm_sw_breakpoint_from_kind if process is 32-bit.
3307 (aarch64_breakpoint_kind_from_pc): New function.
3308 (aarch64_breakpoint_kind_from_current_state): New function.
3309 (the_low_target): Initialize fields breakpoint_kind_from_pc
3310 and breakpoint_kind_from_current_state.
3311 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3312 linux-aarch32-low.c.
3313 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3314 (arm_breakpoint, arm_breakpoint_len): Likewise.
3315 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3316 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3317 (arm_is_thumb_mode): Likewise.
3318 (arm_breakpoint_at): Likewise.
3319 (arm_breakpoint_kind_from_pc): Likewise.
3320 (arm_sw_breakpoint_from_kind): Likewise.
3321 (arm_breakpoint_kind_from_current_state): Likewise.
3322
3323 Revert:
3324 2015-08-04 Yao Qi <yao.qi@linaro.org>
3325
3326 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3327 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3328 * server.c (extended_protocol): Remove "static".
3329 * server.h (extended_protocol): Declare it.
3330
ece66d65
JS
33312015-12-04 Josh Stone <jistone@redhat.com>
3332
3333 * target.h (struct target_ops) <arch_setup>: Rename to ...
3334 (struct target_ops) <post_create_inferior>: ... this.
3335 (target_arch_setup): Rename to ...
3336 (target_post_create_inferior): ... this, calling post_create_inferior.
3337 * server.c (start_inferior): Update target_arch_setup calls to
3338 target_post_create_inferior.
3339 * linux-low.c (linux_low_ptrace_options): Forward declare.
3340 (linux_arch_setup): Update its comment for general use.
3341 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3342 (struct linux_target_ops): Use linux_post_create_inferior.
3343 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3344 to post_create_inferior.
3345 * nto-low.c (struct nto_target_ops): Likewise.
3346 * spu-low.c (struct spu_target_ops): Likewise.
3347 * win32-low.c (struct win32_target_ops): Likewise.
3348
e58c48b4
AT
33492015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3350
3351 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3352
fbec8956
AT
33532015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3354
3355 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3356 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3357 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3358 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3359 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3360 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3361 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3362 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3363 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3364 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3365 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3366 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3367
9b4c5f87
AT
33682015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3369
3370 * linux-low.c (linux_look_up_symbols): Don't call
3371 linux_supports_traceclone.
3372 * linux-low.h (thread_db_init): Remove use_events argument.
3373 * thread-db.c (thread_db_use_event): Remove global variable.
3374 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3375 (struct thread_db) <td_create_bp>: Remove field.
3376 (thread_db_create_event): Remove function.
3377 (thread_db_enable_reporting): Likewise.
3378 (find_one_thread): Don't check for thread_db_use_events.
3379 (attach_thread): Likewise.
3380 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3381 (try_thread_db_load_1): Don't check for thread_db_use_events.
3382 (thread_db_init): Remove use_events argument and thread events
3383 handling.
3384 (remove_thread_event_breakpoints): Remove function.
3385 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3386
7d00775e
AT
33872015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3388
3389 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3390 New function.
3391 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3392 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3393 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3394 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3395 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3396 Initialize.
3397 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3398 New function.
3399 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3400 * linux-low.c (can_hardware_single_step): Use
3401 supports_hardware_single_step.
3402 (can_software_single_step): New function.
3403 (start_step_over): Call can_software_single_step.
3404 (linux_supports_hardware_single_step): New function.
3405 (struct target_ops) <supports_software_single_step>: Initialize.
3406 * linux-low.h (struct linux_target_ops)
3407 <supports_hardware_single_step>: Initialize.
3408 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3409 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3410 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3411 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3412 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3413 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3414 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3415 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3416 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3417 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3418 Initialize.
3419 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3420 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3421 Initialize.
3422 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3423 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3424 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3425 New function.
3426 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3427 * target.h (struct target_ops): <supports_software_single_step>:
3428 New field.
3429 (target_supports_software_single_step): New macro.
3430
2d97cd35
AT
34312015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3432
3433 * linux-low.c (linux_wait_1): Fix pc advance condition.
3434 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3435 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3436
769ef81f
AT
34372015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3438
3439 * linux-arm-low.c (arm_is_thumb_mode): New function.
3440 (arm_breakpoint_at): Use arm_is_thumb_mode.
3441 (arm_breakpoint_kind_from_current_state): New function.
3442 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3443 Initialize.
3444 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3445 (linux_breakpoint_kind_from_current_state): New function.
3446 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3447 * linux-low.h (struct linux_target_ops)
3448 <breakpoint_kind_from_current_state>: New field.
3449 * target.h (struct target_ops): Likewise.
3450 (target_breakpoint_kind_from_current_state): New macro.
3451
1bebeeca
PA
34522015-11-30 Pedro Alves <palves@redhat.com>
3453
3454 * linux-low.c (linux_resume): Wake up the event loop before
3455 returning.
3456
a67a9fae
PA
34572015-11-30 Pedro Alves <palves@redhat.com>
3458
3459 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3460 check.
3461 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3462 to -1.
3463 * target.c (struct thread_search): New structure.
3464 (thread_search_callback): New function.
3465 (prev_general_thread): New global.
3466 (prepare_to_access_memory, done_accessing_memory): New functions.
3467 * target.h (prepare_to_access_memory, done_accessing_memory):
3468 Replace macros with function declarations.
3469
f2faf941
PA
34702015-11-30 Pedro Alves <palves@redhat.com>
3471
3472 PR 14618
3473 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3474 report TARGET_WAITKIND_NO_RESUMED.
3475 * remote-utils.c (prepare_resume_reply): Handle
3476 TARGET_WAITKIND_NO_RESUMED.
3477 * server.c (report_no_resumed): New global.
3478 (handle_query) <qSupported>: Handle "no-resumed+". Report
3479 "no-resumed+" support.
3480 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3481 return error if the client doesn't support no-resumed events.
3482 (push_stop_notification): New function.
3483 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3484 events if the client supports them.
3485
a681f9c9
PA
34862015-11-30 Pedro Alves <palves@redhat.com>
3487
3488 * linux-low.c (thread_still_has_status_pending_p): Don't check
3489 vCont;t here.
3490 (lwp_resumed): New function.
3491 (status_pending_p_callback): Return early if the LWP is not
3492 supposed to be resumed.
3493
65706a29
PA
34942015-11-30 Pedro Alves <palves@redhat.com>
3495
3496 * linux-low.c (handle_extended_wait): Assert that the LWP's
3497 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3498 thread create events, leave the new child's status pending.
3499 (linux_low_filter_event): If GDB wants to hear about thread exit
3500 events, leave the LWP marked dead and don't delete it.
3501 (linux_wait_for_event_filtered): Don't check for thread exit.
3502 (filter_exit_event): New function.
3503 (linux_wait_1): Use it, when returning an exit event.
3504 (linux_resume_one_lwp_throw): Assert that the LWP's
3505 waitstatus is TARGET_WAITKIND_IGNORE.
3506 * remote-utils.c (prepare_resume_reply): Handle
3507 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3508 * server.c (report_thread_events): New global.
3509 (handle_general_set): Handle QThreadEvents.
3510 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3511 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3512 TARGET_WAITKIND_THREAD_EXITED.
3513 * server.h (report_thread_events): Declare.
3514
56cf4bed
PA
35152015-11-30 Pedro Alves <palves@redhat.com>
3516
3517 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3518 the thread's last_resume_kind was resume_stop.
3519
500c1d85
PA
35202015-11-30 Pedro Alves <palves@redhat.com>
3521
3522 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3523 before returning.
3524
de979965
PA
35252015-11-30 Pedro Alves <palves@redhat.com>
3526
3527 * server.c (handle_v_requests): Handle vCtrlC.
3528
34c65914
PA
35292015-11-30 Pedro Alves <palves@redhat.com>
3530
3531 * gdbthread.h (find_any_thread_of_pid): Declare.
3532 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3533 functions.
3534 * server.c (handle_query): If current_thread is NULL, look for
3535 another thread of the selected process.
3536
79efa585 35372015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3538 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3539
3540 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3541 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3542 name in reply.
3543 * target.h (struct target_ops) <thread_name>: New field.
3544 (target_thread_name): New macro.
3545
80d82c19
JB
35462015-11-23 Joel Brobecker <brobecker@adacore.com>
3547
3548 * regcache.h (regcache_invalidate_pid): Add declaration.
3549 * regcache.c (regcache_invalidate_pid): New function, extracted
3550 from regcache_invalidate.
3551 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3552 Add trivial documentation comment.
3553 * lynx-low.c: Use regcache_invalidate_pid instead of
3554 regcache_invalidate.
3555
64da5dd5
JB
35562015-11-23 Joel Brobecker <brobecker@adacore.com>
3557
3558 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3559 and Elf64_auxv_t if the target is Android.
3560
37ce4055
DE
35612015-11-22 Doug Evans <xdje42@gmail.com>
3562
3563 * target.h: #include <sys/types.h>.
3564
06e03fff
PA
35652015-11-19 Pedro Alves <palves@redhat.com>
3566
3567 * linux-low.c (linux_process_qsupported): Change prototype.
3568 Adjust.
3569 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3570 Change prototype.
3571 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3572 and adjust to loop over all features.
3573 * server.c (handle_query) <qSupported>: Adjust to call
3574 target_process_qsupported once, passing it a vector of unprocessed
3575 features.
3576 * target.h (struct target_ops) <process_qsupported>: Change
3577 prototype.
3578 (target_process_qsupported): Adjust.
3579
9a084706
PA
35802015-11-19 Pedro Alves <palves@redhat.com>
3581
3582 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3583 mode.
3584 * configure: Regenerate.
3585
dad44a1f
PA
35862015-11-19 Pedro Alves <palves@redhat.com>
3587
3588 * configure: Regenerate.
3589
231c0592
YQ
35902015-11-19 Yao Qi <yao.qi@linaro.org>
3591
3592 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3593 type to uint32_t.
3594
6c1c9a8b
YQ
35952015-11-19 Yao Qi <yao.qi@linaro.org>
3596
3597 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3598 (struct aarch64_operand): Move enum out.
3599
9caa3311
YQ
36002015-11-19 Yao Qi <yao.qi@linaro.org>
3601
3602 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3603 struct user_fpsimd_state *.
3604 (aarch64_store_fpregset): Likewise.
3605
6a69a054
YQ
36062015-11-19 Yao Qi <yao.qi@linaro.org>
3607
3608 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3609 struct user_pt_regs *.
3610 (aarch64_store_gregset): Likewise.
3611
1798301e
PA
36122015-11-18 Pedro Alves <palves@redhat.com>
3613
3614 * Makefile.in (all_object_files): Add $IPA_OBJS.
3615
ce7715e2
PA
36162015-11-17 Pedro Alves <palves@redhat.com>
3617
3618 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3619 GDB_SIGNAL_0 and gdb_signal_to_string.
3620
c0879059
PA
36212015-11-17 Pedro Alves <palves@redhat.com>
3622
3623 * win32-low.c (handle_output_debug_string): Remove parameter.
3624 (win32_kill): Remove our_status local and adjust call to
3625 handle_output_debug_string.
3626 (get_child_debug_event): Adjust call to
3627 handle_output_debug_string.
3628
1996e237
SM
36292015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3630
3631 * linux-mips-low.c (mips_fill_gregset): Add cast.
3632 (mips_store_gregset): Likewise.
3633 (mips_fill_fpregset): Likewise.
3634 (mips_store_fpregset): Likewise.
3635
cbec665b
SM
36362015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3637
3638 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3639 priv.
3640
eb3e3c67
SM
36412015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3642
3643 * linux-mips-low.c (mips_linux_new_thread): Change type of
3644 watch_type to enum target_hw_bp_type.
3645
171de4b8
SM
36462015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3647
3648 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3649 Change return type to arm_hwbp_type.
3650
04248ead
SM
36512015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3652
3653 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3654 (arm_store_gregset): Likewise.
3655 * linux-arm-low.c (arm_get_hwcap): Likewise.
3656 (arm_read_description): Likewise.
3657
04b3479c
SM
36582015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3659
3660 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3661
2bc84e8a
SM
36622015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3663
3664 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3665 (ppc_fill_vsxregset): Likewise.
3666 (ppc_store_vsxregset): Likewise.
3667 (ppc_fill_vrregset): Likewise.
3668 (ppc_store_vrregset): Likewise.
3669 (ppc_fill_evrregset): Likewise.
3670 (ppc_store_evrregset): Likewise.
3671
e6c5bb05
SM
36722015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3673
3674 * linux-ppc-low.c (ppc_usrregs_info): Remove
3675 forward-declaration.
3676 (ppc_arch_setup): Move lower in file.
3677
7ea45d72
SM
36782015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3679
3680 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3681 (ps_pdwrite): Likewise.
3682
69291610
HW
36832015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3684
3685 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3686 to after assert checks.
3687
b42945fd
SM
36882015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3689
3690 * proc-service.c (ps_pdread): Add/adjust casts.
3691 (ps_pdwrite): Add/adjust casts.
3692
d6f85c84
SM
36932015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3694
3695 * server.c (handle_search_memory_1): Cast return value of
3696 memmem.
3697
f98cd059
SM
36982015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3699
3700 * server.c (write_qxfer_response): Change type of data to
3701 gdb_byte *.
3702
d2412fa5
PA
37032015-10-29 Pedro Alves <palves@redhat.com>
3704
3705 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3706
c17414a2
PA
37072015-10-29 Pedro Alves <palves@redhat.com>
3708
3709 * tracepoint.c (clear_installed_tracepoints): Add casts.
3710
e053fbc4
PA
37112015-10-29 Pedro Alves <palves@redhat.com>
3712
3713 * server.c (handle_v_cont, process_serial_event): Add enum
3714 gdb_signal casts to signal parsing code.
3715
add67df8
PA
37162015-10-29 Pedro Alves <palves@redhat.com>
3717
3718 * linux-low.h (NULL_REGSET): Define.
3719 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3720 * linux-arm-low.c (arm_regsets): Likewise.
3721 * linux-crisv32-low.c (cris_regsets): Likewise.
3722 * linux-m68k-low.c (m68k_regsets): Likewise.
3723 * linux-mips-low.c (mips_regsets): Likewise.
3724 * linux-nios2-low.c (nios2_regsets): Likewise.
3725 * linux-ppc-low.c (ppc_regsets): Likewise.
3726 * linux-s390-low.c (s390_regsets): Likewise.
3727 * linux-sh-low.c (sh_regsets): Likewise.
3728 * linux-sparc-low.c (sparc_regsets): Likewise.
3729 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3730 * linux-tile-low.c (tile_regsets): Likewise.
3731 * linux-x86-low.c (x86_regsets): Likewise.
3732 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3733
50bc912a
PA
37342015-10-29 Pedro Alves <palves@redhat.com>
3735
3736 * linux-low.h (NULL_REGSET): Define.
3737 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3738 * linux-arm-low.c (arm_regsets): Likewise.
3739 * linux-crisv32-low.c (cris_regsets): Likewise.
3740 * linux-m68k-low.c (m68k_regsets): Likewise.
3741 * linux-mips-low.c (mips_regsets): Likewise.
3742 * linux-nios2-low.c (nios2_regsets): Likewise.
3743 * linux-ppc-low.c (ppc_regsets): Likewise.
3744 * linux-s390-low.c (s390_regsets): Likewise.
3745 * linux-sh-low.c (sh_regsets): Likewise.
3746 * linux-sparc-low.c (sparc_regsets): Likewise.
3747 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3748 * linux-tile-low.c (tile_regsets): Likewise.
3749 * linux-x86-low.c (x86_regsets): Likewise.
3750 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3751
682b2546
DE
37522015-10-26 Doug Evans <dje@google.com>
3753
3754 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3755
963843d4
DE
37562015-10-26 Doug Evans <dje@google.com>
3757
3758 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3759
d41401ac
DE
37602015-10-26 Doug Evans <dje@google.com>
3761
3762 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3763 for debug_printf.
3764 (attach_thread, find_new_threads_callback): Ditto.
3765
3db28855
AT
37662015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3767
3768 * mem-break.h (set_breakpoint_data): Remove.
3769
fb78e89c
AT
37702015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3771
3772 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3773 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3774 (initialize_low): Remove set_breakpoint_data call.
3775 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3776 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3777 (initialize_low): Remove set_breakpoint_data call.
3778 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3779 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3780 (initialize_low): Remove set_breakpoint_data call.
3781
2e6ee069
AT
37822015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3783
3784 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3785 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3786 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3787 * target.h (target_breakpoint_kind_from_pc): New macro.
3788
1652a986
AT
37892015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3790
3791 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3792 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3793 the default breakpoint kind.
3794
abeead09
AT
37952015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3796
3797 * linux-arm-low.c (arm_supports_z_point_type): Add software
3798 breakpoint support.
3799
b0b4b501
AT
38002015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3801
3802 * linux-arm-low.c: Refactor breakpoint definitions.
3803 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3804 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3805
8689682c
AT
38062015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3807
3808 * Makefile.in: Add arm.c/o.
3809 * configure.srv: Likewise.
3810 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3811 (arm_breakpoint_kind_from_pc): New function.
3812 (arm_sw_breakpoint_from_kind): Return proper kind.
3813 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3814
27165294
AT
38152015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3816
3817 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3818 removal.
3819 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3820 (struct raw_breakpoint) <size>: Remove.
3821 (struct raw_breakpoint) <kind>: Add.
3822 (bp_size): New function.
3823 (bp_opcode): Likewise.
3824 (find_raw_breakpoint_at): Adjust for kind.
3825 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3826 (remove_memory_breakpoint): Adjust for kind call bp_size.
3827 (set_raw_breakpoint_at): Adjust for kind.
3828 (set_breakpoint): Likewise.
3829 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3830 (delete_raw_breakpoint): Adjust for kind.
3831 (delete_breakpoint): Likewise.
3832 (find_gdb_breakpoint): Likewise.
3833 (set_gdb_breakpoint_1): Likewise.
3834 (set_gdb_breakpoint): Likewise.
3835 (delete_gdb_breakpoint_1): Likewise.
3836 (delete_gdb_breakpoint): Likewise.
3837 (uninsert_raw_breakpoint): Likewise.
3838 (reinsert_raw_breakpoint): Likewise.
3839 (set_breakpoint_data): Remove.
3840 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3841 (check_mem_read): Adjust for kind call bp_size.
3842 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3843 (clone_one_breakpoint): Adjust for kind.
3844 * mem-break.h (set_gdb_breakpoint): Likewise.
3845 (delete_gdb_breakpoint): Likewise.
3846 * server.c (process_serial_event): Likewise.
3847
dd373349
AT
38482015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3849
3850 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3851 (struct linux_target_ops) <breakpoint>: Remove.
3852 (struct linux_target_ops) <breakpoint_len>: Remove.
3853 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3854 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3855 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3856 (arm_sw_breakpoint_from_kind): New function.
3857 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3858 (struct linux_target_ops) <breakpoint>: Remove.
3859 (struct linux_target_ops) <breakpoint_len>: Remove.
3860 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3861 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3862 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3863 (struct linux_target_ops) <breakpoint>: Remove.
3864 (struct linux_target_ops) <breakpoint_len>: Remove.
3865 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3866 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3867 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3868 (struct linux_target_ops) <breakpoint>: Remove.
3869 (struct linux_target_ops) <breakpoint_len>: Remove.
3870 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3871 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3872 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3873 and sw_breakpoint_from_kind to increment the pc.
3874 (linux_breakpoint_kind_from_pc): New function.
3875 (linux_sw_breakpoint_from_kind): New function.
3876 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3877 (initialize_low): Call breakpoint_kind_from_pc and
3878 sw_breakpoint_from_kind to replace breakpoint_data/len.
3879 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3880 New field.
3881 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3882 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3883 (struct linux_target_ops) <breakpoint>: Remove.
3884 (struct linux_target_ops) <breakpoint_len>: Remove.
3885 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3886 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3887 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3888 (struct linux_target_ops) <breakpoint>: Remove.
3889 (struct linux_target_ops) <breakpoint_len>: Remove.
3890 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3891 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3892 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3893 (struct linux_target_ops) <breakpoint>: Remove.
3894 (struct linux_target_ops) <breakpoint_len>: Remove.
3895 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3896 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3897 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3898 (struct linux_target_ops) <breakpoint>: Remove.
3899 (struct linux_target_ops) <breakpoint_len>: Remove.
3900 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3901 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3902 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3903 (struct linux_target_ops) <breakpoint>: Remove.
3904 (struct linux_target_ops) <breakpoint_len>: Remove.
3905 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3906 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3907 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3908 (struct linux_target_ops) <breakpoint>: Remove.
3909 (struct linux_target_ops) <breakpoint_len>: Remove.
3910 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3911 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3912 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3913 (struct linux_target_ops) <breakpoint>: Remove.
3914 (struct linux_target_ops) <breakpoint_len>: Remove.
3915 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3916 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3917 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3918 (struct linux_target_ops) <breakpoint>: Remove.
3919 (struct linux_target_ops) <breakpoint_len>: Remove.
3920 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3921 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3922 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3923 (struct linux_target_ops) <breakpoint>: Remove.
3924 (struct linux_target_ops) <breakpoint_len>: Remove.
3925 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3926 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3927 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3928 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3929 (struct linux_target_ops) <breakpoint>: Remove.
3930 (struct linux_target_ops) <breakpoint_len>: Remove.
3931 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3932 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3933 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3934 (struct linux_target_ops) <breakpoint>: Remove.
3935 (struct linux_target_ops) <breakpoint_len>: Remove.
3936 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3937 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3938
4cd98a19
AT
39392015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3940
3941 * linux-cris-low.c (cris_get_pc): Remove void arg.
3942
774ee6d2
AR
39432015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3944
3945 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3946 variable name.
3947
833dcd29
AR
39482015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3949
3950 * inferiors.c (thread_pid_matches_callback): New function.
3951 (find_thread_process): New function.
3952 (remove_thread): Reset current_thread.
3953 (remove_process): Assert threads have been removed first.
3954
8d689ee5
YQ
39552015-10-15 Yao Qi <yao.qi@linaro.org>
3956
3957 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3958 if it is 3.
3959 (aarch64_remove_point): Likewise.
3960 * regcache.c (regcache_register_size): New function.
3961
1c2e1515
YQ
39622015-10-12 Yao Qi <yao.qi@linaro.org>
3963
3964 * linux-aarch64-low.c: Update all callers as emit_load_store
3965 is renamed to aarch64_emit_load_store.
3966
e1c587c3
YQ
39672015-10-12 Yao Qi <yao.qi@linaro.org>
3968
3969 * linux-aarch64-low.c: Update all callers of function renaming
3970 from emit_insn to aarch64_emit_insn.
3971
b6542f81
YQ
39722015-10-12 Yao Qi <yao.qi@linaro.org>
3973
3974 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3975 arch/aarch64-insn.h.
3976 (struct aarch64_memory_operand): Likewise.
3977 (ENCODE): Likewise.
3978 (emit_insn): Move to arch/aarch64-insn.c.
3979 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3980 (emit_load_store): Move to arch/aarch64-insn.c.
3981 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3982 (can_encode_int32): Remove.
3983
246994ce
YQ
39842015-10-12 Yao Qi <yao.qi@linaro.org>
3985
3986 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3987 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3988 (aarch64_relocate_instruction): Likewise.
3989 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3990 (struct aarch64_insn_visitor): Likewise.
3991
0badd99f
YQ
39922015-10-12 Yao Qi <yao.qi@linaro.org>
3993
3994 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3995 (struct aarch64_insn_visitor): New.
3996 (struct aarch64_insn_relocation_data): New.
3997 (aarch64_ftrace_insn_reloc_b): New function.
3998 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3999 (aarch64_ftrace_insn_reloc_cb): Likewise.
4000 (aarch64_ftrace_insn_reloc_tb): Likewise.
4001 (aarch64_ftrace_insn_reloc_adr): Likewise.
4002 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4003 (aarch64_ftrace_insn_reloc_others): Likewise.
4004 (visitor): New.
4005 (aarch64_relocate_instruction): Use visitor.
4006
dfaffe9d
YQ
40072015-10-12 Yao Qi <yao.qi@linaro.org>
4008
4009 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4010 int. Add argument buf.
4011 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4012 aarch64_relocate_instruction.
4013
70b439f0
YQ
40142015-10-12 Yao Qi <yao.qi@linaro.org>
4015
4016 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4017 argument insn. Remove local variable insn. Don't call
4018 target_read_uint32.
4019 (aarch64_install_fast_tracepoint_jump_pad): Call
4020 target_read_uint32.
4021
7781c06f
YQ
40222015-09-30 Yao Qi <yao.qi@linaro.org>
4023
4024 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4025 (emit_load_store_pair): Likewise.
4026
9a3c8263
SM
40272015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4028
4029 * dll.c (match_dll): Add cast(s).
4030 (unloaded_dll): Likewise.
4031 * linux-low.c (second_thread_of_pid_p): Likewise.
4032 (delete_lwp_callback): Likewise.
4033 (count_events_callback): Likewise.
4034 (select_event_lwp_callback): Likewise.
4035 (linux_set_resume_request): Likewise.
4036 * server.c (accumulate_file_name_length): Likewise.
4037 (emit_dll_description): Likewise.
4038 (handle_qxfer_threads_worker): Likewise.
4039 (visit_actioned_threads): Likewise.
4040 * thread-db.c (any_thread_of): Likewise.
4041 * tracepoint.c (same_process_p): Likewise.
4042 (match_blocktype): Likewise.
4043 (build_traceframe_info_xml): Likewise.
4044
224c3ddb
SM
40452015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4046
4047 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4048 assignment.
4049 (gdb_unparse_agent_expr): Likewise.
4050 * hostio.c (require_data): Likewise.
4051 (handle_pread): Likewise.
4052 * linux-low.c (disable_regset): Likewise.
4053 (fetch_register): Likewise.
4054 (store_register): Likewise.
4055 (get_dynamic): Likewise.
4056 (linux_qxfer_libraries_svr4): Likewise.
4057 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4058 (set_fast_tracepoint_jump): Likewise.
4059 (uninsert_fast_tracepoint_jumps_at): Likewise.
4060 (reinsert_fast_tracepoint_jumps_at): Likewise.
4061 (validate_inserted_breakpoint): Likewise.
4062 (clone_agent_expr): Likewise.
4063 * regcache.c (init_register_cache): Likewise.
4064 * remote-utils.c (putpkt_binary_1): Likewise.
4065 (decode_M_packet): Likewise.
4066 (decode_X_packet): Likewise.
4067 (look_up_one_symbol): Likewise.
4068 (relocate_instruction): Likewise.
4069 (monitor_output): Likewise.
4070 * server.c (handle_search_memory): Likewise.
4071 (handle_qxfer_exec_file): Likewise.
4072 (handle_qxfer_libraries): Likewise.
4073 (handle_qxfer): Likewise.
4074 (handle_query): Likewise.
4075 (handle_v_cont): Likewise.
4076 (handle_v_run): Likewise.
4077 (captured_main): Likewise.
4078 * target.c (write_inferior_memory): Likewise.
4079 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4080 * tracepoint.c (init_trace_buffer): Likewise.
4081 (add_tracepoint_action): Likewise.
4082 (add_traceframe): Likewise.
4083 (add_traceframe_block): Likewise.
4084 (cmd_qtdpsrc): Likewise.
4085 (cmd_qtdv): Likewise.
4086 (cmd_qtstatus): Likewise.
4087 (response_source): Likewise.
4088 (response_tsv): Likewise.
4089 (cmd_qtnotes): Likewise.
4090 (gdb_collect): Likewise.
4091 (initialize_tracepoint): Likewise.
4092
afbe19f8
PL
40932015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4094
4095 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4096 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4097 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4098 <NOP>: New.
4099 (enum aarch64_condition_codes): New enum.
4100 (w0): New static global.
4101 (fp): Likewise.
4102 (lr): Likewise.
4103 (struct aarch64_memory_operand) <type>: New
4104 MEMORY_OPERAND_POSTINDEX type.
4105 (postindex_memory_operand): New helper function.
4106 (emit_ret): New function.
4107 (emit_load_store_pair): New function, factored out of emit_stp
4108 with support for MEMORY_OPERAND_POSTINDEX.
4109 (emit_stp): Rewrite using emit_load_store_pair.
4110 (emit_ldp): New function.
4111 (emit_load_store): Likewise.
4112 (emit_ldr): Mention post-index instruction in comment.
4113 (emit_ldrh): New function.
4114 (emit_ldrb): New function.
4115 (emit_ldrsw): Mention post-index instruction in comment.
4116 (emit_str): Likewise.
4117 (emit_subs): New function.
4118 (emit_cmp): Likewise.
4119 (emit_and): Likewise.
4120 (emit_orr): Likewise.
4121 (emit_orn): Likewise.
4122 (emit_eor): Likewise.
4123 (emit_mvn): Likewise.
4124 (emit_lslv): Likewise.
4125 (emit_lsrv): Likewise.
4126 (emit_asrv): Likewise.
4127 (emit_mul): Likewise.
4128 (emit_sbfm): Likewise.
4129 (emit_sbfx): Likewise.
4130 (emit_ubfm): Likewise.
4131 (emit_ubfx): Likewise.
4132 (emit_csinc): Likewise.
4133 (emit_cset): Likewise.
4134 (emit_nop): Likewise.
4135 (emit_ops_insns): New helper function.
4136 (emit_pop): Likewise.
4137 (emit_push): Likewise.
4138 (aarch64_emit_prologue): New function.
4139 (aarch64_emit_epilogue): Likewise.
4140 (aarch64_emit_add): Likewise.
4141 (aarch64_emit_sub): Likewise.
4142 (aarch64_emit_mul): Likewise.
4143 (aarch64_emit_lsh): Likewise.
4144 (aarch64_emit_rsh_signed): Likewise.
4145 (aarch64_emit_rsh_unsigned): Likewise.
4146 (aarch64_emit_ext): Likewise.
4147 (aarch64_emit_log_not): Likewise.
4148 (aarch64_emit_bit_and): Likewise.
4149 (aarch64_emit_bit_or): Likewise.
4150 (aarch64_emit_bit_xor): Likewise.
4151 (aarch64_emit_bit_not): Likewise.
4152 (aarch64_emit_equal): Likewise.
4153 (aarch64_emit_less_signed): Likewise.
4154 (aarch64_emit_less_unsigned): Likewise.
4155 (aarch64_emit_ref): Likewise.
4156 (aarch64_emit_if_goto): Likewise.
4157 (aarch64_emit_goto): Likewise.
4158 (aarch64_write_goto_address): Likewise.
4159 (aarch64_emit_const): Likewise.
4160 (aarch64_emit_call): Likewise.
4161 (aarch64_emit_reg): Likewise.
4162 (aarch64_emit_pop): Likewise.
4163 (aarch64_emit_stack_flush): Likewise.
4164 (aarch64_emit_zero_ext): Likewise.
4165 (aarch64_emit_swap): Likewise.
4166 (aarch64_emit_stack_adjust): Likewise.
4167 (aarch64_emit_int_call_1): Likewise.
4168 (aarch64_emit_void_call_2): Likewise.
4169 (aarch64_emit_eq_goto): Likewise.
4170 (aarch64_emit_ne_goto): Likewise.
4171 (aarch64_emit_lt_goto): Likewise.
4172 (aarch64_emit_le_goto): Likewise.
4173 (aarch64_emit_gt_goto): Likewise.
4174 (aarch64_emit_ge_got): Likewise.
4175 (aarch64_emit_ops_impl): New static global variable.
4176 (aarch64_emit_ops): New target function, return
4177 &aarch64_emit_ops_impl.
4178 (struct linux_target_ops): Install it.
4179
bb903df0
PL
41802015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4181
4182 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4183 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4184 aarch64-ipa.o.
4185 * linux-aarch64-ipa.c: New file.
4186 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4187 and endian.h.
4188 (aarch64_get_thread_area): New target method.
4189 (extract_signed_bitfield): New helper function.
4190 (aarch64_decode_ldr_literal): New function.
4191 (enum aarch64_opcodes): New enum.
4192 (struct aarch64_register): New struct.
4193 (struct aarch64_operand): New struct.
4194 (x0): New static global.
4195 (x1): Likewise.
4196 (x2): Likewise.
4197 (x3): Likewise.
4198 (x4): Likewise.
4199 (w2): Likewise.
4200 (ip0): Likewise.
4201 (sp): Likewise.
4202 (xzr): Likewise.
4203 (aarch64_register): New helper function.
4204 (register_operand): Likewise.
4205 (immediate_operand): Likewise.
4206 (struct aarch64_memory_operand): New struct.
4207 (offset_memory_operand): New helper function.
4208 (preindex_memory_operand): Likewise.
4209 (enum aarch64_system_control_registers): New enum.
4210 (ENCODE): New macro.
4211 (emit_insn): New helper function.
4212 (emit_b): New function.
4213 (emit_bcond): Likewise.
4214 (emit_cb): Likewise.
4215 (emit_tb): Likewise.
4216 (emit_blr): Likewise.
4217 (emit_stp): Likewise.
4218 (emit_ldp_q_offset): Likewise.
4219 (emit_stp_q_offset): Likewise.
4220 (emit_load_store): Likewise.
4221 (emit_ldr): Likewise.
4222 (emit_ldrsw): Likewise.
4223 (emit_str): Likewise.
4224 (emit_ldaxr): Likewise.
4225 (emit_stxr): Likewise.
4226 (emit_stlr): Likewise.
4227 (emit_data_processing_reg): Likewise.
4228 (emit_data_processing): Likewise.
4229 (emit_add): Likewise.
4230 (emit_sub): Likewise.
4231 (emit_mov): Likewise.
4232 (emit_movk): Likewise.
4233 (emit_mov_addr): Likewise.
4234 (emit_mrs): Likewise.
4235 (emit_msr): Likewise.
4236 (emit_sevl): Likewise.
4237 (emit_wfe): Likewise.
4238 (append_insns): Likewise.
4239 (can_encode_int32_in): New helper function.
4240 (aarch64_relocate_instruction): New function.
4241 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4242 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4243 (struct linux_target_ops): Install aarch64_get_thread_area,
4244 aarch64_install_fast_tracepoint_jump_pad and
4245 aarch64_get_min_fast_tracepoint_insn_len.
4246
787749ea
PL
42472015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4248
4249 * Makefile.in (aarch64-insn.o): New rule.
4250 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4251
9812b2e6
YQ
42522015-09-21 Yao Qi <yao.qi@linaro.org>
4253
4254 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4255
18fe412b
YQ
42562015-09-21 Yao Qi <yao.qi@linaro.org>
4257
4258 * tracepoint.c (max_jump_pad_size): Remove.
4259
a0cc84cd
YQ
42602015-09-18 Yao Qi <yao.qi@linaro.org>
4261
4262 * linux-aarch64-low.c: Don't include sys/uio.h.
4263 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4264
d78908cf
WW
42652015-09-16 Wei-cheng Wang <cole945@gmail.com>
4266
4267 * tracepoint.c (eval_result_type): Change prototype.
4268 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4269
d57e0d50
PA
42702015-09-15 Pedro Alves <palves@redhat.com>
4271
4272 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4273 Check whether to report exec events instead of checking whether
4274 multiprocess is enabled.
4275
5a676acc
PA
42762015-09-15 Pedro Alves <palves@redhat.com>
4277
4278 PR remote/18965
4279 * remote-utils.c (prepare_resume_reply): Merge
4280 TARGET_WAITKIND_VFORK_DONE switch case with the
4281 TARGET_WAITKIND_FORKED case.
4282
7c5d0fad
YQ
42832015-09-15 Yao Qi <yao.qi@linaro.org>
4284
4285 * server.c (handle_query): Check string comparison using
4286 "else if" instead of "if".
4287
750ce8d1
YQ
42882015-09-15 Yao Qi <yao.qi@linaro.org>
4289
4290 * server.c (vCont_supported): New global variable.
4291 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4292 matches. Append ";vContSupported+" to own_buf.
4293 (handle_v_requests): Append ";s;S" to own_buf if target supports
4294 hardware single step or vCont_supported is false.
4295 (capture_main): Set vCont_supported to zero.
4296
70b90b91
YQ
42972015-09-15 Yao Qi <yao.qi@linaro.org>
4298
4299 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4300 it to ...
4301 (linux_supports_hardware_single_step): ... New function.
4302 (linux_target_ops): Update.
4303 * lynx-low.c (lynx_target_ops): Set field
4304 supports_hardware_single_step to target_can_do_hardware_single_step.
4305 * nto-low.c (nto_target_ops): Likewise.
4306 * spu-low.c (spu_target_ops): Likewise.
4307 * win32-low.c (win32_target_ops): Likewise.
4308 * target.c (target_can_do_hardware_single_step): New function.
4309 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4310 Remove. <supports_hardware_single_step>: New field.
4311 (target_supports_conditional_breakpoints): Remove.
4312 (target_supports_hardware_single_step): New macro.
4313 (target_can_do_hardware_single_step): Declare.
4314 * server.c (handle_query): Use target_supports_hardware_single_step
4315 instead of target_supports_conditional_breakpoints.
4316
ade90bde
YQ
43172015-09-15 Yao Qi <yao.qi@linaro.org>
4318
4319 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4320 function.
4321 (struct linux_target_ops the_low_target): Install
4322 aarch64_linux_siginfo_fixup.
4323
94585166
DB
43242015-09-11 Don Breazeal <donb@codesourcery.com>
4325 Luis Machado <lgustavo@codesourcery.com>
4326
4327 * linux-low.c (linux_mourn): Static declaration.
4328 (linux_arch_setup): Move in front of
4329 handle_extended_wait.
4330 (linux_arch_setup_thread): New function.
4331 (handle_extended_wait): Handle exec events. Call
4332 linux_arch_setup_thread. Make event_lwp argument a
4333 pointer-to-a-pointer.
4334 (check_zombie_leaders): Do not check stopped threads.
4335 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4336 (linux_low_filter_event): Add lwp and thread for exec'ing
4337 non-leader thread if leader thread has been deleted.
4338 Refactor code into linux_arch_setup_thread and call it.
4339 Pass child lwp pointer by reference to handle_extended_wait.
4340 (linux_wait_for_event_filtered): Update comment.
4341 (linux_wait_1): Prevent clobbering exec event status.
4342 (linux_supports_exec_events): New function.
4343 (linux_target_ops) <supports_exec_events>: Initialize new member.
4344 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4345 new member.
4346 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4347 * server.c (report_exec_events): New global variable.
4348 (handle_query): Handle qSupported query for exec-events feature.
4349 (captured_main): Initialize report_exec_events.
4350 * server.h (report_exec_events): Declare new global variable.
4351 * target.h (struct target_ops) <supports_exec_events>: New
4352 member.
4353 (target_supports_exec_events): New macro.
4354 * win32-low.c (win32_target_ops) <supports_exec_events>:
4355 Initialize new member.
4356
0568462b
MM
43572015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4358
4359 * linux-low.c (linux_low_enable_btrace): Remove.
4360 (linux_target_ops): Replace linux_low_enable_btrace with
4361 linux_enable_btrace.
4362
39edd165
YQ
43632015-09-03 Yao Qi <yao.qi@linaro.org>
4364
4365 * linux-aarch64-low.c (aarch64_insert_point): Call
4366 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4367 returns true.
4368
1db33b5a
UW
43692015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4370
4371 * linux-low.c (check_stopped_by_breakpoint): Use
4372 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4373
ab290430
PA
43742015-08-27 Pedro Alves <palves@redhat.com>
4375
4376 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4377
8d749320
SM
43782015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4379
6711b7f8
SM
4380 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4381 the XNEW-family equivalent.
8d749320
SM
4382 (compile_bytecodes): Likewise.
4383 * dll.c (loaded_dll): Likewise.
4384 * event-loop.c (append_callback_event): Likewise.
4385 (create_file_handler): Likewise.
4386 (create_file_event): Likewise.
4387 * hostio.c (handle_open): Likewise.
4388 * inferiors.c (add_thread): Likewise.
4389 (add_process): Likewise.
4390 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4391 * linux-arm-low.c (arm_new_process): Likewise.
4392 (arm_new_thread): Likewise.
4393 * linux-low.c (add_to_pid_list): Likewise.
4394 (linux_add_process): Likewise.
4395 (handle_extended_wait): Likewise.
4396 (add_lwp): Likewise.
4397 (enqueue_one_deferred_signal): Likewise.
4398 (enqueue_pending_signal): Likewise.
4399 (linux_resume_one_lwp_throw): Likewise.
4400 (linux_resume_one_thread): Likewise.
4401 (linux_read_memory): Likewise.
4402 (linux_write_memory): Likewise.
4403 * linux-mips-low.c (mips_linux_new_process): Likewise.
4404 (mips_linux_new_thread): Likewise.
4405 (mips_add_watchpoint): Likewise.
4406 * linux-x86-low.c (initialize_low_arch): Likewise.
4407 * lynx-low.c (lynx_add_process): Likewise.
4408 * mem-break.c (set_raw_breakpoint_at): Likewise.
4409 (set_breakpoint): Likewise.
4410 (add_condition_to_breakpoint): Likewise.
4411 (add_commands_to_breakpoint): Likewise.
4412 (clone_agent_expr): Likewise.
4413 (clone_one_breakpoint): Likewise.
4414 * regcache.c (new_register_cache): Likewise.
4415 * remote-utils.c (look_up_one_symbol): Likewise.
4416 * server.c (queue_stop_reply): Likewise.
4417 (start_inferior): Likewise.
4418 (queue_stop_reply_callback): Likewise.
4419 (handle_target_event): Likewise.
4420 * spu-low.c (fetch_ppc_memory): Likewise.
4421 (store_ppc_memory): Likewise.
4422 * target.c (set_target_ops): Likewise.
4423 * thread-db.c (thread_db_load_search): Likewise.
4424 (try_thread_db_load_1): Likewise.
4425 * tracepoint.c (add_tracepoint): Likewise.
4426 (add_tracepoint_action): Likewise.
4427 (create_trace_state_variable): Likewise.
4428 (cmd_qtdpsrc): Likewise.
4429 (cmd_qtro): Likewise.
4430 (add_while_stepping_state): Likewise.
4431 * win32-low.c (child_add_thread): Likewise.
4432 (get_image_name): Likewise.
4433
ed8b7b42
YQ
44342015-08-25 Yao Qi <yao.qi@linaro.org>
4435
4436 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4437
db3cb7cb
YQ
44382015-08-25 Yao Qi <yao.qi@linaro.org>
4439
4440 * Makefile.in (aarch64-linux.o): New rule.
4441 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4442 srv_tgtobj.
4443 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4444 (aarch64_init_debug_reg_state): Make it extern.
4445 (aarch64_linux_prepare_to_resume): Remove.
4446
f6011a1c
YQ
44472015-08-25 Yao Qi <yao.qi@linaro.org>
4448
4449 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4450 lwp_arch_private_info and ptid_of_lwp.
4451
88e2cf7e
YQ
44522015-08-25 Yao Qi <yao.qi@linaro.org>
4453
4454 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4455 Find proc_info by find_process_pid. All callers updated.
4456
5e35436e
YQ
44572015-08-25 Yao Qi <yao.qi@linaro.org>
4458
4459 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4460 Remove.
4461 (debug_reg_change_callback): Remove.
4462 (aarch64_notify_debug_reg_change): Remove.
4463
4a8a7965
YQ
44642015-08-25 Yao Qi <yao.qi@linaro.org>
4465
4466 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4467 Call current_lwp_ptid.
4468
32a271ee
YQ
44692015-08-25 Yao Qi <yao.qi@linaro.org>
4470
4471 * linux-aarch64-low.c (debug_reg_change_callback): Use
4472 debug_printf.
4473
0d51c8d7
YQ
44742015-08-25 Yao Qi <yao.qi@linaro.org>
4475
4476 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4477
31a43dd5
YQ
44782015-08-25 Yao Qi <yao.qi@linaro.org>
4479
4480 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4481
8ee52567
YQ
44822015-08-25 Yao Qi <yao.qi@linaro.org>
4483
4484 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4485 the code.
4486
ff3f0f45
YQ
44872015-08-25 Yao Qi <yao.qi@linaro.org>
4488
4489 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4490 Remove.
4491 (debug_reg_change_callback): Remove argument entry and add argument
4492 lwp. Remove local variable thread. Don't print thread id in the
4493 debugging output. Don't check whether pid of thread equals to pid.
4494 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4495 iterate_over_lwps instead find_inferior.
4496
3d40fbb5
PA
44972015-08-24 Pedro Alves <palves@redhat.com>
4498
4499 * inferiors.c (get_first_process): New function.
4500 * inferiors.h (get_first_process): New declaration.
4501 * remote-utils.c (read_ptid): Default to the first process in the
4502 list, instead of to the current thread's process.
4503
438e1e42
PA
45042015-08-24 Pedro Alves <palves@redhat.com>
4505
4506 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4507 * event-loop.c: Likewise.
4508 * remote-utils.c: Likewise.
4509 * tracepoint.c: Likewise.
4510
a8c6d4fc
PA
45112015-08-24 Pedro Alves <palves@redhat.com>
4512
4513 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4514 ptid_get_lwp.
4515
99b0bb12
PA
45162015-08-21 Pedro Alves <palves@redhat.com>
4517
4518 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4519 instead of literal 1.
4520
f8904751
PA
45212015-08-21 Pedro Alves <palves@redhat.com>
4522
4523 * tdesc.c (default_description): Explicitly zero-initialize.
4524
465a859e
PA
45252015-08-21 Pedro Alves <palves@redhat.com>
4526
4527 PR gdb/18749
4528 * inferiors.c (remove_thread): Discard any pending stop reply for
4529 this thread.
4530 * server.c (remove_all_on_match_pid): Rename to ...
4531 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4532 instead of a pid.
4533 (discard_queued_stop_replies): Change parameter to a ptid. Now
4534 extern.
4535 (handle_v_kill, kill_inferior_callback, captured_main)
4536 (process_serial_event): Adjust.
4537 * server.h (discard_queued_stop_replies): Declare.
4538
f0db101d
PA
45392015-08-21 Pedro Alves <palves@redhat.com>
4540
4541 * linux-low.c (wait_for_sigstop): Always switch to no thread
4542 selected if the previously current thread dies.
4543 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4544 process instead of the current thread's.
4545 * remote-utils.c (input_interrupt): Don't check if there's no
4546 current thread.
4547 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4548 current thread to the general thread fails, error out.
4549 (handle_qxfer_auxv, handle_qxfer_libraries)
4550 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4551 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4552 (handle_query): Check if there's a thread selected instead of
4553 checking whether there's any thread in the thread list.
4554 (handle_qxfer_threads, handle_qxfer_btrace)
4555 (handle_qxfer_btrace_conf): Don't error out early if there's no
4556 thread in the thread list.
4557 (handle_v_cont, myresume): Don't set the current thread to the
4558 continue thread.
4559 (process_serial_event) <Hg handling>: Also set thread_id if the
4560 previous general thread is still alive.
4561 (process_serial_event) <g/G handling>: If setting the current
4562 thread to the general thread fails, error out.
4563 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4564 thread's lwp instead of the current thread's.
4565 * target.c (set_desired_thread): If the desired thread was not
4566 found, leave the current thread pointing to NULL. Return an int
4567 (boolean) indicating success.
4568 * target.h (set_desired_thread): Change return type to int.
4569
40045d91
MF
45702015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4571
4572 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4573 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4574 #includes.
4575 (ps_get_thread_area): New function.
4576
45face3b
GB
45772015-08-19 Gary Benson <gbenson@redhat.com>
4578
4579 * hostio.c (handle_pread): Do not attempt to read more data
4580 than hostio_reply_with_data can fit in a packet.
4581
16d5f642
JB
45822015-08-18 Joel Brobecker <brobecker@adacore.com>
4583
4584 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4585
a738da3a
MF
45862015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4587
4588 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4589
33ebda9d
PA
45902015-08-06 Pedro Alves <palves@redhat.com>
4591
4592 * tracepoint.c (expr_eval_result): Now an int.
4593
a44892be
PA
45942015-08-06 Pedro Alves <palves@redhat.com>
4595
4596 * gdbthread.h (struct regcache): Forward declare.
4597 (struct thread_info) <regcache_data>: Now a struct regcache
4598 pointer.
4599 * inferiors.c (inferior_regcache_data)
4600 (set_inferior_regcache_data): Now work with struct regcache
4601 pointers.
4602 * inferiors.h (struct regcache): Forward declare.
4603 (inferior_regcache_data, set_inferior_regcache_data): Now work
4604 with struct regcache pointers.
4605 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4606 (free_register_cache_thread): Remove struct regcache pointer
4607 casts.
4608
608a1e46
PA
46092015-08-06 Pedro Alves <palves@redhat.com>
4610
4611 * server.c (captured_main): On error, print the exception message
4612 to stderr, and if run_once is set, throw a quit.
4613
f0ce0d3a
PA
46142015-08-06 Pedro Alves <palves@redhat.com>
4615
4616 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4617 the current thread.
4618
bf47e248
PA
46192015-08-06 Pedro Alves <palves@redhat.com>
4620
4621 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4622 reading beyond the passed in buffer length.
4623
b6b9ffcc
PL
46242015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4625
4626 * tracepoint.c (symbol_list) <required>: Remove.
4627
863d01bd
PA
46282015-08-06 Pedro Alves <palves@redhat.com>
4629
4630 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4631 count if stopping and suspending threads.
4632 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4633 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4634 (linux_detach): Complete an ongoing step-over.
4635 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4636 throughout.
4637 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4638 (linux_wait_1): If passing a signal to the inferior after
4639 finishing a step-over, unsuspend and re-resume all lwps. If we
4640 see a single-step event but the thread should be continuing, don't
4641 pass the trap to gdb.
4642 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4643 internal_error instead of gdb_assert.
4644 (enqueue_pending_signal): New function.
4645 (check_ptrace_stopped_lwp_gone): Add debug output.
4646 (start_step_over): Use internal_error instead of gdb_assert.
4647 (complete_ongoing_step_over): New function.
4648 (linux_resume_one_thread): Don't resume a suspended thread.
4649 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4650 it stepping.
4651
00db26fa
PA
46522015-08-06 Pedro Alves <palves@redhat.com>
4653
4654 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4655 (linux_thread_alive): Use lwp_is_marked_dead.
4656 (extended_event_reported): Delete.
4657 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4658 instead of extended_event_reported.
4659 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4660 as well.
4661 (lwp_is_marked_dead): New function.
4662 (lwp_running): Use lwp_is_marked_dead.
4663 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4664 comment.
4665
ad071a30
PA
46662015-08-06 Pedro Alves <palves@redhat.com>
4667
4668 * linux-low.c (linux_wait_1): Move fork event output out of the
4669 !report_to_gdb check. Pass event_child->waitstatus to
4670 target_waitstatus_to_string instead of ourstatus.
4671
524b57e6
YQ
46722015-08-04 Yao Qi <yao.qi@linaro.org>
4673
4674 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4675 if current_thread is 32 bit.
4676
6085d6f6
YQ
46772015-08-04 Yao Qi <yao.qi@linaro.org>
4678
4679 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4680 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4681 * server.c (extended_protocol): Remove "static".
4682 * server.h (extended_protocol): Declare it.
4683
8a7e4587
YQ
46842015-08-04 Yao Qi <yao.qi@linaro.org>
4685
4686 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4687 both aarch64 and aarch32.
4688 (aarch64_set_pc): Likewise.
4689
3b53ae99
YQ
46902015-08-04 Yao Qi <yao.qi@linaro.org>
4691
4692 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4693 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4694 arm-with-neon.xml to srv_xmlfiles.
4695 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4696 (is_64bit_tdesc): New function.
4697 (aarch64_linux_read_description): New function.
4698 (aarch64_arch_setup): Call aarch64_linux_read_description.
4699 (regs_info): Rename to regs_info_aarch64.
4700 (aarch64_regs_info): Return right regs_info.
4701 (initialize_low_arch): Call initialize_low_arch_aarch32.
4702
bd9e6534
YQ
47032015-08-04 Yao Qi <yao.qi@linaro.org>
4704
4705 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4706 * linux-aarch32-low.c: New file.
4707 * linux-aarch32-low.h: New file.
4708 * linux-arm-low.c (arm_fill_gregset): Move it to
4709 linux-aarch32-low.c.
4710 (arm_store_gregset): Likewise.
4711 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4712 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4713 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4714 (regs_info): Rename to regs_info_arm.
4715 (arm_regs_info): Return regs_info_aarch32 if
4716 have_ptrace_getregset is 1 and target description is
4717 arm_with_neon or arm_with_vfpv3.
4718 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4719 Call initialize_low_arch_aarch32 instead.
4720
ded48a5e
YQ
47212015-08-04 Yao Qi <yao.qi@linaro.org>
4722
4723 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4724 * linux-low.c: ... here.
4725 * linux-low.h (have_ptrace_getregset): Declare it.
4726
96e9210f
PA
47272015-08-04 Pedro Alves <palves@redhat.com>
4728
4729 * thread-db.c (struct thread_db): Use new typedefs.
4730 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4731 CHK calls.
4732 (disable_thread_event_reporting): Cast result of dlsym to
4733 destination function pointer type.
4734 (thread_db_mourn): Use td_ta_delete_ftype.
4735
af60a1ef
SL
47362015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4737
4738 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4739 arch variant.
4740 (CDX_BREAKPOINT): Define for R2.
4741 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4742 (the_low_target): Add comments.
4743
e8b41681
YQ
47442015-07-30 Yao Qi <yao.qi@linaro.org>
4745
4746 * linux-arm-low.c (arm_hwcap): Remove it.
4747 (arm_read_description): New local variable arm_hwcap. Don't
4748 set arm_hwcap to zero.
4749
89abb039
YQ
47502015-07-30 Yao Qi <yao.qi@linaro.org>
4751
4752 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4753 Use regcache->tdesc instead.
4754 (arm_store_wmmxregset): Likewise.
4755 (arm_fill_vfpregset): Likewise.
4756 (arm_store_vfpregset): Likewise.
4757
deca266c
YQ
47582015-07-30 Yao Qi <yao.qi@linaro.org>
4759
4760 * linux-arm-low.c: Include arch/arm.h.
4761 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4762 (arm_store_gregset): Likewise.
4763
aa58a496
SM
47642015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4765
4766 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4767 ptrace's 4th parameter.
4768
50904b25
YQ
47692015-07-27 Yao Qi <yao.qi@linaro.org>
4770
4771 * configure.srv (case aarch64*-*-linux*): Don't set
4772 srv_linux_usrregs.
4773
5826e159
PA
47742015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4775
4776 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4777 sys/ptrace.h.
4778 * linux-arm-low.c: Likewise.
4779 * linux-cris-low.c: Likewise.
4780 * linux-crisv32-low.c: Likewise.
4781 * linux-low.c: Likewise.
4782 * linux-m68k-low.c: Likewise.
4783 * linux-mips-low.c: Likewise.
4784 * linux-nios2-low.c: Likewise.
4785 * linux-s390-low.c: Likewise.
4786 * linux-sparc-low.c: Likewise.
4787 * linux-tic6x-low.c: Likewise.
4788 * linux-tile-low.c: Likewise.
4789 * linux-x86-low.c: Likewise.
4790
54019719
PA
47912015-07-24 Pedro Alves <palves@redhat.com>
4792
4793 * config.in: Regenerate.
4794 * configure: Regenerate.
4795
eb7aa561
PA
47962015-07-24 Pedro Alves <palves@redhat.com>
4797
4798 * acinclude.m4: Include ../ptrace.m4.
4799 * configure.ac: Call GDB_AC_PTRACE.
4800 * config.in, configure: Regenerate.
4801
55d7b841
YQ
48022015-07-24 Yao Qi <yao.qi@linaro.org>
4803
4804 * linux-low.c (linux_create_inferior): Remove setting to
4805 proc->priv->new_inferior.
4806 (linux_attach): Likewise.
4807 (linux_low_filter_event): Likewise.
4808 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4809
c06cbd92
YQ
48102015-07-24 Yao Qi <yao.qi@linaro.org>
4811
4812 * linux-low.c (linux_arch_setup): New function.
4813 (linux_low_filter_event): If proc->tdesc is NULL and
4814 proc->attached is true, call the_low_target.arch_setup.
4815 Otherwise, keep status pending, and return.
4816 (linux_resume_one_lwp_throw): Don't call get_pc if
4817 thread->while_stepping isn't NULL. Don't call
4818 get_thread_regcache if proc->tdesc is NULL.
4819 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4820 (linux_target_ops): Install arch_setup.
4821 * server.c (start_inferior): Call the_target->arch_setup.
4822 * target.h (struct target_ops) <arch_setup>: New field.
4823 (target_arch_setup): New marco.
4824 * lynx-low.c (lynx_target_ops): Update.
4825 * nto-low.c (nto_target_ops): Update.
4826 * spu-low.c (spu_target_ops): Update.
4827 * win32-low.c (win32_target_ops): Update.
4828
5ae3ebba
YQ
48292015-07-24 Yao Qi <yao.qi@linaro.org>
4830
4831 * linux-low.c (linux_add_process): Don't set
4832 proc->priv->new_inferior.
4833 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4834 (linux_attach): Likewise.
4835
eb97750b
YQ
48362015-07-24 Yao Qi <yao.qi@linaro.org>
4837
4838 * server.c (start_inferior): Code refactor.
4839
51aee833
YQ
48402015-07-24 Yao Qi <yao.qi@linaro.org>
4841
4842 * server.c (process_serial_event): Set general_thread.
4843
af1b22f3
YQ
48442015-07-21 Yao Qi <yao.qi@linaro.org>
4845
4846 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4847 aarch64_linux_get_debug_reg_capacity.
4848
554717a3
YQ
48492015-07-17 Yao Qi <yao.qi@linaro.org>
4850
4851 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4852 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4853 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4854 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4855 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4856 (AARCH64_HWP_ALIGNMENT): Likewise.
4857 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4858 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4859 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4860 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4861 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4862 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4863 (struct aarch64_debug_reg_state): Likewise.
4864 (struct arch_lwp_info): Likewise.
4865 (aarch64_align_watchpoint): Likewise.
4866 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4867 (aarch64_watchpoint_length): Likewise.
4868 (aarch64_point_encode_ctrl_reg): Likewise
4869 (aarch64_point_is_aligned): Likewise.
4870 (aarch64_align_watchpoint): Likewise.
4871 (aarch64_linux_set_debug_regs):
4872 (aarch64_dr_state_insert_one_point): Likewise.
4873 (aarch64_dr_state_remove_one_point): Likewise.
4874 (aarch64_handle_breakpoint): Likewise.
4875 (aarch64_handle_aligned_watchpoint): Likewise.
4876 (aarch64_handle_unaligned_watchpoint): Likewise.
4877 (aarch64_handle_watchpoint): Likewise.
4878
c67ca4de
YQ
48792015-07-17 Yao Qi <yao.qi@linaro.org>
4880
4881 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4882 and don't aarch64_get_debug_reg_state. All callers update.
4883 (aarch64_handle_aligned_watchpoint): Likewise.
4884 (aarch64_handle_unaligned_watchpoint): Likewise.
4885 (aarch64_handle_watchpoint): Likewise.
4886 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4887 (aarch64_remove_point): Likewise.
4888
25abf979
YQ
48892015-07-17 Yao Qi <yao.qi@linaro.org>
4890
4891 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4892 debug_printf.
4893 (aarch64_handle_unaligned_watchpoint): Likewise.
4894
db1ff28b
JK
48952015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4896
4897 Revert the previous 3 commits:
4898 Move gdb_regex* to common/
4899 Move linux_find_memory_regions_full & co.
4900 gdbserver build-id attribute generator
4901
700ca40f
JK
49022015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4903 Jan Kratochvil <jan.kratochvil@redhat.com>
4904
4905 gdbserver build-id attribute generator.
4906 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4907 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4908 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4909 (find_phdr): New.
4910 (get_dynamic): Use find_pdhr to traverse program headers.
4911 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4912 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4913 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4914 (get_hex_build_id): New.
4915 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4916 to reply XML document.
4917
9904185c
JK
49182015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4919 Jan Kratochvil <jan.kratochvil@redhat.com>
4920
4921 * target.c: Include target/target-utils.h and fcntl.h.
4922 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4923 (target_fileio_read_stralloc): New functions.
4924
6e5b4429
JK
49252015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4926
4927 * Makefile.in (OBS): Add gdb_regex.o.
4928 (gdb_regex.o): New.
4929 * config.in: Rebuilt.
4930 * configure: Rebuilt.
4931
ddc98fbf
JK
49322015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4933 Jan Kratochvil <jan.kratochvil@redhat.com>
4934
4935 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4936 * Makefile.in (OBS): Add target-utils.o.
4937 (linux-maps.o, target-utils.o): New.
4938 * configure.srv (srv_linux_obj): Add linux-maps.o.
4939
e57bb7a0
PL
49402015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4941
4942 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4943 function, return 1.
4944 (the_low_target): Install it.
4945
586b02a9
PA
49462015-07-14 Pedro Alves <palves@redhat.com>
4947
4948 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4949 Instead, ignore ECHILD, and throw an error for other errnos.
4950
58c1b36c
PA
49512015-07-10 Pedro Alves <palves@redhat.com>
4952
4953 * event-loop.c (struct callback_event) <data>: Change type to
4954 gdb_client_data instance instead of gdb_client_data pointer.
4955 (append_callback_event): Adjust.
4956
421530db
PL
49572015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4958
4959 * linux-aarch64-low.c: Add comments for each linux_target_ops
4960 method. Remove comments already covered in target_ops and
4961 linux_target_ops definitions.
4962 (the_low_target): Add comments for each unimplemented method.
4963
c2d65f38
YQ
49642015-07-09 Yao Qi <yao.qi@linaro.org>
4965
4966 * linux-aarch64-low.c (aarch64_regmap): Remove.
4967 (aarch64_usrregs_info): Remove.
4968 (regs_info): Set field usrregs to NULL.
4969
b20a6524
MM
49702015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4971
4972 * linux-low.c: Include "rsp-low.h"
4973 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4974 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4975 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4976 (handle_btrace_enable_pt): New.
4977 (handle_btrace_general_set): Support "pt".
4978 (handle_btrace_conf_general_set): Support "pt:size".
4979
96c97461
PL
49802015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4981
4982 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4983 Z_PACKET_SW_BP.
4984
37d66942
PL
49852015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4986
4987 * linux-aarch64-low.c: Remove comment about endianness.
4988 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4989 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4990 memcmp.
4991
dc06243f
GB
49922015-06-24 Gary Benson <gbenson@redhat.com>
4993
4994 * linux-i386-ipa.c (stdint.h): Do not include.
4995 * lynx-i386-low.c (stdint.h): Likewise.
4996 * lynx-ppc-low.c (stdint.h): Likewise.
4997 * mem-break.c (stdint.h): Likewise.
4998 * thread-db.c (stdint.h): Likewise.
4999 * tracepoint.c (stdint.h): Likewise.
5000 * win32-low.c (stdint.h): Likewise.
5001
124e13d9
SM
50022015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5003
5004 * server.c (write_qxfer_response): Update call to
5005 remote_escape_output.
5006
909c2cda
JK
50072015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5008 Jan Kratochvil <jan.kratochvil@redhat.com>
5009
5010 Merge multiple hex conversions.
5011 * gdbreplay.c (tohex): Rename to 'fromhex'.
5012 (logchar): Use fromhex.
5013
24c05f46
JK
50142015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5015
5016 * server.c (handle_qxfer_libraries): Set `version' attribute for
5017 <library-list>.
5018
14d2069a
GB
50192015-06-10 Gary Benson <gbenson@redhat.com>
5020
5021 * target.h (struct target_ops) <multifs_open>: New field.
5022 <multifs_unlink>: Likewise.
5023 <multifs_readlink>: Likewise.
5024 * linux-low.c (nat/linux-namespaces.h): New include.
5025 (linux_target_ops): Initialize the_target->multifs_open,
5026 the_target->multifs_unlink and the_target->multifs_readlink.
5027 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5028 * hostio.c (hostio_fs_pid): New static variable.
5029 (hostio_handle_new_gdb_connection): New function.
5030 (handle_setfs): Likewise.
5031 (handle_open): Use the_target->multifs_open as appropriate.
5032 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5033 (handle_readlink): Use the_target->multifs_readlink as
5034 appropriate.
5035 (handle_vFile): Handle vFile:setfs packets.
5036 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5037 after target_handle_new_gdb_connection.
5038
4b8b5e72
GB
50392015-06-10 Gary Benson <gbenson@redhat.com>
5040
5041 * configure.ac (AC_CHECK_FUNCS): Add setns.
5042 * config.in: Regenerate.
5043 * configure: Likewise.
5044 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5045 (linux-namespaces.o): New rule.
5046 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5047
3ac2e371
GB
50482015-06-09 Gary Benson <gbenson@redhat.com>
5049
5050 * hostio.c (handle_open): Process mode argument with
5051 fileio_to_host_mode.
5052
ca9b78ce
YQ
50532015-06-01 Yao Qi <yao.qi@linaro.org>
5054
5055 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5056 * linux-x86-low.c: Likewise.
5057
bfacd19d
DB
50582015-05-28 Don Breazeal <donb@codesourcery.com>
5059
5060 * linux-low.c (handle_extended_wait): Initialize
5061 thread_info.last_resume_kind for new fork children.
5062
452003ef
PA
50632015-05-15 Pedro Alves <palves@redhat.com>
5064
5065 * target.h (target_handle_new_gdb_connection): Rewrite using if
5066 wrapped in do/while.
5067
1041a03c
JB
50682015-05-14 Joel Brobecker <brobecker@adacore.com>
5069
5070 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5071 * configure, config.in: Regenerate.
5072 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5073 Declare typedef.
5074
c269dbdb
DB
50752015-05-12 Don Breazeal <donb@codesourcery.com>
5076
5077 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5078 PTRACE_EVENT_VFORK_DONE.
5079 (linux_low_ptrace_options, extended_event_reported): Add vfork
5080 events.
5081 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5082 and "vforkdone" for RSP 'T' Stop Reply Packet.
5083 * server.h (report_vfork_events): Declare
5084 global variable.
5085
3a8a0396
DB
50862015-05-12 Don Breazeal <donb@codesourcery.com>
5087
5088 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5089 (the_low_target) <new_fork>: Initialize new member.
5090 * linux-arm-low.c (arm_new_fork): New function.
5091 (the_low_target) <new_fork>: Initialize new member.
5092 * linux-low.c (handle_extended_wait): Call new target function
5093 new_fork.
5094 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5095 * linux-mips-low.c (mips_add_watchpoint): New function
5096 extracted from mips_insert_point.
5097 (the_low_target) <new_fork>: Initialize new member.
5098 (mips_linux_new_fork): New function.
5099 (mips_insert_point): Call mips_add_watchpoint.
5100 * linux-x86-low.c (x86_linux_new_fork): New function.
5101 (the_low_target) <new_fork>: Initialize new member.
5102
de0d863e
DB
51032015-05-12 Don Breazeal <donb@codesourcery.com>
5104
5105 * linux-low.c (handle_extended_wait): Implement return value,
5106 rename argument 'event_child' to 'event_lwp', handle
5107 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5108 (linux_low_ptrace_options): New function.
5109 (linux_low_filter_event): Call linux_low_ptrace_options,
5110 use different argument fo linux_enable_event_reporting,
5111 use return value from handle_extended_wait.
5112 (extended_event_reported): New function.
5113 (linux_wait_1): Call extended_event_reported and set
5114 status to report fork events.
5115 (linux_write_memory): Add pid to debug message.
5116 (reset_lwp_ptrace_options_callback): New function.
5117 (linux_handle_new_gdb_connection): New function.
5118 (linux_target_ops): Initialize new structure member.
5119 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5120 * lynx-low.c: Initialize new structure member.
5121 * remote-utils.c (prepare_resume_reply): Implement stop reason
5122 "fork" for "T" stop message.
5123 * server.c (handle_query): Call handle_new_gdb_connection.
5124 * server.h (report_fork_events): Declare global flag.
5125 * target.h (struct target_ops) <handle_new_gdb_connection>:
5126 New member.
5127 (target_handle_new_gdb_connection): New macro.
5128 * win32-low.c: Initialize new structure member.
5129
ddcbc397
DB
51302015-05-12 Don Breazeal <donb@codesourcery.com>
5131
5132 * mem-break.c (APPEND_TO_LIST): Define macro.
5133 (clone_agent_expr): New function.
5134 (clone_one_breakpoint): New function.
5135 (clone_all_breakpoints): New function.
5136 * mem-break.h: Declare new functions.
5137
89245bc0
DB
51382015-05-12 Don Breazeal <donb@codesourcery.com>
5139
5140 * linux-low.c (linux_supports_fork_events): New function.
5141 (linux_supports_vfork_events): New function.
5142 (linux_target_ops): Initialize new structure members.
5143 (initialize_low): Call linux_check_ptrace_features.
5144 * lynx-low.c (lynx_target_ops): Initialize new structure
5145 members.
5146 * server.c (report_fork_events, report_vfork_events):
5147 New global flags.
5148 (handle_query): Add new features to qSupported packet and
5149 response.
5150 (captured_main): Initialize new global variables.
5151 * target.h (struct target_ops) <supports_fork_events>:
5152 New member.
5153 <supports_vfork_events>: New member.
5154 (target_supports_fork_events): New macro.
5155 (target_supports_vfork_events): New macro.
5156 * win32-low.c (win32_target_ops): Initialize new structure
5157 members.
5158
835205d0
GB
51592015-05-12 Gary Benson <gbenson@redhat.com>
5160
5161 * server.c (handle_qxfer_exec_file): Use current process
5162 if annex is empty.
5163
21e94bd9
SL
51642015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5165
5166 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5167 Remove HAVE_PTRACE_GETREGS conditionals.
5168 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5169 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5170
45614f15
YQ
51712015-05-08 Yao Qi <yao.qi@linaro.org>
5172
5173 * linux-low.c (linux_supports_conditional_breakpoints): New
5174 function.
5175 (linux_target_ops): Install new target method.
5176 * lynx-low.c (lynx_target_ops): Install NULL hook for
5177 supports_conditional_breakpoints.
5178 * nto-low.c (nto_target_ops): Likewise.
5179 * spu-low.c (spu_target_ops): Likewise.
5180 * win32-low.c (win32_target_ops): Likewise.
5181 * server.c (handle_query): Check
5182 target_supports_conditional_breakpoints.
5183 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5184 New field.
5185 (target_supports_conditional_breakpoints): New macro.
5186
80ad801e
PA
51872015-05-06 Pedro Alves <palves@redhat.com>
5188
5189 PR server/18081
5190 * server.c (start_inferior): If the process exits, mourn it.
5191
819843c7
GB
51922015-04-21 Gary Benson <gbenson@redhat.com>
5193
5194 * hostio.c (fileio_open_flags_to_host): Factored out to
5195 fileio_to_host_openflags in common/fileio.c. Single use
5196 updated.
5197
a2d5a9d7
MF
51982015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5199
5200 * linux-xtensa-low.c (xtensa_fill_gregset)
5201 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5202 XCHAL_HAVE_LOOP.
5203
deb44829
MF
52042015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5205
5206 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5207 (regs_info): Replace usrregs pointer with NULL.
5208
e57f1de3
GB
52092015-04-17 Gary Benson <gbenson@redhat.com>
5210
5211 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5212 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5213 * server.c (handle_qxfer_exec_file): New function.
5214 (qxfer_packets): Add exec-file entry.
5215 (handle_query): Report qXfer:exec-file:read as supported packet.
5216
62828379
RN
52172015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5218
5219 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5220
b88bb450
GB
52212015-04-09 Gary Benson <gbenson@redhat.com>
5222
5223 * hostio-errno.c (errno_to_fileio_error): Remove function.
5224 Update caller to use remote_fileio_to_fio_error.
5225
c8f4bfdd
YQ
52262015-04-09 Yao Qi <yao.qi@linaro.org>
5227
5228 * linux-low.c (linux_insert_point): Call
5229 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5230 (linux_remove_point): Call remove_memory_breakpoint if type is
5231 raw_bkpt_type_sw.
5232 * linux-x86-low.c (x86_insert_point): Don't call
5233 insert_memory_breakpoint.
5234 (x86_remove_point): Don't call remove_memory_breakpoint.
5235
41f98f02
PA
52362015-04-01 Pedro Alves <palves@redhat.com>
5237 Cleber Rosa <crosa@redhat.com>
5238
5239 * server.c (gdbserver_usage): Reorganize and extend the usage
5240 message.
5241
2bf6fb9d
PA
52422015-03-24 Pedro Alves <palves@redhat.com>
5243
5244 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5245 output. Also dump TRAP_TRACE.
5246 (linux_low_filter_event): In debug output, distinguish a
5247 resume_stop SIGSTOP from a delayed SIGSTOP.
5248
369f6daa
GB
52492015-03-24 Gary Benson <gbenson@redhat.com>
5250
5251 * linux-x86-low.c (x86_linux_new_thread): Moved to
5252 nat/x86-linux.c.
5253 (x86_linux_prepare_to_resume): Likewise.
5254
8e5d4070
GB
52552015-03-24 Gary Benson <gbenson@redhat.com>
5256
5257 * Makefile.in (x86-linux-dregs.o): New rule.
5258 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5259 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5260 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5261 (x86_linux_dr_get): Likewise.
5262 (x86_linux_dr_set): Likewise.
5263 (update_debug_registers_callback): Likewise.
5264 (x86_linux_dr_set_addr): Likewise.
5265 (x86_linux_dr_get_addr): Likewise.
5266 (x86_linux_dr_set_control): Likewise.
5267 (x86_linux_dr_get_control): Likewise.
5268 (x86_linux_dr_get_status): Likewise.
5269 (x86_linux_update_debug_registers): Likewise.
5270
2b95d440
GB
52712015-03-24 Gary Benson <gbenson@redhat.com>
5272
5273 * linux-x86-low.c (x86_linux_update_debug_registers):
5274 New function, factored out from...
5275 (x86_linux_prepare_to_resume): ...this.
5276
14b0bc68
GB
52772015-03-24 Gary Benson <gbenson@redhat.com>
5278
5279 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5280 (x86_linux_dr_set): Likewise.
5281 (update_debug_registers_callback): Likewise.
5282 (x86_linux_dr_set_addr): Likewise.
5283 (x86_linux_dr_get_addr): Likewise.
5284 (x86_linux_dr_set_control): Likewise.
5285 (x86_linux_dr_get_control): Likewise.
5286 (x86_linux_dr_get_status): Likewise.
5287 (x86_linux_prepare_to_resume): Likewise.
5288
5dfe6ca8
GB
52892015-03-24 Gary Benson <gbenson@redhat.com>
5290
5291 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5292 Use perror_with_name. Pass string through gettext.
5293 (x86_linux_dr_set): Likewise.
5294
d33472ad
GB
52952015-03-24 Gary Benson <gbenson@redhat.com>
5296
5297 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5298 (x86_linux_dr_set_addr): ...this.
5299 (x86_dr_low_get_addr): Rename to...
5300 (x86_linux_dr_get_addr): ...this.
5301 (x86_dr_low_set_control): Rename to...
5302 (x86_linux_dr_set_control): ...this.
5303 (x86_dr_low_get_control): Rename to...
5304 (x86_linux_dr_get_control): ...this.
5305 (x86_dr_low_get_status): Rename to...
5306 (x86_linux_dr_get_status): ...this.
5307 (x86_dr_low): Update with new function names.
5308
4b134ca1
GB
53092015-03-24 Gary Benson <gbenson@redhat.com>
5310
5311 * Makefile.in (x86-linux.o): New rule.
5312 * configure.srv: Add x86-linux.o to relevant targets.
5313 * linux-low.c (lwp_set_arch_private_info): New function.
5314 (lwp_arch_private_info): Likewise.
5315 * linux-x86-low.c: Include nat/x86-linux.h.
5316 (arch_lwp_info): Removed structure.
5317 (update_debug_registers_callback):
5318 Use lwp_set_debug_registers_changed.
5319 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5320 and lwp_set_debug_registers_changed.
5321 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5322
34c703da
GB
53232015-03-24 Gary Benson <gbenson@redhat.com>
5324
5325 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5326 * linux-arm-low.c (arm_new_thread): Likewise.
5327 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5328 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5329 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5330 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5331
cff068da
GB
53322015-03-24 Gary Benson <gbenson@redhat.com>
5333
5334 * linux-low.c (ptid_of_lwp): New function.
5335 (lwp_is_stopped): Likewise.
5336 (lwp_stop_reason): Likewise.
5337 * linux-x86-low.c (update_debug_registers_callback):
5338 Use lwp_is_stopped.
5339 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5340 lwp_stop_reason.
5341
b2f7c7e8
GB
53422015-03-24 Gary Benson <gbenson@redhat.com>
5343
5344 * linux-low.h (linux_stop_lwp): Remove declaration.
5345
6d4ee8c6
GB
53462015-03-24 Gary Benson <gbenson@redhat.com>
5347
5348 * linux-low.h: Include nat/linux-nat.h.
5349 * linux-low.c (iterate_over_lwps_args): New structure.
5350 (iterate_over_lwps_filter): New function.
5351 (iterate_over_lwps): Likewise.
5352 * linux-x86-low.c (update_debug_registers_callback):
5353 Update signature to what iterate_over_lwps expects.
5354 Remove PID check that iterate_over_lwps now performs.
5355 (x86_dr_low_set_addr): Use iterate_over_lwps.
5356 (x86_dr_low_set_control): Likewise.
5357
70a0bb6b
GB
53582015-03-24 Gary Benson <gbenson@redhat.com>
5359
5360 * linux-x86-low.c (x86_debug_reg_state): New function.
5361 (x86_linux_prepare_to_resume): Use the above.
5362
7b669087
GB
53632015-03-24 Gary Benson <gbenson@redhat.com>
5364
5365 * linux-low.c (current_lwp_ptid): New function.
5366 * linux-x86-low.c: Include nat/linux-nat.h.
5367 (x86_dr_low_get_addr): Use current_lwp_ptid.
5368 (x86_dr_low_get_control): Likewise.
5369 (x86_dr_low_get_status): Likewise.
5370
eef49a3d
PA
53712015-03-20 Pedro Alves <palves@redhat.com>
5372
5373 * tracepoint.c (cmd_qtstatus): Make "str" const.
5374
b2333d22
PA
53752015-03-20 Pedro Alves <palves@redhat.com>
5376
5377 * server.c (handle_general_set): Make "req_str" const.
5378
23f238d3
PA
53792015-03-19 Pedro Alves <palves@redhat.com>
5380
5381 * linux-low.c (linux_resume_one_lwp): Rename to ...
5382 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5383 instead call perror_with_name.
5384 (check_ptrace_stopped_lwp_gone): New function.
5385 (linux_resume_one_lwp): Reimplement as wrapper around
5386 linux_resume_one_lwp_throw that swallows errors if the LWP is
5387 gone.
5388
91baf43f
PA
53892015-03-19 Pedro Alves <palves@redhat.com>
5390
5391 * linux-low.c (count_events_callback, select_event_lwp_callback):
5392 No longer check whether the thread has resume_stop as last resume
5393 kind.
5394
8bf3b159
PA
53952015-03-19 Pedro Alves <palves@redhat.com>
5396
5397 * linux-low.c (count_events_callback, select_event_lwp_callback):
5398 Use the lwp's status_pending_p field, not the thread's.
5399
b90fc188
PA
54002015-03-19 Pedro Alves <palves@redhat.com>
5401
5402 * linux-low.c (select_event_lwp_callback): Update comments to
5403 no longer mention SIGTRAP.
5404
464b0089
GB
54052015-03-18 Gary Benson <gbenson@redhat.com>
5406
5407 * server.c (handle_query): Do not report vFile:fstat as supported.
5408
aa9e327f
GB
54092015-03-11 Gary Benson <gbenson@redhat.com>
5410
5411 * hostio.c (sys/types.h): New include.
5412 (sys/stat.h): Likewise.
5413 (common-remote-fileio.h): Likewise.
5414 (handle_fstat): New function.
5415 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 5416
791c0056
GB
54172015-03-11 Gary Benson <gbenson@redhat.com>
5418
5419 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5420 struct stat.st_blocks and struct stat.st_blksize.
5421 * configure: Regenerate.
5422 * config.in: Likewise.
5423 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5424 (OBS): Add common-remote-fileio.o.
5425 (common-remote-fileio.o): New rule.
5426
9a9df970
PA
54272015-03-09 Pedro Alves <palves@redhat.com>
5428
5429 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5430 'struct sockaddr' pointer in 'accept' call.
5431
9eb1356e
PA
54322015-03-09 Pedro Alves <palves@redhat.com>
5433
5434 Revert:
5435 2015-03-07 Pedro Alves <palves@redhat.com>
5436 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5437 or <winsock2.h> here. Instead include "gdb_socket.h".
5438 (remote_open): Use union gdb_sockaddr_u.
5439 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5440 or <winsock2.h> here. Instead include "gdb_socket.h".
5441 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5442 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5443 or <sys/un.h>.
5444 (init_named_socket, gdb_agent_helper_thread): Use union
5445 gdb_sockaddr_u.
5446
aac331e4
PA
54472015-03-07 Pedro Alves <palves@redhat.com>
5448
5449 * configure.ac (build_warnings): Move
5450 -Wdeclaration-after-statement to the C-specific set.
5451 * configure: Regenerate.
5452
366c75fc
PA
54532015-03-07 Pedro Alves <palves@redhat.com>
5454
5455 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5456 or <winsock2.h> here. Instead include "gdb_socket.h".
5457 (remote_open): Use union gdb_sockaddr_u.
5458 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5459 or <winsock2.h> here. Instead include "gdb_socket.h".
5460 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5461 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5462 or <sys/un.h>.
5463 (init_named_socket, gdb_agent_helper_thread): Use union
5464 gdb_sockaddr_u.
5465
492d29ea
PA
54662015-03-07 Pedro Alves <palves@redhat.com>
5467
5468 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5469 instead.
5470
60a191ed
YQ
54712015-03-06 Yao Qi <yao.qi@linaro.org>
5472
5473 * linux-aarch64-low.c (aarch64_insert_point): Use
5474 show_debug_regs as a boolean.
5475 (aarch64_remove_point): Likewise.
5476
f5771b1d
PA
54772015-03-05 Pedro Alves <palves@redhat.com>
5478
5479 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5480 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5481 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5482 * nto-low.c (nto_target_ops): Likewise.
5483 * spu-low.c (spu_target_ops): Likewise.
5484 * win32-low.c (win32_target_ops): Likewise.
5485
3e572f71
PA
54862015-03-04 Pedro Alves <palves@redhat.com>
5487
72f4393d 5488 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
5489 Decide whether a breakpoint triggered based on the SIGTRAP's
5490 siginfo.si_code.
72f4393d
L
5491 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5492 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
5493 (linux_low_filter_event): Check for breakpoints before checking
5494 watchpoints.
5495 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5496 siginfo.si_code.
72f4393d
L
5497 (linux_stopped_by_sw_breakpoint)
5498 (linux_supports_stopped_by_sw_breakpoint)
5499 (linux_stopped_by_hw_breakpoint)
5500 (linux_supports_stopped_by_hw_breakpoint): New functions.
5501 (linux_target_ops): Install new target methods.
3e572f71 5502
1ec68e26
PA
55032015-03-04 Pedro Alves <palves@redhat.com>
5504
5505 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5506 * server.c (swbreak_feature, hwbreak_feature): New globals.
5507 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5508 (captured_main): Clear swbreak_feature and hwbreak_feature.
5509 * server.h (swbreak_feature, hwbreak_feature): Declare.
5510 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5511 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5512 supports_stopped_by_hw_breakpoint>: New fields.
5513 (target_supports_stopped_by_sw_breakpoint)
5514 (target_stopped_by_sw_breakpoint)
5515 (target_supports_stopped_by_hw_breakpoint)
5516 (target_stopped_by_hw_breakpoint): Declare.
5517
15c66dd6
PA
55182015-03-04 Pedro Alves <palves@redhat.com>
5519
5520 enum lwp_stop_reason -> enum target_stop_reason
5521 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5522 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5523 (linux_wait_1, stuck_in_jump_pad_callback)
5524 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5525 (linux_stopped_by_watchpoint):
5526 * linux-low.h (enum lwp_stop_reason): Delete.
5527 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5528 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5529
98fc70d6
YQ
55302015-03-04 Yao Qi <yao.qi@linaro.org>
5531
5532 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5533
dd2ac174
GB
55342015-03-03 Gary Benson <gbenson@redhat.com>
5535
5536 * hostio.c (handle_vFile): Fix prefix lengths.
5537
d68e53f4
MM
55382015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5539
5540 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5541 ptr_bits.
5542
bf2d68ab
AA
55432015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5544
5545 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5546 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5547 (clean): Add "rm -f" for above C files.
5548 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5549 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5550 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5551 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5552 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5553 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5554 (init_registers_s390x_vx_linux64)
5555 (init_registers_s390x_tevx_linux64)
5556 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5557 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5558 declarations.
5559 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5560 (s390_store_vxrs_high): New functions.
5561 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5562 NT_S390_VXRS_HIGH.
5563 (s390_arch_setup): Add logic for selecting one of the new target
5564 descriptions. Activate the new vector regsets if applicable.
5565 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5566 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5567 and init_registers_s390x_tevx_linux64.
5568
c966a859
PA
55692015-03-01 Pedro Alves <palves@redhat.com>
5570
5571 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5572 parameter.
5573
4180215b
PA
55742015-02-27 Pedro Alves <palves@redhat.com>
5575
5576 * linux-x86-low.c (u_debugreg_offset): New function.
5577 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5578
749bab01
PA
55792015-02-27 Pedro Alves <palves@redhat.com>
5580
5581 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5582 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5583 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5584 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5585 (ps_lsetfpregs, ps_getpid)
5586 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5587 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5588 (ps_lsetxregs, ps_plog): Declare.
5589
3c14e5a3
PA
55902015-02-27 Pedro Alves <palves@redhat.com>
5591
5592 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5593 IP_AGENT_EXPORT_FUNC.
5594 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5595 IP_AGENT_EXPORT_FUNC.
5596 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5597 (IP_AGENT_EXPORT): Delete.
5598 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5599 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5600 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5601 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5602 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5603 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5604 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5605 (traceframe_read_count, traceframe_write_count)
5606 (traceframes_created, trace_state_variables, get_raw_reg)
5607 (get_trace_state_variable_value, set_trace_state_variable_value)
5608 (ust_loaded, helper_thread_id, cmd_buf): Use
5609 IPA_SYM_EXPORTED_NAME.
5610 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5611 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5612 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5613 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5614 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5615 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5616 EXTERN_C_PUSH/EXTERN_C_POP.
5617 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5618 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5619 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5620 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5621 (traceframe_write_count, traceframe_read_count)
5622 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5623 (about_to_request_buffer_space, get_trace_state_variable_value)
5624 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5625 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5626 EXTERN_C_PUSH/EXTERN_C_POP.
5627 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5628 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5629 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5630 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5631 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5632 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5633 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5634 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5635 Define.
5636 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5637 (IP_AGENT_EXPORT_VAR_DECL): Define.
5638 (tracing): Declare.
5639 (gdb_agent_get_raw_reg): Declare.
5640
fe978cb0
PA
56412015-02-27 Tom Tromey <tromey@redhat.com>
5642 Pedro Alves <palves@redhat.com>
5643
5644 Rename symbols whose names are reserved C++ keywords throughout.
5645
3bc3d82a
PA
56462015-02-27 Pedro Alves <palves@redhat.com>
5647
5648 * Makefile.in (COMPILER): New, get it from autoconf.
5649 (CXX): Get from autoconf instead.
5650 (COMPILE.pre): Use COMPILER.
5651 (CC-LD): Rename to ...
5652 (CC_LD): ... this. Use COMPILER.
5653 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5654 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5655 * acinclude.m4: Include build-with-cxx.m4.
5656 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5657 Disable -Werror by default if building in C++ mode.
5658 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5659 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5660 the C++ compiler. Save/restore CXXFLAGS too.
5661 * configure: Regenerate.
5662
07697489
PA
56632015-02-27 Pedro Alves <palves@redhat.com>
5664
5665 * acinclude.m4: Include libiberty.m4.
5666 * configure.ac: Call libiberty_INIT.
5667 * config.in, configure: Regenerate.
5668
9beb7c4e
PA
56692015-02-26 Pedro Alves <palves@redhat.com>
5670
5671 * linux-low.c (linux_wait_1): When incrementing the PC past a
5672 program breakpoint always use the_low_target.breakpoint_len as
5673 increment, rather than the maximum between that and
5674 the_low_target.decr_pc_after_break.
5675
8090aef2
PA
56762015-02-23 Pedro Alves <palves@redhat.com>
5677
5678 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5679 thread was doing a step-over; always adjust the PC if
5680 we stepped over a permanent breakpoint.
5681 (linux_wait_1): If we stepped over breakpoint that was on top of a
5682 permanent breakpoint, manually advance the PC past it.
5683
bc9540e8
PA
56842015-02-23 Pedro Alves <palves@redhat.com>
5685
5686 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5687 modes.
5688 (x86_fill_gregset, x86_store_gregset): Use it when handling
5689 $orig_eax.
5690
2db9a427
PA
56912015-02-20 Pedro Alves <palves@redhat.com>
5692
5693 * thread-db.c: Include "nat/linux-procfs.h".
5694 (thread_db_init): Skip listing new threads if the kernel supports
5695 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5696
afa8d396
PA
56972015-02-20 Pedro Alves <palves@redhat.com>
5698
5699 * linux-low.c (status_pending_p_callback): Use ptid_match.
5700
c9587f88
AT
57012015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5702
5703 PR breakpoints/16812
5704 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5705 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5706 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5707
b05ec7a5
AT
57082015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5709
5710 PR breakpoints/15956
5711 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5712
d33501a5
MM
57132015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5714
5715 * linux-low.c (linux_low_btrace_conf): Print size.
5716 * server.c (handle_btrace_conf_general_set): New.
5717 (hanle_general_set): Call handle_btrace_conf_general_set.
5718 (handle_query): Report Qbtrace-conf:bts:size as supported.
5719
f4abbc16
MM
57202015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5721
5722 * linux-low.c (linux_low_enable_btrace): Update parameters.
5723 (linux_low_btrace_conf): New.
5724 (linux_target_ops)<to_btrace_conf>: Initialize.
5725 * server.c (current_btrace_conf): New.
5726 (handle_btrace_enable): Rename to ...
5727 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5728 to target_enable_btrace. Update comment. Update users.
5729 (handle_qxfer_btrace_conf): New.
5730 (qxfer_packets): Add btrace-conf entry.
5731 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5732 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5733 (target_ops)<read_btrace_conf>: New.
5734 (target_enable_btrace): Update parameters.
5735 (target_read_btrace_conf): New.
5736
043c3577
MM
57372015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5738
5739 * server.c (handle_btrace_general_set): Remove call to
5740 target_supports_btrace.
5741 (supported_btrace_packets): New.
5742 (handle_query): Call supported_btrace_packets.
5743 * target.h: include btrace-common.h.
5744 (btrace_target_info): Removed.
5745 (supports_btrace, target_supports_btrace): Update parameters.
5746
734b0e4b
MM
57472015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5748
5749 * Makefile.in (SFILES): Add common/btrace-common.c.
5750 (OBS): Add common/btrace-common.o.
5751 (btrace-common.o): Add build rules.
5752 * linux-low: Include btrace-common.h.
5753 (linux_low_read_btrace): Use struct btrace_data. Call
5754 btrace_data_init and btrace_data_fini.
5755
d6c146e9
PA
57562015-02-06 Pedro Alves <palves@redhat.com>
5757
5758 * thread-db.c (find_new_threads_callback): Add debug output.
5759
20ba1ce6
PA
57602015-02-04 Pedro Alves <palves@redhat.com>
5761
5762 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5763 (resume_stopped_resumed_lwps): New function.
5764 (linux_wait_for_event_filtered): Use it.
5765
8cc73a39
SDJ
57662015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5767
5768 * Makefile.in (SFILES): Add linux-personality.c.
5769 (linux-personality.o): New rule.
5770 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5771 list of objects to be built.
5772 * linux-low.c: Include nat/linux-personality.h.
5773 (linux_create_inferior): Remove code to disable address space
5774 randomization (moved to ../nat/linux-personality.c). Create
5775 cleanup to disable address space randomization.
5776
fb23d554
SDJ
57772015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5778
5779 * Makefile.in (posix-strerror.o): New rule.
5780 (mingw-strerror.o): Likewise.
5781 * configure: Regenerated.
5782 * configure.ac: Source file ../common/common.host. Initialize new
5783 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5784
cdf43629
YQ
57852015-01-14 Yao Qi <yao@codesourcery.com>
5786
5787 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5788 (ppc-linux.o): New rule.
5789 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5790 * configure.ac: AC_CHECK_FUNCS(getauxval).
5791 * config.in: Re-generated.
5792 * configure: Re-generated.
5793 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5794 ppc64_64bit_inferior_p
5795
514c5338
YQ
57962015-01-14 Yao Qi <yao@codesourcery.com>
5797
5798 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5799 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5800 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5801 (PT_ORIG_R3, PT_TRAP): Likewise.
5802 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5803 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5804 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5805
3368c1e5
JB
58062015-01-10 Joel Brobecker <brobecker@adacore.com>
5807
5808 * i387-fp.c (i387_cache_to_xsave): In look over
5809 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5810 zmmh_low_space field by use of zmmh_high_space.
5811
582511be
PA
58122015-01-09 Pedro Alves <palves@redhat.com>
5813
5814 * linux-low.c (step_over_bkpt): Move higher up in the file.
5815 (handle_extended_wait): Don't store the stop_pc here.
5816 (get_stop_pc): Adjust comments and rename to ...
5817 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5818 stopped for a software breakpoint or hardware breakpoint.
5819 (thread_still_has_status_pending_p): New function.
5820 (status_pending_p_callback): Use
5821 thread_still_has_status_pending_p. If the event is no longer
5822 interesting, resume the LWP.
5823 (handle_tracepoints): Add assert.
5824 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5825 (wstatus_maybe_breakpoint): New function.
5826 (cancel_breakpoint): Delete function.
5827 (check_stopped_by_watchpoint): New function, factored out from
5828 linux_low_filter_event.
5829 (lp_status_maybe_breakpoint): Delete function.
5830 (linux_low_filter_event): Remove filter_ptid argument.
5831 Leave thread group exits pending here. Store the LWP's stop PC.
5832 Always leave events pending.
5833 (linux_wait_for_event_filtered): Pull all events out of the
5834 kernel, and leave them all pending.
5835 (count_events_callback, select_event_lwp_callback): Consider all
5836 events.
5837 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5838 (select_event_lwp): Only give preference to the stepping LWP in
5839 all-stop mode. Adjust comments.
5840 (ignore_event): New function.
5841 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5842 references to cancel_breakpoints. Adjust to renames. Also give
5843 equal priority to all LWPs that have had events in non-stop mode.
5844 If reporting a software breakpoint event, unadjust the LWP's PC.
5845 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5846 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5847 Adjust.
5848 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5849 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5850 (linux_stopped_by_watchpoint): Adjust.
5851 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5852 * linux-low.h (enum lwp_stop_reason): New.
5853 (struct lwp_info) <stop_pc>: Adjust comment.
5854 <stopped_by_watchpoint>: Delete field.
5855 <stop_reason>: New field.
5856 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5857 * mem-break.c (software_breakpoint_inserted_here)
5858 (hardware_breakpoint_inserted_here): New function.
5859 * mem-break.h (software_breakpoint_inserted_here)
5860 (hardware_breakpoint_inserted_here): Declare.
5861 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5862 (cancel_breakpoints): Delete.
5863 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5864 (upload_fast_traceframes): Remove references to
5865 cancel_breakpoints.
5866
a33e3959
PA
58672015-01-09 Pedro Alves <palves@redhat.com>
5868
5869 * thread-db.c (find_new_threads_callback): Ignore thread if the
5870 kernel thread ID is -1.
5871
8784d563
PA
58722015-01-09 Pedro Alves <palves@redhat.com>
5873
5874 * linux-low.c (linux_attach_fail_reason_string): Move to
5875 nat/linux-ptrace.c, and rename.
5876 (linux_attach_lwp): Update comment.
5877 (attach_proc_task_lwp_callback): New function.
5878 (linux_attach): Adjust to rename and use
5879 linux_proc_attach_tgid_threads.
5880 (linux_attach_fail_reason_string): Delete declaration.
5881
76f2b779
JB
58822015-01-01 Joel Brobecker <brobecker@adacore.com>
5883
5884 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5885 * server.c (gdbserver_version): Likewise.
5886
fafcc06a
SDJ
58872014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5888
5889 * remote-utils.c: Include ctype.h.
5890 (input_interrupt): Explicitly handle the case when the char
5891 received is the NUL byte. Improve the printing of non-ASCII
5892 characters.
5893
beed38b8
JB
58942014-12-16 Joel Brobecker <brobecker@adacore.com>
5895
5896 * linux-low.c (linux_low_filter_event): Update call to
5897 linux_enable_event_reporting following the addition of
5898 a new parameter to that function.
5899
bf330350
CU
59002014-12-16 Catalin Udma <catalin.udma@freescale.com>
5901
5902 PR server/17457
5903 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5904 (AARCH64_FPCR_REGNO): Likewise.
5905 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5906 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5907 (aarch64_store_fpregset): Likewise.
5908
5227d625
JB
59092014-12-15 Joel Brobecker <brobecker@adacore.com>
5910
5911 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5912 Remove FIXME comment about assumption about N.
5913
f93b65a0
JB
59142014-12-13 Joel Brobecker <brobecker@adacore.com>
5915
5916 * configure.ac: If large-file support is disabled in GDBserver,
5917 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5918 * configure: Regenerate.
5919
e5a9158d
AA
59202014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5921
5922 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5923 warning upon ENODATA from ptrace.
5924 * linux-s390-low.c (s390_store_tdb): New.
5925 (s390_regsets): Add regset for NT_S390_TDB.
5926
feea5f36
AA
59272014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5928
5929 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5930 without a fill_function.
5931 * linux-s390-low.c (s390_fill_last_break): Remove.
5932 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5933 (s390_arch_setup): Use regset's size instead of fill_function for
5934 loop end condition.
5935
098dbe61
AA
59362014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5937
5938 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5939 the regset's store function when ptrace returned an error.
5940 * regcache.c (get_thread_regcache): Invalidate register cache
5941 before fetching inferior's registers.
5942
28eef672
AA
59432014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5944
5945 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5946 while-loop as for-loop.
5947 (regsets_store_inferior_registers): Likewise.
5948
bdca27a2
YQ
59492014-11-28 Yao Qi <yao@codesourcery.com>
5950
5951 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5952 * config.in, configure: Re-generate.
5953 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5954 is defined.
5955
9c232dda
YQ
59562014-11-21 Yao Qi <yao@codesourcery.com>
5957
5958 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5959 (AC_CHECK_HEADERS): Remove malloc.h.
5960 * configure: Re-generated.
5961 * config.in: Re-generated.
5962 * server.h: Don't include alloca.h and malloc.h.
5963 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5964 Don't include malloc.h.
5965
43968415
JB
59662014-11-17 Joel Brobecker <brobecker@adacore.com>
5967
5968 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5969 corresponding ERRNO check in same block.
5970
40e91bc7
PA
59712014-11-12 Pedro Alves <palves@redhat.com>
5972
5973 * server.c (cont_thread): Update comment.
5974 (start_inferior, attach_inferior): No longer clear cont_thread.
5975 (handle_v_cont): No longer set cont_thread.
5976 (captured_main): Clear cont_thread each time a GDB connects.
5977
c2c118cf
PA
59782014-11-12 Pedro Alves <palves@redhat.com>
5979
5980 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5981 thread, and don't resume all threads if the Hc thread has exited.
5982
78708b7c
PA
59832014-11-12 Pedro Alves <palves@redhat.com>
5984
5985 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5986 the process group instead of to a specific LWP.
5987
a2abc7de
PA
59882014-10-15 Pedro Alves <palves@redhat.com>
5989
5990 PR server/17487
5991 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5992 parameter.
5993 (arm_set_thread_context): Delete.
5994 (the_low_target): Adjust.
5995 * win32-i386-low.c (debug_registers_changed)
5996 (debug_registers_used): Delete.
5997 (update_debug_registers_callback): New function.
5998 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5999 needing to update their debug registers.
6000 (win32_get_current_dr): New function.
6001 (x86_dr_low_get_addr, x86_dr_low_get_control)
6002 (x86_dr_low_get_status): Fetch the debug register from the thread
6003 record's context.
6004 (i386_initial_stuff): Adjust.
6005 (i386_get_thread_context): Remove current_event parameter. Don't
6006 clear debug_registers_changed nor copy DR values to
6007 debug_reg_state.
6008 (i386_set_thread_context): Delete.
6009 (i386_prepare_to_resume): New function.
6010 (i386_thread_added): Mark the thread as needing to update irs
6011 debug registers.
6012 (the_low_target): Remove i386_set_thread_context and install
6013 i386_prepare_to_resume.
6014 * win32-low.c (win32_get_thread_context): Adjust.
6015 (win32_set_thread_context): Use SetThreadContext
6016 directly.
6017 (win32_prepare_to_resume): New function.
6018 (win32_require_context): New function, factored out from ...
6019 (thread_rec): ... this.
6020 (continue_one_thread): Call win32_prepare_to_resume on each thread
6021 we're about to continue.
6022 (win32_resume): Call win32_prepare_to_resume on the event thread.
6023 * win32-low.h (struct win32_thread_info)
6024 <debug_registers_changed>: New field.
6025 (struct win32_target_ops): Change prototype of set_thread_context,
6026 delete set_thread_context and add prepare_to_resume.
6027 (win32_require_context): New declaration.
6028
a442d071
GB
60292014-10-08 Gary Benson <gbenson@redhat.com>
6030
6031 * server.h: Do not include common-exceptions.h.
6032
6f1947e8
GB
60332014-10-08 Gary Benson <gbenson@redhat.com>
6034
6035 * server.h: Do not include cleanups.h.
6036
63b434a4
JH
60372014-09-30 James Hogan <james.hogan@imgtec.com>
6038
6039 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6040 mips64-dsp-linux.c.
6041
c4d9ceb6
YQ
60422014-09-23 Yao Qi <yao@codesourcery.com>
6043
6044 * linux-low.c (lp_status_maybe_breakpoint): New function.
6045 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6046 (count_events_callback): Likewise.
6047 (select_event_lwp_callback): Likewise.
6048 (cancel_breakpoints_callback): Likewise.
6049
89a5711c
DB
60502014-09-19 Don Breazeal <donb@codesourcery.com>
6051
6052 * linux-low.c (handle_extended_wait): Call
6053 linux_ptrace_get_extended_event.
6054 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6055 linux_is_extended_waitstatus.
6056
bffc0964
JB
60572014-09-16 Joel Brobecker <brobecker@adacore.com>
6058
6059 * Makefile.in (CPPFLAGS): Define.
6060 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6061 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6062
0bfdf32f
GB
60632014-09-16 Gary Benson <gbenson@redhat.com>
6064
6065 * inferiors.h (current_inferior): Renamed as...
6066 (current_thread): New variable. All uses updated.
6067 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6068 (maybe_move_out_of_jump_pad): Likewise.
6069 (cancel_breakpoint): Likewise.
6070 (linux_low_filter_event): Likewise.
6071 (wait_for_sigstop): Likewise.
6072 (linux_resume_one_lwp): Likewise.
6073 (need_step_over_p): Likewise.
6074 (start_step_over): Likewise.
6075 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6076 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6077 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6078 and save_inferior as saved_thread.
6079 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6080 saved_thread.
6081 (regcache_invalidate_thread): Likewise.
6082 * remote-utils.c (prepare_resume_reply): Likewise.
6083 * thread-db.c (thread_db_get_tls_address): Likewise.
6084 (disable_thread_event_reporting): Likewise.
6085 (remove_thread_event_breakpoints): Likewise.
6086 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6087 as saved_thread.
6088 * target.h (set_desired_inferior): Renamed as...
6089 (set_desired_thread): New declaration. All uses updated.
6090 * server.c (myresume): Updated comment to reference thread instead
6091 of inferior.
6092 (handle_serial_event): Likewise.
6093 (handle_target_event): Likewise.
6094
361c8ade
GB
60952014-09-12 Tom Tromey <tromey@redhat.com>
6096 Gary Benson <gbenson@redhat.com>
6097
6098 * regcache.h: Include common-regcache.h.
6099 (regcache_read_pc): Don't declare.
6100 * regcache.c (get_thread_regcache_for_ptid): New function.
6101
bd9269f7
GB
61022014-09-11 Tom Tromey <tromey@redhat.com>
6103 Gary Benson <gbenson@redhat.com>
6104
6105 * symbol.c: New file.
6106 * Makefile.in (SFILES): Add symbol.c.
6107 (OBS): Add symbol.o.
6108
f8c1d06b
GB
61092014-09-11 Gary Benson <gbenson@redhat.com>
6110
6111 * target.c (target_stop_ptid, target_continue_ptid): New
6112 functions.
6113
721ec300
GB
61142014-09-11 Tom Tromey <tromey@redhat.com>
6115 Gary Benson <gbenson@redhat.com>
6116
6117 * target.h: Include target/target.h.
6118 * target.c (target_read_memory, target_read_uint32)
6119 (target_write_memory): New functions.
6120
c5e92cca
GB
61212014-09-11 Gary Benson <gbenson@redhat.com>
6122
6123 * server.h (debug_hw_points): Don't declare.
6124 * server.c (debug_hw_points): Don't define. Replace all uses
6125 with show_debug_regs.
6126 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6127 all uses with show_debug_regs.
6128
2e4bb98a
EBM
61292014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6130
6131 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6132 endianness into account.
6133 (ppc_supply_ptrace_register): Likewise.
6134
ac740bc7
JH
61352014-09-03 James Hogan <james.hogan@imgtec.com>
6136
6137 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6138 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6139
97ea6506
GB
61402014-09-03 Gary Benson <gbenson@redhat.com>
6141
6142 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6143 ALL_DEBUG_ADDRESS_REGISTERS.
6144
df7e5265
GB
61452014-09-02 Gary Benson <gbenson@redhat.com>
6146
6147 * i386-low.h: Renamed as...
6148 * x86-low.h: New file. All type, function and variable name
6149 prefixes changed from "i386_" to "x86_". All references updated.
6150 * i386-low.c: Renamed as...
6151 * x86-low.c: New file. All type, function and variable name
6152 prefixes changed from "i386_" to "x86_". All references updated.
6153
ed859da7
GB
61542014-09-02 Gary Benson <gbenson@redhat.com>
6155
6156 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6157 (x86_linux_new_thread): Likewise.
6158
860789c7
GB
61592014-08-29 Gary Benson <gbenson@redhat.com>
6160
6161 * server.h (setjmp.h): Do not include.
6162 (toplevel): Do not declare.
6163 (common-exceptions.h): Include.
6164 (cleanups.h): Likewise.
6165 * server.c (toplevel): Do not define.
6166 (exit_code): New static global.
6167 (detach_or_kill_for_exit_cleanup): New function.
6168 (main): New function. Original main renamed to...
6169 (captured_main): New function.
6170 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6171
ff55e1b5
GB
61722014-08-29 Gary Benson <gbenson@redhat.com>
6173
6174 * Makefile.in (SFILES): Add common/common-exceptions.c.
6175 (OBS): Add common-exceptions.o.
6176 (common-exceptions.o): New rule.
6177 * utils.c (prepare_to_throw_exception): New function.
6178
e9bcb658
GB
61792014-08-29 Gary Benson <gbenson@redhat.com>
6180
6181 * config.in: Regenerate.
6182 * configure: Likewise.
6183
e3180625
GB
61842014-08-29 Gary Benson <gbenson@redhat.com>
6185
6186 * Makefile.in (SFILES): Add common/cleanups.c.
6187 (OBS): cleanups.o.
6188 (cleanups.o): New rule.
6189
e3d6ba5d
GB
61902014-08-29 Gary Benson <gbenson@redhat.com>
6191
6192 * utils.c (internal_vwarning): New function.
6193
7096e886
GB
61942014-08-28 Gary Benson <gbenson@redhat.com>
6195
6196 * utils.h (fatal): Remove declaration.
6197 * utils.c (fatal): Remove function.
6198
14ce3192
GB
61992014-08-28 Gary Benson <gbenson@redhat.com>
6200
6201 * tracepoint.c (gdb_agent_init): Replace fatal with
6202 perror_with_name.
6203 (initialize_tracepoint): Likewise.
6204
50278d59
GB
62052014-08-28 Gary Benson <gbenson@redhat.com>
6206
6207 * remote-utils.c (remote_prepare): Replace fatal with error.
6208
aa96c426
GB
62092014-08-28 Gary Benson <gbenson@redhat.com>
6210
6211 * linux-low.c (linux_async): Replace fatal with warning.
6212 Tidy up and return.
6213 (linux_start_non_stop): Return -1 if linux_async failed.
6214
f7160e97
GB
62152014-08-28 Gary Benson <gbenson@redhat.com>
6216
6217 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6218 gdb_assert.
6219 (i386_dr_low_get_addr): Remove vague comment.
6220 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6221 gdb_assert.
6222
38e08fca
GB
62232014-08-28 Gary Benson <gbenson@redhat.com>
6224
6225 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6226 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6227 internal_error.
6228 (linux_resume_one_lwp): Likewise.
6229 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6230 gdb_assert.
6231 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6232 with internal_error.
6233 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6234 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6235 (find_register_by_name): Replace fatal with internal_error.
6236 (find_regno): Likewise.
6237 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6238 * thread-db.c (thread_db_create_event): Likewise.
6239 (thread_db_load_search): Likewise.
6240 (try_thread_db_load_1): Likewise.
6241 * tracepoint.c (get_jump_space_head): Replace fatal with
6242 internal_error.
6243 (claim_trampoline_space): Likewise.
6244 (have_fast_tracepoint_trampoline_buffer): Likewise.
6245 (cmd_qtstart): Likewise.
6246 (stop_tracing): Likewise.
6247 (fast_tracepoint_collecting): Likewise.
6248 (target_malloc): Likewise.
6249 (download_tracepoint): Likewise.
6250 (download_trace_state_variables): Replace check with gdb_assert.
6251 (upload_fast_traceframes): Replace fatal with internal_error.
6252
34abf635
GB
62532014-08-19 Tom Tromey <tromey@redhat.com>
6254 Gary Benson <gbenson@redhat.com>
6255
6256 * Makefile.in (SFILES): Add common/common-debug.c.
6257 (OBS): Add common-debug.o.
6258 (common-debug.o): New rule.
6259 * debug.h (debug_printf): Don't declare.
6260 * debug.c (debug_printf): Renamed and rewritten as...
6261 (debug_vprintf): New function.
6262
f6e94d78
GB
62632014-08-19 Gary Benson <gbenson@redhat.com>
6264
6265 * utils.h: Do not include print-utils.h.
6266
9239eeab
GB
62672014-08-19 Tom Tromey <tromey@redhat.com>
6268 Gary Benson <gbenson@redhat.com>
6269
6270 * server.h: Add static assertion.
6271 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6272
ef87c8bb
GB
62732014-08-19 Tom Tromey <tromey@redhat.com>
6274 Gary Benson <gbenson@redhat.com>
6275
6276 * Makefile.in (SFILES): Add common/errors.c.
6277 (OBS): Add errors.o.
6278 (IPA_OBS): Add errors-ipa.o.
6279 (errors.o): New rule.
6280 (errors-ipa.o): Likewise.
6281 * utils.h (perror_with_name, error, warning): Don't declare.
6282 * utils.c (warning): Renamed and rewritten as...
6283 (vwarning): New function.
6284 (error): Renamed and rewritten as...
6285 (verror): New function.
6286 (internal_error): Renamed and rewritten as...
6287 (internal_verror): New function.
6288
bb974a24
GB
62892014-08-07 Gary Benson <gbenson@redhat.com>
6290
6291 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6292 * configure: Regenerate.
6293 * config.in: Likewise.
6294 * server.h: Do not include errno.h.
6295 * event-loop.c: Likewise.
6296 * hostio-errno.c: Likewise.
6297 * linux-low.c: Likewise.
6298 * remote-utils.c: Likewise.
6299 * spu-low.c: Likewise.
6300 * utils.c: Likewise.
6301 * gdbreplay.c: Unconditionally include errno.h.
6302
6d3d12eb
GB
63032014-08-07 Gary Benson <gbenson@redhat.com>
6304
6305 * server.h: Do not include string.h.
6306 * event-loop.c: Likewise.
6307 * linux-low.c: Likewise.
6308 * regcache.c: Likewise.
6309 * remote-utils.c: Likewise.
6310 * spu-low.c: Likewise.
6311 * utils.c: Likewise.
6312
dccbb609
GB
63132014-08-07 Gary Benson <gbenson@redhat.com>
6314
6315 * server.h: Do not include gdb_assert.h.
6316
e76df0d0
GB
63172014-08-07 Gary Benson <gbenson@redhat.com>
6318
6319 * server.h: Do not include common-utils.h.
6320
4cb9c816
GB
63212014-08-07 Gary Benson <gbenson@redhat.com>
6322
6323 * server.h: Do not include ptid.h.
6324 * notif.h: Likewise.
6325
3995eeee
GB
63262014-08-07 Gary Benson <gbenson@redhat.com>
6327
6328 * server.h: Do not include gdb_locale.h.
6329
cb9f1a9b
GB
63302014-08-07 Gary Benson <gbenson@redhat.com>
6331
6332 * server.h: Do not include gdb/signals.h.
6333 * win32-low.c: Likewise.
6334
a5fceff8
GB
63352014-08-07 Gary Benson <gbenson@redhat.com>
6336
6337 * server.h: Do not include pathmax.h.
6338
b9391142
GB
63392014-08-07 Gary Benson <gbenson@redhat.com>
6340
6341 * server.h: Do not include libiberty.h.
6342 * linux-bfin-low.c: Likewise.
6343
0e443c87
GB
63442014-08-07 Gary Benson <gbenson@redhat.com>
6345
6346 * server.h: Do not include ansidecl.h.
6347
8ebb3f56
GB
63482014-08-07 Gary Benson <gbenson@redhat.com>
6349
6350 * linux-x86-low.c: Do not include stddef.h.
6351 * lynx-ppc-low.c: Likewise.
6352 * tracepoint.c: Likewise.
6353
8980bdf6
GB
63542014-08-07 Gary Benson <gbenson@redhat.com>
6355
6356 * server.h: Do not include stdarg.h.
6357 * nto-low.c: Likewise.
6358
d7096f71
GB
63592014-08-07 Gary Benson <gbenson@redhat.com>
6360
6361 * server.h: Do not include stdlib.h.
6362 * inferiors.c: Likewise.
6363 * linux-low.c: Likewise.
6364 * regcache.c: Likewise.
6365 * spu-low.c: Likewise.
6366 * tracepoint.c: Likewise.
6367 * utils.c: Likewise.
6368
d02f550d
GB
63692014-08-07 Gary Benson <gbenson@redhat.com>
6370
6371 * server.h: Do not include stdio.h.
6372 * linux-low.c: Likewise.
6373 * remote-utils.c: Likewise.
6374 * spu-low.c: Likewise.
6375 * utils.c: Likewise.
6376 * wincecompat.c: Likewise.
6377
87f6c4e3
GB
63782014-08-06 Gary Benson <gbenson@redhat.com>
6379
6380 * regcache.c (init_register_cache): Move conditionals inside if.
6381
7089dca4
GB
63822014-08-06 Gary Benson <gbenson@redhat.com>
6383
6384 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6385
462f517e
GB
63862014-07-31 Gary Benson <gbenson@redhat.com>
6387
6388 * ax.h: Do not include server.h.
6389 * gdbthread.h: Likewise.
6390 * lynx-low.h: Likewise.
6391 * notif.h: Likewise.
6392
976411d6
GB
63932014-07-30 Gary Benson <gbenson@redhat.com>
6394
6395 * server.h: Include common-defs.h.
6396 Do not include config.h or build-gnulib-gdbserver/config.h.
6397
d41f6d8e
GB
63982014-07-30 Gary Benson <gbenson@redhat.com>
6399
6400 * hostio-errno.c: Move server.h to top of includes list.
6401 * inferiors.c: Likewise.
6402 * linux-x86-low.c: Likewise.
6403 * notif.c: Include server.h.
6404
314c6a35
TT
64052014-07-24 Tom Tromey <tromey@redhat.com>
6406 Gary Benson <gbenson@redhat.com>
6407
6408 * server.h (CORE_ADDR): Now unsigned.
6409
69ff6be5
PA
64102014-07-16 Pedro Alves <palves@redhat.com>
6411
6412 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6413
ce9e3fe7
PA
64142014-07-15 Pedro Alves <palves@redhat.com>
6415
6416 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6417 copy.
6418
e76126e8
PA
64192014-07-11 Pedro Alves <palves@redhat.com>
6420
6421 * linux-low.c (kill_wait_lwp): New function, based on
6422 kill_one_lwp_callback, but use my_waitpid directly.
6423 (kill_one_lwp_callback, linux_kill): Use it.
6424
8e9db26e
PA
64252014-06-23 Pedro Alves <palves@redhat.com>
6426
6427 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6428 before setting DR0..DR3.
6429
698b3e08
GB
64302014-06-20 Gary Benson <gbenson@redhat.com>
6431
6432 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6433 * configure: Regenerated.
6434 * config.in: Likewise.
6435
125f8a3d
GB
64362014-06-20 Gary Benson <gbenson@redhat.com>
6437
6438 * Makefile.in (SFILES): Update locations for files moved
6439 from common to nat.
6440 (object file files): Reordered.
6441
42995dbd
GB
64422014-06-20 Gary Benson <gbenson@redhat.com>
6443
6444 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6445 (i386_dr_low_set_addr): Likewise.
6446 (i386_dr_low_get_addr): Likewise.
6447 (i386_dr_low_can_set_control): Likewise.
6448 (i386_dr_low_set_control): Likewise.
6449 (i386_dr_low_get_control): Likewise.
6450 (i386_dr_low_get_status): Likewise.
6451 (i386_get_debug_register_length): Likewise.
6452 * linux-x86-low.c (i386_dr_low_set_addr):
6453 Changed signature. Made static.
6454 (i386_dr_low_get_addr): Likewise.
6455 (i386_dr_low_set_control): Likewise.
6456 (i386_dr_low_get_control): Likewise.
6457 (i386_dr_low_get_status): Likewise.
6458 (i386_dr_low): New global variable.
6459 * win32-i386-low.c (i386_dr_low_set_addr):
6460 Changed signature. Made static.
6461 (i386_dr_low_get_addr): Likewise.
6462 (i386_dr_low_set_control): Likewise.
6463 (i386_dr_low_get_control): Likewise.
6464 (i386_dr_low_get_status): Likewise.
6465 (i386_dr_low): New global variable.
6466
e1d2394b
MS
64672014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6468
6469 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6470 * Makefile.in (AR, AR_FLAGS): Define.
6471 * configure: Regenerate.
6472
3a8ee006
GB
64732014-06-19 Gary Benson <gbenson@redhat.com>
6474
6475 * Makefile.in (i386-dregs.o): New rule.
6476 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6477 * i386-low.c (target.h): Remove include.
6478 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6479 (DR_CONTROL_SHIFT): Likewise.
6480 (DR_CONTROL_SIZE): Likewise.
6481 (DR_RW_EXECUTE): Likewise.
6482 (DR_RW_WRITE): Likewise.
6483 (DR_RW_READ): Likewise.
6484 (DR_RW_IORW): Likewise.
6485 (DR_LEN_1): Likewise.
6486 (DR_LEN_2): Likewise.
6487 (DR_LEN_4): Likewise.
6488 (DR_LEN_8): Likewise.
6489 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6490 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6491 (DR_ENABLE_SIZE): Likewise.
6492 (DR_LOCAL_SLOWDOWN): Likewise.
6493 (DR_GLOBAL_SLOWDOWN): Likewise.
6494 (DR_CONTROL_RESERVED): Likewise.
6495 (I386_DR_CONTROL_MASK): Likewise.
6496 (I386_DR_VACANT): Likewise.
6497 (I386_DR_LOCAL_ENABLE): Likewise.
6498 (I386_DR_GLOBAL_ENABLE): Likewise.
6499 (I386_DR_DISABLE): Likewise.
6500 (I386_DR_SET_RW_LEN): Likewise.
6501 (I386_DR_GET_RW_LEN): Likewise.
6502 (I386_DR_WATCH_HIT): Likewise.
6503 (i386_wp_op_t): Likewise.
6504 (i386_show_dr): Likewise.
6505 (i386_length_and_rw_bits): Likewise.
6506 (i386_insert_aligned_watchpoint): Likewise.
6507 (i386_remove_aligned_watchpoint): Likewise.
6508 (i386_handle_nonaligned_watchpoint): Likewise.
6509 i386_update_inferior_debug_regs(): Likewise.
6510 (i386_dr_insert_watchpoint): Likewise.
6511 (i386_dr_remove_watchpoint): Likewise.
6512 (i386_dr_region_ok_for_watchpoint): Likewise.
6513 (i386_dr_stopped_data_address): Likewise.
6514 (i386_dr_stopped_by_watchpoint): Likewise.
6515
8f26655c
GB
65162014-06-19 Gary Benson <gbenson@redhat.com>
6517
6518 * i386-low.c (i386_dr_show): Renamed to
6519 i386_show_dr and made static. All uses updated.
6520 (i386_dr_length_and_rw_bits): Renamed to
6521 i386_length_and_rw_bits and made static.
6522 All uses updated.
6523 (i386_dr_insert_aligned_watchpoint): Renamed to
6524 i386_insert_aligned_watchpoint and made static.
6525 All uses updated.
6526 (i386_dr_remove_aligned_watchpoint): Renamed to
6527 i386_remove_aligned_watchpoint and made static.
6528 All uses updated.
6529 (i386_dr_update_inferior_debug_regs): Renamed to
6530 i386_update_inferior_debug_regs and made static.
6531 All uses updated.
6532
b9228891
GB
65332014-06-18 Gary Benson <gbenson@redhat.com>
6534
5171def3
GB
6535 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6536 (i386_dr_low_can_set_control): Likewise.
6537 (i386_get_debug_register_length): Likewise.
6538 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6539 (i386_dr_low_can_set_control): Likewise.
6540 (i386_get_debug_register_length): Likewise.
6541
65422014-06-17 Gary Benson <gbenson@redhat.com>
6543
b9228891
GB
6544 * i386-low.h (i386-dregs.h): New include.
6545 (DR_FIRSTADDR): Now in i386-dregs.h.
6546 (DR_LASTADDR): Likewise.
6547 (DR_NADDR): Likewise.
6548 (DR_STATUS): Likewise.
6549 (DR_CONTROL): Likewise.
6550 (i386_debug_reg_state): Likewise.
6551 (i386_dr_insert_watchpoint): Likewise.
6552 (i386_dr_remove_watchpoint): Likewise.
6553 (i386_dr_region_ok_for_watchpoint): Likewise.
6554 (i386_dr_stopped_data_address): Likewise.
6555 (i386_dr_stopped_by_watchpoint): Likewise.
6556 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6557
4be83cc2
GB
65582014-06-18 Gary Benson <gbenson@redhat.com>
6559
6560 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6561 i386_dr_insert_watchpoint.
6562 (i386_low_remove_watchpoint): Renamed to
6563 i386_dr_remove_watchpoint.
6564 (i386_low_region_ok_for_watchpoint): Renamed to
6565 i386_dr_region_ok_for_watchpoint.
6566 (i386_low_stopped_data_address): Renamed to
6567 i386_dr_stopped_data_address.
6568 (i386_low_stopped_by_watchpoint): Renamed to
6569 i386_dr_stopped_by_watchpoint.
6570 * i386-low.c (i386_show_dr): Renamed to
6571 i386_dr_show and made nonstatic. All uses updated.
6572 (i386_length_and_rw_bits): Renamed to
6573 i386_dr_length_and_rw_bits and made nonstatic.
6574 All uses updated.
6575 (i386_insert_aligned_watchpoint): Renamed to
6576 i386_dr_insert_aligned_watchpoint and made nonstatic.
6577 All uses updated.
6578 (i386_remove_aligned_watchpoint): Renamed to
6579 i386_dr_remove_aligned_watchpoint and made nonstatic.
6580 All uses updated.
6581 (i386_update_inferior_debug_regs): Renamed to
6582 i386_dr_update_inferior_debug_regs and made nonstatic.
6583 All uses updated.
6584 (i386_low_insert_watchpoint): Renamed to
6585 i386_dr_insert_watchpoint. All uses updated.
6586 (i386_low_remove_watchpoint): Renamed to
6587 i386_dr_remove_watchpoint. All uses updated.
6588 (i386_low_region_ok_for_watchpoint): Renamed to
6589 i386_dr_region_ok_for_watchpoint. All uses updated.
6590 (i386_low_stopped_data_address): Renamed to
6591 i386_dr_stopped_data_address. All uses updated.
6592 (i386_low_stopped_by_watchpoint): Renamed to
6593 i386_dr_stopped_by_watchpoint. All uses updated.
6594
131aa0d4
GB
65952014-06-18 Gary Benson <gbenson@redhat.com>
6596
6597 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6598 (i386_dr_low_can_set_control): Likewise.
6599 (i386_insert_aligned_watchpoint): New check.
6600
d9305f7f
GB
66012014-06-18 Gary Benson <gbenson@redhat.com>
6602
6603 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6604 Renamed to state.
6605
e927c9fc
GB
66062014-06-18 Gary Benson <gbenson@redhat.com>
6607
6608 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6609 instead of fatal and error.
6610 (i386_handle_nonaligned_watchpoint): Likewise.
6611
1b6d4134
GB
66122014-06-18 Gary Benson <gbenson@redhat.com>
6613
6614 * i386-low.c (i386_get_debug_register_length): New macro.
6615 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6616 (i386_show_dr): Use debug_printf instead of fprintf. Use
6617 phex to format values.
6618
6e62758f
GB
66192014-06-18 Gary Benson <gbenson@redhat.com>
6620
6621 * i386-low.h: Comment changes.
6622 * i386-low.c: Likewise.
6623
fc6e2f03
GB
66242014-06-18 Gary Benson <gbenson@redhat.com>
6625
6626 * i386-low.c: Whitespace changes.
6627
f9d1eeed
TT
66282014-06-12 Tom Tromey <tromey@redhat.com>
6629
6630 * utils.c (freeargv): Remove.
6631
0b04e523
TT
66322014-06-12 Tom Tromey <tromey@redhat.com>
6633
6634 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6635 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6636 (parse_debug_format_options): Likewise.
6637 (gdbserver_usage): Likewise.
6638 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6639 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6640 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6641 against libiberty.
6642 ($(LIBGNU)): Depend on libiberty.
6643 (all-lib): Recurse into all subdirs.
6644 (install-only): Invoke "install" target in subdirs.
6645 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6646 targets.
6647 * configure: Rebuild.
6648 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6649 for vasprintf, vsnprintf, or gettimeofday.
6650 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6651 srv_tgtobj.
6652
270c9937
JB
66532014-06-05 Joel Brobecker <brobecker@adacore.com>
6654
6655 * development.sh: Delete.
6656 * Makefile.in (config.status): Adjust dependency on development.sh.
6657 * configure.ac: Adjust development.sh source call.
6658 * configure: Regenerate.
6659
0a261ed8
PA
66602014-06-02 Pedro Alves <palves@redhat.com>
6661
6662 * ax.c (gdb_free_agent_expr): New function.
6663 * ax.h (gdb_free_agent_expr): New declaration.
6664 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6665 list.
6666 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6667 static.
6668 (clear_breakpoint_conditions_and_commands): New function.
6669 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6670 (clear_breakpoint_conditions_and_commands): New declaration.
6671
e9dae05e
RR
66722014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6673
6674 * linux-aarch64-low.c (asm/ptrace.h): Include.
6675
5876f503
JK
66762014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6677
6678 Fix TLS access for -static -pthread.
6679 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6680 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6681 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6682
802e8e6d
PA
66832014-05-20 Pedro Alves <palves@redhat.com>
6684
6685 * linux-aarch64-low.c (aarch64_insert_point)
6686 (aarch64_remove_point): No longer check whether the type is
6687 supported here. Adjust to new interface.
6688 (the_low_target): Install aarch64_supports_z_point_type as
6689 supports_z_point_type method.
6690 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6691 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6692 instead of a Z packet char. Adjust.
6693 (arm_supports_z_point_type): New function.
6694 (arm_insert_point, arm_remove_point): Adjust to new interface.
6695 (the_low_target): Install arm_supports_z_point_type.
6696 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6697 (cris_insert_point, cris_remove_point): Adjust to new interface.
6698 Don't check whether the type is supported here.
6699 (the_low_target): Install cris_supports_z_point_type.
6700 * linux-low.c (linux_supports_z_point_type): New function.
6701 (linux_insert_point, linux_remove_point): Adjust to new interface.
6702 * linux-low.h (struct linux_target_ops) <insert_point,
6703 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6704 raw_breakpoint pointer parameter.
6705 <supports_z_point_type>: New method.
6706 * linux-mips-low.c (mips_supports_z_point_type): New function.
6707 (mips_insert_point, mips_remove_point): Adjust to new interface.
6708 Use mips_supports_z_point_type.
6709 (the_low_target): Install mips_supports_z_point_type.
6710 * linux-ppc-low.c (the_low_target): Install NULL as
6711 supports_z_point_type method.
6712 * linux-s390-low.c (the_low_target): Install NULL as
6713 supports_z_point_type method.
6714 * linux-sparc-low.c (the_low_target): Install NULL as
6715 supports_z_point_type method.
6716 * linux-x86-low.c (x86_supports_z_point_type): New function.
6717 (x86_insert_point): Adjust to new insert_point interface. Use
6718 insert_memory_breakpoint. Adjust to new
6719 i386_low_insert_watchpoint interface.
6720 (x86_remove_point): Adjust to remove_point interface. Use
6721 remove_memory_breakpoint. Adjust to new
6722 i386_low_remove_watchpoint interface.
6723 (the_low_target): Install x86_supports_z_point_type.
6724 * lynx-low.c (lynx_target_ops): Install NULL as
6725 supports_z_point_type callback.
6726 * nto-low.c (nto_supports_z_point_type): New.
6727 (nto_insert_point, nto_remove_point): Adjust to new interface.
6728 (nto_target_ops): Install nto_supports_z_point_type.
6729 * mem-break.c: Adjust intro comment.
6730 (struct raw_breakpoint) <raw_type, size>: New fields.
6731 <inserted>: Update comment.
6732 <shlib_disabled>: Delete field.
6733 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6734 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6735 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6736 (raw_bkpt_type_to_target_hw_bp_type): New function.
6737 (find_enabled_raw_code_breakpoint_at): New function.
6738 (find_raw_breakpoint_at): New type and size parameters. Use them.
6739 (insert_memory_breakpoint): New function, based off
6740 set_raw_breakpoint_at.
6741 (remove_memory_breakpoint): New function.
6742 (set_raw_breakpoint_at): Reimplement.
6743 (set_breakpoint): New, based on set_breakpoint_at.
6744 (set_breakpoint_at): Reimplement.
6745 (delete_raw_breakpoint): Go through the_target->remove_point
6746 instead of assuming memory breakpoints.
6747 (find_gdb_breakpoint_at): Delete.
6748 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6749 (find_gdb_breakpoint): New function.
6750 (set_gdb_breakpoint_at): Delete.
6751 (z_type_supported): New function.
6752 (set_gdb_breakpoint_1): New function, loosely based off
6753 set_gdb_breakpoint_at.
6754 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6755 (delete_gdb_breakpoint_at): Delete.
6756 (delete_gdb_breakpoint_1): New function, loosely based off
6757 delete_gdb_breakpoint_at.
6758 (delete_gdb_breakpoint): New function.
6759 (clear_gdb_breakpoint_conditions): Rename to ...
6760 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6761 breakpoint.
6762 (add_condition_to_breakpoint): Make static.
6763 (add_breakpoint_condition): Take a struct breakpoint pointer
6764 instead of an address. Adjust.
6765 (gdb_condition_true_at_breakpoint): Rename to ...
6766 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6767 z_type parameter.
6768 (gdb_condition_true_at_breakpoint): Reimplement.
6769 (add_breakpoint_commands): Take a struct breakpoint pointer
6770 instead of an address. Adjust.
6771 (gdb_no_commands_at_breakpoint): Rename to ...
6772 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6773 parameter. Return true if no breakpoint was found. Change debug
6774 output.
6775 (gdb_no_commands_at_breakpoint): Reimplement.
6776 (run_breakpoint_commands): Rename to ...
6777 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6778 and change return type to boolean.
6779 (run_breakpoint_commands): New function.
6780 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6781 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6782 breakpoint. Go through the_target->remove_point instead of
6783 assuming memory breakpoint.
6784 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6785 software and hardware breakpoints.
6786 (reinsert_raw_breakpoint): Go through the_target->insert_point
6787 instead of assuming memory breakpoint.
6788 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6789 software and hardware breakpoints.
6790 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6791 Check both software and hardware breakpoints.
6792 (validate_inserted_breakpoint): Assert the breakpoint is a
6793 software breakpoint. Set the inserted flag to -1 instead of
6794 setting shlib_disabled.
6795 (delete_disabled_breakpoints): Adjust.
6796 (validate_breakpoints): Only validate software breakpoints.
6797 Adjust to inserted flag change.
6798 (check_mem_read, check_mem_write): Skip breakpoint types other
6799 than software breakpoints. Adjust to inserted flag change.
6800 * mem-break.h (enum raw_bkpt_type): New enum.
6801 (raw_breakpoint, struct process_info): Forward declare.
6802 (Z_packet_to_target_hw_bp_type): Delete declaration.
6803 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6804 (set_gdb_breakpoint, delete_gdb_breakpoint)
6805 (clear_breakpoint_conditions): New declarations.
6806 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6807 (breakpoint_inserted_here): Update comment.
6808 (add_breakpoint_condition, add_breakpoint_commands): Replace
6809 address parameter with a breakpoint pointer parameter.
6810 (gdb_breakpoint_here): Update comment.
6811 (delete_gdb_breakpoint_at): Delete.
6812 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6813 * server.c (process_point_options): Take a struct breakpoint
6814 pointer instead of an address. Adjust.
6815 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6816 delete_gdb_breakpoint.
6817 * spu-low.c (spu_target_ops): Install NULL as
6818 supports_z_point_type method.
6819 * target.h: Include mem-break.h.
6820 (struct target_ops) <prepare_to_access_memory>: Update comment.
6821 <supports_z_point_type>: New field.
6822 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6823 instead of a char. Also take a raw breakpoint pointer.
6824 * win32-arm-low.c (the_low_target): Install NULL as
6825 supports_z_point_type.
6826 * win32-i386-low.c (i386_supports_z_point_type): New function.
6827 (i386_insert_point, i386_remove_point): Adjust to new interface.
6828 (the_low_target): Install i386_supports_z_point_type.
6829 * win32-low.c (win32_supports_z_point_type): New function.
6830 (win32_insert_point, win32_remove_point): Adjust to new interface.
6831 (win32_target_ops): Install win32_supports_z_point_type.
6832 * win32-low.h (struct win32_target_ops):
6833 <supports_z_point_type>: New method.
6834 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6835 instead of a char. Also take a raw breakpoint pointer.
6836
932539e3
PA
68372014-05-20 Pedro Alves <palves@redhat.com>
6838
6839 * mem-break.h: Include break-common.h.
6840 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6841 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6842 (Z_packet_to_target_hw_bp_type): New declaration.
6843 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6844 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6845 (Z_PACKET_ACCESS_WP): Delete macros.
6846 (Z_packet_to_hw_type): Delete function.
6847 * i386-low.h: Don't include break-common.h here.
6848 (Z_packet_to_hw_type): Delete declaration.
6849 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6850 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6851 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6852 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6853 * linux-aarch64-low.c: Don't include break-common.h here.
6854 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6855 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6856 (Z_packet_to_target_hw_bp_type): Delete function.
6857 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6858 function.
6859 (mips_insert_point, mips_remove_point): Use
6860 Z_packet_to_target_hw_bp_type.
6861
4ff0d3d8
PA
68622014-05-20 Pedro Alves <palves@redhat.com>
6863
6864 * linux-aarch64-low.c: Include break-common.h.
6865 (enum target_point_type): Delete.
6866 (Z_packet_to_point_type): Rename to ...
6867 (Z_packet_to_target_hw_bp_type): ... this, and return a
6868 target_hw_bp_type instead.
6869 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6870 instead of an enum target_point_type.
6871 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6872 breakpoint type.
6873 (aarch64_dr_state_insert_one_point)
6874 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6875 (aarch64_handle_aligned_watchpoint)
6876 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6877 Take an enum target_hw_bp_type instead of an enum
6878 target_point_type.
6879 (aarch64_supports_z_point_type): New function.
6880 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6881 use Z_packet_to_target_hw_bp_type.
6882
786dc519
JB
68832014-05-20 Joel Brobecker <brobecker@adacore.com>
6884
6885 * configure.ac: Only use -Werror by default when DEVELOPMENT
6886 is true.
6887 * configure: Regenerate.
6888
9e0aa64f
JK
68892014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6890
6891 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6892 * linux-x86-low.c (X86_64_USER_REGS): New.
6893 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6894
2b577b92
YQ
68952014-04-28 Yao Qi <yao@codesourcery.com>
6896
6897 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6898 name.
6899
94611da2
PA
69002014-04-25 Pedro Alves <palves@redhat.com>
6901
6902 PR server/16255
6903 * linux-low.c (linux_attach_fail_reason_string): New function.
6904 (linux_attach_lwp): Delete.
6905 (linux_attach_lwp_1): Rename to ...
6906 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6907 argument. Remove "initial" parameter. Return int instead of
6908 void. Don't error or warn here.
6909 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6910 failure to attach to the tgid. Call warning when failing to
6911 attach to an lwp.
6912 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6913 argument. Remove "initial" parameter. Return int instead of
6914 void. Don't error or warn here.
6915 (linux_attach_fail_reason_string): New declaration.
6916 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6917 interface change. Use linux_attach_fail_reason_string.
6918
01f9f808
MS
69192014-04-24 Michael Sturm <michael.sturm@mintel.com>
6920 Walfred Tedeschi <walfred.tedeschi@intel.com>
6921
6922 * Makefile.in: Added rules to handle new files
6923 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6924 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6925 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6926 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6927 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6928 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6929 x32-avx512-linux.o.
6930 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6931 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6932 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6933 i386/x32-avx512.xml.
6934 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6935 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6936 i386/x32-avx512-linux.xml.
6937 * i387-fp.c (num_avx512_k_registers): New constant for number
6938 of K registers.
6939 (num_avx512_zmmh_low_registers): New constant for number of
6940 lower ZMM registers (0-15).
6941 (num_avx512_zmmh_high_registers): New constant for number of
6942 higher ZMM registers (16-31).
6943 (num_avx512_ymmh_registers): New contant for number of higher
6944 YMM registers (ymm16-31 added by avx521 on x86_64).
6945 (num_avx512_xmm_registers): New constant for number of higher
6946 XMM registers (xmm16-31 added by AVX512 on x86_64).
6947 (struct i387_xsave): Add space for AVX512 registers.
6948 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6949 Add code to handle AVX512 registers.
6950 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6951 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6952 prototypei from generated file.
6953 (tdesc_amd64_avx512_linux): Likewise.
6954 (init_registers_x32_avx512_linux): Likewise.
6955 (tdesc_x32_avx512_linux): Likewise.
6956 (init_registers_i386_avx512_linux): Likewise.
6957 (tdesc_i386_avx512_linux): Likewise.
6958 (x86_64_regmap): Add AVX512 registers.
6959 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6960 mask.
6961 (initialize_low_arch): Add code to initialize AVX512 registers.
6962
51aa91f9
PA
69632014-04-23 Pedro Alves <palves@redhat.com>
6964
6965 * mem-break.c (find_gdb_breakpoint_at): Make static.
6966 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6967
a4165e94
PA
69682014-04-23 Pedro Alves <palves@redhat.com>
6969
6970 * i386-low.c: Don't include break-common.h here.
6971 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6972 prototype to take target_hw_bp_type as argument instead of a Z
6973 packet char.
6974 * i386-low.h: Include break-common.h here.
6975 (Z_packet_to_hw_type): Declare.
6976 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6977 prototypes.
6978 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6979 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6980 (x86_remove_point): Convert the packet number to a
6981 target_hw_bp_type before calling i386_low_remove_watchpoint.
6982 * win32-i386-low.c (i386_insert_point): Convert the packet number
6983 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6984 (i386_remove_point): Convert the packet number to a
6985 target_hw_bp_type before calling i386_low_remove_watchpoint.
6986
b8acf843
PA
69872014-04-23 Pedro Alves <palves@redhat.com>
6988
6989 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6990
d708bcd1
PA
69912014-04-10 Pedro Alves <palves@redhat.com>
6992
6993 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6994 Check if the condition or command is NULL before checking if the
6995 breakpoint is known. On success, return true.
6996 * mem-break.h (add_breakpoint_condition): Document return.
6997 (add_breakpoint_commands): Add describing comment.
6998 * server.c (skip_to_semicolon): New function.
6999 (process_point_options): Use it.
7000
2eec7d5b
PA
70012014-04-09 Pedro Alves <palves@redhat.com>
7002
7003 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7004 to lwpid_of.
7005
fa96cb38
PA
70062014-02-27 Pedro Alves <palves@redhat.com>
7007
7008 PR 12702
7009 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7010 macros.
7011 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7012 output.
7013 (last_thread_of_process_p): Take a PID argument instead of a
7014 thread pointer.
7015 (linux_wait_for_lwp): Delete.
7016 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7017 functions.
7018 (linux_low_filter_event): New function, party factored out from
7019 linux_wait_for_event.
7020 (linux_wait_for_event): Rename to ...
7021 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7022 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7023 sigsuspend. Check for zombie leaders.
7024 (linux_wait_for_event): Reimplement as wrapper around
7025 linux_wait_for_event_filtered.
7026 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7027 a normal or signal exit is seen, it's the whole process exiting.
7028 (wait_for_sigstop): No longer a for_each_inferior callback.
7029 Rewrite on top of linux_wait_for_event_filtered.
7030 (stop_all_lwps): Call wait_for_sigstop directly.
7031 * server.c (resume, handle_target_event): Handle
7032 TARGET_WAITKIND_NO_RESUMED.
7033
d763de10
JB
70342014-02-26 Joel Brobecker <brobecker@adacore.com>
7035
7036 * win32-low.c (psapi_get_dll_name,
7037 * win32_CreateToolhelp32Snapshot): Delete.
7038 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7039 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7040 Delete.
7041 (handle_load_dll): Add function description.
7042 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7043
850a0f76
JB
70442014-02-26 Joel Brobecker <brobecker@adacore.com>
7045
7046 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7047 Add comment.
7048 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7049 base address when calling win32_add_one_solib.
7050 (handle_load_dll): Delete local variable load_addr.
7051 Remove 0x1000 offset applied to DLL base address when calling
7052 win32_add_one_solib.
7053 (handle_unload_dll): Add comment.
7054
f25b3fc3
JB
70552014-02-26 Joel Brobecker <brobecker@adacore.com>
7056
7057 * win32-low.c (win32_add_all_dlls): Renames
7058 win32_ensure_ntdll_loaded. Rewrite function documentation.
7059 Adjust implementation to always load all DLLs.
7060 Add 0x1000 offset to DLL base address when calling
7061 win32_add_one_solib.
7062 (child_initialization_done): New static global.
7063 (do_initial_child_stuff): Set child_initialization_done to
7064 zero during child initialization, and 1 after. Replace call
7065 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7066 Add comment.
7067 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7068 (handle_unload_dll): Add function documentation.
7069 (get_child_debug_event): Ignore load and unload DLL events
7070 during child initialization.
7071
d86d4aaf
DE
70722014-02-20 Doug Evans <dje@google.com>
7073
3bc32da3 7074 Remove global all_lwps.
d86d4aaf
DE
7075 * inferiors.h (ptid_of): Move here from linux-low.h.
7076 (pid_of, lwpid_of): Ditto.
7077 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7078 parameter is a struct thread_info * now.
7079 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7080 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7081 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7082 directly.
7083 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7084 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7085 * linux-arm-low.c (update_registers_callback): Update, "entry"
7086 parameter is a struct thread_info * now.
7087 Fetch lwpid from current_inferior directly.
7088 (arm_insert_point): Pass &all_threads to find_inferior instead of
7089 &all_lwps.
7090 (arm_remove_point): Ditto.
7091 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7092 (arm_prepare_to_resume): Fetch pid from thread.
7093 (arm_read_description): Fetch lwpid from current_inferior directly.
7094 * linux-low.c (all_lwps): Delete.
7095 (delete_lwp): Delete call to remove_inferior.
7096 (handle_extended_wait): Fetch lwpid from thread.
7097 (add_lwp): Don't set lwp->entry.id. Remove call to
7098 add_inferior_to_list.
7099 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7100 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7101 (kill_one_lwp_callback): Ditto.
7102 (linux_kill): Don't dereference NULL pointer.
7103 Fetch ptid,lwpid from thread.
7104 (get_detach_signal): Fetch ptid from thread.
7105 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7106 Simplify call to regcache_invalidate_thread.
7107 (delete_lwp_callback): Update, "entry" parameter is a
7108 struct thread_info * now. Fetch pid from thread.
7109 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7110 (status_pending_p_callback): Update, "entry" parameter is a
7111 struct thread_info * now. Fetch ptid from thread.
7112 (find_lwp_pid): Update, "entry" parameter is a
7113 struct thread_info * now.
7114 (linux_wait_for_lwp): Fetch pid from thread.
7115 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7116 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7117 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7118 (dequeue_one_deferred_signal): Ditto.
7119 (cancel_breakpoint): Fetch ptid from current_inferior.
7120 (linux_wait_for_event): Pass &all_threads to find_inferior,
7121 not &all_lwps. Fetch ptid, lwpid from thread.
7122 (count_events_callback): Update, "entry" parameter is a
7123 struct thread_info * now.
7124 (select_singlestep_lwp_callback): Ditto.
7125 (select_event_lwp_callback): Ditto.
7126 (cancel_breakpoints_callback): Ditto.
7127 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7128 not &all_lwps.
7129 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7130 (unsuspend_one_lwp): Update, "entry" parameter is a
7131 struct thread_info * now.
7132 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7133 not &all_lwps.
7134 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7135 Fetch lwpid from thread, not lwp.
7136 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7137 Pass &all_threads to find_inferior, not &all_lwps.
7138 (send_sigstop): Fetch lwpid from thread, not lwp.
7139 (send_sigstop_callback): Update, "entry" parameter is a
7140 struct thread_info * now.
7141 (suspend_and_send_sigstop_callback): Ditto.
7142 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7143 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7144 struct thread_info * now.
7145 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7146 from thread, lwp.
7147 (lwp_running): Update, "entry" parameter is a
7148 struct thread_info * now.
7149 (stop_all_lwps): Fetch ptid from thread.
7150 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7151 (linux_resume_one_lwp): Fetch lwpid from thread.
7152 (linux_set_resume_request): Update, "entry" parameter is a
7153 struct thread_info * now. Fetch pid, lwpid from thread.
7154 (resume_status_pending_p): Update, "entry" parameter is a
7155 struct thread_info * now.
7156 (need_step_over_p): Ditto. Fetch lwpid from thread.
7157 (start_step_over): Fetch lwpid from thread.
7158 (linux_resume_one_thread): Update, "entry" parameter is a
7159 struct thread_info * now. Fetch lwpid from thread.
7160 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7161 (proceed_one_lwp): Update, "entry" parameter is a
7162 struct thread_info * now. Fetch lwpid from thread.
7163 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7164 struct thread_info * now.
7165 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7166 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7167 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7168 directly.
7169 (regsets_store_inferior_registers): Ditto.
7170 (fetch_register, store_register): Ditto.
7171 (linux_read_memory, linux_write_memory): Ditto.
7172 (linux_request_interrupt): Ditto.
7173 (linux_read_auxv): Ditto.
7174 (linux_xfer_siginfo): Ditto.
7175 (linux_qxfer_spu): Ditto.
7176 (linux_qxfer_libraries_svr4): Ditto.
7177 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7178 moved to inferiors.h.
7179 (get_lwp): Delete.
7180 (get_thread_lwp): Update.
7181 (struct lwp_info): Delete member "entry". Simplify comment for
7182 member "thread".
7183 (all_lwps): Delete.
7184 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7185 current_inferior directly.
7186 (update_watch_registers_callback): Update, "entry" parameter is a
7187 struct thread_info * now. Fetch pid from thread.
7188 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7189 (mips_insert_point): Fetch lwpid from current_inferior.
7190 Pass &all_threads to find_inferior, not &all_lwps.
7191 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7192 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7193 directly.
7194 (mips_stopped_data_address): Ditto.
7195 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7196 directly.
7197 * linux-tile-low.c (tile_arch_setup): Ditto.
7198 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7199 (update_debug_registers_callback): Update, "entry" parameter is a
7200 struct thread_info * now. Fetch pid from thread.
7201 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7202 Pass &all_threads to find_inferior, not &all_lwps.
7203 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7204 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7205 Pass &all_threads to find_inferior, not &all_lwps.
7206 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7207 (i386_dr_low_get_status): Ditto.
7208 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7209 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7210 (x86_linux_read_description): Ditto.
7211 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7212
3b8361aa
DE
72132014-02-20 Doug Evans <dje@google.com>
7214
7215 * inferiors.c (get_first_inferior): Fix buglet.
7216
f7667f0d
DE
72172014-02-19 Doug Evans <dje@google.com>
7218
7219 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7220 * inferiors.c (add_thread): Change result type to struct thread_info *.
7221 All callers updated.
7222 (add_lwp): Call add_thread here instead of in callers.
7223 All callers updated.
7224 * linux-low.h (get_lwp_thread): Rewrite.
7225 (struct lwp_info): New member "thread".
7226
b3312d80
DE
72272014-02-19 Doug Evans <dje@google.com>
7228
7229 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7230 All callers updated.
7231
ecc6f45c
DE
72322014-02-19 Doug Evans <dje@google.com>
7233
7234 * inferiors.c (add_thread): Fix whitespace.
7235
649ebbca
DE
72362014-02-19 Doug Evans <dje@google.com>
7237
7238 * dll.c (clear_dlls): Replace accessing list implemention details
7239 with API function.
7240 * gdbthread.h (get_first_thread): Declare.
7241 * inferiors.c (for_each_inferior_with_data): New function.
7242 (get_first_thread): New function.
7243 (find_thread_ptid): Simplify.
7244 (get_first_inferior): New function.
7245 (clear_list): Delete.
7246 (one_inferior_p): New function.
7247 (clear_inferior_list): New function.
7248 (clear_inferiors): Update.
7249 * inferiors.h (for_each_inferior_with_data): Declare.
7250 (clear_inferior_list): Declare.
7251 (one_inferior_p): Declare.
7252 (get_first_inferior): Declare.
7253 * linux-low.c (linux_wait_for_event): Replace accessing list
7254 implemention details with API function.
7255 * server.c (target_running): Ditto.
7256 (accumulate_file_name_length): New function.
7257 (emit_dll_description): New function.
7258 (handle_qxfer_libraries): Replace accessing list implemention
7259 details with API function.
7260 (handle_qxfer_threads_worker): New function.
7261 (handle_qxfer_threads_proper): Replace accessing list implemention
7262 details with API function.
7263 (handle_query): Ditto.
7264 (visit_actioned_threads_callback_ftype): New typedef.
7265 (visit_actioned_threads_data): New struct.
7266 (visit_actioned_threads): Rewrite to be find_inferior callback.
7267 (resume): Call find_inferior.
7268 (handle_status): Replace accessing list implemention
7269 details with API function.
7270 (process_serial_event): Replace accessing list implemention details
7271 with API function.
7272 * target.c (set_desired_inferior): Replace accessing list implemention
7273 details with API function.
7274 * tracepoint.c (same_process_p): New function.
7275 (gdb_agent_about_to_close): Replace accessing list implemention
7276 details with API function.
7277 * win32-low.c (child_delete_thread): Replace accessing list
7278 implemention details with API function.
7279 (match_dll_by_basename): New function.
7280 (dll_is_loaded_by_basename): New function.
7281 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7282 details call to dll_is_loaded_by_basename.
7283
80894984
DE
72842014-02-19 Doug Evans <dje@google.com>
7285
7286 * dll.h (struct dll_info): Add comment.
7287 * gdbthread.h (struct thread_info): Add comment.
7288 (current_ptid): Simplify.
7289 * inferiors.c (add_process): Update.
7290 (remove_process): Update.
7291 * inferiors.h (struct process_info): Rename member "head" to "entry".
7292 * linux-low.c (delete_lwp): Update.
7293 (add_lwp): Update.
7294 (last_thread_of_process_p): Update.
7295 (kill_one_lwp_callback, linux_kill): Update.
7296 (status_pending_p_callback): Update.
7297 (wait_for_sigstop): Update. Simplify read of ptid.
7298 (start_step_over): Update.
7299 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7300 (get_lwp_thread): Update.
7301 (struct lwp_info): Rename member "head" to "entry".
7302 * regcache.h (inferior_list_entry): Delete.
7303 * server.c (kill_inferior_callback): Update.
7304 (detach_or_kill_inferior_callback): Update.
7305 (print_started_pid): Update.
7306 (print_attached_pid): Update.
7307 (process_serial_event): Simplify read of ptid.
7308 * thread-db.c (thread_db_create_event): Update.
7309 (thread_db_get_tls_address): Update.
7310 * win32-low.c (current_inferior_ptid): Simplify.
7311
46917d26
TT
73122014-02-19 Tom Tromey <tromey@redhat.com>
7313
7314 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7315 argument.
7316 (target_supports_btrace): Update.
7317
0759a81e
YQ
73182014-02-14 Yao Qi <yao@codesourcery.com>
7319
7320 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7321 (rsp-low-ipa.o): New target.
7322
a7191e8b
TT
73232014-02-12 Tom Tromey <tromey@redhat.com>
7324
7325 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7326 convert_ascii_to_int.
7327 * regcache.c (registers_to_string): Likewise.
7328 * remote-utils.c (decode_M_packet): Likewise.
7329 * server.c (process_serial_event): Likewise.
7330
ff0e980e
TT
73312014-02-12 Tom Tromey <tromey@redhat.com>
7332
7333 * server.c (handle_query, handle_v_run): Use hex2bin, not
7334 unhexify.
7335 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7336
e9371aff
TT
73372014-02-12 Tom Tromey <tromey@redhat.com>
7338
7339 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7340 convert_int_to_ascii.
7341 * regcache.c (registers_to_string, collect_register_as_string):
7342 Likewise.
7343 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7344 Likewise.
7345 * server.c (process_serial_event): Likewise.
7346 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7347 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7348
971dc0b8
TT
73492014-02-12 Tom Tromey <tromey@redhat.com>
7350
7351 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7352 bin2hex, not hexify.
7353 * tracepoint.c (cmd_qtstatus): Likewise.
7354
0a822afb
TT
73552014-02-12 Tom Tromey <tromey@redhat.com>
7356
7357 * remote-utils.c (monitor_output): Pass explicit length to
7358 hexify.
7359
9c3d6531
TT
73602014-02-12 Tom Tromey <tromey@redhat.com>
7361
7362 * tracepoint.c: Include rsp-low.h.
7363 * server.c: Include rsp-low.h.
7364 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7365 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7366 declare.
7367 * remote-utils.c: Include rsp-low.h.
7368 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7369 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7370 (convert_int_to_ascii, convert_ascii_to_int): Move to
7371 common/rsp-low.c.
7372 * regcache.c: Include rsp-low.h.
7373 * ax.c: Include rsp-low.h.
7374 * Makefile.in (SFILES): Add common/rsp-low.c.
7375 (OBS): Add rsp-low.o.
7376 (rsp-low.o): New target.
7377
01fd3ea5
TT
73782014-02-12 Tom Tromey <tromey@redhat.com>
7379
7380 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7381 Include print-utils.h.
7382 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7383 (plongest, thirty_two, phex_nz): Remove.
7384 * Makefile.in (SFILES): Add common/print-utils.c.
7385 (OBS): Add print-utils.o.
7386 (print-utils-ipa.o): New target.
7387 (print-utils.o): New target.
7388 (IPA_OBJS): Add print-utils-ipa.o.
7389
e99dc820
TT
73902014-02-06 Tom Tromey <tromey@redhat.com>
7391
7392 * Makefile.in (SFILES): Fix indentation.
7393
ee1e2d4f
DE
73942014-02-05 Doug Evans <dje@google.com>
7395
7396 * linux-low.c (linux_wait_for_event): Improve comment.
7397 (linux_wait_1): Keep current_inferior in sync with event_child.
7398
f5a02773
DE
73992014-01-22 Doug Evans <dje@google.com>
7400
7401 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7402
87ce2a04
DE
74032014-01-22 Doug Evans <dje@google.com>
7404
7405 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7406 * configure: Regenerate.
7407 * config.in: Regenerate.
7408 * Makefile.in (SFILES): Add debug.c.
7409 (OBS): Add debug.o.
7410 * debug.c: New file.
7411 * debug.h: New file.
7412 * linux-aarch64-low.c (*): Update all debugging printfs to use
7413 debug_printf instead of fprintf.
7414 * linux-arm-low.c (*): Ditto.
7415 * linux-cris-low.c (*): Ditto.
7416 * linux-crisv32-low.c (*): Ditto.
7417 * linux-m32r-low.c (*): Ditto.
7418 * linux-sparc-low.c (*): Ditto.
7419 * linux-x86.c (*): Ditto.
7420 * linux-low.c (*): Ditto.
7421 (linux_wait_1): Add calls to debug_enter, debug_exit.
7422 (linux_wait): Remove redundant debugging printf.
7423 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7424 (linux_resume, unstop_all_lwps): Ditto.
7425 * mem-break.c (*): Update all debugging printfs to use
7426 debug_printf instead of fprintf.
7427 * remote-utils.c (*): Ditto.
7428 * thread-db.c (*): Ditto.
7429 * server.c #include <ctype.h>, "gdb_vecs.h".
7430 (debug_threads): Moved to debug.c.
7431 (*): Update all debugging printfs to use debug_printf instead of
7432 fprintf.
7433 (start_inferior): Replace call to fflush with call to debug_flush.
7434 (monitor_show_help): Mention set debug-format.
7435 (parse_debug_format_options): New function.
7436 (handle_monitor_command): Handle "monitor set debug-format".
7437 (gdbserver_usage): Mention --debug-format.
7438 (main): Parse --debug-format.
7439 * server.h (debug_threads): Declaration moved to debug.h.
7440 #include "debug.h".
7441 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7442 trace_debug_1 that uses debug_printf.
7443 (tracepoint_look_up_symbols): Update all debugging printfs to use
7444 debug_printf instead of fprintf.
7445
e671835b
BS
74462014-01-20 Baruch Siach <baruch@tkos.co.il>
7447
7448 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7449 sys/ptrace.h.
7450
b5737fa9
PA
74512014-01-17 Pedro Alves <palves@redhat.com>
7452
ea38d2a9 7453 PR build/16445
c7faa97a
PA
7454 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7455 defined after including gdb_proc_service.h.
b5737fa9 7456
40ed484e
DE
74572014-01-16 Doug Evans <dje@google.com>
7458
7459 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7460 (match_dll): Use it.
7461
969c39fb
MM
74622014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7463
7464 * target.h (target_ops) <read_btrace>: Change parameters and
7465 return type to allow error reporting.
7466 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7467 trace reading errors on.
7468 * linux-low.c (linux_low_read_btrace): Pass trace reading
7469 errors on.
7470 (linux_low_disable_btrace): New.
7471
ab7f45ba
DE
74722014-01-15 Doug Evans <dje@google.com>
7473
7474 * inferiors.c (thread_id_to_gdb_id): Delete.
7475 * inferiors.h (thread_id_to_gdb_id): Delete.
7476
66af0f44
EZ
74772014-01-13 Eli Zaretskii <eliz@gnu.org>
7478
7479 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7480 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7481 versions.
7482
9939e131
PA
74832014-01-08 Pedro Alves <palves@redhat.com>
7484
7485 * server.c (handle_status): Don't discard previous queued stop
7486 replies or thread's pending status here.
7487 (main) <disconnection>: Do it here instead.
7488
b7ea362b
PA
74892014-01-08 Pedro Alves <palves@redhat.com>
7490
7491 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7492 * server.c (visit_actioned_threads, handle_pending_status): New
7493 function.
7494 (handle_v_cont): Factor out parts to ...
7495 (resume): ... this new function. If in all-stop, and a thread
7496 being resumed has a pending status, report it without actually
7497 resuming.
7498 (myresume): Adjust to use the new 'resume' function.
7499 (clear_pending_status_callback, set_pending_status_callback)
7500 (find_status_pending_thread_callback): New functions.
7501 (handle_status): Handle the case of multiple threads having
7502 interesting statuses to report. Report threads' real last signal
7503 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7504 with an interesting thread to report the status for, instead of
7505 always reporting the status of the first thread.
7506
28498c42
JB
75072014-01-01 Joel Brobecker <brobecker@adacore.com>
7508
7509 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7510 * gdbreplay.c (gdbreplay_version): Likewise.
7511
f45c82da
YZ
75122013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7513
7514 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7515 iov.iov_len with the real length in use.
7516
379a5e2d
JB
75172013-12-13 Joel Brobecker <brobecker@adacore.com>
7518
7519 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7520 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7521 for all targets that use win32-low.c.
7522 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7523 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7524
4210d83e
PA
75252013-12-13 Pedro Alves <palves@redhat.com>
7526
7527 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7528 if equal to TARGET_WAITKIND_LOADED.
7529 * win32-low.c (cached_status): New static global.
7530 (win32_wait): Add declaration.
7531 (do_initial_child_stuff): Flush all initial pending debug events
7532 up to the initial breakpoint.
7533 (win32_wait): If CACHED_STATUS was set, return that instead
7534 of doing a real wait. Remove the code resuming the execution
7535 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7536 during the initial phase. Also remove the code changing
7537 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7538 TARGET_WAITKIND_STOPPED.
7539
e7f0d979
YQ
75402013-12-11 Yao Qi <yao@codesourcery.com>
7541
7542 * notif.c (handle_notif_ack): Return 0 if no notification
7543 matches.
7544
ebcf782c
DE
75452013-11-20 Doug Evans <dje@google.com>
7546
7547 * linux-low.c (linux_set_resume_request): Fix comment.
7548
20ad9378
DE
75492013-11-20 Doug Evans <dje@google.com>
7550
7551 * linux-low.c (resume_status_pending_p): Tweak comment.
7552
a196ebeb
WT
75532013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7554
7555 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7556 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7557 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7558 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7559 (srv_amd64_regobj): Add amd64-mpx.o.
7560 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7561 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7562 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7563 * i387-fp.c (num_pl_bnd_register) Added constant.
7564 (num_pl_bnd_cfg_registers) Added constant.
7565 (struct i387_xsave) Added reserved area and MPX fields.
7566 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7567 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7568 function.
7569 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7570 (init_registers_amd64_mpx_linux): Declare new function.
7571 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7572 (x86_64_regmap): Add MPX registers.
7573 (x86_linux_read_description): Add MPX case.
7574 (initialize_low_arch): Initialize MPX targets.
7575
0080a2f6
TT
75762013-11-18 Tom Tromey <tromey@redhat.com>
7577
7578 * configure: Rebuild.
7579 * configure.ac: Don't check for stdlib.h.
7580 * gdbreplay.c: Unconditionally include stdlib.h.
7581
2978b111
TT
75822013-11-18 Tom Tromey <tromey@redhat.com>
7583
7584 * config.in: Rebuild.
7585 * configure: Rebuild.
7586 * configure.ac: Don't use AC_HEADER_DIRENT.
7587
a3d08894
TT
75882013-11-18 Tom Tromey <tromey@redhat.com>
7589
7590 * server.h: Don't check HAVE_STRING_H.
7591 * gdbreplay.c: Don't check HAVE_STRING_H.
7592 * configure: Rebuild.
7593
0a5dd17d
TT
75942013-11-18 Tom Tromey <tromey@redhat.com>
7595
7596 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7597 LIBGNU.
7598
1bd2f0ba
TT
75992013-11-08 Tom Tromey <tromey@redhat.com>
7600
7601 * configure, config.in: Rebuild.
7602 * configure.ac: Remove unused configury.
7603
3266f10b
TT
76042013-11-08 Tom Tromey <tromey@redhat.com>
7605
7606 * acinclude.m4: Include common.m4, codeset.m4.
7607 * configure, config.in: Rebuild.
7608 * configure.ac: Use GDB_AC_COMMON.
7609
6682d959
AA
76102013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7611
7612 * linux-s390-low.c (HWCAP_S390_TE): New define.
7613 (s390_arch_setup): Consider the TE field in the HWCAP for
7614 determining 'have_regset_tdb'.
7615
fd0a4d76
SDJ
76162013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7617
7618 PR gdb/16014
7619 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7620 call to sizeof.
7621
1a3d890b
PA
76222013-10-02 Pedro Alves <palves@redhat.com>
7623
7624 * server.c (process_serial_event): Don't output "GDBserver
7625 exiting" if GDB is connected through stdio.
7626 * target.c (mywait): Likewise, be silent if GDB is connected
7627 through stdio.
7628
97ad4581
JB
76292013-10-01 Joel Brobecker <brobecker@adacore.com>
7630
7631 * lynx-low.c (lynx_add_threads_after_attach): New function.
7632 (lynx_attach): Remove call to add_thread. Add call to
7633 lynx_add_threads_after_attach instead.
7634
5b4e221c
MF
76352013-09-28 Mike Frysinger <vapier@gentoo.org>
7636
7637 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7638 * config.in, configure: Regenerated.
7639
ee47b2f8
YQ
76402013-09-18 Yao Qi <yao@codesourcery.com>
7641
7642 PR server/15959
7643 * server.c (start_inferior): Clear 'resume_info'.
7644
d6707650 76452013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7646
d6707650
JW
7647 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7648 for each register.
7649
9243dd0e 76502013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7651
9243dd0e
JW
7652 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7653 linux-tile-low.o to srv_tgtobj.
7654
c623a6ef
WN
76552013-09-16 Will Newton <will.newton@linaro.org>
7656
7657 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7658 out regs.
7659
fb71d39e
PA
76602013-09-06 Pedro Alves <palves@redhat.com>
7661
7662 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7663 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7664 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7665 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7666 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7667 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7668
8e7e9910
PA
76692013-09-06 Pedro Alves <palves@redhat.com>
7670
7671 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7672 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7673
7c3a12ca
PA
76742013-09-06 Pedro Alves <palves@redhat.com>
7675
7676 * linux-amd64-ipa.c: Include tracepoint.h.
7677 * linux-i386-ipa.c: Include tracepoint.h.
7678
8eb3d7b6
RW
76792013-09-06 Ricard Wanderlof <ricardw@axis.com>
7680
7681 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7682 (ps_get_thread_area): New function.
7683
eddddb9d
RW
76842013-09-06 Ricard Wanderlof <ricardw@axis.com>
7685
7686 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7687 (initialize_low_arch): Call init_registers_crisv32 rather than
7688 init_register_crisv32.
7689
533b0600
PA
76902013-09-05 Pedro Alves <palves@redhat.com>
7691
7692 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7693 to ...
7694 * hostio.h: ... this new file.
7695 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7696 win32-low.c: Include hostio.h.
7697
0ce3d3b5
PA
76982013-09-05 Pedro Alves <palves@redhat.com>
7699
7700 * server.h (gdb_client_data, handler_func, callback_handler_func)
7701 (delete_file_handler, add_file_handler, append_callback_event)
7702 (delete_callback_event, start_event_loop, initialize_event_loop):
7703 Move to event-loop.h and include it.
7704 * event-loop.h: New file.
7705
799cdc37
PA
77062013-09-05 Pedro Alves <palves@redhat.com>
7707
7708 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7709 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7710 (loaded_dll, unloaded_dll): Move to ...
7711 * dll.h: ... this new file.
7712 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7713
6a6bbd9d
PA
77142013-09-05 Pedro Alves <palves@redhat.com>
7715
7716 * server.h (current_process, get_thread_process, all_processes)
7717 (add_inferior_to_list, for_each_inferior, current_inferior)
7718 (remove_inferior, add_process, remove_process, find_process_pid)
7719 (have_started_inferiors_p, have_attached_inferiors_p)
7720 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7721 (clear_inferiors, find_inferior, find_inferior_id)
7722 (inferior_target_data, set_inferior_target_data)
7723 (inferior_regcache_data, set_inferior_regcache_data): Move to
7724 inferiors.h, and include it.
7725 * inferiors.h: New file.
7726
f699aaba
PA
77272013-09-05 Pedro Alves <palves@redhat.com>
7728
7729 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7730 Move ...
72f4393d 7731 * ax.h: ... here.
f699aaba 7732
c144c7a0
PA
77332013-09-05 Pedro Alves <palves@redhat.com>
7734
7735 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7736 tracepoint.h.
7737 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7738 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7739 (handle_tracepoint_general_set, handle_tracepoint_query)
7740 (tracepoint_finished_step, tracepoint_was_hit)
7741 (release_while_stepping_state_list, current_traceframe)
7742 (in_readonly_region, traceframe_read_mem)
7743 (fetch_traceframe_registers, traceframe_read_sdata)
7744 (traceframe_read_info, struct fast_tpoint_collect_status)
7745 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7746 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7747 (supply_fast_tracepoint_registers)
7748 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7749 (ipa_tdesc, claim_trampoline_space)
7750 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7751 (agent_mem_read, agent_get_trace_state_variable_value)
7752 (agent_set_trace_state_variable_value, agent_tsv_read)
7753 (agent_mem_read_string, get_raw_reg_func_addr)
7754 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7755 * tracepoint.h: ... this new file.
7756
ff42e6ab
PA
77572013-09-05 Pedro Alves <palves@redhat.com>
7758
7759 * server.h (perror_with_name, error, fatal, warning, paddress)
7760 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7761 include it.
7762 * utils.h: New file.
7763
541af0f4
PA
77642013-09-05 Pedro Alves <palves@redhat.com>
7765
7766 * server.h (remote_debug, noack_mode, transport_is_reliable)
7767 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7768 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7769 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7770 (write_enn, initialize_async_io, enable_async_io)
7771 (disable_async_io, check_remote_input_interrupt_request)
7772 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7773 (dead_thread_notify, prepare_resume_reply)
7774 (decode_address_to_semicolon, decode_address, decode_m_packet)
7775 (decode_M_packet, decode_X_packet, decode_xfer_write)
7776 (decode_search_memory_packet, unhexify, hexify)
7777 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7778 (look_up_one_symbol, relocate_instruction)
7779 (monitor_output): Move to remote-utils.h, and include it.
7780 * remote-utils.h: New file.
7781
eebdf26b
PA
77822013-09-05 Pedro Alves <palves@redhat.com>
7783
7784 * server.h (_): Delete.
7785
3aafd2ff
PA
77862013-09-02 Pedro Alves <palves@redhat.com>
7787
7788 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7789 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7790 allocated.
7791 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7792
cee83bcb
PM
77932013-09-02 Pierre Muller <muller@sourceware.org>
7794
7795 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7796 or WriteProcessMemory complete successfully and handle
7797 ERROR_PARTIAL_COPY error.
7798
9a13b2fa
PA
77992013-09-02 Pedro Alves <palves@redhat.com>
7800
7801 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7802 error instead of EIO.
7803
602e3198
JK
78042013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7805
7806 PR server/15604
7807 * linux-low.c: Include filestuff.h.
7808 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7809 * lynx-low.c: Include filestuff.h.
7810 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7811 * server.c: Include filestuff.h.
7812 (main): Call notice_open_fds.
7813 * spu-low.c: Include filestuff.h.
7814 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7815
96d7229d
LM
78162013-08-22 Luis Machado <lgustavo@codesourcery.com>
7817
7818 * Makefile.in: Explain why ../target and ../nat are not
7819 listed as include file search paths.
7820 (linux-waitpid.o): New object file rule.
7821 * configure.srv (srv_native_linux_obj): New variable.
7822 Replace all occurrences of linux native object files with
7823 $srv_native_linux_obj.
7824 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7825 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7826 (linux_enable_event_reporting): Remove declaration.
7827 (my_waitpid): Moved to common/linux-waitpid.c.
7828 (linux_wait_for_event): Pass ptid when calling
7829 linux_enable_event_reporting.
7830 (linux_supports_tracefork_flag): Remove.
7831 (linux_enable_event_reporting): Likewise.
7832 (linux_tracefork_grandchild): Remove.
7833 (STACK_SIZE): Moved to common/linux-ptrace.c.
7834 (linux_tracefork_child): Remove.
7835 (linux_test_for_tracefork): Remove.
7836 (linux_look_up_symbols): Call linux_supports_traceclone.
7837 (initialize_low): Remove call to linux_test_for_tracefork.
7838 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7839 common/linux-ptrace.h.
7840 (PTRACE_TYPE_ARG4): Likewise.
7841 Include linux-ptrace.h.
7842
32940073
PA
78432013-08-21 Pedro Alves <palves@redhat.com>
7844
7845 * config.in: Renegerate.
7846
33b60d58 78472013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7848
33b60d58
LM
7849 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7850 (SFILES): Remove $(srcdir)/common/target-common.c and
7851 add $(srcdir)/target/waitstatus.c.
7852 (OBS): Remove target-common.o and add waitstatus.o.
7853 (server_h): Remove $(srcdir)/../common/target-common.h and
7854 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7855 and $(srcdir)/../target/waitstatus.h.
7856 (target-common.o): Remove.
7857 (waitstatus.o): New target object file.
7858 * target.h: Do not include target-common.h and
7859 include target/resume.h, target/wait.h and
7860 target/waitstatus.h.
7861
b8e1b30e
LM
78622013-08-13 Luis Machado <lgustavo@codesourcery.com>
7863
7864 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7865 to PTRACE_TYPE_ARG3.
7866 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7867 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7868 PTRACE_TYPE_ARG4.
7869 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7870 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7871
7a60ad40
YQ
78722013-07-27 Jie Zhang <jie@codesourcery.com>
7873 Daniel Jacobowitz <dan@codesourcery.com>
7874 Yao Qi <yao@codesourcery.com>
7875
7876 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7877 (mips-linux-watch.o): New rule.
7878 (mips_linux_watch_h): New variable.
7879 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7880 srv_tgtobj.
7881 * linux-mips-low.c: Include mips-linux-watch.h.
7882 (struct arch_process_info, struct arch_lwp_info): New.
7883 (update_watch_registers_callback): New function.
7884 (mips_linux_new_process, mips_linux_new_thread) New functions.
7885 (mips_linux_prepare_to_resume, mips_insert_point): New
7886 functions.
7887 (mips_remove_point, mips_stopped_by_watchpoint): New
7888 functions.
7889 (rsp_bp_type_to_target_hw_bp_type): New function.
7890 (mips_stopped_data_address): New function.
7891 (the_low_target): Add watchpoint support functions.
7892
de6f69ad
YQ
78932013-07-27 Yao Qi <yao@codesourcery.com>
7894
7895 * i386-low.c: Include break-common.h.
7896 (enum target_hw_bp_type): Remove.
7897
3360c0bf
LM
78982013-07-24 Luis Machado <lgustavo@codesourcery.com>
7899
7900 * Makefile.in (SFILES): /common/target-common.c.
7901 (OBS): Add target-common.o.
7902 (server_h): Add $(srcdir)/../common/target-common.h.
7903 (target-common.o): New target.
7904 * server.c (queue_stop_reply_callback): Free
7905 status string after use.
7906 * target.c (target_waitstatus_to_string): Remove.
7907 * target.h: Include target-common.h.
7908 (resume_kind): Likewise.
7909 (target_waitkind): Likewise.
7910 (target_waitstatus): Likewise.
7911 (TARGET_WNOHANG): Likewise.
7912
bd885420
YQ
79132013-07-04 Yao Qi <yao@codesourcery.com>
7914
7915 * Makefile.in (host_alias): Use @host_noncanonical@.
7916 (target_alias): Use @target_noncanonical@.
7917 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7918 ACX_NONCANONICAL_HOST.
7919 * configure: Regenerated.
7920
7921 Revert:
7922 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7923
7924 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7925 * configure: Rebuild.
7926 * Makefile.in (version_host, version_target): Get from configure.
7927 (version.c): Use $(version_host) and $(version_target).
7928
17ef446e
PA
79292013-07-03 Pedro Alves <palves@redhat.com>
7930
7931 * Makefile.in (config.status): Depend on development.sh.
7932 * acinclude.m4: Include libmcheck.m4.
7933 * configure: Regenerate.
7934
7a9a7487
MG
79352013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7936
7937 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7938 attribute inside the parentheses.
7939 (winapi_DebugSetProcessKillOnExit): Ditto.
7940 (winapi_DebugBreakProcess): Ditto.
7941 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7942
49b64de6
MG
79432013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7944
7945 * notif.h (notif_event): Add a dummy member to avoid compiler
7946 errors.
7947
d5749ee7
PA
79482013-07-01 Pedro Alves <palves@redhat.com>
7949
7950 * hostio.c (HOSTIO_PATH_MAX): Define.
7951 (require_filename, handle_open, handle_unlink, handle_readlink):
7952 Use it.
7953
d8d2a3ee
PA
79542013-07-01 Pedro Alves <palves@redhat.com>
7955
7956 * server.h: Include "pathmax.h".
7957 * linux-low.c: Don't include sys/param.h.
7958 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7959 MAXPATHLEN.
7960 * win32-low.c: Don't include sys/param.h.
7961 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7962
bc7dea8d
PA
79632013-07-01 Pedro Alves <palves@redhat.com>
7964
7965 * event-loop.c: Don't check HAVE_UNISTD_H before including
7966 <unistd.h>.
7967 * gdbreplay.c: Likewise.
7968 * remote-utils.c: Likewise.
7969 * server.c: Likewise.
7970 * configure.ac: Don't check for unistd.h.
7971 * configure: Regenerate.
7972
d6c2da54
TT
79732013-06-28 Tom Tromey <tromey@redhat.com>
7974
7975 * Makefile.in (version.c): Use version.in, not
7976 common/version.in.
7977
257b6bec
MG
79782013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7979
7980 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7981 * configure: Rebuild.
7982 * Makefile.in (version_host, version_target): Get from configure.
7983 (version.c): Use $(version_host) and $(version_target).
7984
86ebe149
DK
79852013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7986
7987 Fix trace-status to output user name without trailing colon.
7988 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7989
f30aa5af
DK
79902013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7991
7992 Fix trace-status to output proper start-time and stop-time.
7993 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7994 output start time and stop time in hex as gdb expects.
7995
28a93511
YQ
79962013-06-26 Pedro Alves <pedro@codesourcery.com>
7997
7998 * tracepoint.c (build_traceframe_info_xml): Output trace state
7999 variables present in the trace buffer.
8000
01208463
TT
80012013-06-24 Tom Tromey <tromey@redhat.com>
8002
8003 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8004 create-version.sh.
8005 (version.o): Remove.
8006 * gdbreplay.c: Include version.h.
8007 (version, host_name): Don't declare.
8008 * server.h: Include version.h.
8009 (version, host_name): Don't declare.
8010
760256f9
PA
80112013-06-12 Pedro Alves <palves@redhat.com>
8012
8013 * linux-x86-low.c (linux_is_elf64): Delete global.
8014 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8015 with local linux_pid_exe_is_elf_64_file use.
8016
030031ee
PA
80172013-06-11 Pedro Alves <palves@redhat.com>
8018
8019 * linux-low.c (regset_disabled, disable_regset): New functions.
8020 (regsets_fetch_inferior_registers)
8021 (regsets_store_inferior_registers): Use them.
8022 (initialize_regsets_info); Don't allocate the disabled_regsets
8023 array here.
8024 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8025 comment.
8026
5da6eb0a
PA
80272013-06-11 Pedro Alves <palves@redhat.com>
8028
8029 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8030 xmalloc.
8031
7e5aaa09
PA
80322013-06-11 Pedro Alves <palves@redhat.com>
8033
8034 * linux-x86-low.c (initialize_low_arch): Call
8035 init_registers_x32_avx_linux.
8036
d878444c
JK
80372013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8038
8039 Fix compatibility with Android Bionic.
8040 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8041 it is not empty.
8042
3aee8918
PA
80432013-06-07 Pedro Alves <palves@redhat.com>
8044
5f2b57b5 8045 PR server/14823
3aee8918
PA
8046 * Makefile.in (OBS): Add tdesc.o.
8047 (IPA_OBJS): Add tdesc-ipa.o.
8048 (tdesc-ipa.o): New rule.
8049 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8050 interface.
8051 * linux-low.c (new_inferior): Delete.
8052 (disabled_regsets, num_regsets): Delete.
8053 (linux_add_process): Adjust to set the new per-process
8054 new_inferior flag.
8055 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8056 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8057 was a stop. When calling arch_setup, switch the current inferior
8058 to the thread that got an event.
8059 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8060 (regsets_fetch_inferior_registers)
8061 (regsets_store_inferior_registers): New regsets_info parameter.
8062 Adjust to use it.
8063 (linux_register_in_regsets): New regs_info parameter. Adjust to
8064 use it.
8065 (register_addr, fetch_register, store_register): New usrregs_info
8066 parameter. Adjust to use it.
8067 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8068 parameter regs_info. Adjust to use it.
8069 (linux_fetch_registers): Get the current inferior's regs_info, and
8070 adjust to use it.
8071 (linux_store_registers): Ditto.
8072 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8073 (initialize_low): Don't initialize the target_regsets here. Call
8074 initialize_low_arch.
8075 * linux-low.h (target_regsets): Delete declaration.
8076 (struct regsets_info): New.
8077 (struct usrregs_info): New.
8078 (struct regs_info): New.
8079 (struct process_info_private) <new_inferior>: New field.
8080 (struct linux_target_ops): Delete the num_regs, regmap, and
8081 regset_bitmap fields. New field regs_info.
8082 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8083 * i387-fp.c (num_xmm_registers): Delete.
8084 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8085 calls to new interface.
8086 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8087 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8088 Infer the number of xmm registers from the regcache's target
8089 description.
8090 * i387-fp.h (num_xmm_registers): Delete.
8091 * inferiors.c (add_thread): Don't install the thread's regcache
8092 here.
8093 * proc-service.c (gregset_info): Fetch the current inferior's
8094 regs_info. Adjust to use it.
8095 * regcache.c: Include tdesc.h.
8096 (register_bytes, reg_defs, num_registers)
8097 (gdbserver_expedite_regs): Delete.
8098 (get_thread_regcache): If the thread doesn't have a regcache yet,
8099 create one, instead of aborting gdbserver.
8100 (regcache_invalidate_one): Rename to ...
8101 (regcache_invalidate_thread): ... this.
8102 (regcache_invalidate_one): New.
8103 (regcache_invalidate): Only invalidate registers of the current
8104 process.
8105 (init_register_cache): Add target_desc parameter, and use it.
8106 (new_register_cache): Ditto. Assert the target description has a
8107 non zero registers_size.
8108 (regcache_cpy): Add assertions. Adjust.
8109 (realloc_register_cache, set_register_cache): Delete.
8110 (registers_to_string, registers_from_string): Adjust.
8111 (find_register_by_name, find_regno, find_register_by_number)
8112 (register_cache_size): Add target_desc parameter, and use it.
8113 (free_register_cache_thread, free_register_cache_thread_one)
8114 (regcache_release, register_cache_size): New.
8115 (register_size): Add target_desc parameter, and use it.
8116 (register_data, supply_register, supply_register_zeroed)
8117 (supply_regblock, supply_register_by_name, collect_register)
8118 (collect_register_as_string, collect_register_by_name): Adjust.
8119 * regcache.h (struct target_desc): Forward declare.
8120 (struct regcache) <tdesc>: New field.
8121 (init_register_cache, new_register_cache): Add target_desc
8122 parameter.
8123 (regcache_invalidate_thread): Declare.
8124 (regcache_invalidate_one): Delete declaration.
8125 (regcache_release): Declare.
8126 (find_register_by_number, register_cache_size, register_size)
8127 (find_regno): Add target_desc parameter.
8128 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8129 declarations.
8130 * remote-utils.c: Include tdesc.h.
8131 (outreg, prepare_resume_reply): Adjust.
8132 * server.c: Include tdesc.h.
8133 (gdbserver_xmltarget): Delete declaration.
8134 (get_features_xml, process_serial_event): Adjust.
8135 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8136 declare.
8137 (struct process_info) <tdesc>: New field.
8138 (ipa_tdesc): Declare.
8139 * tdesc.c: New file.
8140 * tdesc.h: New file.
8141 * tracepoint.c: Include tdesc.h.
8142 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8143 (get_context_regcache): Adjust to pass ipa_tdesc down.
8144 (do_action_at_tracepoint): Adjust to get the register cache size
8145 from the context regcache's description.
8146 (traceframe_walk_blocks): Adjust to get the register cache size
8147 from the current trace frame's description.
8148 (traceframe_get_pc): Adjust to get current trace frame's
8149 description and pass it down.
8150 (gdb_collect): Adjust to get the register cache size from the
8151 IPA's description.
8152 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8153 (gdbserver_xmltarget): Delete.
8154 (initialize_low_tracepoint): Set the ipa's target description.
8155 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8156 (initialize_low_tracepoint): Set the ipa's target description.
8157 * linux-x86-low.c: Include tdesc.h.
8158 [__x86_64__] (is_64bit_tdesc): New.
8159 (ps_get_thread_area, x86_get_thread_area): Use it.
8160 (i386_cannot_store_register): Rename to ...
8161 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8162 (i386_cannot_fetch_register): Rename to ...
8163 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8164 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8165 to new interface.
8166 (target_regsets): Rename to ...
8167 (x86_regsets): ... this.
8168 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8169 interface.
8170 (x86_siginfo_fixup): Use is_64bit_tdesc.
8171 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8172 (tdesc_x32_avx_linux, tdesc_x32_linux)
8173 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8174 Declare.
8175 (x86_linux_update_xmltarget): Delete.
8176 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8177 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8178 (AMD64_LINUX_USER64_CS): New.
8179 (x86_linux_read_description): New, based on
8180 x86_linux_update_xmltarget.
8181 (same_process_callback): New.
8182 (x86_arch_setup_process_callback): New.
8183 (x86_linux_update_xmltarget): New.
8184 (x86_regsets_info): New.
8185 (amd64_linux_regs_info): New.
8186 (i386_linux_usrregs_info): New.
8187 (i386_linux_regs_info): New.
8188 (x86_linux_regs_info): New.
8189 (x86_arch_setup): Reimplement.
8190 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8191 (x86_emit_ops): Ditto.
8192 (the_low_target): Adjust. Install x86_linux_regs_info,
8193 x86_cannot_fetch_register, and x86_cannot_store_register.
8194 (initialize_low_arch): New.
8195 * linux-ia64-low.c (tdesc_ia64): Declare.
8196 (ia64_fetch_register): Adjust.
8197 (ia64_usrregs_info, regs_info): New globals.
8198 (ia64_regs_info): New function.
8199 (the_low_target): Adjust.
8200 (initialize_low_arch): New function.
8201 * linux-sparc-low.c (tdesc_sparc64): Declare.
8202 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8203 Adjust.
8204 (sparc_arch_setup): New function.
8205 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8206 (the_low_target): Adjust.
8207 (initialize_low_arch): New function.
8208 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8209 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8210 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8211 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8212 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8213 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8214 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8215 (tdesc_powerpc_isa205_vsx64l): Declare.
8216 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8217 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8218 (ppc_set_pc, ppc_get_hwcap): Adjust.
8219 (ppc_usrregs_info): Forward declare.
8220 (!__powerpc64__) ppc_regmap_adjusted: New global.
8221 (ppc_arch_setup): Adjust to the current process'es target
8222 description.
8223 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8224 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8225 (ppc_store_evrregset): Adjust.
8226 (target_regsets): Rename to ...
8227 (ppc_regsets): ... this, and make static.
8228 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8229 (ppc_regs_info): New function.
8230 (the_low_target): Adjust.
8231 (initialize_low_arch): New function.
8232 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8233 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8234 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8235 (tdesc_s390x_linux64v2): Declare.
8236 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8237 (s390_fill_gregset, s390_store_last_break): Adjust.
8238 (target_regsets): Rename to ...
8239 (s390_regsets): ... this, and make static.
8240 (s390_get_pc, s390_set_pc): Adjust.
8241 (s390_get_hwcap): New target_desc parameter, and use it.
8242 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8243 (s390_arch_setup): Adjust to set the current process'es target
8244 description. Don't adjust the regmap.
8245 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8246 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8247 (regs_info_3264): New globals.
8248 (s390_regs_info): New function.
8249 (the_low_target): Adjust.
8250 (initialize_low_arch): New function.
8251 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8252 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8253 [__mips64] (init_registers_mips_linux)
8254 (init_registers_mips_dsp_linux): Delete defines.
8255 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8256 (have_dsp): New global.
8257 (mips_read_description): New, based on mips_arch_setup.
8258 (mips_arch_setup): Reimplement.
8259 (get_usrregs_info): New function.
8260 (mips_cannot_fetch_register, mips_cannot_store_register)
8261 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8262 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8263 (target_regsets): Rename to ...
8264 (mips_regsets): ... this, and make static.
8265 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8266 (dsp_regs_info, regs_info): New globals.
8267 (mips_regs_info): New function.
8268 (the_low_target): Adjust.
8269 (initialize_low_arch): New function.
8270 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8271 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8272 Declare.
8273 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8274 (arm_read_description): New, with bits factored from
8275 arm_arch_setup.
8276 (arm_arch_setup): Reimplement.
8277 (target_regsets): Rename to ...
8278 (arm_regsets): ... this, and make static.
8279 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8280 (arm_regs_info): New function.
8281 (the_low_target): Adjust.
8282 (initialize_low_arch): New function.
8283 * linux-m68k-low.c (tdesc_m68k): Declare.
8284 (target_regsets): Rename to ...
8285 (m68k_regsets): ... this, and make static.
8286 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8287 (m68k_regs_info): New function.
8288 (m68k_arch_setup): New function.
8289 (the_low_target): Adjust.
8290 (initialize_low_arch): New function.
8291 * linux-sh-low.c (tdesc_sharch): Declare.
8292 (target_regsets): Rename to ...
8293 (sh_regsets): ... this, and make static.
8294 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8295 (sh_regs_info, sh_arch_setup): New functions.
8296 (the_low_target): Adjust.
8297 (initialize_low_arch): New function.
8298 * linux-bfin-low.c (tdesc_bfin): Declare.
8299 (bfin_arch_setup): New function.
8300 (bfin_usrregs_info, regs_info): New globals.
8301 (bfin_regs_info): New function.
8302 (the_low_target): Adjust.
8303 (initialize_low_arch): New function.
8304 * linux-cris-low.c (tdesc_cris): Declare.
8305 (cris_arch_setup): New function.
8306 (cris_usrregs_info, regs_info): New globals.
8307 (cris_regs_info): New function.
8308 (the_low_target): Adjust.
8309 (initialize_low_arch): New function.
8310 * linux-cris-low.c (tdesc_crisv32): Declare.
8311 (cris_arch_setup): New function.
8312 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8313 (cris_regs_info): New function.
8314 (the_low_target): Adjust.
8315 (initialize_low_arch): New function.
8316 * linux-m32r-low.c (tdesc_m32r): Declare.
8317 (m32r_arch_setup): New function.
8318 (m32r_usrregs_info, regs_info): New globals.
8319 (m32r_regs_info): Adjust.
8320 (initialize_low_arch): New function.
8321 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8322 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8323 (tic6x_usrregs_info): Forward declare.
8324 (tic6x_read_description): New function, based on ...
8325 (tic6x_arch_setup): ... this. Reimplement.
8326 (target_regsets): Rename to ...
8327 (tic6x_regsets): ... this, and make static.
8328 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8329 (tic6x_regs_info): New function.
8330 (the_low_target): Adjust.
8331 (initialize_low_arch): New function.
8332 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8333 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8334 (target_regsets): Rename to ...
8335 (xtensa_regsets): ... this, and make static.
8336 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8337 globals.
8338 (xtensa_arch_setup, xtensa_regs_info): New functions.
8339 (the_low_target): Adjust.
8340 (initialize_low_arch): New function.
8341 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8342 (nios2_arch_setup): Set the current process'es tdesc.
8343 (target_regsets): Rename to ...
8344 (nios2_regsets): ... this.
8345 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8346 (nios2_regs_info): New function.
8347 (the_low_target): Adjust.
8348 (initialize_low_arch): New function.
a261b8f5
PA
8349 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8350 (aarch64_arch_setup): Set the current process'es tdesc.
8351 (target_regsets): Rename to ...
8352 (aarch64_regsets): ... this.
8353 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8354 (aarch64_regs_info): New function.
8355 (the_low_target): Adjust.
8356 (initialize_low_arch): New function.
3aee8918
PA
8357 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8358 globals.
8359 (target_regsets): Rename to ...
8360 (tile_regsets): ... this.
8361 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8362 (tile_regs_info): New function.
8363 (tile_arch_setup): Set the current process'es tdesc.
8364 (the_low_target): Adjust.
8365 (initialize_low_arch): New function.
8366 * spu-low.c (tdesc_spu): Declare.
8367 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8368 * win32-arm-low.c (tdesc_arm): Declare.
8369 (arm_arch_setup): New function.
8370 (the_low_target): Install arm_arch_setup instead of
8371 init_registers_arm.
8372 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8373 (init_windows_x86): Rename to ...
8374 (i386_arch_setup): ... this. Set `win32_tdesc'.
8375 (the_low_target): Adjust.
8376 * win32-low.c (win32_tdesc): New global.
8377 (child_add_thread): Don't create the thread cache here.
8378 (do_initial_child_stuff): Set the new process'es tdesc.
8379 * win32-low.h (struct target_desc): Forward declare.
8380 (win32_tdesc): Declare.
8381 * lynx-i386-low.c (tdesc_i386): Declare global.
8382 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8383 * lynx-low.c (lynx_tdesc): New global.
8384 (lynx_add_process): Set the new process'es tdesc.
8385 * lynx-low.h (struct target_desc): Forward declare.
8386 (lynx_tdesc): Declare global.
8387 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8388 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8389 * nto-low.c (nto_tdesc): New global.
8390 (do_attach): Set the new process'es tdesc.
8391 * nto-low.h (struct target_desc): Forward declare.
8392 (nto_tdesc): Declare.
8393 * nto-x86-low.c (tdesc_i386): Declare.
8394 (nto_x86_arch_setup): Set `nto_tdesc'.
8395
b1fbec62
GB
83962013-06-04 Gary Benson <gbenson@redhat.com>
8397
8398 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8399 to qSupported response when appropriate.
8400 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8401 with nonzero-length annex.
8402 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8403 arguments supplied in annex.
8404
d1ec4ce7
DE
84052013-05-31 Doug Evans <dje@google.com>
8406
ac44adcb 8407 PR server/15594
d1ec4ce7
DE
8408 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8409 64 bits in 64-cross-32 environment.
8410
9b25f2d3
PA
84112013-05-28 Pedro Alves <palves@redhat.com>
8412
8413 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8414 (aarch64-without-fpu.c): Delete rule.
8415 * configure.srv (aarch64*-*-linux*): Remove references to
8416 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8417 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8418 declaration.
8419
6740dc9c
PA
84202013-05-24 Pedro Alves <palves@redhat.com>
8421
8422 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8423 instead of strchr/decode_address. Error if the range isn't split
8424 with a ','. Don't assume there's be a ':' in the action.
8425
c2d6af84
PA
84262013-05-23 Yao Qi <yao@codesourcery.com>
8427 Pedro Alves <palves@redhat.com>
8428
8429 * linux-low.c (lwp_in_step_range): New function.
8430 (linux_wait_1): If the thread was range stepping and stopped
8431 outside the stepping range, report the stop to GDB. Otherwise,
8432 continue stepping. Add range stepping debug output.
8433 (linux_set_resume_request): Copy the step range from the resume
8434 request to the lwp.
8435 (linux_supports_range_stepping): New.
8436 (linux_target_ops) <supports_range_stepping>: Set to
8437 linux_supports_range_stepping.
8438 * linux-low.h (struct linux_target_ops)
8439 <supports_range_stepping>: New field.
8440 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8441 * linux-x86-low.c (x86_supports_range_stepping): New.
8442 (the_low_target) <supports_range_stepping>: Set to
8443 x86_supports_range_stepping.
8444 * server.c (handle_v_cont): Handle 'r' action.
8445 (handle_v_requests): Append ";r" if the target supports range
8446 stepping.
8447 * target.h (struct thread_resume) <step_range_start,
8448 step_range_end>: New fields.
8449 (struct target_ops) <supports_range_stepping>:
8450 New field.
8451 (target_supports_range_stepping): New macro.
8452
58794e1a
JB
84532013-05-17 Joel Brobecker <brobecker@adacore.com>
8454
8455 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8456 confusion in comment.
8457
d631c5a7
JB
84582013-05-17 Joel Brobecker <brobecker@adacore.com>
8459
8460 * lynx-low.c (struct process_info_private): New type.
8461 (lynx_add_process): New function.
8462 (lynx_create_inferior, lynx_attach): Replace calls to
8463 add_process by calls to lynx_add_process.
8464 (lynx_resume): If PTID is null, then try using
8465 current_process()->private->last_wait_event_ptid.
8466 Add comments.
8467 (lynx_clear_inferiors): Delete. The contents of that function
8468 has been inlined in lynx_mourn;
8469 (lynx_wait_1): Save the ptid in the process's private data.
8470 (lynx_mourn): Free the process' private data. Replace call
8471 to lynx_clear_inferiors by call to clear_inferiors.
8472
96f7a20f
YQ
84732013-05-17 Yao Qi <yao@codesourcery.com>
8474
8475 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8476 the right place.
8477
db0dfaa0
LM
84782013-05-16 Luis Machado <lgustavo@codesourcery.com>
8479
8480 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8481 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8482 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8483 PT_TEXT_END_ADDR guards. Update comments.
8484 (linux_target_op) <read_offsets>: Conditionally define to
8485 linux_read_offsets if the target is UCLIBC and if it defines
8486 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8487
68f5f838
SL
84882013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8489 Andrew Jenner <andrew@codesourcery.com>
8490
8491 * Makefile.in (SFILES): Add linux-nios2-low.c.
8492 (clean): Add action to delete nios2-linux.c.
8493 (nios2-linux.c): New rule.
8494 * configure.srv: Add nios2*-*-linux*.
8495 * linux-nios2-low.c: New.
8496
1ebff1fd
HAQ
84972013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8498
8499 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8500
f6150862
HZ
85012013-04-25 Hui Zhu <hui@codesourcery.com>
8502
8503 PR gdb/15186
f6150862
HZ
8504 * ax.c (ax_printf): Add fflush.
8505
614c279d
TT
85062013-04-22 Tom Tromey <tromey@redhat.com>
8507
8508 * Makefile.in (SFILES): Add filestuff.c.
8509 (OBS): Add filestuff.o.
8510 (filestuff.o): New target.
8511 * config.in, configure: Rebuild.
8512 * configure.ac: Check for fdwalk, pipe2.
8513
7d4e5717
PA
85142013-04-17 Pedro Alves <palves@redhat.com>
8515
8516 * configure.ac (USE_THREAD_DB): Delete variable.
8517 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8518 Don't AC_SUBST USE_THREAD_DB.
8519 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8520 * config.in, configure: Regenerate.
8521
d5c93e41
PA
85222013-04-16 Pedro Alves <palves@redhat.com>
8523
8524 * linux-low.h (struct lwp_info) <thread_known>: Move under
8525 the USE_THREAD_DB #ifdef.
8526
04f5fe89
PA
85272013-04-16 Pedro Alves <palves@redhat.com>
8528
8529 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8530 (linux-low.o): Delete rule.
8531 * linux-low.h: Always include "gdb_thread_db.h" instead of
8532 conditionally including thread_db.h.
8533 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8534 HAVE_THREAD_DB_H.
8535
480b27bf
JK
85362013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8537
8538 * Makefile.in (install-only): Fix make install regression.
8539
43662968
JK
85402013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8541
8542 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8543 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8544 installation.
8545 * gdbserver.1: Remove.
8546
3e74e146
PA
85472013-03-22 Pedro Alves <palves@redhat.com>
8548
8549 * linux-low.c (handle_extended_wait): Don't call
8550 linux_enable_event_reporting.
8551
a8347a2a
TT
85522013-03-15 Tony Theodore <tonyt@logyst.com>
8553
8554 PR build/9098:
8555 * Makefile.in (SHELL): Use @SHELL@.
8556
eeb56fa7
SDJ
85572013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8558
8559 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8560 compiler warning.
8561
4fa7e2ff
JB
85622013-03-13 Joel Brobecker <brobecker@adacore.com>
8563
8564 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8565 Remove extraneous NULL element.
8566
8ddb1965
YQ
85672013-03-13 Yao Qi <yao@codesourcery.com>
8568
8569 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8570 'V' block in trace frame.
8571
9accd112
MM
85722013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8573
8574 * target.h (struct target_ops): Add btrace ops.
8575 (target_supports_btrace): New macro.
8576 (target_enable_btrace): New macro.
8577 (target_disable_btrace): New macro.
8578 (target_read_btrace): New macro.
8579 * gdbthread.h (struct thread_info): Add btrace field.
8580 * server.c: Include btrace-common.h.
8581 (handle_btrace_general_set): New function.
8582 (handle_btrace_enable): New function.
8583 (handle_btrace_disable): New function.
8584 (handle_general_set): Call handle_btrace_general_set.
8585 (handle_qxfer_btrace): New function.
8586 (struct qxfer qxfer_packets[]): Add btrace entry.
8587 * inferiors.c (remove_thread): Disable btrace.
8588 * linux-low: Include linux-btrace.h.
8589 (linux_low_enable_btrace): New function.
8590 (linux_low_read_btrace): New function.
8591 (linux_target_ops): Add btrace ops.
8592 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8593 Add srv_linux_btrace=yes.
8594 (x86_64-*-linux*): Add linux-btrace.o.
8595 Add srv_linux_btrace=yes.
8596 * configure.ac: Define HAVE_LINUX_BTRACE.
8597 * config.in: Regenerated.
8598 * configure: Regenerated.
8599
5cc22e4c
MM
86002013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8601
8602 * server.c (handle_qxfer): Preserve error message if -3 is
8603 returned.
8604 (qxfer): Document the -3 return value.
8605
7c97f91e
MM
86062013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8607
8608 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8609 (linux_btrace_h): New variable.
8610 (linux-btrace.o): New rule.
8611
be9a119c 86122013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8613 Hafiz Abid Qadeer <abidh@codesourcery.com>
8614
8615 * tracepoint.c (trace_buffer_size): New global.
8616 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8617 (init_trace_buffer): Change to one-argument function. Allocate
8618 trace buffer memory.
8619 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8620 handle QTBuffer:size packet.
8621 (cmd_bigqtbuffer_size): New function.
8622 (initialize_tracepoint): Call init_trace_buffer with
8623 DEFAULT_TRACE_BUFFER_SIZE.
8624 * server.c (handle_query): Add QTBuffer:size in the
8625 supported packets.
8626
e64f7499
YQ
86272013-03-07 Yao Qi <yao@codesourcery.com>
8628
8629 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8630 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8631 of -1.
8632 (cmd_qtsp): Adjust condition. Do post increment.
8633 Set cur_action and cur_step_action back to 0.
8634
f0ae6fc3
PA
86352013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8636
8637 PR server/15236
8638 * linux-low.c (linux_write_memory): Return early success if LEN is
8639 zero.
8640
b5b0b0af
CV
86412013-03-05 Corinna Vinschen <vinschen@redhat.de>
8642
334ad4a8 8643 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8644
589bc927
TT
86452013-02-28 Tom Tromey <tromey@redhat.com>
8646
8647 * configure.ac: Invoke AC_SYS_LARGEFILE.
8648 * configure, config.in: Rebuild.
8649
dfe07582
CV
86502013-02-28 Corinna Vinschen <vinschen@redhat.com>
8651
8652 * win32-low.c: Throughout, fix format strings and casts of
8653 printf-like functions to avoid type related warnings on all
8654 platforms.
8655 (get_child_debug_event): Print dwDebugEventCode as hex since
8656 that's how it's usually documented.
8657
736cd585
YQ
86582013-02-28 Yao Qi <yao@codesourcery.com>
8659
8660 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8661 pulongest.
8662
e1f58301
JW
86632013-02-27 Jiong Wang <jiwang@tilera.com>
8664
8665 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8666 (reg-tilegx32.c): New rule.
8667 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8668 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8669 different register info initializer according to elf class.
8670 (init_registers_tilgx32): New function. The tilegx32 register info
8671 initializer.
8672 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8673 (tile_store_gregset): Likewise.
8674
d171ca78
YQ
86752013-02-27 Yao Qi <yao@codesourcery.com>
8676
8677 * server.c (process_point_options): Print debug message when
8678 debug_threads is true.
8679
282bbdf3
YQ
86802013-02-26 Yao Qi <yao@codesourcery.com>
8681
8682 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8683
aca22551
PA
86842013-02-19 Pedro Alves <palves@redhat.com>
8685 Kai Tietz <ktietz@redhat.com>
8686
8687 PR gdb/15161
8688
8689 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8690 instead of strtoul to extract address from packet.
8691 (process_serial_event) <'z'>: Likewise.
8692
4f3cee1c
YQ
86932013-02-18 Yao Qi <yao@codesourcery.com>
8694
8695 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8696
8e1d55a3
PA
86972013-02-14 Pedro Alves <palves@redhat.com>
8698
8699 Plug memory leak.
8700
8701 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8702 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8703
458820da
PA
87042013-02-14 Pedro Alves <palves@redhat.com>
8705
8706 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8707
baea0dae
PA
87082013-02-14 Pedro Alves <palves@redhat.com>
8709
8710 * tracepoint.c (save_string): Delete.
8711 (add_tracepoint_action): Use savestring instead of save_string.
8712
0b1afbb3
PA
87132013-02-12 Pedro Alves <palves@redhat.com>
8714
8715 * linux-xtensa-low.c: Ditto.
8716 * xtensa-xtregs.c: Ditto.
8717
8a4ac37e
PA
87182013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8719
8720 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8721 thread_db.
8722
148de6bb
MS
87232013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8724
8725 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8726 aarch64_num_wp_regs and aarch64_num_bp_regs to
8727 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8728
55fac6e0
MS
87292013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8730
8731 * linux-aarch64-low.c (ps_get_thread_area): Replace
8732 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8733
176eb98c
MS
87342013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8735 Marcus Shawcroft <marcus.shawcroft@arm.com>
8736 Nigel Stephens <nigel.stephens@arm.com>
8737 Yufeng Zhang <yufeng.zhang@arm.com>
8738
8739 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8740 (aarch64.c, aarch64-without-fpu.c): New targets.
8741 * configure.srv (aarch64*-*-linux*): New.
8742 * linux-aarch64-low.c: New file.
8743
56f7af9c
MS
87442013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8745
43aaf8b6 8746 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8747 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8748 (dequeue_one_deferred_signal, linux_resume_one_thread)
8749 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8750 (linux_tracefork_grandchild, linux_test_for_tracefork)
8751 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8752 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8753 where the argument is 0.
8754
60f662b0
YQ
87552013-01-25 Yao Qi <yao@codesourcery.com>
8756
8757 * event-loop.c: Include "queue.h".
8758 (gdb_event_p): New typedef.
8759 (struct gdb_event) <next_event>: Remove.
8760 (event_queue): Change to QUEUE(gdb_event_p).
8761 (async_queue_event): Remove.
8762 (gdb_event_xfree): New.
8763 (initialize_event_loop): New.
8764 (process_event): Use API from QUEUE.
8765 (wait_for_event): Likewise.
8766 * server.c (main): Call initialize_event_loop.
8767 * server.h (initialize_event_loop): Declare.
8768
5ae4861a
YQ
87692013-01-18 Yao Qi <yao@codesourcery.com>
8770
8771 * ax.h (struct eval_agent_expr_context): New.
8772 (gdb_eval_agent_expr): Update declaration.
8773 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8774 TFRAME. Add new argument CTX.
8775 * server.h (struct eval_agent_expr_context): Declare.
8776 (agent_mem_read, agent_tsv_read): Update declaration.
8777 (agent_mem_read_string): Likewise.
8778 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8779 (add_traceframe_block): Add new argument TPOINT.
8780 Increase TPOINT->traceframe_usage.
8781 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8782 eval_tracepoint_agent_expr.
8783 (condition_true_at_tracepoint): Likewise.
8784 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8785 (agent_mem_read_string, agent_tsv_read): Likewise.
8786
85e00e85
YQ
87872013-01-16 Yao Qi <yao@codesourcery.com>
8788
8789 * linux-low.c (linux_resume_one_lwp): Don't check
8790 'lwp->bp_reinsert != 0'.
8791
4039cf45
JB
87922013-01-07 Joel Brobecker <brobecker@adacore.com>
8793 Pedro Alves <palves@redhat.com>
8794
8795 * lynx-low.c (ptrace_request_to_str): Define a temporary
8796 macro and use it to simplify this function's implementation.
8797
9044dee2
JB
87982013-01-07 Joel Brobecker <brobecker@adacore.com>
8799
8800 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8801 sets errno.
8802
e6352c8f
JB
88032013-01-07 Joel Brobecker <brobecker@adacore.com>
8804
8805 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8806
50681a27
JB
88072013-01-07 Joel Brobecker <brobecker@adacore.com>
8808
8809 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8810
3f6e77ef
JB
88112013-01-07 Joel Brobecker <brobecker@adacore.com>
8812
8813 * lynx-low.c (lynx_resume): Use the resume_info parameter
8814 to determine the ptid for the lynx_ptrace call, unless
8815 it is equal to minus_one_ptid, in which case we use the
8816 ptid of the current_inferior.
8817 (lynx_wait_1): After having received a thread create/exit
8818 event, resume the inferior's execution using the signaling
8819 thread's ptid, rather than the old ptid.
8820
7fda33ae
JB
88212013-01-07 Joel Brobecker <brobecker@adacore.com>
8822
8823 * lynx-low.c (lynx_resume): Delete variable ret.
8824
b9786c74
JB
88252013-01-01 Joel Brobecker <brobecker@adacore.com>
8826
8827 * gdbreplay.c (gdbreplay_version): Update copyright year.
8828 * server.c (gdbserver_version): Likewise.
8829
8b93d60f
JB
88302012-12-17 Joel Brobecker <brobecker@adacore.com>
8831
8832 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8833 new thread.
8834
037335a7
JB
88352012-12-17 Joel Brobecker <brobecker@adacore.com>
8836
8837 * lynx-low.c (ptrace_request_to_str): Add handling for
8838 PTRACE_GETTRACESIG.
8839
52d4cbd8
JB
88402012-12-17 Joel Brobecker <brobecker@adacore.com>
8841
8842 * lynx-low.c (lynx_attach): Delete variable new_process.
8843
ab8f6ca9
JB
88442012-12-17 Joel Brobecker <brobecker@adacore.com>
8845
8846 * lynx-low.c (lynx_create_inferior): Delete variable
8847 new_process.
8848
78cbc024
JB
88492012-12-17 Joel Brobecker <brobecker@adacore.com>
8850
8851 * lynx-low.c (ptrace_request_to_str): Do not handle
8852 PTRACE_GETTHREADLIST if this macro does not exist.
8853
14a00470
YQ
88542012-12-15 Yao Qi <yao@codesourcery.com>
8855
8856 * Makefile.in (OBS): Add notif.o.
8857 * notif.c, notif.h: New.
8858 * server.c: Include "notif.h".
8859 (struct vstop_notif) <next>: Remove.
8860 <base>: New field.
8861 (queue_stop_reply): Update.
8862 (push_event, send_next_stop_reply): Remove.
8863 (discard_queued_stop_replies): Update.
8864 (notif_stop): New variable.
8865 (handle_v_stopped): Remove.
8866 (handle_v_requests): Don't call handle_v_stopped. Call
8867 handle_ack_notif instead.
8868 (queue_stop_reply_callback): Call notif_event_enque instead
8869 of queue_stop_reply.
8870 (handle_status): Don't call send_next_stop_reply, call
8871 notif_write_event instead.
8872 (kill_inferior_callback): Likewise.
8873 (detach_or_kill_inferior_callback): Likewise.
8874 (main): Call initialize_notif.
8875 (process_serial_event): Call QUEUE_is_empty.
8876 (handle_target_event): Call notif_push instead of push event.
8877 * server.h (push_event): Remove declaration.
8878
61c125b9
TT
88792012-12-10 Tom Tromey <tromey@redhat.com>
8880
8881 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8882 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8883 macros.
8884 (.c.o): Rewrite.
8885 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8886 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8887 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8888 (amd64-linux-ipa.o, ax.o): Rewrite.
8889 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8890 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8891 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8892 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8893 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8894 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8895 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8896 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8897 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8898 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8899 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8900 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8901 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8902 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8903 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8904 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8905 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8906 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8907 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8908 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8909 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8910 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8911 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8912 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8913 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8914 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8915 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8916 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8917 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8918 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8919 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8920 (reg-tilegx.o): Remove.
8921 (all_object_files): New macro.
8922 Include .deps files.
8923 * aclocal.m4, configure: Rebuild.
8924 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8925 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8926 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8927
e90e9ad9
TT
89282012-12-05 Tom Tromey <tromey@redhat.com>
8929
8930 PR gdb/14917:
8931 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8932
02d403bf 89332012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8934
8935 * configure.ac: Check for linux/perf_event.h.
8936 * config.in: Regenerated.
8937 * configure: Regenerated.
8938
0270a750
PA
89392012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8940
8941 * hostio.c (handle_readlink): Decrease buffer size
8942 parameter passed to readlink by one byte.
8943
8c29b58e
YQ
89442012-11-26 Yao Qi <yao@codesourcery.com>
8945
8946 * configure.ac (build_warnings): Append '-Wempty-body'.
8947 * configure: Regenerated.
8948 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8949 body.
8950
8bdce1ff
PM
89512012-11-15 Pierre Muller <muller@sourceware.org>
8952
8953 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8954 * config.in: Regenerate.
8955 * configure: Regenerate.
8956 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8957 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8958 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8959 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8960 header.
8961 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8962 instead of <sys/wait.h> header.
8963 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8964
02d403bf 89652012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8966
8967 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8968 (various make rules): Remove -DGDBSERVER
8969
fbd5db48
YQ
89702012-11-09 Yao Qi <yao@codesourcery.com>
8971
8972 * spu-low.c (current_ptid): Move it to ..
8973 * gdbthread.h: ... here. New.
8974 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8975 * server.c (myresume, process_serial_event): Likewise.
8976 * thread-db.c (thread_db_find_new_threads): Likewise.
8977 * tracepoint.c (run_inferior_command): Likewise.
8978
b3dc46ff
AB
89792012-10-01 Andrew Burgess <aburgess@broadcom.com>
8980
8981 * server.c (handle_search_memory_1): Include access length in
8982 warning message.
8983
07c04788
HPN
89842012-09-05 Michael Brandt <michael.brandt@axis.com>
8985
8986 * linux-crisv32-low.c: Fix compile errors.
8987
918d227b
YQ
89882012-09-04 Yao Qi <yao@codesourcery.com>
8989
8990 * tracepoint.c (cmd_qtsv): Adjust debug message.
8991 Don't check CUR_TPOINT.
8992
18c1b81a
YQ
89932012-08-28 Yao Qi <yao@codesourcery.com>
8994
8995 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8996 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8997 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8998 Remove declarations of xmalloc, xreallloc, xstrdup and
8999 freeargv.
9000 * Makefile.in (libiberty_h): New.
9001 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9002 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9003
dc82f37b
YQ
90042012-08-23 Yao Qi <yao@codesourcery.com>
9005
9006 * server.h: Remove declaration of 'xsnprintf'.
9007
406b1477
KS
90082012-08-22 Keith Seitz <keiths@redhat.com>
9009
9010 * server.h: Include build-gnulib-gbserver/config.h.
9011 * gdbreplay.c: Likewise.
9012
e6712ff1
DE
90132012-08-08 Doug Evans <dje@google.com>
9014
9015 * Makefile.in (SFILES): Add gdb_vecs.c.
9016 (OBS): Add gdb_vecs.o.
9017 (gdb_vecs_h, host_defs_h): New variables.
9018 (thread-db.o): Add $(gdb_vecs_h) dependency.
9019 (gdb_vecs.o): New rule.
9020 * thread-db.c: #include "gdb_vecs.h".
9021 (thread_db_load_search): Use a vector to iterate over path elements.
9022 Handle text appearing after "$pdir".
9023
9024 * configure.ac: Add check for strstr.
9025 * config.in: Regenerate.
9026 * configure: Regenerate.
9027
7c3270ae
UW
90282012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9029
9030 * hostio.c (handle_pread): If pread fails, fall back to attempting
9031 lseek/read.
9032 (handle_pwrite): Likewise for pwrite.
9033
b62e2b27
UW
90342012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9035
9036 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9037 between unsupported TYPE and unimplementable ADDR/LEN combination.
9038 (arm_insert_point): Act on new return value.
9039
78a99e91
PA
90402012-07-31 Pedro Alves <palves@redhat.com>
9041
9042 * server.c (process_point_options): Only skip tokens if we find
9043 one that is unrecognized. Don't treat 'X' specially while
9044 skipping unrecognized tokens.
9045
fcf303ab
UW
90462012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9047
9048 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9049 to 4-byte-align HW breakpoint addresses for Thumb.
9050
7255706c
YQ
90512012-07-27 Yao Qi <yao@codesourcery.com>
9052
9053 PR remote/14161.
9054
9055 * server.h: Declare gdb_agent_about_to_close.
9056 * target.c (kill_inferior): Include "agent.h".
9057 New. Send command 'kill'.
9058 * target.h (kill_inferior): Removed macro.
9059 * tracepoint.c (gdb_agent_about_to_close): New.
9060 (gdb_agent_helper_thread): Handle command 'close'.
9061 Wait endlessly until the inferior stops.
9062 Install gdb_agent_remove_socket to atexit hook.
9063 (agent_socket_name): New static variable.
9064 (gdb_agent_socket_init): Replace local variable 'name' with
9065 'agent_socket_name'.
9066 (gdb_agent_remove_socket): New.
9067
5a3f286f
YQ
90682012-07-27 Yao Qi <yao@codesourcery.com>
9069
9070 * server.c (process_point_options): Stop at 'X' when parsing.
9071
961bd387
ME
90722012-07-19 Michael Eager <eager@eagercon.com>
9073
a261b8f5 9074 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
9075 to hw_execute.
9076 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9077 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9078 hardware breakpoint.
9079
aa7c7447
JK
90802012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9081
9082 * gdbserver/linux-low.c (initialize_low): Call
9083 linux_ptrace_init_warnings.
9084
7f216e7c
DE
90852012-07-02 Doug Evans <dje@google.com>
9086
9087 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9088 pointer to int.
9089
d3ce09f5
SS
90902012-07-02 Stan Shebs <stan@codesourcery.com>
9091
9092 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9093 (ax.o): Add it to build rule.
9094 (ax-ipa.o): Ditto.
9095 (OBS): Add format.o.
9096 (IPA_OBS): Add format.o.
9097 * server.c (handle_query): Claim support for breakpoint commands.
9098 (process_point_options): Add command case.
9099 (process_serial_event): Leave running if there are printfs in
9100 effect.
9101 * mem-break.h (any_persistent_commands): Declare.
9102 (add_breakpoint_commands): Declare.
9103 (gdb_no_commands_at_breakpoint): Declare.
9104 (run_breakpoint_commands): Declare.
9105 * mem-break.c (struct point_command_list): New struct.
9106 (struct breakpoint): New field command_list.
9107 (any_persistent_commands): New function.
9108 (add_commands_to_breakpoint): New function.
9109 (add_breakpoint_commands): New function.
9110 (gdb_no_commands_at_breakpoint): New function.
9111 (run_breakpoint_commands): New function.
9112 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9113 locally.
9114 * ax.c: Include format.h.
9115 (ax_printf): New function.
9116 (gdb_eval_agent_expr): Add printf opcode.
9117
2f8f6aed
YQ
91182012-06-13 Yao Qi <yao@codesourcery.com>
9119
9120 * server.c (start_inferior): Remove duplicated writes to fields
9121 'last_resume_kind' and 'last_status' of 'current_inferior'.
9122
0c9070b3
YQ
91232012-06-12 Yao Qi <yao@codesourcery.com>
9124 Pedro Alves <palves@redhat.com>
9125
9126 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9127 comment.
9128 * server.c (handle_v_cont): Extend comment.
9129
c52daf70
YQ
91302012-06-11 Yao Qi <yao@codesourcery.com>
9131
9132 * linux-low.c (linux_attach): Add 'static'.
9133
d38bbb0a
YQ
91342012-06-06 Yao Qi <yao@codesourcery.com>
9135
9136 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9137
89dc0afd
JK
91382012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9139
9140 Fix gcc -flto compilation warning.
9141 * server.c (main): Make variable multi_mode and attach volatile.
9142
75f62ce7
TJB
91432012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9144
9145 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9146 if the platform doesn't know about it.
9147
65f479b6
PA
91482012-05-30 Jeff Kenton <jkenton@tilera.com>
9149
9150 * Makefile.in (SFILES): Add linux-tile-low.c.
9151 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9152 * configure.srv: Handle tilegx-*-linux*.
9153 * linux-tile-low.c: New file.
9154
0c5bf5a9
JK
91552012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9156
9157 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9158
a493e3e2
PA
91592012-05-24 Pedro Alves <palves@redhat.com>
9160
9161 PR gdb/7205
9162
43aaf8b6 9163 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 9164
2ea28649
PA
91652012-05-24 Pedro Alves <palves@redhat.com>
9166
9167 PR gdb/7205
9168
9169 Replace target_signal with gdb_signal throughout.
9170
8d409d16
MR
91712012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9172
9173 * linux-low.c (linux_store_registers): Avoid the copying sequence
9174 when no data has been retrieved by ptrace.
9175
23512c01
MGD
91762012-05-22 Will Deacon <will.deacon@arm.com>
9177
9178 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9179 Include asm/ptrace.h.
9180 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9181 already defined.
9182
4934b29e
MR
91832012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9184
9185 * linux-low.c (linux_store_registers): Don't re-retrieve data
9186 with ptrace that has already been obtained from /proc. Always
9187 copy any data retrieved with ptrace to the buffer supplied.
9188
bde24c0a
PA
91892012-05-11 Yao Qi <yao@codesourcery.com>
9190 Pedro Alves <palves@redhat.com>
9191
9192 * linux-low.c (enum stopping_threads_kind): New.
9193 (stopping_threads): Change type to `enum stopping_threads_kind'.
9194 (handle_extended_wait): If stopping and suspending threads, leave
9195 the new_lwp suspended too.
9196 (linux_wait_for_event): Adjust.
9197 (stop_all_lwps): Set `stopping_threads' to
9198 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9199 whether we're suspending threads or just stopping them. Assert no
9200 recursion happens.
9201
623b6bdf
YQ
92022012-04-29 Yao Qi <yao@codesourcery.com>
9203
9204 * server.h: Move some code to ...
9205 * gdbthread.h: ... here. New.
9206 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9207 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9208 (nto-low.o, win32-low.o): Likewise.
9209 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9210 * regcache.c, remote-utils.c, server.c: Likewise.
9211 * target.c, tracepoint.c, win32-low.c: Likewise.
9212
f15f9948
TJB
92132012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9214
9215 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9216 (PTRACE_ARG4_TYPE): Likewise.
9217 (PTRACE_XFER_TYPE): Likewise.
9218 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9219 ptrace to PTRACE_ARG3_TYPE.
9220 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9221 (PTRACE_ARG4_TYPE): Likewise.
9222 (PTRACE_XFER_TYPE): Likewise.
9223 (linux_detach_one_lwp): Cast fourth argument of
9224 ptrace to long then PTRACE_ARG4_TYPE.
9225 (regsets_fetch_inferior_registers): Cast third argument of
9226 ptrace to long then PTRACE_ARG3_TYPE.
9227 (regsets_store_inferior_registers): Likewise.
9228
38ea300a
PA
92292012-04-20 Pedro Alves <palves@redhat.com>
9230
9231 * configure: Regenerate.
9232
c971b7fa
PA
92332012-04-19 Pedro Alves <palves@redhat.com>
9234
43aaf8b6 9235 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 9236 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
9237 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9238 (all, install-only, uninstall, clean-info, all-lib, clean): No
9239 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9240 (maintainer-clean realclean distclean): Use subdir_do.
9241 (subdir_do): New.
9242 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 9243 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
9244 * acinclude.m4: Include acx_configure_dir.m4.
9245 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9246 calls. Call AC_PROG_RANLIB. Configure gnulib using
9247 ACX_CONFIGURE_DIR.
9248 (GNULIB): New.
9249 (GNULIB_STDINT_H): Adjust.
9250 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9251 * gdbreplay.c: Include build-gnulib/config.h.
9252 * server.h: Likewise.
9253 * aclocal.m4: Regenerate.
9254 * config.in: Regenerate.
9255 * configure: Regenerate.
c971b7fa 9256
809277f8
PA
92572012-04-19 Pedro Alves <palves@redhat.com>
9258
9259 * Makefile.in (LIBGNU, INCGNU): Adjust.
9260 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9261 (all, install-only, uninstall, clean-info, all-lib, clean)
9262 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9263 * configure.ac: Adjust AC_OUTPUT output.
9264 * aclocal.m4: Regenerate.
9265 * configure: Regenerate.
9266
fd9bb8b8
PA
92672012-04-19 Pedro Alves <palves@redhat.com>
9268
9269 * Makefile.in (generated_files): New.
9270 (server_h): Remove the explicit dependency on config.h, and depend
9271 on $generated_files.
9272
1c298c66
PA
92732012-04-19 Pedro Alves <palves@redhat.com>
9274
9275 * Makefile.in (INCGNU): Add -Ignulib.
9276
57c4b50b
PA
92772012-04-19 Pedro Alves <palves@redhat.com>
9278
9279 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9280 (INCGNU): ... this, and spell out -I here.
9281 (GNULIB_LIB): Rename to ...
9282 (LIBGNU): ... this.
9283 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9284
1030e047
PA
92852012-04-19 Pedro Alves <palves@redhat.com>
9286
9287 * config.in: Regenerate.
9288
447d4319
PA
92892012-04-19 Pedro Alves <palves@redhat.com>
9290
9291 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9292 * server.h (memmem): Remove declaration.
9293 * config.in: Regenerate.
9294 * configure: Regenerate.
9295
aad9eab9
YQ
92962012-04-19 Yao Qi <yao@codesourcery.com>
9297
9298 * Makefile.in (SFILES): Add common/vec.c.
9299 (OBS): Add vec.o.
9300 (vec.o): New rule.
9301
3e10640f
YQ
93022012-04-19 Yao Qi <yao@codesourcery.com>
9303
9304 * remote-utils.c (prepare_resume_reply): Replace with macro
9305 target_core_of_thread.
9306 * server.c (handle_qxfer_threads_proper): Likewise.
9307 * target.h (traget_core_of_thread): New macro.
9308
71622373
PA
93092012-04-18 Pedro Alves <palves@redhat.com>
9310
9311 * aclocal.m4: Regenerate.
9312 * configure: Regenerate.
9313
80d26939
YQ
93142012-04-16 Yao Qi <yao@codesourcery.com>
9315
9316 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9317 duplicated on address.
9318
42476b70
YQ
93192012-04-16 Yao Qi <yao@codesourcery.com>
9320
9321 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9322 (struct tracepoint_action_ops) <send>: New field.
9323 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9324 (agent_expr_send, x_tracepoint_action_send): New.
9325 (l_tracepoint_action_send): New.
9326 (cmd_qtdp): Download and install tracepoint
9327 according to `use_agent'.
9328 (run_inferior_command): Add one more parameter `len'.
9329 Update callers.
9330 (tracepoint_send_agent): New.
9331 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9332
7bc83639
YQ
93332012-04-16 Yao Qi <yao@codesourcery.com>
9334
9335 * tracepoint.c (download_tracepoints): Moved to ...
9336 (cmd_qtstart): ... here.
9337
5f18041e
YQ
93382012-04-14 Yao Qi <yao@codesourcery.com>
9339
9340 * tracepoint.c: Include inttypes.h.
9341 (struct collect_memory_action): Use sized types.
9342 (struct tracepoint): Likewise.
9343 (cmd_qtdp, stop_tracing): Update print specifiers.
9344 (cmd_qtp, response_tracepoint): Likewise.
9345 (collect_data_at_tracepoint): Likewise.
9346 (collect_data_at_step): Likewise.
9347
55a8c076
YQ
93482012-04-14 Yao Qi <yao@codesourcery.com>
9349
9350 Import gnulib module inttypes.
9351 * aclocal.m4, config.in, configure: Regenerated.
9352
dc750257
YQ
93532012-04-14 Yao Qi <yao@codesourcery.com>
9354
9355 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9356 Makefile and config.status at last.
9357
0ab5faf9
YQ
93582012-04-13 Yao Qi <yao@codesourcery.com>
9359
9360 * tracepoint.c: Include stdint.h unconditionally.
9361
18f5fd81
TJB
93622012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9363
9364 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9365 on BFD_HAVE_SYS_PROCFS_TYPE.
9366 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9367 * configure: Regenerate.
9368 * config.in: Likewise.
9369
4d47af5c
L
93702012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9371
9372 * Makefile.in (clean): Also remove x32.c x32-linux.c
9373 x32-avx.c x32-avx-linux.c.
9374 (x32.o): New target.
9375 (x32.c): Likewise.
9376 (x32-linux.o): Likewise.
9377 (x32-linux.c): Likewise.
9378 (x32-avx.o): Likewise.
9379 (x32-avx.c): Likewise.
9380 (x32-avx-linux.o): Likewise.
9381 (x32-avx-linux.c): Likewise.
9382
9383 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9384 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9385 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9386 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9387 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9388 i386/x32-avx-linux.xml.
9389
9390 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9391 (init_registers_x32_avx_linux): Likwise.
9392 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9393 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9394
ecedbe58
PA
93952012-04-13 Pedro Alves <palves@redhat.com>
9396
9397 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9398 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9399 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9400 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9401 the sub-make.
9402
c92b5177
L
94032012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9404
9405 * linux-x86-low.c (compat_x32_clock_t): New.
9406 (compat_x32_siginfo_t): Likewise.
9407 (compat_x32_siginfo_from_siginfo): Likewise.
9408 (siginfo_from_compat_x32_siginfo): Likewise.
9409 (linux_is_elf64): Likewise.
9410 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9411 and siginfo_from_compat_x32_siginfo for x32.
9412 (x86_arch_setup): Set linux_is_elf64.
9413
214d508e
L
94142012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9415
9416 PR gdb/13969
9417 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9418 e_machine field.
9419 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9420 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9421 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9422 compatible with process.
9423
c9a1864a
YQ
94242012-04-12 Yao Qi <yao@codesourcery.com>
9425
9426 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9427 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9428 (install-only, install-info, clean): Handle sub dir gnulib.
9429 (all-lib, am--refresh): New targets.
9430 (memmem.o): Remove target.
9431 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9432 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9433 (AC_REPLACE_FUNCS): Remove memmem.
9434 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9435 (AC_OUTPUT): Generate Makefile in gnulib/.
9436 * aclocal.m4, config.in, configure: Regenerated.
9437
367ba2c2
MR
94382012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9439
9440 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9441
9d236627
PA
94422012-04-05 Pedro Alves <palves@redhat.com>
9443
9444 -Werror=strict-aliasing
9445
9446 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9447 pointer.
9448
111217b3
PA
94492012-04-04 Pedro Alves <palves@redhat.com>
9450
9451 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9452 (sparc_store_gregset_from_stack, sparc_store_gregset)
9453 (sparc_breakpoint_at): Fix formatting.
9454
8365dcf5
TJB
94552012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9456
9457 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9458 are available.
9459 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9460 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9461 * config.in: Regenerate.
9462 * configure: Likewise.
9463
689cc2ae
PA
94642012-03-29 Pedro Alves <palves@redhat.com>
9465
9466 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9467 Correct ptrace arguments.
9468
c14dfd32
PA
94692012-03-28 Pedro Alves <palves@redhat.com>
9470
9471 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9472 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9473 (IA64_FR1_REGNUM): New defines.
9474 (ia64_fetch_register): New.
9475 (the_low_target): Install it.
9476 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9477 field.
9478 * linux-low.c (linux_fetch_registers): Try the
9479 the_low_target.fetch_register hook first.
9480
9481 * linux-arm-low.c (the_low_target): Adjust.
9482 * linux-bfin-low.c (the_low_target): Adjust.
9483 * linux-cris-low.c (the_low_target): Adjust.
9484 * linux-crisv32-low.c (the_low_target): Adjust.
9485 * linux-m32r-low.c (the_low_target): Adjust.
9486 * linux-m68k-low.c (the_low_target): Adjust.
9487 * linux-mips-low.c (the_low_target): Adjust.
9488 * linux-ppc-low.c (the_low_target): Adjust.
9489 * linux-s390-low.c (the_low_target): Adjust.
9490 * linux-sh-low.c (the_low_target): Adjust.
9491 * linux-sparc-low.c (the_low_target): Adjust.
9492 * linux-tic6x-low.c (the_low_target): Adjust.
9493 * linux-x86-low.c (the_low_target): Adjust.
9494 * linux-xtensa-low.c (the_low_target): Adjust.
9495
63c88e13
PA
94962012-03-26 Pedro Alves <palves@redhat.com>
9497
9498 * server.c (handle_qxfer_libraries): Don't bail early if
9499 the_target->qxfer_libraries_svr4 is not NULL.
9500
fb723180
PA
95012012-03-26 Pedro Alves <palves@redhat.com>
9502
9503 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9504
0afae3cf
PA
95052012-03-23 Pedro Alves <palves@redhat.com>
9506
9507 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9508 "library-list-svr4" element's start tag when the the DSO list is
9509 empty.
9510
485f1ee4
PA
95112012-03-23 Pedro Alves <palves@redhat.com>
9512
9513 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9514 a variable whose type size is the same as the inferior's pointer
9515 size.
9516
a5362b9a
TS
95172012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9518
9519 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9520 struct siginfo.
9521 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9522 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9523 * linux-low.h: Include <signal.h>.
9524 (struct siginfo): Remove forward declaration.
9525 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9526 struct siginfo.
9527
d226c142
MF
95282012-03-21 Mike Frysinger <vapier@gentoo.org>
9529
9530 * .gitignore: Ignore more files.
9531
122f36ef
PA
95322012-03-19 Pedro Alves <palves@redhat.com>
9533 Jan Kratochvil <jan.kratochvil@redhat.com>
9534
9535 * server.c (cont_thread, general_thread): Add describing comments.
9536 (start_inferior): Clear `cont_thread'.
9537 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9538 of a process.
9539
fc3e5175
YQ
95402012-03-15 Yao Qi <yao@codesourcery.com>
9541
9542 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9543 handling to ...
9544 (cmd_qtdp): ... here.
9545
8d0d92cd
YQ
95462012-03-15 Yao Qi <yao@codesourcery.com>
9547
9548 * tracepoint.c (struct tracepoint_action_ops): New.
9549 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9550 (m_tracepoint_action_download): New.
9551 (r_tracepoint_action_download): New.
9552 (x_tracepoint_action_download): New.
9553 (l_tracepoint_action_download): New.
9554 (add_tracepoint_action): Install `action->ops' according type.
9555 (download_tracepoint_1): Move code `download' function pointer
9556 of various tracepoint_action_ops.
9557
87b0bb13
JK
95582012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9559
9560 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9561 linux_ptrace_attach_warnings.
9562
5f572dec
JK
95632012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9564
9565 * Makefile.in (linux-ptrace.o): New.
9566 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9567 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9568 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9569 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9570 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9571 of these targets.
9572 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9573
f4647387
YQ
95742012-03-08 Yao Qi <yao@codesourcery.com>
9575 Pedro Alves <palves@redhat.com>
9576
9577 Fix PR server/13392.
9578 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9579 offset of JMP insn.
9580 * tracepoint.c (remove_tracepoint): New.
9581 (cmd_qtdp): Call remove_tracepoint when failed to install.
9582
9b224c5e
PA
95832012-03-07 Pedro Alves <palves@redhat.com>
9584
9585 * linux-low.c (get_detach_signal): New.
9586 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9587 Pass on pending signals to PTRACE_DETACH. Check the result of the
9588 ptrace call.
9589 * server.c (program_signals, program_signals_p): New.
9590 (handle_general_set): Handle QProgramSignals.
9591 * server.h (program_signals, program_signals_p): Declare.
9592
e237a7e2
JK
95932012-03-05 Pedro Alves <palves@redhat.com>
9594 Jan Kratochvil <jan.kratochvil@redhat.com>
9595
9596 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9597 New comment why.
9598
5808517f
YQ
95992012-03-03 Yao Qi <yao@codesourcery.com>
9600
9601 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9602 agent_look_up_symbols.
9603
58b4daa5
YQ
96042012-03-03 Yao Qi <yao@codesourcery.com>
9605
9606 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9607 (linux-x86-low.o): Likewise.
9608 * server.h: Remove in_process_agent_loaded.
9609 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9610 common/agent.c.
9611 Update callers.
9612
8ffcbaaf
YQ
96132012-03-03 Yao Qi <yao@codesourcery.com>
9614
9615 * tracepoint.c (gdb_agent_capability): New global.
9616 (in_process_agent_loaded_ust): Renamed to
9617 `in_process_agent_supports_ust'.
9618 Update callers.
9619 (in_process_agent_supports_ust): Call agent_capability_check.
9620 (clear_installed_tracepoints): Assert that agent supports
9621 agent.
9622
d1feda86
YQ
96232012-03-03 Yao Qi <yao@codesourcery.com>
9624
9625 * linux-low.c (linux_supports_agent): New.
9626 (linux_target_ops): Initialize field `supports_agent' with
9627 linux_supports_agent.
9628 * target.h (struct target_ops) <supports_agent>: New.
9629 (target_supports_agent): New macro.
9630 * server.c (handle_general_set): Handle packet 'QAgent'.
9631 (handle_query): Send `QAgent+'.
9632 * Makefile.in (server.o): Depends on agent.h.
9633
2fa291ac
YQ
96342012-03-03 Yao Qi <yao@codesourcery.com>
9635
9636 * Makefile.in (OBS): Add agent.o.
9637 Add new rule for agent.o.
9638 Track dependence of tracepoint.c on agent.h.
9639 * tracepoint.c (run_inferior_command_1):
9640 (run_inferior_command): Call agent_run_command.
9641 (gdb_ust_connect_sync_socket): Deleted. Move it to
9642 common/agent.c.
9643 (resume_thread, stop_thread): Likewise.
9644 (gdb_ust_socket_init): Renamed to ...
9645 (gdb_agent_socket_init): ... New.
9646 (gdb_ust_thread): Renamed to ...
9647 (gdb_agent_helper_thread): ... New.
9648 (gdb_ust_init): Move some code to ...
9649 (gdb_agent_init): ... here. New.
9650 [HAVE_UST]: Call gdb_ust_init.
9651 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9652 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9653 * config.in, configure: Regenerated.
9654
05044653
PA
96552012-03-02 Pedro Alves <palves@redhat.com>
9656
9657 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9658 * linux-low.c (struct simple_pid_list): New.
9659 (stopped_pids): New a struct simple_pid_list pointer.
9660 (add_to_pid_list, pull_pid_from_list): New.
9661 (handle_extended_wait): Don't assume the first signal new children
9662 report is SIGSTOP. Adjust call to pull_pid_from_list.
9663 (linux_wait_for_lwp): Adjust.
9664
8d00225b
YQ
96652012-03-02 Yao Qi <yao@codesourcery.com>
9666
9667 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9668 debug log.
9669
19560ba5
YQ
96702012-03-02 Yao Qi <yao@codesourcery.com>
9671
9672 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9673 `stop_pc' and `tpoint'. Update caller.
9674
1faeff08
MR
96752012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9676
9677 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9678 * linux-low.c (use_linux_regsets): New macro.
9679 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9680 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9681 (linux_register_in_regsets): New function.
9682 (usr_fetch_inferior_registers): Skip registers covered by
9683 regsets.
9684 (usr_store_inferior_registers): Likewise.
9685 (usr_fetch_inferior_registers): New macro.
9686 (usr_store_inferior_registers): Likewise.
9687 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9688 (linux_store_registers): Likewise.
9689 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9690 prototype.
9691 (init_registers_mips64_dsp_linux): Likewise.
9692 (init_registers_mips_linux): New macro.
9693 (init_registers_mips_dsp_linux): Likewise.
9694 (mips_dsp_num_regs): Likewise.
9695 (DSP_BASE, DSP_CONTROL): New fallback macros.
9696 (mips_base_regs): New macro.
9697 (mips_regmap): Use it. Fix the size.
9698 (mips_dsp_regmap): New variable.
9699 (mips_dsp_regset_bitmap): Likewise.
9700 (mips_arch_setup): New function.
9701 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9702 than mips_regmap.
9703 (mips_cannot_store_register): Likewise.
9704 (the_low_target): Update .arch_setup, .num_regs and .regmap
9705 initializers. Add .regset_bitmap initializer.
9706 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9707 initializer.
9708 * linux-bfin-low.c (the_low_target): Likewise.
9709 * linux-cris-low.c (the_low_target): Likewise.
9710 * linux-crisv32-low.c (the_low_target): Likewise.
9711 * linux-ia64-low.c (the_low_target): Likewise.
9712 * linux-m32r-low.c (the_low_target): Likewise.
9713 * linux-m68k-low.c (the_low_target): Likewise.
9714 * linux-ppc-low.c (the_low_target): Likewise.
9715 * linux-s390-low.c (the_low_target): Likewise.
9716 * linux-sh-low.c (the_low_target): Likewise.
9717 * linux-sparc-low.c (the_low_target): Likewise.
9718 * linux-tic6x-low.c (the_low_target): Likewise.
9719 * linux-x86-low.c (the_low_target): Likewise.
9720 * linux-xtensa-low.c (the_low_target): Likewise.
9721 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9722 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9723 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9724 srv_xmlfiles.
9725 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9726 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9727
c03e6ccc
YQ
97282012-02-29 Yao Qi <yao@codesourcery.com>
9729 Pedro Alves <palves@redhat.com>
9730
9731 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9732 `step_over_finished' is true.
9733
644cebc9
PA
97342012-02-27 Pedro Alves <palves@redhat.com>
9735
9736 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9737 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9738
c14d7ab2
PA
97392012-02-27 Pedro Alves <palves@redhat.com>
9740
9741 PR server/9684
9742 * linux-low.c (pid_is_stopped): New.
9743 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9744
412c89dd
LM
97452012-02-25 Luis Machado <lgustavo@codesourcery.com>
9746
9747 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9748 of conditions.
9749
b745defe
MR
97502012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9751
9752 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9753
9f3a5c85
LM
97542012-02-24 Luis Machado <lgustavo@codesourcery>
9755
9756 * server.c (handle_query): Advertise support for target-side
9757 breakpoint condition evaluation.
9758 (process_point_options): New function.
9759 (process_serial_event): When inserting a breakpoint, check for
9760 a target-side condition that should be evaluated.
9761
9762 * mem-break.c: Include regcache.h and ax.h.
9763 (point_cond_list_t): New data structure.
9764 (breakpoint) <cond_list>: New field.
9765 (find_gdb_breakpoint_at): Make non-static.
9766 (delete_gdb_breakpoint_at): Clear any target-side
9767 conditions.
9768 (clear_gdb_breakpoint_conditions): New function.
9769 (add_condition_to_breakpoint): Likewise.
9770 (add_breakpoint_condition): Likewise.
9771 (gdb_condition_true_at_breakpoint): Likewise.
9772 (gdb_breakpoint_here): Return result directly instead
9773 of going through a local variable.
9774
9775 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9776 (clear_gdb_breakpoint_conditions): Likewise.
9777 (add_breakpoint_condition): Likewise.
9778 (gdb_condition_true_at_breakpoint): Likewise.
9779
9780 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9781 (need_step_over_p): Take target-side breakpoint condition into
9782 consideration.
9783
5e1dc496
LM
97842012-02-24 Luis Machado <lgustavo@codesourcery>
9785
9786 * server.h: Include tracepoint.h.
9787 (agent_mem_read, agent_get_trace_state_variable_value,
9788 agent_set_trace_state_variable_value,
9789 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9790 get_set_tsv_func_addr): New prototypes.
9791
9792 * ax.h: New include file.
9793 * ax.c: New source file.
9794
9795 * tracepoint.c: Include ax.h.
9796 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9797 agent_expr, eval_result_type): Move to ax.h.
9798 (parse_agent_expr): Rename to ...
9799 (gdb_parse_agent_expr): ... this, make it non-static and move
9800 to ax.h.
9801 (unparse_agent_expr) Rename to ...
9802 (gdb_unparse_agent_expr): ... this, make it non-static and move
9803 to ax.h.
9804 (eval_agent_expr): Rename to ...
9805 (eval_tracepoint_agent_expr): ... this.
9806 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9807 forward declarations.
9808 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9809 (agent_get_trace_state_variable_value): New function.
9810 (agent_set_trace_state_variable_value): New function.
9811 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9812 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9813 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9814 (condition_true_at_tracepoint): Likewise.
9815 (parse_agent_expr): Rename to ...
9816 (gdb_parse_agent_expr): ... this and move to ax.c.
9817 (unparse_agent_expr): Rename to ...
9818 (gdb_unparse_agent_expr): ... this and move to ax.c.
9819 (gdb_agent_op_name): Move to ax.c.
9820 (eval_agent_expr): Rename to ...
9821 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9822 and move to ax.c.
9823 (eval_tracepoint_agent_expr): New function.
9824 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9825 non-static.
5e1dc496
LM
9826 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9827 ax.c.
9828 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9829 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9830 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9831 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9832 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9833 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9834 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9835 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9836 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9837 (compile_bytecodes): Remove forward declaration.
9838 (is_goto_target): Move to ax.c.
9839 (compile_bytecodes): Move to ax.c and call
9840 agent_get_trace_state_variable_value (...) and
9841 agent_set_trace_state_variable_value (...).
9842
9843 * Makefile.in: Update ax.c and IPA dependencies.
9844
277e4e52
PA
98452012-02-24 Pedro Alves <palves@redhat.com>
9846
9847 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9848 (cmd_bigqtbuffer_circular): ... this. Only handle
9849 'QTBuffer:circular:'.
9850 (handle_tracepoint_general_set): Adjust.
9851
bf4c19f7
YQ
98522012-02-16 Yao Qi <yao@codesourcery.com>
9853
9854 * inferiors.c: Move code to ...
9855 * dll.c: .... here. New.
9856 * server.h: Declare clear_dlls.
9857 * Makefile.in (SFILES): Add dll.c.
9858 (OBS): Add dll.o
9859 (dll.o): New rule.
9860
d73f2619
YQ
98612012-02-11 Yao Qi <yao@codesourcery.com>
9862
9863 * server.c: (handle_monitor_command): Add a new parameter
9864 `own_buf'.
9865 (handle_query): Update caller.
9866
f8255c2a
JB
98672012-02-09 Joel Brobecker <brobecker@adacore.com>
9868
9869 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9870 * configure, config.in: Regenerate.
9871 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9872 is not defined.
9873
da84f473
PA
98742012-02-02 Pedro Alves <palves@redhat.com>
9875
9876 Try SIGKILL first, then PTRACE_KILL.
9877 * linux-low.c (linux_kill_one_lwp): New.
9878 (linux_kill_one_lwp): Rename to ...
9879 (kill_one_lwp_callback): ... this. Use the new
9880 linux_kill_one_lwp.
9881
e886a173
PA
98822012-02-02 Pedro Alves <palves@redhat.com>
9883
9884 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9885 inferior.
9886
be07f1a2
PA
98872012-01-27 Pedro Alves <palves@redhat.com>
9888
9889 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9890 (elf_64_file_p): Make static.
9891 (linux_pid_exe_is_elf_64_file): New.
9892 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9893 Delete declarations.
9894 (linux_pid_exe_is_elf_64_file): Declare.
9895 * linux-x86-low.c (x86_arch_setup): Use
9896 linux_pid_exe_is_elf_64_file.
9897
d8301ad1
JK
98982012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9899
9900 * linux-low.c (linux_wait_for_event_1): Rename to ...
9901 (linux_wait_for_event): ... here and merge it with former
9902 linux_wait_for_event - new variable wait_ptid, use it.
9903 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9904
01b17894
PA
99052012-01-23 Pedro Alves <palves@redhat.com>
9906
9907 * server.c (main): Avoid yet another case of infinite loop while
9908 detaching/killing after a longjmp.
9909
e825046f
JK
99102012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9911
9912 Code cleanup.
9913 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9914
b9e7b9c3
UW
99152012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9916
9917 * hostio.c (handle_readlink): New function.
9918 (handle_vFile): Call it to handle "vFile:readlink" packets.
9919
901f9912
UW
99202012-01-20 Pedro Alves <palves@redhat.com>
9921 Ulrich Weigand <ulrich.weigand@linaro.org>
9922
9923 * server.c (handle_v_requests): Only support vAttach and vRun to
9924 start multiple processes when in extended protocol mode.
9925
fc1ab1a0
PA
99262012-01-17 Pedro Alves <palves@redhat.com>
9927
9928 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9929 memalign plus mprotect to allocate the scratch buffer.
9930
7d5d4e98
PA
99312012-01-13 Pedro Alves <palves@redhat.com>
9932
9933 * server.c (attach_inferior): Clear `cont_thread'.
9934
f128d5e9
PA
99352012-01-13 Pedro Alves <palves@redhat.com>
9936
9937 * server.c (main): Avoid infinite loop while detaching/killing
9938 after a longjmp.
9939
06db92f0
DE
99402012-01-09 Doug Evans <dje@google.com>
9941
9942 * server.c (start_inferior): Set last_ptid in --wrapper case.
9943
32d92999
YQ
99442012-01-06 Yao Qi <yao@codesourcery.com>
9945
9946 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9947 defined.
9948 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9949
5e0a92a9
YQ
99502012-01-04 Yao Qi <yao@codesourcery.com>
9951
9952 * tracepoint.c (cmd_qtdp): Print debug message
9953 for static tracepoint.
9954
ae639e8c
YQ
99552012-01-04 Yao Qi <yao@codesourcery.com>
9956
9957 * tracepoint.c (trace_vdebug): Differentiate debug message
9958 between gdbserver and IPA.
9959
f72429c5
YQ
99602012-01-03 Yao Qi <yao@codesourcery.com>
9961
9962 * tracepoint.c (tracepoint_was_hit): Don't collect for
9963 static tracepoint.
9964
12c3e59c
JB
99652012-01-02 Joel Brobecker <brobecker@adacore.com>
9966
9967 * terminal.h: Reformat copyright header.
9968
67827812
JB
99692012-01-02 Joel Brobecker <brobecker@adacore.com>
9970
9971 * server.c (gdbserver_version): Update copyright year.
9972 * gdbreplay.c (gdbreplay_version): Likewise.
9973
3e52c33d
JK
99742011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9975
9976 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9977
9978 Revert:
9979 2011-12-18 Hui Zhu <teawater@gmail.com>
9980 * linux-low.c (linux_create_inferior): Save return value to ret.
9981
66f1260e
HZ
99822011-12-18 Hui Zhu <teawater@gmail.com>
9983
9984 * linux-low.c (linux_create_inferior): Save return value to ret.
9985
e77616d7
DE
99862011-12-16 Doug Evans <dje@google.com>
9987
e7b06c57
DE
9988 * linux-low.c (linux_create_inferior): If stdio connection,
9989 redirect stdin from /dev/null, stdout to stderr.
9990 * remote-utils.c (remote_is_stdio): New static global.
9991 (remote_connection_is_stdio): New function.
9992 (remote_prepare): Handle stdio connection.
9993 (remote_open): Ditto.
9994 (remote_close): Don't close stdin for stdio connections.
9995 (read_prim,write_prim): New functions. Replace all calls to
9996 read/write to these.
9997 * server.c (main): Watch for "-" argument. Move call to
9998 remote_prepare before start_inferior.
9999 * server.h (STDIO_CONNECTION_NAME): New macro.
10000 (remote_connection_is_stdio): Declare.
10001
e77616d7
DE
10002 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10003 in debugging output.
10004
82067193
YQ
100052011-12-15 Yao Qi <yao@codesourcery.com>
10006
10007 * tracepoint.c: Include sys/syscall.h.
10008 (gdb_ust_thread): Remove preprocessor conditional.
10009
82bfbe7e
PA
100102011-12-14 Pedro Alves <pedro@codesourcery.com>
10011
10012 * linux-low.c (linux_detach_one_lwp): Call
10013 the_low_target.prepare_to_resume before detaching.
10014
712c6575
YQ
100152011-12-14 Yao Qi <yao@codesourcery.com>
10016
10017 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10018 of write.
10019
d54d1edf
YQ
100202011-12-14 Yao Qi <yao@codesourcery.com>
10021
10022 * i386-low.c (i386_low_stopped_data_address): Initialize local
10023 variable `control'.
10024
6210a125
PA
100252011-12-13 Pedro Alves <pedro@codesourcery.com>
10026
10027 PR remote/13492
10028
10029 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10030 DR_CONTROL unless necessary. Extend comments.
10031 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10032 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10033
2ece8244
YQ
100342011-12-13 Yao Qi <yao@codesourcery.com>
10035
10036 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10037 macros.
10038 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10039
784867a5
JK
100402011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10041
10042 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10043 Print new debug message for such case.
10044
6bf36717
JK
100452011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10046
10047 Fix overlapping memcpy.
10048 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10049 the read_inferior_memory transfer.
10050 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10051 write_inferior_memory transfer.
10052 (set_fast_tracepoint_jump): New variable buf. Use it for the
10053 read_inferior_memory and write_inferior_memory transfers.
10054 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10055 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10056 Use it for the write_inferior_memory transfer.
10057 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10058 buffers.
10059
50275556
MR
100602011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10061
10062 * linux-low.c (fetch_register, store_register): Make code
10063 consistent, fix formatting.
10064
7325beb4
MR
100652011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10066
10067 * linux-low.c (usr_store_inferior_registers): Factor out code
10068 to handle individual registers into...
10069 (store_register): ... this new function.
10070
c642a434
UW
100712011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10072
10073 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10074 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10075 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10076 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10077 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10078 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10079 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10080 (srv_xmlfiles): Add new XML files.
10081
10082 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10083 and <sys/uio.h>.
10084 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10085 (init_registers_s390_linux32v1): Add prototype.
10086 (init_registers_s390_linux32v2): Likewise.
10087 (init_registers_s390_linux64v1): Likewise.
10088 (init_registers_s390_linux64v2): Likewise.
10089 (init_registers_s390x_linux64v1): Likewise.
10090 (init_registers_s390x_linux64v2): Likewise.
10091 (s390_num_regs): Increment to 52.
10092 (s390_regmap): Add orig_r2 register.
10093 (s390_num_regs_3264): Increment to 68.
10094 (s390_regmap_3264): Add orig_r2 register.
10095 (s390_collect_ptrace_register): Handle orig_r2 register.
10096 (s390_supply_ptrace_register): Likewise.
10097 (s390_fill_last_break): New function.
10098 (s390_store_last_break): Likewise.
10099 (s390_fill_system_call): New function.
10100 (s390_store_system_call): Likewise.
10101 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10102 register sets.
10103 (s390_check_regset): New function.
10104 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10105 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10106 Update target_regsets for available register sets.
10107
2268b414
JK
101082011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10109 Jan Kratochvil <jan.kratochvil@redhat.com>
10110
10111 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10112 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10113 New.
10114 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10115 * linux-low.h (struct process_info_private): New member r_debug.
10116 * server.c (handle_qxfer_libraries): Call
10117 the_target->qxfer_libraries_svr4.
10118 (handle_qxfer_libraries_svr4): New function.
10119 (qxfer_packets): New entry "libraries-svr4".
10120 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10121 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10122 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10123 PACKET_qXfer_libraries_svr4.
10124
d6db1fab
UW
101252011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10126
10127 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10128 PSW address/mask between 8-byte and 16-byte formats.
10129 (s390_supply_ptrace_register): Likewise.
10130 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10131 basic addressing mode bit.
10132
242f5f1c
SS
101332011-11-24 Stan Shebs <stan@codesourcery.com>
10134
10135 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10136
f196051f
SS
101372011-11-17 Stan Shebs <stan@codesourcery.com>
10138
10139 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10140 (tracing_start_time): New global.
10141 (tracing_stop_time): New global.
10142 (tracing_user_name): New global.
10143 (tracing_notes): New global.
10144 (tracing_stop_note): New global.
10145 (cmd_qtstart): Set traceframe_usage, start_time.
10146 (stop_tracing): Set stop_time.
10147 (cmd_qtstatus): Report additional status.
10148 (cmd_qtp): New function.
10149 (handle_tracepoint_query): Call it.
10150 (cmd_qtnotes): New function.
10151 (handle_tracepoint_general_set): Call it.
10152 (get_timestamp): Rename from tsv_get_timestamp.
10153
405f8e94
SS
101542011-11-14 Stan Shebs <stan@codesourcery.com>
10155 Kwok Cheung Yeung <kcy@codesourcery.com>
10156
10157 * linux-x86-low.c (small_jump_insn): New.
10158 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10159 trampoline and error message, build a trampoline and issue a small
10160 jump instruction to it.
10161 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10162 trampoline and error message.
10163 (x86_get_min_fast_tracepoint_insn_len): New.
10164 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10165 * linux-low.h (struct linux_target_ops): Add arguments to
10166 install_fast_tracepoint_jump_pad operation, add new operation.
10167 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10168 arguments.
10169 (linux_get_min_fast_tracepoint_insn_len): New function.
10170 (linux_target_op): Add new operation.
10171 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10172 (gdb_trampoline_buffer_end): Ditto.
10173 (gdb_trampoline_buffer_error): Ditto.
10174 (struct ipa_sym_addresses): Add fields for new IPA variables.
10175 (symbol_list): Add entries for new IPA variables.
10176 (struct tracepoint): Add fields to hold the address range of the
10177 trampoline used by the tracepoint.
10178 (trampoline_buffer_head): New static variable.
10179 (trampoline_buffer_tail): Ditto.
10180 (claim_trampoline_space): New function.
10181 (have_fast_tracepoint_trampoline_buffer): New function.
10182 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10183 structure.
10184 (install_fast_tracepoint): Ditto, also add error buffer argument.
10185 (cmd_qtminftpilen): New function.
10186 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10187 (fast_tracepoint_from_trampoline_address): New function.
10188 (fast_tracepoint_collecting): Handle trampoline as part of jump
10189 pad space.
10190 (set_trampoline_buffer_space): New function.
10191 (initialize_tracepoint): Initialize new IPA variables.
10192 * target.h (struct target_ops): Add arguments to
10193 install_fast_tracepoint_jump_pad operation, add new
10194 get_min_fast_tracepoint_insn_len operation.
10195 (target_get_min_fast_tracepoint_insn_len): New.
10196 (install_fast_tracepoint_jump_pad): Add arguments.
10197 * server.h (IPA_BUFSIZ): Define.
10198 * linux-i386-ipa.c: Include extra header files.
10199 (initialize_fast_tracepoint_trampoline_buffer): New function.
10200 (initialize_low_tracepoint): Call it.
10201 * server.h (set_trampoline_buffer_space): Declare.
10202 (claim_trampoline_space): Ditto.
10203 (have_fast_tracepoint_trampoline_buffer): Ditto.
10204
1e4d1764
YQ
102052011-11-14 Yao Qi <yao@codesourcery.com>
10206
10207 * server.c (handle_query): Handle InstallInTrace for qSupported.
10208 * tracepoint.c (add_tracepoint): Sort list.
10209 (install_tracepoint, download_tracepoint): New.
10210 (cmd_qtdp): Call them to install and download tracepoints.
10211 (sort_tracepoints): Removed.
10212 (cmd_qtstart): Update.
10213
5c73ff4e
YQ
102142011-11-14 Yao Qi <yao@codesourcery.com>
10215
10216 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10217 * mem-break.h: Declare.
10218 * tracepoint.c (cmd_qtstart): Move some code to ...
10219 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10220 New.
10221 (download_tracepoints): Move some code to ...
10222 (download_tracepoint_1): ... here. New.
10223
86a30030
YQ
102242011-11-08 Yao Qi <yao@codesourcery.com>
10225
10226 * remote-utils.c (relocate_instruction): A comment fix.
10227
8d26e50c
JB
102282011-11-07 Joel Brobecker <brobecker@adacore.com>
10229
10230 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10231 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10232 dr_status_mirror and dr_control_mirror from debug_reg_state.
10233 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10234 (i386_initial_stuff): Remove use of deleted globals.
10235 (i386_get_thread_context, i386_set_thread_context,
10236 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10237 from debug_reg_state.
10238
a59306a3
YQ
102392011-11-05 Yao Qi <yao@codesourcery.com>
10240
10241 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10242 address as TPOINT's.
10243
3065dfb6
SS
102442011-11-02 Stan Shebs <stan@codesourcery.com>
10245
10246 * tracepoint.c (agent_mem_read_string): New function.
10247 (eval_agent_expr): Call it for tracenz.
10248 * server.c (handle_query): Report support for tracenz.
10249
fd0d8c7c
YQ
102502011-11-02 Yao Qi <yao@codesourcery.com>
10251
10252 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10253
609086b1
YQ
102542011-11-02 Yao Qi <yao@codesourcery.com>
10255
10256 * target.h: Fix a typo in comment.
10257
b9fd1791
PA
102582011-10-31 Pedro Alves <pedro@codesourcery.com>
10259
10260 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10261 clobber the breakpoints' shadows with fast tracepoint jumps.
10262 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10263 * target.c (write_inferior_memory): Also pass MYADDR down to
10264 check_mem_write.
10265
03583c20
UW
102662011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10267
10268 * configure.ac: Check support for personality routine.
10269 * configure: Regenerate.
10270 * config.in: Likewise.
10271 * linux-low.c: Include <sys/personality.h>.
10272 Define ADDR_NO_RANDOMIZE if necessary.
10273 (linux_create_inferior): Disable address space randomization when
10274 forking inferior, if requested.
10275 (linux_supports_disable_randomization): New function.
10276 (linux_target_ops): Install it.
10277 * server.h (disable_randomization): Declare.
10278 * server.c (disable_randomization): New global variable.
10279 (handle_general_set): Handle QDisableRandomization.
10280 (handle_query): Likewise for qSupported.
10281 (main): Support --disable-randomization and --no-disable-randomization
10282 command line arguments.
10283 * target.h (struct target_ops): Add supports_disable_randomization.
10284 (target_supports_disable_randomization): New macro.
10285
723b724b
MF
102862011-09-29 Mike Frysinger <vapier@gentoo.org>
10287
10288 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10289 ifdef check.
10290 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10291 [!PT_GETDSBT] (target_loadmap): New definition.
10292 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10293 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10294 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10295 and PT_GETDSBT to LINUX_LOADMAP.
10296 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10297 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10298
55329a5c 102992011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
10300
10301 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10302 (arm_linux_hwbp_cap): New static variable.
10303 (arm_linux_get_hwbp_cap): Replace by ...
10304 (arm_linux_init_hwbp_cap): ... this new function.
10305 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10306 (arm_linux_get_hw_watchpoint_count): Likewise.
10307 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10308 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10309 (arm_prepare_to_resume): Use perror_with_name instead of error.
10310
55329a5c 103112011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
10312
10313 * linux-arm-low.c: Include <signal.h>.
10314 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10315 (struct arm_linux_hwbp_cap): New data type.
10316 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10317 (struct arm_linux_hw_breakpoint): New data type.
10318 (MAX_BPTS, MAX_WPTS): Define.
10319 (struct arch_process_info, struct arch_lwp_info): New data types.
10320 (arm_linux_get_hwbp_cap): New function.
10321 (arm_linux_get_hw_breakpoint_count): Likewise.
10322 (arm_linux_get_hw_watchpoint_count): Likewise.
10323 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10324 (arm_hwbp_control_initialize): Likewise.
10325 (arm_hwbp_control_is_enabled): Likewise.
10326 (arm_hwbp_control_is_initialized): Likewise.
10327 (arm_hwbp_control_disable): Likewise.
10328 (arm_linux_hw_breakpoint_equal): Likewise.
10329 (arm_linux_hw_point_initialize): Likewise.
10330 (struct update_registers_data): New data structure.
10331 (update_registers_callback: New function.
10332 (arm_insert_point): Likewise.
10333 (arm_remove_point): Likewise.
10334 (arm_stopped_by_watchpoint): Likewise.
10335 (arm_stopped_data_address): Likewise.
10336 (arm_new_process): Likewise.
10337 (arm_new_thread): Likewise.
10338 (arm_prepare_to_resume): Likewise.
10339 (the_low_target): Register arm_insert_point, arm_remove_point,
10340 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10341 arm_new_thread, and arm_prepare_to_resume.
10342
6b9801d4
SS
103432011-09-15 Stan Shebs <stan@codesourcery.com>
10344
10345 * server.h (struct emit_ops): Add compare-goto fields.
10346 * tracepoint.c (gdb_agent_op_sizes): New table.
10347 (emit_eq_goto): New function.
10348 (emit_ne_goto): New function.
10349 (emit_lt_goto): New function.
10350 (emit_le_goto): New function.
10351 (emit_gt_goto): New function.
10352 (emit_ge_goto): New function.
10353 (is_goto_target): New function.
10354 (compile_bytecodes): Recognize special cases of compare-goto
10355 combinations and call specialized emitters for them.
10356 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10357 (amd64_emit_ne_goto): New function.
10358 (amd64_emit_lt_goto): New function.
10359 (amd64_emit_le_goto): New function.
10360 (amd64_emit_gt_goto): New function.
10361 (amd64_emit_ge_goto): New function.
10362 (amd64_emit_ops): Add the new functions.
10363 (i386_emit_eq_goto): New function.
10364 (i386_emit_ne_goto): New function.
10365 (i386_emit_lt_goto): New function.
10366 (i386_emit_le_goto): New function.
10367 (i386_emit_gt_goto): New function.
10368 (i386_emit_ge_goto): New function.
10369 (i386_emit_ops): Add the new functions.
10370
bf15cbda
SS
103712011-09-08 Stan Shebs <stan@codesourcery.com>
10372
10373 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10374 (i386_emit_epilogue): Restore %ebx.
10375
943ca1dd
JZ
103762011-08-31 Jie Zhang <jzhang918@gmail.com>
10377
10378 * server.c (step_thread): Remove definition.
10379 (process_serial_event): Don't handle Hs.
10380 * server.h (step_thread): Remove declaration.
10381 * target.c (set_desired_inferior): Remove use of step_thread.
10382
e3deef73
LM
103832011-08-24 Luis Machado <lgustavo@codesourcery.com>
10384
10385 * linux-low.c: Include linux-procfs.h.
10386 (linux_attach_lwp_1): Update comments.
10387 (linux_attach): Scan for existing threads when attaching to a
10388 process that is the tgid.
10389 * Makefile.in: Update dependencies.
10390
13da1c97
LM
103912011-08-24 Luis Machado <lgustavo@codesourcery.com>
10392
10393 * configure.srv: Add linux-procfs.o dependencies.
10394
881127c9
YQ
103952011-08-14 Yao Qi <yao@codesourcery.com>
10396
10397 * target.h (struct target_ops): Fix indent.
10398 * win32-low.c (win32_target_ops): Fix comment.
10399
58dbd541
YQ
104002011-08-14 Andrew Jenner <andrew@codesourcery.com>
10401 Yao Qi <yao@codesourcery.com>
10402
10403 * Makefile.in (clean): Remove tic6x-*.c files.
10404 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10405 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10406 (tic6x-c64xp-linux.c): Likewise.
10407 * configure.srv: Add support for tic6x-*-uclinux.
10408 * linux-tic6x-low.c: New.
10409 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10410
78d85199
YQ
104112011-08-14 Andrew Stubbs <ams@codesourcery.com>
10412 Yao Qi <yao@codesourcery.com>
10413
10414 * target.h (struct target_ops): Add read_loadmap.
10415 * linux-low.c (struct target_loadseg): New type.
10416 (struct target_loadmap): New type.
10417 (linux_read_loadmap): New function.
10418 (linux_target_ops): Add linux_read_loadmap.
10419 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
10420 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10421 to NULL.
78d85199 10422
a959a88d
EZ
104232011-08-05 Eli Zaretskii <eliz@gnu.org>
10424
10425 * win32-low.c: Include <stdint.h>.
10426
1ced966e
PA
104272011-07-22 Pedro Alves <pedro@codesourcery.com>
10428
10429 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10430 to the inferior here.
10431 (i386_remove_aligned_watchpoint): Ditto.
10432 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10433 fit part of the watchpoint in the debug registers.
10434 (i386_update_inferior_debug_regs): New.
10435 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10436 registers, and only update the inferior on success.
10437 (i386_low_remove_watchpoint): Ditto.
10438
d26e3629
KY
104392011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10440
10441 * linux-low.c (compare_ints, unique, list_threads, show_process,
10442 linux_core_of_thread): Delete.
10443 (linux_target_ops): Change linux_core_of_thread to
10444 linux_common_core_of_thread.
10445 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10446 * utils.c (malloc_failure): Change type of argument.
10447 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10448 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10449 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10450 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10451 (IPA_OBJS): Add common-utils-ipa.o.
10452 (ptid_h, linux_osdata_h): New macros.
10453 (server_h): Add common/common-utils.h, common/xml-utils.h,
10454 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10455 common/ptid.h.
10456 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10457 ptid.o, buffer.o): New rules.
10458 (linux-low.o): Add common/linux-osdata.h as a dependency.
10459 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10460 * configure.ac: Add AC_HEADER_DIRENT check.
10461 * config.in: Regenerate.
10462 * configure: Regenerate.
10463 * remote-utils.c (xml_escape_text): Delete.
10464 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10465 buffer_xml_printf): Move to common/buffer.c.
10466 * server.c (main): Remove call to initialize_inferiors.
10467 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10468 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10469 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10470 internal_error, gdb_assert, gdb_assert_fail): Delete.
10471 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10472 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10473 common/buffer.h.
10474 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10475 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10476 initialize_inferiors): Delete.
10477
2275a1a7
PA
104782011-07-20 Pedro Alves <pedro@codesourcery.com>
10479
10480 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10481 symbol error.
10482
0a5b1e09
PA
104832011-05-31 Pedro Alves <pedro@codesourcery.com>
10484
10485 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10486 assertion.
10487 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10488
6938fd34
YQ
104892011-05-26 Yao Qi <yao@codesourcery.com>
10490
10491 * Makefile.in (thread-db.o): Track dependence to
10492 common/gdb_thread_db.h.
10493 * thread-db.c: include gdb_thread_db.h from right place.
10494
b481f9e0
TT
104952011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10496
10497 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10498 __FILE__ and __LINE__ to internal_error.
10499
98a5dd13
DE
105002011-05-13 Doug Evans <dje@google.com>
10501
10502 * thread-db.c (try_thread_db_load_from_sdir): New function.
10503 (try_thread_db_load_from_dir): New function.
10504 (thread_db_load_search): Handle $sdir, ignore $pdir.
10505 Remove trying of system directories if search of
10506 libthread-db-search-path fails, that is now done via $sdir.
10507
d248b706
KY
105082011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10509
10510 * server.c (handle_query): Add EnableDisableTracepoints to the list
10511 of supported features.
43aaf8b6 10512 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10513 tracepoints.
43aaf8b6
PA
10514 (cmd_qtenable_disable): New.
10515 (cmd_qtstart): Install tracepoints even if disabled.
10516 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10517 receiving a QTEnable or QTDisable packet.
10518 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10519 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10520 tracepoints.
10521 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10522
84e578fb
DE
105232011-05-10 Doug Evans <dje@google.com>
10524
10525 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10526
71f55dd8
DE
105272011-05-04 Doug Evans <dje@google.com>
10528
10529 * linux-low.c (linux_join): Skip process lookup.
10530 * spu-low.c (spu_join): Ditto.
10531 * server.c (join_inferiors_callback): Delete.
10532 (process_serial_event): For 'D' packet (detach) call join_inferior
10533 directly.
10534
4d393d60
JM
105352011-05-04 Joseph Myers <joseph@codesourcery.com>
10536
10537 * README: Don't mention xscale*-*-linux*.
10538 * configure.srv (xscale*-*-linux*): Don't handle target.
10539
b00ad6ff
NF
105402011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10541
10542 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10543 casting pointers.
10544 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10545 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10546 (i386_emit_void_call_2): Likewise.
10547
af96c192
YQ
105482011-04-26 Yao Qi <yao@codesourcery.com>
10549
43aaf8b6
PA
10550 * linux-low.c: Move common macros to linux-ptrace.h.
10551 Include linux-ptrace.h.
af96c192
YQ
10552 * Makefile.in (linux_ptrace_h): New.
10553 (linux-low.o): Depends on linux-ptrace.h.
10554
03f2bd59
JK
105552011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10556
10557 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10558 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10559 (remote_prepare): New function with most of the TCP code from ...
10560 (remote_open): ... here. Detect PORT here unconditionally. Move also
10561 setting transport_is_reliable.
10562 * server.c (run_once): New variable.
10563 (gdbserver_usage): Document it.
10564 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10565 the first run if RUN_ONCE.
10566 * server.h (run_once, remote_prepare): New declarations.
10567
7a9dd1b2
TT
105682011-04-19 Tom Tromey <tromey@redhat.com>
10569
10570 * win32-low.c (handle_load_dll): Remove duplicate "the".
10571
81239425
PM
105722011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10573
10574 Remove support for old Cygwin 1.5 versions.
10575 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10576 function to avoid warning.
10577 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10578 warning.
10579
9e0627f1
PM
105802011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10581
10582 * gdbserver/server.h (Macro _): Define it if not available.
10583
588eebee
MS
105842011-03-14 Michael Snyder <msnyder@vmware.com>
10585
348af9f7 10586 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10587
43f70d4c
JB
105882011-03-10 Joel Brobecker <brobecker@adacore.com>
10589
10590 * Makefile.in (maintainer-clean realclean distclean): Remove
10591 "make ... subdir_do" command.
10592
348af9f7
MS
105932011-03-10 Michael Snyder <msnyder@vmware.com>
10594
10595 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10596
10597 * server.c (handle_v_run): Free alloced buffer on early return.
10598
e637a4f5
YQ
105992011-03-09 Yao Qi <yao@codesourcery.com>
10600
10601 Revert:
10602 2011-03-04 Yao Qi <yao@codesourcery.com>
10603
10604 * Makefile.in: Remove GNU make feature --directory.
10605
10606 2011-03-05 Yao Qi <yao@codesourcery.com>
10607
10608 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10609 (subdir_do): New make target. Copied from gdb/Makefile.
10610 (maintainer-clean, realclean, distclean, clean): Call corresponding
10611 make targets in common/Makefile.
10612
10613 2011-02-11 Yao Qi <yao@codesourcery.com>
10614
10615 * configure.ac: Call AC_PROG_RANLIB.
10616 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10617 * configure: Regenerate.
10618
e6edda56
JK
106192011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10620
10621 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10622
e5141119
JB
106232011-03-06 Yao Qi <yao@codesourcery.com>
10624
10625 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10626
64794aa4
JB
106272011-03-05 Yao Qi <yao@codesourcery.com>
10628
10629 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10630 (subdir_do): New make target. Copied from gdb/Makefile.
10631 (maintainer-clean, realclean, distclean, clean): Call corresponding
10632 make targets in common/Makefile.
10633
7a762829
YQ
106342011-03-04 Yao Qi <yao@codesourcery.com>
10635
10636 * Makefile.in: Remove GNU make feature --directory.
10637
348af9f7
MS
106382011-03-04 Michael Snyder <msnyder@vmware.com>
10639
10640 * server.c (queue_stop_reply): Call xmalloc not malloc.
10641
106422011-03-02 Michael Snyder <msnyder@vmware.com>
10643
10644 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10645
9f72fee2
MS
106462011-02-28 Michael Snyder <msnyder@vmware.com>
10647
588eebee
MS
10648 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10649 (cmd_qtframe): Ditto.
10650 (cmd_qtbuffer): Ditto.
10651 (cmd_bigqtbuffer): Ditto.
10652
9f72fee2
MS
10653 * utils.c (decimal2str): Initialize 'width' to nine, then
10654 don't mess with it.
10655
8040bd49
UW
106562011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10657
10658 * hostio.c (require_data): Free *data, not data.
10659
7e52cbd0
JK
106602011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10661
10662 * hostio.c (require_data): Use free, not xfree.
10663
9130f83e
MS
106642011-02-27 Michael Snyder <msnyder@vmware.com>
10665
4b812f4e
MS
10666 * server.c (handle_query): Discard unused value.
10667
9130f83e
MS
10668 * hostio.c (require_data): Free malloc memory before returning
10669 error.
10670
69d37113
MS
106712011-02-26 Michael Snyder <msnyder@vmware.com>
10672
10673 * linux-low.c (list_threads): Call closedir for dirent.
10674
35f5825a
MS
106752011-02-27 Michael Snyder <msnyder@vmware.com>
10676
2a589cef
MS
10677 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10678 a case statement falls through.
10679
0adea5f7
MS
10680 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10681
35f5825a
MS
10682 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10683 in comparison.
10684
238f1c74
MS
106852011-02-26 Michael Snyder <msnyder@vmware.com>
10686
10687 * utils.c (decimal2str): Eliminate dead code and dead param.
10688 (pulongest): Drop dead param from call to decimal2str.
10689 (plongest): Ditto.
10690
633ff500
JB
106912011-02-24 Joel Brobecker <brobecker@adacore.com>
10692
10693 Revert the following patch (not approved yet):
10694 2011-02-21 Hui Zhu <teawater@gmail.com>
10695 * tracepoint.c (tp_printf): New function.
10696 (eval_agent_expr): Handle gdb_agent_op_printf.
10697
f9c6ff72
HZ
106982011-02-21 Hui Zhu <teawater@gmail.com>
10699
10700 * tracepoint.c (tp_printf): New function.
10701 (eval_agent_expr): Handle gdb_agent_op_printf.
10702
94d5e490
TT
107032011-02-18 Tom Tromey <tromey@redhat.com>
10704
10705 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10706 (tracepoint.o): Likewise.
10707 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10708 (gdb_agent_op_names): Likewise.
10709
c7f96d2b
TT
107102011-02-18 Tom Tromey <tromey@redhat.com>
10711
10712 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10713 gdb_agent_op_rot>: New constants.
10714 (gdb_agent_op_names): Add pick and roll.
10715 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10716 cases.
10717
0feedb2c
JK
107182011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10719
10720 * aclocal.m4: Regenerated with aclocal-1.11.1.
10721
b3b9301e
PA
107222011-02-14 Pedro Alves <pedro@codesourcery.com>
10723
10724 * server.c (handle_qxfer_traceframe_info): New.
10725 (qxfer_packets): Register "traceframe-info".
10726 (handle_query): Report support for qXfer:traceframe-info:read+.
10727 * tracepoint.c (match_blocktype): New.
10728 (traceframe_find_block_type): Rename to ...
10729 (traceframe_walk_blocks): ... this. Add callback filter argument,
10730 and use it.
10731 (traceframe_find_block_type): New, reimplemented on top of
10732 traceframe_walk_blocks.
10733 (build_traceframe_info_xml): New.
10734 (traceframe_read_info): New.
10735 * server.h (traceframe_read_info): Declare.
10736
4f3e6fb7
YQ
107372011-02-11 Yao Qi <yao@codesourcery.com>
10738
10739 * configure.ac: Call AC_PROG_RANLIB.
10740 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10741 * configure: Regenerate.
10742
764880b7
PA
107432011-02-07 Pedro Alves <pedro@codesourcery.com>
10744
10745 * server.c (gdb_read_memory): Change return semantics to allow
10746 partial transfers.
10747 (handle_search_memory_1): Adjust.
10748 (process_serial_event) <'m' packet>: Handle partial transfers.
10749 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10750
1c79eb8a
PA
107512011-01-28 Pedro Alves <pedro@codesourcery.com>
10752
10753 * regcache.c (init_register_cache): Initialize
10754 regcache->register_status.
10755 (free_register_cache): Release regcache->register_status.
10756 (regcache_cpy): Copy register_status.
10757 (registers_to_string): Print 'x's for unavailable registers.
10758 (supply_register): Mark the register's status valid or
10759 unavailable, depending on whether a buffer was passed in or not.
10760 (supply_register_zeroed): New.
10761 (supply_regblock): Mark the registers' status valid or
10762 unavailable, depending on whether a buffer was passed in or not.
10763 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10764 (struct regcache): New `register_status' field.
10765 (supply_register_zeroed): Declare.
10766 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10767 supply_register_zeroed, rather than passing a NULL buffer to
10768 supply_register.
10769 * tracepoint.c (fetch_traceframe_registers): Update comment.
10770
85724a0e
PA
107712011-01-28 Pedro Alves <pedro@codesourcery.com>
10772
10773 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10774 buffer explicit.
10775
d08aafef
PA
107762011-01-25 Pedro Alves <pedro@codesourcery.com>
10777
10778 * server.h (decode_xfer_write): Change prototype.
10779 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10780 and don't extract the annex here.
10781 * server.c (decode_xfer_read): Remove `annex' parameter,
10782 and don't extract the annex here.
10783 (decode_xfer): New.
10784 (struct qxfer): New.
10785 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10786 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10787 (handle_qxfer_statictrace): New functions, abstracted out from
10788 handle_query, and made to use the struct qxfer interface.
10789 (handle_threads_qxfer_proper): Rename to ...
10790 (handle_qxfer_threads_proper): ... this.
10791 (handle_threads_qxfer): Rename to ...
10792 (handle_qxfer_threads): ... this. Adjust.
10793 (qxfer_packets): New array.
10794 (handle_qxfer): New function.
10795 (handle_query): Use handle_qxfer.
10796
493e2a69
MS
107972011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10798
10799 * gdbreplay.c: Shorten lines of >= 80 columns.
10800 * linux-low.c: Ditto.
10801 * linux-ppc-low.c: Ditto.
10802 * linux-s390-low.c: Ditto.
10803 * linux-sparc-low.c: Ditto.
10804 * linux-x86-low.c: Ditto.
10805 * linux-xtensa-low.c: Ditto.
10806 * mem-break.c: Ditto.
10807 * nto-low.c: Ditto.
10808 * regcache.h: Ditto.
10809 * remote-utils.c: Ditto.
10810 * server.c: Ditto.
10811 * server.h: Ditto.
10812 * thread-db.c: Ditto.
10813 * tracepoint.c: Ditto.
10814 * utils.c: Ditto.
10815 * win32-low.h: Ditto.
10816
44944448
JB
108172011-01-05 Joel Brobecker <brobecker@adacore.com>
10818
10819 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10820 update.
10821
71ce852c
JB
108222011-01-01 Joel Brobecker <brobecker@adacore.com>
10823
10824 * server.c (gdbserver_version): Update copyright year in version
10825 output.
10826 * gdbreplay.c (gdbreplay_version): Ditto.
10827
eb826dc6
MF
108282010-12-29 Jie Zhang <jie.zhang@analog.com>
10829
10830 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10831 * linux-bfin-low.c: New file.
10832 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10833 PT_DATA_ADDR for BFIN targets.
10834 * Makefile.in (SFILES): Add linux-bfin-low.c.
10835 (clean): Remove reg-bfin.c.
10836 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10837 * README: Mention supported Blackfin targets.
10838
39ab222a
MF
108392010-12-23 Mike Frysinger <vapier@gentoo.org>
10840
10841 * .gitignore: New file.
10842
a1f2ce7d
MF
108432010-11-16 Mike Frysinger <vapier@gentoo.org>
10844
10845 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10846
f474844c
JZ
108472010-10-22 Jie Zhang <jie@codesourcery.com>
10848
10849 * Makefile.in: Add FLAGS_TO_PASS variable.
10850 (install): Remove dependency of install-only and recursively
10851 invoke make for install-only.
10852
f1048712
DE
108532010-10-04 Doug Evans <dje@google.com>
10854
10855 * Makefile.in (uninstall): Use $(DESTDIR).
10856
b53a1623
PA
108572010-09-24 Pedro Alves <pedro@codesourcery.com>
10858
e6ee044d
PA
10859 PR gdb/11842
10860
b53a1623
PA
10861 * linux-x86-low.c (compat_siginfo_from_siginfo)
10862 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10863 si_code is < 0. Check for si_code == SI_TIMER before checking for
10864 si_code < 0.
10865
fa1bd1e4
JB
108662010-09-13 Joel Brobecker <brobecker@adacore.com>
10867
10868 * lynx-i386-low.c: New file.
10869 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10870
47fac8f8
JB
108712010-09-13 Joel Brobecker <brobecker@adacore.com>
10872
10873 * lynx-low.c (ptrace_request_to_str): Remove handling for
10874 request values that have been removed in LynxOS 5.x.
10875
1adfc54d
JB
108762010-09-13 Joel Brobecker <brobecker@adacore.com>
10877
10878 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10879 <ptrace.h>
10880
c2a66c29
NS
108812010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10882
10883 * configure.ac: Add --enable-inprocess-agent option.
10884 * configure: Rebuilt.
10885
32fcada3
YQ
108862010-09-06 Yao Qi <yao@codesourcery.com>
10887
10888 * linux-low.c (linux_kill): Remove unused variable.
10889 (linux_stabilize_threads): Likewise.
10890 * server.c (start_inferior): Likewise.
10891 (queue_stop_reply_callback): Likewise.
10892 * tracepoint.c (do_action_at_tracepoint): Likewise.
10893
0cccb683
YQ
108942010-09-06 Yao Qi <yao@codesourcery.com>
10895
10896 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10897 on return.
10898
423ec54c
JK
108992010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10900
10901 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10902
12ac6819
PA
109032010-09-06 Pedro Alves <pedro@codesourcery.com>
10904
10905 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10906 "$(IPA_DEPFILES)".
10907
8ed54b31
JB
109082010-09-01 Joel Brobecker <brobecker@adacore.com>
10909
10910 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10911 gdbserver/lynx-ppc-low.c: New files.
10912 * Makefile.in (lynx_low_h): New variable.
10913 (lynx-low.o, lynx-ppc-low.o): New rules.
10914 * configure.ac: On LynxOS, link with -lnetinet.
10915 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10916 * configure: regenerate.
10917
bb0116a4
JB
109182010-09-01 Joel Brobecker <brobecker@adacore.com>
10919
10920 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10921 * configure.ac: Add check for vasprintf and vsnprintf.
10922 * configure, config.in: Regenerate.
10923 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10924
a778ab81 109252010-09-01 Joel Brobecker <brobecker@adacore.com>
10926
10927 * gdbreplay.c: Move include of alloca.h up, next to include of
10928 malloc.h.
10929 * server.h: Add include of malloc.h.
10930 * mem-break.c: Remove include of malloc.h.
10931 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10932
8b034a19 109332010-09-01 Joel Brobecker <brobecker@adacore.com>
10934
10935 * Makefile.in (memmem.o): Build with -Wno-error.
10936
109372010-09-01 Joel Brobecker <brobecker@adacore.com>
10938
10939 * utils.c (xsnprintf): Make non-static.
10940 * server.h: Add xsnprintf declaration.
10941 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10942 replace calls to snprintf by calls to xsnprintf throughout.
10943
109442010-09-01 Joel Brobecker <brobecker@adacore.com>
10945
10946 * configure.ac: Add configure check for alloca.
10947 * configure, config.in: Regenerate.
10948 * server.h: Include alloca.h if it exists.
10949 * gdbreplay.c: Include alloca.h if it exists.
10950
1a981360
PA
109512010-08-28 Pedro Alves <pedro@codesourcery.com>
10952
10953 * linux-low.c (__SIGRTMIN): Define if not already defined.
10954 (linux_create_inferior): Check for __ANDROID__ rather than
10955 __SIGRTMIN.
10956 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10957 are already deferred.
10958 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10959 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10960 stopped and already has a pending signal to report.
10961 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10962 a pending signal to report or is moving out of a jump pad.
10963 (linux_init_signals): Check for __ANDROID__ rather than
10964 __SIGRTMIN.
10965
b4d51a55
PA
109662010-08-28 Pedro Alves <pedro@codesourcery.com>
10967
10968 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10969 debug_threads check. Avoid a linear search when not doing debug
10970 output.
10971
ec48365d
PA
109722010-08-27 Pedro Alves <pedro@codesourcery.com>
10973
10974 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10975 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10976 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10977 (process_event): Change local fd's type to gdb_fildes_t.
10978 (create_file_handler): Adjust prototype.
10979 (delete_file_handler): Adjust prototype.
10980 (handle_file_event): Adjust prototype. Use pfildes.
10981 (create_file_event): Adjsut prototype.
10982 * remote-utils.c (remote_desc, listen_desc): Change type to
10983 gdb_fildes_t.
10984 * server.h: New gdb_fildes_t typedef.
10985 [USE_WIN32API]: Include winsock2.h.
10986 (delete_file_handler, add_file_handler): Adjust prototypes.
10987 (pfildes): Declare.
10988 * utils.c (pfildes): New.
10989
854d88f0
PA
109902010-08-27 Pedro Alves <pedro@codesourcery.com>
10991
10992 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10993 * configure: Regenerate.
10994
0146f85b
PA
109952010-08-27 Pedro Alves <pedro@codesourcery.com>
10996
10997 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10998 (linux_done_accessing_memory): ... this.
10999 (linux_target_ops): Adjust.
11000 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11001 * nto-low.c (nto_target_ops): Adjust comment.
11002 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11003 * spu-low.c (spu_target_ops): Adjust comment.
11004 * target.h (target_ops): Rename unprepare_to_access_memory field
11005 to done_accessing_memory.
11006 (unprepare_to_access_memory): Rename to ...
11007 (done_accessing_memory): ... this.
11008
90d74c30
PA
110092010-08-26 Pedro Alves <pedro@codesourcery.com>
11010
11011 * linux-low.c (linux_prepare_to_access_memory): New.
11012 (linux_unprepare_to_access_memory): New.
11013 (linux_target_ops): Install them.
11014 * server.c (read_memory): Rename to ...
11015 (gdb_read_memory): ... this. Use
11016 prepare_to_access_memory/prepare_to_access_memory.
11017 (write_memory): Rename to ...
11018 (gdb_write_memory): ... this. Use
11019 prepare_to_access_memory/prepare_to_access_memory.
11020 (handle_search_memory_1): Adjust.
11021 (process_serial_event): Adjust.
11022 * target.h (struct target_ops): New fields
11023 prepare_to_access_memory and unprepare_to_access_memory.
11024 (prepare_to_access_memory, unprepare_to_access_memory): New.
11025 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11026 prepare_to_access_memory/prepare_to_access_memory.
11027 * nto-low.c (nto_target_ops): Adjust.
11028 * spu-low.c (spu_target_ops): Adjust.
11029 * win32-low.c (win32_target_ops): Adjust.
11030
fd467969
PA
110312010-08-26 Pedro Alves <pedro@codesourcery.com>
11032
11033 * Makefile.in (WARN_CFLAGS): Get it from configure.
11034 (WERROR_CFLAGS): New.
11035 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11036 * configure.ac: Introduce --enable-werror, which adds -Werror to
11037 the compiler command line. Enabled by default. Disable with
11038 --disable-werror. Add -Wdeclaration-after-statement
11039 Wpointer-arith and -Wformat-nonliteral to warning flags.
11040 * configure: Regenerate.
11041
331e2f5f
PA
110422010-08-26 Pedro Alves <pedro@codesourcery.com>
11043
11044 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11045
e581f2b4
PA
110462010-08-26 Pedro Alves <pedro@codesourcery.com>
11047
11048 * gdbreplay.c (remote_error): New.
11049 (gdbchar): New.
11050 (expect): Use gdbchar. Check for error reading from GDB.
11051 Clarify sync error output.
11052 (play): Check for errors writing to GDB.
11053 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11054 * remote-utils.c (getpkt): Check for errors writing to the remote
11055 descriptor.
11056
3c11dd79
PA
110572010-08-25 Pedro Alves <pedro@codesourcery.com>
11058
11059 * linux-low.c (linux_wait_1): Move non-debugging code out of
11060 `debug_threads' control.
11061
d20a8ad9
PA
110622010-08-25 Pedro Alves <pedro@codesourcery.com>
11063
11064 * linux-low.c (linux_wait_1): Don't set last_status here.
11065 * server.c (push_event, queue_stop_reply_callback): Assert we're
11066 not pushing a TARGET_WAITKIND_IGNORE event.
11067 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11068 (myresume, handle_target_event): Set the thread's last_resume_kind
11069 and last_status from the target returned status.
11070
964e4306
PA
110712010-08-25 Pedro Alves <pedro@codesourcery.com>
11072
11073 PR threads/10729
11074
11075 * linux-x86-low.c (update_debug_registers_callback): New.
11076 (i386_dr_low_set_addr): Use it.
11077 (i386_dr_low_get_addr): New.
11078 (i386_dr_low_set_control): Use update_debug_registers_callback.
11079 (i386_dr_low_get_control): New.
11080 (i386_dr_low_get_status): Adjust.
11081 * linux-low.c (linux_stop_lwp): New.
11082 * linux-low.h (linux_stop_lwp): Declare.
11083
11084 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11085 argument instead of a i386_debug_reg_state.
11086 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11087 a i386_debug_reg_state.
11088 (i386_insert_aligned_watchpoint): Adjust.
11089 (i386_remove_aligned_watchpoint): Adjust.
11090 (i386_low_stopped_data_address): Read the debug registers from the
11091 inferior instead of from the mirrors.
11092 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11093 (i386_dr_low_get_addr): Declare.
11094 (i386_dr_low_get_control): Declare.
11095 (i386_dr_low_get_status): Change prototype.
11096
11097 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11098 (i386_dr_low_get_addr): New.
11099 (i386_dr_low_get_control): New.
11100 (i386_dr_low_get_status): Adjust prototype. Return
11101 dr_status_mirror.
11102 (i386_initial_stuff): Clear dr_status_mirror and
11103 dr_control_mirror.
11104 (i386_get_thread_context): Adjust.
11105 (i386_set_thread_context): Adjust.
11106 (i386_thread_added): Adjust.
11107
5f21a75b
PA
111082010-08-24 Pedro Alves <pedro@codesourcery.com>
11109
11110 * linux-low.h (linux_thread_area): Delete declaration.
11111
3e4c1235
TS
111122010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11113
11114 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11115 after its termination.
11116
1971b033
PA
111172010-08-09 Pedro Alves <pedro@codesourcery.com>
11118
11119 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11120 (gdb_wants_all_stopped): Delete.
11121 (linux_wait_1): Don't call them.
11122 * server.c (handle_v_cont): Tag all threads as want-stopped.
11123 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11124 stopped as "client-wants-stopped".
11125
310444ac
PA
111262010-07-31 Pedro Alves <pedro@codesourcery.com>
11127
11128 * Makefile.in (signals_h): New.
11129 (server_h): Depend on it.
11130 (server.o): Don't depend on $(signals_def).
11131 (signals.o): Depend on $(signals_def).
11132
a19cae16
JK
111332010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11134
11135 * Makefile.in (signals_def): New.
11136 (server_h): Append include/gdb/signals.h and signals_def.
11137 (server.o): Append signals_def.
11138
30d50328
JK
111392010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11140
11141 * server.c (handle_target_event): Use target_signal_to_host for
11142 resume_info.sig initialization.
11143 * target.h (struct thread_resume) <sig>: New comment.
11144
5c3216e2
OS
111452010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11146
c6f46ca0
OS
11147 * server.c (handle_query): strcpy() the returned string from paddress()
11148 instead of sprintf().
5c3216e2
OS
11149 * utils.c (paddress): Return phex_nz().
11150
6bd31874
JB
111512010-07-07 Joel Brobecker <brobecker@adacore.com>
11152
11153 * server.c (handle_v_cont): Call mourn_inferior if process
11154 just exited.
11155 (myresume): Likewise.
11156
0fb4aa4b
PA
111572010-07-01 Pedro Alves <pedro@codesourcery.com>
11158
11159 Static tracepoints, and integration with UST.
11160
11161 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11162 * mem-break.c (uninsert_all_breakpoints)
11163 (reinsert_all_breakpoints): New.
11164 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11165 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11166 (gdb_agent_ust_loaded, helper_thread_id)
11167 (gdb_agent_helper_thread_id): New macros.
11168 (struct ipa_sym_addresses): Add addr_ust_loaded,
11169 addr_helper_thread_id, addr_cmd_buf.
11170 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11171 (in_process_agent_loaded_ust): New.
11172 (write_e_ust_not_loaded): New.
11173 (maybe_write_ipa_ust_not_loaded): New.
11174 (struct collect_static_trace_data_action): New.
11175 (enum tracepoint_type) <static_tracepoint>: New.
11176 (struct tracepoint) <handle>: Mention static tracepoints.
11177 (struct static_tracepoint_ctx): New.
11178 (CMD_BUF_SIZE): New.
11179 (add_tracepoint_action): Handle static tracepoint actions.
11180 (unprobe_marker_at): New.
11181 (clear_installed_tracepoints): Handle static tracepoints.
11182 (cmd_qtdp): Handle static tracepoints.
11183 (probe_marker_at): New.
11184 (cmd_qtstart): Handle static tracepoints.
11185 (response_tracepoint): Handle static tracepoints.
11186 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11187 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11188 (get_context_regcache): Handle static tracepoints.
11189 (do_action_at_tracepoint): Handle static tracepoint actions.
11190 (traceframe_find_block_type): Handle static trace data blocks.
11191 (traceframe_read_sdata): New.
11192 (download_tracepoints): Download static tracepoint actions.
11193 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11194 (GDB_PROBE_NAME): New.
11195 (ust_ops): New.
11196 (GET_UST_SYM): New.
11197 (USTF): New.
11198 (dlsym_ust): New.
11199 (ust_marker_to_static_tracepoint): New.
11200 (gdb_probe): New.
11201 (collect_ust_data_at_tracepoint): New.
11202 (gdb_ust_probe): New.
11203 (UNIX_PATH_MAX, SOCK_DIR): New.
11204 (gdb_ust_connect_sync_socket): New.
11205 (resume_thread, stop_thread): New.
11206 (run_inferior_command): New.
11207 (init_named_socket): New.
11208 (gdb_ust_socket_init): New.
11209 (cstr_to_hexstr): New.
11210 (next_st): New.
11211 (first_marker, next_marker): New.
11212 (response_ust_marker): New.
11213 (cmd_qtfstm, cmd_qtsstm): New.
11214 (unprobe_marker_at, probe_marker_at): New.
11215 (cmd_qtstmat, gdb_ust_thread): New.
11216 (gdb_ust_init): New.
11217 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11218 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11219 (ST_REGENTRY): New.
11220 (x86_64_st_collect_regmap): New.
11221 (X86_64_NUM_ST_COLLECT_GREGS): New.
11222 (AMD64_RIP_REGNUM): New.
11223 (supply_static_tracepoint_registers): New.
11224 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11225 (ST_REGENTRY): New.
11226 (i386_st_collect_regmap): New.
11227 (i386_NUM_ST_COLLECT_GREGS): New.
11228 (supply_static_tracepoint_registers): New.
11229 * server.c (handle_query): Handle qXfer:statictrace:read.
11230 <qSupported>: Report support for StaticTracepoints, and
11231 qXfer:statictrace:read features.
11232 * server.h (traceframe_read_sdata)
11233 (supply_static_tracepoint_registers): Declare.
11234 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11235 (unpack_varlen_hex): Include in IPA build.
11236 * Makefile.in (ustlibs, ustinc): New.
11237 (IPA_OBJS): Add remote-utils-ipa.o.
11238 ($(IPA_LIB)): Link -ldl and -lpthread.
11239 (UST_CFLAGS): New.
11240 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11241 * config.in, configure: Regenerate.
11242
9e4344e5
PA
112432010-06-20 Ian Lance Taylor <iant@google.com>
11244 Pedro Alves <pedro@codesourcery.com>
11245
11246 * linux-x86-low.c (always_true): Delete.
11247 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11248 trying to fool the compiler with always_true.
11249
c6beb2cb
PA
112502010-06-20 Pedro Alves <pedro@codesourcery.com>
11251
11252 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11253 conditions in gdbserver.
11254
d2ed6730
UW
112552010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11256
11257 * spu-low.c (spu_read_memory): Wrap around local store limit.
11258 (spu_write_memory): Likewise.
11259
4e29fb54
PA
112602010-06-15 Pedro Alves <pedro@codesourcery.com>
11261
11262 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11263 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11264 LONGEST uses.
11265 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11266 uses.
11267 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11268 uses with LONGEST uses.
11269
6a271cae
PA
112702010-06-14 Stan Shebs <stan@codesourcery.com>
11271 Pedro Alves <pedro@codesourcery.com>
11272
11273 Bytecode compiler.
11274
11275 * linux-x86-low.c: Include limits.h.
11276 (add_insns): New.
11277 (always_true): New.
11278 (EMIT_ASM): New.
11279 (EMIT_ASM32): New.
11280 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11281 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11282 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11283 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11284 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11285 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11286 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11287 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11288 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11289 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11290 (amd64_emit_void_call_2): New.
11291 (amd64_emit_ops): New.
11292 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11293 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11294 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11295 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11296 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11297 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11298 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11299 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11300 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11301 (i386_emit_stack_adjust, i386_emit_int_call_1)
11302 (i386_emit_void_call_2): New.
11303 (i386_emit_ops): New.
11304 (x86_emit_ops): New.
11305 (the_low_target): Install x86_emit_ops.
11306 * server.h (struct emit_ops): New.
11307 (get_raw_reg_func_addr): Declare.
11308 (current_insn_ptr, emit_error): Declare.
11309 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11310 (set_trace_state_variable_value): New defines.
11311 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11312 addr_get_trace_state_variable_value and
11313 addr_set_trace_state_variable_value.
11314 (symbol_list): New fields for get_raw_reg,
11315 get_trace_state_variable_value and set_trace_state_variable_value.
11316 (condfn): New typedef.
11317 (struct tracepoint): New field `compiled_cond'.
11318 (do_action_at_tracepoint): Clear compiled_cond.
11319 (get_trace_state_variable_value, set_trace_state_variable_value):
11320 Export in the IPA.
11321 (condition_true_at_tracepoint): If there's a compiled condition,
11322 run that.
11323 (current_insn_ptr, emit_error): New globals.
11324 (struct bytecode_address): New.
11325 (get_raw_reg_func_addr): New.
11326 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11327 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11328 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11329 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11330 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11331 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11332 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11333 (compile_tracepoint_condition, compile_bytecodes): New.
11334 * target.h (emit_ops): Forward declare.
11335 (struct target_ops): New field emit_ops.
11336 (target_emit_ops): New.
11337 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11338 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11339 * linux-low.c (linux_emit_ops): New.
11340 (linux_target_ops): Install it.
11341 * linux-low.h (struct linux_target_ops): New field emit_ops.
11342
92b72907
UW
113432010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11344
11345 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11346 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11347
fa593d66
PA
113482010-06-01 Pedro Alves <pedro@codesourcery.com>
11349 Stan Shebs <stan@codesourcery.com>
11350
11351 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11352 (all): Depend on $(extra_libraries).
11353 (install-only): Install the IPA.
11354 (IPA_OBJS, IPA_LIB): New.
11355 (clean): Remove the IPA lib.
11356 (IPAGENT_CFLAGS): New.
11357 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11358 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11359 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11360 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11361 * configure.ac: Check for atomic builtins support in the compiler.
11362 (IPA_DEPFILES, extra_libraries): Define.
11363 * configure.srv (ipa_obj): Add description.
11364 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11365 (i[34567]86-*-linux*): Set ipa_obj.
11366 (x86_64-*-linux*): Set ipa_obj.
11367 * linux-low.c (stabilizing_threads): New.
11368 (supports_fast_tracepoints): New.
11369 (linux_detach): Stabilize threads before detaching.
11370 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11371 the lwp is either not stabilizing, or is moving out of a jump pad.
11372 (linux_fast_tracepoint_collecting): New.
11373 (maybe_move_out_of_jump_pad): New.
11374 (enqueue_one_deferred_signal): New.
11375 (dequeue_one_deferred_signal): New.
11376 (linux_wait_for_event_1): If moving out of a jump pad, defer
11377 pending signals to later.
11378 (linux_stabilize_threads): New.
11379 (linux_wait_1): Check if threads need moving out of jump pads, and
11380 do it if so.
11381 (stuck_in_jump_pad_callback): New.
11382 (move_out_of_jump_pad_callback): New.
11383 (lwp_running): New.
11384 (linux_resume_one_lwp): Handle moving out of jump pads.
11385 (linux_set_resume_request): Dequeue deferred signals.
11386 (need_step_over_p): Also step over fast tracepoint jumps.
11387 (start_step_over): Also uninsert fast tracepoint jumps.
11388 (finish_step_over): Also reinsert fast tracepoint jumps.
11389 (linux_install_fast_tracepoint_jump): New.
11390 (linux_target_ops): Install linux_stabilize_threads and
11391 linux_install_fast_tracepoint_jump_pad.
11392 * linux-low.h (linux_target_ops) <get_thread_area,
11393 install_fast_tracepoint_jump_pad>: New fields.
11394 (struct lwp_info) <collecting_fast_tracepoint,
11395 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11396 (linux_get_thread_area): Declare.
11397 * linux-x86-low.c (jump_insn): New.
11398 (x86_get_thread_area): New.
11399 (append_insns): New.
11400 (push_opcode): New.
11401 (amd64_install_fast_tracepoint_jump_pad): New.
11402 (i386_install_fast_tracepoint_jump_pad): New.
11403 (x86_install_fast_tracepoint_jump_pad): New.
11404 (the_low_target): Install x86_get_thread_area and
11405 x86_install_fast_tracepoint_jump_pad.
11406 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11407 (struct fast_tracepoint_jump): New.
11408 (fast_tracepoint_jump_insn): New.
11409 (fast_tracepoint_jump_shadow): New.
11410 (find_fast_tracepoint_jump_at): New.
11411 (fast_tracepoint_jump_here): New.
11412 (delete_fast_tracepoint_jump): New.
11413 (set_fast_tracepoint_jump): New.
11414 (uninsert_fast_tracepoint_jumps_at): New.
11415 (reinsert_fast_tracepoint_jumps_at): New.
11416 (set_breakpoint_at): Use write_inferior_memory.
11417 (uninsert_raw_breakpoint): Use write_inferior_memory.
11418 (check_mem_read): Mask out fast tracepoint jumps.
11419 (check_mem_write): Mask out fast tracepoint jumps.
11420 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11421 (set_fast_tracepoint_jump): Declare.
11422 (delete_fast_tracepoint_jump)
11423 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11424 (reinsert_fast_tracepoint_jumps_at): Declare.
11425 * regcache.c: Don't compile many functions when building the
11426 in-process agent library.
11427 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11428 the register buffer in the heap.
11429 (free_register_cache): If the register buffer isn't owned by the
11430 regcache, don't free it.
11431 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11432 pre-existing register caches.
11433 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11434 type.
11435 (convert_ascii_to_int): : Constify `from' parameter type.
11436 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11437 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11438 the needed buffer in-place.
11439 (relocate_instruction): New.
11440 * server.c (handle_query) <qSymbols>: If the target supports
11441 tracepoints, give it a chance of looking up symbols. Report
11442 support for fast tracepoints.
11443 (handle_status): Stabilize threads.
11444 (process_serial_event): Adjust.
11445 * server.h (struct fast_tracepoint_jump): Forward declare.
11446 (struct process_info) <fast_tracepoint_jumps>: New field.
11447 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11448 (decode_X_packet, decode_M_packet): Adjust.
11449 (relocate_instruction): Declare.
11450 (in_process_agent_loaded): Declare.
11451 (tracepoint_look_up_symbols): Declare.
11452 (struct fast_tpoint_collect_status): Declare.
11453 (fast_tracepoint_collecting): Declare.
11454 (force_unlock_trace_buffer): Declare.
11455 (handle_tracepoint_bkpts): Declare.
11456 (initialize_low_tracepoint)
11457 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11458 * target.h (struct target_ops) <stabilize_threads,
11459 install_fast_tracepoint_jump_pad>: New fields.
11460 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11461 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11462 [HAVE_STDINT_H]: Include stdint.h.
11463 (trace_debug_1): Rename to ...
11464 (trace_vdebug): ... this.
11465 (trace_debug): Rename to ...
11466 (trace_debug_1): ... this. Add `level' parameter.
11467 (trace_debug): New.
11468 (ATTR_USED, ATTR_NOINLINE): New.
11469 (IP_AGENT_EXPORT): New.
11470 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11471 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11472 (about_to_request_buffer_space, trace_buffer_is_full)
11473 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11474 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11475 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11476 (traceframe_write_count, traceframes_created)
11477 (trace_state_variables)
11478 New renaming defines.
11479 (struct ipa_sym_addresses): New.
11480 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11481 (symbol_list): New.
11482 (ipa_sym_addrs): New.
11483 (all_tracepoint_symbols_looked_up): New.
11484 (in_process_agent_loaded): New.
11485 (write_e_ipa_not_loaded): New.
11486 (maybe_write_ipa_not_loaded): New.
11487 (tracepoint_look_up_symbols): New.
11488 (debug_threads) [IN_PROCESS_AGENT]: New.
11489 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11490 (UNKNOWN_SIDE_EFFECTS): New.
11491 (stop_tracing): New.
11492 (flush_trace_buffer): New.
11493 (stop_tracing_bkpt): New.
11494 (flush_trace_buffer_bkpt): New.
11495 (read_inferior_integer): New.
11496 (read_inferior_uinteger): New.
11497 (read_inferior_data_pointer): New.
11498 (write_inferior_data_pointer): New.
11499 (write_inferior_integer): New.
11500 (write_inferior_uinteger): New.
11501 (struct collect_static_trace_data_action): Delete.
11502 (enum tracepoint_type): New.
11503 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11504 <actions_str, step_actions, step_actions_str>: Only include in
11505 GDBserver.
fa593d66
PA
11506 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11507 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11508 (tracepoints): Use IP_AGENT_EXPORT.
11509 (last_tracepoint): Don't include in the IPA.
11510 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11511 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11512 (alloced_trace_state_variables): New.
11513 (trace_state_variables): Use IP_AGENT_EXPORT.
11514 (traceframe_t): Delete unused variable.
11515 (circular_trace_buffer): Don't include in the IPA.
11516 (trace_buffer_start): Delete.
11517 (struct trace_buffer_control): New.
11518 (trace_buffer_free): Delete.
11519 (struct ipa_trace_buffer_control): New.
11520 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11521 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11522 New.
11523 (trace_buffer_ctrl): New.
11524 (TRACE_BUFFER_CTRL_CURR): New.
11525 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11526 Reimplement as macros.
11527 (trace_buffer_wrap): Delete.
11528 (traceframe_write_count, traceframe_read_count)
11529 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11530 (struct tracepoint_hit_ctx) <type>: New field.
11531 (struct fast_tracepoint_ctx): New.
11532 (memory_barrier): New.
11533 (cmpxchg): New.
11534 (record_tracepoint_error): Update atomically in the IPA.
11535 (clear_inferior_trace_buffer): New.
11536 (about_to_request_buffer_space): New.
11537 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11538 updating the same buffer.
11539 (add_tracepoint): Default the tracepoint's type to trap
11540 tracepoint, and orig_size to -1.
11541 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11542 internal variables.
11543 (create_trace_state_variable): New parameter `gdb'. Handle it.
11544 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11545 (cmd_qtdp): Handle fast tracepoints.
11546 (cmd_qtdv): Adjust.
11547 (max_jump_pad_size): New.
11548 (gdb_jump_pad_head): New.
11549 (get_jump_space_head): New.
11550 (claim_jump_space): New.
11551 (sort_tracepoints): New.
11552 (MAX_JUMP_SIZE): New.
11553 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11554 IPA.
11555 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11556 support. Upload fast traceframes, and delete internal IPA
11557 breakpoints.
11558 (stop_tracing_handler): New.
11559 (flush_trace_buffer_handler): New.
11560 (cmd_qtstop): Upload fast tracepoints.
11561 (response_tracepoint): Handle fast tracepoints.
11562 (tracepoint_finished_step): Upload fast traceframes. Set the
11563 tracepoint hit context's tracepoint type.
11564 (handle_tracepoint_bkpts): New.
11565 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11566 type. Add comment about fast tracepoints.
11567 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11568 non-existing action_str field.
11569 (get_context_regcache): Handle fast tracepoints.
11570 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11571 to the regcache.
11572 (fast_tracepoint_from_jump_pad_address): New.
11573 (fast_tracepoint_from_ipa_tpoint_address): New.
11574 (collecting_t): New.
11575 (force_unlock_trace_buffer): New.
11576 (fast_tracepoint_collecting): New.
11577 (collecting): New.
11578 (gdb_collect): New.
11579 (write_inferior_data_ptr): New.
11580 (target_tp_heap): New.
11581 (target_malloc): New.
11582 (download_agent_expr): New.
11583 (UALIGN): New.
11584 (download_tracepoints): New.
11585 (download_trace_state_variables): New.
11586 (upload_fast_traceframes): New.
11587 (IPA_FIRST_TRACEFRAME): New.
11588 (IPA_NEXT_TRACEFRAME_1): New.
11589 (IPA_NEXT_TRACEFRAME): New.
11590 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11591 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11592 (gdb_jump_pad_buffer_end): New.
11593 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11594 (initialize_tracepoint): Adjust.
11595 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11596 buffer. Initialize the low module.
11597 * utils.c (PREFIX, TOOLNAME): New.
11598 (malloc_failure): Use PREFIX.
11599 (error): In the IPA, an error causes an exit.
11600 (fatal, warning): Use PREFIX.
11601 (internal_error): Use TOOLNAME.
11602 (NUMCELLS): Increase to 10.
11603 * configure, config.in: Regenerate.
11604
d149dd1d
PA
116052010-06-01 Pedro Alves <pedro@codesourcery.com>
11606
11607 * server.c (handle_query) <qSupported>: Do two passes over the
11608 qSupported string to avoid nesting strtok.
11609
f6528abd
JK
116102010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11611
11612 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11613 (CDEPS): New.
11614 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11615 -Wl,--dynamic-list.
11616 * configure: Regenerate.
11617 * proc-service.list: New.
11618
ca2a87a0
JK
116192010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11620
11621 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11622 New comment.
11623
363a6e9f
OS
116242010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11625
11626 * gdbreplay.c (remote_open): Check error return from socket() call by
11627 its equality to -1 not by it being negative.
11628 * remote-utils.c (remote_open): Likewise.
11629
d23b6cb1
PA
116302010-05-23 Pedro Alves <pedro@codesourcery.com>
11631
11632 * config.h: Regenerate.
11633
28d3cf85
MK
116342010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11635
11636 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11637 doesn't provide PTRACE_GET_THREAD_AREA.
11638
fea36a59
MK
116392010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11640
11641 * linux-m68k-low.c: Include <asm/ptrace.h>
11642 (ps_get_thread_area): Implement.
11643
24b066ba
DE
116442010-05-03 Doug Evans <dje@google.com>
11645
11646 * event-loop.c (struct callback_event): New struct.
11647 (callback_list): New global.
11648 (append_callback_event, delete_callback_event): New functions.
11649 (process_callback): New function.
11650 (start_event_loop): Call it.
11651 * remote-utils.c (NOT_SCHEDULED): Define.
11652 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11653 moved out of readchar.
11654 (readchar): Rewrite. Call reschedule before returning.
11655 (reset_readchar): New function.
11656 (remote_close): Call it.
11657 (process_remaining, reschedule): New functions.
11658 * server.h (callback_handler_func): New typedef.
11659 (append_callback_event, delete_callback_event): Declare.
11660
9836d6ea
PA
116612010-05-03 Pedro Alves <pedro@codesourcery.com>
11662
11663 * proc-service.c (ps_pglobal_lookup): Use
11664 thread_db_look_up_one_symbol.
11665 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11666 parameter. Use it instead of all_symbols_looked_up.
11667 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11668 field.
11669 (all_symbols_looked_up): Don't declare.
11670 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11671 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11672 field.
11673 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11674 Set all_symbols_looked_up here.
11675 (thread_db_look_up_one_symbol): New.
11676 (thread_db_get_tls_address): Adjust.
11677 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11678 thread_db object on the heap, and tentatively set it in the
11679 process structure.
11680 (thread_db_init): Don't set all_symbols_looked_up here.
11681 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11682
7984d532
PA
116832010-05-03 Pedro Alves <pedro@codesourcery.com>
11684
11685 * linux-low.c (linux_kill, linux_detach): Adjust.
11686 (status_pending_p_callback): Remove redundant statement. Check
11687 for !TARGET_WAITIKIND_IGNORE, instead of
11688 TARGET_WAITKIND_STOPPED.
11689 (handle_tracepoints): Make sure LWP is locked. Adjust.
11690 (linux_wait_for_event_1): Adjust.
11691 (linux_cancel_breakpoints): New.
11692 (unsuspend_one_lwp): New.
11693 (unsuspend_all_lwps): New.
11694 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11695 (send_sigstop_callback): Change return type to int, add new
11696 `except' parameter and handle it.
11697 (suspend_and_send_sigstop_callback): New.
11698 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11699 pass them down. If SUSPEND, also increment the lwp's suspend
11700 count.
11701 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11702 (need_step_over_p): Don't consider suspended LWPs.
11703 (start_step_over): Adjust.
11704 (proceed_one_lwp): Change return type to int, add new `except'
11705 parameter and handle it.
11706 (unsuspend_and_proceed_one_lwp): New.
11707 (proceed_all_lwps): Use find_inferior instead of
11708 for_each_inferior.
11709 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11710 also decrement the suspend count of LWPs. Pass `except' down,
11711 instead of hacking its suspend count.
11712 (linux_pause_all): Add `freeze' parameter. Adjust.
11713 (linux_unpause_all): New.
11714 (linux_target_ops): Install linux_unpause_all.
11715 * server.c (handle_status): Adjust.
11716 * target.h (struct target_ops): New fields `unpause_all' and
11717 `cancel_breakpoints'. Add new parameter to `pause_all'.
11718 (pause_all): Add new `freeze' parameter.
11719 (unpause_all): New.
11720 (cancel_breakpoints): New.
11721 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11722 cancel breakpoints.
11723 (cmd_qtstart): Pause threads.
11724 (stop_tracing): Pause threads, and cancel breakpoints.
11725 * win32-low.c (win32_target_ops): Adjust.
11726
e471f25b
PA
117272010-05-03 Pedro Alves <pedro@codesourcery.com>
11728
11729 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11730 the inferior right away from here...
11731 (linux_wait_1): ... to here, and adjust to check the thread's
11732 last_resume_kind instead of the lwp's step or stop_expected flags.
11733
1915ef4f
PA
117342010-05-02 Pedro Alves <pedro@codesourcery.com>
11735
11736 * README: Use consistent `GDB' and `GDBserver' spellings.
11737
f9e39928
PA
117382010-05-02 Pedro Alves <pedro@codesourcery.com>
11739
11740 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11741 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11742 (linux_detach_one_lwp): Assume the lwp is stopped.
11743 (any_thread_of): Delete.
11744 (linux_detach): Stop all lwps here. Don't blindly delete all
11745 breakpoints.
11746 (delete_lwp_callback): New.
11747 (linux_mourn): Delete all lwps of the process that is gone.
11748 (linux_wait_1): Don't delete the last lwp of the process here.
11749 * mem-break.h (mark_breakpoints_out): Declare.
11750 * mem-break.c (mark_breakpoints_out): New.
11751 (free_all_breakpoints): Use it.
11752 * server.c (handle_target_event): If the process is gone, mark
11753 breakpoints out.
11754 * thread-db.c (struct thread_db) <create_bp>: New field.
11755 (thread_db_enable_reporting): Fix prototype. Store a thread event
11756 breakpoint reference in the thread_db struct.
11757 (thread_db_load_search): Clear the thread_db object.
11758 (try_thread_db_load_1): Ditto.
11759 (switch_to_process): New.
11760 (disable_thread_event_reporting): Use it.
11761 (remove_thread_event_breakpoints): New.
11762 (thread_db_detach, thread_db_mourn): Use it.
11763
1e7fc18c
PA
117642010-05-01 Pedro Alves <pedro@codesourcery.com>
11765
11766 * linux-low.c (linux_enable_event_reporting): New.
11767 (linux_wait_for_event_1, handle_extended_wait): Use it.
11768
02fc4de7
PA
117692010-04-30 Pedro Alves <pedro@codesourcery.com>
11770
11771 * linux-low.c (linux_kill_one_lwp, linux_kill)
11772 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11773 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11774 SIGSTOP even if the LWP is stopped.
11775 (send_sigstop_callback): New.
11776 (stop_all_lwps): Use send_sigstop_callback instead.
11777 (linux_resume_one_thread): Adjust.
11778 (proceed_one_lwp): Still proceed an LWP that the client has
11779 requested to stop, if we haven't reported it as stopped yet. Make
11780 sure that LWPs the client want stopped, have a pending SIGSTOP.
11781
bc3b5632
DE
117822010-04-26 Doug Evans <dje@google.com>
11783
ae1ada35
DE
11784 * server.c (handle_general_set): Make static.
11785
bc3b5632
DE
11786 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11787 Print received char after testing for error/eof instead of before.
11788 (input_interrupt): Tweak comment.
11789
65730243
DE
117902010-04-23 Doug Evans <dje@google.com>
11791
11792 * server.c (start_inferior): Print inferior argv if --debug.
11793
a8ae7dc0
AR
117942010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11795
11796 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11797 * nto-x86-low.c: Include server.h
11798
1c07cc19
PM
117992010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11800
11801 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11802 be consistent with other sources of this directory.
11803 (init_registers_amd64): Correct name of source file of this function
11804 in the comment.
11805
e0a61e09
PM
118062010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11807
11808 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11809 64-bit executables.
11810
54709339
PM
118112010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11812
11813 * win32-i386-low.c: Add 64-bit support.
11814 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11815 (init_registers_amd64): Declare.
11816 (mappings): Add 64-bit version of array.
11817 (init_windows_x86): New function.
11818 (the_low_target): Change init_arch field to init_windows_x86.
11819
e8f0053d
PM
118202010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11821
11822 * win32-low.c: Adapt to support also 64-bit architecture.
11823 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11824 (get_image_name): Use SIZE_T type for local variable `done'.
11825 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11826 (toolhelp_get_dll_name): Idem.
11827 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11828 Use uintptr_t typecast to avoid warning.
11829 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11830 (handle_exception): Use phex_nz to avoid warning.
11831 (win32_wait): Remove unused local variable `process'.
11832
c481e77e
PM
118332010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11834
11835 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11836 `amd64-avx.o'.
11837
12ea4b69
PM
118382010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11839
11840 * configure.ac: Use `ws2_32' library for srv_mingw.
11841 * configure: Regenerate.
11842 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11843 * remote-utils.c: Likewise.
11844
f6d1620c
L
118452010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11846
11847 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11848 if __x86_64__ is defined.
11849
8e642873
PM
118502010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11851
11852 * configure: Regenerate.
11853
711e434b
PM
118542010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11855
11856 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11857 * target.h (target_ops): New get_tib_address field.
11858 * win32-low.h (win32_thread_info): Add thread_local_base field.
11859 * win32-low.c (child_add_thread): Add tlb argument.
11860 Set thread_local_base field to TLB.
11861 (get_child_debug_event): Adapt to child_add_thread change.
11862 (win32_get_tib_address): New function.
11863 (win32_target_ops): Set get_tib_address field to
11864 win32_get_tib_address.
11865 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11866
505106cd
PA
118672010-04-12 Pedro Alves <pedro@codesourcery.com>
11868
505106cd
PA
11869 * linux-low.c (linux_mourn): Also remove the process.
11870 * server.c (handle_target_event): Don't remove the process here.
11871 * nto-low.c (nto_mourn): New.
11872 (nto_target_ops): Install it.
11873 * spu-low.c (spu_mourn): New.
11874 (spu_target_ops): Install it.
11875 * win32-low.c (win32_mourn): New.
11876 (win32_target_ops): Install it.
11877
e8470a06
PA
118782010-04-12 Pedro Alves <pedro@codesourcery.com>
11879
11880 * server.h (buffer_xml_printf): Remove redundant `;'.
11881
45ba0d02
PA
118822010-04-12 Pedro Alves <pedro@codesourcery.com>
11883
11884 * regcache.c (set_register_cache): Invalidate regcaches before
11885 changing the register cache layout.
11886 (regcache_invalidate_one): Allow a NULL regcache.
11887 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11888 regcaches before changing the register cache layout or the target
11889 regsets.
11890
59e04013
L
118912010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11892
11893 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11894 variable warning on Linux/x86-64.
11895
8336d594
PA
118962010-04-11 Pedro Alves <pedro@codesourcery.com>
11897
11898 GDBserver disconnected tracing support.
11899
11900 * linux-low.c (linux_remove_process): Delete.
11901 (add_lwp): Don't set last_resume_kind here.
11902 (linux_kill): Use `mourn'.
11903 (linux_detach): Use `thread_db_detach', and `mourn'.
11904 (linux_mourn): New.
11905 (linux_attach_lwp_1): Adjust comment.
11906 (linux_attach): last_resume_kind moved the thread_info; adjust.
11907 (status_pending_p_callback): Adjust.
11908 (linux_wait_for_event_1): Adjust.
11909 (count_events_callback, select_singlestep_lwp_callback)
11910 (select_event_lwp_callback, cancel_breakpoints_callback)
11911 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11912 (proceed_one_lwp): Adjust.
11913 (linux_async): Add debug output.
11914 (linux_thread_stopped): New.
11915 (linux_pause_all): New.
11916 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11917 linux_pause_all.
11918 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11919 (thread_db_free): Delete declaration.
11920 (thread_db_detach, thread_db_mourn): Declare.
11921 * thread-db.c (thread_db_init): Use thread_db_mourn.
11922 (thread_db_free): Delete, split in two.
11923 (disable_thread_event_reporting): New.
11924 (thread_db_detach): New.
11925 (thread_db_mourn): New.
11926
11927 * server.h (struct thread_info) <last_resume_kind>: New field.
11928 <attached>: Add comment.
11929 <gdb_detached>: New field.
11930 (handler_func): Change return type to int.
11931 (handle_serial_event, handle_target_event): Ditto.
11932 (gdb_connected): Declare.
11933 (tracing): Delete.
11934 (disconnected_tracing): Declare.
11935 (stop_tracing): Declare.
11936
11937 * server.c (handle_query) <qSupported>: Report support for
11938 disconnected tracing.
11939 (queue_stop_reply_callback): Account for running threads.
11940 (gdb_wants_thread_stopped): New.
11941 (gdb_wants_all_threads_stopped): New.
11942 (gdb_reattached_process): New.
11943 (handle_status): Clear the `gdb_detached' flag of all processes.
11944 In all-stop, stop all threads.
11945 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11946 (process_serial_event): If the remote connection breaks, or if an
11947 exit was forced with "monitor exit", force an event loop exit.
11948 Handle disconnected tracing on detach.
11949 (handle_serial_event): Adjust.
11950 (handle_target_event): If GDB isn't connected, forward events back
11951 to the inferior, unless the last process exited, in which case,
11952 exit gdbserver. Adjust interface.
11953
11954 * remote-utils.c (remote_open): Don't block in accept. Instead
11955 register an event loop source on the listen socket file
11956 descriptor. Refactor bits into ...
11957 (listen_desc): ... this new global.
11958 (gdb_connected): ... this new function.
11959 (enable_async_notification): ... this new function.
11960 (handle_accept_event): ... this new function.
11961 (remote_close): Clear remote_desc.
11962
11963 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11964
11965 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11966 New fields.
11967 (mourn_inferior): Define.
11968 (target_process_qsupported): Avoid the dangling else problem.
11969 (thread_stopped): Define.
11970 (pause_all): Define.
11971 (target_waitstatus_to_string): Declare.
11972 * target.c (target_waitstatus_to_string): New.
11973
11974 * tracepoint.c (tracing): Make extern.
11975 (disconnected_tracing): New.
11976 (stop_tracing): Make extern. Handle tracing stops due to GDB
11977 disconnecting.
11978 (cmd_qtdisconnected): New.
11979 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11980 (handle_tracepoint_general_set): Handle QTDisconnected.
11981
11982 * event-loop.c (event_handler_func): Change return type to int.
11983 (process_event): Bail out if the event handler wants the event
11984 loop to stop.
11985 (handle_file_event): Ditto.
11986 (start_event_loop): Bail out if the event handler wants the event
11987 loop to stop.
11988
11989 * nto-low.c (nto_target_ops): Adjust.
11990 * spu-low.c (spu_wait): Don't remove the process here.
11991 (spu_target_ops): Adjust.
11992 * win32-low.c (win32_wait): Don't remove the process here.
11993 (win32_target_ops): Adjust.
11994
5d267c4c
PA
119952010-04-11 Pedro Alves <pedro@codesourcery.com>
11996
11997 * regcache.c (realloc_register_cache): Invalidate inferior's
11998 regcache before recreating it.
11999
623ccd72
PA
120002010-04-09 Pedro Alves <pedro@codesourcery.com>
12001
12002 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12003
219f2f23
PA
120042010-04-09 Stan Shebs <stan@codesourcery.com>
12005 Pedro Alves <pedro@codesourcery.com>
12006
12007 * server.h (LONGEST): New.
12008 (struct thread_info) <while_stepping>: New field.
12009 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12010 Declare.
12011 (initialize_tracepoint, handle_tracepoint_general_set)
12012 (handle_tracepoint_query, tracepoint_finished_step)
12013 (tracepoint_was_hit, release_while_stepping_state_list):
12014 (current_traceframe): Declare.
12015 * server.c (handle_general_set): Handle tracepoint packets.
12016 (read_memory): New.
12017 (write_memory): New.
12018 (handle_search_memory_1): Use read_memory.
12019 (handle_query): Report support for conditional tracepoints, trace
12020 state variables, and tracepoint sources. Handle tracepoint
12021 queries.
12022 (main): Initialize the tracepoints module.
12023 (process_serial_event): Handle traceframe reads/writes.
12024
12025 * linux-low.c (handle_tracepoints): New.
12026 (linux_wait_1): Call it.
12027 (linux_resume_one_lwp): Handle while-stepping.
12028 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12029 (linux_target_ops): Install them.
12030 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12031 New field.
12032 * linux-x86-low.c (x86_supports_tracepoints): New.
12033 (the_low_target). Install it.
12034
12035 * mem-break.h (delete_breakpoint): Declare.
12036 * mem-break.c (delete_breakpoint): Make external.
12037
12038 * target.h (struct target_ops): Add `supports_tracepoints',
12039 `read_pc', and `write_pc' fields.
12040 (target_supports_tracepoints): Define.
12041 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12042 (phex_nz): New.
12043
12044 * regcache.h (struct regcache) <registers_owned>: New field.
12045 (init_register_cache, regcache_cpy): Declare.
12046 (regcache_read_pc, regcache_write_pc): Declare.
12047 (register_cache_size): Declare.
12048 (supply_regblock): Declare.
12049 * regcache.c (init_register_cache): New.
12050 (new_register_cache): Use it.
12051 (regcache_cpy): New.
12052 (register_cache_size): New.
12053 (supply_regblock): New.
12054 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 12055
219f2f23
PA
12056 * tracepoint.c: New.
12057
12058 * Makefile.in (OBS): Add tracepoint.o.
12059 (tracepoint.o): New rule.
12060
3a13a53b
L
120612010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12062
12063 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12064 (i386-mmx.o): New.
12065 (i386-mmx.c): Likewise.
12066 (i386-mmx-linux.o): Likewise.
12067 (i386-mmx-linux.c): Likewise.
12068
12069 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12070 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12071 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12072 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12073
12074 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12075 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12076 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12077
1570b33e
L
120782010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12079
12080 * Makefile.in (clean): Updated.
12081 (i386-avx.o): New.
12082 (i386-avx.c): Likewise.
12083 (i386-avx-linux.o): Likewise.
12084 (i386-avx-linux.c): Likewise.
12085 (amd64-avx.o): Likewise.
12086 (amd64-avx.c): Likewise.
12087 (amd64-avx-linux.o): Likewise.
12088 (amd64-avx-linux.c): Likewise.
12089
12090 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12091 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12092 (srv_amd64_regobj): Add amd64-avx.o.
12093 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12094 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12095 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12096 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12097 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12098 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12099 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12100
12101 * i387-fp.c: Include "i386-xstate.h".
12102 (i387_xsave): New.
12103 (i387_cache_to_xsave): Likewise.
12104 (i387_xsave_to_cache): Likewise.
12105 (x86_xcr0): Likewise.
12106
12107 * i387-fp.h (i387_cache_to_xsave): Likewise.
12108 (i387_xsave_to_cache): Likewise.
12109 (x86_xcr0): Likewise.
12110
12111 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12112 * linux-crisv32-low.c (target_regsets): Likewise.
12113 * linux-m68k-low.c (target_regsets): Likewise.
12114 * linux-mips-low.c (target_regsets): Likewise.
12115 * linux-ppc-low.c (target_regsets): Likewise.
12116 * linux-s390-low.c (target_regsets): Likewise.
12117 * linux-sh-low.c (target_regsets): Likewise.
12118 * linux-sparc-low.c (target_regsets): Likewise.
12119 * linux-xtensa-low.c (target_regsets): Likewise.
12120
12121 * linux-low.c: Include <sys/uio.h>.
12122 (regsets_fetch_inferior_registers): Support nt_type.
12123 (regsets_store_inferior_registers): Likewise.
12124 (linux_process_qsupported): New.
12125 (linux_target_ops): Add linux_process_qsupported.
12126
12127 * linux-low.h (regset_info): Add nt_type.
12128 (linux_target_ops): Add process_qsupported.
12129
12130 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12131 and <sys/uio.h>.
12132 (init_registers_i386_avx_linux): New.
12133 (init_registers_amd64_avx_linux): Likewise.
12134 (xmltarget_i386_linux_no_xml): Likewise.
12135 (xmltarget_amd64_linux_no_xml): Likewise.
12136 (PTRACE_GETREGSET): Likewise.
12137 (PTRACE_SETREGSET): Likewise.
12138 (x86_fill_xstateregset): Likewise.
12139 (x86_store_xstateregset): Likewise.
12140 (use_xml): Likewise.
12141 (x86_linux_update_xmltarget): Likewise.
12142 (x86_linux_process_qsupported): Likewise.
12143 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12144 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12145 init_registers_i386_linux here. Call
12146 x86_linux_update_xmltarget.
12147 (the_low_target): Add x86_linux_process_qsupported.
12148
12149 * server.c (handle_query): Call target_process_qsupported.
12150
12151 * target.h (target_ops): Add process_qsupported.
12152 (target_process_qsupported): New.
12153
fc7238bb
PA
121542010-04-03 Pedro Alves <pedro@codesourcery.com>
12155
12156 * inferiors.c (add_thread): Set last_status kind to
12157 TARGET_WAITKIND_IGNORE.
12158 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12159 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12160 (linux_wait_1): Move `thread' local definition to block that uses
12161 it. Don't NULL initialize `event_child'.
12162 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12163 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12164 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12165
bdabb078
PA
121662010-04-01 Pedro Alves <pedro@codesourcery.com>
12167
12168 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12169 an extended waitstatus, or by a watchpoint.
12170 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12171 thread was stepping or has been stopped by a watchpoint.
12172
d3bbe7a0
PA
121732010-04-01 Pedro Alves <pedro@codesourcery.com>
12174
12175 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12176 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12177 of another, then delete the previous, and validate all
12178 breakpoints.
12179 (validate_inserted_breakpoint): New.
12180 (delete_disabled_breakpoints): New.
12181 (validate_breakpoints): New.
12182 (check_mem_read): Validate breakpoints before trusting their
12183 shadow. Delete disabled breakpoints.
12184 (check_mem_write): Validate breakpoints before trusting they
12185 should be inserted. Delete disabled breakpoints.
12186 * mem-break.h (validate_breakpoints):
12187 * server.c (handle_query): Validate breakpoints when we see a
12188 qSymbol query.
12189
8b07ae33
PA
121902010-04-01 Pedro Alves <pedro@codesourcery.com>
12191
12192 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12193 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12194 if we could tell there's a GDB breakpoint at stop_pc.
12195 (need_step_over_p): Don't do a step over if we find a GDB
12196 breakpoint at the resume PC.
12197
12198 * mem-break.c (struct raw_breakpoint): New.
12199 (enum bkpt_type): New type `gdb_breakpoint'.
12200 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12201 fields. New field `raw'.
12202 (find_raw_breakpoint_at): New.
12203 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12204 breakpoint instead.
12205 (set_breakpoint_at): Adjust.
12206 (delete_raw_breakpoint): New.
12207 (release_breakpoint): New.
12208 (delete_breakpoint): Rename to...
12209 (delete_breakpoint_1): ... this. Add proc parameter. Use
12210 release_breakpoint. Return ENOENT.
12211 (delete_breakpoint): Reimplement.
12212 (find_breakpoint_at): Delete.
12213 (find_gdb_breakpoint_at): New.
12214 (delete_breakpoint_at): Delete.
12215 (set_gdb_breakpoint_at): New.
12216 (delete_gdb_breakpoint_at): New.
12217 (gdb_breakpoint_here): New.
12218 (set_reinsert_breakpoint): Use release_breakpoint.
12219 (uninsert_breakpoint): Rename to ...
12220 (uninsert_raw_breakpoint): ... this.
12221 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12222 (reinsert_raw_breakpoint): Change parameter type to
12223 raw_breakpoint.
12224 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12225 instead.
12226 (check_breakpoints): Adjust. Use release_breakpoint.
12227 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12228 (breakpoint_inserted_here): Ditto.
12229 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12230 Don't trust the breakpoint's shadow if it is not inserted.
12231 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12232 (delete_all_breakpoints): Adjust.
12233 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12234 use delete_breakpoint_1.
12235
12236 * mem-break.h (breakpoints_supported): Delete declaration.
12237 (set_gdb_breakpoint_at): Declare.
12238 (gdb_breakpoint_here): Declare.
12239 (delete_breakpoint_at): Delete.
12240 (delete_gdb_breakpoint_at): Declare.
12241
12242 * server.h (struct raw_breakpoint): Forward declare.
12243 (struct process_info): New field `raw_breakpoints'.
12244
12245 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12246 breakpoints.
12247
6bf5e0ba
PA
122482010-03-24 Pedro Alves <pedro@codesourcery.com>
12249
12250 * linux-low.c (status_pending_p_callback): Fix comment.
12251 (linux_wait_for_event_1): Move most of the internal breakpoint
12252 handling from here...
12253 (linux_wait_1): ... to here.
12254 (count_events_callback): New.
12255 (select_singlestep_lwp_callback): New.
12256 (select_event_lwp_callback): New.
12257 (cancel_breakpoints_callback): New.
12258 (select_event_lwp): New.
12259 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12260 priority to all LWPs that have had events that should be reported
12261 to the client. Cancel breakpoints when about to reporting the
12262 event to the client, not while stopping lwps. No longer cancel
12263 finished single-steps here.
12264 (cancel_finished_single_step): Delete.
12265 (cancel_finished_single_steps): Delete.
12266
414a389f
PA
122672010-03-24 Pedro Alves <pedro@codesourcery.com>
12268
12269 * mem-break.c (enum bkpt_type): New.
12270 (struct breakpoint): New field `type'.
12271 (set_breakpoint_at): Change return type to struct breakpoint
12272 pointer. Set type to `other_breakpoint' by default.
12273 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12274 in the breakpoint list.
12275 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12276 (reinsert_breakpoint): Rename to ...
12277 (reinsert_raw_breakpoint): ... this.
12278 (reinsert_breakpoints_at): Adjust.
12279 * mem-break.h (struct breakpoint): Declare.
12280 (set_breakpoint_at): Change return type to struct breakpoint
12281 pointer.
12282
2280c721
PA
122832010-03-24 Pedro Alves <pedro@codesourcery.com>
12284
12285 * server.c (handle_query): Assign, not compare.
12286
d50171e4
PA
122872010-03-24 Pedro Alves <pedro@codesourcery.com>
12288
12289 Teach linux gdbserver to step-over-breakpoints.
12290
12291 * linux-low.c (can_hardware_single_step): New.
12292 (supports_breakpoints): New.
12293 (handle_extended_wait): If stopping threads, read the stop pc of
12294 the new cloned LWP.
12295 (get_pc): New.
12296 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12297 low target doesn't support retrieving the PC.
12298 (add_lwp): Set last_resume_kind to resume_continue.
12299 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12300 (linux_attach): Don't clear stop_expected. Set the lwp's
12301 last_resume_kind to resume_stop.
12302 (linux_detach_one_lwp): Don't check for removed breakpoints.
12303 (check_removed_breakpoint): Delete.
12304 (status_pending_p): Rename to ...
12305 (status_pending_p_callback): ... this. Don't check for removed
12306 breakpoints. Don't consider threads that are stopped from GDB's
12307 perspective.
12308 (linux_wait_for_lwp): Always read the stop_pc here.
12309 (cancel_breakpoint): New.
12310 (step_over_bkpt): New global.
12311 (linux_wait_for_event_1): Implement stepping over breakpoints.
12312 (gdb_wants_lwp_stopped): New.
12313 (gdb_wants_all_stopped): New.
12314 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12315 single-step traps here. Store the thread's last reported target
12316 wait status.
12317 (send_sigstop): Don't clear stop_expected. Always set it,
12318 instead.
12319 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12320 (cancel_finished_single_step): New.
12321 (cancel_finished_single_steps): New.
12322 (wait_for_sigstop): Don't cancel finished single-step traps here.
12323 (linux_resume_one_lwp): Don't check for removed breakpoints.
12324 Don't set `step' on non-hardware step archs.
12325 (linux_set_resume_request): Ignore resume_stop requests if already
12326 stopping or stopped. Set the lwp's last_resume_kind.
12327 (resume_status_pending_p): Don't check for removed breakpoints.
12328 (need_step_over_p): New.
12329 (start_step_over): New.
12330 (finish_step_over): New.
12331 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12332 requests. Clear the thread's last reported target waitstatus.
12333 Don't use the `suspended' flag. Don't consider pending breakpoints.
12334 (linux_resume): Start a step-over if necessary.
12335 (proceed_one_lwp): New.
12336 (proceed_all_lwps): New.
12337 (unstop_all_lwps): New.
12338 * linux-low.h (struct lwp_info): Rewrite comment for the
12339 `suspended' flag. Add the `stop_pc' field. Delete the
12340 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12341 Add `'last_resume_kind' and `need_step_over' fields.
12342 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12343 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12344 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12345 (set_raw_breakpoint_at): New.
12346 (set_breakpoint_at): Rewrite to use it.
12347 (reinsert_breakpoint_handler): Delete.
12348 (set_reinsert_breakpoint): New.
12349 (reinsert_breakpoint_by_bp): Delete.
12350 (delete_reinsert_breakpoints): New.
12351 (uninsert_breakpoint): Rewrite.
12352 (uninsert_breakpoints_at): New.
12353 (reinsert_breakpoint): Rewrite.
12354 (reinsert_breakpoints_at): New.
12355 (check_breakpoints): Rewrite.
12356 (breakpoint_here): New.
12357 (breakpoint_inserted_here): New.
12358 (check_mem_read): Adjust.
12359 * mem-break.h (breakpoints_supported, breakpoint_here)
12360 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12361 (reinsert_breakpoint_by_bp): Delete declaration.
12362 (delete_reinsert_breakpoints): Declare.
12363 (reinsert_breakpoint): Delete declaration.
12364 (reinsert_breakpoints_at): Declare.
12365 (uninsert_breakpoint): Delete declaration.
12366 (uninsert_breakpoints_at): Declare.
12367 (check_breakpoints): Adjust prototype.
12368 * server.h: Adjust include order.
12369 (struct thread_info): Declare here. Add a `last_status' field.
12370
30ba68cb
MS
123712010-03-23 Michael Snyder <msnyder@vmware.com>
12372
12373 * server.c (crc32): New function.
12374 (handle_query): Add handling for 'qCRC:' request.
12375
b9a881c2
PA
123762010-03-23 Pedro Alves <pedro@codesourcery.com>
12377
12378 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12379 lwp had been stopped by a watchpoint.
12380
e92d13d5
PA
123812010-03-16 Pedro Alves <pedro@codesourcery.com>
12382
12383 * server.h (internal_error): Declare.
12384 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12385 * utils.c (internal_error): New function.
12386
64daa791
AS
123872010-03-15 Andreas Schwab <schwab@redhat.com>
12388
12389 * configure.srv: Fix typo setting srv_regobj.
12390
f52cd8cd
PA
123912010-03-15 Pedro Alves <pedro@codesourcery.com>
12392
12393 * linux-low.c (fetch_register): Avoid passing a non string literal
12394 format to `error'.
12395 (usr_store_inferior_registers): Ditto.
12396
93ae6fdc
PA
123972010-03-14 Pedro Alves <pedro@codesourcery.com>
12398
12399 * linux-low.c (linux_write_memory): Bail out early if peeking
12400 memory failed.
12401
c3adc08c
PA
124022010-03-14 Pedro Alves <pedro@codesourcery.com>
12403
12404 * linux-low.h (struct lwp_info): New fields
12405 `stopped_by_watchpoint' and `stopped_data_address'.
12406 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12407 here, and cache them in the lwp object.
12408 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12409 directly.
12410 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12411 field.
12412 (linux_stopped_by_watchpoint): Rewrite.
12413 (linux_stopped_data_address): Rewrite.
12414
bce522a2
PA
124152010-03-06 Simo Melenius <simo.melenius@iki.fi>
12416
12417 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12418 switching the current inferior, not before.
12419
90884b2b
L
124202010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12421
12422 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12423 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12424 i386-linux.c and amd64-linux.c.
12425 (reg-i386.o): Removed.
12426 (reg-i386.c): Likewise.
12427 (reg-i386-linux.o): Likewise.
12428 (reg-i386-linux.c): Likewise.
12429 (reg-x86-64.o): Likewise.
12430 (reg-x86-64.c): Likewise.
12431 (reg-x86-64-linux.o): Likewise.
12432 (reg-x86-64-linux.c): Likewise.
12433 (i386.o): New.
12434 (i386.c): Likewise.
12435 (i386-linux.o): Likewise.
12436 (i386-linux.c): Likewise.
12437 (amd64.o): Likewise.
12438 (amd64.c): Likewise.
12439 (amd64-linux.o): Likewise.
12440 (amd64-linux.c): Likewise.
12441
12442 * configure.srv (srv_i386_regobj): New.
12443 (srv_i386_linux_regobj): Likewise.
12444 (srv_amd64_regobj): Likewise.
12445 (srv_amd64_linux_regobj): Likewise.
12446 (srv_i386_32bit_xmlfiles): Likewise.
12447 (srv_i386_64bit_xmlfiles): Likewise.
12448 (srv_i386_xmlfiles): Likewise.
12449 (srv_amd64_xmlfiles): Likewise.
12450 (srv_i386_linux_xmlfiles): Likewise.
12451 (srv_amd64_linux_xmlfiles): Likewise.
12452 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12453 srv_xmlfiles to $srv_i386_xmlfiles.
12454 (i[34567]86-*-mingw32ce*): Likewise.
12455 (i[34567]86-*-mingw*): Likewise.
12456 (i[34567]86-*-nto*): Likewise.
12457 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12458 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12459 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12460 (x86_64-*-linux*): Likewise.
12461
12462 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12463 (init_registers_amd64_linux): New.
12464 (x86_arch_setup): Replace init_registers_x86_64_linux with
12465 init_registers_amd64_linux.
12466
193f13e6
MK
124672010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12468
12469 * configure.ac: Check for libdl. If it is not available link against
12470 static libthread_db.
12471 * configure: Regenerate.
12472
85d721b8
PA
124732010-02-22 Pedro Alves <pedro@codesourcery.com>
12474
12475 PR9605
12476
12477 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12478 handing a read watchpoint.
12479 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12480
6076632b
DE
124812010-02-12 Doug Evans <dje@google.com>
12482
12483 * linux-low.c (linux_supports_tracefork_flag): Document.
12484 (linux_look_up_symbols): Add comment.
12485
3327ccf7
L
124862010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12487
12488 * regcache.c (supply_register): Clear regcache if buf is NULL.
12489
0718675c 124902010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 12491 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
12492
12493 * inferiors.c (find_inferior): Add function documentation.
12494 (unloaded_dll): Handle the case where the unloaded dll has not
12495 been previously registered in the dll list.
12496
177321bd
DJ
124972010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12498
12499 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12500 (thumb2_breakpoint): New.
12501 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12502
2b009048
DJ
125032010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12504
12505 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12506 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12507 breakpoints.
12508
3be029c7
PA
125092010-01-21 Pedro Alves <pedro@codesourcery.com>
12510
12511 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12512
18f5de3b
JK
125132010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12514
12515 * linux-s390-low.c (s390_collect_ptrace_register)
12516 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12517
3743bb4f
DE
125182010-01-21 Doug Evans <dje@google.com>
12519
14ce3065
DE
12520 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12521 (PTRACE_ARG4_TYPE): New macro.
12522 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12523 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12524 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12525 (usr_store_inferior_registers): Ditto.
12526 (linux_read_memory, linux_write_memory): Ditto.
12527 (linux_test_for_tracefork): Ditto.
12528
3743bb4f
DE
12529 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12530 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12531
8b315be5
PA
125322010-01-21 Pedro Alves <pedro@codesourcery.com>
12533
12534 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12535 target.
12536
85492558
PA
125372010-01-21 Pedro Alves <pedro@codesourcery.com>
12538
12539 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12540 prototype to take a regcache. Adjust.
12541
442ea881
PA
125422010-01-20 Pedro Alves <pedro@codesourcery.com>
12543
12544 * regcache.h (struct thread_info): Forward declare.
12545 (struct regcache): New.
12546 (new_register_cache): Adjust prototype.
12547 (get_thread_regcache): Declare.
12548 (free_register_cache): Adjust prototype.
12549 (registers_to_string, registers_from_string): Ditto.
12550 (supply_register, supply_register_by_name, collect_register)
12551 (collect_register_as_string, collect_register_by_name): Ditto.
12552 * regcache.c (struct inferior_regcache_data): Delete.
12553 (get_regcache): Rename to ...
12554 (get_thread_regcache): ... this. Adjust. Switch inferior before
12555 fetching registers.
12556 (regcache_invalidate_one): Adjust.
12557 (regcache_invalidate): Fix prototype.
12558 (new_register_cache): Return the new register cache.
12559 (free_register_cache): Change prototype.
12560 (realloc_register_cache): Adjust.
12561 (registers_to_string): Change prototype to take a regcache. Adjust.
12562 (registers_from_string): Ditto.
12563 (register_data): Ditto.
12564 (supply_register): Ditto.
12565 (supply_register_by_name): Ditto.
12566 (collect_register): Ditto.
12567 (collect_register_as_string): Ditto.
12568 (collect_register_by_name): Ditto.
12569 * server.c (process_serial_event): Adjust.
12570 * linux-low.h (regset_fill_func, regset_store_func): Change
12571 prototype.
12572 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12573 Change prototype.
12574 * linux-low.c (get_stop_pc): Adjust.
12575 (check_removed_breakpoint): Adjust.
12576 (linux_wait_for_event): Adjust.
12577 (linux_resume_one_lwp): Adjust.
12578 (fetch_register): Add regcache parameter. Adjust.
12579 (usr_store_inferior_registers): Ditto.
12580 (regsets_fetch_inferior_registers): Ditto.
12581 (regsets_store_inferior_registers): Ditto.
12582 (linux_fetch_registers, linux_store_registers): Ditto.
12583 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12584 regcache. Adjust.
43aaf8b6
PA
12585 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12586 Ditto.
442ea881
PA
12587 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12588 prototype to take a regcache.
12589 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12590 * remote-utils.c (convert_ascii_to_int, outreg)
12591 (prepare_resume_reply): Change prototype to take a regcache.
12592 Adjust.
12593 * target.h (struct target_ops) <fetch_registers, store_registers>:
12594 Change prototype to take a regcache.
12595 (fetch_inferior_registers, store_inferior_registers): Change
12596 prototype to take a regcache. Adjust.
12597 * proc-service.c (ps_lgetregs): Adjust.
12598 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12599 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12600 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12601 take a regcache. Adjust.
12602 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12603 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12604 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12605 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12606 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12607 (cris_cannot_fetch_register):
12608 (cris_breakpoint_at): Change prototype to take a regcache.
12609 Adjust.
12610 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12611 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12612 to take a regcache. Adjust.
12613 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12614 Adjust.
12615 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12616 take a regcache. Adjust.
12617 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12618 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12619 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12620 * linux-mips-low.c (mips_get_pc):
12621 (mips_set_pc): Change prototype to take a regcache. Adjust.
12622 (mips_reinsert_addr): Adjust.
12623 (mips_collect_register): Change prototype to take a regcache.
12624 Adjust.
12625 (mips_supply_register):
12626 (mips_collect_register_32bit, mips_supply_register_32bit)
12627 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12628 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12629 * linux-ppc-low.c (ppc_supply_ptrace_register)
12630 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12631 (parse_spufs_run): Adjust.
12632 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12633 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12634 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12635 take a regcache. Adjust.
12636 * linux-s390-low.c (s390_collect_ptrace_register)
12637 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12638 (s390_set_pc): Change prototype to take a regcache. Adjust.
12639 (s390_arch_setup): Adjust.
12640 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12641 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12642 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12643 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12644 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12645 regcache. Adjust.
12646 (sparc_breakpoint_at): Adjust.
12647 * linux-xtensa-low.c (xtensa_fill_gregset):
12648 (xtensa_store_gregset):
12649 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12650 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12651 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12652 prototype to take a regcache. Adjust.
12653 * win32-arm-low.c (arm_fetch_inferior_register)
12654 (arm_store_inferior_register): Change prototype to take a
12655 regcache. Adjust.
12656 * win32-i386-low.c (i386_fetch_inferior_register)
12657 (i386_store_inferior_register): Change prototype to take a
12658 regcache. Adjust.
12659 * win32-low.c (child_fetch_inferior_registers)
12660 (child_store_inferior_registers): Change prototype to take a
12661 regcache. Adjust.
12662 (win32_wait): Adjust.
12663 (win32_fetch_inferior_registers): Change prototype to take a
12664 regcache. Adjust.
12665 (win32_store_inferior_registers): Adjust.
12666 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12667 store_inferior_register>: Change prototype to take a regcache.
12668
60c3d7b0
DE
126692010-01-20 Doug Evans <dje@google.com>
12670
12671 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12672 #ifdef.
12673 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12674 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12675
dc146f7c
VP
126762010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12677
12678 * linux-low.c (linux_core_of_thread): New.
12679 (compare_ints, show_process, list_threads): New.
12680 (linux_qxfer_osdata): Report threads and cores.
12681 (linux_target_op): Register linux_core_of_thread.
12682 * remote-utils.c (prepare_resume_reply): Report the core.
12683 (buffer_xml_printf): Support %d specifier.
12684 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12685 New.
12686 (handle_query): Handle qXfer:threads. Announce availability
12687 thereof.
12688 * target.h (struct target_ops): New field core_of_thread.
12689
7803799a
UW
126902010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12691
12692 * Makefile.in (clean): Remove new generated files.
12693 (reg-s390.o, reg-s390.c): Remove rules.
12694 (reg-s390x.o, reg-s390x.c): Likewise.
12695 (s390-linux32.o, s390-linux32.c): Add rules.
12696 (s390-linux64.o, s390-linux64.c): Likewise.
12697 (s390x-linux64.o, s390x-linux64.c): Likewise.
12698 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12699 * linux-s390-low.c: Include <elf.h>.
12700 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12701 (init_registers_s390): Remove prototype.
12702 (init_registers_s390x): Likewise.
12703 (init_registers_s390_linux32): Add prototype.
12704 (init_registers_s390_linux64): Likewise.
12705 (init_registers_s390x_linux64): Likewise.
12706 (s390_num_regs_3264): New define.
12707 (s390_regmap_3264): New global variable.
12708 (s390_cannot_fetch_register): Remove obsolete check.
12709 (s390_cannot_store_register): Likewise.
12710 (s390_collect_ptrace_register): Handle upper/lower register halves.
12711 (s390_supply_ptrace_register): Likewise.
12712 (s390_fill_gregset): Update to register number changes.
12713 (s390_get_hwcap): New routine.
12714 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12715 Install appropriate regmap and register set.
12716
6e7ffa39
JB
127172010-01-01 Joel Brobecker <brobecker@adacore.com>
12718
12719 * server.c (gdbserver_version): Update copyright year to 2010.
12720 * gdbreplay.c (gdbreplay_version): Likewise.
12721
957f3f49
DE
127222009-12-28 Doug Evans <dje@google.com>
12723
12724 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12725 elf/external.h. Include <elf.h> instead but only if necessary.
12726
ca5c370d
PA
127272009-12-28 Pedro Alves <pedro@codesourcery.com>
12728
12729 * linux-low.c (linux_remove_process): Remove `detaching'
12730 parameter. Don't release/detach from thread_db here.
12731 (linux_kill): Release/detach from thread_db here, ...
12732 (linux_detach): ... and here, before actually detaching.
12733 (linux_wait_1): ... and here, when a process exits.
12734 * thread-db.c (any_thread_of): New.
12735 (thread_db_free): Switch the current inferior to a thread of the
12736 passed in process.
12737
4ee62156
DE
127382009-12-21 Doug Evans <dje@google.com>
12739
d90e6a88
DE
12740 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12741
c5f62d5f
DE
12742 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12743 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12744 warning ifndef __NR_tkill. Move setting of errno there too.
12745 Delete unnecessary resetting of errno after syscall.
12746 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12747
10e86dd7
DE
12748 * configure.ac: Check for dladdr.
12749 * config.in: Regenerate.
12750 * configure: Regenerate.
12751 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12752 (try_thread_db_load): Update.
12753
4ee62156
DE
12754 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12755
00f515da
DE
127562009-12-18 Doug Evans <dje@google.com>
12757
e9464885
DE
12758 * event-loop.c: Include unistd.h if it exists.
12759
07d4f67e
DE
12760 * linux-low.c (my_waitpid): Move definition away from being in
12761 between linux_tracefork_child/linux_test_for_tracefork.
12762
00f515da
DE
12763 * gdb_proc_service.h (psaddr_t): Fix type.
12764 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12765 signature to match glibc.
12766
1de1badb
DE
127672009-12-16 Doug Evans <dje@google.com>
12768
12769 * linux-low.c (linux_read_memory): Fix argument to read.
12770
aeeb81d1
PA
127712009-11-26 Pedro Alves <pedro@codesourcery.com>
12772
12773 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12774 events, don't leave current_inferior pointing at null.
12775
10357975
PA
127762009-11-26 Pedro Alves <pedro@codesourcery.com>
12777
12778 * win32-low.c (LOG): Delete.
12779 (OUTMSG): Output to stderr.
12780 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12781 on compile time LOG macro.
12782 (win32_wait): Fix debug output.
12783
cf6e3471
PA
127842009-11-26 Pedro Alves <pedro@codesourcery.com>
12785
12786 * win32-low.c (win32_add_one_solib): If the dll name is
12787 "ntdll.dll", prepend the system directory to the dll path.
12788
0c85e18e
MK
127892009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12790
12791 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12792
9ac544ce 127932009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12794 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12795
12796 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12797 * configure.ac: Check for __mcoldfire__ and set
12798 gdb_cv_m68k_is_coldfire.
12799 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12800 reg-cf.o and reg-m68k.o.
12801 * configure: Regenerated.
12802
fd7dd3e6
PA
128032009-11-16 Pedro Alves <pedro@codesourcery.com>
12804
12805 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12806 Pass it to thread_db_free.
12807 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12808 proper `detaching' argument to linux_remove_process.
12809 * linux-low.h (thread_db_free): Add `detaching' parameter.
12810 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12811 to thread_db_free.
12812 (thread_db_free): Add `detaching' parameter. Only
12813 call td_ta_clear_event if detaching from process.
12814
75aa492e
MK
128152009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12816
12817 * thread-db.c (thread_db_free): Fix typo.
12818
21e1bee4
PP
128192009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12820
12821 PR gdb/10838
12822 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12823
8838b45e
NS
128242009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12825
12826 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12827 with an i686 compiler.
12828 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12829 needed.
12830 * configure: Rebuilt.
12831
8a35fb51
SL
128322009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12833
12834 PR gdb/10783
12835
12836 * server.c (handle_search_memory_1): Correct read_addr initialization
12837 in loop for searching subsequent chunks.
12838
96f15937
PP
128392009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12840
12841 * configure.ac: New --with-libthread-db option.
12842 * thread-db.c: Allow direct dependence on libthread_db.
12843 (thread_db_free): Adjust.
12844 * config.in: Regenerate.
12845 * configure: Likewise.
889bf7c5 12846
5f7d1694
PP
128472009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12848
12849 PR gdb/10757
12850 * thread-db.c (attach_thread): New function.
12851 (maybe_attach_thread): Return success/failure.
12852 (find_new_threads_callback): Adjust.
889bf7c5
PA
12853 (thread_db_find_new_threads): Loop until no new threads.
12854
88e3b899
PA
128552009-10-13 Pedro Alves <pedro@codesourcery.com>
12856
12857 * proc-service.c (ps_lgetregs): Formatting.
12858
cdbfd419
PP
128592009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12860
12861 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12862 * configure.ac: Adjust.
12863 * linux-low.h (struct process_info_private): Move members to struct
12864 thread_db.
12865 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12866 * linux-low.c (linux_remove_process): Adjust.
12867 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12868 * server.c (handle_query): Move code ...
12869 (handle_monitor_command): ... here. New function.
12870 * target.h (struct target_ops): New member.
12871 * thread-db.c (struct thread_db): New.
12872 (libthread_db_search_path): New variable.
12873 (thread_db_create_event, thread_db_enable_reporting)
12874 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12875 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12876 (try_thread_db_load_1, dladdr_to_soname): New functions.
12877 (try_thread_db_load, thread_db_load_search): New functions.
12878 (thread_db_init): Search for libthread_db.
12879 (thread_db_free): New function.
12880 (thread_db_handle_monitor_command): Likewise.
12881 * config.in: Regenerate.
12882 * configure: Regenerate.
889bf7c5 12883
4168d2d6
UW
128842009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12885
12886 * spu-low.c (spu_kill): Wait for inferior to terminate.
12887 Call clear_inferiors.
12888 (spu_detach): Call clear_inferiors.
12889
81ecdfbb
RW
128902009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12891
12892 * aclocal.m4: Regenerate.
12893 * config.in: Likewise.
12894 * configure: Likewise.
12895
0b9ff2c0
UW
128962009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12897
12898 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12899 (parse_spufs_run): New function.
12900 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12901 (ppc_breakpoint_at): Handle SPU breakpoints.
12902
efcbbd14
UW
129032009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12904
12905 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12906 (SPUFS_MAGIC): Define.
12907 (spu_enumerate_spu_ids): New function.
12908 (linux_qxfer_spu): New function.
12909 (linux_target_ops): Install linux_qxfer_spu.
12910
f4d9bade
UW
129112009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12912
12913 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12914 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12915 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12916 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12917 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12918 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12919 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12920 (init_registers_powerpc_cell32l): Add prototype.
12921 (init_registers_powerpc_cell64l): Likewise.
12922 (ppc_arch_setup): Detect Cell/B.E. architecture.
12923
96e946ca
RW
129242009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12925
12926 * Makefile.in (datarootdir): New variable.
12927
58d6951d
DJ
129282009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12929
12930 * linux-low.c (linux_write_memory): Update debugging output.
12931 * Makefile.in (clean): Add new descriptions.
12932 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12933 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12934 * configure.srv: Add new files for arm*-*-linux*.
12935 * linux-arm-low.c: Add new declarations.
12936 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12937 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12938 (HWCAP_VFPv3D16): New.
12939 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12940 instead of __IWMMXT__.
12941 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12942 (arm_arch_setup): New.
12943 (target_regsets): Remove #ifdef. Add VFP regset.
12944 (the_low_target): Use arm_arch_setup.
12945
12b42a12
DJ
129462009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12947
12948 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12949 the main thread again.
12950
ac8c974e
AR
129512009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12952
12953 Adding Neutrino gdbserver.
12954 * configure: Regenerated.
12955 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12956 * configure.srv (i[34567]86-*-nto*): New target.
12957 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12958 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12959 (nto_comctrl) [__QNX__]: New function.
12960 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12961
4424e0c3 129622009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12963
12964 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12965 srv_tgtobj.
12966
912cf4ba
PA
129672009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12968 Pedro Alves <pedro@codesourcery.com>
12969
12970 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12971 don't support CONTEXT_EXTENDED_REGISTERS.
12972 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12973 (the_low_target): Install them.
12974 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12975 failing with ERROR_PIPE_NOT_CONNECTED.
12976
aa5ca48f
DE
129772009-06-30 Doug Evans <dje@google.com>
12978 Pierre Muller <muller@ics.u-strasbg.fr>
12979
12980 Add h/w watchpoint support to x86-linux, win32-i386.
12981 * Makefile.in (SFILES): Add i386-low.c
12982 (i386_low_h): Define.
12983 (i386-low.o): Add dependencies.
12984 (linux-x86-low.o): Add i386-low.h dependency.
12985 (win32-i386-low.o): Ditto.
12986 * i386-low.c: New file.
12987 * i386-low.h: New file.
12988 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12989 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12990 * linux-low.c (linux_add_process): Initialize arch_private.
12991 (linux_remove_process): Free arch_private.
12992 (add_lwp): Initialize arch_private.
12993 (delete_lwp): Free arch_private.
12994 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12995 provided.
12996 * linux-low.h (process_info_private): New member arch_private.
12997 (lwp_info): New member arch_private.
12998 (linux_target_ops): New members new_process, new_thread,
12999 prepare_to_resume.
13000 (ptid_of): New macro.
13001 * linux-x86-low.c: Include stddef.h, i386-low.h.
13002 (arch_process_info): New struct.
13003 (arch_lwp_info): New struct.
13004 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13005 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13006 (i386_dr_low_get_status): New function.
13007 (x86_insert_point, x86_remove_point): New functions.
13008 (x86_stopped_by_watchpoint): New function.
13009 (x86_stopped_data_address): New function.
13010 (x86_linux_new_process, x86_linux_new_thread): New functions.
13011 (x86_linux_prepare_to_resume): New function.
13012 (the_low_target): Add entries for insert_point, remove_point,
13013 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13014 prepare_to_resume.
13015 * server.c (debug_hw_points): New global.
13016 (monitor_show_help): Document set debug-hw-points.
13017 (handle_query): Process "set debug-hw-points".
13018 * server.h (debug_hw_points): Declare.
13019 (paddress): Declare.
13020 * utils.c (NUMCELLS, CELLSIZE): New macros.
13021 (get_sell, xsnprintf, paddress): New functions.
13022 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13023 remove_point, stopped_by_watchpoint, stopped_data_address.
13024 * win32-i386-low.c: Include i386-low.h.
13025 (debug_reg_state): Replaces dr.
13026 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13027 (i386_dr_low_get_status): New function.
13028 (i386_insert_point, i386_remove_point): New functions.
13029 (i386_stopped_by_watchpoint): New function.
13030 (i386_stopped_data_address): New function.
13031 (i386_initial_stuff): Update.
13032 (get_thread_context,set_thread_context,i386_thread_added): Update.
13033 (the_low_target): Add entries for insert_point,
13034 remove_point, stopped_by_watchpoint, stopped_data_address.
13035 * win32-low.c (win32_insert_watchpoint): New function.
13036 (win32_remove_watchpoint): New function.
13037 (win32_stopped_by_watchpoint): New function.
13038 (win32_stopped_data_address): New function.
13039 (win32_target_ops): Add entries for insert_watchpoint,
13040 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13041 * win32-low.h (win32_target_ops): New members insert_point,
13042 remove_point, stopped_by_watchpoint, stopped_data_address.
13043
d993e290
PA
130442009-06-25 Pedro Alves <pedro@codesourcery.com>
13045
13046 * server.c (process_serial_event): Re-return unsupported, not
13047 error, if the type isn't recognized. Re-allow supporting only
13048 insert or remove packets. Also call require_running for
13049 breakpoints. Add missing break statement to default case. Tidy.
13050 * target.h (struct target_ops): Rename insert_watchpoint to
13051 insert_point, and remove_watchpoint to remove_point.
13052
13053 * linux-low.h (struct linux_target_ops): Likewise.
13054 * linux-low.c (linux_insert_watchpoint): Rename to ...
13055 (linux_insert_point): ... this. Adjust.
13056 (linux_remove_watchpoint): Rename to ...
13057 (linux_remove_point): ... this. Adjust.
13058 (linux_target_ops): Adjust.
13059 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13060 (cris_insert_point): ... this.
13061 (cris_remove_watchpoint): Rename to ...
13062 (cris_remove_point): ... this.
13063 (the_low_target): Adjust.
13064
0f54c268
PM
130652009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13066
13067 * server.c (handle_v_kill): Pass signal_pid to
13068 kill_inferior if multi_process is zero.
13069
c6314022
AR
130702009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13071
13072 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13073 * target.h (target_ops): Comment for *_watchpoint to make it clear
13074 the functions can get types '0' and '1'.
13075
4463ce24
AR
130762009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13077
13078 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13079 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13080 * regcache.c (get_regcache): Likewise.
13081 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13082 * win32-low.c (child_fetch_inferior_registers): Remove check for
13083 regno 0.
13084
cf8fd78b
PA
130852009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13086 Pedro Alves <pedro@codesourcery.com>
13087
13088 * target.h (struct target_ops) <supports_multi_process>: New
13089 callback.
13090 (target_supports_multi_process): New.
13091 * server.c (handle_query): Even if GDB reports support, only
13092 enable multi-process if the target also supports it. Report
13093 multi-process support only if the target backend supports it.
13094 * linux-low.c (linux_supports_multi_process): New function.
13095 (linux_target_ops): Install it as target_supports_multi_process
13096 callback.
13097
47c0c975
DE
130982009-05-24 Doug Evans <dje@google.com>
13099
e09875d4
DE
13100 Global renaming of find_thread_pid to find_thread_ptid.
13101 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13102 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13103 All callers updated.
13104
e27d73f6
DE
13105 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13106 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13107 directly.
13108
47c0c975
DE
13109 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13110 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13111 (linux_resume_one_lwp): Ditto.
13112
2acc282a
DE
131132009-05-23 Doug Evans <dje@google.com>
13114
13115 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13116 from struct inferior_list_entry * to struct lwp_info *.
13117 All callers updated.
13118
9f1036c1
DE
131192009-05-13 Doug Evans <dje@google.com>
13120
13121 * linux-x86-low.c: Don't include assert.h.
13122 (x86_siginfo_fixup): Use fatal, not assert.
13123 (x86_arch_setup): Fix comment.
13124
d0722149
DE
131252009-05-12 Doug Evans <dje@google.com>
13126
13127 Biarch support for i386/amd64 gdbserver.
13128 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13129 Add linux-x86-low.c.
13130 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13131 (linux-x86-low.o): Add.
13132 * linux-x86-64-low.c: Delete.
13133 * linux-i386-low.c: Delete.
13134 * linux-x86-low.c: New file.
13135 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13136 linux-x86-low.o.
13137 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13138 linux-x86-low.o.
13139 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13140 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13141 (linux_child_pid_to_exec_file): New function.
13142 (elf_64_header_p, elf_64_file_p): New functions.
13143 (siginfo_fixup): New function.
13144 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13145 give target a chance to convert layout.
13146 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13147 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13148
fdeb2a12
DE
131492009-05-07 Doug Evans <dje@google.com>
13150
13151 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13152 (regsets_store_inferior_registers): Ditto.
13153
a6dbe5df
PA
131542009-05-06 Pedro Alves <pedro@codesourcery.com>
13155
13156 PR server/10048
13157
13158 * linux-low.c (must_set_ptrace_flags): Delete.
13159 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13160 of the global.
13161 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13162 `lwp->must_set_ptrace_flags' instead.
ba42693b 13163 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
13164 (linux_wait_1): ... not here.
13165
5091eb23
DE
131662009-04-30 Doug Evans <dje@google.com>
13167
9f767825
DE
13168 * inferiors.c (started_inferior_callback): New function.
13169 (attached_inferior_callback): New function.
13170 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13171 * server.c (print_started_pid, print_attached_pid): New functions.
13172 (detach_or_kill_for_exit): New function.
13173 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13174 * server.h (have_started_inferiors_p): Declare.
13175 (have_attached_inferiors_p): Declare.
13176
5091eb23
DE
13177 * inferiors.c (remove_process): Fix memory leak, free process.
13178 * linux-low.c (linux_remove_process): New function.
13179 (linux_kill): Call it instead of remove_process.
13180 (linux_detach, linux_wait_1): Ditto.
13181
155c8968
PA
131822009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13183
13184 * configure.srv: Add x86 Windows CE target.
13185
7fe519cb
UW
131862009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13187
13188 * inferiors.c (get_thread_process): Make global.
13189 * server.h (get_thread_process): Add prototype.
13190 * thread-db.c (find_one_thread): Use get_thread_process
13191 instead of current_process.
13192 (thread_db_get_tls_address): Do not crash if called when
13193 thread layer is not yet initialized.
13194
5472f405
UW
131952009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13196
13197 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13198 * spu-low.c (current_tid): Rename to ...
13199 (current_ptid): ... this.
13200 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13201 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13202 ptid_get_lwp (current_ptid) instead of current_tid.
13203 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13204 instead of current_tid. Use find_process_pid to verify pid
13205 argument is valid. Pass proper argument to remove_process.
13206 (spu_thread_alive): Compare current_ptid instead of current_tid.
13207 (spu_resume): Likewise.
13208
55ac2b99
PA
132092009-04-02 Pedro Alves <pedro@codesourcery.com>
13210
13211 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13212 variable.
13213
95954743
PA
132142009-04-01 Pedro Alves <pedro@codesourcery.com>
13215
13216 Implement the multiprocess extensions, and add linux multiprocess
13217 support.
13218
13219 * server.h (ULONGEST): Declare.
13220 (struct ptid, ptid_t): New.
13221 (minus_one_ptid, null_ptid): Declare.
13222 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13223 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13224 (struct inferior_list_entry): Change `id' type from unsigned from
13225 to ptid_t.
13226 (struct sym_cache, struct breakpoint, struct
13227 process_info_private): Forward declare.
13228 (struct process_info): Declare.
13229 (current_process): Declare.
13230 (all_processes): Declare.
13231 (initialize_inferiors): Declare.
13232 (add_thread): Adjust to use ptid_t.
13233 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13234 (add_process, remove_process, find_thread_pid): Declare.
13235 (find_inferior_id): Adjust to use ptid_t.
13236 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13237 (multi_process): Declare.
13238 (push_event): Adjust to use ptid_t.
13239 (read_ptid, write_ptid): Declare.
13240 (prepare_resume_reply): Adjust to use ptid_t.
13241 (clear_symbol_cache): Declare.
13242 * inferiors.c (all_processes): New.
13243 (null_ptid, minus_one_ptid): New.
13244 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13245 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13246 (add_thread): Change unsigned long to ptid. Remove gdb_id
13247 parameter. Adjust.
13248 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13249 (gdb_id_to_thread): Rename to ...
13250 (find_thread_pid): ... this. Change unsigned long to ptid.
13251 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13252 (loaded_dll, pull_pid_from_list): Adjust.
13253 (add_process, remove_process, find_process_pid)
13254 (get_thread_process, current_process, initialize_inferiors): New.
13255 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13256 (struct target_waitstatus) <related_pid>: Ditto.
13257 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13258 return type to int.
13259 (struct target_ops) <join>: Add `pid' argument.
13260 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13261 (struct target_ops) <wait>: Add `ptid' field. Change return type
13262 to ptid.
13263 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13264 (mywait): Add `ptid' argument. Change return type to ptid_t.
13265 (target_pid_to_str): Declare.
13266 * target.c (set_desired_inferior): Adjust to use ptids.
13267 (mywait): Add new `ptid' argument. Adjust.
13268 (target_pid_to_str): New.
13269 * mem-break.h (free_all_breakpoints): Declare.
13270 * mem-break.c (breakpoints): Delelete.
13271 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13272 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13273 to use per-process breakpoint list.
13274 (free_all_breakpoints): New.
13275 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13276 (symbol_cache, all_symbols_looked_up): Delete.
13277 (hexchars): New.
13278 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13279 read_ptid): New.
13280 (prepare_resume_reply): Change ptid argument's type from unsigned
13281 long to ptid_t. Adjust. Implement W;process and X;process.
13282 (free_sym_cache, clear_symbol_cache): New.
13283 (look_up_one_symbol): Adjust to per-process symbol cache. *
13284 * server.c (cont_thread, general_thread, step_thread): Change type
13285 to ptid_t.
13286 (attached): Delete.
13287 (multi_process): New.
13288 (last_ptid): Change type to ptid_t.
13289 (struct vstop_notif) <ptid>: Change type to ptid_t.
13290 (queue_stop_reply, push_event): Change `ptid' argument's type to
13291 ptid_t.
13292 (discard_queued_stop_replies): Add `pid' argument.
13293 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13294 changes. Don't reference the `attached' global.
13295 (attach_inferior): Adjust to mywait interface changes.
13296 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13297 features. Handle and report "multiprocess+". Handle
13298 "qAttached:PID".
13299 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13300 changes.
13301 (handle_v_kill): New.
13302 (handle_v_stopped): Adjust to use target_pid_to_str.
13303 (handle_v_requests): Allow multiple attaches and runs when
13304 multiprocess extensions are in effect. Handle "vKill".
13305 (myresume): Adjust to use ptids.
13306 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13307 (handle_status): Adjust to discard_queued_stop_replies interface
13308 change.
13309 (first_thread_of, kill_inferior_callback)
13310 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13311 (main): Call initialize_inferiors. Adjust to use ptids, killing
13312 and detaching from all inferiors. Handle multiprocess packet
13313 variants.
13314 * linux-low.h: Include gdb_proc_service.h.
13315 (struct process_info_private): New.
13316 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13317 <lwpid_of>: Use ptid_get_lwp.
13318 (get_lwp_thread): Adjust.
13319 (struct lwp_info): Add `dead' member.
13320 (find_lwp_pid): Declare.
13321 * linux-low.c (thread_db_active): Delete.
13322 (new_inferior): Adjust comment.
13323 (inferior_pid): Delete.
13324 (linux_add_process): New.
13325 (handle_extended_wait): Adjust.
13326 (add_lwp): Change unsigned long to ptid.
13327 (linux_create_inferior): Add process to processes table. Adjust
13328 to use ptids. Don't set new_inferior here.
13329 (linux_attach_lwp): Rename to ...
13330 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13331 it. Adjust to use ptids.
13332 (linux_attach_lwp): New.
13333 (linux_attach): Add process to processes table. Don't set
13334 new_inferior here.
13335 (struct counter): New.
13336 (second_thread_of_pid_p, last_thread_of_process_p): New.
13337 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13338 multiple processes.
13339 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13340 processes. Remove process from process table.
13341 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13342 to multiple processes.
13343 (any_thread_of): New.
13344 (linux_detach): Add `pid' argument, and handle it. Remove process
13345 from processes table.
13346 (linux_join): Add `pid' argument. Handle it.
13347 (linux_thread_alive): Change unsighed long argument to ptid_t.
13348 Consider dead lwps as not being alive.
13349 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13350 threads we're not interested in.
13351 (same_lwp, find_lwp_pid): New.
13352 (linux_wait_for_lwp): Change `pid' argument's type from int to
13353 ptid_t. Adjust.
13354 (linux_wait_for_event): Rename to ...
13355 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13356 from int to ptid_t. Adjust.
13357 (linux_wait_for_event): New.
13358 (linux_wait_1): Add `ptid' argument. Change return type to
13359 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13360 that exit from the process table.
13361 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13362 Adjust.
13363 (mark_lwp_dead): New.
13364 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13365 stopping all threads, mark its main lwp as dead.
13366 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13367 ptids.
13368 (fetch_register, usr_store_inferior_registers)
13369 (regsets_fetch_inferior_registers)
13370 (regsets_store_inferior_registers, linux_read_memory)
13371 (linux_write_memory): Inline `inferior_pid'.
13372 (linux_look_up_symbols): Adjust to use per-process
13373 `thread_db_active'.
13374 (linux_request_interrupt): Adjust to use ptids.
13375 (linux_read_auxv): Inline `inferior_pid'.
13376 (initialize_low): Don't reference thread_db_active.
13377 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13378 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13379 (ps_getpid): Return the pid of the current inferior.
13380 * thread-db.c (proc_handle, thread_agent): Delete.
13381 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13382 per-process data.
13383 (find_one_thread): Change argument type to ptid_t. Adjust to
13384 per-process data.
13385 (maybe_attach_thread): Adjust to per-process data and ptids.
13386 (thread_db_find_new_threads): Ditto.
13387 (thread_db_init): Ditto.
13388 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13389 processes table. Adjust to use ptids.
13390 (spu_kill, spu_detach): Adjust interface. Remove process from
13391 processes table.
13392 (spu_join, spu_thread_alive): Adjust interface.
13393 (spu_wait): Adjust interface. Remove process from processes
13394 table. Adjust to use ptids.
13395 * win32-low.c (current_inferior_tid): Delete.
13396 (current_inferior_ptid): New.
13397 (debug_event_ptid): New.
13398 (thread_rec): Take a ptid. Adjust.
13399 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13400 (child_delete_thread): Ditto.
13401 (do_initial_child_stuff): Add `attached' argument. Add process to
13402 processes table.
13403 (child_fetch_inferior_registers, child_store_inferior_registers):
13404 Adjust.
13405 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13406 (win32_attach): Pass 1 to do_initial_child_stuff.
13407 (win32_kill): Adjust interface. Remove process from processes
13408 table.
13409 (win32_detach): Ditto.
13410 (win32_join): Adjust interface.
13411 (win32_thread_alive): Take a ptid.
13412 (win32_resume): Adjust to use ptids.
13413 (get_child_debug_event): Ditto.
13414 (win32_wait): Adjust interface. Remove exiting process from
13415 processes table.
13416
bd99dc85
PA
134172009-04-01 Pedro Alves <pedro@codesourcery.com>
13418
13419 Non-stop mode support.
13420
13421 * server.h (non_stop): Declare.
13422 (gdb_client_data, handler_func): Declare.
13423 (delete_file_handler, add_file_handler, start_event_loop):
13424 Declare.
13425 (handle_serial_event, handle_target_event, push_event)
13426 (putpkt_notif): Declare.
13427 * target.h (enum resume_kind): New.
13428 (struct thread_resume): Replace `step' field by `kind' field.
13429 (TARGET_WNOHANG): Define.
13430 (struct target_ops) <wait>: Add `options' argument.
13431 <supports_non_stop, async, start_non_stop>: New fields.
13432 (target_supports_non_stop, target_async): New.
13433 (start_non_stop): Declare.
13434 (mywait): Add `options' argument.
13435 * target.c (mywait): Add `options' argument. Print child exit
13436 notifications here.
13437 (start_non_stop): New.
13438 * server.c (non_stop, own_buf, mem_buf): New globals.
13439 (struct vstop_notif): New.
13440 (notif_queue): New global.
13441 (queue_stop_reply, push_event, discard_queued_stop_replies)
13442 (send_next_stop_reply): New.
13443 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13444 interface changes.
13445 (attach_inferior): In non-stop mode, don't wait for the target
13446 here.
13447 (handle_general_set): Handle QNonStop.
13448 (handle_query): When handling qC, return the current general
13449 thread, instead of the first thread of the list.
13450 (handle_query): If the backend supports non-stop mode, include
13451 QNonStop+ in the qSupported query response.
13452 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13453 and non-stop mode.
13454 (handle_v_attach, handle_v_run): Handle non-stop mode.
13455 (handle_v_stopped): New.
13456 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13457 (myresume): Adjust to use resume_kind. Handle non-stop.
13458 (queue_stop_reply_callback): New.
13459 (handle_status): Handle non-stop mode.
13460 (main): Clear non_stop flag on reconnection. Use the event-loop.
13461 Refactor serial protocol handling from here ...
13462 (process_serial_event): ... to this new function. When GDB
13463 selects any thread, select one here. In non-stop mode, wait until
13464 GDB acks all pending events before exiting.
13465 (handle_serial_event, handle_target_event): New.
13466 * remote-utils.c (remote_open): Install remote_desc in the event
13467 loop.
13468 (remote_close): Remove remote_desc from the event loop.
13469 (putpkt_binary): Rename to...
13470 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13471 (putpkt_binary): New as wrapper around putpkt_binary_1.
13472 (putpkt_notif): New.
13473 (prepare_resume_reply): In non-stop mode, don't change the
13474 general_thread.
13475 * event-loop.c: New.
13476 * Makefile.in (OBJ): Add event-loop.o.
13477 (event-loop.o): New rule.
13478
13479 * linux-low.h (pid_of): Moved here.
13480 (lwpid_of): New.
13481 (get_lwp_thread): Use lwpid_of.
13482 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13483 * linux-low.c (pid_of): Delete.
13484 (inferior_pid): Use lwpid_of.
13485 (linux_event_pipe): New.
13486 (target_is_async_p): New.
13487 (delete_lwp): New.
13488 (handle_extended_wait): Use lwpid_of.
13489 (add_lwp): Don't set lwpid field.
13490 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13491 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13492 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13493 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13494 first. Adjust to linux_wait_for_event interface changes. Use
13495 lwpid_of.
13496 (linux_detach): Don't delete the main lwp here.
13497 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13498 (status_pending_p): Don't consider explicitly suspended lwps.
13499 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13500 pointer. Add OPTIONS argument. Change return type to int. Use
13501 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13502 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13503 pointer. Add status pointer argument. Return a pid instead of a
13504 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13505 changes. In non-stop mode, don't switch to a random thread.
13506 (linux_wait): Rename to...
13507 (linux_wait_1): ... this. Add target_options argument, and handle
13508 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13509 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13510 clean exit and signal exit code. Don't stop all threads in
13511 non-stop mode. In all-stop mode, only stop all threads when
13512 reporting a stop to GDB. Handle explicit thread stop requests.
13513 (async_file_flush, async_file_mark): New.
13514 (linux_wait): New.
13515 (send_sigstop): Use lwpid_of.
13516 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13517 interface changes. In non-stop mode, don't switch to a random
13518 thread.
13519 (linux_resume_one_lwp): Use lwpid_of.
13520 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13521 (linux_resume_one_thread): ... this. Handle resume_stop. In
13522 non-stop mode, don't look for pending flag in all threads.
13523 (resume_status_pending_p): Don't consider explicitly suspended
13524 threads.
13525 (my_waitpid): Reimplement. Emulate __WALL.
13526 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13527 Use lwpid_of.
13528 (sigchld_handler, linux_supports_non_stop, linux_async)
13529 (linux_start_non_stop): New.
13530 (linux_target_ops): Register linux_supports_non_stop, linux_async
13531 and linux_start_non_stop.
13532 (initialize_low): Install SIGCHLD handler.
13533 * thread-db.c (thread_db_create_event, find_one_thread)
13534 (thread_db_get_tls_address): Use lwpid_of.
13535 * win32-low.c (win32_detach): Adjust to use resume_kind.
13536 (win32_wait): Add `options' argument.
13537 * spu-low.c (spu_resume): Adjust to use resume_kind.
13538 (spu_wait): Add `options' argument.
13539
5b1c542e
PA
135402009-04-01 Pedro Alves <pedro@codesourcery.com>
13541
13542 Decouple target code from remote protocol.
13543
13544 * target.h (enum target_waitkind): New.
13545 (struct target_waitstatus): New.
13546 (struct target_ops) <wait>: Return an unsigned long. Take a
13547 target_waitstatus pointer instead of a char pointer.
13548 (mywait): Likewise.
13549 * target.c (mywait): Change prototype to return an unsigned long.
13550 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13551 * server.h (thread_from_wait, old_thread_from_wait): Delete
13552 declarations.
13553 (prepare_resume_reply): Change prototype to take a
13554 target_waitstatus.
13555 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13556 (last_status, last_ptid): New.
13557 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13558 pid instead of a signal.
13559 (attach_inferior): Remove "status" and "signal" parameters.
13560 Adjust.
13561 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13562 not as an address.
13563 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13564 (handle_v_requests, myresume): Remove "status" and "signal"
13565 parameters. Adjust.
13566 (handle_status): New.
13567 (main): Delete local `status'. Adjust.
13568 * remote-utils.c: Include target.h.
13569 (prepare_resume_reply): Change prototype to take a
13570 target_waitstatus. Adjust.
13571
13572 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13573 interface.
13574 * spu-low.c (spu_wait): Adjust.
13575 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13576 Delete.
13577 (win32_wait): Adjust.
13578
2bd7c093
PA
135792009-04-01 Pedro Alves <pedro@codesourcery.com>
13580
13581 * target.h (struct thread_resume): Delete leave_stopped member.
13582 (struct target_ops): Add a `n' argument to the `resume' callback.
13583 * server.c (start_inferior): Adjust.
13584 (handle_v_cont, myresume): Adjust.
13585 * linux-low.c (check_removed_breakpoint): Adjust to resume
13586 interface change, and to removed leave_stopped field.
13587 (resume_ptr): Delete.
13588 (struct thread_resume_array): New.
13589 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13590 resume interface change.
13591 (linux_continue_one_thread, linux_queue_one_thread)
13592 (resume_status_pending_p): Check if the resume field is NULL
13593 instead of checking the leave_stopped member.
13594 (linux_resume): Adjust to the target resume interface change.
13595 * spu-low.c (spu_resume): Adjust to the target resume interface
13596 change.
13597 * win32-low.c (win32_detach, win32_resume): Ditto.
13598
c35fafde
PA
135992009-04-01 Pedro Alves <pedro@codesourcery.com>
13600
13601 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13602 flag.
13603 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13604 pending.
13605 (linux_continue_one_thread): Only preserve the stepping flag if
13606 there's a pending breakpoint.
13607
0a59d50b
PA
136082009-03-31 Pedro Alves <pedro@codesourcery.com>
13609
13610 * server.c (main): After the inferior having exited, call
13611 remote_close before exiting gdbserver.
13612
f04c6d38
TJB
136132009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13614
13615 Fix size of FPSCR in Power 7 processors.
13616 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13617 (PPC_FEATURE_HAS_DFP): New #define.
13618 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13619 size of the FPSCR.
13620
78e5cee6
PA
136212009-03-23 Pedro Alves <pedro@codesourcery.com>
13622
13623 * server.c (handle_query) Whitespace and formatting.
13624
1b3f6016
PA
136252009-03-22 Pedro Alves <pedro@codesourcery.com>
13626
13627 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13628 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13629 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13630 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13631 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13632 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13633 Makefile.in, configure.ac: Fix whitespace throughout.
13634 * configure: Regenerate.
13635
a07b2135
PA
136362009-03-22 Pedro Alves <pedro@codesourcery.com>
13637
13638 * inferiors.c (find_inferior): Make it safe for the callback
13639 function to delete the currently iterated inferior.
13640
67cc2626
PA
136412009-03-22 Pedro Alves <pedro@codesourcery.com>
13642
13643 * Makefile.in (linuw_low_h): Move higher.
13644 (thread-db.o): Depend on $(linux_low_h).
13645
54a0b537
PA
136462009-03-17 Pedro Alves <pedro@codesourcery.com>
13647
13648 Rename "process" to "lwp" throughout.
13649
13650 * linux-low.c (all_processes): Rename to...
13651 (all_lwps): ... this.
13652 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13653 (add_process): Rename to ...
13654 (add_lwp): ... this. Adjust.
13655 (linux_create_inferior): Adjust.
13656 (linux_attach_lwp): Adjust.
13657 (linux_attach): Adjust.
13658 (linux_kill_one_process): Rename to ...
13659 (linux_kill_one_lwp): ... this. Adjust.
13660 (linux_kill): Adjust.
13661 (linux_detach_one_process): Rename to ...
13662 (linux_detach_one_lwp): ... this. Adjust.
13663 (linux_detach): Adjust.
13664 (check_removed_breakpoint): Adjust.
13665 (status_pending_p): Adjust.
13666 (linux_wait_for_process): Rename to ...
13667 (linux_wait_for_lwp): ... this. Adjust.
13668 (linux_wait_for_event): Adjust.
13669 (send_sigstop): Adjust.
13670 (wait_for_sigstop): Adjust.
13671 (stop_all_processes): Rename to ...
13672 (stop_all_lwps): ... this.
13673 (linux_resume_one_process): Rename to ...
13674 (linux_resume_one_lwp): ... this. Adjust.
13675 (linux_set_resume_request, linux_continue_one_thread)
13676 (linux_queue_one_thread, resume_status_pending_p)
13677 (usr_store_inferior_registers, regsets_store_inferior_registers)
13678 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13679 Adjust.
13680 * linux-low.h (get_process): Rename to ...
13681 (get_lwp): ... this. Adjust.
13682 (get_thread_process): Rename to ...
13683 (get_thread_lwp): ... this. Adjust.
13684 (get_process_thread): Rename to ...
13685 (get_lwp_thread): ... this. Adjust.
13686 (struct process_info): Rename to ...
13687 (struct lwp_info): ... this.
13688 (all_processes): Rename to ...
13689 (all_lwps): ... this.
13690 * proc-service.c (ps_lgetregs): Adjust.
13691 * thread-db.c (thread_db_create_event, find_one_thread)
13692 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13693
0b16c5cf
PA
136942009-03-14 Pedro Alves <pedro@codesourcery.com>
13695
13696 * server.c (handle_query): Handle "qAttached".
13697
32de4b9d
NS
136982009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13699
13700 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13701 GPLv3, update license URL.
13702
2aecd87f
DE
137032009-03-01 Doug Evans <dje@google.com>
13704
93efd302 13705 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13706 (server_h): Add gdb_signals.h.
13707 (signals.o): Update.
13708 * server.h (target_signal_from_host,target_signal_to_host_p)
13709 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13710
86b1f9c5
PM
137112009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13712
13713 * remote-utils.c (getpkt): Also generate remote-debug
13714 information if noack_mode is set.
13715
4aa995e1
PA
137162009-02-06 Pedro Alves <pedro@codesourcery.com>
13717
13718 * server.c (handle_query): Report qXfer:siginfo:read and
13719 qXfer:siginfo:write as supported and handle them.
13720 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13721 * linux-low.c (linux_xfer_siginfo): New.
13722 (linux_target_ops): Set it.
13723
62709adf
PA
137242009-01-26 Pedro Alves <pedro@codesourcery.com>
13725
13726 * server.c (gdbserver_usage): Mention --remote-debug.
13727 (main): Accept '--remote-debug' switch.
13728
aef93bd7
DE
137292009-01-18 Doug Evans <dje@google.com>
13730
13731 * regcache.c (new_register_cache): No need to check result of xcalloc.
13732 * server.c (handle_search_memory): Back out calls to xmalloc,
13733 result is checked and error is returned to user upon failure.
13734 (handle_query): Ditto. Add more checks for result of malloc.
13735 (handle_v_cont): Check result of malloc, report error back to
13736 user upon failure.
13737 (handle_v_run): Ditto. Call freeargv.
13738 * server.h (freeargv): Declare.
13739 * utils.c (freeargv): New fn.
13740
54363045
DE
137412009-01-15 Doug Evans <dje@google.com>
13742
f626972c
DE
13743 * gdbreplay.c (perror_with_name): Make arg const char *.
13744 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13745 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13746 * utils.c (perror_with_name): Make arg const char *.
54363045 13747
18aae699
PA
137482009-01-14 Pedro Alves <pedro@codesourcery.com>
13749
13750 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13751 when handling a EXIT_PROCESS_DEBUG_EVENT.
13752
ff703abe
JB
137532009-01-06 Joel Brobecker <brobecker@adacore.com>
13754
13755 * gdbreplay.c (gdbreplay_version): Update copyright year.
13756 * server.c (gdbserver_version): Likewise.
13757
f21cc1a2 137582009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13759
13760 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13761 (handle_extended_wait): Improve comment.
0e21c1ec 13762
bca929d3
DE
137632008-12-13 Doug Evans <dje@google.com>
13764
13765 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13766 * server.h (ATTR_MALLOC): New macro.
13767 (xmalloc,xcalloc,xstrdup): Declare.
13768 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13769 * inferiors.c: Ditto.
13770 * linux-low.c: Ditto.
13771 * mem-break.c: Ditto.
13772 * regcache.c: Ditto.
13773 * remote-utils.c: Ditto.
13774 * server.c: Ditto.
13775 * target.c: Ditto.
13776 * win32-low.c: Ditto.
13777
97438e3f
DE
137782008-12-12 Doug Evans <dje@google.com>
13779
896c7fbb
DE
13780 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13781 in debugging printf.
13782
97438e3f
DE
13783 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13784
e3b886f8
DE
137852008-12-09 Doug Evans <dje@google.com>
13786
13787 * linux-low.h (struct process_info): Delete member tid, unused.
13788 * thread-db.c (find_one_thread): Update.
13789 (maybe_attach_thread): Update.
13790
07e059b5
VP
137912008-12-02 Pedro Alves <pedro@codesourcery.com>
13792
889bf7c5
PA
13793 * target.h (struct target_ops): Add qxfer_osdata member.
13794 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13795 and dirent.h.
13796 (linux_qxfer_osdata): New functions.
13797 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13798 callback.
13799 * server.c (handle_query): Handle "qXfer:osdata:read:".
13800 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13801 (buffer_xml_printf): New functions.
13802 * server.h (struct buffer): New.
13803 (buffer_grow_str, buffer_grow_str0): New macros.
13804 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13805 (buffer_xml_printf): Declare.
07e059b5 13806
4cab47ab
DE
138072008-11-24 Doug Evans <dje@google.com>
13808
13809 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13810
f142445f
DJ
138112008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13812
13813 * server.c (handle_v_run): Always use the supplied argument list.
13814
d0107bb6 138152008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13816
d0107bb6
BW
13817 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13818 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13819
2c4ad781
TJB
138202008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13821
13822 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13823 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13824 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13825 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13826 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13827 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13828 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13829 XML target descriptions.
13830 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13831 when inferior is running on an ISA 2.05 or later processor. Add
13832 special case to return offset for full 64-bit slot of FPSCR when
13833 in 32-bits.
13834
dfb64f85
DJ
138352008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13836
13837 * Makefile.in (SFILES, clean): Added sparc64 files.
13838 (reg-sparc64.o, reg-sparc64.c): New.
13839 * configure.srv (sparc*-*-linux*): New configuration.
13840 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13841 syscall arguments for SPARC.
13842 (regsets_store_inferior_registers): Likewise.
13843 * linux-sparc-low.c: New file.
13844
66b6e1dd
DE
138452008-10-21 Doug Evans <dje@google.com>
13846
13847 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13848 (READLINE_DIR,READLINE_DEP): Delete.
13849 (INTERNAL_CFLAGS): Update.
13850 (LINTFLAGS): Update.
13851
9b710a42
PA
138522008-10-10 Pedro Alves <pedro@codesourcery.com>
13853
13854 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13855 whole argv from the last run, not just argv[0].
13856
5822d809
PA
138572008-09-08 Pedro Alves <pedro@codesourcery.com>
13858
13859 * regcache.c (new_register_cache): Return NULL if the register
13860 cache size isn't known yet.
13861 (free_register_cache): Avoid dereferencing a NULL regcache.
13862
74aac56f
DJ
138632008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13864
13865 * configure.srv: Merge MIPS and MIPS64.
13866
400b20f5
MR
138672008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13868
13869 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13870
677c5bb1
LM
138712008-08-18 Luis Machado <luisgpm@br.ibm.com>
13872
13873 * Makefile.in: Add required vsx dependencies.
13874
13875 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13876 Declare init_registers_powerpc_vsx32l.
13877 Declare init_registers_powerpc_vsx64l.
13878 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13879 (ppc_arch_setup): Check for VSX in hwcap.
13880 (ppc_fill_vsxregset): New function.
13881 (ppc_store_vsxregset): New function.
13882 Add new VSX entry in regset_info target_regsets.
13883
13884 * configure.srv: Add new VSX dependencies.
13885
a6f3e723
SL
138862008-08-12 Pedro Alves <pedro@codesourcery.com>
13887
13888 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13889 (remote_open): Set or clear transport_is_reliable.
13890 (putpkt_binary): Don't expect acks in noack mode.
13891 (getpkt): Don't send ack/nac in noack mode.
13892 * server.c (handle_general_set): Handle QStartNoAckMode.
13893 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13894 qSupported.
13895 (main): Reset noack_mode on every connection.
13896 * server.h (noack_mode): Declare.
13897
a417dc56
RW
138982008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13899
13900 * Makefile.in (GDBREPLAY_OBS): New variable.
13901 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13902
3221518c
UW
139032008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13904 Daniel Jacobowitz <dan@codesourcery.com>
13905
13906 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13907 (usr_store_inferior_registers): Likewise.
13908 (regsets_store_inferior_registers): Likewise.
13909
ec56be1b
PA
139102008-07-31 Rolf Jansen <rj@surtec.com>
13911 Pedro Alves <pedro@codesourcery.com>
13912
13913 * configure.ac: Check for memmem declaration.
13914 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13915 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13916 (disable_packet_qfThreadInfo): Unconditionally compile.
13917 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13918 * configure, config.in: Regenerate.
13919
2fe5e3ff
DE
139202008-07-28 Doug Kwan <dougkwan@google.com>
13921
13922 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13923 (linux_write_memory): Remove declaration of errno.
13924
836acd6d
UW
139252008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13926
13927 * linux-low.c (handle_extended_wait): Do not use "status"
13928 variable uninitialized.
13929
aeba519e
PA
139302008-07-07 Pedro Alves <pedro@codesourcery.com>
13931
13932 * server.c (handle_v_attach): Inhibit reporting dll changes.
13933
db42f210
PA
139342008-06-27 Pedro Alves <pedro@codesourcery.com>
13935
13936 * remote-utils.c (prepare_resume_reply): If requested, don't
13937 output "thread:TID" in the T stop reply.
13938
13939 * server.c (disable_packet_vCont, disable_packet_Tthread)
13940 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13941 (handle_query): If requested, disable support for qC, qfThreadInfo
13942 and qsThreadInfo.
13943 (handle_v_requests): If requested, disable support for vCont.
13944 (gdbserver_show_disableable): New.
13945 (main): Handle --disable-packet and --disable-packet=LIST.
13946
13947 * server.h (disable_packet_vCont, disable_packet_Tthread)
13948 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13949
8e4c5421
CD
139502008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13951
13952 * server.c (gdbserver_usage): Mention --version.
13953
6e23a804
DJ
139542008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13955
13956 * Makefile.in (gdbreplay.o): New rule.
13957
90aa6a40
JM
139582008-06-06 Joseph Myers <joseph@codesourcery.com>
13959
13960 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13961 message, not gdbserver.
13962
c16158bc 139632008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13964 Nathan Sidwell <nathan@codesourcery.com>
13965 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13966
13967 * acinclude.m4: Include ../../config/acx.m4.
13968 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13969 * configure, config.in: Regenerate.
13970 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13971 * server.c (gdbserver_version): Print PKGVERSION.
13972 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13973 (main): Adjust gdbserver_usage calls.
13974 * gdbreplay.c (version, host_name): Add declarations.
13975 (gdbreplay_version, gdbreplay_usage): New.
13976 (main): Accept --version and --help options.
13977
aeb75bf5
DJ
139782008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13979
13980 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13981 (arm_breakpoint_at): Handle Thumb.
13982 (the_low_target): Add comment.
13983
76b233dd
UW
139842008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13985
13986 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13987
08388c79
DE
139882008-05-09 Doug Evans <dje@google.com>
13989
a3c83fae
DE
13990 * server.h (decode_search_memory_packet): Declare.
13991 * remote-utils.c (decode_search_memory_packet): New fn.
13992 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13993 (handle_search_memory): New fn.
13994 (handle_query): Process qSearch:memory packets.
13995
bb9c3d36
UW
139962008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13997
13998 * regcache.c (registers_length): Remove.
13999 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14000 full register packet.
14001 * regcache.h (registers_length): Remove prototype.
14002 * server.h (PBUFSIZ): Define to 16384.
14003
7284e1be
UW
140042008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14005
14006 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14007 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14008 powerpc-64l.o, and powerpc-altivec64l.o.
14009 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14010 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14011 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14012 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14013 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14014 to srv_xmlfiles.
14015
14016 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14017 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14018 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14019 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14020 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14021 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14022 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14023 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14024 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14025 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14026 (clean): Update.
14027
14028 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14029 (init_registers_powerpc_32l): ... this new prototype.
14030 (init_registers_powerpc_32): Remove, replace by ...
14031 (init_registers_powerpc_altivec32l): ... this new prototype.
14032 (init_registers_powerpc_e500): Remove, replace by ...
14033 (init_registers_powerpc_e500l): ... this new prototype.
14034 (init_registers_ppc64): Remove, replace by ...
14035 (init_registers_powerpc_64l): ... this new prototype.
14036 (init_registers_powerpc_64): Remove, replace by ...
14037 (init_registers_powerpc_altivec64l): ... this new prototype.
14038 (ppc_num_regs): Set to 73.
14039 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14040 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14041 (ppc_cannot_store_register): Handle orig_r3 and trap.
14042 (ppc_arch_setup): Update init_registers_... calls.
14043 (ppc_fill_gregset): Handle orig_r3 and trap.
14044
14045 * inferiors.c (clear_inferiors): Reset current_inferior.
14046
fdc59709
PB
140472008-04-23 Paolo Bonzini <bonzini@gnu.org>
14048
889bf7c5
PA
14049 * acinclude.m4: Add override.m4.
14050 * configure: Regenerate.
fdc59709 14051
c9b2f845
UW
140522008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14053
14054 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14055 initial call to init_register_ppc64.
14056
550512b8
UW
140572008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14058
43aaf8b6
PA
14059 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14060 single powerpc*-*-linux* case.
550512b8
UW
14061 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14062
b6430ec3
UW
140632008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14064
14065 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 14066 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
14067 from reg_xmlfiles.
14068 * linux-ppc-low.c: Include <elf.h>.
14069 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14070 (ppc_hwcap): New global variable.
14071 (ppc_regmap): Remove __SPE__ #ifdef sections.
14072 (ppc_regmap_e500): New global variable.
14073 (ppc_cannot_store_register): Update __SPE__ special case.
14074 (ppc_get_hwcap): New function.
14075 (ppc_arch_setup): Use it to determine whether inferior supports
14076 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14077 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14078 Do not access registers if target does not support AltiVec.
14079 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14080 Do not access registers if target does not support SPE.
14081 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14082
52fa2412
UW
140832008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14084
14085 * linux-low.c (disabled_regsets, num_regsets): New.
14086 (use_regsets_p): Delete.
14087 (linux_wait_for_process): Clear disabled_regsets.
14088 (regsets_fetch_inferior_registers): Check and set it.
14089 (regsets_store_inferior_registers): Likewise.
14090 (linux_fetch_registers, linux_store_registers): Do not use
14091 use_regsets_p.
14092 (initialize_low): Allocate disabled_regsets.
14093
e28b3332
DJ
140942008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14095
14096 * Makefile.in (LIBOBJS): New.
14097 (OBS): Use LIBOBJS.
14098 (memmem.o): New rule.
14099 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14100 * configure: Regenerated.
14101
4536995d
UW
141022008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14103
14104 * server.c (handle_query): Never return "unsupported" for
14105 qXfer:features:read queries.
14106
221c031f
UW
141072008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14108
14109 * server.c (get_features_xml): Fix inverted condition.
14110 (handle_query): Always support qXfer:feature:read.
14111
ccd213ac
DJ
141122008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14113
14114 * server.c (wrapper_argv): New.
14115 (start_inferior): Handle wrapper_argv. If set, expect an extra
14116 trap.
14117 (gdbserver_usage): Document --wrapper.
14118 (main): Parse --wrapper.
14119
6fe305f7
UW
141202008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14121
14122 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14123 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14124 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14125 (ppc_set_pc): Likewise.
14126 (ppc_arch_setup): New function.
14127 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14128 of collect_register.
889bf7c5 14129 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 14130
5b0a002e
UW
141312008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14132
14133 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14134 instead of linux-ppc64-low.o.
14135 * linux-ppc64-low.c: Remove file.
14136 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14137 (linux-ppc64-low.o): Remove rule.
14138
14139 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14140 (init_registers_powerpc_64): Likewise.
14141 (ppc_regmap): Conditionally define depending on __powerpc64__.
14142 (ppc_cannot_store_register): Do not special-case "fpscr" when
14143 compiled on __powerpc64__.
14144 (ppc_collect_ptrace_register): New function.
14145 (ppc_supply_ptrace_register): New function.
14146 (ppc_breakpoint): Change type to "unsigned int".
14147 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14148 (the_low_target): Conditionally provide initializers for the
889bf7c5 14149 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
14150 collect_ptrace_register and supply_ptrace_register members.
14151
9b4b61c8
UW
141522008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14153
14154 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14155 * server.c (gdbserver_xmltarget): Define.
14156 (get_features_xml): Use it to replace "target.xml" and arch_string.
14157
14158 * configure.srv: Remove srv_xmltarget. Add XML files that were
14159 mentioned there to srv_xmlfiles instead. Remove conditional tests
14160 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14161 srv_xmlfiles and srv_regobj to include all possible choices.
14162 * configure.ac (srv_xmltarget): Remove.
14163 (srv_xmlfiles): Do not add "target.xml".
14164 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14165 checks for supplementary target information.
14166 * configure: Regenerate.
14167 * Makefile.in (XML_TARGET): Remove.
14168 (target.xml): Remove rule.
14169 (clean): Do not clean up target.xml.
14170 (.PRECIOUS): Do not mention target.xml.
14171
14172 * target.h (struct target_ops): Remove arch_string member.
14173 * linux-low.c (linux_arch_string): Remove.
14174 (linux_target_ops): Remove arch_string initializer.
14175 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14176 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14177 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14178 * spu-low.c (spu_arch_string): Remove.
14179 (spu_target_ops): Remove arch_string initializer.
14180 * win32-low.c (win32_arch_string): Remove.
14181 (win32_target_ops): Remove arch_string initializer.
14182 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14183 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14184 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14185
ee1a7ae4
UW
141862008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14187
14188 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14189 by collect_ptrace_register and supply_ptrace_register hooks.
14190 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14191 instead of checking for the_low_target.left_pad_xfer.
14192 (usr_store_inferior_registers): Use collect_ptrace_register callback
14193 instead of checking for the_low_target.left_pad_xfer.
14194
14195 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14196 (s390_supply_ptrace_register): Likewise.
14197 (s390_fill_gregset): Call s390_collect_ptrace_register.
14198 (the_low_target): Update.
14199
14200 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14201 (ppc_supply_ptrace_register): Likewise.
14202 (the_low_target): Update.
14203
14204 * linux-i386-low.c (the_low_target): Update.
14205 * linux-x86-64-low.c (the_low_target): Update.
14206
d61ddec4
UW
142072008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14208
14209 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14210 reg-s390.o and reg-s390x.o.
14211
14212 * linux-low.c (new_inferior): New global variable.
14213 (linux_create_inferior, linux_attach): Set it.
14214 (linux_wait_for_process): Call the_low_target.arch_setup after the
14215 target has stopped for the first time.
14216 (initialize_low): Do not call the_low_target.arch_setup.
14217
14218 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14219 (s390_set_pc): Likewise.
14220 (s390_arch_setup): New function.
14221 (the_low_target): Use s390_arch_setup as arch_setup routine.
14222
14223 * regcache.c (realloc_register_cache): New function.
14224 (set_register_cache): Call it for each existing regcache.
14225
d05b4ac3
UW
142262008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14227
14228 * server.h (init_registers): Remove prototype.
14229
14230 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14231 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14232 instead of init_registers ().
14233 * linux-arm-low.c (init_registers_arm): Add prototype.
14234 (init_registers_arm_with_iwmmxt): Likewise.
14235 (the_low_target): Add initializer for arch_setup field.
14236 * linux-cris-low.c (init_registers_cris): Add prototype.
14237 (the_low_target): Add initializer for arch_setup field.
14238 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14239 (the_low_target): Add initializer for arch_setup field.
14240 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14241 (the_low_target): Add initializer for arch_setup field.
14242 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14243 (the_low_target): Add initializer for arch_setup field.
14244 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14245 (the_low_target): Add initializer for arch_setup field.
14246 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14247 (the_low_target): Add initializer for arch_setup field.
14248 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14249 (init_registers_mips64_linux): Likewise.
14250 (the_low_target): Add initializer for arch_setup field.
14251 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14252 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14253 (the_low_target): Add initializer for arch_setup field.
14254 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14255 (init_registers_powerpc_64): Likewise.
14256 (the_low_target): Add initializer for arch_setup field.
14257 * linux-s390-low.c (init_registers_s390): Add prototype.
14258 (init_registers_s390x): Likewise.
14259 (the_low_target): Add initializer for arch_setup field.
14260 * linux-sh-low.c (init_registers_sh): Add prototype.
14261 (the_low_target): Add initializer for arch_setup field.
14262 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14263 (the_low_target): Add initializer for arch_setup field.
14264 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14265 (the_low_target): Add initializer for arch_setup field.
14266
14267 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14268 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14269 instead of init_registers ().
14270 * win32-arm-low.c (init_registers_arm): Add prototype.
14271 (the_low_target): Add initializer for arch_setup field.
14272 * win32-i386-low.c (init_registers_i386): Add prototype.
14273 (the_low_target): Add initializer for arch_setup field.
14274
14275 * spu-low.c (init_registers_spu): Add prototype.
14276 (initialize_low): Call initialie_registers_spu () instead of
14277 initialize_registers ().
14278
fd96d250
PA
142792008-02-19 Pedro Alves <pedro@codesourcery.com>
14280
14281 * server.c (handle_v_requests): When handling the vRun and vAttach
14282 packets, if already debugging a process, don't kill it. Return an
14283 error instead.
14284
d41b6bb4
DJ
142852008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14286
14287 * server.c (handle_query): Correct length check.
14288
5ac588cf
PA
142892008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14290
14291 * win32-low.c (do_initial_child_stuff): Add process handle
14292 parameter. Set current_process_handle and current_process_id from the
14293 parameters. Clear globals.
14294 (win32_create_inferior): Don't set current_process_handle and
14295 current_process_id here. Instead pass them on the call to
14296 do_initial_child_stuff.
14297 (win32_attach): Likewise.
14298 (win32_clear_inferiors): New.
14299 (win32_kill): Don't close the current process handle or the
14300 current thread handle here. Instead call win32_clear_inferiors.
14301 (win32_detach): Don't open a new handle to the process. Call
14302 win32_clear_inferiors.
14303 (win32_join): Don't rely on current_process_handle; open a new
14304 handle using the process id.
14305 (win32_wait): Call win32_clear_inferiors when the inferior process
14306 has exited.
14307
ecd7ecbc
DJ
143082008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14309
14310 * server.c (monitor_show_help): Add "exit".
14311
1525d545
MG
143122008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14313
ecd7ecbc 14314 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
14315 (clean): Add reg-xtensa.c.
14316 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
14317 * configure.srv (xtensa*-*-linux*) New target.
14318 * linux-xtensa-low.c: New.
14319 * xtensa-xtregs.c: New.
1525d545 14320
59a016f0
PA
143212008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14322
14323 * hostio.c: Don't include errno.h.
14324 (errno_to_fileio_errno): Move to hostio-errno.
14325 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14326 error number outputting to the target->hostio_last_error callback.
14327 (hostio_packet_error): Use FILEIO_EINVAL directly.
14328 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14329 calls to hostio_error.
14330 * hostio-errno.c: New.
14331 * server.h (hostio_last_error_from_errno): Declare.
14332 * target.h (target_ops): Add hostio_last_error member.
14333 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14334 as hostio_last_error handler.
889bf7c5 14335 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
14336 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14337 (wince_hostio_last_error): New functions.
14338 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14339 as hostio_last_error handler.
14340 (win32_target_ops) [!_WIN32_WCE]: Register
14341 hostio_last_error_from_errno as hostio_last_error handler.
14342 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14343 (hostio-errno.o): New rule.
14344 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14345 * configure.srv (srv_hostio_err_objs): New variable. Default to
14346 hostio-errno.o.
14347 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14348 * configure: Regenerate.
14349
2d717e4f
DJ
143502008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14351
14352 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14353 (linux_kill, linux_detach): Clean up the process list.
14354 * remote-utils.c (remote_open): Improve port number parsing.
14355 (putpkt_binary, input_interrupt): Only send interrupts if the target
14356 is running.
14357 * server.c (extended_protocol): Make static.
14358 (attached): Define earlier.
14359 (exit_requested, response_needed, program_argv): New variables.
14360 (target_running): New.
14361 (start_inferior): Clear attached here.
14362 (attach_inferior): Set attached here.
14363 (require_running): Define.
14364 (handle_query): Use require_running and target_running. Implement
14365 "monitor exit".
14366 (handle_v_attach, handle_v_run): New.
14367 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14368 (gdbserver_usage): Update.
14369 (main): Redo argument parsing. Handle --debug and --multi. Handle
14370 --attach along with other options or after the port. Save
14371 program_argv. Support no initial program. Resynchronize
14372 communication with GDB after an error. Handle "monitor exit".
14373 Use require_running and target_running. Always allow the extended
14374 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14375 restart in extended mode.
14376 * README: Refer to the GDB manual. Update --attach usage.
14377
7407e2de
AS
143782007-12-20 Andreas Schwab <schwab@suse.de>
14379
14380 * linux-low.c (STACK_SIZE): Define.
14381 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14382 (linux_test_for_tracefork): Likewise.
14383
b65d95c5
DJ
143842007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14385
14386 * linux-low.c (linux_wait_for_event): Update messages. Do not
14387 reinsert auto-delete breakpoints.
14388 * mem-break.c (struct breakpoint): Change return type of handler to
14389 int.
14390 (set_breakpoint_at): Update handler type.
14391 (reinsert_breakpoint_handler): Return 1 instead of calling
14392 delete_breakpoint.
14393 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14394 setting a new one.
14395 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14396 * mem-break.h (set_breakpoint_at): Update handler type.
14397 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14398 * win32-low.c (auto_delete_breakpoint): New.
14399 (get_child_debug_event): Use it.
14400
4e799345
DJ
144012007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14402
14403 * configure.ac: Check for pread and pwrite.
14404 * hostio.c (handle_pread): Fall back to lseek and read.
14405 (handle_pwrite): Fall back to lseek and write.
14406 * config.in, configure: Regenerated.
14407
27524b67
DJ
144082007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14409
14410 * server.c (myresume): Add own_buf argument.
14411 (main): Update calls.
14412
a20d5e98
DJ
144132007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14414
14415 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14416 * remote-utils.c (remote_open): Do not call disable_async_io.
14417 (block_async_io): Delete.
14418 (unblock_async_io): Make static.
14419 (initialize_async_io): New.
14420 * server.c (handle_v_cont): Handle async I/O here.
14421 (myresume): Likewise. Move other common resume tasks here...
14422 (main): ... from here. Call initialize_async_io. Disable async
14423 I/O before the main loop.
14424 * server.h (initialize_async_io): Declare.
14425 (block_async_io, unblock_async_io): Delete prototypes.
14426 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14427
b79d787e
DJ
144282007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14429
14430 * remote-utils.c (readchar): Allow binary data in received messages.
14431
d97903b2
PA
144322007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14433
14434 * win32-low.c (attaching): New global.
14435 (win32_create_inferior): Clear the `attaching' global.
14436 (win32_attach): Set the `attaching' global.
14437 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14438 attaching. Only set a breakpoint at the entry point if not
14439 attaching.
14440
311de423
PA
144412007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14442
14443 * server.c (main): Don't report dll events on the initial
14444 connection on attaches.
14445
6c2d16d2
PA
144462007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14447
14448 * server.c (main): Relax numerical bases supported for the pid of
14449 the --attach command line argument.
14450
5ca906e6
PA
144512007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14452
14453 * win32-low.c (win32_attach): Call OpenProcess before
14454 DebugActiveProcess, not after. Add last error output to error
14455 call.
14456
9c6c8194
PA
144572007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14458
14459 * win32-low.c (win32_get_thread_context)
14460 (win32_set_thread_context): New functions.
14461 (thread_rec): Use win32_get_thread_context.
14462 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14463 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14464 field.
14465
4d5d1aaa
PA
144662007-12-03 Leo Zayas
14467 Pedro Alves <pedro_alves@portugalmail.pt>
14468
14469 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14470 global variables.
14471 (child_add_thread): Minor cleanup.
14472 (child_continue): Resume artificially suspended threads before
14473 calling ContinueDebugEvent.
14474 (suspend_one_thread): New.
14475 (fake_breakpoint_event): New.
14476 (get_child_debug_event): Change return type to int. Check here if
14477 gdb sent an interrupt request. If a soft interrupt was requested,
14478 fake a breakpoint event. Return 0 if there is no event to handle,
14479 and 1 otherwise.
14480 (win32_wait): Don't check here if gdb sent an interrupt request.
14481 Ensure there is a valid event to handle.
14482 (win32_request_interrupt): Add soft interruption method as last
14483 resort.
14484
c436e841
PA
144852007-12-03 Leo Zayas
14486 Pedro Alves <pedro_alves@portugalmail.pt>
14487
14488 * win32-low.h (win32_thread_info): Add descriptions to the
14489 structure members. Replace `suspend_count' counter by a
14490 `suspended' flag.
14491 * win32-low.c (thread_rec): Update condition of when to get the
14492 context from the inferior. Rely on ContextFlags being set if it
14493 has already been retrieved. Only suspend the inferior thread if
14494 we haven't already. Warn if that fails.
14495 (continue_one_thread): s/suspend_count/suspended/. Only call
14496 ResumeThread once. Warn if that fails.
14497
e7b5fa67
PA
144982007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14499
14500 * win32-low.c (win32_wait): Don't read from the inferior when it
14501 has already exited.
14502
a385171d
PA
145032007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14504
14505 * Makefile.in (win32_low_h): New variable.
14506 (win32-low.o): Add dependency on $(win32_low_h).
14507 (win32-arm-low.o, win32-i386-low.o): New rules.
14508
f80c84b3
DJ
145092007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14510
14511 * hostio.c: Correct copyright year.
14512
a6b151f1
DJ
145132007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14514
14515 * Makefile.in (OBS): Add hostio.o.
14516 (hostio.o): New rule.
14517 * server.h (handle_vFile): Declare.
14518 * hostio.c: New file.
14519 * server.c (handle_v_requests): Take packet_len and new_packet_len
14520 for binary packets. Call handle_vFile.
14521 (main): Update call to handle_v_requests.
14522
f9387fc3
DJ
145232007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14524
14525 * linux-low.c: Include <sched.h>.
14526
51c2684e
DJ
145272007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14528
14529 * linux-low.c (linux_tracefork_grandchild): New.
14530 (linux_tracefork_child): Use clone.
14531 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14532
75f83163
JB
145332007-10-31 Joel Brobecker <brobecker@adacore.com>
14534
14535 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14536
da5898ce
DJ
145372007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14538
14539 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14540
24a09b5f
DJ
145412007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14542
14543 * inferiors.c (change_inferior_id): Delete.
14544 (add_pid_to_list, pull_pid_from_list): New.
14545 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14546 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14547 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14548 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14549 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14550 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14551 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14552 (using_threads): Always set to 1.
14553 (handle_extended_wait): New.
14554 (add_process): Do not set TID.
14555 (linux_create_inferior): Set must_set_ptrace_flags.
14556 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14557 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14558 (linux_thread_alive): Rename TID argument to LWPID.
14559 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14560 (linux_wait_for_event): Do not use TID or check using_threads. Update
14561 call to dead_thread_notify. Call handle_extended_wait.
14562 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14563 (send_sigstop): Delete sigstop_sent.
14564 (wait_for_sigstop): Avoid TID.
14565 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14566 (linux_test_for_tracefork): New.
14567 (linux_lookup_signals): Use thread_db_active and
14568 linux_supports_tracefork_flag.
14569 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14570 * linux-low.h (get_process_thread): Avoid TID.
14571 (struct process_ifo): Move thread_known and tid to the end. Remove
14572 sigstop_sent.
14573 (linux_attach_lwp, thread_db_init): Update prototypes.
14574 * server.h (change_inferior_id): Delete prototype.
14575 (add_pid_to_list, pull_pid_from_list): New prototypes.
14576 * thread-db.c (thread_db_use_events): New.
14577 (find_first_thread): Rename to...
14578 (find_one_thread): ...this. Update callers and messages. Do not
14579 call fatal. Check thread_db_use_events. Do not call
14580 change_inferior_id or new_thread_notify.
14581 (maybe_attach_thread): Update. Do not call new_thread_notify.
14582 (thread_db_init): Set thread_db_use_events. Check use_events.
14583 * utils.c (fatal, warning): Correct message prefix.
14584
30ed0a8f
DJ
145852007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14586
14587 * Makefile.in (clean): Remove new files.
14588 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14589 (powerpc-64.o, powerpc-64.c): New rules.
14590 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14591 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14592 with SPE.
14593 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14594 SPE targets.
14595 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14596 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14597 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14598 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14599 (target_regsets): Add AltiVec and SPE register sets.
14600 * configure.ac: Check for AltiVec and SPE.
14601 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14602 (ppc_fill_vrregset, ppc_store_vrregset): New.
14603 (target_regsets): Add AltiVec register set.
14604 * configure: Regenerated.
14605
fd462a61
DJ
146062007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14607
14608 * linux-low.c (O_LARGEFILE): Define.
14609 (linux_read_memory): Use /proc/PID/mem.
14610 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14611 * configure, config.in: Regenerated.
14612
69f223ed
DJ
146132007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14614
14615 * linux-low.c (linux_wait_for_event): Do not pass signals while
14616 single-stepping.
14617
aec18585
PA
146182007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14619
14620 * win32-low.c (create_process): New.
14621 (win32_create_inferior): Use create_process instead of
14622 CreateProcess. If create_process failed retry appending an ".exe"
14623 suffix. Store the GetLastError result immediatelly after
14624 create_process calls and use it on the call to error.
14625
34d86ddd
PA
146262007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14627
14628 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14629
5a0e3bd0
JB
146302007-08-23 Joel Brobecker <brobecker@adacore.com>
14631
14632 * configure.ac: Switch license to GPLv3.
14633
f88c79e6
MS
146342007-08-01 Michael Snyder <msnyder@access-company.com>
14635
14636 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14637
6b3d9b83
PA
146382007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14639
14640 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14641 typedef.
14642 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14643 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14644 CloseToolhelp32Snapshot.
14645 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14646 CloseToolhelp32Snapshot.
14647
c588c53c
MS
146482007-07-27 Michael Snyder <michael.snyder@access-company.com>
14649
14650 * server.c (main): Check for inferior exit before main loop.
14651
aa0403d9
PA
146522007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14653
14654 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14655 instead of on tmp_desc.
14656
255e7678
DJ
146572007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14658 Daniel Jacobowitz <dan@codesourcery.com>
14659
14660 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14661 (add_thread): Minor cleanups.
14662 (clear_inferiors): Move lower in the file. Clear the DLL
14663 list.
14664 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14665 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14666 (xml_escape_text): New.
14667 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14668 for qSupported.
14669 (handle_v_cont): Report errors.
14670 (gdbserver_version): Update.
14671 (main): Correct size of own_buf. Do not report initial DLL events.
14672 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14673 (unloaded_dll, xml_escape_text): New.
14674 * win32-low.c (enum target_waitkind): Update comments.
14675 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14676 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14677 (win32_EnumProcessModules, win32_GetModuleInformation)
14678 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14679 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14680 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14681 (win32_Module32First, win32_Module32Next, load_toolhelp)
14682 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14683 (get_child_debug_event): Handle DLL events.
14684 (win32_wait): Likewise.
14685
0d37add9
DJ
146862007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14687
14688 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14689 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14690
45e2715e
PA
146912007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14692
14693 * win32-low.c (handle_output_debug_string): Ignore event if not
14694 waiting.
14695
c5674cf1
PA
146962007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14697
14698 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14699
2bbe3cc1
DJ
147002007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14701
14702 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14703
ae13219e
DJ
147042007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14705
14706 * inferiors.c (change_inferior_id): Add comment.
14707 * linux-low.c (check_removed_breakpoint): Add an early
14708 prototype. Improve debug output.
14709 (linux_attach): Doc update.
14710 (linux_detach_one_process, linux_detach): Clean up before releasing
14711 each process.
14712 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14713 * linux-low.h (struct process_info): Doc improvement.
14714 * mem-break.c (delete_all_breakpoints): New.
14715 * mem-break.h (delete_all_breakpoints): New prototype.
14716 * thread-db.c (find_first_thread): New.
14717 (thread_db_create_event): Call it instead of
14718 thread_db_find_new_threads. Clean up unused variables.
14719 (maybe_attach_thread): Remove first thread handling.
14720 (thread_db_find_new_threads): Use find_first_thread.
14721 (thread_db_get_tls_address): Likewise.
14722
4105de34
DJ
147232007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14724
14725 * thread-db.c (thread_db_find_new_threads): Add prototype.
14726 (thread_db_create_event): Check for the main thread before adding
14727 a new thread.
14728 (maybe_attach_thread): Only enable event reporting if TID == 0.
14729 (thread_db_get_tls_address): Check for new threads.
14730
2b876972
DJ
147312007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14732
14733 * linux-low.c (linux_create_inferior): Try execv before execvp.
14734 * spu-low.c (spu_create_inferior): Likewise.
14735
7a245884
DJ
147362007-06-13 Mike Frysinger <vapier@gentoo.org>
14737
14738 * linux-low.c (linux_create_inferior): Change execv to execvp.
14739 * spu-low.c (spu_create_inferior): Likewies.
14740
117ce543
DJ
147412007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14742
14743 * Makefile.in (clean): Clean new files instead of deleted ones.
14744 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14745 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14746 rules.
14747 * configure.srv: Specify XML files and new regformats for MIPS and
14748 MIPS64 GNU/Linux.
14749 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14750 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14751 an entry for the restart register.
14752 (mips_cannot_fetch_register, mips_cannot_store_register)
14753 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14754 register names to match the XML descriptions.
14755 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14756 restart register instead of $0.
14757
0e7f50da
UW
147582007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14759 Markus Deuling <deuling@de.ibm.com>
14760
14761 * remote-utils.c (decode_xfer_write): New function.
14762 * server.h (decode_xfer_write): Add prototype.
14763 * server.c (handle_query): Add PACKET_LEN argument. Support
14764 qXfer:spu:read and qXfer:spu:write packets.
14765 (main): Pass packet_len to handle_query.
14766 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14767 * target.h (target_ops): Add qxfer_spu.
14768
374c1d38
UW
147692007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14770
14771 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14772 accessing non-seekable spufs files.
14773
bb63802a
UW
147742007-05-16 Markus Deuling <deuling@de.ibm.com>
14775
889bf7c5 14776 * server.c (handle_query): Add reply for qC packet.
bb63802a 14777
7390519e
PA
147782007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14779 Leo Zayas <lerele@champenstudios@com>
14780
14781 * server.h (check_remote_input_interrupt_request): New function.
14782 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14783 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14784 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14785 (check_remote_input_interrupt_request): New function.
14786 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14787 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14788 winapi_GenerateConsoleCtrlEvent): New typedefs.
14789 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14790 to 250 ms.
14791 (win32_wait): Check for remote interrupt request
14792 with check_remote_input_interrupt_request.
14793 (win32_request_interrupt): New function.
14794 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14795
34b34921
PA
147962007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14797
14798 * win32-low.c (debug_registers_changed,
14799 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14800 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14801 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14802 (thread_rec): Get context using the low target.
14803 (child_add_thread): Call thread_added on the low target,
14804 which does the same thing.
14805 (regptr): Delete.
14806 (do_initial_child_stuff): Remove debug registers references.
14807 Set context using the low target. Resume threads after
14808 setting the contexts.
14809 (child_continue): Remove dead variable. Remove debug
14810 registers references.
14811 (child_fetch_inferior_registers): Go through the low target.
14812 (do_child_store_inferior_registers): Remove.
14813 (child_store_inferior_registers): Go through the low target.
14814 (win32_resume): Remove debug registers references.
14815 Set context using the low target.
14816 (handle_exception): Change return type to void. Don't record
14817 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14818 first chance exception.
889bf7c5 14819 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14820 goto loop. Always return after waiting for debug event.
14821 (win32_wait): Convert to switch statement. Handle spurious
14822 events.
14823
14824 * win32-i386-low.c (debug_registers_changed,
14825 debug_registers_used): New.
14826 (initial_stuff): Rename to ...
14827 (i386_initial_stuff): ... this. Clear debug registers
14828 state variables.
14829 (store_debug_registers): Delete.
14830 (i386_get_thread_context): New.
14831 (load_debug_registers): Delete.
14832 (i386_set_thread_context): New.
14833 (i386_thread_added): New.
14834 (single_step): Rename to ...
14835 (i386_single_step): ... this.
14836 (do_fetch_inferior_registers): Rename to ...
14837 (i386_fetch_inferior_register): ... this.
14838 (i386_store_inferior_register): New.
14839 (the_low_target): Adapt to new interface.
14840
14841 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14842 (arm_get_thread_context): New.
14843 (arm_set_thread_context): New.
14844 (regptr): New.
14845 (do_fetch_inferior_registers): Rename to ...
14846 (arm_fetch_inferior_register): ... this.
14847 (arm_store_inferior_register): New.
14848 (arm_wince_breakpoint): Reimplement as unsigned long.
14849 (arm_wince_breakpoint_len): Define.
14850 (the_low_target): Adapt to new interface.
14851
14852 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14853 load_debug_registers. Add get_thread_context, set_thread_context,
14854 thread_added and store_inferior_register. Rename
14855 fetch_inferior_registers to fetch_inferior_register.
14856 (regptr): Remove declaration.
14857
dd6953e1
PA
148582007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14859
14860 * linux-low.c (linux_detach): Change return type to int. Return 0.
14861 * spu-low.c (spu_detach): Likewise.
14862
444d6139
PA
148632007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14864
14865 * target.h (target_ops): Change return type of detach to int.
14866 Add join.
14867 (join_inferior): New.
14868 * server.c (main): Don't skip detach support on mingw32.
14869 If the inferior doesn't support detaching return error.
14870 Call join_inferior instead of using waitpid.
14871 * linux-low.c (linux_join): New.
14872 (linux_target_op): Add linux_join.
14873 * spu-low.c (spu_join): New.
14874 (spu_target_ops): Add spu_join.
14875 * win32-low.c (win32_detach): Adapt to new interface.
14876 Reopen current_process_handle before detaching. Issue a child
14877 resume before detaching.
14878 (win32_join): New.
14879 (win32_target_op): Add win32_join.
14880
1d5315fe
PA
148812007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14882
14883 * win32-low.c (win32-attach): Fix return value.
14884 * target.h (target_ops): Describe ATTACH return values.
14885
bf914831
PA
148862007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14887
14888 * win32-low.c (GETPROCADDRESS): Define.
14889 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14890 (winapi_DebugSetProcessKillOnExit): Likewise.
14891 (win32_create_inferior): Force usage of ansi CreateProcessA.
14892 (win32_attach): Use GETPROCADDRESS.
14893 (win32_detach): Likewise.
14894
f72f3e60
PA
148952007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14896
14897 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14898
ed50f18f
PA
148992007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14900
14901 * win32-low.c: Commit leftover changes from 2007-03-29.
14902
0c2ead7e
DJ
149032007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14904
14905 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14906 fields short instead of int. Add explicit padding.
14907 (i387_cache_to_fsave): Remove unnecessary casts.
14908 (i387_fsave_to_cache): Doc fix.
14909 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14910
73725ff3
DJ
149112007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14912
14913 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14914 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14915
d99f33d8
PA
149162007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14917
14918 * configure.srv (arm*-*-mingw32ce*): Move near the other
14919 arm targets.
14920
68070c10
PA
149212007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14922
2482afc6 14923 * configure.ac: Add errno checking.
68070c10
PA
14924 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14925 sys/file.h and malloc.h.
14926 (AC_CHECK_DECLS): Add perror.
14927 (srv_mingwce): Handle.
2482afc6 14928 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14929 win32-i386-low.o to srv_tgtobj.
14930 (i[34567]86-*-mingw*): Likewise.
14931 (arm*-*-mingw32ce*): Add case.
14932 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14933 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14934 [__MINGW32CE__] (strerror): New function.
14935 [__MINGW32CE__] (errno): Define to GetLastError.
14936 [__MINGW32CE__] (COUNTOF): New macro.
14937 (remote_open): Remove extra close call.
14938 * mem-break.c (delete_breakpoint_at): New function.
14939 * mem-break.h (delete_breakpoint_at): Declare.
14940 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14941 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14942 [USE_WIN32API] (read, write): Add char* casts.
14943 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14944 * server.h: Include wincecompat.h on Windows CE.
14945 [HAVE_ERRNO_H]: Check.
14946 (perror): Declare if not declared.
14947 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14948 (perror_with_name): Remove errno declaration.
14949 * wincecompat.h: New.
14950 * wincecompat.c: New.
14951 * win32-low.h: New.
14952 * win32-arm-low.c: New.
14953 * win32-i386-low.c: New.
14954 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14955 (OUTMSG2): Make it safe.
14956 (_T): New macro.
14957 (COUNTOF): New macro.
14958 (NUM_REGS): Get it from the low target.
14959 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14960 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14961 (thread_rec): Let low target handle debug registers.
14962 (child_add_thread): Likewise.
14963 (child_init_thread_list): Likewise.
14964 (continue_one_thread): Likewise.
14965 (regptr): New.
14966 (do_child_fetch_inferior_registers): Move to ...
14967 * win32-i386-low.c: ... here, and rename to ...
14968 (do_fetch_inferior_registers): ... this.
889bf7c5 14969 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14970 Go through the low target.
14971 (do_child_store_inferior_registers): Use regptr.
14972 (strwinerror): New function.
14973 (win32_create_inferior): Handle Windows CE.
14974 Use strwinerror instead of strerror on Windows error
14975 codes. Add program to the error output.
14976 Don't close the main thread handle on Windows CE.
14977 (win32_attach): Use coredll.dll on Windows CE.
14978 (win32_kill): Close current process and current
14979 thread handles.
14980 (win32_detach): Use coredll.dll on Windows CE.
14981 (win32_resume): Let low target handle debug registers, and
14982 step request.
14983 (handle_exception): Add/Remove initial breakpoint. Avoid
14984 non-existant WSTOPSIG on Windows CE.
14985 (win32_read_inferior_memory): Cast to remove warning.
14986 (win32_arch_string): Go through the low target.
14987 (initialize_low): Call set_breakpoint_data with the low
14988 target's breakpoint.
14989 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14990 FOP_REGNUM, mappings): Move to ...
14991 * win32-i386-low.c: ... here.
14992 * win32-low.c (win32_thread_info): Move to ...
14993 * win32-low.h: ... here.
14994 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14995 win32-arm-low.c and wincecompat.c.
14996 (all:): Add $EXEEXT.
14997 (install-only:): Likewise.
14998 (gdbserver:): Likewise.
14999 (gdbreplay:): Likewise.
15000 * config.in: Regenerate.
15001 * configure: Regenerate.
15002
41093d81
PA
150032007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15004
15005 * win32-low.c: Rename typedef thread_info to
15006 win32_thread_info throughout.
15007
544afa54
PA
150082007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15009
15010 * win32-i386-low.c: Rename to ...
15011 * win32-low.c: ... this.
15012 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15013 * Makefile.in: Likewise.
15014
bce7165d
PA
150152007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15016
15017 * remote-utils.c (monitor_output): Constify msg parameter.
15018 * server.h (monitor_output): Likewise.
15019 * win32-i386-low.c (handle_output_debug_string): New.
15020 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15021 handle_output_debug_string.
15022 (get_child_debug_event): Likewise.
15023
506c7aa0
DJ
150242007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15025
15026 * server.c (main): Correct strtoul check.
15027
42c81e2a
DJ
150282007-03-27 Jon Ringle <jon@ringle.org>
15029
15030 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15031
9453113a
DJ
150322007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15033
15034 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15035
64a69107
DJ
150362007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15037
15038 * terminal.h: Check HAVE_SGTTY_H.
15039
150402007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
15041
15042 * remote-utils.c (remote_open): Print out the assigned port number.
15043
c74d0ad8
DJ
150442007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15045
15046 * remote-utils.c (monitor_output): New function.
15047 * server.c (debug_threads): Define here.
15048 (monitor_show_help): New function.
15049 (handle_query): Handle qRcmd.
15050 (main): Do not handle 'd' packet.
15051 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15052 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15053 of debug_threads.
15054
de7c3b4a
PA
150552007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15056
15057 * Makefile.in (EXEEXT): New.
15058 (clean): Use $(EXEEXT).
15059
ef57601b
PA
150602007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15061
15062 * target.h (target_ops): Rename send_signal to request_interrupt,
15063 and remove enum target_signal parameter.
15064 * linux-low.c (linux_request_interrupt): Rename from
15065 linux_send_signal, and always send SIGINT.
15066 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15067 and always send SIGINT.
15068 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15069 of send_signal.
15070 (input_interrupt): Likewise.
15071
820f2bda
PA
150722007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15073
15074 * server.c (get_features_xml): Check if target implemented
15075 arch_string.
15076 * win32-i386-low.c (win32_arch_string): New.
15077 (win32_target_ops): Add win32_arch_string as arch_string member.
15078
ab39bf24
UW
150792007-02-22 Markus Deuling <deuling@de.ibm.com>
15080
15081 * spu-low.c (spu_arch_string): New.
15082 (spu_target_ops): Add spu_arch_string.
15083
61ff6e04
DJ
150842007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15085
15086 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15087 * configure.ac: Do not check for terminal.h.
15088 * configure, config.in: Regenerated.
15089
fb1e4ffc
DJ
150902007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15091
15092 * Makefile.in (OBS): Add $(XML_BUILTIN).
15093 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15094 (clean): Update.
15095 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15096 (arm-with-iwmmxt.c): New.
15097 * config.in, configure: Regenerate.
15098 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15099 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15100 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15101 (arm*-*-linux*): Add iWMMXt and regset support.
15102 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15103 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15104 (arm_store_wmmxregset, target_regsets): New.
15105 * server.c (get_features_xml): Take annex argument. Check builtin
15106 XML documents.
15107 (handle_query): Handle multiple annexes.
15108
0f48aa01
DJ
151092007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15110
15111 * remote-utils.c [USE_WIN32API] (read, write): Define.
15112 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15113 write.
15114
23181151
DJ
151152007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15116
15117 * linux-i386-low.c (the_low_target): Set arch_string.
15118 * linux-x86-64-low.c (the_low_target): Likewise.
15119 * linux-low.c (linux_arch_string): New.
15120 (linux_target_ops): Add it.
15121 * linux-low.h (struct linux_target_ops): Add arch_string.
15122 * server.c (write_qxfer_response): Use const void * for DATA.
15123 (get_features_xml): New.
15124 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15125 * target.h (struct target_ops): Add arch_string method.
15126
9d606399
DJ
151272007-01-03 Denis Pilat <denis.pilat@st.com>
15128 Daniel Jacobowitz <dan@codesourcery.com>
15129
15130 * linux-low.c (linux_kill): Handle being called with no threads.
15131 * win32-i386-low.c (win32_kill): Likewise.
15132 (get_child_debug_event): Clear current_process_handle.
15133
151342006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
15135 Daniel Jacobowitz <dan@codesourcery.com>
15136
15137 * remote-utils.c (remote_open): Check the type of specified
15138 serial port devices before opening them.
15139 * server.c (main): Kill the inferior if an error occurs during
15140 the first remote_open.
15141
a5e13d24
DJ
151422006-12-05 Markus Deuling <deuling@de.ibm.com>
15143
15144 * README: Update supported targets.
15145
186947f7
DJ
151462006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15147
15148 * Makefile.in (clean): Remove reg-mips64.c.
15149 (reg-mips64.c, reg-mips64.o): New rules.
15150 * configure.srv: Handle mips64. Include regset support for mips.
15151 * linux-mips-low.c (union mips_register): New.
15152 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15153 (mips_breakpoint, mips_breakpoint_at): Use int.
15154 (mips_collect_register, mips_supply_register)
15155 (mips_collect_register_32bit, mips_supply_register_32bit)
15156 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15157 (mips_store_fpregset, target_regsets): New.
15158 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15159
a13e2c95
UW
151602006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15161
15162 * configure.srv: Add target "spu*-*-*".
15163 * Makefile.in (clean): Remove reg-spu.c.
15164 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15165 * spu-low.c: New file.
15166
cb7283db
DJ
151672006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15168
15169 * configure.ac: Correct td_thr_tls_get_addr test.
15170 * configure: Regenerated.
15171
89be2091
DJ
151722006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15173
15174 * linux-low.c (linux_wait_for_event): Reformat. Use the
15175 pass_signals array.
15176 * remote-utils.c (decode_address_to_semicolon): New.
15177 * server.c (pass_signals, handle_general_set): New.
15178 (handle_query): Mention QPassSignals for qSupported.
15179 (main): Call handle_general_set.
15180 * server.h (pass_signals, decode_address_to_semicolon): New.
15181
000ef4f0
DJ
151822006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15183
15184 * server.c (handle_query): Correct error handling for read_auxv.
15185
b7149293
UW
151862005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15187
15188 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15189 and srv_linux_thread_db to yes.
15190 * linux-s390-low.c (s390_fill_gregset): New function.
15191 (target_regsets): Define data structure.
15192
dae5f5cf
DJ
151932006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15194
15195 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15196 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15197 * config.in, configure: Regenerated.
15198 * inferiors.c (gdb_id_to_thread): New function.
15199 (gdb_id_to_thread_id): Use it.
15200 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15201 * linux-low.h (struct process_info): Add th member.
15202 (thread_db_get_tls_address): New prototype.
15203 * remote-utils.c (decode_address): Make non-static.
15204 * server.c (handle_query): Handle qGetTLSAddr.
15205 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15206 * target.h (struct target_ops): Add get_tls_address.
15207 * thread-db.c (maybe_attach_thread): Save the thread handle.
15208 (thread_db_get_tls_address): New.
15209
32ca6d61
DJ
152102006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15211
15212 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15213 (linux_resume_one_process): Take a siginfo_t *. Update all
15214 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15215 (struct pending_signals): Add a siginfo_t.
15216 (linux_wait_for_process): Always set last_status.
15217 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15218 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15219 * linux-low.h (struct process_info): Add last_status.
15220
5ffff7c1
DJ
152212006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15222
15223 * remote-utils.c (try_rle): New function.
15224 (putpkt_binary): Use it.
15225
8695c747
DJ
152262006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15227
15228 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15229 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15230 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15231 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15232 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15233 point registers.
15234
290fadea
RS
152352006-08-08 Richard Sandiford <richard@codesourcery.com>
15236
15237 * server.c (terminal_fd): New variable.
15238 (old_foreground_pgrp): Likewise.
15239 (restore_old_foreground_pgrp): New function.
15240 (start_inferior): Record the terminal file descriptor in terminal_fd
15241 and its original foreground group in old_foreground_pgrp. Register
15242 restore_old_foreground_pgrp with atexit().
15243
9f2e1e63
DJ
152442006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15245
15246 * server.c (handle_query): Correct qPart to qXfer.
15247
b80864fb
DJ
152482006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15249
15250 * configure.ac: Check for more headers which are missing on
15251 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15252 * configure.srv: Add Cygwin and mingw32.
15253 * remote-utils.c: Don't include headers unconditionally which
15254 are missing on mingw32. Include <winsock.h> for mingw32.
15255 (remote_open): Adjust for mingw32 support. Flush
15256 standard error after writing to it.
15257 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15258 (unblock_async_io, enable_async_io, disable_async_io)
15259 (readchar, getpkt): Update for Winsock support.
15260 (prepare_resume_reply): Expect a protocol signal number.
15261 * server.c: Disable <sys/wait.h> on mingw32.
15262 (start_inferior): Adjust for mingw32 support. Flush
15263 standard error after writing to it.
15264 (attach_inferior): Likewise. Use protocol signal
15265 numbers.
15266 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15267 and names.
15268 * win32-i386-low.c: New file.
15269 * Makefile.in (XM_CLIBS): Set.
15270 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15271 (win32-i386-low.o): New dependency rule.
15272 * linux-low.c (linux_wait): Use target signal numbers.
15273 * target.h (struct target_ops): Doc fix.
15274 * server.h (target_signal_to_name): New prototype.
15275 * gdbreplay.c: Don't include headers unconditionally which
15276 are missing on mingw32. Include <winsock.h> for mingw32.
15277 (remote_close, remote_open): Adjust for Winsock support.
15278 * configure, config.in: Regenerated.
15279
0876f84a
DJ
152802006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15281
15282 * server.c (decode_xfer_read, write_qxfer_response): New.
15283 (handle_query): Take a packet length argument. Handle
15284 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15285 the qSupported response.
15286 (main): Update call to handle_query.
15287
01f9e8fa
DJ
152882006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15289
15290 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15291 (putpkt_binary): Renamed from putpkt and adjusted for binary
15292 data.
15293 (putpkt): New wrapper for putpkt_binary.
15294 (readchar): Don't mask off the high bit.
15295 (decode_X_packet): New function.
15296 * server.c (main): Call putpkt_binary if a handler sets the packet
15297 length. Save the length of the incoming packet. Handle 'X'.
15298 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15299
be2a5f71
DJ
153002006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15301
15302 * server.c (handle_query): Handle qSupported.
15303
ea025f5f
DJ
153042006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15305
15306 * remote-utils.c (all_symbols_looked_up): New variable.
15307 (look_up_one_symbol): Check it.
15308 * server.h (look_up_one_symbol): New declaration.
15309 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15310
9308fc88
DJ
153112006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15312
15313 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 15314 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
15315 (PTRACE_GET_THREAD_AREA): Define.
15316 (ps_get_thread_area): New function.
15317
52fb6437
NS
153182006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15319
15320 * configure.srv (m68k*-*-uclinux*): New target.
15321 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15322 (linux_resume_one_process): Remove extraneous cast.
15323 (linux_read_offsets): New.
15324 (linux_target_op): Add linux_read_offsets on mmuless systems.
15325 * server.c (handle_query): Add qOffsets logic.
15326 * target.h (struct target_ops): Add read_offsets.
15327
21b0f40c
DJ
153282006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15329
15330 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15331 (PTRACE_GET_THREAD_AREA): Define.
15332 (ps_get_thread_area): New function.
15333 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15334 (linux-x86-64-low.o): Update.
15335
0050a760
DJ
153362006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15337
15338 * configure.ac: Remove checks for prfpregset_t.
15339 * gdb_proc_service.h: New file.
15340 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15341 new "gdb_proc_service.h".
15342 * proc-service.c: Likewise.
15343 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15344 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15345 * Makefile.in (gdb_proc_service_h): Updated.
15346 * configure, config.in: Regenerated.
15347
b92a518e
DJ
153482006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15349
15350 * remote-utils.c (prepare_resume_reply): Move declaration
15351 of gdb_id_from_wait to the top of the block.
15352
545587ee
DJ
153532006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15354
15355 * linux-low.c (regsets_store_inferior_registers): Read the regset
15356 from the target before filling it.
15357
9db87ebd
DJ
153582006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15359
15360 * server.c (attach_inferior): Return SIGTRAP for a successful
15361 attach.
15362
dd24457d
DJ
153632006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15364
15365 * Makefile.in (OBS): Add version.o.
15366 (STAGESTUFF): Delete.
15367 (version.o): Add dependencies.
15368 (version.c): Replace rule.
15369 (clean): Remove version.c.
15370 * server.c (gdbserver_version): New.
15371 (gdbserver_usage): Use printf.
15372 (main): Handle --version and --help.
15373 * server.h (version, host_name): Add declarations.
15374
6f0f660e
EZ
153752005-12-23 Eli Zaretskii <eliz@gnu.org>
15376
889bf7c5
PA
15377 * linux-arm-low.c:
15378 * linux-arm-low.c:
15379 * inferiors.c:
15380 * i387-fp.h:
15381 * i387-fp.c:
15382 * gdbreplay.c:
15383 * regcache.c:
15384 * proc-service.c:
15385 * mem-break.h:
15386 * mem-break.c:
15387 * linux-x86-64-low.c:
15388 * linux-sh-low.c:
15389 * linux-s390-low.c:
15390 * linux-ppc64-low.c:
15391 * linux-ppc-low.c:
15392 * linux-mips-low.c:
15393 * linux-m68k-low.c:
15394 * linux-m32r-low.c:
15395 * linux-low.h:
15396 * linux-low.c:
15397 * linux-ia64-low.c:
15398 * linux-i386-low.c:
15399 * linux-crisv32-low.c:
15400 * thread-db.c:
15401 * terminal.h:
15402 * target.h:
15403 * target.c:
15404 * server.h:
15405 * server.c:
15406 * remote-utils.c:
15407 * regcache.h:
15408 * utils.c:
15409 * Makefile.in:
15410 * configure.ac:
6f0f660e
EZ
15411 * gdbserver.1: Add (C) after Copyright. Update the FSF
15412 address.
15413
9d1fb177
DJ
154142005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15415
15416 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15417 (arm_breakpoint_at): Recognize both breakpoints.
15418 (the_low_target): Use the correct breakpoint instruction.
15419
011a70c2
DJ
154202005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15421
15422 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15423 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15424 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15425 (the_low_target): Update.
15426
7fb85e41
AS
154272005-10-25 Andreas Schwab <schwab@suse.de>
15428
15429 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15430
15431 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15432 (ia64_num_regs): Reduce to 462.
15433
3db0444b
DJ
154342005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15435
15436 * acinclude.m4: Correct quoting.
15437 * aclocal.m4: Regenerated.
15438
15439 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15440 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15441 (thread_db_init): Call thread_db_err_str.
15442 * configure.ac: Check for TD_VERSION.
15443 * config.in, configure: Regenerated.
15444
bee0189a
DJ
154452005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15446
15447 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15448
e9d25b98
DJ
154492005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15450
15451 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15452 is not available. Define HAVE_PTRACE_GETREGS if it is.
15453 * config.in, configure: Regenerated.
15454 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15455 * linux-i386-low.c, linux-m68k-low.c: Update to use
15456 HAVE_PTRACE_GETREGS.
15457 * linux-low.c (regsets_fetch_inferior_registers)
15458 (regsets_store_inferior_registers): Only return 0 if we processed
15459 GENERAL_REGS.
15460 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15461 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15462
a06660f7
DJ
154632005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15464
15465 * inferiors.c (struct thread_info): Add gdb_id.
15466 (add_thread): Add gdb_id argument.
15467 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15468 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15469 calls to add_thread.
15470 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15471 * server.c (handle_query): Use thread_to_gdb_id.
15472 (handle_v_cont, main): Use gdb_id_to_thread_id.
15473 * server.h (add_thread): Update prototype.
15474 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15475 prototypes.
15476
5a1f5858
DJ
154772005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15478
15479 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15480 left-padded registers.
15481 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15482 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15483
e122f1f5
SE
154842005-07-01 Steve Ellcey <sje@cup.hp.com>
15485
15486 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15487 * configure: Regenerate.
15488 * config.in: Regenerate.
15489 * server.h (NEED_DECLARATION_STRERROR):
15490 Replace with !HAVE_DECL_STRERROR.
15491
d592fa2f
DJ
154922005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15493
15494 * linux-low.c (linux_wait, linux_send_signal): Don't test
15495 an unsigned long variable for > 0 if it could be MAX_ULONG.
15496 * server.c (myresume): Likewise.
15497 * target.c (set_desired_inferior): Likewise.
15498
ccbd4912
MK
154992005-06-13 Mark Kettenis <kettenis@gnu.org>
15500
15501 * configure.ac: Simplify and improve check for socklen_t.
15502 * configure, config.in: Regenerate.
15503
f450004a
DJ
155042005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15505
15506 * acconfig.h: Remove.
15507 * configure.ac: Add a test for socklen_t. Use three-argument
15508 AC_DEFINE throughout.
15509 * config.in: Regenerated using autoheader 2.59.
15510 * configure: Regenerated.
15511
15512 * gdbreplay.c (socklen_t): Provide a default.
15513 (remote_open): Use socklen_t.
15514 * remote-utils.c (socklen_t): Provide a default.
15515 (remote_open): Use socklen_t.
15516 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15517 unsigned char.
15518
15519 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15520 char for buffers.
15521 * linux-low.c (linux_read_memory, linux_write_memory)
15522 (linux_read_auxv): Likewise.
15523 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15524 (check_mem_write): Likewise.
15525 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15526 Likewise.
15527 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15528 (registers_from_string, register_data): Likewise.
15529 * server.c (handle_query, main): Likewise.
15530 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15531 (decode_M_packet): Likewise.
15532 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15533 * target.h (struct target_ops): Update read_memory, write_memory,
15534 and read_auxv.
15535 (read_inferior_memory, write_inferior_memory): Update.
15536 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15537 to unsigned char *.
15538 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15539 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15540 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15541 linux-s390-low.c, linux-sh-low.c: Update for changes in
15542 read_inferior_memory and the_low_target->breakpoint.
15543
eee84df1
DJ
155442005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15545
15546 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15547 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15548 * configure.srv: Add powerpc64-*-linux*.
15549 * linux-ppc64-low.c: New file.
15550
45b134e5
OF
155512005-05-23 Orjan Friberg <orjanf@axis.com>
15552
15553 * linux-cris-low.c: New file with support for CRIS.
15554 * linux-crisv32-low.c: Ditto for CRISv32.
15555 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15556 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15557 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15558 reg-crisv32.o, and reg-crisv32.c to make rules.
15559 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15560 recognized targets.
15561
48d93c75
UW
155622005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15563
15564 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15565 of sizeof (PTRACE_XFER_TYPE).
15566 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15567
e013ee27
OF
155682005-05-12 Orjan Friberg <orjanf@axis.com>
15569
889bf7c5 15570 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15571 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15572 pointers for hardware watchpoint support.
15573 * linux-low.h (struct linux_target_ops): Ditto.
15574 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15575 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15576 to linux_target_ops.
15577 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15578 reply packet.
15579 * server.c (main): Recognize 'Z' and 'z' packets.
15580
b0ded00b
UW
155812005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15582
15583 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15584 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15585 (the_low_target): Add new members.
15586
8643e2ad
DJ
155872005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15588
15589 * proc-service.c (ps_lgetregs): Search all_processes instead of
15590 all_threads.
15591
fc620387
DJ
155922005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15593
15594 * server.c (start_inferior): Change return type to int.
15595 (attach_inferior): Change sigptr to int *.
15596 (handle_v_cont, handle_v_requests): Change signal to int *.
15597 (main): Change signal to int.
15598
155992005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15600
15601 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15602 * configure.srv: Add m32r*-*-linux*.
15603 * linux-m32r-low.c: New file.
15604
e0e76420
DJ
156052005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15606
15607 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15608
a1928bad
DJ
156092005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15610
15611 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15612 Take unsigned long arguments for PIDs.
15613 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15614 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15615 (wait_for_sigstop, linux_resume_one_process)
15616 (regsets_fetch_inferior_registers, linux_send_signal)
15617 (linux_read_auxv): Likewise. Update the types of variables holding
15618 PIDs. Update format string specifiers.
15619 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15620 * remote-utils.c (prepare_resume_reply): Likewise.
15621 * server.c (cont_thread, general_thread, step_thread)
15622 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15623 unsigned long.
15624 (handle_query): Update format specifiers.
15625 (handle_v_cont, main): Use strtoul for thread IDs.
15626 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15627 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15628 (general_thread, step_thread, thread_from_wait)
15629 (old_thread_from_wait): Update.
15630 * target.h (struct thread_resume): Use unsigned long for THREAD.
15631 (struct target_ops): Use unsigned long for arguments to attach and
15632 thread_alive.
15633
dcdb98d2
DJ
156342005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15635
15636 * acinclude.m4: Include bfd/bfd.m4 directly.
15637 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15638 <agriffis@toolchain.org>.
15639 * aclocal.m4, configure: Regenerated.
15640
bec39cab
AC
156412005-01-07 Andrew Cagney <cagney@gnu.org>
15642
15643 * configure.ac: Rename configure.in, require autoconf 2.59.
15644 * configure: Re-generate.
15645
434c4c77
DJ
156462004-12-08 Daniel Jacobowitz <dan@debian.org>
15647
15648 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15649 LIBS when finished.
15650 * aclocal.m4: Regenerated.
15651 * configure: Regenerated.
15652
db1d3e1b
AS
156532004-11-21 Andreas Schwab <schwab@suse.de>
15654
15655 * linux-m68k-low.c (m68k_num_gregs): Define.
15656 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15657 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15658 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15659 (m68k_breakpoint_at): New. Add to the_low_target.
15660
15661 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15662 srv_linux_thread_db to yes.
15663
43360365
JB
156642004-10-20 Joel Brobecker <brobecker@gnat.com>
15665
15666 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15667 (ARCH_SET_FS): Likewise.
15668 (ARCH_GET_FS): Likewise.
15669 (ARCH_GET_GS): Likewise.
15670
fd500816
DJ
156712004-10-16 Daniel Jacobowitz <dan@debian.org>
15672
15673 * linux-i386-low.c (ps_get_thread_area): New.
15674 * linux-x86-64-low.c (ps_get_thread_area): New.
15675 * linux-low.c: Include <sys/syscall.h>.
15676 (linux_kill_one_process): Don't kill the first thread here.
15677 (linux_kill): Kill the first thread here.
15678 (kill_lwp): New function.
15679 (send_sigstop, linux_send_signal): Use it.
15680 * proc-service.c: Clean up #ifdefs.
15681 (fpregset_info): Delete.
15682 (ps_lgetregs): Update and enable implementation.
15683 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15684 implementations.
15685 * remote-utils.c (struct sym_cache, symbol_cache): New.
15686 (input_interrupt): Print a clearer message.
15687 (async_io_enabled): New variable.
15688 (enable_async_io, disable_async_io): Use it. Update comments.
15689 (look_up_one_symbol): Use the symbol cache.
15690 * thread-db.c (thread_db_look_up_symbols): New function.
15691 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15692
f6de3c42
DJ
156932004-10-16 Daniel Jacobowitz <dan@debian.org>
15694
15695 * configure.in: Test for -rdynamic.
15696 * configure: Regenerated.
15697 * Makefile (INTERNAL_LDFLAGS): New.
15698 (gdbserver, gdbreplay): Use it.
15699
2c0fc042
AC
157002004-09-02 Andrew Cagney <cagney@gnu.org>
15701
15702 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15703
075b3282
DJ
157042004-03-23 Daniel Jacobowitz <drow@mvista.com>
15705
15706 * linux-low.c (linux_wait): Clear all_processes list also.
15707
fa6a77dc
DJ
157082004-03-12 Daniel Jacobowitz <drow@mvista.com>
15709
15710 * linux-low.c: Include <errno.h>. Remove extern declaration of
15711 errno.
15712
6d782a97
DJ
157132004-03-12 Daniel Jacobowitz <drow@mvista.com>
15714
15715 * gdbreplay.c, server.h, utils.c: Update copyright years.
15716
3a7fb99b
DJ
157172004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15718
15719 * server.c (main): Print child status or termination signal from
15720 variable 'signal', not 'sig'.
15721
c3e735a6
DJ
157222004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15723
15724 * linux-low.c (linux_read_memory): Change return type to
15725 int. Check for and return error from ptrace().
15726 * target.c (read_inferior_memory): Change return type to int. Pass
15727 back return status from the_target->read_memory().
15728 * target.h (struct target_ops): Adapt *read_memory() prototype.
15729 Update comment.
15730 (read_inferior_memory): Adapt prototype.
15731 * server.c (main): Return an error packet if
15732 read_inferior_memory() returns an error.
15733
a59d1c82
DJ
157342004-03-04 Daniel Jacobowitz <drow@mvista.com>
15735
15736 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15737 Unify with other clean targets.
15738
dc3f8883
DJ
157392004-02-29 Daniel Jacobowitz <drow@mvista.com>
15740
15741 * server.c (handle_v_cont): Call set_desired_inferior.
15742
89a208da
DJ
157432004-02-29 Daniel Jacobowitz <drow@mvista.com>
15744
15745 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15746
62ea82f5
DJ
157472004-02-29 Daniel Jacobowitz <drow@mvista.com>
15748
15749 * linux-low.c (linux_wait): Unblock async I/O.
15750 (linux_resume): Block and enable async I/O.
15751 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15752 * server.h (block_async_io, unblock_async_io): Add prototypes.
15753
6910d122
DJ
157542004-02-29 Daniel Jacobowitz <drow@mvista.com>
15755
15756 * remote-utils.c (remote_open): Print a status notice after
15757 opening a TCP port.
15758 * server.c (attach_inferior): Print a status notice after
15759 attaching.
15760
157612004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15762
15763 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15764
c89dc5d4
DJ
157652004-02-26 Daniel Jacobowitz <drow@mvista.com>
15766
15767 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15768 error packet.
15769 * server.c, target.h: Update copyright years.
15770
4b8dad4a
RM
157712004-02-25 Roland McGrath <roland@redhat.com>
15772
15773 * target.h (struct target_ops): New member `read_auxv'.
15774 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15775 * linux-low.c (linux_read_auxv): New function.
15776 (linux_target_ops): Initialize `read_auxv' member to that.
15777
d7446758
JB
157782004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15779
15780 Committed by Jim Blandy <jimb@redhat.com>.
15781
15782 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15783 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15784 instead of GPR_SIZE to distiguish s390 and s390x targets.
15785
5544ad89
DJ
157862004-01-31 Daniel Jacobowitz <drow@mvista.com>
15787
15788 * linux-low.c: Update copyright year.
15789 (check_removed_breakpoint): Clear pending_is_breakpoint.
15790 (linux_set_resume_request, linux_queue_one_thread)
15791 (resume_status_pending_p): New functions.
15792 (linux_continue_one_thread): Use process->resume.
15793 (linux_resume): Only resume threads if there are no pending events.
15794 * linux-low.h (struct process_info): Add resume request
15795 pointer.
15796
2a68b70e
DJ
157972004-01-30 Daniel Jacobowitz <drow@mvista.com>
15798
15799 * regcache.c (new_register_cache): Clear the allocated register
15800 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15801
64386c31
DJ
158022003-10-13 Daniel Jacobowitz <drow@mvista.com>
15803
15804 * linux-low.c (linux_resume): Take a struct thread_resume *
15805 argument.
15806 (linux_wait): Update call.
15807 (resume_ptr): New static variable.
15808 (linux_continue_one_thread): Renamed from
15809 linux_continue_one_process. Use resume_ptr.
15810 (linux_resume): Use linux_continue_one_thread.
15811 * server.c (handle_v_cont, handle_v_requests): New functions.
15812 (myresume): New function.
15813 (main): Handle 'v' case.
15814 * target.h (struct thread_resume): New type.
15815 (struct target_ops): Change argument of "resume" to struct
15816 thread_resume *.
15817 (myresume): Delete macro.
15818
c938e9b0
L
158192003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15820
15821 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15822 (uninstall): Support DESTDIR.
15823
7f313d07
BC
15824Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15825
15826 * configure.srv: Add xscale*linux copy of arm*linux entry.
15827
3b2fc2ea
DJ
158282003-07-24 Daniel Jacobowitz <drow@mvista.com>
15829
15830 * linux-arm-low.c (arm_reinsert_addr): New function.
15831 (the_low_target): Add arm_reinsert_addr.
15832
1c0a559e
MK
158332003-07-08 Mark Kettenis <kettenis@gnu.org>
15834
15835 * mem-break.c: Remove whitespace at end of file.
15836
43d5792c
DJ
158372003-06-28 Daniel Jacobowitz <drow@mvista.com>
15838
15839 * configure.in: Check whether we need to prototype strerror.
15840 * server.h: Optionally prototype strerror.
15841 * gdbreplay.c (perror_with_name): Use strerror.
15842 * linux-low.c (linux_attach_lwp): Use strerror.
15843 * utils.c (perror_with_name): Use strerror.
15844 * config.in, configure: Regenerated.
15845
c8a86edf
DJ
158462003-06-28 Daniel Jacobowitz <drow@mvista.com>
15847
15848 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15849 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15850
73d37363
DJ
158512003-06-20 Daniel Jacobowitz <drow@mvista.com>
15852
15853 * Makefile.in (SFILES): Update.
15854 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15855 low-sun3.c: Remove files.
15856
6ad8ae5c
DJ
158572003-06-17 Daniel Jacobowitz <drow@mvista.com>
15858
15859 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15860 (linux_detach_one_process, linux_detach): New functions.
15861 (linux_target_ops): Add linux_detach.
15862 * server.c (main): Handle 'D' packet.
15863 * target.h (struct target_ops): Add "detach" member.
15864 (detach_inferior): Define.
15865
1581182a
MK
158662003-06-13 Mark Kettenis <kettenis@gnu.org>
15867
15868 From Kelley Cook <kelleycook@wideopenwest.com>:
15869 * configure.srv: Accept i[34567]86 variants.
15870
e5379b03
DJ
158712003-06-05 Daniel Jacobowitz <drow@mvista.com>
15872
15873 * linux-low.c (linux_wait_for_event): Correct comment typos.
15874 (linux_resume_one_process): Call check_removed_breakpoint.
15875 (linux_send_signal): New function.
15876 (linux_target_ops): Add linux_send_signal.
15877 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15878 of kill.
15879 * target.h (struct target_ops): Add send_signal.
15880
2ff29de4
JB
158812003-05-29 Jim Blandy <jimb@redhat.com>
15882
15883 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15884 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15885 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15886 away part of the register's value.
15887
254787d4
DJ
158882003-03-26 Daniel Jacobowitz <drow@mvista.com>
15889
15890 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15891 (linux_wait_for_event, linux_init_signals): Likewise.
15892
94e10508
DJ
158932003-03-17 Daniel Jacobowitz <drow@mvista.com>
15894
15895 * configure.in: Check for stdlib.h.
15896 * configure: Regenerated.
15897 * config.in: Regenerated.
15898
4c0711e0
DJ
158992003-01-04 Andreas Schwab <schwab@suse.de>
15900
15901 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15902
ef66e766
AC
159032003-01-02 Andrew Cagney <ac131313@redhat.com>
15904
15905 * Makefile.in: Remove obsolete code.
15906
a1358604
DJ
159072002-11-20 Daniel Jacobowitz <drow@mvista.com>
15908
15909 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15910 defined(PT_FPR0_HI).
15911
23ce3b1c
DJ
159122002-11-17 Stuart Hughes <seh@zee2.com>
15913
15914 * linux-arm-low.c (arm_num_regs): Increase.
15915 (arm_regmap): Include status register.
15916
159172002-11-17 Daniel Jacobowitz <drow@mvista.com>
15918
15919 * linux-low.c (register_addr): Remove incorrect -1 check.
15920
a9fa9f7d
DJ
159212002-08-29 Daniel Jacobowitz <drow@mvista.com>
15922
15923 * linux-low.c (linux_create_inferior): Call setpgid. Return
15924 the new PID.
15925 (unstopped_p, linux_signal_pid): Remove.
15926 (linux_target_ops): Remove linux_signal_pid.
15927 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15928 global instead of target method.
15929 * target.h (struct target_ops): Remove signal_pid. Update comment
15930 for create_inferior.
15931 * server.c (signal_pid): New variable.
15932 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15933 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15934 (attach_inferior): Set signal_pid.
15935
17574093
DJ
159362002-08-23 Daniel Jacobowitz <drow@mvista.com>
15937
15938 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15939
159402002-08-20 Jim Blandy <jimb@redhat.com>
15941
15942 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15943 default for this.
15944
159452002-08-01 Andrew Cagney <cagney@redhat.com>
15946
15947 * Makefile.in: Make chill references obsolete.
15948
159492002-07-24 Kevin Buettner <kevinb@redhat.com>
15950
15951 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15952 * configure: Regenerate.
15953 * config.in: Regenerate.
15954
159552002-07-09 David O'Brien <obrien@FreeBSD.org>
15956
15957 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15958 (perror_with_name, remote_close, remote_open, expect, play): Static.
15959
159602002-07-04 Michal Ludvig <mludvig@suse.cz>
15961
4b8dad4a 15962 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15963 byte offsets instead of an array of indexes.
15964 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15965
159662002-06-13 Daniel Jacobowitz <drow@mvista.com>
15967
15968 * regcache.c: Add comment.
15969
159702002-06-11 Daniel Jacobowitz <drow@mvista.com>
15971
15972 * thread-db.c: New file.
15973 * proc-service.c: New file.
15974 * acinclude.m4: New file.
15975 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15976 proc-service.o, and thread-db.o.
15977 (linux-low.o): Add USE_THREAD_DB.
15978 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15979 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15980 * aclocal.m4: Regenerated.
15981 * config.in: Regenerated.
15982 * configure: Regenerated.
15983 * configure.in: Check for proc_service.h, sys/procfs.h,
15984 thread_db.h, and linux/elf.h headrs.
15985 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15986 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15987 Check for -lthread_db and thread support.
15988 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15989 PowerPC, and SuperH.
15990 * i387-fp.c: Constify arguments.
15991 * i387-fp.h: Likewise.
15992 * inferiors.c: (struct thread_info): Renamed from
15993 `struct inferior_info'. Remove PID member. Use generic inferior
15994 list header. All uses updated.
15995 (inferiors, signal_pid): Removed.
15996 (all_threads): New variable.
15997 (get_thread): Define.
15998 (add_inferior_to_list): New function.
15999 (for_each_inferior): New function.
16000 (change_inferior_id): New function.
16001 (add_inferior): Removed.
16002 (remove_inferior): New function.
16003 (add_thread): New function.
16004 (free_one_thread): New function.
16005 (remove_thread): New function.
16006 (clear_inferiors): Use for_each_inferior and free_one_thread.
16007 (find_inferior): New function.
16008 (find_inferior_id): New function.
16009 (inferior_target_data): Update argument type.
16010 (set_inferior_target_data): Likewise.
16011 (inferior_regcache_data): Likewise.
16012 (set_inferior_regcache_data): Likewise.
16013 * linux-low.c (linux_bp_reinsert): Remove.
16014 (all_processes, stopping_threads, using_thrads)
16015 (struct pending_signals, debug_threads, pid_of): New.
16016 (inferior_pid): Replace with macro.
16017 (struct inferior_linux_data): Remove.
16018 (get_stop_pc, add_process): New functions.
16019 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16020 Use add_process and add_thread.
16021 (linux_attach_lwp): New function, based on old linux_attach. Use
16022 add_process and add_thread. Set stop_expected for new threads.
16023 (linux_attach): New function.
16024 (linux_kill_one_process): New function.
16025 (linux_kill): Kill all LWPs.
16026 (linux_thread_alive): Use find_inferior_id.
16027 (check_removed_breakpoints, status_pending_p): New functions.
16028 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16029 Update. Use WNOHANG. Wait for cloned processes also. Update process
16030 struct for the found process.
16031 (linux_wait_for_event): New function.
16032 (linux_wait): Use it. Support LWPs.
16033 (send_sigstop, wait_for_sigstop, stop_all_processes)
16034 (linux_resume_one_process, linux_continue_one_process): New functions.
16035 (linux_resume): Support LWPs.
16036 (REGISTER_RAW_SIZE): Remove.
16037 (fetch_register): Use register_size instead. Call supply_register.
16038 (usr_store_inferior_registers): Likewise. Call collect_register.
16039 Fix recursive case.
16040 (regsets_fetch_inferior_registers): Improve error message.
16041 (regsets_store_inferior_registers): Add debugging.
16042 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16043 (unstopped_p, linux_signal_pid): New functions.
16044 (linux_target_ops): Add linux_signal_pid.
16045 (linux_init_signals): New function.
16046 (initialize_low): Call it. Initialize using_threads.
16047 * regcache.c (inferior_regcache_data): Add valid
16048 flag.
16049 (get_regcache): Fetch registers lazily. Add fetch argument
16050 and update all callers.
16051 (regcache_invalidate_one, regcache_invalidate): New
16052 functions.
16053 (new_register_cache): Renamed from create_register_cache.
16054 Return the new regcache.
16055 (free_register_cache): Change argument to a void *.
16056 (registers_to_string, registers_from_string): Call get_regcache
16057 with fetch flag set.
16058 (register_data): Make static. Pass fetch flag to get_regcache.
16059 (supply_register): Call get_regcache with fetch flag clear.
16060 (collect_register): Call get_regcache with fetch flag set.
16061 (collect_register_as_string): New function.
16062 * regcache.h: Update.
16063 * remote-utils.c (putpkt): Flush after debug output and use
16064 stderr.
16065 Handle input interrupts while waiting for an ACK.
16066 (input_interrupt): Use signal_pid method.
16067 (getpkt): Flush after debug output and use stderr.
16068 (outreg): Use collect_register_as_string.
16069 (new_thread_notify, dead_thread_notify): New functions.
16070 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16071 and general_thread.
16072 (look_up_one_symbol): Flush after debug output.
16073 * server.c (step_thread, server_waiting): New variables.
16074 (start_inferior): Don't use signal_pid. Update call to mywait.
16075 (attach_inferior): Update call to mywait.
16076 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16077 (main): Don't fetch/store registers explicitly. Use
16078 set_desired_inferior. Support proposed ``Hs'' packet. Update
16079 calls to mywait.
16080 * server.h: Update.
16081 (struct inferior_list, struct_inferior_list_entry): New.
16082 * target.c (set_desired_inferior): New.
16083 (write_inferior_memory): Constify.
16084 (mywait): New function.
16085 * target.h: Update.
16086 (struct target_ops): New signal_pid method.
16087 (mywait): Removed macro, added prototype.
16088
16089 * linux-low.h (regset_func): Removed.
16090 (regset_fill_func, regset_store_func): New.
16091 (enum regset_type): New.
16092 (struct regset_info): Add type field. Use new operation types.
16093 (struct linux_target_ops): stop_pc renamed to get_pc.
16094 Add decr_pc_after_break and breakpoint_at.
16095 (get_process, get_thread_proess, get_process_thread)
16096 (strut process_info, all_processes, linux_attach_lwp)
16097 (thread_db_init): New.
16098
16099 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16100 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16101 (the_low_target): Add new members.
16102 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16103 (i386_store_fpxregset): Constify.
16104 (target_regsets): Add new kind identifier.
16105 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16106 (i386_set_pc): Add debugging.
16107 (i386_breakpoint_at): New function.
16108 (the_low_target): Add new members.
16109 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16110 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16111 (mips_breakpoint_at): New.
16112 (the_low_target): Add new members.
16113 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16114 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16115 (the_low_target): Add new members.
16116 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16117 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16118 (the_low_target): Add new members.
16119 * linux-x86-64-low.c (target_regsets): Add new kind
16120 identifier.
16121
161222002-05-15 Daniel Jacobowitz <drow@mvista.com>
16123
16124 From Martin Pool <mbp@samba.org>:
16125 * server.c (gdbserver_usage): New function.
16126 (main): Call it.
16127
161282002-05-14 Daniel Jacobowitz <drow@mvista.com>
16129
16130 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16131 stop_at -> stop_pc.
16132
161332002-05-04 Andrew Cagney <ac131313@redhat.com>
16134
16135 * Makefile.in: Remove obsolete code.
16136
161372002-04-24 Michal Ludvig <mludvig@suse.cz>
16138
16139 * linux-low.c (regsets_fetch_inferior_registers),
16140 (regsets_store_inferior_registers): Removed cast to int from
16141 ptrace() calls.
16142 * regcache.h: Added declaration of struct inferior_info.
16143
161442002-04-20 Daniel Jacobowitz <drow@mvista.com>
16145
16146 * inferiors.c (struct inferior_info): Add regcache_data.
16147 (add_inferior): Call create_register_cache.
16148 (clear_inferiors): Call free_register_cache.
16149 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16150 * regcache.c (struct inferior_regcache_data): New.
16151 (registers): Remove.
16152 (get_regcache): New function.
16153 (create_register_cache, free_register_cache): New functions.
16154 (set_register_cache): Don't initialize the register cache here.
16155 (registers_to_string, registers_from_string, register_data): Call
16156 get_regcache.
16157 * regcache.h: Add prototypes.
16158 * server.h: Likewise.
16159
161602002-04-20 Daniel Jacobowitz <drow@mvista.com>
16161
16162 * mem-break.c: New file.
16163 * mem-break.h: New file.
16164 * Makefile.in: Add mem-break.o rule; update server.h
16165 dependencies.
16166 * inferiors.c (struct inferior_info): Add target_data
16167 member.
16168 (clear_inferiors): Free target_data member if set.
16169 (inferior_target_data, set_inferior_target_data): New functions.
16170 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16171 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16172 * linux-low.c (linux_bp_reinsert): New variable.
16173 (struct inferior_linux_data): New.
16174 (linux_create_inferior): Use set_inferior_target_data.
16175 (linux_attach): Likewise. Call add_inferior.
16176 (linux_wait_for_one_inferior): New function.
16177 (linux_wait): Call it.
16178 (linux_write_memory): Add const.
16179 (initialize_low): Call set_breakpoint_data.
16180 * linux-low.h (struct linux_target_ops): Add breakpoint
16181 handling members.
16182 * server.c (attach_inferior): Remove extra add_inferior
16183 call.
16184 * server.h: Include mem-break.h. Update inferior.c
16185 prototypes.
16186 * target.c (read_inferior_memory)
16187 (write_inferior_memory): New functions.
16188 * target.h (read_inferior_memory)
16189 (write_inferior_memory): Change macros to prototypes.
16190 (struct target_ops): Update comments. Add const to write_memory
16191 definition.
16192
161932002-04-11 Daniel Jacobowitz <drow@mvista.com>
16194
16195 * linux-low.c (usr_store_inferior_registers): Support
16196 registers which are allowed to fail to store.
16197 * linux-low.h (linux_target_ops): Likewise.
16198 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16199 (ppc_cannot_store_register): FPSCR may not be storable.
16200
162012002-04-09 Daniel Jacobowitz <drow@mvista.com>
16202
16203 * server.h: Include <string.h> if HAVE_STRING_H.
16204 * ChangeLog: Correct paths in last ChangeLog entry.
16205
162062002-04-09 Daniel Jacobowitz <drow@mvista.com>
16207
16208 * linux-low.h: Remove obsolete prototypes.
16209 (struct linux_target_ops): New.
16210 (extern the_low_target): New.
16211 * linux-low.c (num_regs, regmap): Remove declarations.
16212 (register_addr): Use the_low_target explicitly.
16213 (fetch_register): Likewise.
16214 (usr_fetch_inferior_registers): Likewise.
16215 (usr_store_inferior_registers): Likewise.
16216 * linux-arm-low.c (num_regs): Remove.
16217 (arm_num_regs): Define.
16218 (arm_regmap): Renamed from regmap, made static.
16219 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16220 made static.
16221 (arm_cannot_store_register): Renamed from cannot_store_register,
16222 made static.
16223 (the_low_target): New.
16224 * linux-i386-low.c (num_regs): Remove.
16225 (i386_num_regs): Define.
16226 (i386_regmap): Renamed from regmap, made static.
16227 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16228 made static.
16229 (i386_cannot_store_register): Renamed from cannot_store_register,
16230 made static.
16231 (the_low_target): New.
16232 * linux-ia64-low.c (num_regs): Remove.
16233 (ia64_num_regs): Define.
16234 (ia64_regmap): Renamed from regmap, made static.
16235 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16236 made static.
16237 (ia64_cannot_store_register): Renamed from cannot_store_register,
16238 made static.
16239 (the_low_target): New.
16240 * linux-m68k-low.c (num_regs): Remove.
16241 (m68k_num_regs): Define.
16242 (m68k_regmap): Renamed from regmap, made static.
16243 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16244 made static.
16245 (m68k_cannot_store_register): Renamed from cannot_store_register,
16246 made static.
16247 (the_low_target): New.
16248 * linux-mips-low.c (num_regs): Remove.
16249 (mips_num_regs): Define.
16250 (mips_regmap): Renamed from regmap, made static.
16251 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16252 made static.
16253 (mips_cannot_store_register): Renamed from cannot_store_register,
16254 made static.
16255 (the_low_target): New.
16256 * linux-ppc-low.c (num_regs): Remove.
16257 (ppc_num_regs): Define.
16258 (ppc_regmap): Renamed from regmap, made static.
16259 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16260 made static.
16261 (ppc_cannot_store_register): Renamed from cannot_store_register,
16262 made static.
16263 (the_low_target): New.
16264 * linux-s390-low.c (num_regs): Remove.
16265 (s390_num_regs): Define.
16266 (s390_regmap): Renamed from regmap, made static.
16267 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16268 made static.
16269 (s390_cannot_store_register): Renamed from cannot_store_register,
16270 made static.
16271 (the_low_target): New.
16272 * linux-sh-low.c (num_regs): Remove.
16273 (sh_num_regs): Define.
16274 (sh_regmap): Renamed from regmap, made static.
16275 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16276 made static.
16277 (sh_cannot_store_register): Renamed from cannot_store_register,
16278 made static.
16279 (the_low_target): New.
16280 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16281 (the_low_target): New.
16282
162832002-04-09 Daniel Jacobowitz <drow@mvista.com>
16284
16285 * Makefile.in: Add stamp-h target.
16286 * configure.in: Create stamp-h.
16287 * configure: Regenerated.
16288
162892002-04-09 Daniel Jacobowitz <drow@mvista.com>
16290
16291 * inferiors.c: New file.
16292 * target.c: New file.
16293 * target.h: New file.
16294 * Makefile.in: Add target.o and inferiors.o. Update
16295 dependencies.
16296 * linux-low.c (inferior_pid): New static variable,
16297 moved from server.c.
16298 (linux_create_inferior): Renamed from create_inferior.
16299 Call add_inferior. Return 0 on success instead of a PID.
16300 (linux_attach): Renamed from myattach.
16301 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16302 (linux_thread_alive): Renamed from mythread_alive.
16303 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16304 child dies.
16305 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16306 (regsets_store_inferior_registers): Correct error message.
16307 Add missing ``return 0''.
16308 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16309 (linux_store_registers): Renamed from store_inferior_registers.
16310 (linux_read_memory): Renamed from read_inferior_memory.
16311 (linux_write_memory): Renamed from write_inferior_memory.
16312 (linux_target_ops): New structure.
16313 (initialize_low): Call set_target_ops ().
16314 * remote-utils.c (unhexify): New function.
16315 (hexify): New function.
16316 (input_interrupt): Send signals to ``signal_pid''.
16317 * server.c (inferior_pid): Remove.
16318 (start_inferior): Update create_inferior call.
16319 (attach_inferior): Call add_inferior.
16320 (handle_query): New function.
16321 (main): Call handle_query for `q' packets.
16322 * server.h: Include "target.h". Remove obsolete prototypes.
16323 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16324
163252002-04-09 Daniel Jacobowitz <drow@mvista.com>
16326
16327 * Makefile.in: Add WARN_CFLAGS. Update configury
16328 dependencies.
16329 * configure.in: Check for <string.h>
16330 * configure: Regenerate.
16331 * config.in: Regenerate.
16332 * gdbreplay.c: Include needed system headers.
16333 (remote_open): Remove strchr prototype.
16334 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16335 * regcache.c (supply_register): Change buf argument to const void *.
16336 (supply_register_by_name): Likewise.
16337 (collect_register): Change buf argument to void *.
16338 (collect_register_by_name): Likewise.
16339 * regcache.h: Add missing prototypes.
16340 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16341 * server.c (handle_query): New function.
16342 (attached): New static variable, moved out of main.
16343 (main): Quiet longjmp clobber warnings.
16344 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16345 * utils.c (error): Remove NORETURN.
16346 (fatal): Likewise.