]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
S390: gdbserver: Don't write guarded storage registers
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
c49bd90b
AA
12018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2
3 * linux-s390-low.c (s390_fill_gs): Remove function.
4 (s390_fill_gsbc): Remove function.
5 (s390_regsets): Set fill functions for the guarded storage regsets
6 to NULL.
7
7edb9bd3
AA
82018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
9
10 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
11 the word size. Add comment.
12 (s390_get_wordsize): New function.
13 (s390_arch_setup): No longer select a temporary tdesc to fetch the
14 pswm with it. Instead, use s390_get_wordsize to determine the
15 word size first and derive the correct tdesc from that directly.
16
39be3c7e
SM
172018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
18
19 * Makefile.in: Include silent-rules.mk.
20 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
21 (COMPILE): Add ECHO_CXX.
22 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
23 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
24 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
25 (version-generated.c): Add ECHO_GEN.
26 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
27 (IPAGENT_COMPILE): Add ECHO_CXX.
28 (%-generated.c): Add ECHO_REGDAT.
29
3ae9ce5d
TT
302018-03-14 Tom Tromey <tom@tromey.com>
31
32 PR cli/14977:
33 * ax.c (ax_printf): Special case for NULL.
34
e6a58aa8
SM
352018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
36
37 * linux-low.c (linux_qxfer_libraries_svr4): Use
38 xml_escape_text_append.
39
f6e8a41e
SM
402018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
41
42 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
43
b9671caf
SM
442018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
45
46 * server.c (handle_general_set): Remove unnecessary xstrdup.
47
e80aaf61
SM
482018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
49
50 * server.c (parse_debug_format_options): Adjust to
51 delim_string_to_char_ptr_vec changes.
52 * thread-db.c (thread_db_load_search): Adjust to
53 dirnames_to_char_ptr_vec changes.
54
b1223e78
MM
552018-03-01 Markus Metzger <markus.t.metzger@intel.com>
56
57 * target.h (target_enable_btrace, target_disable_btrace)
58 (target_read_btrace, target_read_btrace_conf): Turn macro into
59 inline function. Throw error if target method is not defined.
60 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
61 check for btrace target method. Be prepared to handle exceptions
62 from btrace target methods.
63
81561546
SDJ
642018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
65
66 * server.c (captured_main): Change order of error message printed
67 when the current working directory cannot be found.
68
25e3c82c
SDJ
692018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
70
71 * server.c: Include "filenames.h" and "pathstuff.h".
72 (program_name): Delete variable.
73 (program_path): New anonymous class.
74 (get_exec_wrapper): Use "program_path" instead of
75 "program_name".
76 (handle_v_run): Likewise.
77 (captured_main): Likewise.
78 (process_serial_event): Likewise.
79
b4987c95
SDJ
802018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
81
82 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
83 (OBJS): Add "pathstuff.o".
84 * server.c (current_directory): New global variable.
85 (captured_main): Initialize "current_directory".
86
f46cd62a
AH
872018-02-26 Alan Hayward <alan.hayward@arm.com>
88
89 * tdesc.c: Use common/tdesc.h.
90 * tdesc.h: Likewise.
91
a543c5ca
AH
922018-02-20 Alan Hayward <alan.hayward@arm.com>
93 Simon Marchi <simon.marchi@ericsson.com>
94
95 * Makefile.in: Switch order of make rules.
96
b5884fa7
AH
972018-02-19 Alan Hayward <alan.hayward@arm.com>
98
99 * Makefile.in: Add common directory in build.
100 * configure.ac: Add common reference.
101 * configure: Regenerate.
102
de6242d3
MM
1032018-02-09 Markus Metzger <markus.t.metzger@intel.com>
104
105 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
106 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
107 * spu-low.c (spu_target_ops): Likewise.
108 * win32-low.c (win32_target_ops): Likewise.
109 * server.c (supported_btrace_packets): Report packets unconditionally.
110 * target.h (target_ops) <supports_btrace>: Remove.
111 (target_supports_btrace): Remove.
112
9ee23a85
MM
1132018-02-09 Markus Metzger <markus.t.metzger@intel.com>
114
115 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
116 (handle_btrace_disable): Change return type to void. Use exceptions
117 to report errors.
118 (handle_btrace_general_set): Catch exception and copy message to
119 return message.
120
8ce47547
TT
1212018-02-08 Tom Tromey <tom@tromey.com>
122
123 * linux-low.c (install_software_single_step_breakpoints): Use
124 make_scoped_restore.
125 * inferiors.c (make_cleanup_restore_current_thread): Remove.
126 (do_restore_current_thread_cleanup): Remove.
127 * gdbthread.h (make_cleanup_restore_current_thread): Don't
128 declare.
129
45dd3607
TT
1302018-02-08 Tom Tromey <tom@tromey.com>
131
132 * mem-break.c (set_raw_breakpoint_at): Use
133 gdb::unique_xmalloc_ptr.
134
e671cd59
PA
1352018-01-30 Pedro Alves <palves@redhat.com>
136
137 PR gdb/13211
138 * target.c (target_terminal::terminal_state): Rename to ...
139 (target_terminal::m_terminal_state): ... this.
140
a0aad537
JC
1412018-01-19 James Clarke <jrtc27@jrtc27.com>
142
143 * linux-low.c (handle_extended_wait): Surround call to
144 thread_db_notice_clone with #ifdef USE_THREAD_DB.
145
4d9b86e1
SM
1462018-01-17 Simon Marchi <simon.marchi@ericsson.com>
147
148 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
149 linux_ptrace_attach_fail_reason_string now returning an
150 std::string.
151 (linux_attach): Likewise.
152 * thread-db.c (attach_thread): Likewise.
153
f517c180
EA
1542018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
155
156 PR gdb/21559
157 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
158 checking for fs_base/gs_base fields in struct user_regs_struct.
159 * configure: Regenerate.
160
9a70f35c
YQ
1612018-01-16 Yao Qi <yao.qi@linaro.org>
162
163 PR gdb/18749
164 * linux-low.c (fetch_register): Call supply_register instead of
165 error.
166
605fd3c6
YQ
1672018-01-08 Yao Qi <yao.qi@linaro.org>
168 Simon Marchi <simon.marchi@ericsson.com>
169
170 * Makefile.in (OBS): Remove selftest.o.
171 * configure.ac: Set srv_selftest_objs if $development is true.
172 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
173 * configure: Re-generated.
174 * server.c (captured_main): Wrap variable selftest_filter with
175 GDB_SELF_TEST.
176
2cc05030
SM
1772018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
178
179 * server.c (parse_debug_format_options): Return std::string.
180 (handle_monitor_command, captured_main): Adjust.
181
e379cee6
PA
1822018-01-05 Pedro Alves <palves@redhat.com>
183
184 PR gdb/18653
185 * server.c (captured_main): Pass quiet=false to
186 save_original_signals_state.
187
82e1e79a
JB
1882018-01-01 Joel Brobecker <brobecker@adacore.com>
189
190 * gdbreplay.c (gdbreplay_version): Update copyright year in
191 version message.
192 * server.c (gdbserver_version): Likewise.
193
8e481c3b
TT
1942017-12-08 Tom Tromey <tom@tromey.com>
195
196 * ax.c (ax_printf): Update.
197
a8806230
YQ
1982017-12-07 Yao Qi <yao.qi@linaro.org>
199
200 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
201 aarch64_linux_read_description.
202 * linux-amd64-ipa.c (idx2mask): New array.
203 (get_ipa_tdesc): Move idx2mask out.
204 (initialize_low_tracepoint): Initialize target descriptions.
205 * linux-i386-ipa.c (idx2mask): New array.
206 (get_ipa_tdesc): Move idx2mask out.
207 (initialize_low_tracepoint): Initialize target descriptions.
208
d4a0e8b5
SM
2092017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
210
211 * tdesc.c (struct tdesc_type): Change return type.
212 (tdesc_add_flag): Change parameter type.
213 (tdesc_add_bitfield): Likewise.
214 (tdesc_add_field): Likewise.
215 (tdesc_set_struct_size): Likewise.
216
798a7429
SM
2172017-12-05 Simon Marchi <simon.marchi@ericsson.com>
218
219 * regcache.c (registers_to_string): Remove unused variable.
220
c0e15c9b
SM
2212017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
222
223 * inferiors.c (for_each_inferior_with_data): Remove.
224 * inferiors.h (for_each_inferior_with_data): Remove.
225 * server.c (handle_qxfer_threads_worker): Change parameter type.
226 (handle_qxfer_threads_proper): Use for_each_thread.
227
f0045347
SM
2282017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
229
230 * inferiors.c (for_each_inferior): Remove.
231 (clear_inferiors): Use for_each_thread.
232 * inferiors.h (for_each_inferior): Remove.
233 * linux-low.c (linux_wait_for_event_filtered): Use
234 for_each_thread.
235 (linux_stabilize_threads): Likewise.
236 * regcache.c (regcache_release): Likewise.
237 * server.c (gdb_wants_all_threads_stopped): Likewise.
238 (clear_pending_status_callback): Remove.
239 (handle_status): Use for_each_thread.
240 (captured_main): Likewise.
241 * win32-low.c (child_init_thread_list): Likewise.
242 (win32_clear_inferiors): Likewise.
243 (fake_breakpoint_event): Likewise.
244
9521758b
SM
2452017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
246
247 * inferiors.h (find_inferior): Remove.
248 * inferiors.c (find_inferior): Remove.
249
8f86d7aa
SM
2502017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
251
252 * linux-low.c (resume_status_pending_p): Update comment.
253 (need_step_over_p): Update comment.
254
e2b44075
SM
2552017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
256
257 * linux-low.c (proceed_one_lwp): Return void, change parameter
258 type.
259 (unsuspend_and_proceed_one_lwp): Likewise.
260 (proceed_all_lwps): Use for_each_thread.
261 (unstop_all_lwps): Likewise.
262
c80825ff
SM
2632017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
264
265 * linux-low.c (linux_resume_one_thread): Return void, take
266 parameter directly.
267 (linux_resume): Use for_each_thread.
268
df3e4dbe
SM
2692017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
270
271 * linux-low.c (send_sigstop_callback): Return void, change
272 parameter type. Rename to...
273 (send_sigstop): ... this.
274 (suspend_and_send_sigstop_callback): Return void, change parameter
275 type. Rename to...
276 (suspend_and_send_sigstop): ... this.
277 (stop_all_lwps): Use for_each_thread.
278
5a6b0a41
SM
2792017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
280
281 * linux-low.c (lwp_running): Return bool, remove unused
282 argument.
283 (linux_stabilize_threads): Use find_thread.
284
39a64da5
SM
2852017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
286
287 * linux-low.c (select_singlestep_lwp_callback): Remove.
288 (count_events_callback): Remove.
289 (select_event_lwp_callback): Remove.
290 (select_event_lwp): Use find_thread/for_each_thread.
291
a1385b7b
SM
2922017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
293
294 * linux-low.c (not_stopped_callback): Return bool, take filter
295 argument directly.
296 (linux_wait_for_event_filtered): Use find_thread.
297 (linux_wait_1): Likewise.
298
454296a2
SM
2992017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
300
301 * linux-low.c (same_lwp): Remove.
302 (find_lwp_pid): Use find_thread.
303
6b2a85da
SM
3042017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
305
306 * linux-low.c (delete_lwp_callback): Remove.
307 (linux_mourn): Use for_each_thread.
308
798a38e8
SM
3092017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
310
311 * linux-low.c (linux_detach_lwp_callback): Return void, remove
312 args parameter, don't check for pid.
313 (linux_detach): Use for_each_thread.
314
e4eb0dec
SM
3152017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
316
317 * linux-low.c (struct counter): Remove.
318 (second_thread_of_pid_p): Remove.
319 (last_thread_of_process_p): Use find_thread.
320
83e1b6c1
SM
3212017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
322
323 * inferiors.c (find_inferior_in_random): Remove.
324 * inferiors.h (find_inferior_in_random): Remove.
325 * linux-low.c (status_pending_p_callback): Return bool, accept
326 parameter ptid directly.
327 (linux_wait_for_event_filtered): Use find_thread_in_random.
328 (linux_wait_1): Likewise.
329
8dc7b443
SM
3302017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
331
332 * inferiors.c (find_inferior_id): Remove.
333 (find_thread_ptid): Move implemention from find_inferior_id to
334 here.
335 * inferiors.h (find_inferior_id): Remove.
336 * server.c (handle_status): Use find_thread_ptid.
337 (process_serial_event): Likewise.
338 * thread-db.c (find_one_thread): Likewise.
339 (thread_db_thread_handle): Likewise.
340 * win32-low.c (thread_rec): Likewise.
341 (child_delete_thread): Likewise.
342 (win32_thread_alive): Likewise.
343 (get_child_debug_event): Likewise.
344
da25033c
SM
3452017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
346
347 * linux-mips-low.c (update_watch_registers_callback): Return
348 void, remove pid_p parameter, don't check for pid.
349 (mips_insert_point, mips_remove_point): Use for_each_thread.
350
c91bb56b
SM
3512017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
352
353 * lynx.low (lynx_delete_thread_callback): Remove.
354 (lynx_mourn): Use for_each_thread.
355
634a3254
SM
3562017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
357
358 * regcache.c (regcache_invalidate_one): Remove.
359 (regcache_invalidate_pid): use for_each_thread.
360
41272101
TT
3612017-11-26 Tom Tromey <tom@tromey.com>
362
363 * linux-low.c (linux_create_inferior): Update.
364
f5291a6f
UW
3652017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
366
367 * spu-low.c (spu_create_inferior): Fix typo in argument name.
368
6654d750
AH
3692017-11-24 Alan Hayward <alan.hayward@arm.com>
370
371 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
372 * linux-aarch64-low.c (initialize_low_arch): Call init func.
373 * linux-aarch64-tdesc-selftest.c: New file.
374 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
375
3762017-11-24 Alan Hayward <alan.hayward@arm.com>
377
378 * configure.srv: Add new file.
379 * linux-aarch64-low.c (initialize_low_arch): Call init func.
380 * linux-aarch64-tdesc-selftest.c: New file.
381 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
382
49bdb7ee
AH
3832017-11-24 Alan Hayward <alan.hayward@arm.com>
384
385 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
386 * linux-aarch64-low.c (initialize_low_arch): Remove init.
387 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
388
d6d7ce56
AH
3892017-11-24 Alan Hayward <alan.hayward@arm.com>
390
391 * configure.srv: Add new files.
392 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
393 aarch64_linux_read_description.
394 * linux-aarch64-low.c (aarch64_linux_read_description):
395 Merge with aarch64_arch_setup.
396 (aarch64_arch_setup): Call aarch64_linux_read_description.
397 * linux-aarch64-tdesc.c: New file.
398 * linux-aarch64-tdesc.h: New file.
399
506fe5f4
YQ
4002017-11-24 Yao Qi <yao.qi@linaro.org>
401
402 * configure.srv: Set $srv_regobj for tic6x-linux.
403 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
404 (tic6x_read_description): Move some code to tic6x_arch_setup.
405 (tic6x_tdesc_test): New function.
406 (initialize_low_arch): Call selftests::register_test.
407
29f9a567
YQ
4082017-11-22 Yao Qi <yao.qi@linaro.org>
409
410 * remote-utils.c (prepare_resume_reply): Use memcpy.
411
578290ec
SM
4122017-11-19 Simon Marchi <simon.marchi@ericsson.com>
413
414 * linux-low.c (kill_one_lwp_callback): Return void, take
415 argument directly, don't filter on pid.
416 (linux_kill): Use for_each_thread.
417
eca55aec
SM
4182017-11-19 Simon Marchi <simon.marchi@ericsson.com>
419
420 * linux-low.c (need_step_over_p): Return bool, remove dummy
421 argument.
422 (linux_resume, proceed_all_lwps): Use find_thread.
423
25c28b4d
SM
4242017-11-19 Simon Marchi <simon.marchi@ericsson.com>
425
426 * linux-low.c (resume_status_pending_p): Return bool, remove
427 flag_p argument.
428 (linux_resume): Use find_thread.
429
5fdda392
SM
4302017-11-19 Simon Marchi <simon.marchi@ericsson.com>
431
432 * linux-low.c (struct thread_resume_array): Remove.
433 (linux_set_resume_request): Return void, take arguments
434 directly.
435 (linux_resume): Use for_each_thread.
436
fcb056a5
SM
4372017-11-19 Simon Marchi <simon.marchi@ericsson.com>
438
439 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
440 return bool, remove data argument.
441 (linux_stabilize_threads): Use find_thread.
442
139720c5
SM
4432017-11-19 Simon Marchi <simon.marchi@ericsson.com>
444
445 * linux-low.c (unsuspend_one_lwp): Remove.
446 (unsuspend_all_lwps): Use for_each_thread, inline code from
447 unsuspend_one_lwp.
448
6d1e5673
SM
4492017-11-19 Simon Marchi <simon.marchi@ericsson.com>
450
451 * gdbthread.h (find_thread): Add overload with ptid_t filter.
452 * linux-low.c (struct iterate_over_lwps_args): Remove.
453 (iterate_over_lwps_filter): Remove.
454 (iterate_over_lwps): Use find_thread.
455
bbf550d5
SM
4562017-11-19 Simon Marchi <simon.marchi@ericsson.com>
457
458 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
459 (linux_handle_new_gdb_connection): Use for_each_thread, inline
460 code from reset_lwp_ptrace_options_callback.
461
00192f77
SM
4622017-11-19 Simon Marchi <simon.marchi@ericsson.com>
463
464 * linux-arm-low.c (struct update_registers_data): Remove.
465 (update_registers_callback): Return void, take arguments
466 directly, don't check thread's pid.
467 (arm_insert_point, arm_remove_point): Use for_each_thread.
468
2bee2b6c
SM
4692017-11-19 Simon Marchi <simon.marchi@ericsson.com>
470
471 * win32-low.c (continue_one_thread): Return void, take argument
472 directly.
473 (child_continue): Use for_each_thread.
474
0b360f19
SM
4752017-11-19 Simon Marchi <simon.marchi@ericsson.com>
476
477 * win32-i386-low.c (update_debug_registers_callback): Rename
478 to ...
479 (update_debug_registers): ... this, return void, remove pid_p arg.
480 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
481
f27866ba
SM
4822017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
483
484 * inferiors.h (struct process_info): Add constructor, initialize
485 fields..
486 <syscalls_to_catch>: Change type to std::vector<int>.
487 * inferiors.c (add_process): Allocate process_info with new.
488 (remove_process): Free process_info with delete.
489 * linux-low.c (handle_extended_wait): Adjust.
490 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
491 * server.c (handle_general_set): Adjust.
492
e849ea89
PA
4932017-11-16 Pedro Alves <palves@redhat.com>
494
495 * remote-utils.c (remote_close): Block SIGIO signals instead of
496 uninstalling the SIGIO handler.
497
1d0aa65c
AH
4982017-11-16 Alan Hayward <alan.hayward@arm.com>
499
500 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
501
3491a34c
YQ
5022017-11-16 Yao Qi <yao.qi@linaro.org>
503
504 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
505 (tic6x_store_gregset): Likewise.
506 (tic6x_usrregs_info): Move it up.
507
a602f924
AH
5082017-11-15 Alan Hayward <alan.hayward@arm.com>
509
510 * Makefile.in: Update arch rules.
511 * configure.srv: Explicitly mark arch/ files.
512
5616b6c3
AS
5132017-11-13 Andreas Schwab <schwab@suse.de>
514
515 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
516 function.
517 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
518
d1928160
PA
5192017-11-06 Pedro Alves <palves@redhat.com>
520
521 * config.in, configure: Regenerate.
522
bac608e7
SM
5232017-10-27 Simon Marchi <simon.marchi@ericsson.com>
524
525 * target.c (struct thread_search): Remove.
526 (thread_search_callback): Remove.
527 (prepare_to_access_memory): Use for_each_thread instead of
528 find_inferior. Inline code from thread_search_callback.
529
eaddb425
SM
5302017-10-27 Simon Marchi <simon.marchi@ericsson.com>
531
532 * server.c (struct visit_actioned_threads_data): Remove.
533 (visit_actioned_threads): Change prototype to take arguments
534 directly.
535 (resume): Use find_thread instead of find_inferior.
536
99078d34
SM
5372017-10-27 Simon Marchi <simon.marchi@ericsson.com>
538
539 * server.c (queue_stop_reply_callback): Change prototype, return
540 void.
541 (find_status_pending_thread_callback): Remove.
542 (handle_status): Replace find_inferior with find_thread and
543 for_each_thread.
544
cc628f3d
AH
5452017-10-25 Alan Hayward <alan.hayward@arm.com>
546
547 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
548 with REGNO.
549 (aarch64_store_gregset): Likewise.
550 (aarch64_fill_fpregset): Likewise.
551 (aarch64_store_fpregset): Likewise.
552
4d3bb80e
SM
5532017-10-21 Simon Marchi <simon.marchi@ericsson.com>
554
555 * gdbthread.h (find_thread, for_each_thread): New functions.
556 * inferiors.c (thread_of_pid): Remove.
557 (find_any_thread_of_pid): Use find_thread.
558 * linux-low.c (num_lwps): Use for_each_thread.
559
7a7cdfa0
YQ
5602017-10-17 Yao Qi <yao.qi@linaro.org>
561
562 * Makefile.in: Remove one rule.
563 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
564
e675d170
YQ
5652017-10-17 Yao Qi <yao.qi@linaro.org>
566
567 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
568 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
569
7eb4e0f9
YQ
5702017-10-17 Yao Qi <yao.qi@linaro.org>
571
572 * configure.srv: Rename arm.o with arch/arm.o.
573
60d6cfc9
YQ
5742017-10-17 Yao Qi <yao.qi@linaro.org>
575
576 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
577 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
578 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
579 (arch-i386.o, arch-amd64.o): Remove rules.
580 (arch/%.o): New rule.
581 Update POSTCOMPILE and COMPILE.pre.
582 * configure.ac: Invoke AC_CONFIG_COMMANDS.
583 * configure: Re-generated.
584 * configure.srv: Replace arch-i386.o with arch/i386.o.
585 Replace arch-amd64.o with arch/amd64.o.
586
5bfda255
YQ
5872017-10-16 Yao Qi <yao.qi@linaro.org>
588
589 * configure: Regenerated.
590
9c80ecd6
SM
5912017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
592
593 * inferiors.h: (struct inferior_list): Remove.
594 (struct inferior_list_entry); Remove.
595 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
596 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
597 get_first_inferior): Remove.
598 (for_each_inferior, for_each_inferior_with_data, find_inferior,
599 find_inferior_id, find_inferior_in_random): Change signature.
600 * inferiors.c (all_threads): Change type to
601 std::list<thread_info *>.
602 (get_thread): Remove macro.
603 (find_inferior, find_inferior_id): Change signature, implement
604 using find_thread.
605 (find_inferior_in_random): Change signature, implement using
606 find_thread_in_random.
607 (for_each_inferior, for_each_inferior_with_data): Change
608 signature, implement using for_each_thread.
609 (add_inferior_to_list, remove_inferior): Remove.
610 (add_thread, get_first_thread, thread_of_pid,
611 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
612 (get_first_inferior, one_inferior_p, clear_inferior_list):
613 Remove.
614 (clear_inferiors, get_thread_process): Update.
615 * gdbthread.h: Include <list>.
616 (struct thread_info) <entry>: Remove field.
617 <id>: New field.
618 (all_threads): Change type to std::list<thread_info *>.
619 (get_first_inferior): Add doc.
620 (find_thread, for_each_thread, find_thread_in_random): New
621 functions.
622 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
623 * linux-arm-low.c (update_registers_callback): Update.
624 * linux-low.c (second_thread_of_pid_p): Update.
625 (kill_one_lwp_callback, linux_detach_lwp_callback,
626 delete_lwp_callback, status_pending_p_callback, same_lwp,
627 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
628 iterate_over_lwps, not_stopped_callback,
629 resume_stopped_resumed_lwps, count_events_callback,
630 select_singlestep_lwp_callback, select_event_lwp_callback,
631 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
632 suspend_and_send_sigstop_callback, wait_for_sigstop,
633 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
634 lwp_running, linux_set_resume_request, resume_status_pending_p,
635 need_step_over_p, start_step_over, linux_resume_one_thread,
636 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
637 reset_lwp_ptrace_options_callback): Update.
638 * linux-mips-low.c (update_watch_registers_callback): Update.
639 * regcache.c (regcache_invalidate_one, regcache_invalidate):
640 Update.
641 (free_register_cache_thread_one): Remove.
642 (regcache_release): Update.
643 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
644 handle_qxfer_threads_worker): Update.
645 (handle_query): Update, use list iterator.
646 (visit_actioned_threads, handle_pending_status,
647 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
648 clear_pending_status_callback, set_pending_status_callback,
649 find_status_pending_thread_callback, handle_status,
650 process_serial_event): Update.
651 * target.c (thread_search_callback): Update.
652 * thread-db.c (thread_db_get_tls_address): Update.
653 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
654 Update.
655 * win32-i386-low.c (update_debug_registers_callback): Update.
656 * win32-low.c (delete_thread_info, child_delete_thread,
657 continue_one_thread, suspend_one_thread,
658 get_child_debug_event): Adjust.
659
9179355e
SM
6602017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
661
662 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
663 * inferiors.h: Include <list>.
664 (struct process_info) <entry>: Remove field.
665 <pid>: New field.
666 (pid_of): Change macro to function.
667 (ptid_of, lwpid_of): Remove macro.
668 (all_processes): Change type to std::list<process_info *>.
669 (ALL_PROCESSES): Remove macro.
670 (for_each_process, find_process): New function.
671 * inferiors.c (all_processes): Change type to
672 std::list<process_info *>.
673 (find_thread_process): Adjust.
674 (add_process): Likewise.
675 (remove_process): Likewise.
676 (find_process_pid): Likewise.
677 (get_first_process): Likewise.
678 (started_inferior_callback): Remove.
679 (have_started_inferiors_p): Adjust.
680 (attached_inferior_callback): Remove.
681 (have_attached_inferiors_p): Adjust.
682 * linux-low.c (check_zombie_leaders): Likewise.
683 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
684 (x86_linux_update_xmltarget): Adjust.
685 * server.c (handle_query): Likewise.
686 (gdb_reattached_process): Remove.
687 (handle_status): Adjust.
688 (kill_inferior_callback): Likewise.
689 (detach_or_kill_inferior): Remove.
690 (print_started_pid): Likewise.
691 (print_attached_pid): Likewise.
692 (detach_or_kill_for_exit): Update.
693 (process_serial_event): Likewise.
694 * linux-arm-low.c (arm_new_fork): Likewise.
695
c9cb8905
SM
6962017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
697
698 * dll.h: Include <list>.
699 (struct dll_info): Add constructor.
700 <entry>: Remove field.
701 (all_dlls): Change type to std::list<dll_info>.
702 * dll.c: Include <algorithm>.
703 (get_dll): Remove macro.
704 (all_dlls): Change type to std::list<dll_info *>.
705 (free_one_dll): Remove.
706 (match_dll): Likewise.
707 (loaded_dll): Adjust.
708 (unloaded_dll): Adjust to all_dlls type change, use
709 std::find_if. Inline code from match_dll.
710 (clear_dlls): Adjust to all_dlls type change.
711 * server.c (emit_dll_description): Remove.
712 (handle_qxfer_libraries): Adjust to all_dlls type change,
713 integrate emit_dll_description's functionality.
714
04ec7890
SM
7152017-10-12 Simon Marchi <simon.marchi@ericsson.com>
716
717 * linux-low.h (struct linux_target_ops) <delete_process>: New
718 field.
719 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
720 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
721 (struct linux_target_ops): Add delete_process callback.
722 * linux-arm-low.c (arm_delete_process): New.
723 (struct linux_target_ops): Add delete_process callback.
724 * linux-bfin-low.c (struct linux_target_ops): Likewise.
725 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
726 * linux-m32r-low.c (struct linux_target_ops): Likewise.
727 * linux-mips-low.c (mips_linux_delete_process): New.
728 (struct linux_target_ops): Add delete_process callback.
729 * linux-ppc-low.c (struct linux_target_ops): Likewise.
730 * linux-s390-low.c (struct linux_target_ops): Likewise.
731 * linux-sh-low.c (struct linux_target_ops): Likewise.
732 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
733 * linux-tile-low.c (struct linux_target_ops): Likewise.
734 * linux-x86-low.c (x86_linux_delete_process): New.
735 (struct linux_target_ops): Add delete_process callback.
736 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
737
466eecee
SM
7382017-10-12 Simon Marchi <simon.marchi@ericsson.com>
739
740 * linux-aarch64-low.c (the_low_target): Add thread delete
741 callback.
742 * linux-arm-low.c (arm_delete_thread): New function.
743 (the_low_target): Add thread delete callback.
744 * linux-bfin-low.c (the_low_target): Likewise.
745 * linux-crisv32-low.c (the_low_target): Likewise.
746 * linux-low.c (delete_lwp): Invoke delete_thread callback if
747 set.
748 * linux-low.h (struct linux_target_ops) <delete_thread>: New
749 field.
750 * linux-m32r-low.c (the_low_target): Add thread delete callback.
751 * linux-mips-low.c (mips_linux_delete_thread): New function.
752 (the_low_target): Add thread delete callback.
753 * linux-ppc-low.c (the_low_target): Likewise.
754 * linux-s390-low.c (the_low_target): Likewise.
755 * linux-sh-low.c (the_low_target): Likewise.
756 * linux-tic6x-low.c (the_low_target): Likewise.
757 * linux-tile-low.c (the_low_target): Likewise.
758 * linux-x86-low.c (the_low_target): Likewise.
759 * linux-xtensa-low.c (the_low_target): Likewise.
760
b79f7801
YZ
7612017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
762
763 * win32-low.c: Include "common-inferior.h".
764
bc3b087d
SDJ
7652017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
766
767 * inferiors.c (set_inferior_cwd): New function.
768 * server.c (handle_general_set): Handle QSetWorkingDir packet.
769 (handle_query): Inform that QSetWorkingDir is supported.
770 * win32-low.c (create_process): Pass the inferior's cwd to
771 CreateProcess.
772
d092c5a2
SDJ
7732017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
774
775 * inferiors.c (current_inferior_cwd): New global variable.
776 (get_inferior_cwd): New function.
777 * inferiors.h (struct process_info) <cwd>: New field.
778
7da0a886
SDJ
7792017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
780
781 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
782 (OBS): Add gdb_tilde_expand.o.
783
289a6840
SM
7842017-10-02 Simon Marchi <simon.marchi@ericsson.com>
785
786 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
787 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
788
256642e8
PA
7892017-09-29 Pedro Alves <palves@redhat.com>
790
791 * ax.c (gdb_parse_agent_expr): Constify.
792 * ax.h (gdb_parse_agent_expr): Constify.
793 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
794 Constify.
795 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
796 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
797 * remote-utils.h (read_ptid): Constify.
798 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
799 (process_point_options, process_serial_event): Constify.
800 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
801 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
802 (cmd_qtbuffer): Constify.
803
5b9ca4d4
PA
8042017-09-29 Pedro Alves <palves@redhat.com>
805
806 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
807 fails.
808
94c207e0
PA
8092017-09-29 Pedro Alves <palves@redhat.com>
810
811 * linux-low.c (handle_extended_wait): Pass parent thread instead
812 of process to thread_db_notice_clone.
813 * linux-low.h (thread_db_notice_clone): Replace parent process
814 parameter with parent thread parameter.
815 * thread-db.c (find_one_thread): Add comment.
816 (thread_db_notice_clone): Replace parent process parameter with
817 parent thread parameter. Temporarily switch to the parent thread.
818
75352e28
SDJ
8192017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
820
821 * gdbthread.h: Include "common-gdbthread.h".
822 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
823 "if" when validating the ptid.
824 * remote-utils.c: Include "gdbthread.h".
825 (prepare_resume_reply): Use "switch_to_thread".
826 * target.c (done_accessing_memory): Likewise.
827
ad339634
AA
8282017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
829
830 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
831 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
832 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
833 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
834 s390x-gs-linux64-ipa.o to ipa_obj.
835 * linux-s390-low.c (HWCAP_S390_GS): New define.
836 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
837 New functions.
838 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
839 (s390_arch_setup): Check for guarded-storage support and choose
840 appropriate tdesc.
841 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
842 init_registers_s390x_gs_linux64.
843 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
844 enum value.
845 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
846 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
847
cc4d742f
SM
8482017-09-22 Simon Marchi <simon.marchi@ericsson.com>
849
850 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
851
f6327dcb
KB
8522017-09-21 Kevin Buettner <kevinb@redhat.com>
853
854 * linux-low.h (struct lwp_info): Add new field, thread_handle.
855 (thread_db_thread_handle): Declare.
856 * linux-low.c (linux_target_ops): Initialize thread_handle.
857 * server.c (handle_qxfer_threads_worker): Add support for
858 "handle" attribute.
859 * target.h (struct target_ops): Add new function pointer,
860 thread_handle.
861 (target_thread_handle): Define.
862 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
863 field in lwp.
864 (thread_db_thread_handle): New function.
865
86299109
KB
8662017-09-21 Kevin Buettner <kevinb@redhat.com>
867
868 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
869 * linux-low.h (thread_db_notice_clone): Declare.
870 * thread-db.c (thread_db_notice_clone): New function.
871
f557a88a
PA
8722017-09-21 Pedro Alves <palves@redhat.com>
873
874 * server.c (gdb_read_memory, handle_status, process_serial_event)
875 (handle_serial_event, handle_target_event): Adjust to
876 set_desired_thread prototype change.
877 * target.c (set_desired_thread): Remove 'use_general' parameter
878 and adjust.
879 * target.h (set_desired_thread): Remove 'use_general' parameter.
880
223ffa71
TT
8812017-09-20 Tom Tromey <tom@tromey.com>
882
883 * target.c (target_terminal::terminal_state): Define.
884 (target_terminal::init): Rename from target_terminal_init.
885 (target_terminal::inferior): Rename from
886 target_terminal_inferior.
887 (target_terminal::ours): Rename from target_terminal_ours.
888 (target_terminal::ours_for_output, target_terminal::info): New.
889
04fd3ba9
SM
8902017-09-16 Simon Marchi <simon.marchi@ericsson.com>
891
892 * server.c (accumulate_file_name_length): Remove.
893 (emit_dll_description): Adjust to std::string change.
894 (handle_qxfer_libraries): Use std::string to hold document.
895
5e187554
SM
8962017-09-16 Simon Marchi <simon.marchi@ericsson.com>
897
898 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
899 return type of xml_escape_text.
900 * server.c (emit_dll_description): Likewise.
901
1526853e
SM
9022017-09-16 Simon Marchi <simon.marchi@ericsson.com>
903
904 * server.c (captured_main): Accept argument for --selftest.
905 Update run_tests call.
906 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
907 when registering selftests.
908
c4dfafab
SDJ
9092017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
910
911 * regcache.c (get_thread_regcache): Update code to use "std::vector"
912 instead of "VEC" for "target_desc.reg_defs".
913 (regcache_cpy): Likewise.
914 (registers_to_string): Likewise.
915 (registers_from_string): Likewise.
916 (find_regno): Likewise.
917 (supply_regblock): Likewise.
918 (regcache_raw_read_unsigned): Likewise.
919 * tdesc.c (init_target_desc): Likewise.
920 (tdesc_create_reg): Likewise.
921 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
922 (struct target_desc) <reg_defs>: Convert to "std::vector".
923 (target_desc): Do not initialize "reg_defs".
924 (~target_desc): Update code to use "std::vector" instead of "VEC"
925 for "target_desc.reg_defs".
926 (operator==): Likewise.
927
124aceb4
SM
9282017-09-15 Simon Marchi <simon.marchi@ericsson.com>
929
930 * inferiors.h (thread_to_gdb_id): Remove.
931 * inferiors.c (thread_to_gdb_id): Remove.
932 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
933 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
934 lynx_store_registers, lynx_read_memory, lynx_write_memory):
935 Likewise.
936 * nto-low.c (nto_fetch_registers, nto_store_registers,
937 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
938
96cde54f
SM
9392017-09-15 Simon Marchi <simon.marchi@ericsson.com>
940
941 * inferiors.h (gdb_id_to_thread_id): Remove.
942 * inferiors.c (gdb_id_to_thread_id): Remove.
943 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
944 removal. Move pid declaration closer to where it's used.
945
e8ca139e
SM
9462017-09-15 Simon Marchi <simon.marchi@ericsson.com>
947
948 * server.c (handle_detach): New function.
949 (process_serial_event): Move code out, call handle_detach.
950
f8a4e119
SM
9512017-09-15 Simon Marchi <simon.marchi@ericsson.com>
952
953 * server.c (require_running): Rename to ...
954 (require_running_or_return): ... this ...
955 (require_running_or_break): ... and this.
956 (handle_query, process_serial_event): Adjust.
957
0eb0a407
SM
9582017-09-15 Simon Marchi <simon.marchi@ericsson.com>
959
960 * linux-low.c (linux_set_resume_request): Remove unused
961 variables.
962
785922a5
SM
9632017-09-15 Simon Marchi <simon.marchi@ericsson.com>
964
965 * server.c (first_thread_of): Remove.
966 (process_serial_event): Replace usage of first_thread_of with
967 find_any_thread_of_pid.
968 * tracepoint.c (same_process_p): Remove.
969 (gdb_agent_about_to_close): Replace usage of same_process_p with
970 find_any_thread_of_pid.
971 * linux-x86-low.c (same_process_callback): Remove.
972 (x86_arch_setup_process_callback): Replace usage of
973 same_process_callback with find_any_thread_of_pid.
974 * thread-db.c (any_thread_of): Remove.
975 (switch_to_process): Replace usage of any_thread_of with
976 find_any_thread_of_pid.
977 * inferiors.c (thread_pid_matches_callback): Remove.
978 (find_thread_process): Adjust to use find_any_thread_of_pid.
979
a059f00c
SDJ
9802017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
981
982 * regcache.c (get_thread_regcache): Guard calls to "memset"
983 with "!VEC_empty".
984
cc397f3a
SDJ
9852017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
986
987 * linux-low.c (handle_extended_wait): Use
988 "allocate_target_description" instead of "XNEW".
989 * linux-x86-low.c (initialize_low_arch): Likewise.
990
22916b07
YQ
9912017-09-05 Yao Qi <yao.qi@linaro.org>
992
993 * configure.srv (srv_i386_regobj): Remove.
994 (srv_amd64_regobj): Remove.
995 (srv_regobj): Set it to "" for x86 non-linux targets.
996 * linux-x86-tdesc.c (i386_linux_read_description):
997 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
998 (init_registers_i386): Remove the declaration.
999 (tdesc_i386): Remove the declaration.
1000 (lynx_i386_arch_setup): Call i386_create_target_description.
1001 * nto-x86-low.c: Likewise.
1002 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1003 [!__x86_64__]: include arch/i386.h.
1004 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1005
38602d55
YQ
10062017-09-05 Yao Qi <yao.qi@linaro.org>
1007
1008 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1009 i386/amd64-XXX-linux from it.
1010
44b886ff
YQ
10112017-09-05 Yao Qi <yao.qi@linaro.org>
1012
1013 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1014 false.
1015 (ipa_amd64_linux_regobj): Remove.
1016 (ipa_x32_linux_regobj): Remove.
1017
b4570e4b
YQ
10182017-09-05 Yao Qi <yao.qi@linaro.org>
1019
1020 * Makefile.in (arch-amd64.o): New rule.
1021 * configure.srv: Append arch-amd64.o.
1022 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1023 (get_ipa_tdesc): Call amd64_linux_read_description.
1024 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1025 and init_registers_amd64_XXX.
1026 * linux-x86-low.c (x86_linux_read_description): Call
1027 amd64_linux_read_description.
1028 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1029 (initialize_low_arch): Don't call init_registers_x32_XXX and
1030 init_registers_amd64_XXX.
1031 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1032 and tdesc_amd64_XXX.
1033 [__x86_64__] (amd64_tdesc_test): New function.
1034 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1035 and init_registers_amd64_XXX.
1036 * linux-x86-tdesc.c: Include arch/amd64.h.
1037 (xcr0_to_tdesc_idx): New function.
1038 (i386_linux_read_description): New function.
1039 (amd64_get_ipa_tdesc_idx): New function.
1040 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1041 (amd64_get_ipa_tdesc): Declare.
1042
d1f28ea2
YQ
10432017-09-05 Yao Qi <yao.qi@linaro.org>
1044
1045 * configure.srv (srv_i386_linux_xmlfiles): Remove
1046 i386/i386-XXX-linux.xml from it.
1047
25a93583
YQ
10482017-09-05 Yao Qi <yao.qi@linaro.org>
1049
1050 * configure.srv: Set srv_i386_linux_regobj empty if $development
1051 is false.
1052 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1053 initialize_low_tdesc.
1054 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1055 with #if initialize_low_tdesc.
1056 * linux-x86-tdesc-selftest.c: New file.
1057 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1058
5f035c07
YQ
10592017-09-05 Yao Qi <yao.qi@linaro.org>
1060
1061 * Makefile.in (arch-i386.o): New rule.
1062 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1063 (x86_64-*-linux*): Likewise.
1064 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1065 include arch/i386.h.
1066 (i386_linux_read_description): Remove code and call
1067 i386_create_target_description.
1068 * tdesc.c (allocate_target_description): New function.
1069 * tdesc.h (set_tdesc_architecture): Remove declaration.
1070 (set_tdesc_osabi): Likewise.
1071
0abe8a89
YQ
10722017-09-05 Yao Qi <yao.qi@linaro.org>
1073
1074 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1075 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1076 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1077 .xmltarget.
1078 * server.c (get_features_xml): Call tdesc_get_features_xml.
1079 * tdesc.c (set_tdesc_architecture): New function.
1080 (set_tdesc_osabi): New function.
1081 (tdesc_get_features_xml): New function.
1082 (tdesc_create_feature): Add an argument.
1083 * tdesc.h (struct target_desc) <features>: New field.
1084 <arch, osabi>: New field.
1085 (~target_desc): xfree features, arch, and osabi.
1086 (target_desc::oerator==): Don't compare .xmltarget.
1087 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1088 (set_tdesc_osabi): Likewise.
1089 (tdesc_get_features_xml): Likewise.
1090
0a188386
YQ
10912017-09-05 Yao Qi <yao.qi@linaro.org>
1092
1093 * linux-x86-tdesc.c: Include selftest.h.
1094 (i386_tdesc_test): New function.
1095 (initialize_low_tdesc): Call selftests::register_test.
1096 * tdesc.h: Include regdef.h.
1097 (target_desc): Override operator == and !=.
1098
f49ff000
YQ
10992017-09-05 Yao Qi <yao.qi@linaro.org>
1100
1101 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1102 (ipa_obj): Likewise.
1103 * linux-i386-ipa.c: Include common/x86-xstate.h
1104 (get_ipa_tdesc): Call i386_linux_read_description.
1105 (initialize_low_tracepoint): Don't call init_registers_XXX
1106 functions, call initialize_low_tdesc instead.
1107 * linux-x86-low.c (x86_linux_read_description): Call
1108 i386_linux_read_description.
1109 (initialize_low_arch): Don't call init_registers_i386_XXX
1110 functions, call initialize_low_tdesc.
1111 * linux-x86-tdesc.c: New file.
1112 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1113 (i386_get_ipa_tdesc_idx): Declare.
1114 (i386_get_ipa_tdesc): Declare.
1115 (initialize_low_tdesc): Declare.
1116
2b68ef2f
YQ
11172017-09-05 Yao Qi <yao.qi@linaro.org>
1118
1119 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1120 instead of 0.
1121
f7000548
YQ
11222017-09-05 Yao Qi <yao.qi@linaro.org>
1123
1124 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1125 * regcache.c (get_thread_regcache): Use VEC_length.
1126 (init_register_cache): Likewise.
1127 (regcache_cpy): Likewise.
1128 (registers_to_string): Iterate reg_defs via VEC_iterate.
1129 (find_regno): Likewise.
1130 (find_register_by_number): Use VEC_index.
1131 (register_size): Call find_register_by_number.
1132 (register_data): Call find_register_by_number.
1133 (supply_regblock): Use VEC_length.
1134 (regcache_raw_read_unsigned): Likewise.
1135 * tdesc.c (init_target_desc): Iterate reg_defs via
1136 VEC_iterate.
1137 (default_description): Update initializer.
1138 (copy_target_description): Don't update field num_registers.
1139 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1140 <num_registers>: Remove.
1141
50a421ac
SM
11422017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1143
1144 * Makefile.in (.SECONDARY): Define target.
1145
23fdd69e
SM
11462017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1147
1148 * linux-low.c (linux_wait_1): Adjust.
1149 * server.c (queue_stop_reply_callback): Adjust.
1150
0a2dde4a
SDJ
11512017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1152
1153 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1154 QEnvironmentUnset and QEnvironmentReset packets.
1155 (handle_query): Inform remote that QEnvironmentHexEncoded,
1156 QEnvironmentUnset and QEnvironmentReset are supported.
1157
6afd337d
SM
11582017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1159
1160 * inferiors.h (inferior_target_data): Rename to ...
1161 (thread_target_data): ... this.
1162 (inferior_regcache_data): Rename to ...
1163 (thread_regcache_data): ... this.
1164 (set_inferior_regcache_data): Rename to ...
1165 (set_thread_regcache_data): ... this.
1166 * inferiors.c (inferior_target_data): Rename to ...
1167 (thread_target_data): ... this.
1168 (inferior_regcache_data): Rename to ...
1169 (thread_regcache_data): ... this.
1170 (set_inferior_regcache_data): Rename to ...
1171 (set_thread_regcache_data): ... this.
1172 (free_one_thread): Update.
1173 * linux-low.h (get_thread_lwp): Update.
1174 * regcache.c (get_thread_regcache): Update.
1175 (regcache_invalidate_thread): Update.
1176 (free_register_cache_thread): Update.
1177 * win32-i386-low.c (update_debug_registers_callback): Update.
1178 (win32_get_current_dr): Update.
1179 * win32-low.c (thread_rec): Update.
1180 (delete_thread_info): Update.
1181 (continue_one_thread): Update.
1182 (suspend_one_thread): Update.
1183
a160cc46
SM
11842017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1185
1186 * inferiors.c (set_inferior_target_data): Remove.
1187 * inferiors.h (set_inferior_target_data): Remove.
1188
6d580b63
YQ
11892017-08-18 Yao Qi <yao.qi@linaro.org>
1190
1191 * Makefile.in (OBS): Add selftest.o.
1192 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1193 * configure, config.in: Re-generated.
1194 * server.c: Include common/sefltest.h.
1195 (captured_main): Handle option --selftest.
1196
f5a29eb0
YQ
11972017-08-09 Yao Qi <yao.qi@linaro.org>
1198
1199 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1200 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1201 i386-avx-mpx.o and i386-mmx.o.
1202 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1203 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1204 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1205 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1206 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1207 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1208 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1209 i386/amd64-avx-mpx.xml.
1210
57757c2f
YQ
12112017-08-09 Yao Qi <yao.qi@linaro.org>
1212
1213 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1214 and x32-avx-avx512.o.
1215 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1216 i386/x32-avx-avx512.xml.
1217
229d26fc
SM
12182017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1219
1220 * tracepoint.h (enum class fast_tpoint_collect_result): New
1221 enumeration.
1222 (fast_tracepoint_collecting): Change return type to
1223 fast_tpoint_collect_result.
1224 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1225 * linux-low.h: Include tracepoint.h.
1226 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1227 fast_tpoint_collect_result.
1228 * linux-low.c (handle_tracepoints): Adjust.
1229 (linux_fast_tracepoint_collecting): Change return type to
1230 fast_tpoint_collect_result.
1231 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1232 linux_wait_1, stuck_in_jump_pad_callback,
1233 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1234 proceed_one_lwp): Adjust to type change.
1235
2e1e43e1
YQ
12362017-07-10 Yao Qi <yao.qi@linaro.org>
1237
1238 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1239
adc764e7
YQ
12402017-06-29 Yao Qi <yao.qi@linaro.org>
1241
1242 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1243 Remove.
1244 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1245
a206891a
SM
12462017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1247
1248 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1249
9a6c7d9c
SDJ
12502017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1251
1252 * linux-low.c (linux_create_inferior): Adjust code to access the
1253 environment information via 'gdb_environ' class.
1254 * lynx-low.c (lynx_create_inferior): Likewise.
1255 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1256 (get_environ): Return a pointer to 'our_environ'.
1257 (captured_main): Initialize 'our_environ'.
1258 * server.h (get_environ): Adjust prototype.
1259 * spu-low.c (spu_create_inferior): Adjust code to access the
1260 environment information via 'gdb_environ' class.
1261
ae3e2ccf
SM
12622017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1263
1264 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1265 usage of "register" keyword.
1266
3e019bdc
SM
12672017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1268
1269 * configure: Re-generate.
1270
8465943a
SM
12712017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1272
1273 * configure: Re-generate.
1274
cf0dd6f0
SM
12752017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1276
1277 * Makefile.in (COMPILE.pre): Add "-x c++".
1278
9845682b
SDJ
12792017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1280
1281 * fork-child.c: Conditionally include <signal.h>.
1282
aefd8b33
SDJ
12832017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1284
1285 * server.c (handle_general_set): Handle new packet
1286 "QStartupWithShell".
1287 (handle_query): Add "QStartupWithShell" to the list of supported
1288 packets.
1289 (gdbserver_usage): Add help text explaining the
1290 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1291 options.
1292 (captured_main): Recognize and act upon the presence of the new
1293 CLI options.
1294
2090129c
SDJ
12952017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1296 Pedro Alves <palves@redhat.com>
1297
1298 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1299 * configure: Regenerate.
1300 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1301 "fork-inferior.o".
1302 (i[34567]86-*-lynxos*): Likewise.
1303 (spu*-*-*): Likewise.
1304 * fork-child.c: New file.
1305 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1306 and "environ.h".
1307 (linux_ptrace_fun): New function.
1308 (linux_create_inferior): Adjust function prototype to reflect
1309 change on "target.h". Adjust function code to use
1310 "fork_inferior".
1311 (linux_request_interrupt): Delete "signal_pid".
1312 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1313 (lynx_ptrace_fun): New function.
1314 (lynx_create_inferior): Adjust function prototype to reflect
1315 change on "target.h". Adjust function code to use
1316 "fork_inferior".
1317 * nto-low.c (nto_create_inferior): Adjust function prototype and
1318 code to reflect change on "target.h". Update comments.
1319 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1320 "common-terminal.h" and "environ.h".
1321 (terminal_fd): Moved to fork-child.c.
1322 (old_foreground_pgrp): Likewise.
1323 (restore_old_foreground_pgrp): Likewise.
1324 (last_status): Make it global.
1325 (last_ptid): Likewise.
1326 (our_environ): New variable.
1327 (startup_with_shell): Likewise.
1328 (program_name): Likewise.
1329 (program_argv): Rename to...
1330 (program_args): ...this.
1331 (wrapper_argv): New variable.
1332 (start_inferior): Delete function.
1333 (get_exec_wrapper): New function.
1334 (get_exec_file): Likewise.
1335 (get_environ): Likewise.
1336 (prefork_hook): Likewise.
1337 (post_fork_inferior): Likewise.
1338 (postfork_hook): Likewise.
1339 (postfork_child_hook): Likewise.
1340 (handle_v_run): Update code to deal with arguments coming from the
1341 remote host. Update calls from "start_inferior" to
1342 "create_inferior".
1343 (captured_main): Likewise. Initialize environment variable. Call
1344 "have_job_control".
1345 * server.h (post_fork_inferior): New prototype.
1346 (get_environ): Likewise.
1347 (last_status): Declare.
1348 (last_ptid): Likewise.
1349 (signal_pid): Likewise.
1350 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1351 (spu_ptrace_fun): New function.
1352 (spu_create_inferior): Adjust function prototype to reflect change
1353 on "target.h". Adjust function code to use "fork_inferior".
1354 * target.c (target_terminal_init): New function.
1355 (target_terminal_inferior): Likewise.
1356 (target_terminal_ours): Likewise.
1357 * target.h: Include <vector>.
1358 (struct target_ops) <create_inferior>: Update prototype.
1359 (create_inferior): Update macro.
1360 * utils.c (gdb_flush_out_err): New function.
1361 * win32-low.c (win32_create_inferior): Adjust function prototype
1362 and code to reflect change on "target.h".
1363
043a4934
SDJ
13642017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1365
1366 * inferiors.c (switch_to_thread): New function.
1367
15652511
SDJ
13682017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1369
1370 * Makefile.in (SFILE): Add "common/job-control.c".
1371 (OBS): Add "job-control.o".
1372
21ea5acd
SDJ
13732017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1374
1375 * Makefile: Remove "@host_makefile_frag@".
1376
e13cb306
PA
13772017-05-05 Pedro Alves <palves@redhat.com>
1378
1379 * configure: Regenerate.
1380
c94fee56
SDJ
13812017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1382
1383 * configure: Regenerate.
1384
a0ff9e1a
SM
13852017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1386
1387 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1388 software_single_step change of return type to
1389 std::vector<CORE_ADDR>.
1390 * linux-low.c (install_software_single_step_breakpoints):
1391 Likewise.
1392 * linux-low.h (install_software_single_step_breakpoints):
1393 Likewise.
1394
be628ab8
SDJ
13952017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1396
1397 * remote-utils.c: Include "gdb_termios.h" instead of
1398 "terminal.h".
1399 * terminal.h: Delete file.
1400
7c5ded6a
SDJ
14012017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1402
1403 * server.c: Include <vector>.
1404 <program_argv, wrapper_argv>: Convert to std::vector.
1405 (start_inferior): Rewrite function to use C++.
1406 (handle_v_run): Likewise. Update code that calculates the argv
1407 based on the vRun packet; use C++.
1408 (captured_main): Likewise.
1409
436252de
SM
14102017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1411
1412 * server.c (handle_v_cont): Initialize thread_resume::thread
1413 with null_ptid.
1414
9bf2a700
PA
14152017-04-05 Pedro Alves <palves@redhat.com>
1416
1417 * configure: Regenerate.
1418
a121b7c1
PA
14192017-04-05 Pedro Alves <palves@redhat.com>
1420
1421 * gdbreplay.c (sync_error): Constify.
1422 * linux-x86-low.c (push_opcode): Constify.
1423
21c8a587
PA
14242017-04-05 Pedro Alves <palves@redhat.com>
1425
1426 * win32-low.c (get_child_debug_event)
1427 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1428 Report TARGET_WAITKIND_SPURIOUS instead.
1429
fb32b4f7
PA
14302017-04-05 Pedro Alves <palves@redhat.com>
1431
1432 * remote-utils.c (remote_prepare, remote_open): Constify.
1433 * remote-utils.h (remote_prepare, remote_open): Constify.
1434 * server.c (captured_main): Constify 'port' handling.
1435
65dd1e59
SM
14362017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1437
1438 * Makefile.in (clean): Clear .deps.
1439
8fa5b777
SM
14402017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1441
1442 * .gitignore: Remove generated files, replace with wildcard.
1443 * (clean): Replace removal of generated files with wildcard.
1444 (version.c): Replace with...
1445 (version-generated.c): ...this.
1446 (xml-builtin.c): Replace with...
1447 (xml-builtin-generated.c): ...this.
1448 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1449 (%.c: *regformats*): Replace with...
1450 (%-generated.c: *regformats*): ...this.
1451
a12e714b
MF
14522017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1453
1454 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1455 (xtensa_fill_gregset): Call collect_register_by_name for
1456 threadptr register.
1457 (xtensa_store_gregset): Call supply_register_by_name for
1458 threadptr register.
1459
1a09b50a
MF
14602017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1461
1462 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1463 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1464 (xtensa_store_gregset): Call supply_register for all registers in
1465 a0_regnum..a0_regnum + C0_NREGS range.
1466
1a01e7c6
SM
14672017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1468
1469 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1470 (ax-ipa.o: ax.c): Remove.
1471 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1472 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1473 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1474 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1475 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1476
36bc18a8
SM
14772017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1478
1479 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1480 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1481 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1482 (errors-ipa.o: ../common/errors.c): Remove.
1483 (format-ipa.o: ../common/format.c): Remove.
1484 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1485
a8ebe3d5
SM
14862017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1487
1488 * Makefile.in (%-ipa.o: %.c): New rule.
1489 (tracepoint-ipa.o: tracepoint.c): Remove.
1490 (utils-ipa.o: utils.c): Remove.
1491 (remote-utils-ipa.o: remote-utils.c): Remove.
1492 (regcache-ipa.o: regcache.c): Remove.
1493 (i386-linux-ipa.o: i386-linux.c): Remove.
1494 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1495 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1496 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1497 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1498 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1499 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1500 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1501 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1502 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1503 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1504 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1505 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1506 (aarch64-ipa.o: aarch64.c): Remove.
1507 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1508 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1509 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1510 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1511 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1512 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1513 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1514 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1515 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1516 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1517 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1518 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1519 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1520 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1521 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1522 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1523 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1524 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1525 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1526 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1527 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1528 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1529 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1530 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1531 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1532 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1533 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1534 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1535 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1536 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1537 (tdesc-ipa.o: tdesc.c): Remove.
1538 (x32-linux-ipa.o: x32-linux.c): Remove.
1539 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1540 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1541
50cfacb7
SM
15422017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1543
1544 * Makefile.in (%.o: ../arch/%.c): New rule.
1545 (arm.o: ../arch/arm.c): Remove.
1546 (arm-linux.o: ../arch/arm-linux.c): Remove.
1547 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1548 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1549
c5a22423
SM
15502017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1551
1552 * Makefile.in (%.o: ../nat/%.c): New rule.
1553 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1554 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1555 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1556 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1557 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1558 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1559 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1560 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1561 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1562 (linux-personality.o: ../nat/linux-personality.c): Remove.
1563 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1564 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1565 (x86-linux.o: ../nat/x86-linux.c): Remove.
1566 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1567 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1568
6bda016b
SM
15692017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1570
1571 * Makefile.in (%.o: ../common/%.c): New rule.
1572 (signals.o: ../common/signals.c): Remove.
1573 (print-utils.o: ../common/print-utils.c): Remove.
1574 (rsp-low.o: ../common/rsp-low.c): Remove.
1575 (common-utils.o: ../common/common-utils.c): Remove.
1576 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1577 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1578 (vec.o: ../common/vec.c): Remove.
1579 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1580 (xml-utils.o: ../common/xml-utils.c): Remove.
1581 (ptid.o: ../common/ptid.c): Remove.
1582 (buffer.o: ../common/buffer.c): Remove.
1583 (format.o: ../common/format.c): Remove.
1584 (filestuff.o: ../common/filestuff.c): Remove.
1585 (agent.o: ../common/agent.c): Remove.
1586 (errors.o: ../common/errors.c): Remove.
1587 (environ.o: ../common/environ.c): Remove.
1588 (common-debug.o: ../common/common-debug.c): Remove.
1589 (cleanups.o: ../common/cleanups.c): Remove.
1590 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1591 (fileio.o: ../common/fileio.c): Remove.
1592 (common-regcache.o: ../common/common-regcache.c): Remove.
1593 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1594 (new-op.o: ../common/new-op.c): Remove.
1595 (btrace-common.o: ../common/btrace-common.c): Remove.
1596
21122961
SM
15972017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1598
1599 * Makefile.in (%.o: ../target/%.c): New rule.
1600 (waitstatus.o: ../target/waitstatus.c): Remove.
1601
c362e621
SM
16022017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1603
1604 * Makefile.in
1605 (%.c: ../regformats/%.dat,
1606 (%.c: ../regformats/arm/%.dat,
1607 (%.c: ../regformats/i386/%.dat,
1608 (%.c: ../regformats/rs6000/%.dat): New rules.
1609 (aarch64.c): Remove.
1610 (reg-arm.c): Remove.
1611 (arm-with-iwmmxt.c): Remove.
1612 (arm-with-vfpv2.c): Remove.
1613 (arm-with-vfpv3.c): Remove.
1614 (arm-with-neon.c): Remove.
1615 (reg-bfin.c): Remove.
1616 (reg-cris.c): Remove.
1617 (reg-crisv32.c): Remove.
1618 (i386.c): Remove.
1619 (i386-linux.c): Remove.
1620 (i386-avx.c): Remove.
1621 (i386-avx-linux.c): Remove.
1622 (i386-avx-avx512.c): Remove.
1623 (i386-avx-avx512-linux.c): Remove.
1624 (i386-mpx.c): Remove.
1625 (i386-mpx-linux.c): Remove.
1626 (i386-avx-mpx-avx512-pku.c): Remove.
1627 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1628 (i386-avx-mpx.c): Remove.
1629 (i386-avx-mpx-linux.c): Remove.
1630 (i386-mmx.c): Remove.
1631 (i386-mmx-linux.c): Remove.
1632 (reg-ia64.c): Remove.
1633 (reg-m32r.c): Remove.
1634 (reg-m68k.c): Remove.
1635 (reg-cf.c): Remove.
1636 (mips-linux.c): Remove.
1637 (mips-dsp-linux.c): Remove.
1638 (mips64-linux.c): Remove.
1639 (mips64-dsp-linux.c): Remove.
1640 (nios2-linux.c): Remove.
1641 (powerpc-32.c): Remove.
1642 (powerpc-32l.c): Remove.
1643 (powerpc-altivec32l.c): Remove.
1644 (powerpc-cell32l.c): Remove.
1645 (powerpc-vsx32l.c): Remove.
1646 (powerpc-isa205-32l.c): Remove.
1647 (powerpc-isa205-altivec32l.c): Remove.
1648 (powerpc-isa205-vsx32l.c): Remove.
1649 (powerpc-e500l.c): Remove.
1650 (powerpc-64l.c): Remove.
1651 (powerpc-altivec64l.c): Remove.
1652 (powerpc-cell64l.c): Remove.
1653 (powerpc-vsx64l.c): Remove.
1654 (powerpc-isa205-64l.c): Remove.
1655 (powerpc-isa205-altivec64l.c): Remove.
1656 (powerpc-isa205-vsx64l.c): Remove.
1657 (s390-linux32.c): Remove.
1658 (s390-linux32v1.c): Remove.
1659 (s390-linux32v2.c): Remove.
1660 (s390-linux64.c): Remove.
1661 (s390-linux64v1.c): Remove.
1662 (s390-linux64v2.c): Remove.
1663 (s390-te-linux64.c): Remove.
1664 (s390-vx-linux64.c): Remove.
1665 (s390-tevx-linux64.c): Remove.
1666 (s390x-linux64.c): Remove.
1667 (s390x-linux64v1.c): Remove.
1668 (s390x-linux64v2.c): Remove.
1669 (s390x-te-linux64.c): Remove.
1670 (s390x-vx-linux64.c): Remove.
1671 (s390x-tevx-linux64.c): Remove.
1672 (tic6x-c64xp-linux.c): Remove.
1673 (tic6x-c64x-linux.c): Remove.
1674 (tic6x-c62x-linux.c): Remove.
1675 (reg-sh.c): Remove.
1676 (reg-sparc64.c): Remove.
1677 (reg-spu.c): Remove.
1678 (amd64.c): Remove.
1679 (amd64-linux.c): Remove.
1680 (amd64-avx.c): Remove.
1681 (amd64-avx-linux.c): Remove.
1682 (amd64-avx-avx512.c): Remove.
1683 (amd64-avx-avx512-linux.c): Remove.
1684 (amd64-mpx.c): Remove.
1685 (amd64-mpx-linux.c): Remove.
1686 (amd64-avx-mpx-avx512-pku.c): Remove.
1687 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1688 (amd64-avx-mpx.c): Remove.
1689 (amd64-avx-mpx-linux.c): Remove.
1690 (x32.c): Remove.
1691 (x32-linux.c): Remove.
1692 (x32-avx.c): Remove.
1693 (x32-avx-linux.c): Remove.
1694 (x32-avx-avx512.c): Remove.
1695 (x32-avx-avx512-linux.c): Remove.
1696 (reg-xtensa.c): Remove.
1697 (reg-tilegx.c): Remove.
1698 (reg-tilegx32.c): Remove.
1699
1672e0d9
SDJ
17002017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1701
1702 * Makefile.in (SFILES): Add "common/environ.c".
1703 (OBJS): Add "common/environ.h".
1704
239b6d10
WT
17052017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1706
1707 * configure.ac: Check if the fs_base and gs_base members of
1708 `struct user_regs_struct' exist.
1709 * config.in: Regenerated.
1710 * configure: Likewise.
1711
694b382c
AT
17122017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1713
1714 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1715 target_read_memory.
1716 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1717 (get_next_pcs_syscall_next_pc): Likewise.
1718
7dc53023
LM
17192016-12-23 Luis Machado <lgustavo@codesourcery.com>
1720
1721 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1722 * nto-x86-low.c: Likewise.
1723
ad02e4fe
SM
17242016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1725
1726 * Makefile.in: Include disable-implicit-rules.mk.
1727
dcb07cfa
PA
17282016-11-23 Pedro Alves <palves@redhat.com>
1729
1730 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1731 (debug_vprintf): Use std::chrono::steady_clock instead of
1732 gettimeofday. Use '.' instead of ':'.
1733 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1734 (get_timestamp): Use std::chrono::steady_clock instead of
1735 gettimeofday.
1736
8629c02c
SM
17372016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1738
1739 * Makefile.in: Fix whitespace formatting.
1740
b593ecca
SM
17412016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1742
1743 * Makefile.in (SFILES, OBS): Flatten list and order
1744 alphabetically.
1745
9986ba08
PA
17462016-11-23 Pedro Alves <palves@redhat.com>
1747
1748 * event-loop.c (handle_file_event): Use warning.
1749 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1750 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1751 Use warning.
1752
4eefa7bc
PA
17532016-11-23 Pedro Alves <palves@redhat.com>
1754
1755 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1756 output.
1757 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1758 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1759 debug_printf and debug_flush for debug output.
1760 * server.c (handle_general_set): Likewise.
1761 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1762 output.
1763
5443506e
SM
17642016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1765
1766 * Makefile.in (.c.o): Replace rule with ...
1767 (%.o: %.c): ... this one.
1768
3b165252
SM
17692016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1770
1771 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1772 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1773 make.
1774 * configure.ac: Remove checks for the make program.
1775 * configure: Re-generate.
1776
0bcda685
PA
17772016-10-28 Pedro Alves <palves@redhat.com>
1778
1779 * Makefile.in (CXX_DIALECT): Get from configure.
1780 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1781 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1782 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1783 * config.in: Regenerate.
1784 * configure: Regenerate.
1785
c3805894
YQ
17862016-10-27 Yao Qi <yao.qi@linaro.org>
1787
1788 * linux-low.c (linux_supports_range_stepping): Return true if
1789 can_software_single_step return true.
1790
89342618
YQ
17912016-10-27 Yao Qi <yao.qi@linaro.org>
1792
1793 * inferiors.c (find_inferior_in_random): New function.
1794 * inferiors.h (find_inferior_in_random): Declare.
1795 * linux-low.c (linux_wait_for_event_filtered): Call
1796 find_inferior_in_random instead of find_inferior.
1797
e3652c84
YQ
17982016-10-27 Yao Qi <yao.qi@linaro.org>
1799
1800 * linux-low.c (linux_wait_1): If single-step breakpoints are
1801 inserted, remove them.
1802
5a04c4cf
PA
18032016-10-26 Pedro Alves <palves@redhat.com>
1804
1805 * linux-low.c (handle_extended_wait): Link parent/child fork
1806 threads.
1807 (linux_wait_1): Unlink them.
1808 (linux_set_resume_request): Ignore resume requests for
1809 already-resumed and unhandled fork child threads.
1810 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1811 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1812 New functions.
1813 (handle_v_requests) <vCont>: Don't call require_running.
1814 * server.h (in_queued_stop_replies): New declaration.
1815
cb93dc7f
YQ
18162016-10-24 Yao Qi <yao.qi@linaro.org>
1817
1818 PR server/20733
1819 * linux-aarch64-low.c (append_insns): Cast the return value to
1820 'uint32_t *'.
1821
a1078bea
YQ
18222016-10-10 Yao Qi <yao.qi@linaro.org>
1823
1824 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1825
1fb77080
SDJ
18262016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1827
1828 * target.c (target_supports_multi_process): New function, moved
1829 from...
1830 * target.h (target_supports_multi_process): ... here. Remove
1831 macro.
1832
39b5a3b9
TT
18332016-10-05 Tom Tromey <tom@tromey.com>
1834
1835 PR remote/20655:
1836 * tracepoint.c (handle_tracepoint_bkpts): Check
1837 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1838
c1d0b70a
YQ
18392016-10-05 Yao Qi <yao.qi@linaro.org>
1840
1841 * configure.srv: Update the path of arm-*.xml files.
1842
0a69eedb
YQ
18432016-10-05 Terry Guo <terry.guo@arm.com>
1844 Yao Qi <yao.qi@linaro.org>
1845
1846 * Makefile.in: Adjust the path of rules.
1847 * configure.srv: Update the path of xml files.
1848 * regformats/arm-with-iwmmxt.dat: Regenerated.
1849 * regformats/arm-with-neon.dat: Likewise.
1850 * regformats/arm-with-vfpv2.dat: Likewise.
1851 * regformats/arm-with-vfpv3.dat Likewise.
1852
17e16485
YQ
18532016-09-30 Yao Qi <yao.qi@linaro.org>
1854
1855 PR gdbserver/20627
1856 * target.c (target_stop_and_wait): Don't call
1857 target_continue_no_signal, use resume_stop instead.
1858
edeeb602
YQ
18592016-09-26 Yao Qi <yao.qi@linaro.org>
1860
1861 * linux-low.c (linux_wait_1): Call debug_exit.
1862
503b1c39
PA
18632016-09-23 Pedro Alves <palves@redhat.com>
1864
1865 * Makefile.in (SFILES): Add common/new-op.c.
1866 (OBS): Add common/new-op.o.
1867 (new-op.o): New rule.
1868
74172ecf
SM
18692016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1870
1871 * .gitinore: Ignore more files.
1872
fc6cda2e
YQ
18732016-09-21 Yao Qi <yao.qi@linaro.org>
1874
1875 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1876 23.
1877
bc1e6c81
SDJ
18782016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1879
1880 * server.c (start_inferior): Call target_mourn_inferior instead of
1881 mourn_inferior; pass ptid_t argument to it.
1882 (resume): Likewise.
1883 (handle_target_event): Likewise.
1884 * target.c (target_mourn_inferior): New function.
1885 * target.h (mourn_inferior): Delete macro.
1886
0e00e962
AA
18872016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1888
1889 * linux-low.c (lwp_is_stepping): New function.
1890
1d8cb77d
CL
18912016-09-06 Carl Love <cel@us.ibm.com>
1892
1893 * server.c (start_inferior): Fixed comment, requested comment change
1894 didn't get updated correctly. Removed reference to ptrace () call as
1895 it is only true on Linux systems.
1896
7313bced
CL
18972016-09-06 Carl Love <cel@us.ibm.com>
1898
1899 * server.c (start_inferior): Do not call
1900 function target_post_create_inferior () if the
1901 inferior process has already exited.
1902
cf6de44d
PA
19032016-09-05 Pedro Alves <palves@redhat.com>
1904
1905 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1906 (COMPILE.pre, CC_LD): Use CXX directly.
1907 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1908 * acinclude.m4: Don't include build-with-cxx.m4.
1909 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1910 * configure: Regenerate.
1911
c1da6748
AT
19122016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1913
1914 PR gdb/19495
1915 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1916 call writing data to own_buf.
1917
f2b9e3df
SDJ
19182016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1919
1920 * target.c (mywait): Call target_wait instead of
1921 the_target->wait.
1922 (target_wait): New function.
1923
049a8570
SDJ
19242016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1925
1926 * server.c (start_inferior): New variable 'ptid'. Replace calls
1927 to the_target->resume by target_continue{,_no_signal}, depending
1928 on the case.
1929 * target.c (target_stop_and_wait): Call target_continue_no_signal
1930 instead of the_target->resume.
1931 (target_continue): New function.
1932
3aa5cfa0
AT
19332016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1934
1935 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1936
754653a7
AZ
19372016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1938
1939 PR server/20491
1940 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1941 ps_prochandle.
1942 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1943 * linux-arm-low.c (ps_get_thread_area): Likewise.
1944 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1945 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1946 * linux-mips-low.c (ps_get_thread_area): Likewise.
1947 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1948 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1949 * linux-x86-low.c (ps_get_thread_area): Likewise.
1950 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1951
ed036b40
PA
19522016-08-19 Pedro Alves <palves@redhat.com>
1953
1954 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1955
c8ef42ee
PA
19562016-08-19 Pedro Alves <palves@redhat.com>
1957
1958 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1959 comment. Use memcpy instead of casting through unsigned long.
1960
9c235a72
PA
19612016-08-19 Pedro Alves <palves@redhat.com>
1962
1963 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1964 allocating around 0x80000000.
1965
201506da
PA
19662016-08-19 Pedro Alves <palves@redhat.com>
1967
1968 PR gdb/20415
1969 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1970 (x32-avx512-linux-ipa.o): New rules.
1971 * configure.ac (x86_64-*-linux*): New x32 check.
1972 * configure.srv (ipa_x32_linux_regobj): New.
1973 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1974 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1975 descriptions.
1976 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1977 descriptions.
1978 * configure: Regenerate.
1979
f348d89a
PA
19802016-08-09 Pedro Alves <palves@redhat.com>
1981
1982 PR gdb/18653
1983 * Makefile.in (OBS): Add signals-state-save-restore.o.
1984 (signals-state-save-restore.o): New rule.
1985 * config.in: Regenerate.
1986 * configure: Regenerate.
1987 * linux-low.c: Include "signals-state-save-restore.h".
1988 (linux_create_inferior): Call
1989 restore_original_signals_state.
1990 * server.c: Include "dispositions-save-restore.h".
1991 (captured_main): Call save_original_signals_state.
1992
1baf5149
PA
19932016-08-05 Pedro Alves <palves@redhat.com>
1994
1995 * configure: Regenerate.
1996
fcd4a73d
YQ
19972016-08-04 Yao Qi <yao.qi@linaro.org>
1998
1999 * linux-low.c (regsets_fetch_inferior_registers): Check
2000 errno is ESRCH or not.
2001
979659d0
YQ
20022016-08-02 Yao Qi <yao.qi@linaro.org>
2003
2004 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2005 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2006 (thread_db_load_search): Update.
2007 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2008 td_ta_set_event and td_ta_event_getmsg.
2009
6598661d
PA
20102016-07-26 Pedro Alves <palves@redhat.com>
2011
2012 PR server/20414
2013 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2014 of unsigned long for 64-bit registers and use uint32_t instead of
2015 unsigned int for 32-bit registers.
2016
9cf12d57
PA
20172016-07-26 Pedro Alves <palves@redhat.com>
2018
2019 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2020 to 'ptrace'.
2021
305450ed
TT
20222016-07-21 Tom Tromey <tom@tromey.com>
2023
2024 * configure: Rebuild.
2025
2583da7c
YQ
20262016-07-21 Yao Qi <yao.qi@linaro.org>
2027
2028 * mem-break.c (find_gdb_breakpoint): Cast bp to
2029 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2030
21536b36
YQ
20312016-07-21 Yao Qi <yao.qi@linaro.org>
2032
2033 * server.c (handle_v_requests): Support s and S actions
2034 if target_supports_software_single_step return true.
2035
8901d193
YQ
20362016-07-21 Yao Qi <yao.qi@linaro.org>
2037
2038 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2039 is resume_step, call maybe_hw_step.
2040 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2041 and unstop them.
2042 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2043 breakpoints or not.
2044 (proceed_one_lwp): If resume request is resume_step, install
2045 reinsert breakpoints and call maybe_hw_step.
2046
0e9a339e
YQ
20472016-07-21 Yao Qi <yao.qi@linaro.org>
2048
2049 * linux-low.c (proceed_one_lwp): Declare.
2050 (linux_resume_one_thread): Remove local variable 'step'.
2051 Lift code enqueue signal. Call proceed_one_lwp instead of
2052 linux_resume_one_lwp.
2053
4281b351
YQ
20542016-07-21 Yao Qi <yao.qi@linaro.org>
2055
2056 * linux-low.c (linux_resume_one_thread): Call
2057 enqueue_pending_signal.
2058
984a2c04
YQ
20592016-07-21 Yao Qi <yao.qi@linaro.org>
2060
2061 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2062 * inferiors.c (do_restore_current_thread_cleanup): New function.
2063 (make_cleanup_restore_current_thread): Likewise.
2064 * linux-low.c (install_software_single_step_breakpoints): Call
2065 make_cleanup_restore_current_thread. Switch current_thread to
2066 thread.
2067
bec903c9
YQ
20682016-07-21 Yao Qi <yao.qi@linaro.org>
2069
2070 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2071 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2072 (clone_one_breakpoint): Likewise.
2073 (delete_reinsert_breakpoints): Change parameter to thread.
2074 Callers updated.
2075 (has_reinsert_breakpoints): Likewise.
2076 (uninsert_reinsert_breakpoints): Likewise.
2077 (reinsert_reinsert_breakpoints): Likewise.
2078 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2079 (delete_reinsert_breakpoints): Likewise.
2080 (reinsert_reinsert_breakpoints): Likewise.
2081 (uninsert_reinsert_breakpoints): Likewise.
2082 (has_reinsert_breakpoints): Likewise.
2083
63c40ec7
YQ
20842016-07-21 Yao Qi <yao.qi@linaro.org>
2085
2086 * inferiors.c (get_thread_process): Make parameter const.
2087 * inferiors.h (get_thread_process): Update declaration.
2088 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2089 Add new parameters child_thread and parent_thread. Callers
2090 updated.
2091 * mem-break.h (clone_all_breakpoints): Update declaration.
2092
9aa76cd0
YQ
20932016-07-21 Yao Qi <yao.qi@linaro.org>
2094
2095 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2096 <command_list, handler>: Remove.
2097 (struct gdb_breakpoint): New.
2098 (struct other_breakpoint): New.
2099 (struct reinsert_breakpoint): New.
2100 (is_gdb_breakpoint): New function.
2101 (any_persistent_commands): Update command_list if
2102 is_gdb_breakpoint returns true.
2103 (set_breakpoint): Create breakpoints according to their types.
2104 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2105 (set_gdb_breakpoint_1): Likewise.
2106 (set_gdb_breakpoint): Likewise.
2107 (clear_breakpoint_conditions): Change parameter type to
2108 'struct gdb_breakpoint *'.
2109 (clear_breakpoint_commands): Likewise.
2110 (clear_breakpoint_conditions_and_commands): Likewise.
2111 (add_condition_to_breakpoint): Likewise.
2112 (add_breakpoint_condition): Likewise.
2113 (add_commands_to_breakpoint): Likewise.
2114 (check_breakpoints): Check other_breakpoint.
2115 (clone_one_breakpoint): Clone breakpopint according to its type.
2116 * mem-break.h (struct gdb_breakpoint): Declare.
2117 (set_gdb_breakpoint): Update declaration.
2118 (clear_breakpoint_conditions_and_commands): Likewise.
2119 (add_breakpoint_condition): Likewise.
2120 (add_breakpoint_commands): Likewise.
2121 * server.c (process_point_options): Change parameter type to
2122 'struct gdb_breakpoint *'.
2123
811f8301
YQ
21242016-07-21 Yao Qi <yao.qi@linaro.org>
2125
2126 * mem-break.c (set_breakpoint_at): Rename it to ...
2127 (set_breakpoint_type_at): ... it.
2128 (set_breakpoint_at): Call set_breakpoint_type_at.
2129 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2130 * mem-break.h (set_breakpoint_at): Update comments.
2131
b1c51e36
CLT
21322016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2133
2134 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2135 to buf parameter.
2136 (nios2_store_gregset): Likewise.
2137
ced2dffb
PA
21382016-07-01 Pedro Alves <palves@redhat.com>
2139 Antoine Tremblay <antoine.tremblay@ericsson.com>
2140
2141 * linux-low.c: Change interface to take the target lwp_info
2142 pointer directly and return void. Handle detaching from a zombie
2143 thread.
2144 (linux_detach_lwp_callback): New function.
2145 (linux_detach): Detach from the leader thread after detaching from
2146 the clone threads.
2147
2ac09a5b
YQ
21482016-06-28 Yao Qi <yao.qi@linaro.org>
2149
2150 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2151 for variable new_offset.
2152 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2153 (aarch64_ftrace_insn_reloc_cb): Likewise.
2154 (aarch64_ftrace_insn_reloc_tb): Likewise.
2155 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2156 PRIx64 instead of PRIx32.
2157
79e7fd4f
YQ
21582016-06-28 Yao Qi <yao.qi@linaro.org>
2159
2160 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2161 (the_low_target): Install arm_get_syscall_trapinfo.
2162
061fc021
YQ
21632016-06-28 Yao Qi <yao.qi@linaro.org>
2164
2165 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2166 function.
2167 (the_low_target): Install aarch64_get_syscall_trapinfo.
2168
4cc32bec
YQ
21692016-06-28 Yao Qi <yao.qi@linaro.org>
2170
2171 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2172 Callers updated.
2173 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2174 Remove parameter sysno.
2175 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2176 sysret.
2177
782c1122
AA
21782016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2179
2180 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2181 (s390_emit_ne_goto): Likewise.
2182 (s390_emit_lt_goto): Likewise.
2183 (s390_emit_le_goto): Likewise.
2184 (s390_emit_gt_goto): Likewise.
2185 (s390_emit_ge_goto): Likewise.
2186 (s390x_emit_eq_goto): Likewise.
2187 (s390x_emit_ne_goto): Likewise.
2188 (s390x_emit_lt_goto): Likewise.
2189 (s390x_emit_le_goto): Likewise.
2190 (s390x_emit_gt_goto): Likewise.
2191 (s390x_emit_ge_goto): Likewise.
2192 (s390_emit_ops_impl): Mark variable static.
2193 (s390x_emit_ops): Likewise.
2194
2e7b624b
YQ
21952016-06-17 Yao Qi <yao.qi@linaro.org>
2196
2197 * linux-low.c (handle_extended_wait): Call
2198 uninsert_reinsert_breakpoints for the parent process. Remove
2199 reinsert breakpoints from the child process. Reinsert them to
2200 the parent process when vfork is done.
2201 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2202 (reinsert_reinsert_breakpoints): New function.
2203 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2204 (reinsert_reinsert_breakpoints): Declare.
2205
8a81c5d7
YQ
22062016-06-17 Yao Qi <yao.qi@linaro.org>
2207
2208 * linux-low.c (handle_extended_wait): If the parent is doing
2209 step-over, remove the reinsert breakpoints from the forked child.
2210
f50bf8e5
YQ
22112016-06-17 Yao Qi <yao.qi@linaro.org>
2212
2213 * linux-low.c (unsuspend_all_lwps): Declare.
2214 (linux_low_filter_event): If thread exited, call finish_step_over.
2215 If step-over is finished, unsuspend other threads.
2216
8376a3cb
YQ
22172016-06-17 Yao Qi <yao.qi@linaro.org>
2218
2219 * linux-low.c (linux_resume_one_lwp_throw): Assert
2220 has_reinsert_breakpoints returns false.
2221 * mem-break.c (delete_disabled_breakpoints): Assert
2222 bp type isn't reinsert_breakpoint.
2223
f79b145d
YQ
22242016-06-17 Yao Qi <yao.qi@linaro.org>
2225
2226 * linux-low.c (maybe_hw_step): New function.
2227 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2228 (finish_step_over): Switch current_thread to lwp temporarily,
2229 and assert has_reinsert_breakpoints returns true.
2230 (proceed_one_lwp): Call maybe_hw_step.
2231 * mem-break.c (has_reinsert_breakpoints): New function.
2232 * mem-break.h (has_reinsert_breakpoints): Declare.
2233
0ae534d2
JT
22342016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2235
2236 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2237
fcdad592
YQ
22382016-05-17 Yao Qi <yao.qi@linaro.org>
2239
2240 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2241 instead of find_inferior.
2242
9e784964
YQ
22432016-05-05 Yao Qi <yao.qi@linaro.org>
2244
2245 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2246 Initialize res to zero.
2247
cf2ebb6e
YQ
22482016-05-05 Yao Qi <yao.qi@linaro.org>
2249
2250 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2251 to uint32_t.
2252
c1aebf87
UW
22532016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2254
2255 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2256 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2257 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2258
35fd2deb 22592016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 2260 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
2261
2262 * tracepoint.c (write_inferior_int8): New function.
2263 (cmd_qtenable_disable): Write enable flag using
2264 write_inferior_int8.
2265
484b3c32
YQ
22662016-04-25 Yao Qi <yao.qi@linaro.org>
2267
2268 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2269 (need_step_over_p): Return zero if the LWP has pending signals
2270 can be delivered on software single step target.
2271
85ba7d86
YQ
22722016-04-25 Yao Qi <yao.qi@linaro.org>
2273
2274 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2275 return instead of error.
2276
3539aa13
YQ
22772016-04-22 Yao Qi <yao.qi@linaro.org>
2278
2279 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2280 to 23.
2281
5b061e98
YQ
22822016-04-22 Yao Qi <yao.qi@linaro.org>
2283
2284 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2285 signal when stepping over breakpoint with software single
2286 step.
2287
3451269c
PA
22882016-04-21 Pedro Alves <palves@redhat.com>
2289
2290 * linux-s390-low.c (s390_collect_ptrace_register)
2291 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2292 add casts.
2293 (s390_check_regset): Use void * instead of gdb_byte *.
2294
a2358508
PA
22952016-04-20 Pedro Alves <palves@redhat.com>
2296
2297 * configure: Renegerate.
2298
6885166d
YQ
22992016-04-20 Yao Qi <yao.qi@linaro.org>
2300
2301 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2302 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2303 number 16.
2304 (arm_store_gregset): Likewise.
2305
2b863f51
WT
23062016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2307
2308 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2309 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2310 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2311 (amd64-avx-mpx-linux.c): New rules.
2312 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2313 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2314 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2315 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2316 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2317 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2318 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2319 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2320 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2321 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2322 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2323 * linux-x86-low.c (x86_linux_read_description): Add case for
2324 X86_XSTATE_AVX_MPX_MASK.
2325 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2326 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2327 init_registers_i386_avx_mpx_linux.
2328 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2329 (initialize_low_tracepoint): Call
2330 init_registers_i386_avx_mpx_linux.
2331 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2332 (initialize_low_tracepoint): Call
2333 init_registers_amd64_avx_mpx_linux.
2334 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2335 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2336 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2337 declarations.
2338
9b30624b
PA
23392016-04-18 Pedro Alves <palves@redhat.com>
2340
2341 * configure: Regenerate.
2342
45e3745e
AT
23432016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2344
2345 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2346 (aarch64_emit_sub): Likewise.
2347
2afc13ff
PA
23482016-04-12 Pedro Alves <palves@redhat.com>
2349
2350 * utils.c (prepare_to_throw_exception): Delete.
2351
6e774b13
SM
23522016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2353
2354 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2355
4dca19f8
MK
23562016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2357
2358 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2359
d0a9981f
MK
23602016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2361
2362 * linux-aarch64-ipa.c: Add <elf.h> include.
2363 * linux-ppc-ipa.c: Add <elf.h> include.
2364 * linux-s390-ipa.c: Add <elf.h> include.
2365
252db07e
MK
23662016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2367
2368 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2369 (get_raw_reg_ptr): Likewise.
2370 (get_trace_state_variable_value_ptr): Likewise.
2371 (set_trace_state_variable_value_ptr): Likewise.
2372 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2373 char *.
2374
14e2b6d9
MK
23752016-03-31 Wei-cheng Wang <cole945@gmail.com>
2376 Marcin Kościelnicki <koriakin@0x04.net>
2377
2378 PR/17221
2379 * linux-ppc-low.c (emit_insns): New function.
2380 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2381 (ppc_emit_prologue): New function.
2382 (ppc_emit_epilogue): New function.
2383 (ppc_emit_add): New function.
2384 (ppc_emit_sub): New function.
2385 (ppc_emit_mul): New function.
2386 (ppc_emit_lsh): New function.
2387 (ppc_emit_rsh_signed): New function.
2388 (ppc_emit_rsh_unsigned): New function.
2389 (ppc_emit_ext): New function.
2390 (ppc_emit_zero_ext): New function.
2391 (ppc_emit_log_not): New function.
2392 (ppc_emit_bit_and): New function.
2393 (ppc_emit_bit_or): New function.
2394 (ppc_emit_bit_xor): New function.
2395 (ppc_emit_bit_not): New function.
2396 (ppc_emit_equal): New function.
2397 (ppc_emit_less_signed): New function.
2398 (ppc_emit_less_unsigned): New function.
2399 (ppc_emit_ref): New function.
2400 (ppc_emit_const): New function.
2401 (ppc_emit_reg): New function.
2402 (ppc_emit_pop): New function.
2403 (ppc_emit_stack_flush): New function.
2404 (ppc_emit_swap): New function.
2405 (ppc_emit_stack_adjust): New function.
2406 (ppc_emit_call): New function.
2407 (ppc_emit_int_call_1): New function.
2408 (ppc_emit_void_call_2): New function.
2409 (ppc_emit_if_goto): New function.
2410 (ppc_emit_goto): New function.
2411 (ppc_emit_eq_goto): New function.
2412 (ppc_emit_ne_goto): New function.
2413 (ppc_emit_lt_goto): New function.
2414 (ppc_emit_le_goto): New function.
2415 (ppc_emit_gt_goto): New function.
2416 (ppc_emit_ge_goto): New function.
2417 (ppc_write_goto_address): New function.
2418 (ppc_emit_ops_impl): New static variable.
2419 (ppc64v1_emit_prologue): New function.
2420 (ppc64v2_emit_prologue): New function.
2421 (ppc64_emit_epilogue): New function.
2422 (ppc64_emit_add): New function.
2423 (ppc64_emit_sub): New function.
2424 (ppc64_emit_mul): New function.
2425 (ppc64_emit_lsh): New function.
2426 (ppc64_emit_rsh_signed): New function.
2427 (ppc64_emit_rsh_unsigned): New function.
2428 (ppc64_emit_ext): New function.
2429 (ppc64_emit_zero_ext): New function.
2430 (ppc64_emit_log_not): New function.
2431 (ppc64_emit_bit_and): New function.
2432 (ppc64_emit_bit_or): New function.
2433 (ppc64_emit_bit_xor): New function.
2434 (ppc64_emit_bit_not): New function.
2435 (ppc64_emit_equal): New function.
2436 (ppc64_emit_less_signed): New function.
2437 (ppc64_emit_less_unsigned): New function.
2438 (ppc64_emit_ref): New function.
2439 (ppc64_emit_const): New function.
2440 (ppc64v1_emit_reg): New function.
2441 (ppc64v2_emit_reg): New function.
2442 (ppc64_emit_pop): New function.
2443 (ppc64_emit_stack_flush): New function.
2444 (ppc64_emit_swap): New function.
2445 (ppc64v1_emit_call): New function.
2446 (ppc64v2_emit_call): New function.
2447 (ppc64v1_emit_int_call_1): New function.
2448 (ppc64v2_emit_int_call_1): New function.
2449 (ppc64v1_emit_void_call_2): New function.
2450 (ppc64v2_emit_void_call_2): New function.
2451 (ppc64_emit_if_goto): New function.
2452 (ppc64_emit_eq_goto): New function.
2453 (ppc64_emit_ne_goto): New function.
2454 (ppc64_emit_lt_goto): New function.
2455 (ppc64_emit_le_goto): New function.
2456 (ppc64_emit_gt_goto): New function.
2457 (ppc64_emit_ge_goto): New function.
2458 (ppc64v1_emit_ops_impl): New static variable.
2459 (ppc64v2_emit_ops_impl): New static variable.
2460 (ppc_emit_ops): New function.
2461 (linux_low_target): Wire in ppc_emit_ops.
2462
a2174ba4
MK
24632016-03-31 Wei-cheng Wang <cole945@gmail.com>
2464 Marcin Kościelnicki <koriakin@0x04.net>
2465
2466 PR/17221
2467 * Makefile.in: Add powerpc-*-ipa.o
2468 * configure.srv: Add ipa_obj for powerpc*-linux.
2469 * linux-ppc-ipa.c: New file.
2470 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2471 includes.
2472 (PPC_FIELD): New macro.
2473 (PPC_SEXT): New macro.
2474 (PPC_OP6): New macro.
2475 (PPC_BO): New macro.
2476 (PPC_LI): New macro.
2477 (PPC_BD): New macro.
2478 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2479 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2480 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2481 (ppc_get_thread_area): New function.
2482 (is_elfv2_inferior): New function.
2483 (gen_ds_form): New function.
2484 (GEN_STD): New macro.
2485 (GEN_STDU): New macro.
2486 (GEN_LD): New macro.
2487 (GEN_LDU): New macro.
2488 (gen_d_form): New function.
2489 (GEN_ADDI): New macro.
2490 (GEN_ADDIS): New macro.
2491 (GEN_LI): New macro.
2492 (GEN_LIS): New macro.
2493 (GEN_ORI): New macro.
2494 (GEN_ORIS): New macro.
2495 (GEN_LWZ): New macro.
2496 (GEN_STW): New macro.
2497 (GEN_STWU): New macro.
2498 (gen_xfx_form): New function.
2499 (GEN_MFSPR): New macro.
2500 (GEN_MTSPR): New macro.
2501 (GEN_MFCR): New macro.
2502 (GEN_MTCR): New macro.
2503 (GEN_SYNC): New macro.
2504 (GEN_LWSYNC): New macro.
2505 (gen_x_form): New function.
2506 (GEN_OR): New macro.
2507 (GEN_MR): New macro.
2508 (GEN_LWARX): New macro.
2509 (GEN_STWCX): New macro.
2510 (GEN_CMPW): New macro.
2511 (gen_md_form): New function.
2512 (GEN_RLDICL): New macro.
2513 (GEN_RLDICR): New macro.
2514 (gen_i_form): New function.
2515 (GEN_B): New macro.
2516 (GEN_BL): New macro.
2517 (gen_b_form): New function.
2518 (GEN_BNE): New macro.
2519 (GEN_LOAD): New macro.
2520 (GEN_STORE): New macro.
2521 (gen_limm): New function.
2522 (gen_atomic_xchg): New function.
2523 (gen_call): New function.
2524 (ppc_relocate_instruction): New function.
2525 (ppc_install_fast_tracepoint_jump_pad): New function.
2526 (ppc_get_min_fast_tracepoint_insn_len): New function.
2527 (ppc_get_ipa_tdesc_idx): New function.
2528 (the_low_target): Wire in the new functions.
2529 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2530 tdescs.
2531 * linux-ppc-tdesc.h: New file.
2532
a13c4696
MK
25332016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2534
2535 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2536 (alloc_jump_pad_buffer): New function.
2537 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2538 (alloc_jump_pad_buffer): New function.
2539 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2540 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2541 (alloc_jump_pad_buffer): New function.
2542 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2543 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2544 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2545 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2546
1cda1512
MK
25472016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2548
2549 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2550 * linux-amd64-ipa.c: Likewise.
2551 * linux-i386-ipa.c: Likewise.
2552 * linux-s390-ipa.c: Likewise.
2553 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2554 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2555 set_trace_state_variable_value_ptr.
2556 (struct ipa_sym_addresses): Likewise.
2557 (symbol_list): Likewise.
2558 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2559 accessing gdb_collect directly.
2560 (gdb_collect_ptr_type): New typedef.
2561 (get_raw_reg_ptr_type): New typedef.
2562 (get_trace_state_variable_value_ptr_type): New typedef.
2563 (set_trace_state_variable_value_ptr_type): New typedef.
2564 (gdb_collect_ptr): New global.
2565 (get_raw_reg_ptr): New global.
2566 (get_trace_state_variable_value_ptr): New global.
2567 (set_trace_state_variable_value_ptr): New global.
2568 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2569 accessing get_raw_reg directly.
2570 (get_get_tsv_func_addr): Likewise for
2571 get_trace_state_variable_value_ptr.
2572 (get_set_tsv_func_addr): Likewise for
2573 set_trace_state_variable_value_ptr.
2574 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2575
72fb5488
SM
25762016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2577
2578 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2579
28170b88
MK
25802016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2581
2582 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2583 packets.
2584 (relocate_instruction): Remove own_buf.
2585 * server.c (own_buf): Make global.
2586 (handle_v_requests): Make global.
2587 * server.h (own_buf): New declaration.
2588 (handle_v_requests): New prototype.
2589
f39e8743
MK
25902016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2591
2592 PR 18377
2593 * linux-s390-low.c (add_insns): New function.
2594 (s390_emit_prologue): New function.
2595 (s390_emit_epilogue): New function.
2596 (s390_emit_add): New function.
2597 (s390_emit_sub): New function.
2598 (s390_emit_mul): New function.
2599 (s390_emit_lsh): New function.
2600 (s390_emit_rsh_signed): New function.
2601 (s390_emit_rsh_unsigned): New function.
2602 (s390_emit_ext): New function.
2603 (s390_emit_log_not): New function.
2604 (s390_emit_bit_and): New function.
2605 (s390_emit_bit_or): New function.
2606 (s390_emit_bit_xor): New function.
2607 (s390_emit_bit_not): New function.
2608 (s390_emit_equal): New function.
2609 (s390_emit_less_signed): New function.
2610 (s390_emit_less_unsigned): New function.
2611 (s390_emit_ref): New function.
2612 (s390_emit_if_goto): New function.
2613 (s390_emit_goto): New function.
2614 (s390_write_goto_address): New function.
2615 (s390_emit_litpool): New function.
2616 (s390_emit_const): New function.
2617 (s390_emit_call): New function.
2618 (s390_emit_reg): New function.
2619 (s390_emit_pop): New function.
2620 (s390_emit_stack_flush): New function.
2621 (s390_emit_zero_ext): New function.
2622 (s390_emit_swap): New function.
2623 (s390_emit_stack_adjust): New function.
2624 (s390_emit_set_r2): New function.
2625 (s390_emit_int_call_1): New function.
2626 (s390_emit_void_call_2): New function.
2627 (s390_emit_eq_goto): New function.
2628 (s390_emit_ne_goto): New function.
2629 (s390_emit_lt_goto): New function.
2630 (s390_emit_le_goto): New function.
2631 (s390_emit_gt_goto): New function.
2632 (s390_emit_ge_goto): New function.
2633 (s390x_emit_prologue): New function.
2634 (s390x_emit_epilogue): New function.
2635 (s390x_emit_add): New function.
2636 (s390x_emit_sub): New function.
2637 (s390x_emit_mul): New function.
2638 (s390x_emit_lsh): New function.
2639 (s390x_emit_rsh_signed): New function.
2640 (s390x_emit_rsh_unsigned): New function.
2641 (s390x_emit_ext): New function.
2642 (s390x_emit_log_not): New function.
2643 (s390x_emit_bit_and): New function.
2644 (s390x_emit_bit_or): New function.
2645 (s390x_emit_bit_xor): New function.
2646 (s390x_emit_bit_not): New function.
2647 (s390x_emit_equal): New function.
2648 (s390x_emit_less_signed): New function.
2649 (s390x_emit_less_unsigned): New function.
2650 (s390x_emit_ref): New function.
2651 (s390x_emit_if_goto): New function.
2652 (s390x_emit_const): New function.
2653 (s390x_emit_call): New function.
2654 (s390x_emit_reg): New function.
2655 (s390x_emit_pop): New function.
2656 (s390x_emit_stack_flush): New function.
2657 (s390x_emit_zero_ext): New function.
2658 (s390x_emit_swap): New function.
2659 (s390x_emit_stack_adjust): New function.
2660 (s390x_emit_int_call_1): New function.
2661 (s390x_emit_void_call_2): New function.
2662 (s390x_emit_eq_goto): New function.
2663 (s390x_emit_ne_goto): New function.
2664 (s390x_emit_lt_goto): New function.
2665 (s390x_emit_le_goto): New function.
2666 (s390x_emit_gt_goto): New function.
2667 (s390x_emit_ge_goto): New function.
2668 (s390_emit_ops): New function.
2669 (struct linux_target_ops): Fill in emit_ops hook.
2670
abd9baf9
MK
26712016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2672
2673 PR 18377
2674 * Makefile.in: Add s390 IPA files.
2675 * configure.srv: Build IPA for s390.
2676 * linux-s390-ipa.c: New file.
2677 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2678 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2679 (tdesc_s390_linux32): Likewise.
2680 (init_registers_s390_linux32v1): Likewise.
2681 (tdesc_s390_linux32v1): Likewise.
2682 (init_registers_s390_linux32v2): Likewise.
2683 (tdesc_s390_linux32v2): Likewise.
2684 (init_registers_s390_linux64): Likewise.
2685 (tdesc_s390_linux64): Likewise.
2686 (init_registers_s390_linux64v1): Likewise.
2687 (tdesc_s390_linux64v1): Likewise.
2688 (init_registers_s390_linux64v2): Likewise.
2689 (tdesc_s390_linux64v2): Likewise.
2690 (init_registers_s390_te_linux64): Likewise.
2691 (tdesc_s390_te_linux64): Likewise.
2692 (init_registers_s390_vx_linux64): Likewise.
2693 (tdesc_s390_vx_linux64): Likewise.
2694 (init_registers_s390_tevx_linux64): Likewise.
2695 (tdesc_s390_tevx_linux64): Likewise.
2696 (init_registers_s390x_linux64): Likewise.
2697 (tdesc_s390x_linux64): Likewise.
2698 (init_registers_s390x_linux64v1): Likewise.
2699 (tdesc_s390x_linux64v1): Likewise.
2700 (init_registers_s390x_linux64v2): Likewise.
2701 (tdesc_s390x_linux64v2): Likewise.
2702 (init_registers_s390x_te_linux64): Likewise.
2703 (tdesc_s390x_te_linux64): Likewise.
2704 (init_registers_s390x_vx_linux64): Likewise.
2705 (tdesc_s390x_vx_linux64): Likewise.
2706 (init_registers_s390x_tevx_linux64): Likewise.
2707 (tdesc_s390x_tevx_linux64): Likewise.
2708 (have_hwcap_s390_vx): New static variable.
2709 (s390_arch_setup): Fill have_hwcap_s390_vx.
2710 (s390_get_thread_area): New function.
2711 (s390_ft_entry_gpr_esa): New const.
2712 (s390_ft_entry_gpr_zarch): New const.
2713 (s390_ft_entry_misc): New const.
2714 (s390_ft_entry_fr): New const.
2715 (s390_ft_entry_vr): New const.
2716 (s390_ft_main_31): New const.
2717 (s390_ft_main_64): New const.
2718 (s390_ft_exit_fr): New const.
2719 (s390_ft_exit_vr): New const.
2720 (s390_ft_exit_misc): New const.
2721 (s390_ft_exit_gpr_esa): New const.
2722 (s390_ft_exit_gpr_zarch): New const.
2723 (append_insns): New function.
2724 (s390_relocate_instruction): New function.
2725 (s390_install_fast_tracepoint_jump_pad): New function.
2726 (s390_get_min_fast_tracepoint_insn_len): New function.
2727 (s390_get_ipa_tdesc_idx): New function.
2728 (struct linux_target_ops): Wire in the above functions.
2729 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2730 * linux-s390-tdesc.h: New file.
2731
a4105d04
MK
27322016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2733
2734 * linux-s390-low.c (s390_supports_tracepoints): New function.
2735 (struct linux_target_ops): Fill supports_tracepoints hook.
2736
35ac8b3e
YQ
27372016-03-18 Yao Qi <yao.qi@linaro.org>
2738
2739 * linux-low.c (lwp_signal_can_be_delivered): New function.
2740 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2741
94610ec4
YQ
27422016-03-18 Yao Qi <yao.qi@linaro.org>
2743
2744 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2745 0 if signal is enqueued. Remove 'signal' from one debugging
2746 message. Move one debugging message to some lines below.
2747 Remove code setting 'signal' to 0.
2748
80aea927
YQ
27492016-03-18 Yao Qi <yao.qi@linaro.org>
2750
2751 * linux-low.c (linux_low_filter_event): Remove redundant
2752 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2753
b04fd3be
MK
27542016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2755
2756 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2757 (struct linux_target_ops): Wire in the above.
2758
c40c8d4b
YQ
27592016-03-03 Yao Qi <yao.qi@linaro.org>
2760
2761 * linux-low.c: Update comments to start_step_over.
2762
0f8288ae
YQ
27632016-03-03 Yao Qi <yao.qi@linaro.org>
2764
2765 PR server/19736
2766 * linux-low.c (handle_extended_wait): Set child suspended
2767 if event_lwp->bp_reinsert isn't zero.
2768
fdbd04a8
YQ
27692016-03-02 Yao Qi <yao.qi@linaro.org>
2770
2771 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2772 enqueue_pending_signal.
2773
6896a8fa
MK
27742016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2775
2776 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2777 is actually loaded.
2778
ab503087
MK
27792016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2780
2781 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2782 (s390_regmap_3264) [!__s390x__]: New global.
2783 (s390_collect_ptrace_register): Skip map entries containing -1.
2784 (s390_supply_ptrace_register): Ditto.
2785 (s390_fill_gprs_high): New function.
2786 (s390_store_gprs_high): New function.
2787 (s390_regsets): Add NT_S390_HIGH_GPRS.
2788 (s390_get_hwcap): Enable on 31-bit.
2789 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2790 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2791 Detect NT_S390_HIGH_GPRS.
2792 (s390_usrregs_info_3264): Enable on 31-bit.
2793 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2794 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2795
ae91f625
MK
27962016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2797
2798 PR gdb/13808
2799 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2800 * configure.srv: Ditto.
2801 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2802 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2803 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2804 (init_registers_amd64_linux): Remove prototype.
2805 (tdesc_amd64_linux): Remove declaration.
2806 (get_ipa_tdesc): New function.
2807 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2808 initialize remaining tdescs.
2809 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2810 (init_registers_i386_linux): Remove prototype.
2811 (tdesc_i386_linux): Remove declaration.
2812 (get_ipa_tdesc): New function.
2813 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2814 initialize remaining tdescs.
2815 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2816 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2817 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2818 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2819 (x86_get_ipa_tdesc_idx): New function.
2820 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2821 * linux-x86-tdesc.h: New file.
2822 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2823 (target_get_ipa_tdesc_idx): New macro.
2824 * tracepoint.c (ipa_tdesc_idx): New macro.
2825 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2826 (symbol_list): Add ipa_tdesc_idx.
2827 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2828 (ipa_tdesc): Remove.
2829 (ipa_tdesc_idx): New variable.
2830 (get_context_regcache): Use get_ipa_tdesc.
2831 (gdb_collect): Ditto.
2832 (gdb_probe): Ditto.
2833 * tracepoint.h (get_ipa_tdesc): New prototype.
2834 (ipa_tdesc): Remove.
2835
e7ad2f14
PA
28362016-02-24 Pedro Alves <palves@redhat.com>
2837
2838 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2839 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2840 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2841 Factor out common code between the USE_SIGTRAP_SIGINFO and
2842 !USE_SIGTRAP_SIGINFO blocks.
2843 (linux_low_filter_event): Call save_stop_reason instead of
2844 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2845 Update comments.
2846 (linux_wait_1): Update comments.
2847
657f9cde
WW
28482016-02-24 Wei-cheng Wang <cole945@gmail.com>
2849
2850 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2851 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2852 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2853 ppc_insert_point, ppc_remove_point.
2854
b00b61e1
MK
28552016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2856
2857 * linux-s390-low.c (s390_supports_z_point_type): New function.
2858 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2859
553cb527
YQ
28602016-02-16 Yao Qi <yao.qi@linaro.org>
2861
2862 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2863 PC. Get pc from regcache_read_pc.
2864
a5652c21
YQ
28652016-02-12 Yao Qi <yao.qi@linaro.org>
2866
2867 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2868 or linux_get_pc_32bit.
2869 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2870
ed443b61
YQ
28712016-02-12 Yao Qi <yao.qi@linaro.org>
2872
2873 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2874 arm_linux_get_next_pcs_fixup.
2875
020ecd38
MK
28762016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2877
2878 * tracepoint.c (x_tracepoint_action_download): Change
2879 write_inferior_data_ptr to write_inferior_data_pointer.
2880 (cmd_qtstart): Likewise.
2881 (write_inferior_data_ptr): Remove.
2882 (download_agent_expr): Change write_inferior_data_ptr to
2883 write_inferior_data_pointer.
2884 (download_tracepoint_1): Likewise.
2885 (download_tracepoint): Likewise.
2886 (download_trace_state_variables): Likewise.
2887
7cae9051
WW
28882016-02-11 Wei-cheng Wang <cole945@gmail.com>
2889 Marcin Kościelnicki <koriakin@0x04.net>
2890
2891 * tracepoint.c (struct tracepoint_action_ops): Remove.
2892 (struct tracepoint_action): Remove ops.
2893 (m_tracepoint_action_download, r_tracepoint_action_download)
2894 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2895 size and offset accordingly.
2896 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2897 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2898 (tracepoint_action_send, tracepoint_action_download): New functions.
2899 Helpers for trace action handlers.
2900 (add_tracepoint_action): Remove setup actions ops.
2901 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2902
9f6a71b4
YQ
29032016-02-10 Yao Qi <yao.qi@linaro.org>
2904
2905 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2906
1e94266c
SM
29072016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2908
2909 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2910 to AC_OUTPUT.
2911 * configure: Regenerate.
2912
8adce034
SM
29132016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2914
2915 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2916 void * to gdb_byte *.
2917 * linux-low.c (siginfo_fixup): Likewise.
2918 (linux_xfer_siginfo): Likewise.
2919 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2920 Likewise.
2921 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2922
93813b37
WT
29232016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2924
2925 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2926 to srv_tgtobj.
2927 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2928 to srv_tgtobj.
2929 * linux-x86-low.c [__x86_64__]: Include
2930 "nat/amd64-linux-siginfo.h".
2931 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2932 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2933 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2934 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2935 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2936 (cpt_si_fd, si_timerid, si_overrun): Move from
2937 nat/amd64-linux-siginfo.c.
2938 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2939
8424cc97
SM
29402016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2941
2942 * server.c (skip_to_semicolon): Remove.
2943 (process_point_options): Use strchrnul instead of
2944 skip_to_semicolon.
2945
4d18591b
YQ
29462016-01-26 Yao Qi <yao.qi@linaro.org>
2947
2948 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2949 * linux-low.c (install_software_single_step_breakpoints): Don't
2950 call regcache_read_pc.
2951 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2952 argument pc.
2953
d8020970
YQ
29542016-01-26 Yao Qi <yao.qi@linaro.org>
2955
2956 * linux-low.c (install_software_single_step_breakpoints): Call
2957 regcache_read_pc instead of get_pc.
2958
8b207339
YQ
29592016-01-26 Yao Qi <yao.qi@linaro.org>
2960
2961 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2962 (unblock_async_io): Rename to ...
2963 (block_unblock_async_io): ... it. New function.
2964 (enable_async_io): Don't install SIGIO handler. Unblock it
2965 instead.
2966 (disable_async_io): Don't ignore SIGIO. Block it instead.
2967 (initialize_async_io): Install SIGIO handler. Don't call
2968 unblock_async_io.
2969
18879fef
YQ
29702016-01-26 Yao Qi <yao.qi@linaro.org>
2971
2972 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2973 first character is '\003', call *the_target->request_interrupt.
2974
a0f8e08a
YQ
29752016-01-25 Yao Qi <yao.qi@linaro.org>
2976
2977 * remote-utils.c (new_thread_notify): Remove.
2978 (dead_thread_notify): Likewise.
2979 * remote-utils.h (new_thread_notify): Remove declaration.
2980 (dead_thread_notify): Likewise.
2981
cc5fd9ab
MK
29822016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2983
2984 * gdb.trace/pending.exp: Fix expected message on continue.
2985
99e8eb11
MK
29862016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2987
2988 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2989 it works properly on big-endian machines where sizeof (CORE_ADDR)
2990 != sizeof (void *).
2991
a994041d
PA
29922016-01-21 Pedro Alves <palves@redhat.com>
2993
2994 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2995 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2996 * configure: Regenerate.
2997
f7a6a40d
YQ
29982016-01-21 Yao Qi <yao.qi@linaro.org>
2999
3000 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3001 is_thumb and set it according to CPSR saved on the stack.
3002 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3003 arm_sigreturn_next_pc.
3004
6f69e520
YQ
30052016-01-18 Yao Qi <yao.qi@linaro.org>
3006
3007 * linux-low.c (linux_set_pc_64bit): New function.
3008 (linux_get_pc_64bit): New function.
3009 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3010 Declare.
3011 * linux-sparc-low.c (debug_threads): Remove declaration.
3012 (sparc_get_pc): Remove.
3013 (the_low_target): Use linux_get_pc_64bit instead of
3014 sparc_get_pc.
3015 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3016 (the_low_target): Use linux_get_pc_64bit and
3017 linux_set_pc_64bit.
3018
276d4552
YQ
30192016-01-18 Yao Qi <yao.qi@linaro.org>
3020
3021 * linux-arm-low.c (debug_threads): Remove declaration.
3022 (arm_get_pc, arm_set_pc): Remove.
3023 (the_low_target): Use linux_get_pc_32bit and
3024 linux_set_pc_32bit.
3025 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3026 (the_low_target): Use linux_get_pc_32bit and
3027 linux_set_pc_32bit.
3028 * linux-cris-low.c (debug_threads): Remove declaration.
3029 (cris_get_pc, cris_set_pc,): Remove.
3030 (the_low_target): Use linux_get_pc_32bit and
3031 linux_set_pc_32bit.
3032 * linux-crisv32-low.c (debug_threads): Remove declaration.
3033 (cris_get_pc, cris_set_pc): Remove.
3034 (the_low_target): Use linux_get_pc_32bit and
3035 linux_set_pc_32bit.
3036 * linux-low.c: Include inttypes.h.
3037 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3038 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3039 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3040 (the_low_target): Use linux_get_pc_32bit and
3041 linux_set_pc_32bit.
3042 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3043 (the_low_target): Use linux_get_pc_32bit and
3044 linux_set_pc_32bit.
3045 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3046 (the_low_target): Use linux_get_pc_32bit and
3047 linux_set_pc_32bit.
3048 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3049 (the_low_target): Use linux_get_pc_32bit and
3050 linux_set_pc_32bit.
3051 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3052 (the_low_target): Use linux_get_pc_32bit and
3053 linux_set_pc_32bit.
3054
eb0edac8
GB
30552016-01-18 Gary Benson <gbenson@redhat.com>
3056
3057 * configure.ac (AC_FUNC_FORK): New check.
3058 * config.in: Regenerate.
3059 * configure: Likewise.
3060
1b451dda
YQ
30612016-01-14 Yao Qi <yao.qi@linaro.org>
3062
3063 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3064 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3065 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3066 arm_get_next_pcs_ctor.
3067
82075af2
JS
30682016-01-12 Josh Stone <jistone@redhat.com>
3069 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3070
3071 * inferiors.h: Include "gdb_vecs.h".
3072 (struct process_info): Add syscalls_to_catch.
3073 * inferiors.c (remove_process): Free syscalls_to_catch.
3074 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3075 syscall_return stops.
3076 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3077 * server.c (handle_general_set): Handle QCatchSyscalls.
3078 (handle_query): Report support for QCatchSyscalls.
3079 * target.h (struct target_ops): Add supports_catch_syscall.
3080 (target_supports_catch_syscall): New macro.
3081 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3082 (struct lwp_info): Add syscall_state.
3083 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3084 Maintain syscall_state and syscalls_to_catch across exec.
3085 (get_syscall_trapinfo): New function, proxy to the_low_target.
3086 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3087 (linux_low_filter_event): Toggle syscall_state entry/return for
3088 syscall traps, and set it ignored for all others.
3089 (gdb_catching_syscalls_p): New function.
3090 (gdb_catch_this_syscall_p): New function.
3091 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3092 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3093 (linux_supports_catch_syscall): New function.
3094 (linux_target_ops): Install it.
3095 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3096 (the_low_target): Install it.
3097
8f13a3ce
MF
30982016-01-12 Mike Frysinger <vapier@gentoo.org>
3099
3100 * acinclude.m4: Include new ../warning.m4 file.
3101 * configure: Regenerated.
3102 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3103
5b3da067
MF
31042016-01-12 Mike Frysinger <vapier@gentoo.org>
3105
3106 * ax.c (is_goto_target): Mark static.
3107 * linux-low.c (register_addr): Likewise.
3108 (linux_fetch_registers, linux_store_registers): Likewise.
3109 * mem-break.c (any_persistent_commands): Fix old prototype.
3110 (add_commands_to_breakpoint): Mark static.
3111 * regcache.c (find_register_by_name): Delete unused func.
3112 * remote-utils.c (hex_or_minus_one): Mark static.
3113 * server.c (monitor_show_help): Mark static.
3114 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3115 handle_v_requests): Likewise.
3116
bc504a31
PA
31172016-01-12 Pedro Alves <palves@redhat.com>
3118
3119 Remove use of the registered trademark symbol throughout.
3120
5a0dd67a
YQ
31212016-01-08 Yao Qi <yao.qi@linaro.org>
3122
3123 * remote-utils.c (getpkt): If c is '\003', call target hook
3124 request_interrupt.
3125
b2ca446f
YQ
31262016-01-06 Yao Qi <yao.qi@linaro.org>
3127
3128 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3129 linux-aarch32-low.c.
3130 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3131 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3132 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3133 (thumb2_breakpoint): Declare.
3134 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3135 linux-aarch32-low.h.
3136 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3137 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3138 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3139
edd88788
JB
31402016-01-01 Joel Brobecker <brobecker@adacore.com>
3141
3142 * gdbreplay.c (gdbreplay_version): Change copyright year in
3143 version message.
3144 * server.c (gdbserver_version): Likewise.
3145
65da7f14
PP
31462015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3147
3148 * server.c (crc32_table): Delete.
3149 (crc32): Use libiberty's xcrc32 function.
3150
4abd5ed2
JB
31512015-12-22 Joel Brobecker <brobecker@adacore.com>
3152
3153 * lynx-low.c (lynx_delete_thread_callback): New function.
3154 (lynx_mourn): Properly delete our process and all of its
3155 threads. Remove call to clear_inferiors.
3156
0e50fe5c
JB
31572015-12-22 Joel Brobecker <brobecker@adacore.com>
3158
3159 * target.c (thread_search_callback): Add check that
3160 the thread_stopped target callback is not NULL before
3161 calling it.
3162
35adc03f
YQ
31632015-12-21 Yao Qi <yao.qi@linaro.org>
3164
3165 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3166 arm breakpoint.
3167
bd2b2909
AT
31682015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3169
3170 * server.c (handle_query): Call target_supports_software_single_step.
3171
7fe5e27e
AT
31722015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3173
3174 * linux-low.c (single_step): New function.
3175 (linux_resume_one_lwp_throw): Call single_step.
3176 (start_step_over): Likewise.
3177
d9311bfa
AT
31782015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3179
3180 * Makefile.in (SFILES): Append arch/arm-linux.c,
3181 arch/arm-get-next-pcs.c.
3182 (arm-linux.o): New rule.
3183 (arm-get-next-pcs.o): New rule.
3184 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3185 arm-linux.o.
3186 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3187 to linux-aarch32-low.c.
3188 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3189 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3190 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3191 (thumb2_breakpoint_len): Likewise.
3192 (arm_is_thumb_mode): Make non-static.
3193 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3194 from linux-aarch32-low.c.
3195 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3196 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3197 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3198 (thumb2_breakpoint_len): Likewise.
3199 (arm_is_thumb_mode): New declaration.
3200 * linux-arm-low.c: Include arch/arm-linux.h
3201 aarch/arm-get-next-pcs.h, sys/syscall.h.
3202 (get_next_pcs_ops): New struct.
3203 (get_next_pcs_addr_bits_remove): New function.
3204 (get_next_pcs_is_thumb): New function.
3205 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3206 (arm_sigreturn_next_pc): Likewise.
3207 (get_next_pcs_syscall_next_pc): Likewise.
3208 (arm_gdbserver_get_next_pcs): Likewise.
3209 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3210 Initialize.
3211 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3212 * server.h: Include gdb_vecs.h.
3213
68ce2059
AT
32142015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3215
3216 * Makefile.in (SFILES): Append common/common-regcache.c.
3217 (OBS): Append common-regcache.o.
3218 (common-regcache.o): New rule.
3219 * regcache.c (init_register_cache): Initialize cache to
3220 REG_UNAVAILABLE.
3221 (regcache_raw_read_unsigned): New function.
3222 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3223 register_status enum.
3224
fa5308bd
AT
32252015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3226
3227 * linux-aarch64-low.c (the_low_targets): Rename
3228 breakpoint_reinsert_addr to get_next_pcs.
3229 * linux-arm-low.c (the_low_targets): Likewise.
3230 * linux-bfin-low.c (the_low_targets): Likewise.
3231 * linux-cris-low.c (the_low_targets): Likewise.
3232 * linux-crisv32-low.c (the_low_targets): Likewise.
3233 * linux-low.c (can_software_single_step): Likewise.
3234 (install_software_single_step_breakpoints): New function.
3235 (start_step_over): Use install_software_single_step_breakpoints.
3236 * linux-low.h: New CORE_ADDR vector.
3237 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3238 get_next_pcs.
3239 * linux-mips-low.c (the_low_targets): Likewise.
3240 * linux-nios2-low.c (the_low_targets): Likewise.
3241 * linux-sparc-low.c (the_low_targets): Likewise.
3242
4a6ed09b
PA
32432015-12-17 Pedro Alves <palves@redhat.com>
3244
3245 * linux-low.c (linux_kill_one_lwp): Remove references to
3246 LinuxThreads.
3247 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3248 to 'kill'.
3249 (linux_init_signals): Delete.
3250 (initialize_low): Adjust.
3251 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3252
7544db95
PA
32532015-12-16 Pedro Alves <palves@redhat.com>
3254
3255 * configure.ac (compiler warning flags): When testing a
3256 -Wno-foo option, check whether -Wfoo works instead.
3257 * configure: Regenerate.
3258
8020350c
DB
32592015-12-11 Don Breazeal <donb@codesourcery.com>
3260
3261 * server.c (process_serial_event): Don't exit from gdbserver
3262 in remote mode if there are still active inferiors.
3263
db91f502
YQ
32642015-12-11 Yao Qi <yao.qi@linaro.org>
3265
3266 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3267 arm_breakpoint_at if the process is 32-bit.
3268
b37a6290
YQ
32692015-12-11 Yao Qi <yao.qi@linaro.org>
3270
3271 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3272 arm breakpoint.
3273
17b1509a
YQ
32742015-12-07 Yao Qi <yao.qi@linaro.org>
3275
3276 * configure.srv: Append arm.o to srv_tgtobj for
3277 aarch64*-*-linux* target.
3278 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3279 from linux-arm-low.c.
3280 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3281 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3282 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3283 (thumb2_breakpoint_len): Likewise.
3284 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3285 (arm_breakpoint_kinds): Likewise.
3286 (arm_breakpoint_kind_from_pc): Likewise.
3287 (arm_sw_breakpoint_from_kind): Likewise.
3288 (arm_breakpoint_kind_from_current_state): Likewise.
3289 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3290 (arm_sw_breakpoint_from_kind): Declare.
3291 (arm_breakpoint_kind_from_current_state): Declare.
3292 (arm_breakpoint_at): Declare.
3293 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3294 arm_sw_breakpoint_from_kind if process is 32-bit.
3295 (aarch64_breakpoint_kind_from_pc): New function.
3296 (aarch64_breakpoint_kind_from_current_state): New function.
3297 (the_low_target): Initialize fields breakpoint_kind_from_pc
3298 and breakpoint_kind_from_current_state.
3299 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3300 linux-aarch32-low.c.
3301 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3302 (arm_breakpoint, arm_breakpoint_len): Likewise.
3303 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3304 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3305 (arm_is_thumb_mode): Likewise.
3306 (arm_breakpoint_at): Likewise.
3307 (arm_breakpoint_kind_from_pc): Likewise.
3308 (arm_sw_breakpoint_from_kind): Likewise.
3309 (arm_breakpoint_kind_from_current_state): Likewise.
3310
3311 Revert:
3312 2015-08-04 Yao Qi <yao.qi@linaro.org>
3313
3314 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3315 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3316 * server.c (extended_protocol): Remove "static".
3317 * server.h (extended_protocol): Declare it.
3318
ece66d65
JS
33192015-12-04 Josh Stone <jistone@redhat.com>
3320
3321 * target.h (struct target_ops) <arch_setup>: Rename to ...
3322 (struct target_ops) <post_create_inferior>: ... this.
3323 (target_arch_setup): Rename to ...
3324 (target_post_create_inferior): ... this, calling post_create_inferior.
3325 * server.c (start_inferior): Update target_arch_setup calls to
3326 target_post_create_inferior.
3327 * linux-low.c (linux_low_ptrace_options): Forward declare.
3328 (linux_arch_setup): Update its comment for general use.
3329 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3330 (struct linux_target_ops): Use linux_post_create_inferior.
3331 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3332 to post_create_inferior.
3333 * nto-low.c (struct nto_target_ops): Likewise.
3334 * spu-low.c (struct spu_target_ops): Likewise.
3335 * win32-low.c (struct win32_target_ops): Likewise.
3336
e58c48b4
AT
33372015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3338
3339 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3340
fbec8956
AT
33412015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3342
3343 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3344 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3345 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3346 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3347 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3348 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3349 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3350 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3351 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3352 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3353 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3354 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3355
9b4c5f87
AT
33562015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3357
3358 * linux-low.c (linux_look_up_symbols): Don't call
3359 linux_supports_traceclone.
3360 * linux-low.h (thread_db_init): Remove use_events argument.
3361 * thread-db.c (thread_db_use_event): Remove global variable.
3362 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3363 (struct thread_db) <td_create_bp>: Remove field.
3364 (thread_db_create_event): Remove function.
3365 (thread_db_enable_reporting): Likewise.
3366 (find_one_thread): Don't check for thread_db_use_events.
3367 (attach_thread): Likewise.
3368 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3369 (try_thread_db_load_1): Don't check for thread_db_use_events.
3370 (thread_db_init): Remove use_events argument and thread events
3371 handling.
3372 (remove_thread_event_breakpoints): Remove function.
3373 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3374
7d00775e
AT
33752015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3376
3377 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3378 New function.
3379 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3380 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3381 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3382 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3383 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3384 Initialize.
3385 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3386 New function.
3387 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3388 * linux-low.c (can_hardware_single_step): Use
3389 supports_hardware_single_step.
3390 (can_software_single_step): New function.
3391 (start_step_over): Call can_software_single_step.
3392 (linux_supports_hardware_single_step): New function.
3393 (struct target_ops) <supports_software_single_step>: Initialize.
3394 * linux-low.h (struct linux_target_ops)
3395 <supports_hardware_single_step>: Initialize.
3396 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3397 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3398 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3399 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3400 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3401 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3402 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3403 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3404 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3405 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3406 Initialize.
3407 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3408 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3409 Initialize.
3410 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3411 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3412 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3413 New function.
3414 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3415 * target.h (struct target_ops): <supports_software_single_step>:
3416 New field.
3417 (target_supports_software_single_step): New macro.
3418
2d97cd35
AT
34192015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3420
3421 * linux-low.c (linux_wait_1): Fix pc advance condition.
3422 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3423 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3424
769ef81f
AT
34252015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3426
3427 * linux-arm-low.c (arm_is_thumb_mode): New function.
3428 (arm_breakpoint_at): Use arm_is_thumb_mode.
3429 (arm_breakpoint_kind_from_current_state): New function.
3430 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3431 Initialize.
3432 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3433 (linux_breakpoint_kind_from_current_state): New function.
3434 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3435 * linux-low.h (struct linux_target_ops)
3436 <breakpoint_kind_from_current_state>: New field.
3437 * target.h (struct target_ops): Likewise.
3438 (target_breakpoint_kind_from_current_state): New macro.
3439
1bebeeca
PA
34402015-11-30 Pedro Alves <palves@redhat.com>
3441
3442 * linux-low.c (linux_resume): Wake up the event loop before
3443 returning.
3444
a67a9fae
PA
34452015-11-30 Pedro Alves <palves@redhat.com>
3446
3447 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3448 check.
3449 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3450 to -1.
3451 * target.c (struct thread_search): New structure.
3452 (thread_search_callback): New function.
3453 (prev_general_thread): New global.
3454 (prepare_to_access_memory, done_accessing_memory): New functions.
3455 * target.h (prepare_to_access_memory, done_accessing_memory):
3456 Replace macros with function declarations.
3457
f2faf941
PA
34582015-11-30 Pedro Alves <palves@redhat.com>
3459
3460 PR 14618
3461 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3462 report TARGET_WAITKIND_NO_RESUMED.
3463 * remote-utils.c (prepare_resume_reply): Handle
3464 TARGET_WAITKIND_NO_RESUMED.
3465 * server.c (report_no_resumed): New global.
3466 (handle_query) <qSupported>: Handle "no-resumed+". Report
3467 "no-resumed+" support.
3468 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3469 return error if the client doesn't support no-resumed events.
3470 (push_stop_notification): New function.
3471 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3472 events if the client supports them.
3473
a681f9c9
PA
34742015-11-30 Pedro Alves <palves@redhat.com>
3475
3476 * linux-low.c (thread_still_has_status_pending_p): Don't check
3477 vCont;t here.
3478 (lwp_resumed): New function.
3479 (status_pending_p_callback): Return early if the LWP is not
3480 supposed to be resumed.
3481
65706a29
PA
34822015-11-30 Pedro Alves <palves@redhat.com>
3483
3484 * linux-low.c (handle_extended_wait): Assert that the LWP's
3485 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3486 thread create events, leave the new child's status pending.
3487 (linux_low_filter_event): If GDB wants to hear about thread exit
3488 events, leave the LWP marked dead and don't delete it.
3489 (linux_wait_for_event_filtered): Don't check for thread exit.
3490 (filter_exit_event): New function.
3491 (linux_wait_1): Use it, when returning an exit event.
3492 (linux_resume_one_lwp_throw): Assert that the LWP's
3493 waitstatus is TARGET_WAITKIND_IGNORE.
3494 * remote-utils.c (prepare_resume_reply): Handle
3495 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3496 * server.c (report_thread_events): New global.
3497 (handle_general_set): Handle QThreadEvents.
3498 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3499 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3500 TARGET_WAITKIND_THREAD_EXITED.
3501 * server.h (report_thread_events): Declare.
3502
56cf4bed
PA
35032015-11-30 Pedro Alves <palves@redhat.com>
3504
3505 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3506 the thread's last_resume_kind was resume_stop.
3507
500c1d85
PA
35082015-11-30 Pedro Alves <palves@redhat.com>
3509
3510 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3511 before returning.
3512
de979965
PA
35132015-11-30 Pedro Alves <palves@redhat.com>
3514
3515 * server.c (handle_v_requests): Handle vCtrlC.
3516
34c65914
PA
35172015-11-30 Pedro Alves <palves@redhat.com>
3518
3519 * gdbthread.h (find_any_thread_of_pid): Declare.
3520 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3521 functions.
3522 * server.c (handle_query): If current_thread is NULL, look for
3523 another thread of the selected process.
3524
79efa585 35252015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3526 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3527
3528 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3529 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3530 name in reply.
3531 * target.h (struct target_ops) <thread_name>: New field.
3532 (target_thread_name): New macro.
3533
80d82c19
JB
35342015-11-23 Joel Brobecker <brobecker@adacore.com>
3535
3536 * regcache.h (regcache_invalidate_pid): Add declaration.
3537 * regcache.c (regcache_invalidate_pid): New function, extracted
3538 from regcache_invalidate.
3539 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3540 Add trivial documentation comment.
3541 * lynx-low.c: Use regcache_invalidate_pid instead of
3542 regcache_invalidate.
3543
64da5dd5
JB
35442015-11-23 Joel Brobecker <brobecker@adacore.com>
3545
3546 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3547 and Elf64_auxv_t if the target is Android.
3548
37ce4055
DE
35492015-11-22 Doug Evans <xdje42@gmail.com>
3550
3551 * target.h: #include <sys/types.h>.
3552
06e03fff
PA
35532015-11-19 Pedro Alves <palves@redhat.com>
3554
3555 * linux-low.c (linux_process_qsupported): Change prototype.
3556 Adjust.
3557 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3558 Change prototype.
3559 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3560 and adjust to loop over all features.
3561 * server.c (handle_query) <qSupported>: Adjust to call
3562 target_process_qsupported once, passing it a vector of unprocessed
3563 features.
3564 * target.h (struct target_ops) <process_qsupported>: Change
3565 prototype.
3566 (target_process_qsupported): Adjust.
3567
9a084706
PA
35682015-11-19 Pedro Alves <palves@redhat.com>
3569
3570 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3571 mode.
3572 * configure: Regenerate.
3573
dad44a1f
PA
35742015-11-19 Pedro Alves <palves@redhat.com>
3575
3576 * configure: Regenerate.
3577
231c0592
YQ
35782015-11-19 Yao Qi <yao.qi@linaro.org>
3579
3580 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3581 type to uint32_t.
3582
6c1c9a8b
YQ
35832015-11-19 Yao Qi <yao.qi@linaro.org>
3584
3585 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3586 (struct aarch64_operand): Move enum out.
3587
9caa3311
YQ
35882015-11-19 Yao Qi <yao.qi@linaro.org>
3589
3590 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3591 struct user_fpsimd_state *.
3592 (aarch64_store_fpregset): Likewise.
3593
6a69a054
YQ
35942015-11-19 Yao Qi <yao.qi@linaro.org>
3595
3596 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3597 struct user_pt_regs *.
3598 (aarch64_store_gregset): Likewise.
3599
1798301e
PA
36002015-11-18 Pedro Alves <palves@redhat.com>
3601
3602 * Makefile.in (all_object_files): Add $IPA_OBJS.
3603
ce7715e2
PA
36042015-11-17 Pedro Alves <palves@redhat.com>
3605
3606 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3607 GDB_SIGNAL_0 and gdb_signal_to_string.
3608
c0879059
PA
36092015-11-17 Pedro Alves <palves@redhat.com>
3610
3611 * win32-low.c (handle_output_debug_string): Remove parameter.
3612 (win32_kill): Remove our_status local and adjust call to
3613 handle_output_debug_string.
3614 (get_child_debug_event): Adjust call to
3615 handle_output_debug_string.
3616
1996e237
SM
36172015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3618
3619 * linux-mips-low.c (mips_fill_gregset): Add cast.
3620 (mips_store_gregset): Likewise.
3621 (mips_fill_fpregset): Likewise.
3622 (mips_store_fpregset): Likewise.
3623
cbec665b
SM
36242015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3625
3626 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3627 priv.
3628
eb3e3c67
SM
36292015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3630
3631 * linux-mips-low.c (mips_linux_new_thread): Change type of
3632 watch_type to enum target_hw_bp_type.
3633
171de4b8
SM
36342015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3635
3636 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3637 Change return type to arm_hwbp_type.
3638
04248ead
SM
36392015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3640
3641 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3642 (arm_store_gregset): Likewise.
3643 * linux-arm-low.c (arm_get_hwcap): Likewise.
3644 (arm_read_description): Likewise.
3645
04b3479c
SM
36462015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3647
3648 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3649
2bc84e8a
SM
36502015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3651
3652 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3653 (ppc_fill_vsxregset): Likewise.
3654 (ppc_store_vsxregset): Likewise.
3655 (ppc_fill_vrregset): Likewise.
3656 (ppc_store_vrregset): Likewise.
3657 (ppc_fill_evrregset): Likewise.
3658 (ppc_store_evrregset): Likewise.
3659
e6c5bb05
SM
36602015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3661
3662 * linux-ppc-low.c (ppc_usrregs_info): Remove
3663 forward-declaration.
3664 (ppc_arch_setup): Move lower in file.
3665
7ea45d72
SM
36662015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3667
3668 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3669 (ps_pdwrite): Likewise.
3670
69291610
HW
36712015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3672
3673 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3674 to after assert checks.
3675
b42945fd
SM
36762015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3677
3678 * proc-service.c (ps_pdread): Add/adjust casts.
3679 (ps_pdwrite): Add/adjust casts.
3680
d6f85c84
SM
36812015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3682
3683 * server.c (handle_search_memory_1): Cast return value of
3684 memmem.
3685
f98cd059
SM
36862015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3687
3688 * server.c (write_qxfer_response): Change type of data to
3689 gdb_byte *.
3690
d2412fa5
PA
36912015-10-29 Pedro Alves <palves@redhat.com>
3692
3693 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3694
c17414a2
PA
36952015-10-29 Pedro Alves <palves@redhat.com>
3696
3697 * tracepoint.c (clear_installed_tracepoints): Add casts.
3698
e053fbc4
PA
36992015-10-29 Pedro Alves <palves@redhat.com>
3700
3701 * server.c (handle_v_cont, process_serial_event): Add enum
3702 gdb_signal casts to signal parsing code.
3703
add67df8
PA
37042015-10-29 Pedro Alves <palves@redhat.com>
3705
3706 * linux-low.h (NULL_REGSET): Define.
3707 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3708 * linux-arm-low.c (arm_regsets): Likewise.
3709 * linux-crisv32-low.c (cris_regsets): Likewise.
3710 * linux-m68k-low.c (m68k_regsets): Likewise.
3711 * linux-mips-low.c (mips_regsets): Likewise.
3712 * linux-nios2-low.c (nios2_regsets): Likewise.
3713 * linux-ppc-low.c (ppc_regsets): Likewise.
3714 * linux-s390-low.c (s390_regsets): Likewise.
3715 * linux-sh-low.c (sh_regsets): Likewise.
3716 * linux-sparc-low.c (sparc_regsets): Likewise.
3717 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3718 * linux-tile-low.c (tile_regsets): Likewise.
3719 * linux-x86-low.c (x86_regsets): Likewise.
3720 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3721
50bc912a
PA
37222015-10-29 Pedro Alves <palves@redhat.com>
3723
3724 * linux-low.h (NULL_REGSET): Define.
3725 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3726 * linux-arm-low.c (arm_regsets): Likewise.
3727 * linux-crisv32-low.c (cris_regsets): Likewise.
3728 * linux-m68k-low.c (m68k_regsets): Likewise.
3729 * linux-mips-low.c (mips_regsets): Likewise.
3730 * linux-nios2-low.c (nios2_regsets): Likewise.
3731 * linux-ppc-low.c (ppc_regsets): Likewise.
3732 * linux-s390-low.c (s390_regsets): Likewise.
3733 * linux-sh-low.c (sh_regsets): Likewise.
3734 * linux-sparc-low.c (sparc_regsets): Likewise.
3735 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3736 * linux-tile-low.c (tile_regsets): Likewise.
3737 * linux-x86-low.c (x86_regsets): Likewise.
3738 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3739
682b2546
DE
37402015-10-26 Doug Evans <dje@google.com>
3741
3742 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3743
963843d4
DE
37442015-10-26 Doug Evans <dje@google.com>
3745
3746 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3747
d41401ac
DE
37482015-10-26 Doug Evans <dje@google.com>
3749
3750 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3751 for debug_printf.
3752 (attach_thread, find_new_threads_callback): Ditto.
3753
3db28855
AT
37542015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3755
3756 * mem-break.h (set_breakpoint_data): Remove.
3757
fb78e89c
AT
37582015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3759
3760 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3761 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3762 (initialize_low): Remove set_breakpoint_data call.
3763 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3764 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3765 (initialize_low): Remove set_breakpoint_data call.
3766 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3767 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3768 (initialize_low): Remove set_breakpoint_data call.
3769
2e6ee069
AT
37702015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3771
3772 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3773 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3774 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3775 * target.h (target_breakpoint_kind_from_pc): New macro.
3776
1652a986
AT
37772015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3778
3779 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3780 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3781 the default breakpoint kind.
3782
abeead09
AT
37832015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3784
3785 * linux-arm-low.c (arm_supports_z_point_type): Add software
3786 breakpoint support.
3787
b0b4b501
AT
37882015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3789
3790 * linux-arm-low.c: Refactor breakpoint definitions.
3791 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3792 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3793
8689682c
AT
37942015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3795
3796 * Makefile.in: Add arm.c/o.
3797 * configure.srv: Likewise.
3798 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3799 (arm_breakpoint_kind_from_pc): New function.
3800 (arm_sw_breakpoint_from_kind): Return proper kind.
3801 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3802
27165294
AT
38032015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3804
3805 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3806 removal.
3807 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3808 (struct raw_breakpoint) <size>: Remove.
3809 (struct raw_breakpoint) <kind>: Add.
3810 (bp_size): New function.
3811 (bp_opcode): Likewise.
3812 (find_raw_breakpoint_at): Adjust for kind.
3813 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3814 (remove_memory_breakpoint): Adjust for kind call bp_size.
3815 (set_raw_breakpoint_at): Adjust for kind.
3816 (set_breakpoint): Likewise.
3817 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3818 (delete_raw_breakpoint): Adjust for kind.
3819 (delete_breakpoint): Likewise.
3820 (find_gdb_breakpoint): Likewise.
3821 (set_gdb_breakpoint_1): Likewise.
3822 (set_gdb_breakpoint): Likewise.
3823 (delete_gdb_breakpoint_1): Likewise.
3824 (delete_gdb_breakpoint): Likewise.
3825 (uninsert_raw_breakpoint): Likewise.
3826 (reinsert_raw_breakpoint): Likewise.
3827 (set_breakpoint_data): Remove.
3828 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3829 (check_mem_read): Adjust for kind call bp_size.
3830 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3831 (clone_one_breakpoint): Adjust for kind.
3832 * mem-break.h (set_gdb_breakpoint): Likewise.
3833 (delete_gdb_breakpoint): Likewise.
3834 * server.c (process_serial_event): Likewise.
3835
dd373349
AT
38362015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3837
3838 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3839 (struct linux_target_ops) <breakpoint>: Remove.
3840 (struct linux_target_ops) <breakpoint_len>: Remove.
3841 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3842 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3843 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3844 (arm_sw_breakpoint_from_kind): New function.
3845 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3846 (struct linux_target_ops) <breakpoint>: Remove.
3847 (struct linux_target_ops) <breakpoint_len>: Remove.
3848 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3849 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3850 * linux-cris-low.c (cris_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-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3856 (struct linux_target_ops) <breakpoint>: Remove.
3857 (struct linux_target_ops) <breakpoint_len>: Remove.
3858 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3859 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3860 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3861 and sw_breakpoint_from_kind to increment the pc.
3862 (linux_breakpoint_kind_from_pc): New function.
3863 (linux_sw_breakpoint_from_kind): New function.
3864 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3865 (initialize_low): Call breakpoint_kind_from_pc and
3866 sw_breakpoint_from_kind to replace breakpoint_data/len.
3867 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3868 New field.
3869 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3870 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3871 (struct linux_target_ops) <breakpoint>: Remove.
3872 (struct linux_target_ops) <breakpoint_len>: Remove.
3873 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3874 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3875 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3876 (struct linux_target_ops) <breakpoint>: Remove.
3877 (struct linux_target_ops) <breakpoint_len>: Remove.
3878 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3879 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3880 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3881 (struct linux_target_ops) <breakpoint>: Remove.
3882 (struct linux_target_ops) <breakpoint_len>: Remove.
3883 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3884 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3885 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3886 (struct linux_target_ops) <breakpoint>: Remove.
3887 (struct linux_target_ops) <breakpoint_len>: Remove.
3888 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3889 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3890 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3891 (struct linux_target_ops) <breakpoint>: Remove.
3892 (struct linux_target_ops) <breakpoint_len>: Remove.
3893 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3894 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3895 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3896 (struct linux_target_ops) <breakpoint>: Remove.
3897 (struct linux_target_ops) <breakpoint_len>: Remove.
3898 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3899 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3900 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3901 (struct linux_target_ops) <breakpoint>: Remove.
3902 (struct linux_target_ops) <breakpoint_len>: Remove.
3903 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3904 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3905 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3906 (struct linux_target_ops) <breakpoint>: Remove.
3907 (struct linux_target_ops) <breakpoint_len>: Remove.
3908 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3909 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3910 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3911 (struct linux_target_ops) <breakpoint>: Remove.
3912 (struct linux_target_ops) <breakpoint_len>: Remove.
3913 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3914 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3915 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3916 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3917 (struct linux_target_ops) <breakpoint>: Remove.
3918 (struct linux_target_ops) <breakpoint_len>: Remove.
3919 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3920 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3921 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3922 (struct linux_target_ops) <breakpoint>: Remove.
3923 (struct linux_target_ops) <breakpoint_len>: Remove.
3924 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3925 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3926
4cd98a19
AT
39272015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3928
3929 * linux-cris-low.c (cris_get_pc): Remove void arg.
3930
774ee6d2
AR
39312015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3932
3933 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3934 variable name.
3935
833dcd29
AR
39362015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3937
3938 * inferiors.c (thread_pid_matches_callback): New function.
3939 (find_thread_process): New function.
3940 (remove_thread): Reset current_thread.
3941 (remove_process): Assert threads have been removed first.
3942
8d689ee5
YQ
39432015-10-15 Yao Qi <yao.qi@linaro.org>
3944
3945 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3946 if it is 3.
3947 (aarch64_remove_point): Likewise.
3948 * regcache.c (regcache_register_size): New function.
3949
1c2e1515
YQ
39502015-10-12 Yao Qi <yao.qi@linaro.org>
3951
3952 * linux-aarch64-low.c: Update all callers as emit_load_store
3953 is renamed to aarch64_emit_load_store.
3954
e1c587c3
YQ
39552015-10-12 Yao Qi <yao.qi@linaro.org>
3956
3957 * linux-aarch64-low.c: Update all callers of function renaming
3958 from emit_insn to aarch64_emit_insn.
3959
b6542f81
YQ
39602015-10-12 Yao Qi <yao.qi@linaro.org>
3961
3962 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3963 arch/aarch64-insn.h.
3964 (struct aarch64_memory_operand): Likewise.
3965 (ENCODE): Likewise.
3966 (emit_insn): Move to arch/aarch64-insn.c.
3967 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3968 (emit_load_store): Move to arch/aarch64-insn.c.
3969 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3970 (can_encode_int32): Remove.
3971
246994ce
YQ
39722015-10-12 Yao Qi <yao.qi@linaro.org>
3973
3974 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3975 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3976 (aarch64_relocate_instruction): Likewise.
3977 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3978 (struct aarch64_insn_visitor): Likewise.
3979
0badd99f
YQ
39802015-10-12 Yao Qi <yao.qi@linaro.org>
3981
3982 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3983 (struct aarch64_insn_visitor): New.
3984 (struct aarch64_insn_relocation_data): New.
3985 (aarch64_ftrace_insn_reloc_b): New function.
3986 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3987 (aarch64_ftrace_insn_reloc_cb): Likewise.
3988 (aarch64_ftrace_insn_reloc_tb): Likewise.
3989 (aarch64_ftrace_insn_reloc_adr): Likewise.
3990 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3991 (aarch64_ftrace_insn_reloc_others): Likewise.
3992 (visitor): New.
3993 (aarch64_relocate_instruction): Use visitor.
3994
dfaffe9d
YQ
39952015-10-12 Yao Qi <yao.qi@linaro.org>
3996
3997 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3998 int. Add argument buf.
3999 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4000 aarch64_relocate_instruction.
4001
70b439f0
YQ
40022015-10-12 Yao Qi <yao.qi@linaro.org>
4003
4004 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4005 argument insn. Remove local variable insn. Don't call
4006 target_read_uint32.
4007 (aarch64_install_fast_tracepoint_jump_pad): Call
4008 target_read_uint32.
4009
7781c06f
YQ
40102015-09-30 Yao Qi <yao.qi@linaro.org>
4011
4012 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4013 (emit_load_store_pair): Likewise.
4014
9a3c8263
SM
40152015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4016
4017 * dll.c (match_dll): Add cast(s).
4018 (unloaded_dll): Likewise.
4019 * linux-low.c (second_thread_of_pid_p): Likewise.
4020 (delete_lwp_callback): Likewise.
4021 (count_events_callback): Likewise.
4022 (select_event_lwp_callback): Likewise.
4023 (linux_set_resume_request): Likewise.
4024 * server.c (accumulate_file_name_length): Likewise.
4025 (emit_dll_description): Likewise.
4026 (handle_qxfer_threads_worker): Likewise.
4027 (visit_actioned_threads): Likewise.
4028 * thread-db.c (any_thread_of): Likewise.
4029 * tracepoint.c (same_process_p): Likewise.
4030 (match_blocktype): Likewise.
4031 (build_traceframe_info_xml): Likewise.
4032
224c3ddb
SM
40332015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4034
4035 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4036 assignment.
4037 (gdb_unparse_agent_expr): Likewise.
4038 * hostio.c (require_data): Likewise.
4039 (handle_pread): Likewise.
4040 * linux-low.c (disable_regset): Likewise.
4041 (fetch_register): Likewise.
4042 (store_register): Likewise.
4043 (get_dynamic): Likewise.
4044 (linux_qxfer_libraries_svr4): Likewise.
4045 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4046 (set_fast_tracepoint_jump): Likewise.
4047 (uninsert_fast_tracepoint_jumps_at): Likewise.
4048 (reinsert_fast_tracepoint_jumps_at): Likewise.
4049 (validate_inserted_breakpoint): Likewise.
4050 (clone_agent_expr): Likewise.
4051 * regcache.c (init_register_cache): Likewise.
4052 * remote-utils.c (putpkt_binary_1): Likewise.
4053 (decode_M_packet): Likewise.
4054 (decode_X_packet): Likewise.
4055 (look_up_one_symbol): Likewise.
4056 (relocate_instruction): Likewise.
4057 (monitor_output): Likewise.
4058 * server.c (handle_search_memory): Likewise.
4059 (handle_qxfer_exec_file): Likewise.
4060 (handle_qxfer_libraries): Likewise.
4061 (handle_qxfer): Likewise.
4062 (handle_query): Likewise.
4063 (handle_v_cont): Likewise.
4064 (handle_v_run): Likewise.
4065 (captured_main): Likewise.
4066 * target.c (write_inferior_memory): Likewise.
4067 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4068 * tracepoint.c (init_trace_buffer): Likewise.
4069 (add_tracepoint_action): Likewise.
4070 (add_traceframe): Likewise.
4071 (add_traceframe_block): Likewise.
4072 (cmd_qtdpsrc): Likewise.
4073 (cmd_qtdv): Likewise.
4074 (cmd_qtstatus): Likewise.
4075 (response_source): Likewise.
4076 (response_tsv): Likewise.
4077 (cmd_qtnotes): Likewise.
4078 (gdb_collect): Likewise.
4079 (initialize_tracepoint): Likewise.
4080
afbe19f8
PL
40812015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4082
4083 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4084 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4085 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4086 <NOP>: New.
4087 (enum aarch64_condition_codes): New enum.
4088 (w0): New static global.
4089 (fp): Likewise.
4090 (lr): Likewise.
4091 (struct aarch64_memory_operand) <type>: New
4092 MEMORY_OPERAND_POSTINDEX type.
4093 (postindex_memory_operand): New helper function.
4094 (emit_ret): New function.
4095 (emit_load_store_pair): New function, factored out of emit_stp
4096 with support for MEMORY_OPERAND_POSTINDEX.
4097 (emit_stp): Rewrite using emit_load_store_pair.
4098 (emit_ldp): New function.
4099 (emit_load_store): Likewise.
4100 (emit_ldr): Mention post-index instruction in comment.
4101 (emit_ldrh): New function.
4102 (emit_ldrb): New function.
4103 (emit_ldrsw): Mention post-index instruction in comment.
4104 (emit_str): Likewise.
4105 (emit_subs): New function.
4106 (emit_cmp): Likewise.
4107 (emit_and): Likewise.
4108 (emit_orr): Likewise.
4109 (emit_orn): Likewise.
4110 (emit_eor): Likewise.
4111 (emit_mvn): Likewise.
4112 (emit_lslv): Likewise.
4113 (emit_lsrv): Likewise.
4114 (emit_asrv): Likewise.
4115 (emit_mul): Likewise.
4116 (emit_sbfm): Likewise.
4117 (emit_sbfx): Likewise.
4118 (emit_ubfm): Likewise.
4119 (emit_ubfx): Likewise.
4120 (emit_csinc): Likewise.
4121 (emit_cset): Likewise.
4122 (emit_nop): Likewise.
4123 (emit_ops_insns): New helper function.
4124 (emit_pop): Likewise.
4125 (emit_push): Likewise.
4126 (aarch64_emit_prologue): New function.
4127 (aarch64_emit_epilogue): Likewise.
4128 (aarch64_emit_add): Likewise.
4129 (aarch64_emit_sub): Likewise.
4130 (aarch64_emit_mul): Likewise.
4131 (aarch64_emit_lsh): Likewise.
4132 (aarch64_emit_rsh_signed): Likewise.
4133 (aarch64_emit_rsh_unsigned): Likewise.
4134 (aarch64_emit_ext): Likewise.
4135 (aarch64_emit_log_not): Likewise.
4136 (aarch64_emit_bit_and): Likewise.
4137 (aarch64_emit_bit_or): Likewise.
4138 (aarch64_emit_bit_xor): Likewise.
4139 (aarch64_emit_bit_not): Likewise.
4140 (aarch64_emit_equal): Likewise.
4141 (aarch64_emit_less_signed): Likewise.
4142 (aarch64_emit_less_unsigned): Likewise.
4143 (aarch64_emit_ref): Likewise.
4144 (aarch64_emit_if_goto): Likewise.
4145 (aarch64_emit_goto): Likewise.
4146 (aarch64_write_goto_address): Likewise.
4147 (aarch64_emit_const): Likewise.
4148 (aarch64_emit_call): Likewise.
4149 (aarch64_emit_reg): Likewise.
4150 (aarch64_emit_pop): Likewise.
4151 (aarch64_emit_stack_flush): Likewise.
4152 (aarch64_emit_zero_ext): Likewise.
4153 (aarch64_emit_swap): Likewise.
4154 (aarch64_emit_stack_adjust): Likewise.
4155 (aarch64_emit_int_call_1): Likewise.
4156 (aarch64_emit_void_call_2): Likewise.
4157 (aarch64_emit_eq_goto): Likewise.
4158 (aarch64_emit_ne_goto): Likewise.
4159 (aarch64_emit_lt_goto): Likewise.
4160 (aarch64_emit_le_goto): Likewise.
4161 (aarch64_emit_gt_goto): Likewise.
4162 (aarch64_emit_ge_got): Likewise.
4163 (aarch64_emit_ops_impl): New static global variable.
4164 (aarch64_emit_ops): New target function, return
4165 &aarch64_emit_ops_impl.
4166 (struct linux_target_ops): Install it.
4167
bb903df0
PL
41682015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4169
4170 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4171 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4172 aarch64-ipa.o.
4173 * linux-aarch64-ipa.c: New file.
4174 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4175 and endian.h.
4176 (aarch64_get_thread_area): New target method.
4177 (extract_signed_bitfield): New helper function.
4178 (aarch64_decode_ldr_literal): New function.
4179 (enum aarch64_opcodes): New enum.
4180 (struct aarch64_register): New struct.
4181 (struct aarch64_operand): New struct.
4182 (x0): New static global.
4183 (x1): Likewise.
4184 (x2): Likewise.
4185 (x3): Likewise.
4186 (x4): Likewise.
4187 (w2): Likewise.
4188 (ip0): Likewise.
4189 (sp): Likewise.
4190 (xzr): Likewise.
4191 (aarch64_register): New helper function.
4192 (register_operand): Likewise.
4193 (immediate_operand): Likewise.
4194 (struct aarch64_memory_operand): New struct.
4195 (offset_memory_operand): New helper function.
4196 (preindex_memory_operand): Likewise.
4197 (enum aarch64_system_control_registers): New enum.
4198 (ENCODE): New macro.
4199 (emit_insn): New helper function.
4200 (emit_b): New function.
4201 (emit_bcond): Likewise.
4202 (emit_cb): Likewise.
4203 (emit_tb): Likewise.
4204 (emit_blr): Likewise.
4205 (emit_stp): Likewise.
4206 (emit_ldp_q_offset): Likewise.
4207 (emit_stp_q_offset): Likewise.
4208 (emit_load_store): Likewise.
4209 (emit_ldr): Likewise.
4210 (emit_ldrsw): Likewise.
4211 (emit_str): Likewise.
4212 (emit_ldaxr): Likewise.
4213 (emit_stxr): Likewise.
4214 (emit_stlr): Likewise.
4215 (emit_data_processing_reg): Likewise.
4216 (emit_data_processing): Likewise.
4217 (emit_add): Likewise.
4218 (emit_sub): Likewise.
4219 (emit_mov): Likewise.
4220 (emit_movk): Likewise.
4221 (emit_mov_addr): Likewise.
4222 (emit_mrs): Likewise.
4223 (emit_msr): Likewise.
4224 (emit_sevl): Likewise.
4225 (emit_wfe): Likewise.
4226 (append_insns): Likewise.
4227 (can_encode_int32_in): New helper function.
4228 (aarch64_relocate_instruction): New function.
4229 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4230 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4231 (struct linux_target_ops): Install aarch64_get_thread_area,
4232 aarch64_install_fast_tracepoint_jump_pad and
4233 aarch64_get_min_fast_tracepoint_insn_len.
4234
787749ea
PL
42352015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4236
4237 * Makefile.in (aarch64-insn.o): New rule.
4238 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4239
9812b2e6
YQ
42402015-09-21 Yao Qi <yao.qi@linaro.org>
4241
4242 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4243
18fe412b
YQ
42442015-09-21 Yao Qi <yao.qi@linaro.org>
4245
4246 * tracepoint.c (max_jump_pad_size): Remove.
4247
a0cc84cd
YQ
42482015-09-18 Yao Qi <yao.qi@linaro.org>
4249
4250 * linux-aarch64-low.c: Don't include sys/uio.h.
4251 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4252
d78908cf
WW
42532015-09-16 Wei-cheng Wang <cole945@gmail.com>
4254
4255 * tracepoint.c (eval_result_type): Change prototype.
4256 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4257
d57e0d50
PA
42582015-09-15 Pedro Alves <palves@redhat.com>
4259
4260 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4261 Check whether to report exec events instead of checking whether
4262 multiprocess is enabled.
4263
5a676acc
PA
42642015-09-15 Pedro Alves <palves@redhat.com>
4265
4266 PR remote/18965
4267 * remote-utils.c (prepare_resume_reply): Merge
4268 TARGET_WAITKIND_VFORK_DONE switch case with the
4269 TARGET_WAITKIND_FORKED case.
4270
7c5d0fad
YQ
42712015-09-15 Yao Qi <yao.qi@linaro.org>
4272
4273 * server.c (handle_query): Check string comparison using
4274 "else if" instead of "if".
4275
750ce8d1
YQ
42762015-09-15 Yao Qi <yao.qi@linaro.org>
4277
4278 * server.c (vCont_supported): New global variable.
4279 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4280 matches. Append ";vContSupported+" to own_buf.
4281 (handle_v_requests): Append ";s;S" to own_buf if target supports
4282 hardware single step or vCont_supported is false.
4283 (capture_main): Set vCont_supported to zero.
4284
70b90b91
YQ
42852015-09-15 Yao Qi <yao.qi@linaro.org>
4286
4287 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4288 it to ...
4289 (linux_supports_hardware_single_step): ... New function.
4290 (linux_target_ops): Update.
4291 * lynx-low.c (lynx_target_ops): Set field
4292 supports_hardware_single_step to target_can_do_hardware_single_step.
4293 * nto-low.c (nto_target_ops): Likewise.
4294 * spu-low.c (spu_target_ops): Likewise.
4295 * win32-low.c (win32_target_ops): Likewise.
4296 * target.c (target_can_do_hardware_single_step): New function.
4297 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4298 Remove. <supports_hardware_single_step>: New field.
4299 (target_supports_conditional_breakpoints): Remove.
4300 (target_supports_hardware_single_step): New macro.
4301 (target_can_do_hardware_single_step): Declare.
4302 * server.c (handle_query): Use target_supports_hardware_single_step
4303 instead of target_supports_conditional_breakpoints.
4304
ade90bde
YQ
43052015-09-15 Yao Qi <yao.qi@linaro.org>
4306
4307 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4308 function.
4309 (struct linux_target_ops the_low_target): Install
4310 aarch64_linux_siginfo_fixup.
4311
94585166
DB
43122015-09-11 Don Breazeal <donb@codesourcery.com>
4313 Luis Machado <lgustavo@codesourcery.com>
4314
4315 * linux-low.c (linux_mourn): Static declaration.
4316 (linux_arch_setup): Move in front of
4317 handle_extended_wait.
4318 (linux_arch_setup_thread): New function.
4319 (handle_extended_wait): Handle exec events. Call
4320 linux_arch_setup_thread. Make event_lwp argument a
4321 pointer-to-a-pointer.
4322 (check_zombie_leaders): Do not check stopped threads.
4323 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4324 (linux_low_filter_event): Add lwp and thread for exec'ing
4325 non-leader thread if leader thread has been deleted.
4326 Refactor code into linux_arch_setup_thread and call it.
4327 Pass child lwp pointer by reference to handle_extended_wait.
4328 (linux_wait_for_event_filtered): Update comment.
4329 (linux_wait_1): Prevent clobbering exec event status.
4330 (linux_supports_exec_events): New function.
4331 (linux_target_ops) <supports_exec_events>: Initialize new member.
4332 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4333 new member.
4334 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4335 * server.c (report_exec_events): New global variable.
4336 (handle_query): Handle qSupported query for exec-events feature.
4337 (captured_main): Initialize report_exec_events.
4338 * server.h (report_exec_events): Declare new global variable.
4339 * target.h (struct target_ops) <supports_exec_events>: New
4340 member.
4341 (target_supports_exec_events): New macro.
4342 * win32-low.c (win32_target_ops) <supports_exec_events>:
4343 Initialize new member.
4344
0568462b
MM
43452015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4346
4347 * linux-low.c (linux_low_enable_btrace): Remove.
4348 (linux_target_ops): Replace linux_low_enable_btrace with
4349 linux_enable_btrace.
4350
39edd165
YQ
43512015-09-03 Yao Qi <yao.qi@linaro.org>
4352
4353 * linux-aarch64-low.c (aarch64_insert_point): Call
4354 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4355 returns true.
4356
1db33b5a
UW
43572015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4358
4359 * linux-low.c (check_stopped_by_breakpoint): Use
4360 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4361
ab290430
PA
43622015-08-27 Pedro Alves <palves@redhat.com>
4363
4364 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4365
8d749320
SM
43662015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4367
6711b7f8
SM
4368 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4369 the XNEW-family equivalent.
8d749320
SM
4370 (compile_bytecodes): Likewise.
4371 * dll.c (loaded_dll): Likewise.
4372 * event-loop.c (append_callback_event): Likewise.
4373 (create_file_handler): Likewise.
4374 (create_file_event): Likewise.
4375 * hostio.c (handle_open): Likewise.
4376 * inferiors.c (add_thread): Likewise.
4377 (add_process): Likewise.
4378 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4379 * linux-arm-low.c (arm_new_process): Likewise.
4380 (arm_new_thread): Likewise.
4381 * linux-low.c (add_to_pid_list): Likewise.
4382 (linux_add_process): Likewise.
4383 (handle_extended_wait): Likewise.
4384 (add_lwp): Likewise.
4385 (enqueue_one_deferred_signal): Likewise.
4386 (enqueue_pending_signal): Likewise.
4387 (linux_resume_one_lwp_throw): Likewise.
4388 (linux_resume_one_thread): Likewise.
4389 (linux_read_memory): Likewise.
4390 (linux_write_memory): Likewise.
4391 * linux-mips-low.c (mips_linux_new_process): Likewise.
4392 (mips_linux_new_thread): Likewise.
4393 (mips_add_watchpoint): Likewise.
4394 * linux-x86-low.c (initialize_low_arch): Likewise.
4395 * lynx-low.c (lynx_add_process): Likewise.
4396 * mem-break.c (set_raw_breakpoint_at): Likewise.
4397 (set_breakpoint): Likewise.
4398 (add_condition_to_breakpoint): Likewise.
4399 (add_commands_to_breakpoint): Likewise.
4400 (clone_agent_expr): Likewise.
4401 (clone_one_breakpoint): Likewise.
4402 * regcache.c (new_register_cache): Likewise.
4403 * remote-utils.c (look_up_one_symbol): Likewise.
4404 * server.c (queue_stop_reply): Likewise.
4405 (start_inferior): Likewise.
4406 (queue_stop_reply_callback): Likewise.
4407 (handle_target_event): Likewise.
4408 * spu-low.c (fetch_ppc_memory): Likewise.
4409 (store_ppc_memory): Likewise.
4410 * target.c (set_target_ops): Likewise.
4411 * thread-db.c (thread_db_load_search): Likewise.
4412 (try_thread_db_load_1): Likewise.
4413 * tracepoint.c (add_tracepoint): Likewise.
4414 (add_tracepoint_action): Likewise.
4415 (create_trace_state_variable): Likewise.
4416 (cmd_qtdpsrc): Likewise.
4417 (cmd_qtro): Likewise.
4418 (add_while_stepping_state): Likewise.
4419 * win32-low.c (child_add_thread): Likewise.
4420 (get_image_name): Likewise.
4421
ed8b7b42
YQ
44222015-08-25 Yao Qi <yao.qi@linaro.org>
4423
4424 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4425
db3cb7cb
YQ
44262015-08-25 Yao Qi <yao.qi@linaro.org>
4427
4428 * Makefile.in (aarch64-linux.o): New rule.
4429 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4430 srv_tgtobj.
4431 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4432 (aarch64_init_debug_reg_state): Make it extern.
4433 (aarch64_linux_prepare_to_resume): Remove.
4434
f6011a1c
YQ
44352015-08-25 Yao Qi <yao.qi@linaro.org>
4436
4437 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4438 lwp_arch_private_info and ptid_of_lwp.
4439
88e2cf7e
YQ
44402015-08-25 Yao Qi <yao.qi@linaro.org>
4441
4442 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4443 Find proc_info by find_process_pid. All callers updated.
4444
5e35436e
YQ
44452015-08-25 Yao Qi <yao.qi@linaro.org>
4446
4447 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4448 Remove.
4449 (debug_reg_change_callback): Remove.
4450 (aarch64_notify_debug_reg_change): Remove.
4451
4a8a7965
YQ
44522015-08-25 Yao Qi <yao.qi@linaro.org>
4453
4454 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4455 Call current_lwp_ptid.
4456
32a271ee
YQ
44572015-08-25 Yao Qi <yao.qi@linaro.org>
4458
4459 * linux-aarch64-low.c (debug_reg_change_callback): Use
4460 debug_printf.
4461
0d51c8d7
YQ
44622015-08-25 Yao Qi <yao.qi@linaro.org>
4463
4464 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4465
31a43dd5
YQ
44662015-08-25 Yao Qi <yao.qi@linaro.org>
4467
4468 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4469
8ee52567
YQ
44702015-08-25 Yao Qi <yao.qi@linaro.org>
4471
4472 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4473 the code.
4474
ff3f0f45
YQ
44752015-08-25 Yao Qi <yao.qi@linaro.org>
4476
4477 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4478 Remove.
4479 (debug_reg_change_callback): Remove argument entry and add argument
4480 lwp. Remove local variable thread. Don't print thread id in the
4481 debugging output. Don't check whether pid of thread equals to pid.
4482 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4483 iterate_over_lwps instead find_inferior.
4484
3d40fbb5
PA
44852015-08-24 Pedro Alves <palves@redhat.com>
4486
4487 * inferiors.c (get_first_process): New function.
4488 * inferiors.h (get_first_process): New declaration.
4489 * remote-utils.c (read_ptid): Default to the first process in the
4490 list, instead of to the current thread's process.
4491
438e1e42
PA
44922015-08-24 Pedro Alves <palves@redhat.com>
4493
4494 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4495 * event-loop.c: Likewise.
4496 * remote-utils.c: Likewise.
4497 * tracepoint.c: Likewise.
4498
a8c6d4fc
PA
44992015-08-24 Pedro Alves <palves@redhat.com>
4500
4501 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4502 ptid_get_lwp.
4503
99b0bb12
PA
45042015-08-21 Pedro Alves <palves@redhat.com>
4505
4506 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4507 instead of literal 1.
4508
f8904751
PA
45092015-08-21 Pedro Alves <palves@redhat.com>
4510
4511 * tdesc.c (default_description): Explicitly zero-initialize.
4512
465a859e
PA
45132015-08-21 Pedro Alves <palves@redhat.com>
4514
4515 PR gdb/18749
4516 * inferiors.c (remove_thread): Discard any pending stop reply for
4517 this thread.
4518 * server.c (remove_all_on_match_pid): Rename to ...
4519 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4520 instead of a pid.
4521 (discard_queued_stop_replies): Change parameter to a ptid. Now
4522 extern.
4523 (handle_v_kill, kill_inferior_callback, captured_main)
4524 (process_serial_event): Adjust.
4525 * server.h (discard_queued_stop_replies): Declare.
4526
f0db101d
PA
45272015-08-21 Pedro Alves <palves@redhat.com>
4528
4529 * linux-low.c (wait_for_sigstop): Always switch to no thread
4530 selected if the previously current thread dies.
4531 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4532 process instead of the current thread's.
4533 * remote-utils.c (input_interrupt): Don't check if there's no
4534 current thread.
4535 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4536 current thread to the general thread fails, error out.
4537 (handle_qxfer_auxv, handle_qxfer_libraries)
4538 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4539 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4540 (handle_query): Check if there's a thread selected instead of
4541 checking whether there's any thread in the thread list.
4542 (handle_qxfer_threads, handle_qxfer_btrace)
4543 (handle_qxfer_btrace_conf): Don't error out early if there's no
4544 thread in the thread list.
4545 (handle_v_cont, myresume): Don't set the current thread to the
4546 continue thread.
4547 (process_serial_event) <Hg handling>: Also set thread_id if the
4548 previous general thread is still alive.
4549 (process_serial_event) <g/G handling>: If setting the current
4550 thread to the general thread fails, error out.
4551 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4552 thread's lwp instead of the current thread's.
4553 * target.c (set_desired_thread): If the desired thread was not
4554 found, leave the current thread pointing to NULL. Return an int
4555 (boolean) indicating success.
4556 * target.h (set_desired_thread): Change return type to int.
4557
40045d91
MF
45582015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4559
4560 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4561 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4562 #includes.
4563 (ps_get_thread_area): New function.
4564
45face3b
GB
45652015-08-19 Gary Benson <gbenson@redhat.com>
4566
4567 * hostio.c (handle_pread): Do not attempt to read more data
4568 than hostio_reply_with_data can fit in a packet.
4569
16d5f642
JB
45702015-08-18 Joel Brobecker <brobecker@adacore.com>
4571
4572 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4573
a738da3a
MF
45742015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4575
4576 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4577
33ebda9d
PA
45782015-08-06 Pedro Alves <palves@redhat.com>
4579
4580 * tracepoint.c (expr_eval_result): Now an int.
4581
a44892be
PA
45822015-08-06 Pedro Alves <palves@redhat.com>
4583
4584 * gdbthread.h (struct regcache): Forward declare.
4585 (struct thread_info) <regcache_data>: Now a struct regcache
4586 pointer.
4587 * inferiors.c (inferior_regcache_data)
4588 (set_inferior_regcache_data): Now work with struct regcache
4589 pointers.
4590 * inferiors.h (struct regcache): Forward declare.
4591 (inferior_regcache_data, set_inferior_regcache_data): Now work
4592 with struct regcache pointers.
4593 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4594 (free_register_cache_thread): Remove struct regcache pointer
4595 casts.
4596
608a1e46
PA
45972015-08-06 Pedro Alves <palves@redhat.com>
4598
4599 * server.c (captured_main): On error, print the exception message
4600 to stderr, and if run_once is set, throw a quit.
4601
f0ce0d3a
PA
46022015-08-06 Pedro Alves <palves@redhat.com>
4603
4604 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4605 the current thread.
4606
bf47e248
PA
46072015-08-06 Pedro Alves <palves@redhat.com>
4608
4609 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4610 reading beyond the passed in buffer length.
4611
b6b9ffcc
PL
46122015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4613
4614 * tracepoint.c (symbol_list) <required>: Remove.
4615
863d01bd
PA
46162015-08-06 Pedro Alves <palves@redhat.com>
4617
4618 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4619 count if stopping and suspending threads.
4620 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4621 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4622 (linux_detach): Complete an ongoing step-over.
4623 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4624 throughout.
4625 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4626 (linux_wait_1): If passing a signal to the inferior after
4627 finishing a step-over, unsuspend and re-resume all lwps. If we
4628 see a single-step event but the thread should be continuing, don't
4629 pass the trap to gdb.
4630 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4631 internal_error instead of gdb_assert.
4632 (enqueue_pending_signal): New function.
4633 (check_ptrace_stopped_lwp_gone): Add debug output.
4634 (start_step_over): Use internal_error instead of gdb_assert.
4635 (complete_ongoing_step_over): New function.
4636 (linux_resume_one_thread): Don't resume a suspended thread.
4637 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4638 it stepping.
4639
00db26fa
PA
46402015-08-06 Pedro Alves <palves@redhat.com>
4641
4642 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4643 (linux_thread_alive): Use lwp_is_marked_dead.
4644 (extended_event_reported): Delete.
4645 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4646 instead of extended_event_reported.
4647 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4648 as well.
4649 (lwp_is_marked_dead): New function.
4650 (lwp_running): Use lwp_is_marked_dead.
4651 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4652 comment.
4653
ad071a30
PA
46542015-08-06 Pedro Alves <palves@redhat.com>
4655
4656 * linux-low.c (linux_wait_1): Move fork event output out of the
4657 !report_to_gdb check. Pass event_child->waitstatus to
4658 target_waitstatus_to_string instead of ourstatus.
4659
524b57e6
YQ
46602015-08-04 Yao Qi <yao.qi@linaro.org>
4661
4662 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4663 if current_thread is 32 bit.
4664
6085d6f6
YQ
46652015-08-04 Yao Qi <yao.qi@linaro.org>
4666
4667 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4668 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4669 * server.c (extended_protocol): Remove "static".
4670 * server.h (extended_protocol): Declare it.
4671
8a7e4587
YQ
46722015-08-04 Yao Qi <yao.qi@linaro.org>
4673
4674 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4675 both aarch64 and aarch32.
4676 (aarch64_set_pc): Likewise.
4677
3b53ae99
YQ
46782015-08-04 Yao Qi <yao.qi@linaro.org>
4679
4680 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4681 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4682 arm-with-neon.xml to srv_xmlfiles.
4683 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4684 (is_64bit_tdesc): New function.
4685 (aarch64_linux_read_description): New function.
4686 (aarch64_arch_setup): Call aarch64_linux_read_description.
4687 (regs_info): Rename to regs_info_aarch64.
4688 (aarch64_regs_info): Return right regs_info.
4689 (initialize_low_arch): Call initialize_low_arch_aarch32.
4690
bd9e6534
YQ
46912015-08-04 Yao Qi <yao.qi@linaro.org>
4692
4693 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4694 * linux-aarch32-low.c: New file.
4695 * linux-aarch32-low.h: New file.
4696 * linux-arm-low.c (arm_fill_gregset): Move it to
4697 linux-aarch32-low.c.
4698 (arm_store_gregset): Likewise.
4699 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4700 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4701 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4702 (regs_info): Rename to regs_info_arm.
4703 (arm_regs_info): Return regs_info_aarch32 if
4704 have_ptrace_getregset is 1 and target description is
4705 arm_with_neon or arm_with_vfpv3.
4706 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4707 Call initialize_low_arch_aarch32 instead.
4708
ded48a5e
YQ
47092015-08-04 Yao Qi <yao.qi@linaro.org>
4710
4711 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4712 * linux-low.c: ... here.
4713 * linux-low.h (have_ptrace_getregset): Declare it.
4714
96e9210f
PA
47152015-08-04 Pedro Alves <palves@redhat.com>
4716
4717 * thread-db.c (struct thread_db): Use new typedefs.
4718 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4719 CHK calls.
4720 (disable_thread_event_reporting): Cast result of dlsym to
4721 destination function pointer type.
4722 (thread_db_mourn): Use td_ta_delete_ftype.
4723
af60a1ef
SL
47242015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4725
4726 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4727 arch variant.
4728 (CDX_BREAKPOINT): Define for R2.
4729 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4730 (the_low_target): Add comments.
4731
e8b41681
YQ
47322015-07-30 Yao Qi <yao.qi@linaro.org>
4733
4734 * linux-arm-low.c (arm_hwcap): Remove it.
4735 (arm_read_description): New local variable arm_hwcap. Don't
4736 set arm_hwcap to zero.
4737
89abb039
YQ
47382015-07-30 Yao Qi <yao.qi@linaro.org>
4739
4740 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4741 Use regcache->tdesc instead.
4742 (arm_store_wmmxregset): Likewise.
4743 (arm_fill_vfpregset): Likewise.
4744 (arm_store_vfpregset): Likewise.
4745
deca266c
YQ
47462015-07-30 Yao Qi <yao.qi@linaro.org>
4747
4748 * linux-arm-low.c: Include arch/arm.h.
4749 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4750 (arm_store_gregset): Likewise.
4751
aa58a496
SM
47522015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4753
4754 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4755 ptrace's 4th parameter.
4756
50904b25
YQ
47572015-07-27 Yao Qi <yao.qi@linaro.org>
4758
4759 * configure.srv (case aarch64*-*-linux*): Don't set
4760 srv_linux_usrregs.
4761
5826e159
PA
47622015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4763
4764 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4765 sys/ptrace.h.
4766 * linux-arm-low.c: Likewise.
4767 * linux-cris-low.c: Likewise.
4768 * linux-crisv32-low.c: Likewise.
4769 * linux-low.c: Likewise.
4770 * linux-m68k-low.c: Likewise.
4771 * linux-mips-low.c: Likewise.
4772 * linux-nios2-low.c: Likewise.
4773 * linux-s390-low.c: Likewise.
4774 * linux-sparc-low.c: Likewise.
4775 * linux-tic6x-low.c: Likewise.
4776 * linux-tile-low.c: Likewise.
4777 * linux-x86-low.c: Likewise.
4778
54019719
PA
47792015-07-24 Pedro Alves <palves@redhat.com>
4780
4781 * config.in: Regenerate.
4782 * configure: Regenerate.
4783
eb7aa561
PA
47842015-07-24 Pedro Alves <palves@redhat.com>
4785
4786 * acinclude.m4: Include ../ptrace.m4.
4787 * configure.ac: Call GDB_AC_PTRACE.
4788 * config.in, configure: Regenerate.
4789
55d7b841
YQ
47902015-07-24 Yao Qi <yao.qi@linaro.org>
4791
4792 * linux-low.c (linux_create_inferior): Remove setting to
4793 proc->priv->new_inferior.
4794 (linux_attach): Likewise.
4795 (linux_low_filter_event): Likewise.
4796 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4797
c06cbd92
YQ
47982015-07-24 Yao Qi <yao.qi@linaro.org>
4799
4800 * linux-low.c (linux_arch_setup): New function.
4801 (linux_low_filter_event): If proc->tdesc is NULL and
4802 proc->attached is true, call the_low_target.arch_setup.
4803 Otherwise, keep status pending, and return.
4804 (linux_resume_one_lwp_throw): Don't call get_pc if
4805 thread->while_stepping isn't NULL. Don't call
4806 get_thread_regcache if proc->tdesc is NULL.
4807 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4808 (linux_target_ops): Install arch_setup.
4809 * server.c (start_inferior): Call the_target->arch_setup.
4810 * target.h (struct target_ops) <arch_setup>: New field.
4811 (target_arch_setup): New marco.
4812 * lynx-low.c (lynx_target_ops): Update.
4813 * nto-low.c (nto_target_ops): Update.
4814 * spu-low.c (spu_target_ops): Update.
4815 * win32-low.c (win32_target_ops): Update.
4816
5ae3ebba
YQ
48172015-07-24 Yao Qi <yao.qi@linaro.org>
4818
4819 * linux-low.c (linux_add_process): Don't set
4820 proc->priv->new_inferior.
4821 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4822 (linux_attach): Likewise.
4823
eb97750b
YQ
48242015-07-24 Yao Qi <yao.qi@linaro.org>
4825
4826 * server.c (start_inferior): Code refactor.
4827
51aee833
YQ
48282015-07-24 Yao Qi <yao.qi@linaro.org>
4829
4830 * server.c (process_serial_event): Set general_thread.
4831
af1b22f3
YQ
48322015-07-21 Yao Qi <yao.qi@linaro.org>
4833
4834 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4835 aarch64_linux_get_debug_reg_capacity.
4836
554717a3
YQ
48372015-07-17 Yao Qi <yao.qi@linaro.org>
4838
4839 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4840 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4841 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4842 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4843 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4844 (AARCH64_HWP_ALIGNMENT): Likewise.
4845 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4846 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4847 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4848 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4849 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4850 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4851 (struct aarch64_debug_reg_state): Likewise.
4852 (struct arch_lwp_info): Likewise.
4853 (aarch64_align_watchpoint): Likewise.
4854 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4855 (aarch64_watchpoint_length): Likewise.
4856 (aarch64_point_encode_ctrl_reg): Likewise
4857 (aarch64_point_is_aligned): Likewise.
4858 (aarch64_align_watchpoint): Likewise.
4859 (aarch64_linux_set_debug_regs):
4860 (aarch64_dr_state_insert_one_point): Likewise.
4861 (aarch64_dr_state_remove_one_point): Likewise.
4862 (aarch64_handle_breakpoint): Likewise.
4863 (aarch64_handle_aligned_watchpoint): Likewise.
4864 (aarch64_handle_unaligned_watchpoint): Likewise.
4865 (aarch64_handle_watchpoint): Likewise.
4866
c67ca4de
YQ
48672015-07-17 Yao Qi <yao.qi@linaro.org>
4868
4869 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4870 and don't aarch64_get_debug_reg_state. All callers update.
4871 (aarch64_handle_aligned_watchpoint): Likewise.
4872 (aarch64_handle_unaligned_watchpoint): Likewise.
4873 (aarch64_handle_watchpoint): Likewise.
4874 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4875 (aarch64_remove_point): Likewise.
4876
25abf979
YQ
48772015-07-17 Yao Qi <yao.qi@linaro.org>
4878
4879 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4880 debug_printf.
4881 (aarch64_handle_unaligned_watchpoint): Likewise.
4882
db1ff28b
JK
48832015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4884
4885 Revert the previous 3 commits:
4886 Move gdb_regex* to common/
4887 Move linux_find_memory_regions_full & co.
4888 gdbserver build-id attribute generator
4889
700ca40f
JK
48902015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4891 Jan Kratochvil <jan.kratochvil@redhat.com>
4892
4893 gdbserver build-id attribute generator.
4894 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4895 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4896 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4897 (find_phdr): New.
4898 (get_dynamic): Use find_pdhr to traverse program headers.
4899 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4900 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4901 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4902 (get_hex_build_id): New.
4903 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4904 to reply XML document.
4905
9904185c
JK
49062015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4907 Jan Kratochvil <jan.kratochvil@redhat.com>
4908
4909 * target.c: Include target/target-utils.h and fcntl.h.
4910 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4911 (target_fileio_read_stralloc): New functions.
4912
6e5b4429
JK
49132015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4914
4915 * Makefile.in (OBS): Add gdb_regex.o.
4916 (gdb_regex.o): New.
4917 * config.in: Rebuilt.
4918 * configure: Rebuilt.
4919
ddc98fbf
JK
49202015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4921 Jan Kratochvil <jan.kratochvil@redhat.com>
4922
4923 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4924 * Makefile.in (OBS): Add target-utils.o.
4925 (linux-maps.o, target-utils.o): New.
4926 * configure.srv (srv_linux_obj): Add linux-maps.o.
4927
e57bb7a0
PL
49282015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4929
4930 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4931 function, return 1.
4932 (the_low_target): Install it.
4933
586b02a9
PA
49342015-07-14 Pedro Alves <palves@redhat.com>
4935
4936 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4937 Instead, ignore ECHILD, and throw an error for other errnos.
4938
58c1b36c
PA
49392015-07-10 Pedro Alves <palves@redhat.com>
4940
4941 * event-loop.c (struct callback_event) <data>: Change type to
4942 gdb_client_data instance instead of gdb_client_data pointer.
4943 (append_callback_event): Adjust.
4944
421530db
PL
49452015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4946
4947 * linux-aarch64-low.c: Add comments for each linux_target_ops
4948 method. Remove comments already covered in target_ops and
4949 linux_target_ops definitions.
4950 (the_low_target): Add comments for each unimplemented method.
4951
c2d65f38
YQ
49522015-07-09 Yao Qi <yao.qi@linaro.org>
4953
4954 * linux-aarch64-low.c (aarch64_regmap): Remove.
4955 (aarch64_usrregs_info): Remove.
4956 (regs_info): Set field usrregs to NULL.
4957
b20a6524
MM
49582015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4959
4960 * linux-low.c: Include "rsp-low.h"
4961 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4962 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4963 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4964 (handle_btrace_enable_pt): New.
4965 (handle_btrace_general_set): Support "pt".
4966 (handle_btrace_conf_general_set): Support "pt:size".
4967
96c97461
PL
49682015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4969
4970 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4971 Z_PACKET_SW_BP.
4972
37d66942
PL
49732015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4974
4975 * linux-aarch64-low.c: Remove comment about endianness.
4976 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4977 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4978 memcmp.
4979
dc06243f
GB
49802015-06-24 Gary Benson <gbenson@redhat.com>
4981
4982 * linux-i386-ipa.c (stdint.h): Do not include.
4983 * lynx-i386-low.c (stdint.h): Likewise.
4984 * lynx-ppc-low.c (stdint.h): Likewise.
4985 * mem-break.c (stdint.h): Likewise.
4986 * thread-db.c (stdint.h): Likewise.
4987 * tracepoint.c (stdint.h): Likewise.
4988 * win32-low.c (stdint.h): Likewise.
4989
124e13d9
SM
49902015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4991
4992 * server.c (write_qxfer_response): Update call to
4993 remote_escape_output.
4994
909c2cda
JK
49952015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4996 Jan Kratochvil <jan.kratochvil@redhat.com>
4997
4998 Merge multiple hex conversions.
4999 * gdbreplay.c (tohex): Rename to 'fromhex'.
5000 (logchar): Use fromhex.
5001
24c05f46
JK
50022015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5003
5004 * server.c (handle_qxfer_libraries): Set `version' attribute for
5005 <library-list>.
5006
14d2069a
GB
50072015-06-10 Gary Benson <gbenson@redhat.com>
5008
5009 * target.h (struct target_ops) <multifs_open>: New field.
5010 <multifs_unlink>: Likewise.
5011 <multifs_readlink>: Likewise.
5012 * linux-low.c (nat/linux-namespaces.h): New include.
5013 (linux_target_ops): Initialize the_target->multifs_open,
5014 the_target->multifs_unlink and the_target->multifs_readlink.
5015 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5016 * hostio.c (hostio_fs_pid): New static variable.
5017 (hostio_handle_new_gdb_connection): New function.
5018 (handle_setfs): Likewise.
5019 (handle_open): Use the_target->multifs_open as appropriate.
5020 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5021 (handle_readlink): Use the_target->multifs_readlink as
5022 appropriate.
5023 (handle_vFile): Handle vFile:setfs packets.
5024 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5025 after target_handle_new_gdb_connection.
5026
4b8b5e72
GB
50272015-06-10 Gary Benson <gbenson@redhat.com>
5028
5029 * configure.ac (AC_CHECK_FUNCS): Add setns.
5030 * config.in: Regenerate.
5031 * configure: Likewise.
5032 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5033 (linux-namespaces.o): New rule.
5034 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5035
3ac2e371
GB
50362015-06-09 Gary Benson <gbenson@redhat.com>
5037
5038 * hostio.c (handle_open): Process mode argument with
5039 fileio_to_host_mode.
5040
ca9b78ce
YQ
50412015-06-01 Yao Qi <yao.qi@linaro.org>
5042
5043 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5044 * linux-x86-low.c: Likewise.
5045
bfacd19d
DB
50462015-05-28 Don Breazeal <donb@codesourcery.com>
5047
5048 * linux-low.c (handle_extended_wait): Initialize
5049 thread_info.last_resume_kind for new fork children.
5050
452003ef
PA
50512015-05-15 Pedro Alves <palves@redhat.com>
5052
5053 * target.h (target_handle_new_gdb_connection): Rewrite using if
5054 wrapped in do/while.
5055
1041a03c
JB
50562015-05-14 Joel Brobecker <brobecker@adacore.com>
5057
5058 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5059 * configure, config.in: Regenerate.
5060 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5061 Declare typedef.
5062
c269dbdb
DB
50632015-05-12 Don Breazeal <donb@codesourcery.com>
5064
5065 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5066 PTRACE_EVENT_VFORK_DONE.
5067 (linux_low_ptrace_options, extended_event_reported): Add vfork
5068 events.
5069 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5070 and "vforkdone" for RSP 'T' Stop Reply Packet.
5071 * server.h (report_vfork_events): Declare
5072 global variable.
5073
3a8a0396
DB
50742015-05-12 Don Breazeal <donb@codesourcery.com>
5075
5076 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5077 (the_low_target) <new_fork>: Initialize new member.
5078 * linux-arm-low.c (arm_new_fork): New function.
5079 (the_low_target) <new_fork>: Initialize new member.
5080 * linux-low.c (handle_extended_wait): Call new target function
5081 new_fork.
5082 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5083 * linux-mips-low.c (mips_add_watchpoint): New function
5084 extracted from mips_insert_point.
5085 (the_low_target) <new_fork>: Initialize new member.
5086 (mips_linux_new_fork): New function.
5087 (mips_insert_point): Call mips_add_watchpoint.
5088 * linux-x86-low.c (x86_linux_new_fork): New function.
5089 (the_low_target) <new_fork>: Initialize new member.
5090
de0d863e
DB
50912015-05-12 Don Breazeal <donb@codesourcery.com>
5092
5093 * linux-low.c (handle_extended_wait): Implement return value,
5094 rename argument 'event_child' to 'event_lwp', handle
5095 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5096 (linux_low_ptrace_options): New function.
5097 (linux_low_filter_event): Call linux_low_ptrace_options,
5098 use different argument fo linux_enable_event_reporting,
5099 use return value from handle_extended_wait.
5100 (extended_event_reported): New function.
5101 (linux_wait_1): Call extended_event_reported and set
5102 status to report fork events.
5103 (linux_write_memory): Add pid to debug message.
5104 (reset_lwp_ptrace_options_callback): New function.
5105 (linux_handle_new_gdb_connection): New function.
5106 (linux_target_ops): Initialize new structure member.
5107 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5108 * lynx-low.c: Initialize new structure member.
5109 * remote-utils.c (prepare_resume_reply): Implement stop reason
5110 "fork" for "T" stop message.
5111 * server.c (handle_query): Call handle_new_gdb_connection.
5112 * server.h (report_fork_events): Declare global flag.
5113 * target.h (struct target_ops) <handle_new_gdb_connection>:
5114 New member.
5115 (target_handle_new_gdb_connection): New macro.
5116 * win32-low.c: Initialize new structure member.
5117
ddcbc397
DB
51182015-05-12 Don Breazeal <donb@codesourcery.com>
5119
5120 * mem-break.c (APPEND_TO_LIST): Define macro.
5121 (clone_agent_expr): New function.
5122 (clone_one_breakpoint): New function.
5123 (clone_all_breakpoints): New function.
5124 * mem-break.h: Declare new functions.
5125
89245bc0
DB
51262015-05-12 Don Breazeal <donb@codesourcery.com>
5127
5128 * linux-low.c (linux_supports_fork_events): New function.
5129 (linux_supports_vfork_events): New function.
5130 (linux_target_ops): Initialize new structure members.
5131 (initialize_low): Call linux_check_ptrace_features.
5132 * lynx-low.c (lynx_target_ops): Initialize new structure
5133 members.
5134 * server.c (report_fork_events, report_vfork_events):
5135 New global flags.
5136 (handle_query): Add new features to qSupported packet and
5137 response.
5138 (captured_main): Initialize new global variables.
5139 * target.h (struct target_ops) <supports_fork_events>:
5140 New member.
5141 <supports_vfork_events>: New member.
5142 (target_supports_fork_events): New macro.
5143 (target_supports_vfork_events): New macro.
5144 * win32-low.c (win32_target_ops): Initialize new structure
5145 members.
5146
835205d0
GB
51472015-05-12 Gary Benson <gbenson@redhat.com>
5148
5149 * server.c (handle_qxfer_exec_file): Use current process
5150 if annex is empty.
5151
21e94bd9
SL
51522015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5153
5154 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5155 Remove HAVE_PTRACE_GETREGS conditionals.
5156 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5157 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5158
45614f15
YQ
51592015-05-08 Yao Qi <yao.qi@linaro.org>
5160
5161 * linux-low.c (linux_supports_conditional_breakpoints): New
5162 function.
5163 (linux_target_ops): Install new target method.
5164 * lynx-low.c (lynx_target_ops): Install NULL hook for
5165 supports_conditional_breakpoints.
5166 * nto-low.c (nto_target_ops): Likewise.
5167 * spu-low.c (spu_target_ops): Likewise.
5168 * win32-low.c (win32_target_ops): Likewise.
5169 * server.c (handle_query): Check
5170 target_supports_conditional_breakpoints.
5171 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5172 New field.
5173 (target_supports_conditional_breakpoints): New macro.
5174
80ad801e
PA
51752015-05-06 Pedro Alves <palves@redhat.com>
5176
5177 PR server/18081
5178 * server.c (start_inferior): If the process exits, mourn it.
5179
819843c7
GB
51802015-04-21 Gary Benson <gbenson@redhat.com>
5181
5182 * hostio.c (fileio_open_flags_to_host): Factored out to
5183 fileio_to_host_openflags in common/fileio.c. Single use
5184 updated.
5185
a2d5a9d7
MF
51862015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5187
5188 * linux-xtensa-low.c (xtensa_fill_gregset)
5189 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5190 XCHAL_HAVE_LOOP.
5191
deb44829
MF
51922015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5193
5194 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5195 (regs_info): Replace usrregs pointer with NULL.
5196
e57f1de3
GB
51972015-04-17 Gary Benson <gbenson@redhat.com>
5198
5199 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5200 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5201 * server.c (handle_qxfer_exec_file): New function.
5202 (qxfer_packets): Add exec-file entry.
5203 (handle_query): Report qXfer:exec-file:read as supported packet.
5204
62828379
RN
52052015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5206
5207 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5208
b88bb450
GB
52092015-04-09 Gary Benson <gbenson@redhat.com>
5210
5211 * hostio-errno.c (errno_to_fileio_error): Remove function.
5212 Update caller to use remote_fileio_to_fio_error.
5213
c8f4bfdd
YQ
52142015-04-09 Yao Qi <yao.qi@linaro.org>
5215
5216 * linux-low.c (linux_insert_point): Call
5217 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5218 (linux_remove_point): Call remove_memory_breakpoint if type is
5219 raw_bkpt_type_sw.
5220 * linux-x86-low.c (x86_insert_point): Don't call
5221 insert_memory_breakpoint.
5222 (x86_remove_point): Don't call remove_memory_breakpoint.
5223
41f98f02
PA
52242015-04-01 Pedro Alves <palves@redhat.com>
5225 Cleber Rosa <crosa@redhat.com>
5226
5227 * server.c (gdbserver_usage): Reorganize and extend the usage
5228 message.
5229
2bf6fb9d
PA
52302015-03-24 Pedro Alves <palves@redhat.com>
5231
5232 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5233 output. Also dump TRAP_TRACE.
5234 (linux_low_filter_event): In debug output, distinguish a
5235 resume_stop SIGSTOP from a delayed SIGSTOP.
5236
369f6daa
GB
52372015-03-24 Gary Benson <gbenson@redhat.com>
5238
5239 * linux-x86-low.c (x86_linux_new_thread): Moved to
5240 nat/x86-linux.c.
5241 (x86_linux_prepare_to_resume): Likewise.
5242
8e5d4070
GB
52432015-03-24 Gary Benson <gbenson@redhat.com>
5244
5245 * Makefile.in (x86-linux-dregs.o): New rule.
5246 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5247 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5248 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5249 (x86_linux_dr_get): Likewise.
5250 (x86_linux_dr_set): Likewise.
5251 (update_debug_registers_callback): Likewise.
5252 (x86_linux_dr_set_addr): Likewise.
5253 (x86_linux_dr_get_addr): Likewise.
5254 (x86_linux_dr_set_control): Likewise.
5255 (x86_linux_dr_get_control): Likewise.
5256 (x86_linux_dr_get_status): Likewise.
5257 (x86_linux_update_debug_registers): Likewise.
5258
2b95d440
GB
52592015-03-24 Gary Benson <gbenson@redhat.com>
5260
5261 * linux-x86-low.c (x86_linux_update_debug_registers):
5262 New function, factored out from...
5263 (x86_linux_prepare_to_resume): ...this.
5264
14b0bc68
GB
52652015-03-24 Gary Benson <gbenson@redhat.com>
5266
5267 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5268 (x86_linux_dr_set): Likewise.
5269 (update_debug_registers_callback): Likewise.
5270 (x86_linux_dr_set_addr): Likewise.
5271 (x86_linux_dr_get_addr): Likewise.
5272 (x86_linux_dr_set_control): Likewise.
5273 (x86_linux_dr_get_control): Likewise.
5274 (x86_linux_dr_get_status): Likewise.
5275 (x86_linux_prepare_to_resume): Likewise.
5276
5dfe6ca8
GB
52772015-03-24 Gary Benson <gbenson@redhat.com>
5278
5279 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5280 Use perror_with_name. Pass string through gettext.
5281 (x86_linux_dr_set): Likewise.
5282
d33472ad
GB
52832015-03-24 Gary Benson <gbenson@redhat.com>
5284
5285 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5286 (x86_linux_dr_set_addr): ...this.
5287 (x86_dr_low_get_addr): Rename to...
5288 (x86_linux_dr_get_addr): ...this.
5289 (x86_dr_low_set_control): Rename to...
5290 (x86_linux_dr_set_control): ...this.
5291 (x86_dr_low_get_control): Rename to...
5292 (x86_linux_dr_get_control): ...this.
5293 (x86_dr_low_get_status): Rename to...
5294 (x86_linux_dr_get_status): ...this.
5295 (x86_dr_low): Update with new function names.
5296
4b134ca1
GB
52972015-03-24 Gary Benson <gbenson@redhat.com>
5298
5299 * Makefile.in (x86-linux.o): New rule.
5300 * configure.srv: Add x86-linux.o to relevant targets.
5301 * linux-low.c (lwp_set_arch_private_info): New function.
5302 (lwp_arch_private_info): Likewise.
5303 * linux-x86-low.c: Include nat/x86-linux.h.
5304 (arch_lwp_info): Removed structure.
5305 (update_debug_registers_callback):
5306 Use lwp_set_debug_registers_changed.
5307 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5308 and lwp_set_debug_registers_changed.
5309 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5310
34c703da
GB
53112015-03-24 Gary Benson <gbenson@redhat.com>
5312
5313 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5314 * linux-arm-low.c (arm_new_thread): Likewise.
5315 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5316 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5317 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5318 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5319
cff068da
GB
53202015-03-24 Gary Benson <gbenson@redhat.com>
5321
5322 * linux-low.c (ptid_of_lwp): New function.
5323 (lwp_is_stopped): Likewise.
5324 (lwp_stop_reason): Likewise.
5325 * linux-x86-low.c (update_debug_registers_callback):
5326 Use lwp_is_stopped.
5327 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5328 lwp_stop_reason.
5329
b2f7c7e8
GB
53302015-03-24 Gary Benson <gbenson@redhat.com>
5331
5332 * linux-low.h (linux_stop_lwp): Remove declaration.
5333
6d4ee8c6
GB
53342015-03-24 Gary Benson <gbenson@redhat.com>
5335
5336 * linux-low.h: Include nat/linux-nat.h.
5337 * linux-low.c (iterate_over_lwps_args): New structure.
5338 (iterate_over_lwps_filter): New function.
5339 (iterate_over_lwps): Likewise.
5340 * linux-x86-low.c (update_debug_registers_callback):
5341 Update signature to what iterate_over_lwps expects.
5342 Remove PID check that iterate_over_lwps now performs.
5343 (x86_dr_low_set_addr): Use iterate_over_lwps.
5344 (x86_dr_low_set_control): Likewise.
5345
70a0bb6b
GB
53462015-03-24 Gary Benson <gbenson@redhat.com>
5347
5348 * linux-x86-low.c (x86_debug_reg_state): New function.
5349 (x86_linux_prepare_to_resume): Use the above.
5350
7b669087
GB
53512015-03-24 Gary Benson <gbenson@redhat.com>
5352
5353 * linux-low.c (current_lwp_ptid): New function.
5354 * linux-x86-low.c: Include nat/linux-nat.h.
5355 (x86_dr_low_get_addr): Use current_lwp_ptid.
5356 (x86_dr_low_get_control): Likewise.
5357 (x86_dr_low_get_status): Likewise.
5358
eef49a3d
PA
53592015-03-20 Pedro Alves <palves@redhat.com>
5360
5361 * tracepoint.c (cmd_qtstatus): Make "str" const.
5362
b2333d22
PA
53632015-03-20 Pedro Alves <palves@redhat.com>
5364
5365 * server.c (handle_general_set): Make "req_str" const.
5366
23f238d3
PA
53672015-03-19 Pedro Alves <palves@redhat.com>
5368
5369 * linux-low.c (linux_resume_one_lwp): Rename to ...
5370 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5371 instead call perror_with_name.
5372 (check_ptrace_stopped_lwp_gone): New function.
5373 (linux_resume_one_lwp): Reimplement as wrapper around
5374 linux_resume_one_lwp_throw that swallows errors if the LWP is
5375 gone.
5376
91baf43f
PA
53772015-03-19 Pedro Alves <palves@redhat.com>
5378
5379 * linux-low.c (count_events_callback, select_event_lwp_callback):
5380 No longer check whether the thread has resume_stop as last resume
5381 kind.
5382
8bf3b159
PA
53832015-03-19 Pedro Alves <palves@redhat.com>
5384
5385 * linux-low.c (count_events_callback, select_event_lwp_callback):
5386 Use the lwp's status_pending_p field, not the thread's.
5387
b90fc188
PA
53882015-03-19 Pedro Alves <palves@redhat.com>
5389
5390 * linux-low.c (select_event_lwp_callback): Update comments to
5391 no longer mention SIGTRAP.
5392
464b0089
GB
53932015-03-18 Gary Benson <gbenson@redhat.com>
5394
5395 * server.c (handle_query): Do not report vFile:fstat as supported.
5396
aa9e327f
GB
53972015-03-11 Gary Benson <gbenson@redhat.com>
5398
5399 * hostio.c (sys/types.h): New include.
5400 (sys/stat.h): Likewise.
5401 (common-remote-fileio.h): Likewise.
5402 (handle_fstat): New function.
5403 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 5404
791c0056
GB
54052015-03-11 Gary Benson <gbenson@redhat.com>
5406
5407 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5408 struct stat.st_blocks and struct stat.st_blksize.
5409 * configure: Regenerate.
5410 * config.in: Likewise.
5411 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5412 (OBS): Add common-remote-fileio.o.
5413 (common-remote-fileio.o): New rule.
5414
9a9df970
PA
54152015-03-09 Pedro Alves <palves@redhat.com>
5416
5417 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5418 'struct sockaddr' pointer in 'accept' call.
5419
9eb1356e
PA
54202015-03-09 Pedro Alves <palves@redhat.com>
5421
5422 Revert:
5423 2015-03-07 Pedro Alves <palves@redhat.com>
5424 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5425 or <winsock2.h> here. Instead include "gdb_socket.h".
5426 (remote_open): Use union gdb_sockaddr_u.
5427 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5428 or <winsock2.h> here. Instead include "gdb_socket.h".
5429 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5430 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5431 or <sys/un.h>.
5432 (init_named_socket, gdb_agent_helper_thread): Use union
5433 gdb_sockaddr_u.
5434
aac331e4
PA
54352015-03-07 Pedro Alves <palves@redhat.com>
5436
5437 * configure.ac (build_warnings): Move
5438 -Wdeclaration-after-statement to the C-specific set.
5439 * configure: Regenerate.
5440
366c75fc
PA
54412015-03-07 Pedro Alves <palves@redhat.com>
5442
5443 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5444 or <winsock2.h> here. Instead include "gdb_socket.h".
5445 (remote_open): Use union gdb_sockaddr_u.
5446 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5447 or <winsock2.h> here. Instead include "gdb_socket.h".
5448 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5449 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5450 or <sys/un.h>.
5451 (init_named_socket, gdb_agent_helper_thread): Use union
5452 gdb_sockaddr_u.
5453
492d29ea
PA
54542015-03-07 Pedro Alves <palves@redhat.com>
5455
5456 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5457 instead.
5458
60a191ed
YQ
54592015-03-06 Yao Qi <yao.qi@linaro.org>
5460
5461 * linux-aarch64-low.c (aarch64_insert_point): Use
5462 show_debug_regs as a boolean.
5463 (aarch64_remove_point): Likewise.
5464
f5771b1d
PA
54652015-03-05 Pedro Alves <palves@redhat.com>
5466
5467 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5468 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5469 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5470 * nto-low.c (nto_target_ops): Likewise.
5471 * spu-low.c (spu_target_ops): Likewise.
5472 * win32-low.c (win32_target_ops): Likewise.
5473
3e572f71
PA
54742015-03-04 Pedro Alves <palves@redhat.com>
5475
72f4393d 5476 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
5477 Decide whether a breakpoint triggered based on the SIGTRAP's
5478 siginfo.si_code.
72f4393d
L
5479 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5480 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
5481 (linux_low_filter_event): Check for breakpoints before checking
5482 watchpoints.
5483 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5484 siginfo.si_code.
72f4393d
L
5485 (linux_stopped_by_sw_breakpoint)
5486 (linux_supports_stopped_by_sw_breakpoint)
5487 (linux_stopped_by_hw_breakpoint)
5488 (linux_supports_stopped_by_hw_breakpoint): New functions.
5489 (linux_target_ops): Install new target methods.
3e572f71 5490
1ec68e26
PA
54912015-03-04 Pedro Alves <palves@redhat.com>
5492
5493 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5494 * server.c (swbreak_feature, hwbreak_feature): New globals.
5495 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5496 (captured_main): Clear swbreak_feature and hwbreak_feature.
5497 * server.h (swbreak_feature, hwbreak_feature): Declare.
5498 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5499 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5500 supports_stopped_by_hw_breakpoint>: New fields.
5501 (target_supports_stopped_by_sw_breakpoint)
5502 (target_stopped_by_sw_breakpoint)
5503 (target_supports_stopped_by_hw_breakpoint)
5504 (target_stopped_by_hw_breakpoint): Declare.
5505
15c66dd6
PA
55062015-03-04 Pedro Alves <palves@redhat.com>
5507
5508 enum lwp_stop_reason -> enum target_stop_reason
5509 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5510 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5511 (linux_wait_1, stuck_in_jump_pad_callback)
5512 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5513 (linux_stopped_by_watchpoint):
5514 * linux-low.h (enum lwp_stop_reason): Delete.
5515 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5516 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5517
98fc70d6
YQ
55182015-03-04 Yao Qi <yao.qi@linaro.org>
5519
5520 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5521
dd2ac174
GB
55222015-03-03 Gary Benson <gbenson@redhat.com>
5523
5524 * hostio.c (handle_vFile): Fix prefix lengths.
5525
d68e53f4
MM
55262015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5527
5528 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5529 ptr_bits.
5530
bf2d68ab
AA
55312015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5532
5533 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5534 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5535 (clean): Add "rm -f" for above C files.
5536 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5537 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5538 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5539 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5540 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5541 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5542 (init_registers_s390x_vx_linux64)
5543 (init_registers_s390x_tevx_linux64)
5544 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5545 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5546 declarations.
5547 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5548 (s390_store_vxrs_high): New functions.
5549 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5550 NT_S390_VXRS_HIGH.
5551 (s390_arch_setup): Add logic for selecting one of the new target
5552 descriptions. Activate the new vector regsets if applicable.
5553 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5554 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5555 and init_registers_s390x_tevx_linux64.
5556
c966a859
PA
55572015-03-01 Pedro Alves <palves@redhat.com>
5558
5559 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5560 parameter.
5561
4180215b
PA
55622015-02-27 Pedro Alves <palves@redhat.com>
5563
5564 * linux-x86-low.c (u_debugreg_offset): New function.
5565 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5566
749bab01
PA
55672015-02-27 Pedro Alves <palves@redhat.com>
5568
5569 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5570 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5571 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5572 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5573 (ps_lsetfpregs, ps_getpid)
5574 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5575 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5576 (ps_lsetxregs, ps_plog): Declare.
5577
3c14e5a3
PA
55782015-02-27 Pedro Alves <palves@redhat.com>
5579
5580 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5581 IP_AGENT_EXPORT_FUNC.
5582 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5583 IP_AGENT_EXPORT_FUNC.
5584 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5585 (IP_AGENT_EXPORT): Delete.
5586 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5587 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5588 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5589 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5590 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5591 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5592 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5593 (traceframe_read_count, traceframe_write_count)
5594 (traceframes_created, trace_state_variables, get_raw_reg)
5595 (get_trace_state_variable_value, set_trace_state_variable_value)
5596 (ust_loaded, helper_thread_id, cmd_buf): Use
5597 IPA_SYM_EXPORTED_NAME.
5598 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5599 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5600 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5601 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5602 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5603 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5604 EXTERN_C_PUSH/EXTERN_C_POP.
5605 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5606 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5607 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5608 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5609 (traceframe_write_count, traceframe_read_count)
5610 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5611 (about_to_request_buffer_space, get_trace_state_variable_value)
5612 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5613 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5614 EXTERN_C_PUSH/EXTERN_C_POP.
5615 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5616 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5617 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5618 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5619 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5620 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5621 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5622 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5623 Define.
5624 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5625 (IP_AGENT_EXPORT_VAR_DECL): Define.
5626 (tracing): Declare.
5627 (gdb_agent_get_raw_reg): Declare.
5628
fe978cb0
PA
56292015-02-27 Tom Tromey <tromey@redhat.com>
5630 Pedro Alves <palves@redhat.com>
5631
5632 Rename symbols whose names are reserved C++ keywords throughout.
5633
3bc3d82a
PA
56342015-02-27 Pedro Alves <palves@redhat.com>
5635
5636 * Makefile.in (COMPILER): New, get it from autoconf.
5637 (CXX): Get from autoconf instead.
5638 (COMPILE.pre): Use COMPILER.
5639 (CC-LD): Rename to ...
5640 (CC_LD): ... this. Use COMPILER.
5641 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5642 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5643 * acinclude.m4: Include build-with-cxx.m4.
5644 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5645 Disable -Werror by default if building in C++ mode.
5646 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5647 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5648 the C++ compiler. Save/restore CXXFLAGS too.
5649 * configure: Regenerate.
5650
07697489
PA
56512015-02-27 Pedro Alves <palves@redhat.com>
5652
5653 * acinclude.m4: Include libiberty.m4.
5654 * configure.ac: Call libiberty_INIT.
5655 * config.in, configure: Regenerate.
5656
9beb7c4e
PA
56572015-02-26 Pedro Alves <palves@redhat.com>
5658
5659 * linux-low.c (linux_wait_1): When incrementing the PC past a
5660 program breakpoint always use the_low_target.breakpoint_len as
5661 increment, rather than the maximum between that and
5662 the_low_target.decr_pc_after_break.
5663
8090aef2
PA
56642015-02-23 Pedro Alves <palves@redhat.com>
5665
5666 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5667 thread was doing a step-over; always adjust the PC if
5668 we stepped over a permanent breakpoint.
5669 (linux_wait_1): If we stepped over breakpoint that was on top of a
5670 permanent breakpoint, manually advance the PC past it.
5671
bc9540e8
PA
56722015-02-23 Pedro Alves <palves@redhat.com>
5673
5674 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5675 modes.
5676 (x86_fill_gregset, x86_store_gregset): Use it when handling
5677 $orig_eax.
5678
2db9a427
PA
56792015-02-20 Pedro Alves <palves@redhat.com>
5680
5681 * thread-db.c: Include "nat/linux-procfs.h".
5682 (thread_db_init): Skip listing new threads if the kernel supports
5683 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5684
afa8d396
PA
56852015-02-20 Pedro Alves <palves@redhat.com>
5686
5687 * linux-low.c (status_pending_p_callback): Use ptid_match.
5688
c9587f88
AT
56892015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5690
5691 PR breakpoints/16812
5692 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5693 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5694 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5695
b05ec7a5
AT
56962015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5697
5698 PR breakpoints/15956
5699 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5700
d33501a5
MM
57012015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5702
5703 * linux-low.c (linux_low_btrace_conf): Print size.
5704 * server.c (handle_btrace_conf_general_set): New.
5705 (hanle_general_set): Call handle_btrace_conf_general_set.
5706 (handle_query): Report Qbtrace-conf:bts:size as supported.
5707
f4abbc16
MM
57082015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5709
5710 * linux-low.c (linux_low_enable_btrace): Update parameters.
5711 (linux_low_btrace_conf): New.
5712 (linux_target_ops)<to_btrace_conf>: Initialize.
5713 * server.c (current_btrace_conf): New.
5714 (handle_btrace_enable): Rename to ...
5715 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5716 to target_enable_btrace. Update comment. Update users.
5717 (handle_qxfer_btrace_conf): New.
5718 (qxfer_packets): Add btrace-conf entry.
5719 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5720 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5721 (target_ops)<read_btrace_conf>: New.
5722 (target_enable_btrace): Update parameters.
5723 (target_read_btrace_conf): New.
5724
043c3577
MM
57252015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5726
5727 * server.c (handle_btrace_general_set): Remove call to
5728 target_supports_btrace.
5729 (supported_btrace_packets): New.
5730 (handle_query): Call supported_btrace_packets.
5731 * target.h: include btrace-common.h.
5732 (btrace_target_info): Removed.
5733 (supports_btrace, target_supports_btrace): Update parameters.
5734
734b0e4b
MM
57352015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5736
5737 * Makefile.in (SFILES): Add common/btrace-common.c.
5738 (OBS): Add common/btrace-common.o.
5739 (btrace-common.o): Add build rules.
5740 * linux-low: Include btrace-common.h.
5741 (linux_low_read_btrace): Use struct btrace_data. Call
5742 btrace_data_init and btrace_data_fini.
5743
d6c146e9
PA
57442015-02-06 Pedro Alves <palves@redhat.com>
5745
5746 * thread-db.c (find_new_threads_callback): Add debug output.
5747
20ba1ce6
PA
57482015-02-04 Pedro Alves <palves@redhat.com>
5749
5750 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5751 (resume_stopped_resumed_lwps): New function.
5752 (linux_wait_for_event_filtered): Use it.
5753
8cc73a39
SDJ
57542015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5755
5756 * Makefile.in (SFILES): Add linux-personality.c.
5757 (linux-personality.o): New rule.
5758 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5759 list of objects to be built.
5760 * linux-low.c: Include nat/linux-personality.h.
5761 (linux_create_inferior): Remove code to disable address space
5762 randomization (moved to ../nat/linux-personality.c). Create
5763 cleanup to disable address space randomization.
5764
fb23d554
SDJ
57652015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5766
5767 * Makefile.in (posix-strerror.o): New rule.
5768 (mingw-strerror.o): Likewise.
5769 * configure: Regenerated.
5770 * configure.ac: Source file ../common/common.host. Initialize new
5771 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5772
cdf43629
YQ
57732015-01-14 Yao Qi <yao@codesourcery.com>
5774
5775 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5776 (ppc-linux.o): New rule.
5777 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5778 * configure.ac: AC_CHECK_FUNCS(getauxval).
5779 * config.in: Re-generated.
5780 * configure: Re-generated.
5781 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5782 ppc64_64bit_inferior_p
5783
514c5338
YQ
57842015-01-14 Yao Qi <yao@codesourcery.com>
5785
5786 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5787 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5788 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5789 (PT_ORIG_R3, PT_TRAP): Likewise.
5790 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5791 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5792 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5793
3368c1e5
JB
57942015-01-10 Joel Brobecker <brobecker@adacore.com>
5795
5796 * i387-fp.c (i387_cache_to_xsave): In look over
5797 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5798 zmmh_low_space field by use of zmmh_high_space.
5799
582511be
PA
58002015-01-09 Pedro Alves <palves@redhat.com>
5801
5802 * linux-low.c (step_over_bkpt): Move higher up in the file.
5803 (handle_extended_wait): Don't store the stop_pc here.
5804 (get_stop_pc): Adjust comments and rename to ...
5805 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5806 stopped for a software breakpoint or hardware breakpoint.
5807 (thread_still_has_status_pending_p): New function.
5808 (status_pending_p_callback): Use
5809 thread_still_has_status_pending_p. If the event is no longer
5810 interesting, resume the LWP.
5811 (handle_tracepoints): Add assert.
5812 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5813 (wstatus_maybe_breakpoint): New function.
5814 (cancel_breakpoint): Delete function.
5815 (check_stopped_by_watchpoint): New function, factored out from
5816 linux_low_filter_event.
5817 (lp_status_maybe_breakpoint): Delete function.
5818 (linux_low_filter_event): Remove filter_ptid argument.
5819 Leave thread group exits pending here. Store the LWP's stop PC.
5820 Always leave events pending.
5821 (linux_wait_for_event_filtered): Pull all events out of the
5822 kernel, and leave them all pending.
5823 (count_events_callback, select_event_lwp_callback): Consider all
5824 events.
5825 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5826 (select_event_lwp): Only give preference to the stepping LWP in
5827 all-stop mode. Adjust comments.
5828 (ignore_event): New function.
5829 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5830 references to cancel_breakpoints. Adjust to renames. Also give
5831 equal priority to all LWPs that have had events in non-stop mode.
5832 If reporting a software breakpoint event, unadjust the LWP's PC.
5833 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5834 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5835 Adjust.
5836 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5837 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5838 (linux_stopped_by_watchpoint): Adjust.
5839 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5840 * linux-low.h (enum lwp_stop_reason): New.
5841 (struct lwp_info) <stop_pc>: Adjust comment.
5842 <stopped_by_watchpoint>: Delete field.
5843 <stop_reason>: New field.
5844 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5845 * mem-break.c (software_breakpoint_inserted_here)
5846 (hardware_breakpoint_inserted_here): New function.
5847 * mem-break.h (software_breakpoint_inserted_here)
5848 (hardware_breakpoint_inserted_here): Declare.
5849 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5850 (cancel_breakpoints): Delete.
5851 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5852 (upload_fast_traceframes): Remove references to
5853 cancel_breakpoints.
5854
a33e3959
PA
58552015-01-09 Pedro Alves <palves@redhat.com>
5856
5857 * thread-db.c (find_new_threads_callback): Ignore thread if the
5858 kernel thread ID is -1.
5859
8784d563
PA
58602015-01-09 Pedro Alves <palves@redhat.com>
5861
5862 * linux-low.c (linux_attach_fail_reason_string): Move to
5863 nat/linux-ptrace.c, and rename.
5864 (linux_attach_lwp): Update comment.
5865 (attach_proc_task_lwp_callback): New function.
5866 (linux_attach): Adjust to rename and use
5867 linux_proc_attach_tgid_threads.
5868 (linux_attach_fail_reason_string): Delete declaration.
5869
76f2b779
JB
58702015-01-01 Joel Brobecker <brobecker@adacore.com>
5871
5872 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5873 * server.c (gdbserver_version): Likewise.
5874
fafcc06a
SDJ
58752014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5876
5877 * remote-utils.c: Include ctype.h.
5878 (input_interrupt): Explicitly handle the case when the char
5879 received is the NUL byte. Improve the printing of non-ASCII
5880 characters.
5881
beed38b8
JB
58822014-12-16 Joel Brobecker <brobecker@adacore.com>
5883
5884 * linux-low.c (linux_low_filter_event): Update call to
5885 linux_enable_event_reporting following the addition of
5886 a new parameter to that function.
5887
bf330350
CU
58882014-12-16 Catalin Udma <catalin.udma@freescale.com>
5889
5890 PR server/17457
5891 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5892 (AARCH64_FPCR_REGNO): Likewise.
5893 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5894 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5895 (aarch64_store_fpregset): Likewise.
5896
5227d625
JB
58972014-12-15 Joel Brobecker <brobecker@adacore.com>
5898
5899 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5900 Remove FIXME comment about assumption about N.
5901
f93b65a0
JB
59022014-12-13 Joel Brobecker <brobecker@adacore.com>
5903
5904 * configure.ac: If large-file support is disabled in GDBserver,
5905 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5906 * configure: Regenerate.
5907
e5a9158d
AA
59082014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5909
5910 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5911 warning upon ENODATA from ptrace.
5912 * linux-s390-low.c (s390_store_tdb): New.
5913 (s390_regsets): Add regset for NT_S390_TDB.
5914
feea5f36
AA
59152014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5916
5917 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5918 without a fill_function.
5919 * linux-s390-low.c (s390_fill_last_break): Remove.
5920 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5921 (s390_arch_setup): Use regset's size instead of fill_function for
5922 loop end condition.
5923
098dbe61
AA
59242014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5925
5926 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5927 the regset's store function when ptrace returned an error.
5928 * regcache.c (get_thread_regcache): Invalidate register cache
5929 before fetching inferior's registers.
5930
28eef672
AA
59312014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5932
5933 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5934 while-loop as for-loop.
5935 (regsets_store_inferior_registers): Likewise.
5936
bdca27a2
YQ
59372014-11-28 Yao Qi <yao@codesourcery.com>
5938
5939 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5940 * config.in, configure: Re-generate.
5941 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5942 is defined.
5943
9c232dda
YQ
59442014-11-21 Yao Qi <yao@codesourcery.com>
5945
5946 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5947 (AC_CHECK_HEADERS): Remove malloc.h.
5948 * configure: Re-generated.
5949 * config.in: Re-generated.
5950 * server.h: Don't include alloca.h and malloc.h.
5951 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5952 Don't include malloc.h.
5953
43968415
JB
59542014-11-17 Joel Brobecker <brobecker@adacore.com>
5955
5956 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5957 corresponding ERRNO check in same block.
5958
40e91bc7
PA
59592014-11-12 Pedro Alves <palves@redhat.com>
5960
5961 * server.c (cont_thread): Update comment.
5962 (start_inferior, attach_inferior): No longer clear cont_thread.
5963 (handle_v_cont): No longer set cont_thread.
5964 (captured_main): Clear cont_thread each time a GDB connects.
5965
c2c118cf
PA
59662014-11-12 Pedro Alves <palves@redhat.com>
5967
5968 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5969 thread, and don't resume all threads if the Hc thread has exited.
5970
78708b7c
PA
59712014-11-12 Pedro Alves <palves@redhat.com>
5972
5973 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5974 the process group instead of to a specific LWP.
5975
a2abc7de
PA
59762014-10-15 Pedro Alves <palves@redhat.com>
5977
5978 PR server/17487
5979 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5980 parameter.
5981 (arm_set_thread_context): Delete.
5982 (the_low_target): Adjust.
5983 * win32-i386-low.c (debug_registers_changed)
5984 (debug_registers_used): Delete.
5985 (update_debug_registers_callback): New function.
5986 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5987 needing to update their debug registers.
5988 (win32_get_current_dr): New function.
5989 (x86_dr_low_get_addr, x86_dr_low_get_control)
5990 (x86_dr_low_get_status): Fetch the debug register from the thread
5991 record's context.
5992 (i386_initial_stuff): Adjust.
5993 (i386_get_thread_context): Remove current_event parameter. Don't
5994 clear debug_registers_changed nor copy DR values to
5995 debug_reg_state.
5996 (i386_set_thread_context): Delete.
5997 (i386_prepare_to_resume): New function.
5998 (i386_thread_added): Mark the thread as needing to update irs
5999 debug registers.
6000 (the_low_target): Remove i386_set_thread_context and install
6001 i386_prepare_to_resume.
6002 * win32-low.c (win32_get_thread_context): Adjust.
6003 (win32_set_thread_context): Use SetThreadContext
6004 directly.
6005 (win32_prepare_to_resume): New function.
6006 (win32_require_context): New function, factored out from ...
6007 (thread_rec): ... this.
6008 (continue_one_thread): Call win32_prepare_to_resume on each thread
6009 we're about to continue.
6010 (win32_resume): Call win32_prepare_to_resume on the event thread.
6011 * win32-low.h (struct win32_thread_info)
6012 <debug_registers_changed>: New field.
6013 (struct win32_target_ops): Change prototype of set_thread_context,
6014 delete set_thread_context and add prepare_to_resume.
6015 (win32_require_context): New declaration.
6016
a442d071
GB
60172014-10-08 Gary Benson <gbenson@redhat.com>
6018
6019 * server.h: Do not include common-exceptions.h.
6020
6f1947e8
GB
60212014-10-08 Gary Benson <gbenson@redhat.com>
6022
6023 * server.h: Do not include cleanups.h.
6024
63b434a4
JH
60252014-09-30 James Hogan <james.hogan@imgtec.com>
6026
6027 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6028 mips64-dsp-linux.c.
6029
c4d9ceb6
YQ
60302014-09-23 Yao Qi <yao@codesourcery.com>
6031
6032 * linux-low.c (lp_status_maybe_breakpoint): New function.
6033 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6034 (count_events_callback): Likewise.
6035 (select_event_lwp_callback): Likewise.
6036 (cancel_breakpoints_callback): Likewise.
6037
89a5711c
DB
60382014-09-19 Don Breazeal <donb@codesourcery.com>
6039
6040 * linux-low.c (handle_extended_wait): Call
6041 linux_ptrace_get_extended_event.
6042 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6043 linux_is_extended_waitstatus.
6044
bffc0964
JB
60452014-09-16 Joel Brobecker <brobecker@adacore.com>
6046
6047 * Makefile.in (CPPFLAGS): Define.
6048 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6049 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6050
0bfdf32f
GB
60512014-09-16 Gary Benson <gbenson@redhat.com>
6052
6053 * inferiors.h (current_inferior): Renamed as...
6054 (current_thread): New variable. All uses updated.
6055 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6056 (maybe_move_out_of_jump_pad): Likewise.
6057 (cancel_breakpoint): Likewise.
6058 (linux_low_filter_event): Likewise.
6059 (wait_for_sigstop): Likewise.
6060 (linux_resume_one_lwp): Likewise.
6061 (need_step_over_p): Likewise.
6062 (start_step_over): Likewise.
6063 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6064 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6065 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6066 and save_inferior as saved_thread.
6067 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6068 saved_thread.
6069 (regcache_invalidate_thread): Likewise.
6070 * remote-utils.c (prepare_resume_reply): Likewise.
6071 * thread-db.c (thread_db_get_tls_address): Likewise.
6072 (disable_thread_event_reporting): Likewise.
6073 (remove_thread_event_breakpoints): Likewise.
6074 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6075 as saved_thread.
6076 * target.h (set_desired_inferior): Renamed as...
6077 (set_desired_thread): New declaration. All uses updated.
6078 * server.c (myresume): Updated comment to reference thread instead
6079 of inferior.
6080 (handle_serial_event): Likewise.
6081 (handle_target_event): Likewise.
6082
361c8ade
GB
60832014-09-12 Tom Tromey <tromey@redhat.com>
6084 Gary Benson <gbenson@redhat.com>
6085
6086 * regcache.h: Include common-regcache.h.
6087 (regcache_read_pc): Don't declare.
6088 * regcache.c (get_thread_regcache_for_ptid): New function.
6089
bd9269f7
GB
60902014-09-11 Tom Tromey <tromey@redhat.com>
6091 Gary Benson <gbenson@redhat.com>
6092
6093 * symbol.c: New file.
6094 * Makefile.in (SFILES): Add symbol.c.
6095 (OBS): Add symbol.o.
6096
f8c1d06b
GB
60972014-09-11 Gary Benson <gbenson@redhat.com>
6098
6099 * target.c (target_stop_ptid, target_continue_ptid): New
6100 functions.
6101
721ec300
GB
61022014-09-11 Tom Tromey <tromey@redhat.com>
6103 Gary Benson <gbenson@redhat.com>
6104
6105 * target.h: Include target/target.h.
6106 * target.c (target_read_memory, target_read_uint32)
6107 (target_write_memory): New functions.
6108
c5e92cca
GB
61092014-09-11 Gary Benson <gbenson@redhat.com>
6110
6111 * server.h (debug_hw_points): Don't declare.
6112 * server.c (debug_hw_points): Don't define. Replace all uses
6113 with show_debug_regs.
6114 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6115 all uses with show_debug_regs.
6116
2e4bb98a
EBM
61172014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6118
6119 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6120 endianness into account.
6121 (ppc_supply_ptrace_register): Likewise.
6122
ac740bc7
JH
61232014-09-03 James Hogan <james.hogan@imgtec.com>
6124
6125 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6126 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6127
97ea6506
GB
61282014-09-03 Gary Benson <gbenson@redhat.com>
6129
6130 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6131 ALL_DEBUG_ADDRESS_REGISTERS.
6132
df7e5265
GB
61332014-09-02 Gary Benson <gbenson@redhat.com>
6134
6135 * i386-low.h: Renamed as...
6136 * x86-low.h: New file. All type, function and variable name
6137 prefixes changed from "i386_" to "x86_". All references updated.
6138 * i386-low.c: Renamed as...
6139 * x86-low.c: New file. All type, function and variable name
6140 prefixes changed from "i386_" to "x86_". All references updated.
6141
ed859da7
GB
61422014-09-02 Gary Benson <gbenson@redhat.com>
6143
6144 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6145 (x86_linux_new_thread): Likewise.
6146
860789c7
GB
61472014-08-29 Gary Benson <gbenson@redhat.com>
6148
6149 * server.h (setjmp.h): Do not include.
6150 (toplevel): Do not declare.
6151 (common-exceptions.h): Include.
6152 (cleanups.h): Likewise.
6153 * server.c (toplevel): Do not define.
6154 (exit_code): New static global.
6155 (detach_or_kill_for_exit_cleanup): New function.
6156 (main): New function. Original main renamed to...
6157 (captured_main): New function.
6158 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6159
ff55e1b5
GB
61602014-08-29 Gary Benson <gbenson@redhat.com>
6161
6162 * Makefile.in (SFILES): Add common/common-exceptions.c.
6163 (OBS): Add common-exceptions.o.
6164 (common-exceptions.o): New rule.
6165 * utils.c (prepare_to_throw_exception): New function.
6166
e9bcb658
GB
61672014-08-29 Gary Benson <gbenson@redhat.com>
6168
6169 * config.in: Regenerate.
6170 * configure: Likewise.
6171
e3180625
GB
61722014-08-29 Gary Benson <gbenson@redhat.com>
6173
6174 * Makefile.in (SFILES): Add common/cleanups.c.
6175 (OBS): cleanups.o.
6176 (cleanups.o): New rule.
6177
e3d6ba5d
GB
61782014-08-29 Gary Benson <gbenson@redhat.com>
6179
6180 * utils.c (internal_vwarning): New function.
6181
7096e886
GB
61822014-08-28 Gary Benson <gbenson@redhat.com>
6183
6184 * utils.h (fatal): Remove declaration.
6185 * utils.c (fatal): Remove function.
6186
14ce3192
GB
61872014-08-28 Gary Benson <gbenson@redhat.com>
6188
6189 * tracepoint.c (gdb_agent_init): Replace fatal with
6190 perror_with_name.
6191 (initialize_tracepoint): Likewise.
6192
50278d59
GB
61932014-08-28 Gary Benson <gbenson@redhat.com>
6194
6195 * remote-utils.c (remote_prepare): Replace fatal with error.
6196
aa96c426
GB
61972014-08-28 Gary Benson <gbenson@redhat.com>
6198
6199 * linux-low.c (linux_async): Replace fatal with warning.
6200 Tidy up and return.
6201 (linux_start_non_stop): Return -1 if linux_async failed.
6202
f7160e97
GB
62032014-08-28 Gary Benson <gbenson@redhat.com>
6204
6205 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6206 gdb_assert.
6207 (i386_dr_low_get_addr): Remove vague comment.
6208 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6209 gdb_assert.
6210
38e08fca
GB
62112014-08-28 Gary Benson <gbenson@redhat.com>
6212
6213 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6214 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6215 internal_error.
6216 (linux_resume_one_lwp): Likewise.
6217 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6218 gdb_assert.
6219 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6220 with internal_error.
6221 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6222 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6223 (find_register_by_name): Replace fatal with internal_error.
6224 (find_regno): Likewise.
6225 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6226 * thread-db.c (thread_db_create_event): Likewise.
6227 (thread_db_load_search): Likewise.
6228 (try_thread_db_load_1): Likewise.
6229 * tracepoint.c (get_jump_space_head): Replace fatal with
6230 internal_error.
6231 (claim_trampoline_space): Likewise.
6232 (have_fast_tracepoint_trampoline_buffer): Likewise.
6233 (cmd_qtstart): Likewise.
6234 (stop_tracing): Likewise.
6235 (fast_tracepoint_collecting): Likewise.
6236 (target_malloc): Likewise.
6237 (download_tracepoint): Likewise.
6238 (download_trace_state_variables): Replace check with gdb_assert.
6239 (upload_fast_traceframes): Replace fatal with internal_error.
6240
34abf635
GB
62412014-08-19 Tom Tromey <tromey@redhat.com>
6242 Gary Benson <gbenson@redhat.com>
6243
6244 * Makefile.in (SFILES): Add common/common-debug.c.
6245 (OBS): Add common-debug.o.
6246 (common-debug.o): New rule.
6247 * debug.h (debug_printf): Don't declare.
6248 * debug.c (debug_printf): Renamed and rewritten as...
6249 (debug_vprintf): New function.
6250
f6e94d78
GB
62512014-08-19 Gary Benson <gbenson@redhat.com>
6252
6253 * utils.h: Do not include print-utils.h.
6254
9239eeab
GB
62552014-08-19 Tom Tromey <tromey@redhat.com>
6256 Gary Benson <gbenson@redhat.com>
6257
6258 * server.h: Add static assertion.
6259 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6260
ef87c8bb
GB
62612014-08-19 Tom Tromey <tromey@redhat.com>
6262 Gary Benson <gbenson@redhat.com>
6263
6264 * Makefile.in (SFILES): Add common/errors.c.
6265 (OBS): Add errors.o.
6266 (IPA_OBS): Add errors-ipa.o.
6267 (errors.o): New rule.
6268 (errors-ipa.o): Likewise.
6269 * utils.h (perror_with_name, error, warning): Don't declare.
6270 * utils.c (warning): Renamed and rewritten as...
6271 (vwarning): New function.
6272 (error): Renamed and rewritten as...
6273 (verror): New function.
6274 (internal_error): Renamed and rewritten as...
6275 (internal_verror): New function.
6276
bb974a24
GB
62772014-08-07 Gary Benson <gbenson@redhat.com>
6278
6279 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6280 * configure: Regenerate.
6281 * config.in: Likewise.
6282 * server.h: Do not include errno.h.
6283 * event-loop.c: Likewise.
6284 * hostio-errno.c: Likewise.
6285 * linux-low.c: Likewise.
6286 * remote-utils.c: Likewise.
6287 * spu-low.c: Likewise.
6288 * utils.c: Likewise.
6289 * gdbreplay.c: Unconditionally include errno.h.
6290
6d3d12eb
GB
62912014-08-07 Gary Benson <gbenson@redhat.com>
6292
6293 * server.h: Do not include string.h.
6294 * event-loop.c: Likewise.
6295 * linux-low.c: Likewise.
6296 * regcache.c: Likewise.
6297 * remote-utils.c: Likewise.
6298 * spu-low.c: Likewise.
6299 * utils.c: Likewise.
6300
dccbb609
GB
63012014-08-07 Gary Benson <gbenson@redhat.com>
6302
6303 * server.h: Do not include gdb_assert.h.
6304
e76df0d0
GB
63052014-08-07 Gary Benson <gbenson@redhat.com>
6306
6307 * server.h: Do not include common-utils.h.
6308
4cb9c816
GB
63092014-08-07 Gary Benson <gbenson@redhat.com>
6310
6311 * server.h: Do not include ptid.h.
6312 * notif.h: Likewise.
6313
3995eeee
GB
63142014-08-07 Gary Benson <gbenson@redhat.com>
6315
6316 * server.h: Do not include gdb_locale.h.
6317
cb9f1a9b
GB
63182014-08-07 Gary Benson <gbenson@redhat.com>
6319
6320 * server.h: Do not include gdb/signals.h.
6321 * win32-low.c: Likewise.
6322
a5fceff8
GB
63232014-08-07 Gary Benson <gbenson@redhat.com>
6324
6325 * server.h: Do not include pathmax.h.
6326
b9391142
GB
63272014-08-07 Gary Benson <gbenson@redhat.com>
6328
6329 * server.h: Do not include libiberty.h.
6330 * linux-bfin-low.c: Likewise.
6331
0e443c87
GB
63322014-08-07 Gary Benson <gbenson@redhat.com>
6333
6334 * server.h: Do not include ansidecl.h.
6335
8ebb3f56
GB
63362014-08-07 Gary Benson <gbenson@redhat.com>
6337
6338 * linux-x86-low.c: Do not include stddef.h.
6339 * lynx-ppc-low.c: Likewise.
6340 * tracepoint.c: Likewise.
6341
8980bdf6
GB
63422014-08-07 Gary Benson <gbenson@redhat.com>
6343
6344 * server.h: Do not include stdarg.h.
6345 * nto-low.c: Likewise.
6346
d7096f71
GB
63472014-08-07 Gary Benson <gbenson@redhat.com>
6348
6349 * server.h: Do not include stdlib.h.
6350 * inferiors.c: Likewise.
6351 * linux-low.c: Likewise.
6352 * regcache.c: Likewise.
6353 * spu-low.c: Likewise.
6354 * tracepoint.c: Likewise.
6355 * utils.c: Likewise.
6356
d02f550d
GB
63572014-08-07 Gary Benson <gbenson@redhat.com>
6358
6359 * server.h: Do not include stdio.h.
6360 * linux-low.c: Likewise.
6361 * remote-utils.c: Likewise.
6362 * spu-low.c: Likewise.
6363 * utils.c: Likewise.
6364 * wincecompat.c: Likewise.
6365
87f6c4e3
GB
63662014-08-06 Gary Benson <gbenson@redhat.com>
6367
6368 * regcache.c (init_register_cache): Move conditionals inside if.
6369
7089dca4
GB
63702014-08-06 Gary Benson <gbenson@redhat.com>
6371
6372 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6373
462f517e
GB
63742014-07-31 Gary Benson <gbenson@redhat.com>
6375
6376 * ax.h: Do not include server.h.
6377 * gdbthread.h: Likewise.
6378 * lynx-low.h: Likewise.
6379 * notif.h: Likewise.
6380
976411d6
GB
63812014-07-30 Gary Benson <gbenson@redhat.com>
6382
6383 * server.h: Include common-defs.h.
6384 Do not include config.h or build-gnulib-gdbserver/config.h.
6385
d41f6d8e
GB
63862014-07-30 Gary Benson <gbenson@redhat.com>
6387
6388 * hostio-errno.c: Move server.h to top of includes list.
6389 * inferiors.c: Likewise.
6390 * linux-x86-low.c: Likewise.
6391 * notif.c: Include server.h.
6392
314c6a35
TT
63932014-07-24 Tom Tromey <tromey@redhat.com>
6394 Gary Benson <gbenson@redhat.com>
6395
6396 * server.h (CORE_ADDR): Now unsigned.
6397
69ff6be5
PA
63982014-07-16 Pedro Alves <palves@redhat.com>
6399
6400 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6401
ce9e3fe7
PA
64022014-07-15 Pedro Alves <palves@redhat.com>
6403
6404 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6405 copy.
6406
e76126e8
PA
64072014-07-11 Pedro Alves <palves@redhat.com>
6408
6409 * linux-low.c (kill_wait_lwp): New function, based on
6410 kill_one_lwp_callback, but use my_waitpid directly.
6411 (kill_one_lwp_callback, linux_kill): Use it.
6412
8e9db26e
PA
64132014-06-23 Pedro Alves <palves@redhat.com>
6414
6415 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6416 before setting DR0..DR3.
6417
698b3e08
GB
64182014-06-20 Gary Benson <gbenson@redhat.com>
6419
6420 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6421 * configure: Regenerated.
6422 * config.in: Likewise.
6423
125f8a3d
GB
64242014-06-20 Gary Benson <gbenson@redhat.com>
6425
6426 * Makefile.in (SFILES): Update locations for files moved
6427 from common to nat.
6428 (object file files): Reordered.
6429
42995dbd
GB
64302014-06-20 Gary Benson <gbenson@redhat.com>
6431
6432 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6433 (i386_dr_low_set_addr): Likewise.
6434 (i386_dr_low_get_addr): Likewise.
6435 (i386_dr_low_can_set_control): Likewise.
6436 (i386_dr_low_set_control): Likewise.
6437 (i386_dr_low_get_control): Likewise.
6438 (i386_dr_low_get_status): Likewise.
6439 (i386_get_debug_register_length): Likewise.
6440 * linux-x86-low.c (i386_dr_low_set_addr):
6441 Changed signature. Made static.
6442 (i386_dr_low_get_addr): Likewise.
6443 (i386_dr_low_set_control): Likewise.
6444 (i386_dr_low_get_control): Likewise.
6445 (i386_dr_low_get_status): Likewise.
6446 (i386_dr_low): New global variable.
6447 * win32-i386-low.c (i386_dr_low_set_addr):
6448 Changed signature. Made static.
6449 (i386_dr_low_get_addr): Likewise.
6450 (i386_dr_low_set_control): Likewise.
6451 (i386_dr_low_get_control): Likewise.
6452 (i386_dr_low_get_status): Likewise.
6453 (i386_dr_low): New global variable.
6454
e1d2394b
MS
64552014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6456
6457 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6458 * Makefile.in (AR, AR_FLAGS): Define.
6459 * configure: Regenerate.
6460
3a8ee006
GB
64612014-06-19 Gary Benson <gbenson@redhat.com>
6462
6463 * Makefile.in (i386-dregs.o): New rule.
6464 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6465 * i386-low.c (target.h): Remove include.
6466 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6467 (DR_CONTROL_SHIFT): Likewise.
6468 (DR_CONTROL_SIZE): Likewise.
6469 (DR_RW_EXECUTE): Likewise.
6470 (DR_RW_WRITE): Likewise.
6471 (DR_RW_READ): Likewise.
6472 (DR_RW_IORW): Likewise.
6473 (DR_LEN_1): Likewise.
6474 (DR_LEN_2): Likewise.
6475 (DR_LEN_4): Likewise.
6476 (DR_LEN_8): Likewise.
6477 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6478 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6479 (DR_ENABLE_SIZE): Likewise.
6480 (DR_LOCAL_SLOWDOWN): Likewise.
6481 (DR_GLOBAL_SLOWDOWN): Likewise.
6482 (DR_CONTROL_RESERVED): Likewise.
6483 (I386_DR_CONTROL_MASK): Likewise.
6484 (I386_DR_VACANT): Likewise.
6485 (I386_DR_LOCAL_ENABLE): Likewise.
6486 (I386_DR_GLOBAL_ENABLE): Likewise.
6487 (I386_DR_DISABLE): Likewise.
6488 (I386_DR_SET_RW_LEN): Likewise.
6489 (I386_DR_GET_RW_LEN): Likewise.
6490 (I386_DR_WATCH_HIT): Likewise.
6491 (i386_wp_op_t): Likewise.
6492 (i386_show_dr): Likewise.
6493 (i386_length_and_rw_bits): Likewise.
6494 (i386_insert_aligned_watchpoint): Likewise.
6495 (i386_remove_aligned_watchpoint): Likewise.
6496 (i386_handle_nonaligned_watchpoint): Likewise.
6497 i386_update_inferior_debug_regs(): Likewise.
6498 (i386_dr_insert_watchpoint): Likewise.
6499 (i386_dr_remove_watchpoint): Likewise.
6500 (i386_dr_region_ok_for_watchpoint): Likewise.
6501 (i386_dr_stopped_data_address): Likewise.
6502 (i386_dr_stopped_by_watchpoint): Likewise.
6503
8f26655c
GB
65042014-06-19 Gary Benson <gbenson@redhat.com>
6505
6506 * i386-low.c (i386_dr_show): Renamed to
6507 i386_show_dr and made static. All uses updated.
6508 (i386_dr_length_and_rw_bits): Renamed to
6509 i386_length_and_rw_bits and made static.
6510 All uses updated.
6511 (i386_dr_insert_aligned_watchpoint): Renamed to
6512 i386_insert_aligned_watchpoint and made static.
6513 All uses updated.
6514 (i386_dr_remove_aligned_watchpoint): Renamed to
6515 i386_remove_aligned_watchpoint and made static.
6516 All uses updated.
6517 (i386_dr_update_inferior_debug_regs): Renamed to
6518 i386_update_inferior_debug_regs and made static.
6519 All uses updated.
6520
b9228891
GB
65212014-06-18 Gary Benson <gbenson@redhat.com>
6522
5171def3
GB
6523 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6524 (i386_dr_low_can_set_control): Likewise.
6525 (i386_get_debug_register_length): Likewise.
6526 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6527 (i386_dr_low_can_set_control): Likewise.
6528 (i386_get_debug_register_length): Likewise.
6529
65302014-06-17 Gary Benson <gbenson@redhat.com>
6531
b9228891
GB
6532 * i386-low.h (i386-dregs.h): New include.
6533 (DR_FIRSTADDR): Now in i386-dregs.h.
6534 (DR_LASTADDR): Likewise.
6535 (DR_NADDR): Likewise.
6536 (DR_STATUS): Likewise.
6537 (DR_CONTROL): Likewise.
6538 (i386_debug_reg_state): Likewise.
6539 (i386_dr_insert_watchpoint): Likewise.
6540 (i386_dr_remove_watchpoint): Likewise.
6541 (i386_dr_region_ok_for_watchpoint): Likewise.
6542 (i386_dr_stopped_data_address): Likewise.
6543 (i386_dr_stopped_by_watchpoint): Likewise.
6544 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6545
4be83cc2
GB
65462014-06-18 Gary Benson <gbenson@redhat.com>
6547
6548 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6549 i386_dr_insert_watchpoint.
6550 (i386_low_remove_watchpoint): Renamed to
6551 i386_dr_remove_watchpoint.
6552 (i386_low_region_ok_for_watchpoint): Renamed to
6553 i386_dr_region_ok_for_watchpoint.
6554 (i386_low_stopped_data_address): Renamed to
6555 i386_dr_stopped_data_address.
6556 (i386_low_stopped_by_watchpoint): Renamed to
6557 i386_dr_stopped_by_watchpoint.
6558 * i386-low.c (i386_show_dr): Renamed to
6559 i386_dr_show and made nonstatic. All uses updated.
6560 (i386_length_and_rw_bits): Renamed to
6561 i386_dr_length_and_rw_bits and made nonstatic.
6562 All uses updated.
6563 (i386_insert_aligned_watchpoint): Renamed to
6564 i386_dr_insert_aligned_watchpoint and made nonstatic.
6565 All uses updated.
6566 (i386_remove_aligned_watchpoint): Renamed to
6567 i386_dr_remove_aligned_watchpoint and made nonstatic.
6568 All uses updated.
6569 (i386_update_inferior_debug_regs): Renamed to
6570 i386_dr_update_inferior_debug_regs and made nonstatic.
6571 All uses updated.
6572 (i386_low_insert_watchpoint): Renamed to
6573 i386_dr_insert_watchpoint. All uses updated.
6574 (i386_low_remove_watchpoint): Renamed to
6575 i386_dr_remove_watchpoint. All uses updated.
6576 (i386_low_region_ok_for_watchpoint): Renamed to
6577 i386_dr_region_ok_for_watchpoint. All uses updated.
6578 (i386_low_stopped_data_address): Renamed to
6579 i386_dr_stopped_data_address. All uses updated.
6580 (i386_low_stopped_by_watchpoint): Renamed to
6581 i386_dr_stopped_by_watchpoint. All uses updated.
6582
131aa0d4
GB
65832014-06-18 Gary Benson <gbenson@redhat.com>
6584
6585 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6586 (i386_dr_low_can_set_control): Likewise.
6587 (i386_insert_aligned_watchpoint): New check.
6588
d9305f7f
GB
65892014-06-18 Gary Benson <gbenson@redhat.com>
6590
6591 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6592 Renamed to state.
6593
e927c9fc
GB
65942014-06-18 Gary Benson <gbenson@redhat.com>
6595
6596 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6597 instead of fatal and error.
6598 (i386_handle_nonaligned_watchpoint): Likewise.
6599
1b6d4134
GB
66002014-06-18 Gary Benson <gbenson@redhat.com>
6601
6602 * i386-low.c (i386_get_debug_register_length): New macro.
6603 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6604 (i386_show_dr): Use debug_printf instead of fprintf. Use
6605 phex to format values.
6606
6e62758f
GB
66072014-06-18 Gary Benson <gbenson@redhat.com>
6608
6609 * i386-low.h: Comment changes.
6610 * i386-low.c: Likewise.
6611
fc6e2f03
GB
66122014-06-18 Gary Benson <gbenson@redhat.com>
6613
6614 * i386-low.c: Whitespace changes.
6615
f9d1eeed
TT
66162014-06-12 Tom Tromey <tromey@redhat.com>
6617
6618 * utils.c (freeargv): Remove.
6619
0b04e523
TT
66202014-06-12 Tom Tromey <tromey@redhat.com>
6621
6622 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6623 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6624 (parse_debug_format_options): Likewise.
6625 (gdbserver_usage): Likewise.
6626 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6627 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6628 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6629 against libiberty.
6630 ($(LIBGNU)): Depend on libiberty.
6631 (all-lib): Recurse into all subdirs.
6632 (install-only): Invoke "install" target in subdirs.
6633 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6634 targets.
6635 * configure: Rebuild.
6636 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6637 for vasprintf, vsnprintf, or gettimeofday.
6638 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6639 srv_tgtobj.
6640
270c9937
JB
66412014-06-05 Joel Brobecker <brobecker@adacore.com>
6642
6643 * development.sh: Delete.
6644 * Makefile.in (config.status): Adjust dependency on development.sh.
6645 * configure.ac: Adjust development.sh source call.
6646 * configure: Regenerate.
6647
0a261ed8
PA
66482014-06-02 Pedro Alves <palves@redhat.com>
6649
6650 * ax.c (gdb_free_agent_expr): New function.
6651 * ax.h (gdb_free_agent_expr): New declaration.
6652 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6653 list.
6654 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6655 static.
6656 (clear_breakpoint_conditions_and_commands): New function.
6657 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6658 (clear_breakpoint_conditions_and_commands): New declaration.
6659
e9dae05e
RR
66602014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6661
6662 * linux-aarch64-low.c (asm/ptrace.h): Include.
6663
5876f503
JK
66642014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6665
6666 Fix TLS access for -static -pthread.
6667 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6668 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6669 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6670
802e8e6d
PA
66712014-05-20 Pedro Alves <palves@redhat.com>
6672
6673 * linux-aarch64-low.c (aarch64_insert_point)
6674 (aarch64_remove_point): No longer check whether the type is
6675 supported here. Adjust to new interface.
6676 (the_low_target): Install aarch64_supports_z_point_type as
6677 supports_z_point_type method.
6678 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6679 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6680 instead of a Z packet char. Adjust.
6681 (arm_supports_z_point_type): New function.
6682 (arm_insert_point, arm_remove_point): Adjust to new interface.
6683 (the_low_target): Install arm_supports_z_point_type.
6684 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6685 (cris_insert_point, cris_remove_point): Adjust to new interface.
6686 Don't check whether the type is supported here.
6687 (the_low_target): Install cris_supports_z_point_type.
6688 * linux-low.c (linux_supports_z_point_type): New function.
6689 (linux_insert_point, linux_remove_point): Adjust to new interface.
6690 * linux-low.h (struct linux_target_ops) <insert_point,
6691 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6692 raw_breakpoint pointer parameter.
6693 <supports_z_point_type>: New method.
6694 * linux-mips-low.c (mips_supports_z_point_type): New function.
6695 (mips_insert_point, mips_remove_point): Adjust to new interface.
6696 Use mips_supports_z_point_type.
6697 (the_low_target): Install mips_supports_z_point_type.
6698 * linux-ppc-low.c (the_low_target): Install NULL as
6699 supports_z_point_type method.
6700 * linux-s390-low.c (the_low_target): Install NULL as
6701 supports_z_point_type method.
6702 * linux-sparc-low.c (the_low_target): Install NULL as
6703 supports_z_point_type method.
6704 * linux-x86-low.c (x86_supports_z_point_type): New function.
6705 (x86_insert_point): Adjust to new insert_point interface. Use
6706 insert_memory_breakpoint. Adjust to new
6707 i386_low_insert_watchpoint interface.
6708 (x86_remove_point): Adjust to remove_point interface. Use
6709 remove_memory_breakpoint. Adjust to new
6710 i386_low_remove_watchpoint interface.
6711 (the_low_target): Install x86_supports_z_point_type.
6712 * lynx-low.c (lynx_target_ops): Install NULL as
6713 supports_z_point_type callback.
6714 * nto-low.c (nto_supports_z_point_type): New.
6715 (nto_insert_point, nto_remove_point): Adjust to new interface.
6716 (nto_target_ops): Install nto_supports_z_point_type.
6717 * mem-break.c: Adjust intro comment.
6718 (struct raw_breakpoint) <raw_type, size>: New fields.
6719 <inserted>: Update comment.
6720 <shlib_disabled>: Delete field.
6721 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6722 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6723 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6724 (raw_bkpt_type_to_target_hw_bp_type): New function.
6725 (find_enabled_raw_code_breakpoint_at): New function.
6726 (find_raw_breakpoint_at): New type and size parameters. Use them.
6727 (insert_memory_breakpoint): New function, based off
6728 set_raw_breakpoint_at.
6729 (remove_memory_breakpoint): New function.
6730 (set_raw_breakpoint_at): Reimplement.
6731 (set_breakpoint): New, based on set_breakpoint_at.
6732 (set_breakpoint_at): Reimplement.
6733 (delete_raw_breakpoint): Go through the_target->remove_point
6734 instead of assuming memory breakpoints.
6735 (find_gdb_breakpoint_at): Delete.
6736 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6737 (find_gdb_breakpoint): New function.
6738 (set_gdb_breakpoint_at): Delete.
6739 (z_type_supported): New function.
6740 (set_gdb_breakpoint_1): New function, loosely based off
6741 set_gdb_breakpoint_at.
6742 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6743 (delete_gdb_breakpoint_at): Delete.
6744 (delete_gdb_breakpoint_1): New function, loosely based off
6745 delete_gdb_breakpoint_at.
6746 (delete_gdb_breakpoint): New function.
6747 (clear_gdb_breakpoint_conditions): Rename to ...
6748 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6749 breakpoint.
6750 (add_condition_to_breakpoint): Make static.
6751 (add_breakpoint_condition): Take a struct breakpoint pointer
6752 instead of an address. Adjust.
6753 (gdb_condition_true_at_breakpoint): Rename to ...
6754 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6755 z_type parameter.
6756 (gdb_condition_true_at_breakpoint): Reimplement.
6757 (add_breakpoint_commands): Take a struct breakpoint pointer
6758 instead of an address. Adjust.
6759 (gdb_no_commands_at_breakpoint): Rename to ...
6760 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6761 parameter. Return true if no breakpoint was found. Change debug
6762 output.
6763 (gdb_no_commands_at_breakpoint): Reimplement.
6764 (run_breakpoint_commands): Rename to ...
6765 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6766 and change return type to boolean.
6767 (run_breakpoint_commands): New function.
6768 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6769 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6770 breakpoint. Go through the_target->remove_point instead of
6771 assuming memory breakpoint.
6772 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6773 software and hardware breakpoints.
6774 (reinsert_raw_breakpoint): Go through the_target->insert_point
6775 instead of assuming memory breakpoint.
6776 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6777 software and hardware breakpoints.
6778 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6779 Check both software and hardware breakpoints.
6780 (validate_inserted_breakpoint): Assert the breakpoint is a
6781 software breakpoint. Set the inserted flag to -1 instead of
6782 setting shlib_disabled.
6783 (delete_disabled_breakpoints): Adjust.
6784 (validate_breakpoints): Only validate software breakpoints.
6785 Adjust to inserted flag change.
6786 (check_mem_read, check_mem_write): Skip breakpoint types other
6787 than software breakpoints. Adjust to inserted flag change.
6788 * mem-break.h (enum raw_bkpt_type): New enum.
6789 (raw_breakpoint, struct process_info): Forward declare.
6790 (Z_packet_to_target_hw_bp_type): Delete declaration.
6791 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6792 (set_gdb_breakpoint, delete_gdb_breakpoint)
6793 (clear_breakpoint_conditions): New declarations.
6794 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6795 (breakpoint_inserted_here): Update comment.
6796 (add_breakpoint_condition, add_breakpoint_commands): Replace
6797 address parameter with a breakpoint pointer parameter.
6798 (gdb_breakpoint_here): Update comment.
6799 (delete_gdb_breakpoint_at): Delete.
6800 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6801 * server.c (process_point_options): Take a struct breakpoint
6802 pointer instead of an address. Adjust.
6803 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6804 delete_gdb_breakpoint.
6805 * spu-low.c (spu_target_ops): Install NULL as
6806 supports_z_point_type method.
6807 * target.h: Include mem-break.h.
6808 (struct target_ops) <prepare_to_access_memory>: Update comment.
6809 <supports_z_point_type>: New field.
6810 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6811 instead of a char. Also take a raw breakpoint pointer.
6812 * win32-arm-low.c (the_low_target): Install NULL as
6813 supports_z_point_type.
6814 * win32-i386-low.c (i386_supports_z_point_type): New function.
6815 (i386_insert_point, i386_remove_point): Adjust to new interface.
6816 (the_low_target): Install i386_supports_z_point_type.
6817 * win32-low.c (win32_supports_z_point_type): New function.
6818 (win32_insert_point, win32_remove_point): Adjust to new interface.
6819 (win32_target_ops): Install win32_supports_z_point_type.
6820 * win32-low.h (struct win32_target_ops):
6821 <supports_z_point_type>: New method.
6822 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6823 instead of a char. Also take a raw breakpoint pointer.
6824
932539e3
PA
68252014-05-20 Pedro Alves <palves@redhat.com>
6826
6827 * mem-break.h: Include break-common.h.
6828 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6829 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6830 (Z_packet_to_target_hw_bp_type): New declaration.
6831 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6832 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6833 (Z_PACKET_ACCESS_WP): Delete macros.
6834 (Z_packet_to_hw_type): Delete function.
6835 * i386-low.h: Don't include break-common.h here.
6836 (Z_packet_to_hw_type): Delete declaration.
6837 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6838 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6839 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6840 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6841 * linux-aarch64-low.c: Don't include break-common.h here.
6842 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6843 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6844 (Z_packet_to_target_hw_bp_type): Delete function.
6845 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6846 function.
6847 (mips_insert_point, mips_remove_point): Use
6848 Z_packet_to_target_hw_bp_type.
6849
4ff0d3d8
PA
68502014-05-20 Pedro Alves <palves@redhat.com>
6851
6852 * linux-aarch64-low.c: Include break-common.h.
6853 (enum target_point_type): Delete.
6854 (Z_packet_to_point_type): Rename to ...
6855 (Z_packet_to_target_hw_bp_type): ... this, and return a
6856 target_hw_bp_type instead.
6857 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6858 instead of an enum target_point_type.
6859 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6860 breakpoint type.
6861 (aarch64_dr_state_insert_one_point)
6862 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6863 (aarch64_handle_aligned_watchpoint)
6864 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6865 Take an enum target_hw_bp_type instead of an enum
6866 target_point_type.
6867 (aarch64_supports_z_point_type): New function.
6868 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6869 use Z_packet_to_target_hw_bp_type.
6870
786dc519
JB
68712014-05-20 Joel Brobecker <brobecker@adacore.com>
6872
6873 * configure.ac: Only use -Werror by default when DEVELOPMENT
6874 is true.
6875 * configure: Regenerate.
6876
9e0aa64f
JK
68772014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6878
6879 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6880 * linux-x86-low.c (X86_64_USER_REGS): New.
6881 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6882
2b577b92
YQ
68832014-04-28 Yao Qi <yao@codesourcery.com>
6884
6885 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6886 name.
6887
94611da2
PA
68882014-04-25 Pedro Alves <palves@redhat.com>
6889
6890 PR server/16255
6891 * linux-low.c (linux_attach_fail_reason_string): New function.
6892 (linux_attach_lwp): Delete.
6893 (linux_attach_lwp_1): Rename to ...
6894 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6895 argument. Remove "initial" parameter. Return int instead of
6896 void. Don't error or warn here.
6897 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6898 failure to attach to the tgid. Call warning when failing to
6899 attach to an lwp.
6900 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6901 argument. Remove "initial" parameter. Return int instead of
6902 void. Don't error or warn here.
6903 (linux_attach_fail_reason_string): New declaration.
6904 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6905 interface change. Use linux_attach_fail_reason_string.
6906
01f9f808
MS
69072014-04-24 Michael Sturm <michael.sturm@mintel.com>
6908 Walfred Tedeschi <walfred.tedeschi@intel.com>
6909
6910 * Makefile.in: Added rules to handle new files
6911 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6912 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6913 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6914 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6915 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6916 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6917 x32-avx512-linux.o.
6918 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6919 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6920 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6921 i386/x32-avx512.xml.
6922 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6923 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6924 i386/x32-avx512-linux.xml.
6925 * i387-fp.c (num_avx512_k_registers): New constant for number
6926 of K registers.
6927 (num_avx512_zmmh_low_registers): New constant for number of
6928 lower ZMM registers (0-15).
6929 (num_avx512_zmmh_high_registers): New constant for number of
6930 higher ZMM registers (16-31).
6931 (num_avx512_ymmh_registers): New contant for number of higher
6932 YMM registers (ymm16-31 added by avx521 on x86_64).
6933 (num_avx512_xmm_registers): New constant for number of higher
6934 XMM registers (xmm16-31 added by AVX512 on x86_64).
6935 (struct i387_xsave): Add space for AVX512 registers.
6936 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6937 Add code to handle AVX512 registers.
6938 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6939 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6940 prototypei from generated file.
6941 (tdesc_amd64_avx512_linux): Likewise.
6942 (init_registers_x32_avx512_linux): Likewise.
6943 (tdesc_x32_avx512_linux): Likewise.
6944 (init_registers_i386_avx512_linux): Likewise.
6945 (tdesc_i386_avx512_linux): Likewise.
6946 (x86_64_regmap): Add AVX512 registers.
6947 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6948 mask.
6949 (initialize_low_arch): Add code to initialize AVX512 registers.
6950
51aa91f9
PA
69512014-04-23 Pedro Alves <palves@redhat.com>
6952
6953 * mem-break.c (find_gdb_breakpoint_at): Make static.
6954 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6955
a4165e94
PA
69562014-04-23 Pedro Alves <palves@redhat.com>
6957
6958 * i386-low.c: Don't include break-common.h here.
6959 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6960 prototype to take target_hw_bp_type as argument instead of a Z
6961 packet char.
6962 * i386-low.h: Include break-common.h here.
6963 (Z_packet_to_hw_type): Declare.
6964 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6965 prototypes.
6966 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6967 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6968 (x86_remove_point): Convert the packet number to a
6969 target_hw_bp_type before calling i386_low_remove_watchpoint.
6970 * win32-i386-low.c (i386_insert_point): Convert the packet number
6971 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6972 (i386_remove_point): Convert the packet number to a
6973 target_hw_bp_type before calling i386_low_remove_watchpoint.
6974
b8acf843
PA
69752014-04-23 Pedro Alves <palves@redhat.com>
6976
6977 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6978
d708bcd1
PA
69792014-04-10 Pedro Alves <palves@redhat.com>
6980
6981 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6982 Check if the condition or command is NULL before checking if the
6983 breakpoint is known. On success, return true.
6984 * mem-break.h (add_breakpoint_condition): Document return.
6985 (add_breakpoint_commands): Add describing comment.
6986 * server.c (skip_to_semicolon): New function.
6987 (process_point_options): Use it.
6988
2eec7d5b
PA
69892014-04-09 Pedro Alves <palves@redhat.com>
6990
6991 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6992 to lwpid_of.
6993
fa96cb38
PA
69942014-02-27 Pedro Alves <palves@redhat.com>
6995
6996 PR 12702
6997 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6998 macros.
6999 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7000 output.
7001 (last_thread_of_process_p): Take a PID argument instead of a
7002 thread pointer.
7003 (linux_wait_for_lwp): Delete.
7004 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7005 functions.
7006 (linux_low_filter_event): New function, party factored out from
7007 linux_wait_for_event.
7008 (linux_wait_for_event): Rename to ...
7009 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7010 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7011 sigsuspend. Check for zombie leaders.
7012 (linux_wait_for_event): Reimplement as wrapper around
7013 linux_wait_for_event_filtered.
7014 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7015 a normal or signal exit is seen, it's the whole process exiting.
7016 (wait_for_sigstop): No longer a for_each_inferior callback.
7017 Rewrite on top of linux_wait_for_event_filtered.
7018 (stop_all_lwps): Call wait_for_sigstop directly.
7019 * server.c (resume, handle_target_event): Handle
7020 TARGET_WAITKIND_NO_RESUMED.
7021
d763de10
JB
70222014-02-26 Joel Brobecker <brobecker@adacore.com>
7023
7024 * win32-low.c (psapi_get_dll_name,
7025 * win32_CreateToolhelp32Snapshot): Delete.
7026 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7027 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7028 Delete.
7029 (handle_load_dll): Add function description.
7030 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7031
850a0f76
JB
70322014-02-26 Joel Brobecker <brobecker@adacore.com>
7033
7034 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7035 Add comment.
7036 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7037 base address when calling win32_add_one_solib.
7038 (handle_load_dll): Delete local variable load_addr.
7039 Remove 0x1000 offset applied to DLL base address when calling
7040 win32_add_one_solib.
7041 (handle_unload_dll): Add comment.
7042
f25b3fc3
JB
70432014-02-26 Joel Brobecker <brobecker@adacore.com>
7044
7045 * win32-low.c (win32_add_all_dlls): Renames
7046 win32_ensure_ntdll_loaded. Rewrite function documentation.
7047 Adjust implementation to always load all DLLs.
7048 Add 0x1000 offset to DLL base address when calling
7049 win32_add_one_solib.
7050 (child_initialization_done): New static global.
7051 (do_initial_child_stuff): Set child_initialization_done to
7052 zero during child initialization, and 1 after. Replace call
7053 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7054 Add comment.
7055 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7056 (handle_unload_dll): Add function documentation.
7057 (get_child_debug_event): Ignore load and unload DLL events
7058 during child initialization.
7059
d86d4aaf
DE
70602014-02-20 Doug Evans <dje@google.com>
7061
3bc32da3 7062 Remove global all_lwps.
d86d4aaf
DE
7063 * inferiors.h (ptid_of): Move here from linux-low.h.
7064 (pid_of, lwpid_of): Ditto.
7065 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7066 parameter is a struct thread_info * now.
7067 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7068 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7069 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7070 directly.
7071 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7072 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7073 * linux-arm-low.c (update_registers_callback): Update, "entry"
7074 parameter is a struct thread_info * now.
7075 Fetch lwpid from current_inferior directly.
7076 (arm_insert_point): Pass &all_threads to find_inferior instead of
7077 &all_lwps.
7078 (arm_remove_point): Ditto.
7079 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7080 (arm_prepare_to_resume): Fetch pid from thread.
7081 (arm_read_description): Fetch lwpid from current_inferior directly.
7082 * linux-low.c (all_lwps): Delete.
7083 (delete_lwp): Delete call to remove_inferior.
7084 (handle_extended_wait): Fetch lwpid from thread.
7085 (add_lwp): Don't set lwp->entry.id. Remove call to
7086 add_inferior_to_list.
7087 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7088 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7089 (kill_one_lwp_callback): Ditto.
7090 (linux_kill): Don't dereference NULL pointer.
7091 Fetch ptid,lwpid from thread.
7092 (get_detach_signal): Fetch ptid from thread.
7093 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7094 Simplify call to regcache_invalidate_thread.
7095 (delete_lwp_callback): Update, "entry" parameter is a
7096 struct thread_info * now. Fetch pid from thread.
7097 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7098 (status_pending_p_callback): Update, "entry" parameter is a
7099 struct thread_info * now. Fetch ptid from thread.
7100 (find_lwp_pid): Update, "entry" parameter is a
7101 struct thread_info * now.
7102 (linux_wait_for_lwp): Fetch pid from thread.
7103 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7104 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7105 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7106 (dequeue_one_deferred_signal): Ditto.
7107 (cancel_breakpoint): Fetch ptid from current_inferior.
7108 (linux_wait_for_event): Pass &all_threads to find_inferior,
7109 not &all_lwps. Fetch ptid, lwpid from thread.
7110 (count_events_callback): Update, "entry" parameter is a
7111 struct thread_info * now.
7112 (select_singlestep_lwp_callback): Ditto.
7113 (select_event_lwp_callback): Ditto.
7114 (cancel_breakpoints_callback): Ditto.
7115 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7116 not &all_lwps.
7117 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7118 (unsuspend_one_lwp): Update, "entry" parameter is a
7119 struct thread_info * now.
7120 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7121 not &all_lwps.
7122 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7123 Fetch lwpid from thread, not lwp.
7124 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7125 Pass &all_threads to find_inferior, not &all_lwps.
7126 (send_sigstop): Fetch lwpid from thread, not lwp.
7127 (send_sigstop_callback): Update, "entry" parameter is a
7128 struct thread_info * now.
7129 (suspend_and_send_sigstop_callback): Ditto.
7130 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7131 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7132 struct thread_info * now.
7133 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7134 from thread, lwp.
7135 (lwp_running): Update, "entry" parameter is a
7136 struct thread_info * now.
7137 (stop_all_lwps): Fetch ptid from thread.
7138 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7139 (linux_resume_one_lwp): Fetch lwpid from thread.
7140 (linux_set_resume_request): Update, "entry" parameter is a
7141 struct thread_info * now. Fetch pid, lwpid from thread.
7142 (resume_status_pending_p): Update, "entry" parameter is a
7143 struct thread_info * now.
7144 (need_step_over_p): Ditto. Fetch lwpid from thread.
7145 (start_step_over): Fetch lwpid from thread.
7146 (linux_resume_one_thread): Update, "entry" parameter is a
7147 struct thread_info * now. Fetch lwpid from thread.
7148 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7149 (proceed_one_lwp): Update, "entry" parameter is a
7150 struct thread_info * now. Fetch lwpid from thread.
7151 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7152 struct thread_info * now.
7153 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7154 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7155 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7156 directly.
7157 (regsets_store_inferior_registers): Ditto.
7158 (fetch_register, store_register): Ditto.
7159 (linux_read_memory, linux_write_memory): Ditto.
7160 (linux_request_interrupt): Ditto.
7161 (linux_read_auxv): Ditto.
7162 (linux_xfer_siginfo): Ditto.
7163 (linux_qxfer_spu): Ditto.
7164 (linux_qxfer_libraries_svr4): Ditto.
7165 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7166 moved to inferiors.h.
7167 (get_lwp): Delete.
7168 (get_thread_lwp): Update.
7169 (struct lwp_info): Delete member "entry". Simplify comment for
7170 member "thread".
7171 (all_lwps): Delete.
7172 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7173 current_inferior directly.
7174 (update_watch_registers_callback): Update, "entry" parameter is a
7175 struct thread_info * now. Fetch pid from thread.
7176 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7177 (mips_insert_point): Fetch lwpid from current_inferior.
7178 Pass &all_threads to find_inferior, not &all_lwps.
7179 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7180 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7181 directly.
7182 (mips_stopped_data_address): Ditto.
7183 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7184 directly.
7185 * linux-tile-low.c (tile_arch_setup): Ditto.
7186 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7187 (update_debug_registers_callback): Update, "entry" parameter is a
7188 struct thread_info * now. Fetch pid from thread.
7189 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7190 Pass &all_threads to find_inferior, not &all_lwps.
7191 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7192 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7193 Pass &all_threads to find_inferior, not &all_lwps.
7194 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7195 (i386_dr_low_get_status): Ditto.
7196 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7197 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7198 (x86_linux_read_description): Ditto.
7199 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7200
3b8361aa
DE
72012014-02-20 Doug Evans <dje@google.com>
7202
7203 * inferiors.c (get_first_inferior): Fix buglet.
7204
f7667f0d
DE
72052014-02-19 Doug Evans <dje@google.com>
7206
7207 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7208 * inferiors.c (add_thread): Change result type to struct thread_info *.
7209 All callers updated.
7210 (add_lwp): Call add_thread here instead of in callers.
7211 All callers updated.
7212 * linux-low.h (get_lwp_thread): Rewrite.
7213 (struct lwp_info): New member "thread".
7214
b3312d80
DE
72152014-02-19 Doug Evans <dje@google.com>
7216
7217 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7218 All callers updated.
7219
ecc6f45c
DE
72202014-02-19 Doug Evans <dje@google.com>
7221
7222 * inferiors.c (add_thread): Fix whitespace.
7223
649ebbca
DE
72242014-02-19 Doug Evans <dje@google.com>
7225
7226 * dll.c (clear_dlls): Replace accessing list implemention details
7227 with API function.
7228 * gdbthread.h (get_first_thread): Declare.
7229 * inferiors.c (for_each_inferior_with_data): New function.
7230 (get_first_thread): New function.
7231 (find_thread_ptid): Simplify.
7232 (get_first_inferior): New function.
7233 (clear_list): Delete.
7234 (one_inferior_p): New function.
7235 (clear_inferior_list): New function.
7236 (clear_inferiors): Update.
7237 * inferiors.h (for_each_inferior_with_data): Declare.
7238 (clear_inferior_list): Declare.
7239 (one_inferior_p): Declare.
7240 (get_first_inferior): Declare.
7241 * linux-low.c (linux_wait_for_event): Replace accessing list
7242 implemention details with API function.
7243 * server.c (target_running): Ditto.
7244 (accumulate_file_name_length): New function.
7245 (emit_dll_description): New function.
7246 (handle_qxfer_libraries): Replace accessing list implemention
7247 details with API function.
7248 (handle_qxfer_threads_worker): New function.
7249 (handle_qxfer_threads_proper): Replace accessing list implemention
7250 details with API function.
7251 (handle_query): Ditto.
7252 (visit_actioned_threads_callback_ftype): New typedef.
7253 (visit_actioned_threads_data): New struct.
7254 (visit_actioned_threads): Rewrite to be find_inferior callback.
7255 (resume): Call find_inferior.
7256 (handle_status): Replace accessing list implemention
7257 details with API function.
7258 (process_serial_event): Replace accessing list implemention details
7259 with API function.
7260 * target.c (set_desired_inferior): Replace accessing list implemention
7261 details with API function.
7262 * tracepoint.c (same_process_p): New function.
7263 (gdb_agent_about_to_close): Replace accessing list implemention
7264 details with API function.
7265 * win32-low.c (child_delete_thread): Replace accessing list
7266 implemention details with API function.
7267 (match_dll_by_basename): New function.
7268 (dll_is_loaded_by_basename): New function.
7269 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7270 details call to dll_is_loaded_by_basename.
7271
80894984
DE
72722014-02-19 Doug Evans <dje@google.com>
7273
7274 * dll.h (struct dll_info): Add comment.
7275 * gdbthread.h (struct thread_info): Add comment.
7276 (current_ptid): Simplify.
7277 * inferiors.c (add_process): Update.
7278 (remove_process): Update.
7279 * inferiors.h (struct process_info): Rename member "head" to "entry".
7280 * linux-low.c (delete_lwp): Update.
7281 (add_lwp): Update.
7282 (last_thread_of_process_p): Update.
7283 (kill_one_lwp_callback, linux_kill): Update.
7284 (status_pending_p_callback): Update.
7285 (wait_for_sigstop): Update. Simplify read of ptid.
7286 (start_step_over): Update.
7287 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7288 (get_lwp_thread): Update.
7289 (struct lwp_info): Rename member "head" to "entry".
7290 * regcache.h (inferior_list_entry): Delete.
7291 * server.c (kill_inferior_callback): Update.
7292 (detach_or_kill_inferior_callback): Update.
7293 (print_started_pid): Update.
7294 (print_attached_pid): Update.
7295 (process_serial_event): Simplify read of ptid.
7296 * thread-db.c (thread_db_create_event): Update.
7297 (thread_db_get_tls_address): Update.
7298 * win32-low.c (current_inferior_ptid): Simplify.
7299
46917d26
TT
73002014-02-19 Tom Tromey <tromey@redhat.com>
7301
7302 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7303 argument.
7304 (target_supports_btrace): Update.
7305
0759a81e
YQ
73062014-02-14 Yao Qi <yao@codesourcery.com>
7307
7308 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7309 (rsp-low-ipa.o): New target.
7310
a7191e8b
TT
73112014-02-12 Tom Tromey <tromey@redhat.com>
7312
7313 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7314 convert_ascii_to_int.
7315 * regcache.c (registers_to_string): Likewise.
7316 * remote-utils.c (decode_M_packet): Likewise.
7317 * server.c (process_serial_event): Likewise.
7318
ff0e980e
TT
73192014-02-12 Tom Tromey <tromey@redhat.com>
7320
7321 * server.c (handle_query, handle_v_run): Use hex2bin, not
7322 unhexify.
7323 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7324
e9371aff
TT
73252014-02-12 Tom Tromey <tromey@redhat.com>
7326
7327 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7328 convert_int_to_ascii.
7329 * regcache.c (registers_to_string, collect_register_as_string):
7330 Likewise.
7331 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7332 Likewise.
7333 * server.c (process_serial_event): Likewise.
7334 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7335 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7336
971dc0b8
TT
73372014-02-12 Tom Tromey <tromey@redhat.com>
7338
7339 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7340 bin2hex, not hexify.
7341 * tracepoint.c (cmd_qtstatus): Likewise.
7342
0a822afb
TT
73432014-02-12 Tom Tromey <tromey@redhat.com>
7344
7345 * remote-utils.c (monitor_output): Pass explicit length to
7346 hexify.
7347
9c3d6531
TT
73482014-02-12 Tom Tromey <tromey@redhat.com>
7349
7350 * tracepoint.c: Include rsp-low.h.
7351 * server.c: Include rsp-low.h.
7352 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7353 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7354 declare.
7355 * remote-utils.c: Include rsp-low.h.
7356 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7357 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7358 (convert_int_to_ascii, convert_ascii_to_int): Move to
7359 common/rsp-low.c.
7360 * regcache.c: Include rsp-low.h.
7361 * ax.c: Include rsp-low.h.
7362 * Makefile.in (SFILES): Add common/rsp-low.c.
7363 (OBS): Add rsp-low.o.
7364 (rsp-low.o): New target.
7365
01fd3ea5
TT
73662014-02-12 Tom Tromey <tromey@redhat.com>
7367
7368 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7369 Include print-utils.h.
7370 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7371 (plongest, thirty_two, phex_nz): Remove.
7372 * Makefile.in (SFILES): Add common/print-utils.c.
7373 (OBS): Add print-utils.o.
7374 (print-utils-ipa.o): New target.
7375 (print-utils.o): New target.
7376 (IPA_OBJS): Add print-utils-ipa.o.
7377
e99dc820
TT
73782014-02-06 Tom Tromey <tromey@redhat.com>
7379
7380 * Makefile.in (SFILES): Fix indentation.
7381
ee1e2d4f
DE
73822014-02-05 Doug Evans <dje@google.com>
7383
7384 * linux-low.c (linux_wait_for_event): Improve comment.
7385 (linux_wait_1): Keep current_inferior in sync with event_child.
7386
f5a02773
DE
73872014-01-22 Doug Evans <dje@google.com>
7388
7389 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7390
87ce2a04
DE
73912014-01-22 Doug Evans <dje@google.com>
7392
7393 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7394 * configure: Regenerate.
7395 * config.in: Regenerate.
7396 * Makefile.in (SFILES): Add debug.c.
7397 (OBS): Add debug.o.
7398 * debug.c: New file.
7399 * debug.h: New file.
7400 * linux-aarch64-low.c (*): Update all debugging printfs to use
7401 debug_printf instead of fprintf.
7402 * linux-arm-low.c (*): Ditto.
7403 * linux-cris-low.c (*): Ditto.
7404 * linux-crisv32-low.c (*): Ditto.
7405 * linux-m32r-low.c (*): Ditto.
7406 * linux-sparc-low.c (*): Ditto.
7407 * linux-x86.c (*): Ditto.
7408 * linux-low.c (*): Ditto.
7409 (linux_wait_1): Add calls to debug_enter, debug_exit.
7410 (linux_wait): Remove redundant debugging printf.
7411 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7412 (linux_resume, unstop_all_lwps): Ditto.
7413 * mem-break.c (*): Update all debugging printfs to use
7414 debug_printf instead of fprintf.
7415 * remote-utils.c (*): Ditto.
7416 * thread-db.c (*): Ditto.
7417 * server.c #include <ctype.h>, "gdb_vecs.h".
7418 (debug_threads): Moved to debug.c.
7419 (*): Update all debugging printfs to use debug_printf instead of
7420 fprintf.
7421 (start_inferior): Replace call to fflush with call to debug_flush.
7422 (monitor_show_help): Mention set debug-format.
7423 (parse_debug_format_options): New function.
7424 (handle_monitor_command): Handle "monitor set debug-format".
7425 (gdbserver_usage): Mention --debug-format.
7426 (main): Parse --debug-format.
7427 * server.h (debug_threads): Declaration moved to debug.h.
7428 #include "debug.h".
7429 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7430 trace_debug_1 that uses debug_printf.
7431 (tracepoint_look_up_symbols): Update all debugging printfs to use
7432 debug_printf instead of fprintf.
7433
e671835b
BS
74342014-01-20 Baruch Siach <baruch@tkos.co.il>
7435
7436 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7437 sys/ptrace.h.
7438
b5737fa9
PA
74392014-01-17 Pedro Alves <palves@redhat.com>
7440
ea38d2a9 7441 PR build/16445
c7faa97a
PA
7442 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7443 defined after including gdb_proc_service.h.
b5737fa9 7444
40ed484e
DE
74452014-01-16 Doug Evans <dje@google.com>
7446
7447 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7448 (match_dll): Use it.
7449
969c39fb
MM
74502014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7451
7452 * target.h (target_ops) <read_btrace>: Change parameters and
7453 return type to allow error reporting.
7454 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7455 trace reading errors on.
7456 * linux-low.c (linux_low_read_btrace): Pass trace reading
7457 errors on.
7458 (linux_low_disable_btrace): New.
7459
ab7f45ba
DE
74602014-01-15 Doug Evans <dje@google.com>
7461
7462 * inferiors.c (thread_id_to_gdb_id): Delete.
7463 * inferiors.h (thread_id_to_gdb_id): Delete.
7464
66af0f44
EZ
74652014-01-13 Eli Zaretskii <eliz@gnu.org>
7466
7467 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7468 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7469 versions.
7470
9939e131
PA
74712014-01-08 Pedro Alves <palves@redhat.com>
7472
7473 * server.c (handle_status): Don't discard previous queued stop
7474 replies or thread's pending status here.
7475 (main) <disconnection>: Do it here instead.
7476
b7ea362b
PA
74772014-01-08 Pedro Alves <palves@redhat.com>
7478
7479 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7480 * server.c (visit_actioned_threads, handle_pending_status): New
7481 function.
7482 (handle_v_cont): Factor out parts to ...
7483 (resume): ... this new function. If in all-stop, and a thread
7484 being resumed has a pending status, report it without actually
7485 resuming.
7486 (myresume): Adjust to use the new 'resume' function.
7487 (clear_pending_status_callback, set_pending_status_callback)
7488 (find_status_pending_thread_callback): New functions.
7489 (handle_status): Handle the case of multiple threads having
7490 interesting statuses to report. Report threads' real last signal
7491 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7492 with an interesting thread to report the status for, instead of
7493 always reporting the status of the first thread.
7494
28498c42
JB
74952014-01-01 Joel Brobecker <brobecker@adacore.com>
7496
7497 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7498 * gdbreplay.c (gdbreplay_version): Likewise.
7499
f45c82da
YZ
75002013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7501
7502 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7503 iov.iov_len with the real length in use.
7504
379a5e2d
JB
75052013-12-13 Joel Brobecker <brobecker@adacore.com>
7506
7507 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7508 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7509 for all targets that use win32-low.c.
7510 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7511 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7512
4210d83e
PA
75132013-12-13 Pedro Alves <palves@redhat.com>
7514
7515 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7516 if equal to TARGET_WAITKIND_LOADED.
7517 * win32-low.c (cached_status): New static global.
7518 (win32_wait): Add declaration.
7519 (do_initial_child_stuff): Flush all initial pending debug events
7520 up to the initial breakpoint.
7521 (win32_wait): If CACHED_STATUS was set, return that instead
7522 of doing a real wait. Remove the code resuming the execution
7523 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7524 during the initial phase. Also remove the code changing
7525 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7526 TARGET_WAITKIND_STOPPED.
7527
e7f0d979
YQ
75282013-12-11 Yao Qi <yao@codesourcery.com>
7529
7530 * notif.c (handle_notif_ack): Return 0 if no notification
7531 matches.
7532
ebcf782c
DE
75332013-11-20 Doug Evans <dje@google.com>
7534
7535 * linux-low.c (linux_set_resume_request): Fix comment.
7536
20ad9378
DE
75372013-11-20 Doug Evans <dje@google.com>
7538
7539 * linux-low.c (resume_status_pending_p): Tweak comment.
7540
a196ebeb
WT
75412013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7542
7543 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7544 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7545 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7546 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7547 (srv_amd64_regobj): Add amd64-mpx.o.
7548 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7549 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7550 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7551 * i387-fp.c (num_pl_bnd_register) Added constant.
7552 (num_pl_bnd_cfg_registers) Added constant.
7553 (struct i387_xsave) Added reserved area and MPX fields.
7554 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7555 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7556 function.
7557 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7558 (init_registers_amd64_mpx_linux): Declare new function.
7559 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7560 (x86_64_regmap): Add MPX registers.
7561 (x86_linux_read_description): Add MPX case.
7562 (initialize_low_arch): Initialize MPX targets.
7563
0080a2f6
TT
75642013-11-18 Tom Tromey <tromey@redhat.com>
7565
7566 * configure: Rebuild.
7567 * configure.ac: Don't check for stdlib.h.
7568 * gdbreplay.c: Unconditionally include stdlib.h.
7569
2978b111
TT
75702013-11-18 Tom Tromey <tromey@redhat.com>
7571
7572 * config.in: Rebuild.
7573 * configure: Rebuild.
7574 * configure.ac: Don't use AC_HEADER_DIRENT.
7575
a3d08894
TT
75762013-11-18 Tom Tromey <tromey@redhat.com>
7577
7578 * server.h: Don't check HAVE_STRING_H.
7579 * gdbreplay.c: Don't check HAVE_STRING_H.
7580 * configure: Rebuild.
7581
0a5dd17d
TT
75822013-11-18 Tom Tromey <tromey@redhat.com>
7583
7584 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7585 LIBGNU.
7586
1bd2f0ba
TT
75872013-11-08 Tom Tromey <tromey@redhat.com>
7588
7589 * configure, config.in: Rebuild.
7590 * configure.ac: Remove unused configury.
7591
3266f10b
TT
75922013-11-08 Tom Tromey <tromey@redhat.com>
7593
7594 * acinclude.m4: Include common.m4, codeset.m4.
7595 * configure, config.in: Rebuild.
7596 * configure.ac: Use GDB_AC_COMMON.
7597
6682d959
AA
75982013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7599
7600 * linux-s390-low.c (HWCAP_S390_TE): New define.
7601 (s390_arch_setup): Consider the TE field in the HWCAP for
7602 determining 'have_regset_tdb'.
7603
fd0a4d76
SDJ
76042013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7605
7606 PR gdb/16014
7607 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7608 call to sizeof.
7609
1a3d890b
PA
76102013-10-02 Pedro Alves <palves@redhat.com>
7611
7612 * server.c (process_serial_event): Don't output "GDBserver
7613 exiting" if GDB is connected through stdio.
7614 * target.c (mywait): Likewise, be silent if GDB is connected
7615 through stdio.
7616
97ad4581
JB
76172013-10-01 Joel Brobecker <brobecker@adacore.com>
7618
7619 * lynx-low.c (lynx_add_threads_after_attach): New function.
7620 (lynx_attach): Remove call to add_thread. Add call to
7621 lynx_add_threads_after_attach instead.
7622
5b4e221c
MF
76232013-09-28 Mike Frysinger <vapier@gentoo.org>
7624
7625 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7626 * config.in, configure: Regenerated.
7627
ee47b2f8
YQ
76282013-09-18 Yao Qi <yao@codesourcery.com>
7629
7630 PR server/15959
7631 * server.c (start_inferior): Clear 'resume_info'.
7632
d6707650 76332013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7634
d6707650
JW
7635 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7636 for each register.
7637
9243dd0e 76382013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7639
9243dd0e
JW
7640 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7641 linux-tile-low.o to srv_tgtobj.
7642
c623a6ef
WN
76432013-09-16 Will Newton <will.newton@linaro.org>
7644
7645 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7646 out regs.
7647
fb71d39e
PA
76482013-09-06 Pedro Alves <palves@redhat.com>
7649
7650 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7651 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7652 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7653 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7654 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7655 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7656
8e7e9910
PA
76572013-09-06 Pedro Alves <palves@redhat.com>
7658
7659 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7660 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7661
7c3a12ca
PA
76622013-09-06 Pedro Alves <palves@redhat.com>
7663
7664 * linux-amd64-ipa.c: Include tracepoint.h.
7665 * linux-i386-ipa.c: Include tracepoint.h.
7666
8eb3d7b6
RW
76672013-09-06 Ricard Wanderlof <ricardw@axis.com>
7668
7669 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7670 (ps_get_thread_area): New function.
7671
eddddb9d
RW
76722013-09-06 Ricard Wanderlof <ricardw@axis.com>
7673
7674 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7675 (initialize_low_arch): Call init_registers_crisv32 rather than
7676 init_register_crisv32.
7677
533b0600
PA
76782013-09-05 Pedro Alves <palves@redhat.com>
7679
7680 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7681 to ...
7682 * hostio.h: ... this new file.
7683 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7684 win32-low.c: Include hostio.h.
7685
0ce3d3b5
PA
76862013-09-05 Pedro Alves <palves@redhat.com>
7687
7688 * server.h (gdb_client_data, handler_func, callback_handler_func)
7689 (delete_file_handler, add_file_handler, append_callback_event)
7690 (delete_callback_event, start_event_loop, initialize_event_loop):
7691 Move to event-loop.h and include it.
7692 * event-loop.h: New file.
7693
799cdc37
PA
76942013-09-05 Pedro Alves <palves@redhat.com>
7695
7696 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7697 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7698 (loaded_dll, unloaded_dll): Move to ...
7699 * dll.h: ... this new file.
7700 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7701
6a6bbd9d
PA
77022013-09-05 Pedro Alves <palves@redhat.com>
7703
7704 * server.h (current_process, get_thread_process, all_processes)
7705 (add_inferior_to_list, for_each_inferior, current_inferior)
7706 (remove_inferior, add_process, remove_process, find_process_pid)
7707 (have_started_inferiors_p, have_attached_inferiors_p)
7708 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7709 (clear_inferiors, find_inferior, find_inferior_id)
7710 (inferior_target_data, set_inferior_target_data)
7711 (inferior_regcache_data, set_inferior_regcache_data): Move to
7712 inferiors.h, and include it.
7713 * inferiors.h: New file.
7714
f699aaba
PA
77152013-09-05 Pedro Alves <palves@redhat.com>
7716
7717 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7718 Move ...
72f4393d 7719 * ax.h: ... here.
f699aaba 7720
c144c7a0
PA
77212013-09-05 Pedro Alves <palves@redhat.com>
7722
7723 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7724 tracepoint.h.
7725 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7726 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7727 (handle_tracepoint_general_set, handle_tracepoint_query)
7728 (tracepoint_finished_step, tracepoint_was_hit)
7729 (release_while_stepping_state_list, current_traceframe)
7730 (in_readonly_region, traceframe_read_mem)
7731 (fetch_traceframe_registers, traceframe_read_sdata)
7732 (traceframe_read_info, struct fast_tpoint_collect_status)
7733 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7734 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7735 (supply_fast_tracepoint_registers)
7736 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7737 (ipa_tdesc, claim_trampoline_space)
7738 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7739 (agent_mem_read, agent_get_trace_state_variable_value)
7740 (agent_set_trace_state_variable_value, agent_tsv_read)
7741 (agent_mem_read_string, get_raw_reg_func_addr)
7742 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7743 * tracepoint.h: ... this new file.
7744
ff42e6ab
PA
77452013-09-05 Pedro Alves <palves@redhat.com>
7746
7747 * server.h (perror_with_name, error, fatal, warning, paddress)
7748 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7749 include it.
7750 * utils.h: New file.
7751
541af0f4
PA
77522013-09-05 Pedro Alves <palves@redhat.com>
7753
7754 * server.h (remote_debug, noack_mode, transport_is_reliable)
7755 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7756 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7757 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7758 (write_enn, initialize_async_io, enable_async_io)
7759 (disable_async_io, check_remote_input_interrupt_request)
7760 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7761 (dead_thread_notify, prepare_resume_reply)
7762 (decode_address_to_semicolon, decode_address, decode_m_packet)
7763 (decode_M_packet, decode_X_packet, decode_xfer_write)
7764 (decode_search_memory_packet, unhexify, hexify)
7765 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7766 (look_up_one_symbol, relocate_instruction)
7767 (monitor_output): Move to remote-utils.h, and include it.
7768 * remote-utils.h: New file.
7769
eebdf26b
PA
77702013-09-05 Pedro Alves <palves@redhat.com>
7771
7772 * server.h (_): Delete.
7773
3aafd2ff
PA
77742013-09-02 Pedro Alves <palves@redhat.com>
7775
7776 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7777 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7778 allocated.
7779 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7780
cee83bcb
PM
77812013-09-02 Pierre Muller <muller@sourceware.org>
7782
7783 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7784 or WriteProcessMemory complete successfully and handle
7785 ERROR_PARTIAL_COPY error.
7786
9a13b2fa
PA
77872013-09-02 Pedro Alves <palves@redhat.com>
7788
7789 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7790 error instead of EIO.
7791
602e3198
JK
77922013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7793
7794 PR server/15604
7795 * linux-low.c: Include filestuff.h.
7796 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7797 * lynx-low.c: Include filestuff.h.
7798 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7799 * server.c: Include filestuff.h.
7800 (main): Call notice_open_fds.
7801 * spu-low.c: Include filestuff.h.
7802 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7803
96d7229d
LM
78042013-08-22 Luis Machado <lgustavo@codesourcery.com>
7805
7806 * Makefile.in: Explain why ../target and ../nat are not
7807 listed as include file search paths.
7808 (linux-waitpid.o): New object file rule.
7809 * configure.srv (srv_native_linux_obj): New variable.
7810 Replace all occurrences of linux native object files with
7811 $srv_native_linux_obj.
7812 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7813 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7814 (linux_enable_event_reporting): Remove declaration.
7815 (my_waitpid): Moved to common/linux-waitpid.c.
7816 (linux_wait_for_event): Pass ptid when calling
7817 linux_enable_event_reporting.
7818 (linux_supports_tracefork_flag): Remove.
7819 (linux_enable_event_reporting): Likewise.
7820 (linux_tracefork_grandchild): Remove.
7821 (STACK_SIZE): Moved to common/linux-ptrace.c.
7822 (linux_tracefork_child): Remove.
7823 (linux_test_for_tracefork): Remove.
7824 (linux_look_up_symbols): Call linux_supports_traceclone.
7825 (initialize_low): Remove call to linux_test_for_tracefork.
7826 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7827 common/linux-ptrace.h.
7828 (PTRACE_TYPE_ARG4): Likewise.
7829 Include linux-ptrace.h.
7830
32940073
PA
78312013-08-21 Pedro Alves <palves@redhat.com>
7832
7833 * config.in: Renegerate.
7834
33b60d58 78352013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7836
33b60d58
LM
7837 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7838 (SFILES): Remove $(srcdir)/common/target-common.c and
7839 add $(srcdir)/target/waitstatus.c.
7840 (OBS): Remove target-common.o and add waitstatus.o.
7841 (server_h): Remove $(srcdir)/../common/target-common.h and
7842 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7843 and $(srcdir)/../target/waitstatus.h.
7844 (target-common.o): Remove.
7845 (waitstatus.o): New target object file.
7846 * target.h: Do not include target-common.h and
7847 include target/resume.h, target/wait.h and
7848 target/waitstatus.h.
7849
b8e1b30e
LM
78502013-08-13 Luis Machado <lgustavo@codesourcery.com>
7851
7852 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7853 to PTRACE_TYPE_ARG3.
7854 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7855 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7856 PTRACE_TYPE_ARG4.
7857 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7858 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7859
7a60ad40
YQ
78602013-07-27 Jie Zhang <jie@codesourcery.com>
7861 Daniel Jacobowitz <dan@codesourcery.com>
7862 Yao Qi <yao@codesourcery.com>
7863
7864 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7865 (mips-linux-watch.o): New rule.
7866 (mips_linux_watch_h): New variable.
7867 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7868 srv_tgtobj.
7869 * linux-mips-low.c: Include mips-linux-watch.h.
7870 (struct arch_process_info, struct arch_lwp_info): New.
7871 (update_watch_registers_callback): New function.
7872 (mips_linux_new_process, mips_linux_new_thread) New functions.
7873 (mips_linux_prepare_to_resume, mips_insert_point): New
7874 functions.
7875 (mips_remove_point, mips_stopped_by_watchpoint): New
7876 functions.
7877 (rsp_bp_type_to_target_hw_bp_type): New function.
7878 (mips_stopped_data_address): New function.
7879 (the_low_target): Add watchpoint support functions.
7880
de6f69ad
YQ
78812013-07-27 Yao Qi <yao@codesourcery.com>
7882
7883 * i386-low.c: Include break-common.h.
7884 (enum target_hw_bp_type): Remove.
7885
3360c0bf
LM
78862013-07-24 Luis Machado <lgustavo@codesourcery.com>
7887
7888 * Makefile.in (SFILES): /common/target-common.c.
7889 (OBS): Add target-common.o.
7890 (server_h): Add $(srcdir)/../common/target-common.h.
7891 (target-common.o): New target.
7892 * server.c (queue_stop_reply_callback): Free
7893 status string after use.
7894 * target.c (target_waitstatus_to_string): Remove.
7895 * target.h: Include target-common.h.
7896 (resume_kind): Likewise.
7897 (target_waitkind): Likewise.
7898 (target_waitstatus): Likewise.
7899 (TARGET_WNOHANG): Likewise.
7900
bd885420
YQ
79012013-07-04 Yao Qi <yao@codesourcery.com>
7902
7903 * Makefile.in (host_alias): Use @host_noncanonical@.
7904 (target_alias): Use @target_noncanonical@.
7905 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7906 ACX_NONCANONICAL_HOST.
7907 * configure: Regenerated.
7908
7909 Revert:
7910 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7911
7912 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7913 * configure: Rebuild.
7914 * Makefile.in (version_host, version_target): Get from configure.
7915 (version.c): Use $(version_host) and $(version_target).
7916
17ef446e
PA
79172013-07-03 Pedro Alves <palves@redhat.com>
7918
7919 * Makefile.in (config.status): Depend on development.sh.
7920 * acinclude.m4: Include libmcheck.m4.
7921 * configure: Regenerate.
7922
7a9a7487
MG
79232013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7924
7925 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7926 attribute inside the parentheses.
7927 (winapi_DebugSetProcessKillOnExit): Ditto.
7928 (winapi_DebugBreakProcess): Ditto.
7929 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7930
49b64de6
MG
79312013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7932
7933 * notif.h (notif_event): Add a dummy member to avoid compiler
7934 errors.
7935
d5749ee7
PA
79362013-07-01 Pedro Alves <palves@redhat.com>
7937
7938 * hostio.c (HOSTIO_PATH_MAX): Define.
7939 (require_filename, handle_open, handle_unlink, handle_readlink):
7940 Use it.
7941
d8d2a3ee
PA
79422013-07-01 Pedro Alves <palves@redhat.com>
7943
7944 * server.h: Include "pathmax.h".
7945 * linux-low.c: Don't include sys/param.h.
7946 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7947 MAXPATHLEN.
7948 * win32-low.c: Don't include sys/param.h.
7949 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7950
bc7dea8d
PA
79512013-07-01 Pedro Alves <palves@redhat.com>
7952
7953 * event-loop.c: Don't check HAVE_UNISTD_H before including
7954 <unistd.h>.
7955 * gdbreplay.c: Likewise.
7956 * remote-utils.c: Likewise.
7957 * server.c: Likewise.
7958 * configure.ac: Don't check for unistd.h.
7959 * configure: Regenerate.
7960
d6c2da54
TT
79612013-06-28 Tom Tromey <tromey@redhat.com>
7962
7963 * Makefile.in (version.c): Use version.in, not
7964 common/version.in.
7965
257b6bec
MG
79662013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7967
7968 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7969 * configure: Rebuild.
7970 * Makefile.in (version_host, version_target): Get from configure.
7971 (version.c): Use $(version_host) and $(version_target).
7972
86ebe149
DK
79732013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7974
7975 Fix trace-status to output user name without trailing colon.
7976 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7977
f30aa5af
DK
79782013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7979
7980 Fix trace-status to output proper start-time and stop-time.
7981 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7982 output start time and stop time in hex as gdb expects.
7983
28a93511
YQ
79842013-06-26 Pedro Alves <pedro@codesourcery.com>
7985
7986 * tracepoint.c (build_traceframe_info_xml): Output trace state
7987 variables present in the trace buffer.
7988
01208463
TT
79892013-06-24 Tom Tromey <tromey@redhat.com>
7990
7991 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7992 create-version.sh.
7993 (version.o): Remove.
7994 * gdbreplay.c: Include version.h.
7995 (version, host_name): Don't declare.
7996 * server.h: Include version.h.
7997 (version, host_name): Don't declare.
7998
760256f9
PA
79992013-06-12 Pedro Alves <palves@redhat.com>
8000
8001 * linux-x86-low.c (linux_is_elf64): Delete global.
8002 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8003 with local linux_pid_exe_is_elf_64_file use.
8004
030031ee
PA
80052013-06-11 Pedro Alves <palves@redhat.com>
8006
8007 * linux-low.c (regset_disabled, disable_regset): New functions.
8008 (regsets_fetch_inferior_registers)
8009 (regsets_store_inferior_registers): Use them.
8010 (initialize_regsets_info); Don't allocate the disabled_regsets
8011 array here.
8012 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8013 comment.
8014
5da6eb0a
PA
80152013-06-11 Pedro Alves <palves@redhat.com>
8016
8017 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8018 xmalloc.
8019
7e5aaa09
PA
80202013-06-11 Pedro Alves <palves@redhat.com>
8021
8022 * linux-x86-low.c (initialize_low_arch): Call
8023 init_registers_x32_avx_linux.
8024
d878444c
JK
80252013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8026
8027 Fix compatibility with Android Bionic.
8028 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8029 it is not empty.
8030
3aee8918
PA
80312013-06-07 Pedro Alves <palves@redhat.com>
8032
5f2b57b5 8033 PR server/14823
3aee8918
PA
8034 * Makefile.in (OBS): Add tdesc.o.
8035 (IPA_OBJS): Add tdesc-ipa.o.
8036 (tdesc-ipa.o): New rule.
8037 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8038 interface.
8039 * linux-low.c (new_inferior): Delete.
8040 (disabled_regsets, num_regsets): Delete.
8041 (linux_add_process): Adjust to set the new per-process
8042 new_inferior flag.
8043 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8044 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8045 was a stop. When calling arch_setup, switch the current inferior
8046 to the thread that got an event.
8047 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8048 (regsets_fetch_inferior_registers)
8049 (regsets_store_inferior_registers): New regsets_info parameter.
8050 Adjust to use it.
8051 (linux_register_in_regsets): New regs_info parameter. Adjust to
8052 use it.
8053 (register_addr, fetch_register, store_register): New usrregs_info
8054 parameter. Adjust to use it.
8055 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8056 parameter regs_info. Adjust to use it.
8057 (linux_fetch_registers): Get the current inferior's regs_info, and
8058 adjust to use it.
8059 (linux_store_registers): Ditto.
8060 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8061 (initialize_low): Don't initialize the target_regsets here. Call
8062 initialize_low_arch.
8063 * linux-low.h (target_regsets): Delete declaration.
8064 (struct regsets_info): New.
8065 (struct usrregs_info): New.
8066 (struct regs_info): New.
8067 (struct process_info_private) <new_inferior>: New field.
8068 (struct linux_target_ops): Delete the num_regs, regmap, and
8069 regset_bitmap fields. New field regs_info.
8070 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8071 * i387-fp.c (num_xmm_registers): Delete.
8072 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8073 calls to new interface.
8074 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8075 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8076 Infer the number of xmm registers from the regcache's target
8077 description.
8078 * i387-fp.h (num_xmm_registers): Delete.
8079 * inferiors.c (add_thread): Don't install the thread's regcache
8080 here.
8081 * proc-service.c (gregset_info): Fetch the current inferior's
8082 regs_info. Adjust to use it.
8083 * regcache.c: Include tdesc.h.
8084 (register_bytes, reg_defs, num_registers)
8085 (gdbserver_expedite_regs): Delete.
8086 (get_thread_regcache): If the thread doesn't have a regcache yet,
8087 create one, instead of aborting gdbserver.
8088 (regcache_invalidate_one): Rename to ...
8089 (regcache_invalidate_thread): ... this.
8090 (regcache_invalidate_one): New.
8091 (regcache_invalidate): Only invalidate registers of the current
8092 process.
8093 (init_register_cache): Add target_desc parameter, and use it.
8094 (new_register_cache): Ditto. Assert the target description has a
8095 non zero registers_size.
8096 (regcache_cpy): Add assertions. Adjust.
8097 (realloc_register_cache, set_register_cache): Delete.
8098 (registers_to_string, registers_from_string): Adjust.
8099 (find_register_by_name, find_regno, find_register_by_number)
8100 (register_cache_size): Add target_desc parameter, and use it.
8101 (free_register_cache_thread, free_register_cache_thread_one)
8102 (regcache_release, register_cache_size): New.
8103 (register_size): Add target_desc parameter, and use it.
8104 (register_data, supply_register, supply_register_zeroed)
8105 (supply_regblock, supply_register_by_name, collect_register)
8106 (collect_register_as_string, collect_register_by_name): Adjust.
8107 * regcache.h (struct target_desc): Forward declare.
8108 (struct regcache) <tdesc>: New field.
8109 (init_register_cache, new_register_cache): Add target_desc
8110 parameter.
8111 (regcache_invalidate_thread): Declare.
8112 (regcache_invalidate_one): Delete declaration.
8113 (regcache_release): Declare.
8114 (find_register_by_number, register_cache_size, register_size)
8115 (find_regno): Add target_desc parameter.
8116 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8117 declarations.
8118 * remote-utils.c: Include tdesc.h.
8119 (outreg, prepare_resume_reply): Adjust.
8120 * server.c: Include tdesc.h.
8121 (gdbserver_xmltarget): Delete declaration.
8122 (get_features_xml, process_serial_event): Adjust.
8123 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8124 declare.
8125 (struct process_info) <tdesc>: New field.
8126 (ipa_tdesc): Declare.
8127 * tdesc.c: New file.
8128 * tdesc.h: New file.
8129 * tracepoint.c: Include tdesc.h.
8130 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8131 (get_context_regcache): Adjust to pass ipa_tdesc down.
8132 (do_action_at_tracepoint): Adjust to get the register cache size
8133 from the context regcache's description.
8134 (traceframe_walk_blocks): Adjust to get the register cache size
8135 from the current trace frame's description.
8136 (traceframe_get_pc): Adjust to get current trace frame's
8137 description and pass it down.
8138 (gdb_collect): Adjust to get the register cache size from the
8139 IPA's description.
8140 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8141 (gdbserver_xmltarget): Delete.
8142 (initialize_low_tracepoint): Set the ipa's target description.
8143 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8144 (initialize_low_tracepoint): Set the ipa's target description.
8145 * linux-x86-low.c: Include tdesc.h.
8146 [__x86_64__] (is_64bit_tdesc): New.
8147 (ps_get_thread_area, x86_get_thread_area): Use it.
8148 (i386_cannot_store_register): Rename to ...
8149 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8150 (i386_cannot_fetch_register): Rename to ...
8151 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8152 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8153 to new interface.
8154 (target_regsets): Rename to ...
8155 (x86_regsets): ... this.
8156 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8157 interface.
8158 (x86_siginfo_fixup): Use is_64bit_tdesc.
8159 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8160 (tdesc_x32_avx_linux, tdesc_x32_linux)
8161 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8162 Declare.
8163 (x86_linux_update_xmltarget): Delete.
8164 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8165 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8166 (AMD64_LINUX_USER64_CS): New.
8167 (x86_linux_read_description): New, based on
8168 x86_linux_update_xmltarget.
8169 (same_process_callback): New.
8170 (x86_arch_setup_process_callback): New.
8171 (x86_linux_update_xmltarget): New.
8172 (x86_regsets_info): New.
8173 (amd64_linux_regs_info): New.
8174 (i386_linux_usrregs_info): New.
8175 (i386_linux_regs_info): New.
8176 (x86_linux_regs_info): New.
8177 (x86_arch_setup): Reimplement.
8178 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8179 (x86_emit_ops): Ditto.
8180 (the_low_target): Adjust. Install x86_linux_regs_info,
8181 x86_cannot_fetch_register, and x86_cannot_store_register.
8182 (initialize_low_arch): New.
8183 * linux-ia64-low.c (tdesc_ia64): Declare.
8184 (ia64_fetch_register): Adjust.
8185 (ia64_usrregs_info, regs_info): New globals.
8186 (ia64_regs_info): New function.
8187 (the_low_target): Adjust.
8188 (initialize_low_arch): New function.
8189 * linux-sparc-low.c (tdesc_sparc64): Declare.
8190 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8191 Adjust.
8192 (sparc_arch_setup): New function.
8193 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8194 (the_low_target): Adjust.
8195 (initialize_low_arch): New function.
8196 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8197 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8198 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8199 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8200 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8201 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8202 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8203 (tdesc_powerpc_isa205_vsx64l): Declare.
8204 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8205 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8206 (ppc_set_pc, ppc_get_hwcap): Adjust.
8207 (ppc_usrregs_info): Forward declare.
8208 (!__powerpc64__) ppc_regmap_adjusted: New global.
8209 (ppc_arch_setup): Adjust to the current process'es target
8210 description.
8211 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8212 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8213 (ppc_store_evrregset): Adjust.
8214 (target_regsets): Rename to ...
8215 (ppc_regsets): ... this, and make static.
8216 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8217 (ppc_regs_info): New function.
8218 (the_low_target): Adjust.
8219 (initialize_low_arch): New function.
8220 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8221 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8222 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8223 (tdesc_s390x_linux64v2): Declare.
8224 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8225 (s390_fill_gregset, s390_store_last_break): Adjust.
8226 (target_regsets): Rename to ...
8227 (s390_regsets): ... this, and make static.
8228 (s390_get_pc, s390_set_pc): Adjust.
8229 (s390_get_hwcap): New target_desc parameter, and use it.
8230 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8231 (s390_arch_setup): Adjust to set the current process'es target
8232 description. Don't adjust the regmap.
8233 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8234 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8235 (regs_info_3264): New globals.
8236 (s390_regs_info): New function.
8237 (the_low_target): Adjust.
8238 (initialize_low_arch): New function.
8239 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8240 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8241 [__mips64] (init_registers_mips_linux)
8242 (init_registers_mips_dsp_linux): Delete defines.
8243 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8244 (have_dsp): New global.
8245 (mips_read_description): New, based on mips_arch_setup.
8246 (mips_arch_setup): Reimplement.
8247 (get_usrregs_info): New function.
8248 (mips_cannot_fetch_register, mips_cannot_store_register)
8249 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8250 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8251 (target_regsets): Rename to ...
8252 (mips_regsets): ... this, and make static.
8253 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8254 (dsp_regs_info, regs_info): New globals.
8255 (mips_regs_info): New function.
8256 (the_low_target): Adjust.
8257 (initialize_low_arch): New function.
8258 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8259 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8260 Declare.
8261 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8262 (arm_read_description): New, with bits factored from
8263 arm_arch_setup.
8264 (arm_arch_setup): Reimplement.
8265 (target_regsets): Rename to ...
8266 (arm_regsets): ... this, and make static.
8267 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8268 (arm_regs_info): New function.
8269 (the_low_target): Adjust.
8270 (initialize_low_arch): New function.
8271 * linux-m68k-low.c (tdesc_m68k): Declare.
8272 (target_regsets): Rename to ...
8273 (m68k_regsets): ... this, and make static.
8274 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8275 (m68k_regs_info): New function.
8276 (m68k_arch_setup): New function.
8277 (the_low_target): Adjust.
8278 (initialize_low_arch): New function.
8279 * linux-sh-low.c (tdesc_sharch): Declare.
8280 (target_regsets): Rename to ...
8281 (sh_regsets): ... this, and make static.
8282 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8283 (sh_regs_info, sh_arch_setup): New functions.
8284 (the_low_target): Adjust.
8285 (initialize_low_arch): New function.
8286 * linux-bfin-low.c (tdesc_bfin): Declare.
8287 (bfin_arch_setup): New function.
8288 (bfin_usrregs_info, regs_info): New globals.
8289 (bfin_regs_info): New function.
8290 (the_low_target): Adjust.
8291 (initialize_low_arch): New function.
8292 * linux-cris-low.c (tdesc_cris): Declare.
8293 (cris_arch_setup): New function.
8294 (cris_usrregs_info, regs_info): New globals.
8295 (cris_regs_info): New function.
8296 (the_low_target): Adjust.
8297 (initialize_low_arch): New function.
8298 * linux-cris-low.c (tdesc_crisv32): Declare.
8299 (cris_arch_setup): New function.
8300 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8301 (cris_regs_info): New function.
8302 (the_low_target): Adjust.
8303 (initialize_low_arch): New function.
8304 * linux-m32r-low.c (tdesc_m32r): Declare.
8305 (m32r_arch_setup): New function.
8306 (m32r_usrregs_info, regs_info): New globals.
8307 (m32r_regs_info): Adjust.
8308 (initialize_low_arch): New function.
8309 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8310 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8311 (tic6x_usrregs_info): Forward declare.
8312 (tic6x_read_description): New function, based on ...
8313 (tic6x_arch_setup): ... this. Reimplement.
8314 (target_regsets): Rename to ...
8315 (tic6x_regsets): ... this, and make static.
8316 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8317 (tic6x_regs_info): New function.
8318 (the_low_target): Adjust.
8319 (initialize_low_arch): New function.
8320 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8321 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8322 (target_regsets): Rename to ...
8323 (xtensa_regsets): ... this, and make static.
8324 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8325 globals.
8326 (xtensa_arch_setup, xtensa_regs_info): New functions.
8327 (the_low_target): Adjust.
8328 (initialize_low_arch): New function.
8329 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8330 (nios2_arch_setup): Set the current process'es tdesc.
8331 (target_regsets): Rename to ...
8332 (nios2_regsets): ... this.
8333 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8334 (nios2_regs_info): New function.
8335 (the_low_target): Adjust.
8336 (initialize_low_arch): New function.
a261b8f5
PA
8337 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8338 (aarch64_arch_setup): Set the current process'es tdesc.
8339 (target_regsets): Rename to ...
8340 (aarch64_regsets): ... this.
8341 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8342 (aarch64_regs_info): New function.
8343 (the_low_target): Adjust.
8344 (initialize_low_arch): New function.
3aee8918
PA
8345 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8346 globals.
8347 (target_regsets): Rename to ...
8348 (tile_regsets): ... this.
8349 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8350 (tile_regs_info): New function.
8351 (tile_arch_setup): Set the current process'es tdesc.
8352 (the_low_target): Adjust.
8353 (initialize_low_arch): New function.
8354 * spu-low.c (tdesc_spu): Declare.
8355 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8356 * win32-arm-low.c (tdesc_arm): Declare.
8357 (arm_arch_setup): New function.
8358 (the_low_target): Install arm_arch_setup instead of
8359 init_registers_arm.
8360 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8361 (init_windows_x86): Rename to ...
8362 (i386_arch_setup): ... this. Set `win32_tdesc'.
8363 (the_low_target): Adjust.
8364 * win32-low.c (win32_tdesc): New global.
8365 (child_add_thread): Don't create the thread cache here.
8366 (do_initial_child_stuff): Set the new process'es tdesc.
8367 * win32-low.h (struct target_desc): Forward declare.
8368 (win32_tdesc): Declare.
8369 * lynx-i386-low.c (tdesc_i386): Declare global.
8370 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8371 * lynx-low.c (lynx_tdesc): New global.
8372 (lynx_add_process): Set the new process'es tdesc.
8373 * lynx-low.h (struct target_desc): Forward declare.
8374 (lynx_tdesc): Declare global.
8375 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8376 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8377 * nto-low.c (nto_tdesc): New global.
8378 (do_attach): Set the new process'es tdesc.
8379 * nto-low.h (struct target_desc): Forward declare.
8380 (nto_tdesc): Declare.
8381 * nto-x86-low.c (tdesc_i386): Declare.
8382 (nto_x86_arch_setup): Set `nto_tdesc'.
8383
b1fbec62
GB
83842013-06-04 Gary Benson <gbenson@redhat.com>
8385
8386 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8387 to qSupported response when appropriate.
8388 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8389 with nonzero-length annex.
8390 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8391 arguments supplied in annex.
8392
d1ec4ce7
DE
83932013-05-31 Doug Evans <dje@google.com>
8394
ac44adcb 8395 PR server/15594
d1ec4ce7
DE
8396 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8397 64 bits in 64-cross-32 environment.
8398
9b25f2d3
PA
83992013-05-28 Pedro Alves <palves@redhat.com>
8400
8401 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8402 (aarch64-without-fpu.c): Delete rule.
8403 * configure.srv (aarch64*-*-linux*): Remove references to
8404 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8405 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8406 declaration.
8407
6740dc9c
PA
84082013-05-24 Pedro Alves <palves@redhat.com>
8409
8410 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8411 instead of strchr/decode_address. Error if the range isn't split
8412 with a ','. Don't assume there's be a ':' in the action.
8413
c2d6af84
PA
84142013-05-23 Yao Qi <yao@codesourcery.com>
8415 Pedro Alves <palves@redhat.com>
8416
8417 * linux-low.c (lwp_in_step_range): New function.
8418 (linux_wait_1): If the thread was range stepping and stopped
8419 outside the stepping range, report the stop to GDB. Otherwise,
8420 continue stepping. Add range stepping debug output.
8421 (linux_set_resume_request): Copy the step range from the resume
8422 request to the lwp.
8423 (linux_supports_range_stepping): New.
8424 (linux_target_ops) <supports_range_stepping>: Set to
8425 linux_supports_range_stepping.
8426 * linux-low.h (struct linux_target_ops)
8427 <supports_range_stepping>: New field.
8428 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8429 * linux-x86-low.c (x86_supports_range_stepping): New.
8430 (the_low_target) <supports_range_stepping>: Set to
8431 x86_supports_range_stepping.
8432 * server.c (handle_v_cont): Handle 'r' action.
8433 (handle_v_requests): Append ";r" if the target supports range
8434 stepping.
8435 * target.h (struct thread_resume) <step_range_start,
8436 step_range_end>: New fields.
8437 (struct target_ops) <supports_range_stepping>:
8438 New field.
8439 (target_supports_range_stepping): New macro.
8440
58794e1a
JB
84412013-05-17 Joel Brobecker <brobecker@adacore.com>
8442
8443 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8444 confusion in comment.
8445
d631c5a7
JB
84462013-05-17 Joel Brobecker <brobecker@adacore.com>
8447
8448 * lynx-low.c (struct process_info_private): New type.
8449 (lynx_add_process): New function.
8450 (lynx_create_inferior, lynx_attach): Replace calls to
8451 add_process by calls to lynx_add_process.
8452 (lynx_resume): If PTID is null, then try using
8453 current_process()->private->last_wait_event_ptid.
8454 Add comments.
8455 (lynx_clear_inferiors): Delete. The contents of that function
8456 has been inlined in lynx_mourn;
8457 (lynx_wait_1): Save the ptid in the process's private data.
8458 (lynx_mourn): Free the process' private data. Replace call
8459 to lynx_clear_inferiors by call to clear_inferiors.
8460
96f7a20f
YQ
84612013-05-17 Yao Qi <yao@codesourcery.com>
8462
8463 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8464 the right place.
8465
db0dfaa0
LM
84662013-05-16 Luis Machado <lgustavo@codesourcery.com>
8467
8468 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8469 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8470 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8471 PT_TEXT_END_ADDR guards. Update comments.
8472 (linux_target_op) <read_offsets>: Conditionally define to
8473 linux_read_offsets if the target is UCLIBC and if it defines
8474 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8475
68f5f838
SL
84762013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8477 Andrew Jenner <andrew@codesourcery.com>
8478
8479 * Makefile.in (SFILES): Add linux-nios2-low.c.
8480 (clean): Add action to delete nios2-linux.c.
8481 (nios2-linux.c): New rule.
8482 * configure.srv: Add nios2*-*-linux*.
8483 * linux-nios2-low.c: New.
8484
1ebff1fd
HAQ
84852013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8486
8487 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8488
f6150862
HZ
84892013-04-25 Hui Zhu <hui@codesourcery.com>
8490
8491 PR gdb/15186
f6150862
HZ
8492 * ax.c (ax_printf): Add fflush.
8493
614c279d
TT
84942013-04-22 Tom Tromey <tromey@redhat.com>
8495
8496 * Makefile.in (SFILES): Add filestuff.c.
8497 (OBS): Add filestuff.o.
8498 (filestuff.o): New target.
8499 * config.in, configure: Rebuild.
8500 * configure.ac: Check for fdwalk, pipe2.
8501
7d4e5717
PA
85022013-04-17 Pedro Alves <palves@redhat.com>
8503
8504 * configure.ac (USE_THREAD_DB): Delete variable.
8505 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8506 Don't AC_SUBST USE_THREAD_DB.
8507 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8508 * config.in, configure: Regenerate.
8509
d5c93e41
PA
85102013-04-16 Pedro Alves <palves@redhat.com>
8511
8512 * linux-low.h (struct lwp_info) <thread_known>: Move under
8513 the USE_THREAD_DB #ifdef.
8514
04f5fe89
PA
85152013-04-16 Pedro Alves <palves@redhat.com>
8516
8517 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8518 (linux-low.o): Delete rule.
8519 * linux-low.h: Always include "gdb_thread_db.h" instead of
8520 conditionally including thread_db.h.
8521 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8522 HAVE_THREAD_DB_H.
8523
480b27bf
JK
85242013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8525
8526 * Makefile.in (install-only): Fix make install regression.
8527
43662968
JK
85282013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8529
8530 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8531 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8532 installation.
8533 * gdbserver.1: Remove.
8534
3e74e146
PA
85352013-03-22 Pedro Alves <palves@redhat.com>
8536
8537 * linux-low.c (handle_extended_wait): Don't call
8538 linux_enable_event_reporting.
8539
a8347a2a
TT
85402013-03-15 Tony Theodore <tonyt@logyst.com>
8541
8542 PR build/9098:
8543 * Makefile.in (SHELL): Use @SHELL@.
8544
eeb56fa7
SDJ
85452013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8546
8547 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8548 compiler warning.
8549
4fa7e2ff
JB
85502013-03-13 Joel Brobecker <brobecker@adacore.com>
8551
8552 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8553 Remove extraneous NULL element.
8554
8ddb1965
YQ
85552013-03-13 Yao Qi <yao@codesourcery.com>
8556
8557 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8558 'V' block in trace frame.
8559
9accd112
MM
85602013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8561
8562 * target.h (struct target_ops): Add btrace ops.
8563 (target_supports_btrace): New macro.
8564 (target_enable_btrace): New macro.
8565 (target_disable_btrace): New macro.
8566 (target_read_btrace): New macro.
8567 * gdbthread.h (struct thread_info): Add btrace field.
8568 * server.c: Include btrace-common.h.
8569 (handle_btrace_general_set): New function.
8570 (handle_btrace_enable): New function.
8571 (handle_btrace_disable): New function.
8572 (handle_general_set): Call handle_btrace_general_set.
8573 (handle_qxfer_btrace): New function.
8574 (struct qxfer qxfer_packets[]): Add btrace entry.
8575 * inferiors.c (remove_thread): Disable btrace.
8576 * linux-low: Include linux-btrace.h.
8577 (linux_low_enable_btrace): New function.
8578 (linux_low_read_btrace): New function.
8579 (linux_target_ops): Add btrace ops.
8580 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8581 Add srv_linux_btrace=yes.
8582 (x86_64-*-linux*): Add linux-btrace.o.
8583 Add srv_linux_btrace=yes.
8584 * configure.ac: Define HAVE_LINUX_BTRACE.
8585 * config.in: Regenerated.
8586 * configure: Regenerated.
8587
5cc22e4c
MM
85882013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8589
8590 * server.c (handle_qxfer): Preserve error message if -3 is
8591 returned.
8592 (qxfer): Document the -3 return value.
8593
7c97f91e
MM
85942013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8595
8596 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8597 (linux_btrace_h): New variable.
8598 (linux-btrace.o): New rule.
8599
be9a119c 86002013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8601 Hafiz Abid Qadeer <abidh@codesourcery.com>
8602
8603 * tracepoint.c (trace_buffer_size): New global.
8604 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8605 (init_trace_buffer): Change to one-argument function. Allocate
8606 trace buffer memory.
8607 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8608 handle QTBuffer:size packet.
8609 (cmd_bigqtbuffer_size): New function.
8610 (initialize_tracepoint): Call init_trace_buffer with
8611 DEFAULT_TRACE_BUFFER_SIZE.
8612 * server.c (handle_query): Add QTBuffer:size in the
8613 supported packets.
8614
e64f7499
YQ
86152013-03-07 Yao Qi <yao@codesourcery.com>
8616
8617 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8618 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8619 of -1.
8620 (cmd_qtsp): Adjust condition. Do post increment.
8621 Set cur_action and cur_step_action back to 0.
8622
f0ae6fc3
PA
86232013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8624
8625 PR server/15236
8626 * linux-low.c (linux_write_memory): Return early success if LEN is
8627 zero.
8628
b5b0b0af
CV
86292013-03-05 Corinna Vinschen <vinschen@redhat.de>
8630
334ad4a8 8631 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8632
589bc927
TT
86332013-02-28 Tom Tromey <tromey@redhat.com>
8634
8635 * configure.ac: Invoke AC_SYS_LARGEFILE.
8636 * configure, config.in: Rebuild.
8637
dfe07582
CV
86382013-02-28 Corinna Vinschen <vinschen@redhat.com>
8639
8640 * win32-low.c: Throughout, fix format strings and casts of
8641 printf-like functions to avoid type related warnings on all
8642 platforms.
8643 (get_child_debug_event): Print dwDebugEventCode as hex since
8644 that's how it's usually documented.
8645
736cd585
YQ
86462013-02-28 Yao Qi <yao@codesourcery.com>
8647
8648 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8649 pulongest.
8650
e1f58301
JW
86512013-02-27 Jiong Wang <jiwang@tilera.com>
8652
8653 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8654 (reg-tilegx32.c): New rule.
8655 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8656 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8657 different register info initializer according to elf class.
8658 (init_registers_tilgx32): New function. The tilegx32 register info
8659 initializer.
8660 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8661 (tile_store_gregset): Likewise.
8662
d171ca78
YQ
86632013-02-27 Yao Qi <yao@codesourcery.com>
8664
8665 * server.c (process_point_options): Print debug message when
8666 debug_threads is true.
8667
282bbdf3
YQ
86682013-02-26 Yao Qi <yao@codesourcery.com>
8669
8670 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8671
aca22551
PA
86722013-02-19 Pedro Alves <palves@redhat.com>
8673 Kai Tietz <ktietz@redhat.com>
8674
8675 PR gdb/15161
8676
8677 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8678 instead of strtoul to extract address from packet.
8679 (process_serial_event) <'z'>: Likewise.
8680
4f3cee1c
YQ
86812013-02-18 Yao Qi <yao@codesourcery.com>
8682
8683 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8684
8e1d55a3
PA
86852013-02-14 Pedro Alves <palves@redhat.com>
8686
8687 Plug memory leak.
8688
8689 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8690 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8691
458820da
PA
86922013-02-14 Pedro Alves <palves@redhat.com>
8693
8694 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8695
baea0dae
PA
86962013-02-14 Pedro Alves <palves@redhat.com>
8697
8698 * tracepoint.c (save_string): Delete.
8699 (add_tracepoint_action): Use savestring instead of save_string.
8700
0b1afbb3
PA
87012013-02-12 Pedro Alves <palves@redhat.com>
8702
8703 * linux-xtensa-low.c: Ditto.
8704 * xtensa-xtregs.c: Ditto.
8705
8a4ac37e
PA
87062013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8707
8708 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8709 thread_db.
8710
148de6bb
MS
87112013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8712
8713 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8714 aarch64_num_wp_regs and aarch64_num_bp_regs to
8715 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8716
55fac6e0
MS
87172013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8718
8719 * linux-aarch64-low.c (ps_get_thread_area): Replace
8720 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8721
176eb98c
MS
87222013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8723 Marcus Shawcroft <marcus.shawcroft@arm.com>
8724 Nigel Stephens <nigel.stephens@arm.com>
8725 Yufeng Zhang <yufeng.zhang@arm.com>
8726
8727 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8728 (aarch64.c, aarch64-without-fpu.c): New targets.
8729 * configure.srv (aarch64*-*-linux*): New.
8730 * linux-aarch64-low.c: New file.
8731
56f7af9c
MS
87322013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8733
43aaf8b6 8734 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8735 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8736 (dequeue_one_deferred_signal, linux_resume_one_thread)
8737 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8738 (linux_tracefork_grandchild, linux_test_for_tracefork)
8739 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8740 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8741 where the argument is 0.
8742
60f662b0
YQ
87432013-01-25 Yao Qi <yao@codesourcery.com>
8744
8745 * event-loop.c: Include "queue.h".
8746 (gdb_event_p): New typedef.
8747 (struct gdb_event) <next_event>: Remove.
8748 (event_queue): Change to QUEUE(gdb_event_p).
8749 (async_queue_event): Remove.
8750 (gdb_event_xfree): New.
8751 (initialize_event_loop): New.
8752 (process_event): Use API from QUEUE.
8753 (wait_for_event): Likewise.
8754 * server.c (main): Call initialize_event_loop.
8755 * server.h (initialize_event_loop): Declare.
8756
5ae4861a
YQ
87572013-01-18 Yao Qi <yao@codesourcery.com>
8758
8759 * ax.h (struct eval_agent_expr_context): New.
8760 (gdb_eval_agent_expr): Update declaration.
8761 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8762 TFRAME. Add new argument CTX.
8763 * server.h (struct eval_agent_expr_context): Declare.
8764 (agent_mem_read, agent_tsv_read): Update declaration.
8765 (agent_mem_read_string): Likewise.
8766 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8767 (add_traceframe_block): Add new argument TPOINT.
8768 Increase TPOINT->traceframe_usage.
8769 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8770 eval_tracepoint_agent_expr.
8771 (condition_true_at_tracepoint): Likewise.
8772 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8773 (agent_mem_read_string, agent_tsv_read): Likewise.
8774
85e00e85
YQ
87752013-01-16 Yao Qi <yao@codesourcery.com>
8776
8777 * linux-low.c (linux_resume_one_lwp): Don't check
8778 'lwp->bp_reinsert != 0'.
8779
4039cf45
JB
87802013-01-07 Joel Brobecker <brobecker@adacore.com>
8781 Pedro Alves <palves@redhat.com>
8782
8783 * lynx-low.c (ptrace_request_to_str): Define a temporary
8784 macro and use it to simplify this function's implementation.
8785
9044dee2
JB
87862013-01-07 Joel Brobecker <brobecker@adacore.com>
8787
8788 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8789 sets errno.
8790
e6352c8f
JB
87912013-01-07 Joel Brobecker <brobecker@adacore.com>
8792
8793 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8794
50681a27
JB
87952013-01-07 Joel Brobecker <brobecker@adacore.com>
8796
8797 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8798
3f6e77ef
JB
87992013-01-07 Joel Brobecker <brobecker@adacore.com>
8800
8801 * lynx-low.c (lynx_resume): Use the resume_info parameter
8802 to determine the ptid for the lynx_ptrace call, unless
8803 it is equal to minus_one_ptid, in which case we use the
8804 ptid of the current_inferior.
8805 (lynx_wait_1): After having received a thread create/exit
8806 event, resume the inferior's execution using the signaling
8807 thread's ptid, rather than the old ptid.
8808
7fda33ae
JB
88092013-01-07 Joel Brobecker <brobecker@adacore.com>
8810
8811 * lynx-low.c (lynx_resume): Delete variable ret.
8812
b9786c74
JB
88132013-01-01 Joel Brobecker <brobecker@adacore.com>
8814
8815 * gdbreplay.c (gdbreplay_version): Update copyright year.
8816 * server.c (gdbserver_version): Likewise.
8817
8b93d60f
JB
88182012-12-17 Joel Brobecker <brobecker@adacore.com>
8819
8820 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8821 new thread.
8822
037335a7
JB
88232012-12-17 Joel Brobecker <brobecker@adacore.com>
8824
8825 * lynx-low.c (ptrace_request_to_str): Add handling for
8826 PTRACE_GETTRACESIG.
8827
52d4cbd8
JB
88282012-12-17 Joel Brobecker <brobecker@adacore.com>
8829
8830 * lynx-low.c (lynx_attach): Delete variable new_process.
8831
ab8f6ca9
JB
88322012-12-17 Joel Brobecker <brobecker@adacore.com>
8833
8834 * lynx-low.c (lynx_create_inferior): Delete variable
8835 new_process.
8836
78cbc024
JB
88372012-12-17 Joel Brobecker <brobecker@adacore.com>
8838
8839 * lynx-low.c (ptrace_request_to_str): Do not handle
8840 PTRACE_GETTHREADLIST if this macro does not exist.
8841
14a00470
YQ
88422012-12-15 Yao Qi <yao@codesourcery.com>
8843
8844 * Makefile.in (OBS): Add notif.o.
8845 * notif.c, notif.h: New.
8846 * server.c: Include "notif.h".
8847 (struct vstop_notif) <next>: Remove.
8848 <base>: New field.
8849 (queue_stop_reply): Update.
8850 (push_event, send_next_stop_reply): Remove.
8851 (discard_queued_stop_replies): Update.
8852 (notif_stop): New variable.
8853 (handle_v_stopped): Remove.
8854 (handle_v_requests): Don't call handle_v_stopped. Call
8855 handle_ack_notif instead.
8856 (queue_stop_reply_callback): Call notif_event_enque instead
8857 of queue_stop_reply.
8858 (handle_status): Don't call send_next_stop_reply, call
8859 notif_write_event instead.
8860 (kill_inferior_callback): Likewise.
8861 (detach_or_kill_inferior_callback): Likewise.
8862 (main): Call initialize_notif.
8863 (process_serial_event): Call QUEUE_is_empty.
8864 (handle_target_event): Call notif_push instead of push event.
8865 * server.h (push_event): Remove declaration.
8866
61c125b9
TT
88672012-12-10 Tom Tromey <tromey@redhat.com>
8868
8869 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8870 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8871 macros.
8872 (.c.o): Rewrite.
8873 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8874 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8875 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8876 (amd64-linux-ipa.o, ax.o): Rewrite.
8877 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8878 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8879 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8880 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8881 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8882 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8883 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8884 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8885 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8886 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8887 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8888 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8889 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8890 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8891 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8892 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8893 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8894 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8895 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8896 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8897 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8898 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8899 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8900 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8901 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8902 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8903 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8904 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8905 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8906 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8907 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8908 (reg-tilegx.o): Remove.
8909 (all_object_files): New macro.
8910 Include .deps files.
8911 * aclocal.m4, configure: Rebuild.
8912 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8913 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8914 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8915
e90e9ad9
TT
89162012-12-05 Tom Tromey <tromey@redhat.com>
8917
8918 PR gdb/14917:
8919 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8920
02d403bf 89212012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8922
8923 * configure.ac: Check for linux/perf_event.h.
8924 * config.in: Regenerated.
8925 * configure: Regenerated.
8926
0270a750
PA
89272012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8928
8929 * hostio.c (handle_readlink): Decrease buffer size
8930 parameter passed to readlink by one byte.
8931
8c29b58e
YQ
89322012-11-26 Yao Qi <yao@codesourcery.com>
8933
8934 * configure.ac (build_warnings): Append '-Wempty-body'.
8935 * configure: Regenerated.
8936 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8937 body.
8938
8bdce1ff
PM
89392012-11-15 Pierre Muller <muller@sourceware.org>
8940
8941 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8942 * config.in: Regenerate.
8943 * configure: Regenerate.
8944 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8945 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8946 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8947 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8948 header.
8949 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8950 instead of <sys/wait.h> header.
8951 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8952
02d403bf 89532012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8954
8955 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8956 (various make rules): Remove -DGDBSERVER
8957
fbd5db48
YQ
89582012-11-09 Yao Qi <yao@codesourcery.com>
8959
8960 * spu-low.c (current_ptid): Move it to ..
8961 * gdbthread.h: ... here. New.
8962 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8963 * server.c (myresume, process_serial_event): Likewise.
8964 * thread-db.c (thread_db_find_new_threads): Likewise.
8965 * tracepoint.c (run_inferior_command): Likewise.
8966
b3dc46ff
AB
89672012-10-01 Andrew Burgess <aburgess@broadcom.com>
8968
8969 * server.c (handle_search_memory_1): Include access length in
8970 warning message.
8971
07c04788
HPN
89722012-09-05 Michael Brandt <michael.brandt@axis.com>
8973
8974 * linux-crisv32-low.c: Fix compile errors.
8975
918d227b
YQ
89762012-09-04 Yao Qi <yao@codesourcery.com>
8977
8978 * tracepoint.c (cmd_qtsv): Adjust debug message.
8979 Don't check CUR_TPOINT.
8980
18c1b81a
YQ
89812012-08-28 Yao Qi <yao@codesourcery.com>
8982
8983 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8984 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8985 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8986 Remove declarations of xmalloc, xreallloc, xstrdup and
8987 freeargv.
8988 * Makefile.in (libiberty_h): New.
8989 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8990 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8991
dc82f37b
YQ
89922012-08-23 Yao Qi <yao@codesourcery.com>
8993
8994 * server.h: Remove declaration of 'xsnprintf'.
8995
406b1477
KS
89962012-08-22 Keith Seitz <keiths@redhat.com>
8997
8998 * server.h: Include build-gnulib-gbserver/config.h.
8999 * gdbreplay.c: Likewise.
9000
e6712ff1
DE
90012012-08-08 Doug Evans <dje@google.com>
9002
9003 * Makefile.in (SFILES): Add gdb_vecs.c.
9004 (OBS): Add gdb_vecs.o.
9005 (gdb_vecs_h, host_defs_h): New variables.
9006 (thread-db.o): Add $(gdb_vecs_h) dependency.
9007 (gdb_vecs.o): New rule.
9008 * thread-db.c: #include "gdb_vecs.h".
9009 (thread_db_load_search): Use a vector to iterate over path elements.
9010 Handle text appearing after "$pdir".
9011
9012 * configure.ac: Add check for strstr.
9013 * config.in: Regenerate.
9014 * configure: Regenerate.
9015
7c3270ae
UW
90162012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9017
9018 * hostio.c (handle_pread): If pread fails, fall back to attempting
9019 lseek/read.
9020 (handle_pwrite): Likewise for pwrite.
9021
b62e2b27
UW
90222012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9023
9024 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9025 between unsupported TYPE and unimplementable ADDR/LEN combination.
9026 (arm_insert_point): Act on new return value.
9027
78a99e91
PA
90282012-07-31 Pedro Alves <palves@redhat.com>
9029
9030 * server.c (process_point_options): Only skip tokens if we find
9031 one that is unrecognized. Don't treat 'X' specially while
9032 skipping unrecognized tokens.
9033
fcf303ab
UW
90342012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9035
9036 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9037 to 4-byte-align HW breakpoint addresses for Thumb.
9038
7255706c
YQ
90392012-07-27 Yao Qi <yao@codesourcery.com>
9040
9041 PR remote/14161.
9042
9043 * server.h: Declare gdb_agent_about_to_close.
9044 * target.c (kill_inferior): Include "agent.h".
9045 New. Send command 'kill'.
9046 * target.h (kill_inferior): Removed macro.
9047 * tracepoint.c (gdb_agent_about_to_close): New.
9048 (gdb_agent_helper_thread): Handle command 'close'.
9049 Wait endlessly until the inferior stops.
9050 Install gdb_agent_remove_socket to atexit hook.
9051 (agent_socket_name): New static variable.
9052 (gdb_agent_socket_init): Replace local variable 'name' with
9053 'agent_socket_name'.
9054 (gdb_agent_remove_socket): New.
9055
5a3f286f
YQ
90562012-07-27 Yao Qi <yao@codesourcery.com>
9057
9058 * server.c (process_point_options): Stop at 'X' when parsing.
9059
961bd387
ME
90602012-07-19 Michael Eager <eager@eagercon.com>
9061
a261b8f5 9062 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
9063 to hw_execute.
9064 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9065 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9066 hardware breakpoint.
9067
aa7c7447
JK
90682012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9069
9070 * gdbserver/linux-low.c (initialize_low): Call
9071 linux_ptrace_init_warnings.
9072
7f216e7c
DE
90732012-07-02 Doug Evans <dje@google.com>
9074
9075 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9076 pointer to int.
9077
d3ce09f5
SS
90782012-07-02 Stan Shebs <stan@codesourcery.com>
9079
9080 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9081 (ax.o): Add it to build rule.
9082 (ax-ipa.o): Ditto.
9083 (OBS): Add format.o.
9084 (IPA_OBS): Add format.o.
9085 * server.c (handle_query): Claim support for breakpoint commands.
9086 (process_point_options): Add command case.
9087 (process_serial_event): Leave running if there are printfs in
9088 effect.
9089 * mem-break.h (any_persistent_commands): Declare.
9090 (add_breakpoint_commands): Declare.
9091 (gdb_no_commands_at_breakpoint): Declare.
9092 (run_breakpoint_commands): Declare.
9093 * mem-break.c (struct point_command_list): New struct.
9094 (struct breakpoint): New field command_list.
9095 (any_persistent_commands): New function.
9096 (add_commands_to_breakpoint): New function.
9097 (add_breakpoint_commands): New function.
9098 (gdb_no_commands_at_breakpoint): New function.
9099 (run_breakpoint_commands): New function.
9100 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9101 locally.
9102 * ax.c: Include format.h.
9103 (ax_printf): New function.
9104 (gdb_eval_agent_expr): Add printf opcode.
9105
2f8f6aed
YQ
91062012-06-13 Yao Qi <yao@codesourcery.com>
9107
9108 * server.c (start_inferior): Remove duplicated writes to fields
9109 'last_resume_kind' and 'last_status' of 'current_inferior'.
9110
0c9070b3
YQ
91112012-06-12 Yao Qi <yao@codesourcery.com>
9112 Pedro Alves <palves@redhat.com>
9113
9114 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9115 comment.
9116 * server.c (handle_v_cont): Extend comment.
9117
c52daf70
YQ
91182012-06-11 Yao Qi <yao@codesourcery.com>
9119
9120 * linux-low.c (linux_attach): Add 'static'.
9121
d38bbb0a
YQ
91222012-06-06 Yao Qi <yao@codesourcery.com>
9123
9124 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9125
89dc0afd
JK
91262012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9127
9128 Fix gcc -flto compilation warning.
9129 * server.c (main): Make variable multi_mode and attach volatile.
9130
75f62ce7
TJB
91312012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9132
9133 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9134 if the platform doesn't know about it.
9135
65f479b6
PA
91362012-05-30 Jeff Kenton <jkenton@tilera.com>
9137
9138 * Makefile.in (SFILES): Add linux-tile-low.c.
9139 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9140 * configure.srv: Handle tilegx-*-linux*.
9141 * linux-tile-low.c: New file.
9142
0c5bf5a9
JK
91432012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9144
9145 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9146
a493e3e2
PA
91472012-05-24 Pedro Alves <palves@redhat.com>
9148
9149 PR gdb/7205
9150
43aaf8b6 9151 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 9152
2ea28649
PA
91532012-05-24 Pedro Alves <palves@redhat.com>
9154
9155 PR gdb/7205
9156
9157 Replace target_signal with gdb_signal throughout.
9158
8d409d16
MR
91592012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9160
9161 * linux-low.c (linux_store_registers): Avoid the copying sequence
9162 when no data has been retrieved by ptrace.
9163
23512c01
MGD
91642012-05-22 Will Deacon <will.deacon@arm.com>
9165
9166 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9167 Include asm/ptrace.h.
9168 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9169 already defined.
9170
4934b29e
MR
91712012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9172
9173 * linux-low.c (linux_store_registers): Don't re-retrieve data
9174 with ptrace that has already been obtained from /proc. Always
9175 copy any data retrieved with ptrace to the buffer supplied.
9176
bde24c0a
PA
91772012-05-11 Yao Qi <yao@codesourcery.com>
9178 Pedro Alves <palves@redhat.com>
9179
9180 * linux-low.c (enum stopping_threads_kind): New.
9181 (stopping_threads): Change type to `enum stopping_threads_kind'.
9182 (handle_extended_wait): If stopping and suspending threads, leave
9183 the new_lwp suspended too.
9184 (linux_wait_for_event): Adjust.
9185 (stop_all_lwps): Set `stopping_threads' to
9186 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9187 whether we're suspending threads or just stopping them. Assert no
9188 recursion happens.
9189
623b6bdf
YQ
91902012-04-29 Yao Qi <yao@codesourcery.com>
9191
9192 * server.h: Move some code to ...
9193 * gdbthread.h: ... here. New.
9194 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9195 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9196 (nto-low.o, win32-low.o): Likewise.
9197 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9198 * regcache.c, remote-utils.c, server.c: Likewise.
9199 * target.c, tracepoint.c, win32-low.c: Likewise.
9200
f15f9948
TJB
92012012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9202
9203 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9204 (PTRACE_ARG4_TYPE): Likewise.
9205 (PTRACE_XFER_TYPE): Likewise.
9206 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9207 ptrace to PTRACE_ARG3_TYPE.
9208 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9209 (PTRACE_ARG4_TYPE): Likewise.
9210 (PTRACE_XFER_TYPE): Likewise.
9211 (linux_detach_one_lwp): Cast fourth argument of
9212 ptrace to long then PTRACE_ARG4_TYPE.
9213 (regsets_fetch_inferior_registers): Cast third argument of
9214 ptrace to long then PTRACE_ARG3_TYPE.
9215 (regsets_store_inferior_registers): Likewise.
9216
38ea300a
PA
92172012-04-20 Pedro Alves <palves@redhat.com>
9218
9219 * configure: Regenerate.
9220
c971b7fa
PA
92212012-04-19 Pedro Alves <palves@redhat.com>
9222
43aaf8b6 9223 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 9224 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
9225 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9226 (all, install-only, uninstall, clean-info, all-lib, clean): No
9227 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9228 (maintainer-clean realclean distclean): Use subdir_do.
9229 (subdir_do): New.
9230 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 9231 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
9232 * acinclude.m4: Include acx_configure_dir.m4.
9233 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9234 calls. Call AC_PROG_RANLIB. Configure gnulib using
9235 ACX_CONFIGURE_DIR.
9236 (GNULIB): New.
9237 (GNULIB_STDINT_H): Adjust.
9238 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9239 * gdbreplay.c: Include build-gnulib/config.h.
9240 * server.h: Likewise.
9241 * aclocal.m4: Regenerate.
9242 * config.in: Regenerate.
9243 * configure: Regenerate.
c971b7fa 9244
809277f8
PA
92452012-04-19 Pedro Alves <palves@redhat.com>
9246
9247 * Makefile.in (LIBGNU, INCGNU): Adjust.
9248 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9249 (all, install-only, uninstall, clean-info, all-lib, clean)
9250 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9251 * configure.ac: Adjust AC_OUTPUT output.
9252 * aclocal.m4: Regenerate.
9253 * configure: Regenerate.
9254
fd9bb8b8
PA
92552012-04-19 Pedro Alves <palves@redhat.com>
9256
9257 * Makefile.in (generated_files): New.
9258 (server_h): Remove the explicit dependency on config.h, and depend
9259 on $generated_files.
9260
1c298c66
PA
92612012-04-19 Pedro Alves <palves@redhat.com>
9262
9263 * Makefile.in (INCGNU): Add -Ignulib.
9264
57c4b50b
PA
92652012-04-19 Pedro Alves <palves@redhat.com>
9266
9267 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9268 (INCGNU): ... this, and spell out -I here.
9269 (GNULIB_LIB): Rename to ...
9270 (LIBGNU): ... this.
9271 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9272
1030e047
PA
92732012-04-19 Pedro Alves <palves@redhat.com>
9274
9275 * config.in: Regenerate.
9276
447d4319
PA
92772012-04-19 Pedro Alves <palves@redhat.com>
9278
9279 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9280 * server.h (memmem): Remove declaration.
9281 * config.in: Regenerate.
9282 * configure: Regenerate.
9283
aad9eab9
YQ
92842012-04-19 Yao Qi <yao@codesourcery.com>
9285
9286 * Makefile.in (SFILES): Add common/vec.c.
9287 (OBS): Add vec.o.
9288 (vec.o): New rule.
9289
3e10640f
YQ
92902012-04-19 Yao Qi <yao@codesourcery.com>
9291
9292 * remote-utils.c (prepare_resume_reply): Replace with macro
9293 target_core_of_thread.
9294 * server.c (handle_qxfer_threads_proper): Likewise.
9295 * target.h (traget_core_of_thread): New macro.
9296
71622373
PA
92972012-04-18 Pedro Alves <palves@redhat.com>
9298
9299 * aclocal.m4: Regenerate.
9300 * configure: Regenerate.
9301
80d26939
YQ
93022012-04-16 Yao Qi <yao@codesourcery.com>
9303
9304 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9305 duplicated on address.
9306
42476b70
YQ
93072012-04-16 Yao Qi <yao@codesourcery.com>
9308
9309 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9310 (struct tracepoint_action_ops) <send>: New field.
9311 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9312 (agent_expr_send, x_tracepoint_action_send): New.
9313 (l_tracepoint_action_send): New.
9314 (cmd_qtdp): Download and install tracepoint
9315 according to `use_agent'.
9316 (run_inferior_command): Add one more parameter `len'.
9317 Update callers.
9318 (tracepoint_send_agent): New.
9319 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9320
7bc83639
YQ
93212012-04-16 Yao Qi <yao@codesourcery.com>
9322
9323 * tracepoint.c (download_tracepoints): Moved to ...
9324 (cmd_qtstart): ... here.
9325
5f18041e
YQ
93262012-04-14 Yao Qi <yao@codesourcery.com>
9327
9328 * tracepoint.c: Include inttypes.h.
9329 (struct collect_memory_action): Use sized types.
9330 (struct tracepoint): Likewise.
9331 (cmd_qtdp, stop_tracing): Update print specifiers.
9332 (cmd_qtp, response_tracepoint): Likewise.
9333 (collect_data_at_tracepoint): Likewise.
9334 (collect_data_at_step): Likewise.
9335
55a8c076
YQ
93362012-04-14 Yao Qi <yao@codesourcery.com>
9337
9338 Import gnulib module inttypes.
9339 * aclocal.m4, config.in, configure: Regenerated.
9340
dc750257
YQ
93412012-04-14 Yao Qi <yao@codesourcery.com>
9342
9343 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9344 Makefile and config.status at last.
9345
0ab5faf9
YQ
93462012-04-13 Yao Qi <yao@codesourcery.com>
9347
9348 * tracepoint.c: Include stdint.h unconditionally.
9349
18f5fd81
TJB
93502012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9351
9352 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9353 on BFD_HAVE_SYS_PROCFS_TYPE.
9354 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9355 * configure: Regenerate.
9356 * config.in: Likewise.
9357
4d47af5c
L
93582012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9359
9360 * Makefile.in (clean): Also remove x32.c x32-linux.c
9361 x32-avx.c x32-avx-linux.c.
9362 (x32.o): New target.
9363 (x32.c): Likewise.
9364 (x32-linux.o): Likewise.
9365 (x32-linux.c): Likewise.
9366 (x32-avx.o): Likewise.
9367 (x32-avx.c): Likewise.
9368 (x32-avx-linux.o): Likewise.
9369 (x32-avx-linux.c): Likewise.
9370
9371 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9372 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9373 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9374 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9375 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9376 i386/x32-avx-linux.xml.
9377
9378 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9379 (init_registers_x32_avx_linux): Likwise.
9380 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9381 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9382
ecedbe58
PA
93832012-04-13 Pedro Alves <palves@redhat.com>
9384
9385 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9386 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9387 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9388 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9389 the sub-make.
9390
c92b5177
L
93912012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9392
9393 * linux-x86-low.c (compat_x32_clock_t): New.
9394 (compat_x32_siginfo_t): Likewise.
9395 (compat_x32_siginfo_from_siginfo): Likewise.
9396 (siginfo_from_compat_x32_siginfo): Likewise.
9397 (linux_is_elf64): Likewise.
9398 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9399 and siginfo_from_compat_x32_siginfo for x32.
9400 (x86_arch_setup): Set linux_is_elf64.
9401
214d508e
L
94022012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9403
9404 PR gdb/13969
9405 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9406 e_machine field.
9407 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9408 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9409 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9410 compatible with process.
9411
c9a1864a
YQ
94122012-04-12 Yao Qi <yao@codesourcery.com>
9413
9414 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9415 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9416 (install-only, install-info, clean): Handle sub dir gnulib.
9417 (all-lib, am--refresh): New targets.
9418 (memmem.o): Remove target.
9419 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9420 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9421 (AC_REPLACE_FUNCS): Remove memmem.
9422 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9423 (AC_OUTPUT): Generate Makefile in gnulib/.
9424 * aclocal.m4, config.in, configure: Regenerated.
9425
367ba2c2
MR
94262012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9427
9428 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9429
9d236627
PA
94302012-04-05 Pedro Alves <palves@redhat.com>
9431
9432 -Werror=strict-aliasing
9433
9434 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9435 pointer.
9436
111217b3
PA
94372012-04-04 Pedro Alves <palves@redhat.com>
9438
9439 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9440 (sparc_store_gregset_from_stack, sparc_store_gregset)
9441 (sparc_breakpoint_at): Fix formatting.
9442
8365dcf5
TJB
94432012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9444
9445 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9446 are available.
9447 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9448 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9449 * config.in: Regenerate.
9450 * configure: Likewise.
9451
689cc2ae
PA
94522012-03-29 Pedro Alves <palves@redhat.com>
9453
9454 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9455 Correct ptrace arguments.
9456
c14dfd32
PA
94572012-03-28 Pedro Alves <palves@redhat.com>
9458
9459 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9460 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9461 (IA64_FR1_REGNUM): New defines.
9462 (ia64_fetch_register): New.
9463 (the_low_target): Install it.
9464 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9465 field.
9466 * linux-low.c (linux_fetch_registers): Try the
9467 the_low_target.fetch_register hook first.
9468
9469 * linux-arm-low.c (the_low_target): Adjust.
9470 * linux-bfin-low.c (the_low_target): Adjust.
9471 * linux-cris-low.c (the_low_target): Adjust.
9472 * linux-crisv32-low.c (the_low_target): Adjust.
9473 * linux-m32r-low.c (the_low_target): Adjust.
9474 * linux-m68k-low.c (the_low_target): Adjust.
9475 * linux-mips-low.c (the_low_target): Adjust.
9476 * linux-ppc-low.c (the_low_target): Adjust.
9477 * linux-s390-low.c (the_low_target): Adjust.
9478 * linux-sh-low.c (the_low_target): Adjust.
9479 * linux-sparc-low.c (the_low_target): Adjust.
9480 * linux-tic6x-low.c (the_low_target): Adjust.
9481 * linux-x86-low.c (the_low_target): Adjust.
9482 * linux-xtensa-low.c (the_low_target): Adjust.
9483
63c88e13
PA
94842012-03-26 Pedro Alves <palves@redhat.com>
9485
9486 * server.c (handle_qxfer_libraries): Don't bail early if
9487 the_target->qxfer_libraries_svr4 is not NULL.
9488
fb723180
PA
94892012-03-26 Pedro Alves <palves@redhat.com>
9490
9491 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9492
0afae3cf
PA
94932012-03-23 Pedro Alves <palves@redhat.com>
9494
9495 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9496 "library-list-svr4" element's start tag when the the DSO list is
9497 empty.
9498
485f1ee4
PA
94992012-03-23 Pedro Alves <palves@redhat.com>
9500
9501 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9502 a variable whose type size is the same as the inferior's pointer
9503 size.
9504
a5362b9a
TS
95052012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9506
9507 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9508 struct siginfo.
9509 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9510 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9511 * linux-low.h: Include <signal.h>.
9512 (struct siginfo): Remove forward declaration.
9513 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9514 struct siginfo.
9515
d226c142
MF
95162012-03-21 Mike Frysinger <vapier@gentoo.org>
9517
9518 * .gitignore: Ignore more files.
9519
122f36ef
PA
95202012-03-19 Pedro Alves <palves@redhat.com>
9521 Jan Kratochvil <jan.kratochvil@redhat.com>
9522
9523 * server.c (cont_thread, general_thread): Add describing comments.
9524 (start_inferior): Clear `cont_thread'.
9525 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9526 of a process.
9527
fc3e5175
YQ
95282012-03-15 Yao Qi <yao@codesourcery.com>
9529
9530 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9531 handling to ...
9532 (cmd_qtdp): ... here.
9533
8d0d92cd
YQ
95342012-03-15 Yao Qi <yao@codesourcery.com>
9535
9536 * tracepoint.c (struct tracepoint_action_ops): New.
9537 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9538 (m_tracepoint_action_download): New.
9539 (r_tracepoint_action_download): New.
9540 (x_tracepoint_action_download): New.
9541 (l_tracepoint_action_download): New.
9542 (add_tracepoint_action): Install `action->ops' according type.
9543 (download_tracepoint_1): Move code `download' function pointer
9544 of various tracepoint_action_ops.
9545
87b0bb13
JK
95462012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9547
9548 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9549 linux_ptrace_attach_warnings.
9550
5f572dec
JK
95512012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9552
9553 * Makefile.in (linux-ptrace.o): New.
9554 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9555 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9556 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9557 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9558 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9559 of these targets.
9560 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9561
f4647387
YQ
95622012-03-08 Yao Qi <yao@codesourcery.com>
9563 Pedro Alves <palves@redhat.com>
9564
9565 Fix PR server/13392.
9566 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9567 offset of JMP insn.
9568 * tracepoint.c (remove_tracepoint): New.
9569 (cmd_qtdp): Call remove_tracepoint when failed to install.
9570
9b224c5e
PA
95712012-03-07 Pedro Alves <palves@redhat.com>
9572
9573 * linux-low.c (get_detach_signal): New.
9574 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9575 Pass on pending signals to PTRACE_DETACH. Check the result of the
9576 ptrace call.
9577 * server.c (program_signals, program_signals_p): New.
9578 (handle_general_set): Handle QProgramSignals.
9579 * server.h (program_signals, program_signals_p): Declare.
9580
e237a7e2
JK
95812012-03-05 Pedro Alves <palves@redhat.com>
9582 Jan Kratochvil <jan.kratochvil@redhat.com>
9583
9584 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9585 New comment why.
9586
5808517f
YQ
95872012-03-03 Yao Qi <yao@codesourcery.com>
9588
9589 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9590 agent_look_up_symbols.
9591
58b4daa5
YQ
95922012-03-03 Yao Qi <yao@codesourcery.com>
9593
9594 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9595 (linux-x86-low.o): Likewise.
9596 * server.h: Remove in_process_agent_loaded.
9597 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9598 common/agent.c.
9599 Update callers.
9600
8ffcbaaf
YQ
96012012-03-03 Yao Qi <yao@codesourcery.com>
9602
9603 * tracepoint.c (gdb_agent_capability): New global.
9604 (in_process_agent_loaded_ust): Renamed to
9605 `in_process_agent_supports_ust'.
9606 Update callers.
9607 (in_process_agent_supports_ust): Call agent_capability_check.
9608 (clear_installed_tracepoints): Assert that agent supports
9609 agent.
9610
d1feda86
YQ
96112012-03-03 Yao Qi <yao@codesourcery.com>
9612
9613 * linux-low.c (linux_supports_agent): New.
9614 (linux_target_ops): Initialize field `supports_agent' with
9615 linux_supports_agent.
9616 * target.h (struct target_ops) <supports_agent>: New.
9617 (target_supports_agent): New macro.
9618 * server.c (handle_general_set): Handle packet 'QAgent'.
9619 (handle_query): Send `QAgent+'.
9620 * Makefile.in (server.o): Depends on agent.h.
9621
2fa291ac
YQ
96222012-03-03 Yao Qi <yao@codesourcery.com>
9623
9624 * Makefile.in (OBS): Add agent.o.
9625 Add new rule for agent.o.
9626 Track dependence of tracepoint.c on agent.h.
9627 * tracepoint.c (run_inferior_command_1):
9628 (run_inferior_command): Call agent_run_command.
9629 (gdb_ust_connect_sync_socket): Deleted. Move it to
9630 common/agent.c.
9631 (resume_thread, stop_thread): Likewise.
9632 (gdb_ust_socket_init): Renamed to ...
9633 (gdb_agent_socket_init): ... New.
9634 (gdb_ust_thread): Renamed to ...
9635 (gdb_agent_helper_thread): ... New.
9636 (gdb_ust_init): Move some code to ...
9637 (gdb_agent_init): ... here. New.
9638 [HAVE_UST]: Call gdb_ust_init.
9639 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9640 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9641 * config.in, configure: Regenerated.
9642
05044653
PA
96432012-03-02 Pedro Alves <palves@redhat.com>
9644
9645 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9646 * linux-low.c (struct simple_pid_list): New.
9647 (stopped_pids): New a struct simple_pid_list pointer.
9648 (add_to_pid_list, pull_pid_from_list): New.
9649 (handle_extended_wait): Don't assume the first signal new children
9650 report is SIGSTOP. Adjust call to pull_pid_from_list.
9651 (linux_wait_for_lwp): Adjust.
9652
8d00225b
YQ
96532012-03-02 Yao Qi <yao@codesourcery.com>
9654
9655 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9656 debug log.
9657
19560ba5
YQ
96582012-03-02 Yao Qi <yao@codesourcery.com>
9659
9660 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9661 `stop_pc' and `tpoint'. Update caller.
9662
1faeff08
MR
96632012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9664
9665 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9666 * linux-low.c (use_linux_regsets): New macro.
9667 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9668 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9669 (linux_register_in_regsets): New function.
9670 (usr_fetch_inferior_registers): Skip registers covered by
9671 regsets.
9672 (usr_store_inferior_registers): Likewise.
9673 (usr_fetch_inferior_registers): New macro.
9674 (usr_store_inferior_registers): Likewise.
9675 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9676 (linux_store_registers): Likewise.
9677 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9678 prototype.
9679 (init_registers_mips64_dsp_linux): Likewise.
9680 (init_registers_mips_linux): New macro.
9681 (init_registers_mips_dsp_linux): Likewise.
9682 (mips_dsp_num_regs): Likewise.
9683 (DSP_BASE, DSP_CONTROL): New fallback macros.
9684 (mips_base_regs): New macro.
9685 (mips_regmap): Use it. Fix the size.
9686 (mips_dsp_regmap): New variable.
9687 (mips_dsp_regset_bitmap): Likewise.
9688 (mips_arch_setup): New function.
9689 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9690 than mips_regmap.
9691 (mips_cannot_store_register): Likewise.
9692 (the_low_target): Update .arch_setup, .num_regs and .regmap
9693 initializers. Add .regset_bitmap initializer.
9694 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9695 initializer.
9696 * linux-bfin-low.c (the_low_target): Likewise.
9697 * linux-cris-low.c (the_low_target): Likewise.
9698 * linux-crisv32-low.c (the_low_target): Likewise.
9699 * linux-ia64-low.c (the_low_target): Likewise.
9700 * linux-m32r-low.c (the_low_target): Likewise.
9701 * linux-m68k-low.c (the_low_target): Likewise.
9702 * linux-ppc-low.c (the_low_target): Likewise.
9703 * linux-s390-low.c (the_low_target): Likewise.
9704 * linux-sh-low.c (the_low_target): Likewise.
9705 * linux-sparc-low.c (the_low_target): Likewise.
9706 * linux-tic6x-low.c (the_low_target): Likewise.
9707 * linux-x86-low.c (the_low_target): Likewise.
9708 * linux-xtensa-low.c (the_low_target): Likewise.
9709 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9710 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9711 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9712 srv_xmlfiles.
9713 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9714 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9715
c03e6ccc
YQ
97162012-02-29 Yao Qi <yao@codesourcery.com>
9717 Pedro Alves <palves@redhat.com>
9718
9719 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9720 `step_over_finished' is true.
9721
644cebc9
PA
97222012-02-27 Pedro Alves <palves@redhat.com>
9723
9724 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9725 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9726
c14d7ab2
PA
97272012-02-27 Pedro Alves <palves@redhat.com>
9728
9729 PR server/9684
9730 * linux-low.c (pid_is_stopped): New.
9731 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9732
412c89dd
LM
97332012-02-25 Luis Machado <lgustavo@codesourcery.com>
9734
9735 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9736 of conditions.
9737
b745defe
MR
97382012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9739
9740 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9741
9f3a5c85
LM
97422012-02-24 Luis Machado <lgustavo@codesourcery>
9743
9744 * server.c (handle_query): Advertise support for target-side
9745 breakpoint condition evaluation.
9746 (process_point_options): New function.
9747 (process_serial_event): When inserting a breakpoint, check for
9748 a target-side condition that should be evaluated.
9749
9750 * mem-break.c: Include regcache.h and ax.h.
9751 (point_cond_list_t): New data structure.
9752 (breakpoint) <cond_list>: New field.
9753 (find_gdb_breakpoint_at): Make non-static.
9754 (delete_gdb_breakpoint_at): Clear any target-side
9755 conditions.
9756 (clear_gdb_breakpoint_conditions): New function.
9757 (add_condition_to_breakpoint): Likewise.
9758 (add_breakpoint_condition): Likewise.
9759 (gdb_condition_true_at_breakpoint): Likewise.
9760 (gdb_breakpoint_here): Return result directly instead
9761 of going through a local variable.
9762
9763 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9764 (clear_gdb_breakpoint_conditions): Likewise.
9765 (add_breakpoint_condition): Likewise.
9766 (gdb_condition_true_at_breakpoint): Likewise.
9767
9768 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9769 (need_step_over_p): Take target-side breakpoint condition into
9770 consideration.
9771
5e1dc496
LM
97722012-02-24 Luis Machado <lgustavo@codesourcery>
9773
9774 * server.h: Include tracepoint.h.
9775 (agent_mem_read, agent_get_trace_state_variable_value,
9776 agent_set_trace_state_variable_value,
9777 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9778 get_set_tsv_func_addr): New prototypes.
9779
9780 * ax.h: New include file.
9781 * ax.c: New source file.
9782
9783 * tracepoint.c: Include ax.h.
9784 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9785 agent_expr, eval_result_type): Move to ax.h.
9786 (parse_agent_expr): Rename to ...
9787 (gdb_parse_agent_expr): ... this, make it non-static and move
9788 to ax.h.
9789 (unparse_agent_expr) Rename to ...
9790 (gdb_unparse_agent_expr): ... this, make it non-static and move
9791 to ax.h.
9792 (eval_agent_expr): Rename to ...
9793 (eval_tracepoint_agent_expr): ... this.
9794 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9795 forward declarations.
9796 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9797 (agent_get_trace_state_variable_value): New function.
9798 (agent_set_trace_state_variable_value): New function.
9799 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9800 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9801 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9802 (condition_true_at_tracepoint): Likewise.
9803 (parse_agent_expr): Rename to ...
9804 (gdb_parse_agent_expr): ... this and move to ax.c.
9805 (unparse_agent_expr): Rename to ...
9806 (gdb_unparse_agent_expr): ... this and move to ax.c.
9807 (gdb_agent_op_name): Move to ax.c.
9808 (eval_agent_expr): Rename to ...
9809 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9810 and move to ax.c.
9811 (eval_tracepoint_agent_expr): New function.
9812 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9813 non-static.
5e1dc496
LM
9814 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9815 ax.c.
9816 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9817 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9818 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9819 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9820 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9821 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9822 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9823 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9824 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9825 (compile_bytecodes): Remove forward declaration.
9826 (is_goto_target): Move to ax.c.
9827 (compile_bytecodes): Move to ax.c and call
9828 agent_get_trace_state_variable_value (...) and
9829 agent_set_trace_state_variable_value (...).
9830
9831 * Makefile.in: Update ax.c and IPA dependencies.
9832
277e4e52
PA
98332012-02-24 Pedro Alves <palves@redhat.com>
9834
9835 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9836 (cmd_bigqtbuffer_circular): ... this. Only handle
9837 'QTBuffer:circular:'.
9838 (handle_tracepoint_general_set): Adjust.
9839
bf4c19f7
YQ
98402012-02-16 Yao Qi <yao@codesourcery.com>
9841
9842 * inferiors.c: Move code to ...
9843 * dll.c: .... here. New.
9844 * server.h: Declare clear_dlls.
9845 * Makefile.in (SFILES): Add dll.c.
9846 (OBS): Add dll.o
9847 (dll.o): New rule.
9848
d73f2619
YQ
98492012-02-11 Yao Qi <yao@codesourcery.com>
9850
9851 * server.c: (handle_monitor_command): Add a new parameter
9852 `own_buf'.
9853 (handle_query): Update caller.
9854
f8255c2a
JB
98552012-02-09 Joel Brobecker <brobecker@adacore.com>
9856
9857 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9858 * configure, config.in: Regenerate.
9859 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9860 is not defined.
9861
da84f473
PA
98622012-02-02 Pedro Alves <palves@redhat.com>
9863
9864 Try SIGKILL first, then PTRACE_KILL.
9865 * linux-low.c (linux_kill_one_lwp): New.
9866 (linux_kill_one_lwp): Rename to ...
9867 (kill_one_lwp_callback): ... this. Use the new
9868 linux_kill_one_lwp.
9869
e886a173
PA
98702012-02-02 Pedro Alves <palves@redhat.com>
9871
9872 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9873 inferior.
9874
be07f1a2
PA
98752012-01-27 Pedro Alves <palves@redhat.com>
9876
9877 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9878 (elf_64_file_p): Make static.
9879 (linux_pid_exe_is_elf_64_file): New.
9880 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9881 Delete declarations.
9882 (linux_pid_exe_is_elf_64_file): Declare.
9883 * linux-x86-low.c (x86_arch_setup): Use
9884 linux_pid_exe_is_elf_64_file.
9885
d8301ad1
JK
98862012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9887
9888 * linux-low.c (linux_wait_for_event_1): Rename to ...
9889 (linux_wait_for_event): ... here and merge it with former
9890 linux_wait_for_event - new variable wait_ptid, use it.
9891 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9892
01b17894
PA
98932012-01-23 Pedro Alves <palves@redhat.com>
9894
9895 * server.c (main): Avoid yet another case of infinite loop while
9896 detaching/killing after a longjmp.
9897
e825046f
JK
98982012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9899
9900 Code cleanup.
9901 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9902
b9e7b9c3
UW
99032012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9904
9905 * hostio.c (handle_readlink): New function.
9906 (handle_vFile): Call it to handle "vFile:readlink" packets.
9907
901f9912
UW
99082012-01-20 Pedro Alves <palves@redhat.com>
9909 Ulrich Weigand <ulrich.weigand@linaro.org>
9910
9911 * server.c (handle_v_requests): Only support vAttach and vRun to
9912 start multiple processes when in extended protocol mode.
9913
fc1ab1a0
PA
99142012-01-17 Pedro Alves <palves@redhat.com>
9915
9916 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9917 memalign plus mprotect to allocate the scratch buffer.
9918
7d5d4e98
PA
99192012-01-13 Pedro Alves <palves@redhat.com>
9920
9921 * server.c (attach_inferior): Clear `cont_thread'.
9922
f128d5e9
PA
99232012-01-13 Pedro Alves <palves@redhat.com>
9924
9925 * server.c (main): Avoid infinite loop while detaching/killing
9926 after a longjmp.
9927
06db92f0
DE
99282012-01-09 Doug Evans <dje@google.com>
9929
9930 * server.c (start_inferior): Set last_ptid in --wrapper case.
9931
32d92999
YQ
99322012-01-06 Yao Qi <yao@codesourcery.com>
9933
9934 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9935 defined.
9936 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9937
5e0a92a9
YQ
99382012-01-04 Yao Qi <yao@codesourcery.com>
9939
9940 * tracepoint.c (cmd_qtdp): Print debug message
9941 for static tracepoint.
9942
ae639e8c
YQ
99432012-01-04 Yao Qi <yao@codesourcery.com>
9944
9945 * tracepoint.c (trace_vdebug): Differentiate debug message
9946 between gdbserver and IPA.
9947
f72429c5
YQ
99482012-01-03 Yao Qi <yao@codesourcery.com>
9949
9950 * tracepoint.c (tracepoint_was_hit): Don't collect for
9951 static tracepoint.
9952
12c3e59c
JB
99532012-01-02 Joel Brobecker <brobecker@adacore.com>
9954
9955 * terminal.h: Reformat copyright header.
9956
67827812
JB
99572012-01-02 Joel Brobecker <brobecker@adacore.com>
9958
9959 * server.c (gdbserver_version): Update copyright year.
9960 * gdbreplay.c (gdbreplay_version): Likewise.
9961
3e52c33d
JK
99622011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9963
9964 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9965
9966 Revert:
9967 2011-12-18 Hui Zhu <teawater@gmail.com>
9968 * linux-low.c (linux_create_inferior): Save return value to ret.
9969
66f1260e
HZ
99702011-12-18 Hui Zhu <teawater@gmail.com>
9971
9972 * linux-low.c (linux_create_inferior): Save return value to ret.
9973
e77616d7
DE
99742011-12-16 Doug Evans <dje@google.com>
9975
e7b06c57
DE
9976 * linux-low.c (linux_create_inferior): If stdio connection,
9977 redirect stdin from /dev/null, stdout to stderr.
9978 * remote-utils.c (remote_is_stdio): New static global.
9979 (remote_connection_is_stdio): New function.
9980 (remote_prepare): Handle stdio connection.
9981 (remote_open): Ditto.
9982 (remote_close): Don't close stdin for stdio connections.
9983 (read_prim,write_prim): New functions. Replace all calls to
9984 read/write to these.
9985 * server.c (main): Watch for "-" argument. Move call to
9986 remote_prepare before start_inferior.
9987 * server.h (STDIO_CONNECTION_NAME): New macro.
9988 (remote_connection_is_stdio): Declare.
9989
e77616d7
DE
9990 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9991 in debugging output.
9992
82067193
YQ
99932011-12-15 Yao Qi <yao@codesourcery.com>
9994
9995 * tracepoint.c: Include sys/syscall.h.
9996 (gdb_ust_thread): Remove preprocessor conditional.
9997
82bfbe7e
PA
99982011-12-14 Pedro Alves <pedro@codesourcery.com>
9999
10000 * linux-low.c (linux_detach_one_lwp): Call
10001 the_low_target.prepare_to_resume before detaching.
10002
712c6575
YQ
100032011-12-14 Yao Qi <yao@codesourcery.com>
10004
10005 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10006 of write.
10007
d54d1edf
YQ
100082011-12-14 Yao Qi <yao@codesourcery.com>
10009
10010 * i386-low.c (i386_low_stopped_data_address): Initialize local
10011 variable `control'.
10012
6210a125
PA
100132011-12-13 Pedro Alves <pedro@codesourcery.com>
10014
10015 PR remote/13492
10016
10017 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10018 DR_CONTROL unless necessary. Extend comments.
10019 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10020 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10021
2ece8244
YQ
100222011-12-13 Yao Qi <yao@codesourcery.com>
10023
10024 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10025 macros.
10026 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10027
784867a5
JK
100282011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10029
10030 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10031 Print new debug message for such case.
10032
6bf36717
JK
100332011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10034
10035 Fix overlapping memcpy.
10036 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10037 the read_inferior_memory transfer.
10038 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10039 write_inferior_memory transfer.
10040 (set_fast_tracepoint_jump): New variable buf. Use it for the
10041 read_inferior_memory and write_inferior_memory transfers.
10042 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10043 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10044 Use it for the write_inferior_memory transfer.
10045 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10046 buffers.
10047
50275556
MR
100482011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10049
10050 * linux-low.c (fetch_register, store_register): Make code
10051 consistent, fix formatting.
10052
7325beb4
MR
100532011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10054
10055 * linux-low.c (usr_store_inferior_registers): Factor out code
10056 to handle individual registers into...
10057 (store_register): ... this new function.
10058
c642a434
UW
100592011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10060
10061 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10062 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10063 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10064 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10065 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10066 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10067 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10068 (srv_xmlfiles): Add new XML files.
10069
10070 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10071 and <sys/uio.h>.
10072 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10073 (init_registers_s390_linux32v1): Add prototype.
10074 (init_registers_s390_linux32v2): Likewise.
10075 (init_registers_s390_linux64v1): Likewise.
10076 (init_registers_s390_linux64v2): Likewise.
10077 (init_registers_s390x_linux64v1): Likewise.
10078 (init_registers_s390x_linux64v2): Likewise.
10079 (s390_num_regs): Increment to 52.
10080 (s390_regmap): Add orig_r2 register.
10081 (s390_num_regs_3264): Increment to 68.
10082 (s390_regmap_3264): Add orig_r2 register.
10083 (s390_collect_ptrace_register): Handle orig_r2 register.
10084 (s390_supply_ptrace_register): Likewise.
10085 (s390_fill_last_break): New function.
10086 (s390_store_last_break): Likewise.
10087 (s390_fill_system_call): New function.
10088 (s390_store_system_call): Likewise.
10089 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10090 register sets.
10091 (s390_check_regset): New function.
10092 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10093 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10094 Update target_regsets for available register sets.
10095
2268b414
JK
100962011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10097 Jan Kratochvil <jan.kratochvil@redhat.com>
10098
10099 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10100 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10101 New.
10102 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10103 * linux-low.h (struct process_info_private): New member r_debug.
10104 * server.c (handle_qxfer_libraries): Call
10105 the_target->qxfer_libraries_svr4.
10106 (handle_qxfer_libraries_svr4): New function.
10107 (qxfer_packets): New entry "libraries-svr4".
10108 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10109 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10110 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10111 PACKET_qXfer_libraries_svr4.
10112
d6db1fab
UW
101132011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10114
10115 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10116 PSW address/mask between 8-byte and 16-byte formats.
10117 (s390_supply_ptrace_register): Likewise.
10118 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10119 basic addressing mode bit.
10120
242f5f1c
SS
101212011-11-24 Stan Shebs <stan@codesourcery.com>
10122
10123 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10124
f196051f
SS
101252011-11-17 Stan Shebs <stan@codesourcery.com>
10126
10127 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10128 (tracing_start_time): New global.
10129 (tracing_stop_time): New global.
10130 (tracing_user_name): New global.
10131 (tracing_notes): New global.
10132 (tracing_stop_note): New global.
10133 (cmd_qtstart): Set traceframe_usage, start_time.
10134 (stop_tracing): Set stop_time.
10135 (cmd_qtstatus): Report additional status.
10136 (cmd_qtp): New function.
10137 (handle_tracepoint_query): Call it.
10138 (cmd_qtnotes): New function.
10139 (handle_tracepoint_general_set): Call it.
10140 (get_timestamp): Rename from tsv_get_timestamp.
10141
405f8e94
SS
101422011-11-14 Stan Shebs <stan@codesourcery.com>
10143 Kwok Cheung Yeung <kcy@codesourcery.com>
10144
10145 * linux-x86-low.c (small_jump_insn): New.
10146 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10147 trampoline and error message, build a trampoline and issue a small
10148 jump instruction to it.
10149 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10150 trampoline and error message.
10151 (x86_get_min_fast_tracepoint_insn_len): New.
10152 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10153 * linux-low.h (struct linux_target_ops): Add arguments to
10154 install_fast_tracepoint_jump_pad operation, add new operation.
10155 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10156 arguments.
10157 (linux_get_min_fast_tracepoint_insn_len): New function.
10158 (linux_target_op): Add new operation.
10159 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10160 (gdb_trampoline_buffer_end): Ditto.
10161 (gdb_trampoline_buffer_error): Ditto.
10162 (struct ipa_sym_addresses): Add fields for new IPA variables.
10163 (symbol_list): Add entries for new IPA variables.
10164 (struct tracepoint): Add fields to hold the address range of the
10165 trampoline used by the tracepoint.
10166 (trampoline_buffer_head): New static variable.
10167 (trampoline_buffer_tail): Ditto.
10168 (claim_trampoline_space): New function.
10169 (have_fast_tracepoint_trampoline_buffer): New function.
10170 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10171 structure.
10172 (install_fast_tracepoint): Ditto, also add error buffer argument.
10173 (cmd_qtminftpilen): New function.
10174 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10175 (fast_tracepoint_from_trampoline_address): New function.
10176 (fast_tracepoint_collecting): Handle trampoline as part of jump
10177 pad space.
10178 (set_trampoline_buffer_space): New function.
10179 (initialize_tracepoint): Initialize new IPA variables.
10180 * target.h (struct target_ops): Add arguments to
10181 install_fast_tracepoint_jump_pad operation, add new
10182 get_min_fast_tracepoint_insn_len operation.
10183 (target_get_min_fast_tracepoint_insn_len): New.
10184 (install_fast_tracepoint_jump_pad): Add arguments.
10185 * server.h (IPA_BUFSIZ): Define.
10186 * linux-i386-ipa.c: Include extra header files.
10187 (initialize_fast_tracepoint_trampoline_buffer): New function.
10188 (initialize_low_tracepoint): Call it.
10189 * server.h (set_trampoline_buffer_space): Declare.
10190 (claim_trampoline_space): Ditto.
10191 (have_fast_tracepoint_trampoline_buffer): Ditto.
10192
1e4d1764
YQ
101932011-11-14 Yao Qi <yao@codesourcery.com>
10194
10195 * server.c (handle_query): Handle InstallInTrace for qSupported.
10196 * tracepoint.c (add_tracepoint): Sort list.
10197 (install_tracepoint, download_tracepoint): New.
10198 (cmd_qtdp): Call them to install and download tracepoints.
10199 (sort_tracepoints): Removed.
10200 (cmd_qtstart): Update.
10201
5c73ff4e
YQ
102022011-11-14 Yao Qi <yao@codesourcery.com>
10203
10204 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10205 * mem-break.h: Declare.
10206 * tracepoint.c (cmd_qtstart): Move some code to ...
10207 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10208 New.
10209 (download_tracepoints): Move some code to ...
10210 (download_tracepoint_1): ... here. New.
10211
86a30030
YQ
102122011-11-08 Yao Qi <yao@codesourcery.com>
10213
10214 * remote-utils.c (relocate_instruction): A comment fix.
10215
8d26e50c
JB
102162011-11-07 Joel Brobecker <brobecker@adacore.com>
10217
10218 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10219 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10220 dr_status_mirror and dr_control_mirror from debug_reg_state.
10221 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10222 (i386_initial_stuff): Remove use of deleted globals.
10223 (i386_get_thread_context, i386_set_thread_context,
10224 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10225 from debug_reg_state.
10226
a59306a3
YQ
102272011-11-05 Yao Qi <yao@codesourcery.com>
10228
10229 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10230 address as TPOINT's.
10231
3065dfb6
SS
102322011-11-02 Stan Shebs <stan@codesourcery.com>
10233
10234 * tracepoint.c (agent_mem_read_string): New function.
10235 (eval_agent_expr): Call it for tracenz.
10236 * server.c (handle_query): Report support for tracenz.
10237
fd0d8c7c
YQ
102382011-11-02 Yao Qi <yao@codesourcery.com>
10239
10240 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10241
609086b1
YQ
102422011-11-02 Yao Qi <yao@codesourcery.com>
10243
10244 * target.h: Fix a typo in comment.
10245
b9fd1791
PA
102462011-10-31 Pedro Alves <pedro@codesourcery.com>
10247
10248 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10249 clobber the breakpoints' shadows with fast tracepoint jumps.
10250 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10251 * target.c (write_inferior_memory): Also pass MYADDR down to
10252 check_mem_write.
10253
03583c20
UW
102542011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10255
10256 * configure.ac: Check support for personality routine.
10257 * configure: Regenerate.
10258 * config.in: Likewise.
10259 * linux-low.c: Include <sys/personality.h>.
10260 Define ADDR_NO_RANDOMIZE if necessary.
10261 (linux_create_inferior): Disable address space randomization when
10262 forking inferior, if requested.
10263 (linux_supports_disable_randomization): New function.
10264 (linux_target_ops): Install it.
10265 * server.h (disable_randomization): Declare.
10266 * server.c (disable_randomization): New global variable.
10267 (handle_general_set): Handle QDisableRandomization.
10268 (handle_query): Likewise for qSupported.
10269 (main): Support --disable-randomization and --no-disable-randomization
10270 command line arguments.
10271 * target.h (struct target_ops): Add supports_disable_randomization.
10272 (target_supports_disable_randomization): New macro.
10273
723b724b
MF
102742011-09-29 Mike Frysinger <vapier@gentoo.org>
10275
10276 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10277 ifdef check.
10278 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10279 [!PT_GETDSBT] (target_loadmap): New definition.
10280 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10281 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10282 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10283 and PT_GETDSBT to LINUX_LOADMAP.
10284 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10285 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10286
55329a5c 102872011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
10288
10289 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10290 (arm_linux_hwbp_cap): New static variable.
10291 (arm_linux_get_hwbp_cap): Replace by ...
10292 (arm_linux_init_hwbp_cap): ... this new function.
10293 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10294 (arm_linux_get_hw_watchpoint_count): Likewise.
10295 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10296 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10297 (arm_prepare_to_resume): Use perror_with_name instead of error.
10298
55329a5c 102992011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
10300
10301 * linux-arm-low.c: Include <signal.h>.
10302 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10303 (struct arm_linux_hwbp_cap): New data type.
10304 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10305 (struct arm_linux_hw_breakpoint): New data type.
10306 (MAX_BPTS, MAX_WPTS): Define.
10307 (struct arch_process_info, struct arch_lwp_info): New data types.
10308 (arm_linux_get_hwbp_cap): New function.
10309 (arm_linux_get_hw_breakpoint_count): Likewise.
10310 (arm_linux_get_hw_watchpoint_count): Likewise.
10311 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10312 (arm_hwbp_control_initialize): Likewise.
10313 (arm_hwbp_control_is_enabled): Likewise.
10314 (arm_hwbp_control_is_initialized): Likewise.
10315 (arm_hwbp_control_disable): Likewise.
10316 (arm_linux_hw_breakpoint_equal): Likewise.
10317 (arm_linux_hw_point_initialize): Likewise.
10318 (struct update_registers_data): New data structure.
10319 (update_registers_callback: New function.
10320 (arm_insert_point): Likewise.
10321 (arm_remove_point): Likewise.
10322 (arm_stopped_by_watchpoint): Likewise.
10323 (arm_stopped_data_address): Likewise.
10324 (arm_new_process): Likewise.
10325 (arm_new_thread): Likewise.
10326 (arm_prepare_to_resume): Likewise.
10327 (the_low_target): Register arm_insert_point, arm_remove_point,
10328 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10329 arm_new_thread, and arm_prepare_to_resume.
10330
6b9801d4
SS
103312011-09-15 Stan Shebs <stan@codesourcery.com>
10332
10333 * server.h (struct emit_ops): Add compare-goto fields.
10334 * tracepoint.c (gdb_agent_op_sizes): New table.
10335 (emit_eq_goto): New function.
10336 (emit_ne_goto): New function.
10337 (emit_lt_goto): New function.
10338 (emit_le_goto): New function.
10339 (emit_gt_goto): New function.
10340 (emit_ge_goto): New function.
10341 (is_goto_target): New function.
10342 (compile_bytecodes): Recognize special cases of compare-goto
10343 combinations and call specialized emitters for them.
10344 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10345 (amd64_emit_ne_goto): New function.
10346 (amd64_emit_lt_goto): New function.
10347 (amd64_emit_le_goto): New function.
10348 (amd64_emit_gt_goto): New function.
10349 (amd64_emit_ge_goto): New function.
10350 (amd64_emit_ops): Add the new functions.
10351 (i386_emit_eq_goto): New function.
10352 (i386_emit_ne_goto): New function.
10353 (i386_emit_lt_goto): New function.
10354 (i386_emit_le_goto): New function.
10355 (i386_emit_gt_goto): New function.
10356 (i386_emit_ge_goto): New function.
10357 (i386_emit_ops): Add the new functions.
10358
bf15cbda
SS
103592011-09-08 Stan Shebs <stan@codesourcery.com>
10360
10361 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10362 (i386_emit_epilogue): Restore %ebx.
10363
943ca1dd
JZ
103642011-08-31 Jie Zhang <jzhang918@gmail.com>
10365
10366 * server.c (step_thread): Remove definition.
10367 (process_serial_event): Don't handle Hs.
10368 * server.h (step_thread): Remove declaration.
10369 * target.c (set_desired_inferior): Remove use of step_thread.
10370
e3deef73
LM
103712011-08-24 Luis Machado <lgustavo@codesourcery.com>
10372
10373 * linux-low.c: Include linux-procfs.h.
10374 (linux_attach_lwp_1): Update comments.
10375 (linux_attach): Scan for existing threads when attaching to a
10376 process that is the tgid.
10377 * Makefile.in: Update dependencies.
10378
13da1c97
LM
103792011-08-24 Luis Machado <lgustavo@codesourcery.com>
10380
10381 * configure.srv: Add linux-procfs.o dependencies.
10382
881127c9
YQ
103832011-08-14 Yao Qi <yao@codesourcery.com>
10384
10385 * target.h (struct target_ops): Fix indent.
10386 * win32-low.c (win32_target_ops): Fix comment.
10387
58dbd541
YQ
103882011-08-14 Andrew Jenner <andrew@codesourcery.com>
10389 Yao Qi <yao@codesourcery.com>
10390
10391 * Makefile.in (clean): Remove tic6x-*.c files.
10392 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10393 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10394 (tic6x-c64xp-linux.c): Likewise.
10395 * configure.srv: Add support for tic6x-*-uclinux.
10396 * linux-tic6x-low.c: New.
10397 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10398
78d85199
YQ
103992011-08-14 Andrew Stubbs <ams@codesourcery.com>
10400 Yao Qi <yao@codesourcery.com>
10401
10402 * target.h (struct target_ops): Add read_loadmap.
10403 * linux-low.c (struct target_loadseg): New type.
10404 (struct target_loadmap): New type.
10405 (linux_read_loadmap): New function.
10406 (linux_target_ops): Add linux_read_loadmap.
10407 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
10408 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10409 to NULL.
78d85199 10410
a959a88d
EZ
104112011-08-05 Eli Zaretskii <eliz@gnu.org>
10412
10413 * win32-low.c: Include <stdint.h>.
10414
1ced966e
PA
104152011-07-22 Pedro Alves <pedro@codesourcery.com>
10416
10417 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10418 to the inferior here.
10419 (i386_remove_aligned_watchpoint): Ditto.
10420 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10421 fit part of the watchpoint in the debug registers.
10422 (i386_update_inferior_debug_regs): New.
10423 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10424 registers, and only update the inferior on success.
10425 (i386_low_remove_watchpoint): Ditto.
10426
d26e3629
KY
104272011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10428
10429 * linux-low.c (compare_ints, unique, list_threads, show_process,
10430 linux_core_of_thread): Delete.
10431 (linux_target_ops): Change linux_core_of_thread to
10432 linux_common_core_of_thread.
10433 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10434 * utils.c (malloc_failure): Change type of argument.
10435 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10436 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10437 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10438 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10439 (IPA_OBJS): Add common-utils-ipa.o.
10440 (ptid_h, linux_osdata_h): New macros.
10441 (server_h): Add common/common-utils.h, common/xml-utils.h,
10442 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10443 common/ptid.h.
10444 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10445 ptid.o, buffer.o): New rules.
10446 (linux-low.o): Add common/linux-osdata.h as a dependency.
10447 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10448 * configure.ac: Add AC_HEADER_DIRENT check.
10449 * config.in: Regenerate.
10450 * configure: Regenerate.
10451 * remote-utils.c (xml_escape_text): Delete.
10452 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10453 buffer_xml_printf): Move to common/buffer.c.
10454 * server.c (main): Remove call to initialize_inferiors.
10455 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10456 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10457 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10458 internal_error, gdb_assert, gdb_assert_fail): Delete.
10459 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10460 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10461 common/buffer.h.
10462 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10463 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10464 initialize_inferiors): Delete.
10465
2275a1a7
PA
104662011-07-20 Pedro Alves <pedro@codesourcery.com>
10467
10468 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10469 symbol error.
10470
0a5b1e09
PA
104712011-05-31 Pedro Alves <pedro@codesourcery.com>
10472
10473 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10474 assertion.
10475 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10476
6938fd34
YQ
104772011-05-26 Yao Qi <yao@codesourcery.com>
10478
10479 * Makefile.in (thread-db.o): Track dependence to
10480 common/gdb_thread_db.h.
10481 * thread-db.c: include gdb_thread_db.h from right place.
10482
b481f9e0
TT
104832011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10484
10485 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10486 __FILE__ and __LINE__ to internal_error.
10487
98a5dd13
DE
104882011-05-13 Doug Evans <dje@google.com>
10489
10490 * thread-db.c (try_thread_db_load_from_sdir): New function.
10491 (try_thread_db_load_from_dir): New function.
10492 (thread_db_load_search): Handle $sdir, ignore $pdir.
10493 Remove trying of system directories if search of
10494 libthread-db-search-path fails, that is now done via $sdir.
10495
d248b706
KY
104962011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10497
10498 * server.c (handle_query): Add EnableDisableTracepoints to the list
10499 of supported features.
43aaf8b6 10500 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10501 tracepoints.
43aaf8b6
PA
10502 (cmd_qtenable_disable): New.
10503 (cmd_qtstart): Install tracepoints even if disabled.
10504 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10505 receiving a QTEnable or QTDisable packet.
10506 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10507 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10508 tracepoints.
10509 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10510
84e578fb
DE
105112011-05-10 Doug Evans <dje@google.com>
10512
10513 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10514
71f55dd8
DE
105152011-05-04 Doug Evans <dje@google.com>
10516
10517 * linux-low.c (linux_join): Skip process lookup.
10518 * spu-low.c (spu_join): Ditto.
10519 * server.c (join_inferiors_callback): Delete.
10520 (process_serial_event): For 'D' packet (detach) call join_inferior
10521 directly.
10522
4d393d60
JM
105232011-05-04 Joseph Myers <joseph@codesourcery.com>
10524
10525 * README: Don't mention xscale*-*-linux*.
10526 * configure.srv (xscale*-*-linux*): Don't handle target.
10527
b00ad6ff
NF
105282011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10529
10530 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10531 casting pointers.
10532 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10533 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10534 (i386_emit_void_call_2): Likewise.
10535
af96c192
YQ
105362011-04-26 Yao Qi <yao@codesourcery.com>
10537
43aaf8b6
PA
10538 * linux-low.c: Move common macros to linux-ptrace.h.
10539 Include linux-ptrace.h.
af96c192
YQ
10540 * Makefile.in (linux_ptrace_h): New.
10541 (linux-low.o): Depends on linux-ptrace.h.
10542
03f2bd59
JK
105432011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10544
10545 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10546 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10547 (remote_prepare): New function with most of the TCP code from ...
10548 (remote_open): ... here. Detect PORT here unconditionally. Move also
10549 setting transport_is_reliable.
10550 * server.c (run_once): New variable.
10551 (gdbserver_usage): Document it.
10552 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10553 the first run if RUN_ONCE.
10554 * server.h (run_once, remote_prepare): New declarations.
10555
7a9dd1b2
TT
105562011-04-19 Tom Tromey <tromey@redhat.com>
10557
10558 * win32-low.c (handle_load_dll): Remove duplicate "the".
10559
81239425
PM
105602011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10561
10562 Remove support for old Cygwin 1.5 versions.
10563 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10564 function to avoid warning.
10565 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10566 warning.
10567
9e0627f1
PM
105682011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10569
10570 * gdbserver/server.h (Macro _): Define it if not available.
10571
588eebee
MS
105722011-03-14 Michael Snyder <msnyder@vmware.com>
10573
348af9f7 10574 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10575
43f70d4c
JB
105762011-03-10 Joel Brobecker <brobecker@adacore.com>
10577
10578 * Makefile.in (maintainer-clean realclean distclean): Remove
10579 "make ... subdir_do" command.
10580
348af9f7
MS
105812011-03-10 Michael Snyder <msnyder@vmware.com>
10582
10583 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10584
10585 * server.c (handle_v_run): Free alloced buffer on early return.
10586
e637a4f5
YQ
105872011-03-09 Yao Qi <yao@codesourcery.com>
10588
10589 Revert:
10590 2011-03-04 Yao Qi <yao@codesourcery.com>
10591
10592 * Makefile.in: Remove GNU make feature --directory.
10593
10594 2011-03-05 Yao Qi <yao@codesourcery.com>
10595
10596 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10597 (subdir_do): New make target. Copied from gdb/Makefile.
10598 (maintainer-clean, realclean, distclean, clean): Call corresponding
10599 make targets in common/Makefile.
10600
10601 2011-02-11 Yao Qi <yao@codesourcery.com>
10602
10603 * configure.ac: Call AC_PROG_RANLIB.
10604 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10605 * configure: Regenerate.
10606
e6edda56
JK
106072011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10608
10609 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10610
e5141119
JB
106112011-03-06 Yao Qi <yao@codesourcery.com>
10612
10613 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10614
64794aa4
JB
106152011-03-05 Yao Qi <yao@codesourcery.com>
10616
10617 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10618 (subdir_do): New make target. Copied from gdb/Makefile.
10619 (maintainer-clean, realclean, distclean, clean): Call corresponding
10620 make targets in common/Makefile.
10621
7a762829
YQ
106222011-03-04 Yao Qi <yao@codesourcery.com>
10623
10624 * Makefile.in: Remove GNU make feature --directory.
10625
348af9f7
MS
106262011-03-04 Michael Snyder <msnyder@vmware.com>
10627
10628 * server.c (queue_stop_reply): Call xmalloc not malloc.
10629
106302011-03-02 Michael Snyder <msnyder@vmware.com>
10631
10632 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10633
9f72fee2
MS
106342011-02-28 Michael Snyder <msnyder@vmware.com>
10635
588eebee
MS
10636 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10637 (cmd_qtframe): Ditto.
10638 (cmd_qtbuffer): Ditto.
10639 (cmd_bigqtbuffer): Ditto.
10640
9f72fee2
MS
10641 * utils.c (decimal2str): Initialize 'width' to nine, then
10642 don't mess with it.
10643
8040bd49
UW
106442011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10645
10646 * hostio.c (require_data): Free *data, not data.
10647
7e52cbd0
JK
106482011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10649
10650 * hostio.c (require_data): Use free, not xfree.
10651
9130f83e
MS
106522011-02-27 Michael Snyder <msnyder@vmware.com>
10653
4b812f4e
MS
10654 * server.c (handle_query): Discard unused value.
10655
9130f83e
MS
10656 * hostio.c (require_data): Free malloc memory before returning
10657 error.
10658
69d37113
MS
106592011-02-26 Michael Snyder <msnyder@vmware.com>
10660
10661 * linux-low.c (list_threads): Call closedir for dirent.
10662
35f5825a
MS
106632011-02-27 Michael Snyder <msnyder@vmware.com>
10664
2a589cef
MS
10665 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10666 a case statement falls through.
10667
0adea5f7
MS
10668 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10669
35f5825a
MS
10670 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10671 in comparison.
10672
238f1c74
MS
106732011-02-26 Michael Snyder <msnyder@vmware.com>
10674
10675 * utils.c (decimal2str): Eliminate dead code and dead param.
10676 (pulongest): Drop dead param from call to decimal2str.
10677 (plongest): Ditto.
10678
633ff500
JB
106792011-02-24 Joel Brobecker <brobecker@adacore.com>
10680
10681 Revert the following patch (not approved yet):
10682 2011-02-21 Hui Zhu <teawater@gmail.com>
10683 * tracepoint.c (tp_printf): New function.
10684 (eval_agent_expr): Handle gdb_agent_op_printf.
10685
f9c6ff72
HZ
106862011-02-21 Hui Zhu <teawater@gmail.com>
10687
10688 * tracepoint.c (tp_printf): New function.
10689 (eval_agent_expr): Handle gdb_agent_op_printf.
10690
94d5e490
TT
106912011-02-18 Tom Tromey <tromey@redhat.com>
10692
10693 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10694 (tracepoint.o): Likewise.
10695 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10696 (gdb_agent_op_names): Likewise.
10697
c7f96d2b
TT
106982011-02-18 Tom Tromey <tromey@redhat.com>
10699
10700 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10701 gdb_agent_op_rot>: New constants.
10702 (gdb_agent_op_names): Add pick and roll.
10703 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10704 cases.
10705
0feedb2c
JK
107062011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10707
10708 * aclocal.m4: Regenerated with aclocal-1.11.1.
10709
b3b9301e
PA
107102011-02-14 Pedro Alves <pedro@codesourcery.com>
10711
10712 * server.c (handle_qxfer_traceframe_info): New.
10713 (qxfer_packets): Register "traceframe-info".
10714 (handle_query): Report support for qXfer:traceframe-info:read+.
10715 * tracepoint.c (match_blocktype): New.
10716 (traceframe_find_block_type): Rename to ...
10717 (traceframe_walk_blocks): ... this. Add callback filter argument,
10718 and use it.
10719 (traceframe_find_block_type): New, reimplemented on top of
10720 traceframe_walk_blocks.
10721 (build_traceframe_info_xml): New.
10722 (traceframe_read_info): New.
10723 * server.h (traceframe_read_info): Declare.
10724
4f3e6fb7
YQ
107252011-02-11 Yao Qi <yao@codesourcery.com>
10726
10727 * configure.ac: Call AC_PROG_RANLIB.
10728 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10729 * configure: Regenerate.
10730
764880b7
PA
107312011-02-07 Pedro Alves <pedro@codesourcery.com>
10732
10733 * server.c (gdb_read_memory): Change return semantics to allow
10734 partial transfers.
10735 (handle_search_memory_1): Adjust.
10736 (process_serial_event) <'m' packet>: Handle partial transfers.
10737 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10738
1c79eb8a
PA
107392011-01-28 Pedro Alves <pedro@codesourcery.com>
10740
10741 * regcache.c (init_register_cache): Initialize
10742 regcache->register_status.
10743 (free_register_cache): Release regcache->register_status.
10744 (regcache_cpy): Copy register_status.
10745 (registers_to_string): Print 'x's for unavailable registers.
10746 (supply_register): Mark the register's status valid or
10747 unavailable, depending on whether a buffer was passed in or not.
10748 (supply_register_zeroed): New.
10749 (supply_regblock): Mark the registers' status valid or
10750 unavailable, depending on whether a buffer was passed in or not.
10751 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10752 (struct regcache): New `register_status' field.
10753 (supply_register_zeroed): Declare.
10754 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10755 supply_register_zeroed, rather than passing a NULL buffer to
10756 supply_register.
10757 * tracepoint.c (fetch_traceframe_registers): Update comment.
10758
85724a0e
PA
107592011-01-28 Pedro Alves <pedro@codesourcery.com>
10760
10761 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10762 buffer explicit.
10763
d08aafef
PA
107642011-01-25 Pedro Alves <pedro@codesourcery.com>
10765
10766 * server.h (decode_xfer_write): Change prototype.
10767 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10768 and don't extract the annex here.
10769 * server.c (decode_xfer_read): Remove `annex' parameter,
10770 and don't extract the annex here.
10771 (decode_xfer): New.
10772 (struct qxfer): New.
10773 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10774 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10775 (handle_qxfer_statictrace): New functions, abstracted out from
10776 handle_query, and made to use the struct qxfer interface.
10777 (handle_threads_qxfer_proper): Rename to ...
10778 (handle_qxfer_threads_proper): ... this.
10779 (handle_threads_qxfer): Rename to ...
10780 (handle_qxfer_threads): ... this. Adjust.
10781 (qxfer_packets): New array.
10782 (handle_qxfer): New function.
10783 (handle_query): Use handle_qxfer.
10784
493e2a69
MS
107852011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10786
10787 * gdbreplay.c: Shorten lines of >= 80 columns.
10788 * linux-low.c: Ditto.
10789 * linux-ppc-low.c: Ditto.
10790 * linux-s390-low.c: Ditto.
10791 * linux-sparc-low.c: Ditto.
10792 * linux-x86-low.c: Ditto.
10793 * linux-xtensa-low.c: Ditto.
10794 * mem-break.c: Ditto.
10795 * nto-low.c: Ditto.
10796 * regcache.h: Ditto.
10797 * remote-utils.c: Ditto.
10798 * server.c: Ditto.
10799 * server.h: Ditto.
10800 * thread-db.c: Ditto.
10801 * tracepoint.c: Ditto.
10802 * utils.c: Ditto.
10803 * win32-low.h: Ditto.
10804
44944448
JB
108052011-01-05 Joel Brobecker <brobecker@adacore.com>
10806
10807 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10808 update.
10809
71ce852c
JB
108102011-01-01 Joel Brobecker <brobecker@adacore.com>
10811
10812 * server.c (gdbserver_version): Update copyright year in version
10813 output.
10814 * gdbreplay.c (gdbreplay_version): Ditto.
10815
eb826dc6
MF
108162010-12-29 Jie Zhang <jie.zhang@analog.com>
10817
10818 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10819 * linux-bfin-low.c: New file.
10820 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10821 PT_DATA_ADDR for BFIN targets.
10822 * Makefile.in (SFILES): Add linux-bfin-low.c.
10823 (clean): Remove reg-bfin.c.
10824 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10825 * README: Mention supported Blackfin targets.
10826
39ab222a
MF
108272010-12-23 Mike Frysinger <vapier@gentoo.org>
10828
10829 * .gitignore: New file.
10830
a1f2ce7d
MF
108312010-11-16 Mike Frysinger <vapier@gentoo.org>
10832
10833 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10834
f474844c
JZ
108352010-10-22 Jie Zhang <jie@codesourcery.com>
10836
10837 * Makefile.in: Add FLAGS_TO_PASS variable.
10838 (install): Remove dependency of install-only and recursively
10839 invoke make for install-only.
10840
f1048712
DE
108412010-10-04 Doug Evans <dje@google.com>
10842
10843 * Makefile.in (uninstall): Use $(DESTDIR).
10844
b53a1623
PA
108452010-09-24 Pedro Alves <pedro@codesourcery.com>
10846
e6ee044d
PA
10847 PR gdb/11842
10848
b53a1623
PA
10849 * linux-x86-low.c (compat_siginfo_from_siginfo)
10850 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10851 si_code is < 0. Check for si_code == SI_TIMER before checking for
10852 si_code < 0.
10853
fa1bd1e4
JB
108542010-09-13 Joel Brobecker <brobecker@adacore.com>
10855
10856 * lynx-i386-low.c: New file.
10857 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10858
47fac8f8
JB
108592010-09-13 Joel Brobecker <brobecker@adacore.com>
10860
10861 * lynx-low.c (ptrace_request_to_str): Remove handling for
10862 request values that have been removed in LynxOS 5.x.
10863
1adfc54d
JB
108642010-09-13 Joel Brobecker <brobecker@adacore.com>
10865
10866 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10867 <ptrace.h>
10868
c2a66c29
NS
108692010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10870
10871 * configure.ac: Add --enable-inprocess-agent option.
10872 * configure: Rebuilt.
10873
32fcada3
YQ
108742010-09-06 Yao Qi <yao@codesourcery.com>
10875
10876 * linux-low.c (linux_kill): Remove unused variable.
10877 (linux_stabilize_threads): Likewise.
10878 * server.c (start_inferior): Likewise.
10879 (queue_stop_reply_callback): Likewise.
10880 * tracepoint.c (do_action_at_tracepoint): Likewise.
10881
0cccb683
YQ
108822010-09-06 Yao Qi <yao@codesourcery.com>
10883
10884 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10885 on return.
10886
423ec54c
JK
108872010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10888
10889 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10890
12ac6819
PA
108912010-09-06 Pedro Alves <pedro@codesourcery.com>
10892
10893 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10894 "$(IPA_DEPFILES)".
10895
8ed54b31
JB
108962010-09-01 Joel Brobecker <brobecker@adacore.com>
10897
10898 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10899 gdbserver/lynx-ppc-low.c: New files.
10900 * Makefile.in (lynx_low_h): New variable.
10901 (lynx-low.o, lynx-ppc-low.o): New rules.
10902 * configure.ac: On LynxOS, link with -lnetinet.
10903 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10904 * configure: regenerate.
10905
bb0116a4
JB
109062010-09-01 Joel Brobecker <brobecker@adacore.com>
10907
10908 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10909 * configure.ac: Add check for vasprintf and vsnprintf.
10910 * configure, config.in: Regenerate.
10911 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10912
a778ab81 109132010-09-01 Joel Brobecker <brobecker@adacore.com>
10914
10915 * gdbreplay.c: Move include of alloca.h up, next to include of
10916 malloc.h.
10917 * server.h: Add include of malloc.h.
10918 * mem-break.c: Remove include of malloc.h.
10919 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10920
8b034a19 109212010-09-01 Joel Brobecker <brobecker@adacore.com>
10922
10923 * Makefile.in (memmem.o): Build with -Wno-error.
10924
109252010-09-01 Joel Brobecker <brobecker@adacore.com>
10926
10927 * utils.c (xsnprintf): Make non-static.
10928 * server.h: Add xsnprintf declaration.
10929 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10930 replace calls to snprintf by calls to xsnprintf throughout.
10931
109322010-09-01 Joel Brobecker <brobecker@adacore.com>
10933
10934 * configure.ac: Add configure check for alloca.
10935 * configure, config.in: Regenerate.
10936 * server.h: Include alloca.h if it exists.
10937 * gdbreplay.c: Include alloca.h if it exists.
10938
1a981360
PA
109392010-08-28 Pedro Alves <pedro@codesourcery.com>
10940
10941 * linux-low.c (__SIGRTMIN): Define if not already defined.
10942 (linux_create_inferior): Check for __ANDROID__ rather than
10943 __SIGRTMIN.
10944 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10945 are already deferred.
10946 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10947 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10948 stopped and already has a pending signal to report.
10949 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10950 a pending signal to report or is moving out of a jump pad.
10951 (linux_init_signals): Check for __ANDROID__ rather than
10952 __SIGRTMIN.
10953
b4d51a55
PA
109542010-08-28 Pedro Alves <pedro@codesourcery.com>
10955
10956 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10957 debug_threads check. Avoid a linear search when not doing debug
10958 output.
10959
ec48365d
PA
109602010-08-27 Pedro Alves <pedro@codesourcery.com>
10961
10962 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10963 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10964 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10965 (process_event): Change local fd's type to gdb_fildes_t.
10966 (create_file_handler): Adjust prototype.
10967 (delete_file_handler): Adjust prototype.
10968 (handle_file_event): Adjust prototype. Use pfildes.
10969 (create_file_event): Adjsut prototype.
10970 * remote-utils.c (remote_desc, listen_desc): Change type to
10971 gdb_fildes_t.
10972 * server.h: New gdb_fildes_t typedef.
10973 [USE_WIN32API]: Include winsock2.h.
10974 (delete_file_handler, add_file_handler): Adjust prototypes.
10975 (pfildes): Declare.
10976 * utils.c (pfildes): New.
10977
854d88f0
PA
109782010-08-27 Pedro Alves <pedro@codesourcery.com>
10979
10980 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10981 * configure: Regenerate.
10982
0146f85b
PA
109832010-08-27 Pedro Alves <pedro@codesourcery.com>
10984
10985 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10986 (linux_done_accessing_memory): ... this.
10987 (linux_target_ops): Adjust.
10988 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10989 * nto-low.c (nto_target_ops): Adjust comment.
10990 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10991 * spu-low.c (spu_target_ops): Adjust comment.
10992 * target.h (target_ops): Rename unprepare_to_access_memory field
10993 to done_accessing_memory.
10994 (unprepare_to_access_memory): Rename to ...
10995 (done_accessing_memory): ... this.
10996
90d74c30
PA
109972010-08-26 Pedro Alves <pedro@codesourcery.com>
10998
10999 * linux-low.c (linux_prepare_to_access_memory): New.
11000 (linux_unprepare_to_access_memory): New.
11001 (linux_target_ops): Install them.
11002 * server.c (read_memory): Rename to ...
11003 (gdb_read_memory): ... this. Use
11004 prepare_to_access_memory/prepare_to_access_memory.
11005 (write_memory): Rename to ...
11006 (gdb_write_memory): ... this. Use
11007 prepare_to_access_memory/prepare_to_access_memory.
11008 (handle_search_memory_1): Adjust.
11009 (process_serial_event): Adjust.
11010 * target.h (struct target_ops): New fields
11011 prepare_to_access_memory and unprepare_to_access_memory.
11012 (prepare_to_access_memory, unprepare_to_access_memory): New.
11013 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11014 prepare_to_access_memory/prepare_to_access_memory.
11015 * nto-low.c (nto_target_ops): Adjust.
11016 * spu-low.c (spu_target_ops): Adjust.
11017 * win32-low.c (win32_target_ops): Adjust.
11018
fd467969
PA
110192010-08-26 Pedro Alves <pedro@codesourcery.com>
11020
11021 * Makefile.in (WARN_CFLAGS): Get it from configure.
11022 (WERROR_CFLAGS): New.
11023 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11024 * configure.ac: Introduce --enable-werror, which adds -Werror to
11025 the compiler command line. Enabled by default. Disable with
11026 --disable-werror. Add -Wdeclaration-after-statement
11027 Wpointer-arith and -Wformat-nonliteral to warning flags.
11028 * configure: Regenerate.
11029
331e2f5f
PA
110302010-08-26 Pedro Alves <pedro@codesourcery.com>
11031
11032 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11033
e581f2b4
PA
110342010-08-26 Pedro Alves <pedro@codesourcery.com>
11035
11036 * gdbreplay.c (remote_error): New.
11037 (gdbchar): New.
11038 (expect): Use gdbchar. Check for error reading from GDB.
11039 Clarify sync error output.
11040 (play): Check for errors writing to GDB.
11041 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11042 * remote-utils.c (getpkt): Check for errors writing to the remote
11043 descriptor.
11044
3c11dd79
PA
110452010-08-25 Pedro Alves <pedro@codesourcery.com>
11046
11047 * linux-low.c (linux_wait_1): Move non-debugging code out of
11048 `debug_threads' control.
11049
d20a8ad9
PA
110502010-08-25 Pedro Alves <pedro@codesourcery.com>
11051
11052 * linux-low.c (linux_wait_1): Don't set last_status here.
11053 * server.c (push_event, queue_stop_reply_callback): Assert we're
11054 not pushing a TARGET_WAITKIND_IGNORE event.
11055 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11056 (myresume, handle_target_event): Set the thread's last_resume_kind
11057 and last_status from the target returned status.
11058
964e4306
PA
110592010-08-25 Pedro Alves <pedro@codesourcery.com>
11060
11061 PR threads/10729
11062
11063 * linux-x86-low.c (update_debug_registers_callback): New.
11064 (i386_dr_low_set_addr): Use it.
11065 (i386_dr_low_get_addr): New.
11066 (i386_dr_low_set_control): Use update_debug_registers_callback.
11067 (i386_dr_low_get_control): New.
11068 (i386_dr_low_get_status): Adjust.
11069 * linux-low.c (linux_stop_lwp): New.
11070 * linux-low.h (linux_stop_lwp): Declare.
11071
11072 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11073 argument instead of a i386_debug_reg_state.
11074 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11075 a i386_debug_reg_state.
11076 (i386_insert_aligned_watchpoint): Adjust.
11077 (i386_remove_aligned_watchpoint): Adjust.
11078 (i386_low_stopped_data_address): Read the debug registers from the
11079 inferior instead of from the mirrors.
11080 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11081 (i386_dr_low_get_addr): Declare.
11082 (i386_dr_low_get_control): Declare.
11083 (i386_dr_low_get_status): Change prototype.
11084
11085 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11086 (i386_dr_low_get_addr): New.
11087 (i386_dr_low_get_control): New.
11088 (i386_dr_low_get_status): Adjust prototype. Return
11089 dr_status_mirror.
11090 (i386_initial_stuff): Clear dr_status_mirror and
11091 dr_control_mirror.
11092 (i386_get_thread_context): Adjust.
11093 (i386_set_thread_context): Adjust.
11094 (i386_thread_added): Adjust.
11095
5f21a75b
PA
110962010-08-24 Pedro Alves <pedro@codesourcery.com>
11097
11098 * linux-low.h (linux_thread_area): Delete declaration.
11099
3e4c1235
TS
111002010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11101
11102 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11103 after its termination.
11104
1971b033
PA
111052010-08-09 Pedro Alves <pedro@codesourcery.com>
11106
11107 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11108 (gdb_wants_all_stopped): Delete.
11109 (linux_wait_1): Don't call them.
11110 * server.c (handle_v_cont): Tag all threads as want-stopped.
11111 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11112 stopped as "client-wants-stopped".
11113
310444ac
PA
111142010-07-31 Pedro Alves <pedro@codesourcery.com>
11115
11116 * Makefile.in (signals_h): New.
11117 (server_h): Depend on it.
11118 (server.o): Don't depend on $(signals_def).
11119 (signals.o): Depend on $(signals_def).
11120
a19cae16
JK
111212010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11122
11123 * Makefile.in (signals_def): New.
11124 (server_h): Append include/gdb/signals.h and signals_def.
11125 (server.o): Append signals_def.
11126
30d50328
JK
111272010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11128
11129 * server.c (handle_target_event): Use target_signal_to_host for
11130 resume_info.sig initialization.
11131 * target.h (struct thread_resume) <sig>: New comment.
11132
5c3216e2
OS
111332010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11134
c6f46ca0
OS
11135 * server.c (handle_query): strcpy() the returned string from paddress()
11136 instead of sprintf().
5c3216e2
OS
11137 * utils.c (paddress): Return phex_nz().
11138
6bd31874
JB
111392010-07-07 Joel Brobecker <brobecker@adacore.com>
11140
11141 * server.c (handle_v_cont): Call mourn_inferior if process
11142 just exited.
11143 (myresume): Likewise.
11144
0fb4aa4b
PA
111452010-07-01 Pedro Alves <pedro@codesourcery.com>
11146
11147 Static tracepoints, and integration with UST.
11148
11149 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11150 * mem-break.c (uninsert_all_breakpoints)
11151 (reinsert_all_breakpoints): New.
11152 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11153 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11154 (gdb_agent_ust_loaded, helper_thread_id)
11155 (gdb_agent_helper_thread_id): New macros.
11156 (struct ipa_sym_addresses): Add addr_ust_loaded,
11157 addr_helper_thread_id, addr_cmd_buf.
11158 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11159 (in_process_agent_loaded_ust): New.
11160 (write_e_ust_not_loaded): New.
11161 (maybe_write_ipa_ust_not_loaded): New.
11162 (struct collect_static_trace_data_action): New.
11163 (enum tracepoint_type) <static_tracepoint>: New.
11164 (struct tracepoint) <handle>: Mention static tracepoints.
11165 (struct static_tracepoint_ctx): New.
11166 (CMD_BUF_SIZE): New.
11167 (add_tracepoint_action): Handle static tracepoint actions.
11168 (unprobe_marker_at): New.
11169 (clear_installed_tracepoints): Handle static tracepoints.
11170 (cmd_qtdp): Handle static tracepoints.
11171 (probe_marker_at): New.
11172 (cmd_qtstart): Handle static tracepoints.
11173 (response_tracepoint): Handle static tracepoints.
11174 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11175 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11176 (get_context_regcache): Handle static tracepoints.
11177 (do_action_at_tracepoint): Handle static tracepoint actions.
11178 (traceframe_find_block_type): Handle static trace data blocks.
11179 (traceframe_read_sdata): New.
11180 (download_tracepoints): Download static tracepoint actions.
11181 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11182 (GDB_PROBE_NAME): New.
11183 (ust_ops): New.
11184 (GET_UST_SYM): New.
11185 (USTF): New.
11186 (dlsym_ust): New.
11187 (ust_marker_to_static_tracepoint): New.
11188 (gdb_probe): New.
11189 (collect_ust_data_at_tracepoint): New.
11190 (gdb_ust_probe): New.
11191 (UNIX_PATH_MAX, SOCK_DIR): New.
11192 (gdb_ust_connect_sync_socket): New.
11193 (resume_thread, stop_thread): New.
11194 (run_inferior_command): New.
11195 (init_named_socket): New.
11196 (gdb_ust_socket_init): New.
11197 (cstr_to_hexstr): New.
11198 (next_st): New.
11199 (first_marker, next_marker): New.
11200 (response_ust_marker): New.
11201 (cmd_qtfstm, cmd_qtsstm): New.
11202 (unprobe_marker_at, probe_marker_at): New.
11203 (cmd_qtstmat, gdb_ust_thread): New.
11204 (gdb_ust_init): New.
11205 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11206 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11207 (ST_REGENTRY): New.
11208 (x86_64_st_collect_regmap): New.
11209 (X86_64_NUM_ST_COLLECT_GREGS): New.
11210 (AMD64_RIP_REGNUM): New.
11211 (supply_static_tracepoint_registers): New.
11212 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11213 (ST_REGENTRY): New.
11214 (i386_st_collect_regmap): New.
11215 (i386_NUM_ST_COLLECT_GREGS): New.
11216 (supply_static_tracepoint_registers): New.
11217 * server.c (handle_query): Handle qXfer:statictrace:read.
11218 <qSupported>: Report support for StaticTracepoints, and
11219 qXfer:statictrace:read features.
11220 * server.h (traceframe_read_sdata)
11221 (supply_static_tracepoint_registers): Declare.
11222 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11223 (unpack_varlen_hex): Include in IPA build.
11224 * Makefile.in (ustlibs, ustinc): New.
11225 (IPA_OBJS): Add remote-utils-ipa.o.
11226 ($(IPA_LIB)): Link -ldl and -lpthread.
11227 (UST_CFLAGS): New.
11228 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11229 * config.in, configure: Regenerate.
11230
9e4344e5
PA
112312010-06-20 Ian Lance Taylor <iant@google.com>
11232 Pedro Alves <pedro@codesourcery.com>
11233
11234 * linux-x86-low.c (always_true): Delete.
11235 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11236 trying to fool the compiler with always_true.
11237
c6beb2cb
PA
112382010-06-20 Pedro Alves <pedro@codesourcery.com>
11239
11240 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11241 conditions in gdbserver.
11242
d2ed6730
UW
112432010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11244
11245 * spu-low.c (spu_read_memory): Wrap around local store limit.
11246 (spu_write_memory): Likewise.
11247
4e29fb54
PA
112482010-06-15 Pedro Alves <pedro@codesourcery.com>
11249
11250 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11251 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11252 LONGEST uses.
11253 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11254 uses.
11255 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11256 uses with LONGEST uses.
11257
6a271cae
PA
112582010-06-14 Stan Shebs <stan@codesourcery.com>
11259 Pedro Alves <pedro@codesourcery.com>
11260
11261 Bytecode compiler.
11262
11263 * linux-x86-low.c: Include limits.h.
11264 (add_insns): New.
11265 (always_true): New.
11266 (EMIT_ASM): New.
11267 (EMIT_ASM32): New.
11268 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11269 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11270 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11271 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11272 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11273 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11274 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11275 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11276 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11277 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11278 (amd64_emit_void_call_2): New.
11279 (amd64_emit_ops): New.
11280 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11281 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11282 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11283 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11284 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11285 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11286 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11287 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11288 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11289 (i386_emit_stack_adjust, i386_emit_int_call_1)
11290 (i386_emit_void_call_2): New.
11291 (i386_emit_ops): New.
11292 (x86_emit_ops): New.
11293 (the_low_target): Install x86_emit_ops.
11294 * server.h (struct emit_ops): New.
11295 (get_raw_reg_func_addr): Declare.
11296 (current_insn_ptr, emit_error): Declare.
11297 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11298 (set_trace_state_variable_value): New defines.
11299 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11300 addr_get_trace_state_variable_value and
11301 addr_set_trace_state_variable_value.
11302 (symbol_list): New fields for get_raw_reg,
11303 get_trace_state_variable_value and set_trace_state_variable_value.
11304 (condfn): New typedef.
11305 (struct tracepoint): New field `compiled_cond'.
11306 (do_action_at_tracepoint): Clear compiled_cond.
11307 (get_trace_state_variable_value, set_trace_state_variable_value):
11308 Export in the IPA.
11309 (condition_true_at_tracepoint): If there's a compiled condition,
11310 run that.
11311 (current_insn_ptr, emit_error): New globals.
11312 (struct bytecode_address): New.
11313 (get_raw_reg_func_addr): New.
11314 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11315 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11316 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11317 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11318 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11319 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11320 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11321 (compile_tracepoint_condition, compile_bytecodes): New.
11322 * target.h (emit_ops): Forward declare.
11323 (struct target_ops): New field emit_ops.
11324 (target_emit_ops): New.
11325 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11326 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11327 * linux-low.c (linux_emit_ops): New.
11328 (linux_target_ops): Install it.
11329 * linux-low.h (struct linux_target_ops): New field emit_ops.
11330
92b72907
UW
113312010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11332
11333 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11334 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11335
fa593d66
PA
113362010-06-01 Pedro Alves <pedro@codesourcery.com>
11337 Stan Shebs <stan@codesourcery.com>
11338
11339 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11340 (all): Depend on $(extra_libraries).
11341 (install-only): Install the IPA.
11342 (IPA_OBJS, IPA_LIB): New.
11343 (clean): Remove the IPA lib.
11344 (IPAGENT_CFLAGS): New.
11345 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11346 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11347 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11348 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11349 * configure.ac: Check for atomic builtins support in the compiler.
11350 (IPA_DEPFILES, extra_libraries): Define.
11351 * configure.srv (ipa_obj): Add description.
11352 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11353 (i[34567]86-*-linux*): Set ipa_obj.
11354 (x86_64-*-linux*): Set ipa_obj.
11355 * linux-low.c (stabilizing_threads): New.
11356 (supports_fast_tracepoints): New.
11357 (linux_detach): Stabilize threads before detaching.
11358 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11359 the lwp is either not stabilizing, or is moving out of a jump pad.
11360 (linux_fast_tracepoint_collecting): New.
11361 (maybe_move_out_of_jump_pad): New.
11362 (enqueue_one_deferred_signal): New.
11363 (dequeue_one_deferred_signal): New.
11364 (linux_wait_for_event_1): If moving out of a jump pad, defer
11365 pending signals to later.
11366 (linux_stabilize_threads): New.
11367 (linux_wait_1): Check if threads need moving out of jump pads, and
11368 do it if so.
11369 (stuck_in_jump_pad_callback): New.
11370 (move_out_of_jump_pad_callback): New.
11371 (lwp_running): New.
11372 (linux_resume_one_lwp): Handle moving out of jump pads.
11373 (linux_set_resume_request): Dequeue deferred signals.
11374 (need_step_over_p): Also step over fast tracepoint jumps.
11375 (start_step_over): Also uninsert fast tracepoint jumps.
11376 (finish_step_over): Also reinsert fast tracepoint jumps.
11377 (linux_install_fast_tracepoint_jump): New.
11378 (linux_target_ops): Install linux_stabilize_threads and
11379 linux_install_fast_tracepoint_jump_pad.
11380 * linux-low.h (linux_target_ops) <get_thread_area,
11381 install_fast_tracepoint_jump_pad>: New fields.
11382 (struct lwp_info) <collecting_fast_tracepoint,
11383 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11384 (linux_get_thread_area): Declare.
11385 * linux-x86-low.c (jump_insn): New.
11386 (x86_get_thread_area): New.
11387 (append_insns): New.
11388 (push_opcode): New.
11389 (amd64_install_fast_tracepoint_jump_pad): New.
11390 (i386_install_fast_tracepoint_jump_pad): New.
11391 (x86_install_fast_tracepoint_jump_pad): New.
11392 (the_low_target): Install x86_get_thread_area and
11393 x86_install_fast_tracepoint_jump_pad.
11394 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11395 (struct fast_tracepoint_jump): New.
11396 (fast_tracepoint_jump_insn): New.
11397 (fast_tracepoint_jump_shadow): New.
11398 (find_fast_tracepoint_jump_at): New.
11399 (fast_tracepoint_jump_here): New.
11400 (delete_fast_tracepoint_jump): New.
11401 (set_fast_tracepoint_jump): New.
11402 (uninsert_fast_tracepoint_jumps_at): New.
11403 (reinsert_fast_tracepoint_jumps_at): New.
11404 (set_breakpoint_at): Use write_inferior_memory.
11405 (uninsert_raw_breakpoint): Use write_inferior_memory.
11406 (check_mem_read): Mask out fast tracepoint jumps.
11407 (check_mem_write): Mask out fast tracepoint jumps.
11408 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11409 (set_fast_tracepoint_jump): Declare.
11410 (delete_fast_tracepoint_jump)
11411 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11412 (reinsert_fast_tracepoint_jumps_at): Declare.
11413 * regcache.c: Don't compile many functions when building the
11414 in-process agent library.
11415 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11416 the register buffer in the heap.
11417 (free_register_cache): If the register buffer isn't owned by the
11418 regcache, don't free it.
11419 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11420 pre-existing register caches.
11421 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11422 type.
11423 (convert_ascii_to_int): : Constify `from' parameter type.
11424 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11425 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11426 the needed buffer in-place.
11427 (relocate_instruction): New.
11428 * server.c (handle_query) <qSymbols>: If the target supports
11429 tracepoints, give it a chance of looking up symbols. Report
11430 support for fast tracepoints.
11431 (handle_status): Stabilize threads.
11432 (process_serial_event): Adjust.
11433 * server.h (struct fast_tracepoint_jump): Forward declare.
11434 (struct process_info) <fast_tracepoint_jumps>: New field.
11435 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11436 (decode_X_packet, decode_M_packet): Adjust.
11437 (relocate_instruction): Declare.
11438 (in_process_agent_loaded): Declare.
11439 (tracepoint_look_up_symbols): Declare.
11440 (struct fast_tpoint_collect_status): Declare.
11441 (fast_tracepoint_collecting): Declare.
11442 (force_unlock_trace_buffer): Declare.
11443 (handle_tracepoint_bkpts): Declare.
11444 (initialize_low_tracepoint)
11445 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11446 * target.h (struct target_ops) <stabilize_threads,
11447 install_fast_tracepoint_jump_pad>: New fields.
11448 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11449 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11450 [HAVE_STDINT_H]: Include stdint.h.
11451 (trace_debug_1): Rename to ...
11452 (trace_vdebug): ... this.
11453 (trace_debug): Rename to ...
11454 (trace_debug_1): ... this. Add `level' parameter.
11455 (trace_debug): New.
11456 (ATTR_USED, ATTR_NOINLINE): New.
11457 (IP_AGENT_EXPORT): New.
11458 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11459 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11460 (about_to_request_buffer_space, trace_buffer_is_full)
11461 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11462 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11463 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11464 (traceframe_write_count, traceframes_created)
11465 (trace_state_variables)
11466 New renaming defines.
11467 (struct ipa_sym_addresses): New.
11468 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11469 (symbol_list): New.
11470 (ipa_sym_addrs): New.
11471 (all_tracepoint_symbols_looked_up): New.
11472 (in_process_agent_loaded): New.
11473 (write_e_ipa_not_loaded): New.
11474 (maybe_write_ipa_not_loaded): New.
11475 (tracepoint_look_up_symbols): New.
11476 (debug_threads) [IN_PROCESS_AGENT]: New.
11477 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11478 (UNKNOWN_SIDE_EFFECTS): New.
11479 (stop_tracing): New.
11480 (flush_trace_buffer): New.
11481 (stop_tracing_bkpt): New.
11482 (flush_trace_buffer_bkpt): New.
11483 (read_inferior_integer): New.
11484 (read_inferior_uinteger): New.
11485 (read_inferior_data_pointer): New.
11486 (write_inferior_data_pointer): New.
11487 (write_inferior_integer): New.
11488 (write_inferior_uinteger): New.
11489 (struct collect_static_trace_data_action): Delete.
11490 (enum tracepoint_type): New.
11491 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11492 <actions_str, step_actions, step_actions_str>: Only include in
11493 GDBserver.
fa593d66
PA
11494 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11495 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11496 (tracepoints): Use IP_AGENT_EXPORT.
11497 (last_tracepoint): Don't include in the IPA.
11498 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11499 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11500 (alloced_trace_state_variables): New.
11501 (trace_state_variables): Use IP_AGENT_EXPORT.
11502 (traceframe_t): Delete unused variable.
11503 (circular_trace_buffer): Don't include in the IPA.
11504 (trace_buffer_start): Delete.
11505 (struct trace_buffer_control): New.
11506 (trace_buffer_free): Delete.
11507 (struct ipa_trace_buffer_control): New.
11508 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11509 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11510 New.
11511 (trace_buffer_ctrl): New.
11512 (TRACE_BUFFER_CTRL_CURR): New.
11513 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11514 Reimplement as macros.
11515 (trace_buffer_wrap): Delete.
11516 (traceframe_write_count, traceframe_read_count)
11517 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11518 (struct tracepoint_hit_ctx) <type>: New field.
11519 (struct fast_tracepoint_ctx): New.
11520 (memory_barrier): New.
11521 (cmpxchg): New.
11522 (record_tracepoint_error): Update atomically in the IPA.
11523 (clear_inferior_trace_buffer): New.
11524 (about_to_request_buffer_space): New.
11525 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11526 updating the same buffer.
11527 (add_tracepoint): Default the tracepoint's type to trap
11528 tracepoint, and orig_size to -1.
11529 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11530 internal variables.
11531 (create_trace_state_variable): New parameter `gdb'. Handle it.
11532 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11533 (cmd_qtdp): Handle fast tracepoints.
11534 (cmd_qtdv): Adjust.
11535 (max_jump_pad_size): New.
11536 (gdb_jump_pad_head): New.
11537 (get_jump_space_head): New.
11538 (claim_jump_space): New.
11539 (sort_tracepoints): New.
11540 (MAX_JUMP_SIZE): New.
11541 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11542 IPA.
11543 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11544 support. Upload fast traceframes, and delete internal IPA
11545 breakpoints.
11546 (stop_tracing_handler): New.
11547 (flush_trace_buffer_handler): New.
11548 (cmd_qtstop): Upload fast tracepoints.
11549 (response_tracepoint): Handle fast tracepoints.
11550 (tracepoint_finished_step): Upload fast traceframes. Set the
11551 tracepoint hit context's tracepoint type.
11552 (handle_tracepoint_bkpts): New.
11553 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11554 type. Add comment about fast tracepoints.
11555 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11556 non-existing action_str field.
11557 (get_context_regcache): Handle fast tracepoints.
11558 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11559 to the regcache.
11560 (fast_tracepoint_from_jump_pad_address): New.
11561 (fast_tracepoint_from_ipa_tpoint_address): New.
11562 (collecting_t): New.
11563 (force_unlock_trace_buffer): New.
11564 (fast_tracepoint_collecting): New.
11565 (collecting): New.
11566 (gdb_collect): New.
11567 (write_inferior_data_ptr): New.
11568 (target_tp_heap): New.
11569 (target_malloc): New.
11570 (download_agent_expr): New.
11571 (UALIGN): New.
11572 (download_tracepoints): New.
11573 (download_trace_state_variables): New.
11574 (upload_fast_traceframes): New.
11575 (IPA_FIRST_TRACEFRAME): New.
11576 (IPA_NEXT_TRACEFRAME_1): New.
11577 (IPA_NEXT_TRACEFRAME): New.
11578 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11579 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11580 (gdb_jump_pad_buffer_end): New.
11581 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11582 (initialize_tracepoint): Adjust.
11583 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11584 buffer. Initialize the low module.
11585 * utils.c (PREFIX, TOOLNAME): New.
11586 (malloc_failure): Use PREFIX.
11587 (error): In the IPA, an error causes an exit.
11588 (fatal, warning): Use PREFIX.
11589 (internal_error): Use TOOLNAME.
11590 (NUMCELLS): Increase to 10.
11591 * configure, config.in: Regenerate.
11592
d149dd1d
PA
115932010-06-01 Pedro Alves <pedro@codesourcery.com>
11594
11595 * server.c (handle_query) <qSupported>: Do two passes over the
11596 qSupported string to avoid nesting strtok.
11597
f6528abd
JK
115982010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11599
11600 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11601 (CDEPS): New.
11602 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11603 -Wl,--dynamic-list.
11604 * configure: Regenerate.
11605 * proc-service.list: New.
11606
ca2a87a0
JK
116072010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11608
11609 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11610 New comment.
11611
363a6e9f
OS
116122010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11613
11614 * gdbreplay.c (remote_open): Check error return from socket() call by
11615 its equality to -1 not by it being negative.
11616 * remote-utils.c (remote_open): Likewise.
11617
d23b6cb1
PA
116182010-05-23 Pedro Alves <pedro@codesourcery.com>
11619
11620 * config.h: Regenerate.
11621
28d3cf85
MK
116222010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11623
11624 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11625 doesn't provide PTRACE_GET_THREAD_AREA.
11626
fea36a59
MK
116272010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11628
11629 * linux-m68k-low.c: Include <asm/ptrace.h>
11630 (ps_get_thread_area): Implement.
11631
24b066ba
DE
116322010-05-03 Doug Evans <dje@google.com>
11633
11634 * event-loop.c (struct callback_event): New struct.
11635 (callback_list): New global.
11636 (append_callback_event, delete_callback_event): New functions.
11637 (process_callback): New function.
11638 (start_event_loop): Call it.
11639 * remote-utils.c (NOT_SCHEDULED): Define.
11640 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11641 moved out of readchar.
11642 (readchar): Rewrite. Call reschedule before returning.
11643 (reset_readchar): New function.
11644 (remote_close): Call it.
11645 (process_remaining, reschedule): New functions.
11646 * server.h (callback_handler_func): New typedef.
11647 (append_callback_event, delete_callback_event): Declare.
11648
9836d6ea
PA
116492010-05-03 Pedro Alves <pedro@codesourcery.com>
11650
11651 * proc-service.c (ps_pglobal_lookup): Use
11652 thread_db_look_up_one_symbol.
11653 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11654 parameter. Use it instead of all_symbols_looked_up.
11655 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11656 field.
11657 (all_symbols_looked_up): Don't declare.
11658 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11659 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11660 field.
11661 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11662 Set all_symbols_looked_up here.
11663 (thread_db_look_up_one_symbol): New.
11664 (thread_db_get_tls_address): Adjust.
11665 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11666 thread_db object on the heap, and tentatively set it in the
11667 process structure.
11668 (thread_db_init): Don't set all_symbols_looked_up here.
11669 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11670
7984d532
PA
116712010-05-03 Pedro Alves <pedro@codesourcery.com>
11672
11673 * linux-low.c (linux_kill, linux_detach): Adjust.
11674 (status_pending_p_callback): Remove redundant statement. Check
11675 for !TARGET_WAITIKIND_IGNORE, instead of
11676 TARGET_WAITKIND_STOPPED.
11677 (handle_tracepoints): Make sure LWP is locked. Adjust.
11678 (linux_wait_for_event_1): Adjust.
11679 (linux_cancel_breakpoints): New.
11680 (unsuspend_one_lwp): New.
11681 (unsuspend_all_lwps): New.
11682 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11683 (send_sigstop_callback): Change return type to int, add new
11684 `except' parameter and handle it.
11685 (suspend_and_send_sigstop_callback): New.
11686 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11687 pass them down. If SUSPEND, also increment the lwp's suspend
11688 count.
11689 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11690 (need_step_over_p): Don't consider suspended LWPs.
11691 (start_step_over): Adjust.
11692 (proceed_one_lwp): Change return type to int, add new `except'
11693 parameter and handle it.
11694 (unsuspend_and_proceed_one_lwp): New.
11695 (proceed_all_lwps): Use find_inferior instead of
11696 for_each_inferior.
11697 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11698 also decrement the suspend count of LWPs. Pass `except' down,
11699 instead of hacking its suspend count.
11700 (linux_pause_all): Add `freeze' parameter. Adjust.
11701 (linux_unpause_all): New.
11702 (linux_target_ops): Install linux_unpause_all.
11703 * server.c (handle_status): Adjust.
11704 * target.h (struct target_ops): New fields `unpause_all' and
11705 `cancel_breakpoints'. Add new parameter to `pause_all'.
11706 (pause_all): Add new `freeze' parameter.
11707 (unpause_all): New.
11708 (cancel_breakpoints): New.
11709 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11710 cancel breakpoints.
11711 (cmd_qtstart): Pause threads.
11712 (stop_tracing): Pause threads, and cancel breakpoints.
11713 * win32-low.c (win32_target_ops): Adjust.
11714
e471f25b
PA
117152010-05-03 Pedro Alves <pedro@codesourcery.com>
11716
11717 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11718 the inferior right away from here...
11719 (linux_wait_1): ... to here, and adjust to check the thread's
11720 last_resume_kind instead of the lwp's step or stop_expected flags.
11721
1915ef4f
PA
117222010-05-02 Pedro Alves <pedro@codesourcery.com>
11723
11724 * README: Use consistent `GDB' and `GDBserver' spellings.
11725
f9e39928
PA
117262010-05-02 Pedro Alves <pedro@codesourcery.com>
11727
11728 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11729 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11730 (linux_detach_one_lwp): Assume the lwp is stopped.
11731 (any_thread_of): Delete.
11732 (linux_detach): Stop all lwps here. Don't blindly delete all
11733 breakpoints.
11734 (delete_lwp_callback): New.
11735 (linux_mourn): Delete all lwps of the process that is gone.
11736 (linux_wait_1): Don't delete the last lwp of the process here.
11737 * mem-break.h (mark_breakpoints_out): Declare.
11738 * mem-break.c (mark_breakpoints_out): New.
11739 (free_all_breakpoints): Use it.
11740 * server.c (handle_target_event): If the process is gone, mark
11741 breakpoints out.
11742 * thread-db.c (struct thread_db) <create_bp>: New field.
11743 (thread_db_enable_reporting): Fix prototype. Store a thread event
11744 breakpoint reference in the thread_db struct.
11745 (thread_db_load_search): Clear the thread_db object.
11746 (try_thread_db_load_1): Ditto.
11747 (switch_to_process): New.
11748 (disable_thread_event_reporting): Use it.
11749 (remove_thread_event_breakpoints): New.
11750 (thread_db_detach, thread_db_mourn): Use it.
11751
1e7fc18c
PA
117522010-05-01 Pedro Alves <pedro@codesourcery.com>
11753
11754 * linux-low.c (linux_enable_event_reporting): New.
11755 (linux_wait_for_event_1, handle_extended_wait): Use it.
11756
02fc4de7
PA
117572010-04-30 Pedro Alves <pedro@codesourcery.com>
11758
11759 * linux-low.c (linux_kill_one_lwp, linux_kill)
11760 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11761 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11762 SIGSTOP even if the LWP is stopped.
11763 (send_sigstop_callback): New.
11764 (stop_all_lwps): Use send_sigstop_callback instead.
11765 (linux_resume_one_thread): Adjust.
11766 (proceed_one_lwp): Still proceed an LWP that the client has
11767 requested to stop, if we haven't reported it as stopped yet. Make
11768 sure that LWPs the client want stopped, have a pending SIGSTOP.
11769
bc3b5632
DE
117702010-04-26 Doug Evans <dje@google.com>
11771
ae1ada35
DE
11772 * server.c (handle_general_set): Make static.
11773
bc3b5632
DE
11774 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11775 Print received char after testing for error/eof instead of before.
11776 (input_interrupt): Tweak comment.
11777
65730243
DE
117782010-04-23 Doug Evans <dje@google.com>
11779
11780 * server.c (start_inferior): Print inferior argv if --debug.
11781
a8ae7dc0
AR
117822010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11783
11784 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11785 * nto-x86-low.c: Include server.h
11786
1c07cc19
PM
117872010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11788
11789 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11790 be consistent with other sources of this directory.
11791 (init_registers_amd64): Correct name of source file of this function
11792 in the comment.
11793
e0a61e09
PM
117942010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11795
11796 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11797 64-bit executables.
11798
54709339
PM
117992010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11800
11801 * win32-i386-low.c: Add 64-bit support.
11802 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11803 (init_registers_amd64): Declare.
11804 (mappings): Add 64-bit version of array.
11805 (init_windows_x86): New function.
11806 (the_low_target): Change init_arch field to init_windows_x86.
11807
e8f0053d
PM
118082010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11809
11810 * win32-low.c: Adapt to support also 64-bit architecture.
11811 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11812 (get_image_name): Use SIZE_T type for local variable `done'.
11813 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11814 (toolhelp_get_dll_name): Idem.
11815 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11816 Use uintptr_t typecast to avoid warning.
11817 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11818 (handle_exception): Use phex_nz to avoid warning.
11819 (win32_wait): Remove unused local variable `process'.
11820
c481e77e
PM
118212010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11822
11823 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11824 `amd64-avx.o'.
11825
12ea4b69
PM
118262010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11827
11828 * configure.ac: Use `ws2_32' library for srv_mingw.
11829 * configure: Regenerate.
11830 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11831 * remote-utils.c: Likewise.
11832
f6d1620c
L
118332010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11834
11835 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11836 if __x86_64__ is defined.
11837
8e642873
PM
118382010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11839
11840 * configure: Regenerate.
11841
711e434b
PM
118422010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11843
11844 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11845 * target.h (target_ops): New get_tib_address field.
11846 * win32-low.h (win32_thread_info): Add thread_local_base field.
11847 * win32-low.c (child_add_thread): Add tlb argument.
11848 Set thread_local_base field to TLB.
11849 (get_child_debug_event): Adapt to child_add_thread change.
11850 (win32_get_tib_address): New function.
11851 (win32_target_ops): Set get_tib_address field to
11852 win32_get_tib_address.
11853 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11854
505106cd
PA
118552010-04-12 Pedro Alves <pedro@codesourcery.com>
11856
505106cd
PA
11857 * linux-low.c (linux_mourn): Also remove the process.
11858 * server.c (handle_target_event): Don't remove the process here.
11859 * nto-low.c (nto_mourn): New.
11860 (nto_target_ops): Install it.
11861 * spu-low.c (spu_mourn): New.
11862 (spu_target_ops): Install it.
11863 * win32-low.c (win32_mourn): New.
11864 (win32_target_ops): Install it.
11865
e8470a06
PA
118662010-04-12 Pedro Alves <pedro@codesourcery.com>
11867
11868 * server.h (buffer_xml_printf): Remove redundant `;'.
11869
45ba0d02
PA
118702010-04-12 Pedro Alves <pedro@codesourcery.com>
11871
11872 * regcache.c (set_register_cache): Invalidate regcaches before
11873 changing the register cache layout.
11874 (regcache_invalidate_one): Allow a NULL regcache.
11875 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11876 regcaches before changing the register cache layout or the target
11877 regsets.
11878
59e04013
L
118792010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11880
11881 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11882 variable warning on Linux/x86-64.
11883
8336d594
PA
118842010-04-11 Pedro Alves <pedro@codesourcery.com>
11885
11886 GDBserver disconnected tracing support.
11887
11888 * linux-low.c (linux_remove_process): Delete.
11889 (add_lwp): Don't set last_resume_kind here.
11890 (linux_kill): Use `mourn'.
11891 (linux_detach): Use `thread_db_detach', and `mourn'.
11892 (linux_mourn): New.
11893 (linux_attach_lwp_1): Adjust comment.
11894 (linux_attach): last_resume_kind moved the thread_info; adjust.
11895 (status_pending_p_callback): Adjust.
11896 (linux_wait_for_event_1): Adjust.
11897 (count_events_callback, select_singlestep_lwp_callback)
11898 (select_event_lwp_callback, cancel_breakpoints_callback)
11899 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11900 (proceed_one_lwp): Adjust.
11901 (linux_async): Add debug output.
11902 (linux_thread_stopped): New.
11903 (linux_pause_all): New.
11904 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11905 linux_pause_all.
11906 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11907 (thread_db_free): Delete declaration.
11908 (thread_db_detach, thread_db_mourn): Declare.
11909 * thread-db.c (thread_db_init): Use thread_db_mourn.
11910 (thread_db_free): Delete, split in two.
11911 (disable_thread_event_reporting): New.
11912 (thread_db_detach): New.
11913 (thread_db_mourn): New.
11914
11915 * server.h (struct thread_info) <last_resume_kind>: New field.
11916 <attached>: Add comment.
11917 <gdb_detached>: New field.
11918 (handler_func): Change return type to int.
11919 (handle_serial_event, handle_target_event): Ditto.
11920 (gdb_connected): Declare.
11921 (tracing): Delete.
11922 (disconnected_tracing): Declare.
11923 (stop_tracing): Declare.
11924
11925 * server.c (handle_query) <qSupported>: Report support for
11926 disconnected tracing.
11927 (queue_stop_reply_callback): Account for running threads.
11928 (gdb_wants_thread_stopped): New.
11929 (gdb_wants_all_threads_stopped): New.
11930 (gdb_reattached_process): New.
11931 (handle_status): Clear the `gdb_detached' flag of all processes.
11932 In all-stop, stop all threads.
11933 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11934 (process_serial_event): If the remote connection breaks, or if an
11935 exit was forced with "monitor exit", force an event loop exit.
11936 Handle disconnected tracing on detach.
11937 (handle_serial_event): Adjust.
11938 (handle_target_event): If GDB isn't connected, forward events back
11939 to the inferior, unless the last process exited, in which case,
11940 exit gdbserver. Adjust interface.
11941
11942 * remote-utils.c (remote_open): Don't block in accept. Instead
11943 register an event loop source on the listen socket file
11944 descriptor. Refactor bits into ...
11945 (listen_desc): ... this new global.
11946 (gdb_connected): ... this new function.
11947 (enable_async_notification): ... this new function.
11948 (handle_accept_event): ... this new function.
11949 (remote_close): Clear remote_desc.
11950
11951 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11952
11953 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11954 New fields.
11955 (mourn_inferior): Define.
11956 (target_process_qsupported): Avoid the dangling else problem.
11957 (thread_stopped): Define.
11958 (pause_all): Define.
11959 (target_waitstatus_to_string): Declare.
11960 * target.c (target_waitstatus_to_string): New.
11961
11962 * tracepoint.c (tracing): Make extern.
11963 (disconnected_tracing): New.
11964 (stop_tracing): Make extern. Handle tracing stops due to GDB
11965 disconnecting.
11966 (cmd_qtdisconnected): New.
11967 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11968 (handle_tracepoint_general_set): Handle QTDisconnected.
11969
11970 * event-loop.c (event_handler_func): Change return type to int.
11971 (process_event): Bail out if the event handler wants the event
11972 loop to stop.
11973 (handle_file_event): Ditto.
11974 (start_event_loop): Bail out if the event handler wants the event
11975 loop to stop.
11976
11977 * nto-low.c (nto_target_ops): Adjust.
11978 * spu-low.c (spu_wait): Don't remove the process here.
11979 (spu_target_ops): Adjust.
11980 * win32-low.c (win32_wait): Don't remove the process here.
11981 (win32_target_ops): Adjust.
11982
5d267c4c
PA
119832010-04-11 Pedro Alves <pedro@codesourcery.com>
11984
11985 * regcache.c (realloc_register_cache): Invalidate inferior's
11986 regcache before recreating it.
11987
623ccd72
PA
119882010-04-09 Pedro Alves <pedro@codesourcery.com>
11989
11990 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11991
219f2f23
PA
119922010-04-09 Stan Shebs <stan@codesourcery.com>
11993 Pedro Alves <pedro@codesourcery.com>
11994
11995 * server.h (LONGEST): New.
11996 (struct thread_info) <while_stepping>: New field.
11997 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11998 Declare.
11999 (initialize_tracepoint, handle_tracepoint_general_set)
12000 (handle_tracepoint_query, tracepoint_finished_step)
12001 (tracepoint_was_hit, release_while_stepping_state_list):
12002 (current_traceframe): Declare.
12003 * server.c (handle_general_set): Handle tracepoint packets.
12004 (read_memory): New.
12005 (write_memory): New.
12006 (handle_search_memory_1): Use read_memory.
12007 (handle_query): Report support for conditional tracepoints, trace
12008 state variables, and tracepoint sources. Handle tracepoint
12009 queries.
12010 (main): Initialize the tracepoints module.
12011 (process_serial_event): Handle traceframe reads/writes.
12012
12013 * linux-low.c (handle_tracepoints): New.
12014 (linux_wait_1): Call it.
12015 (linux_resume_one_lwp): Handle while-stepping.
12016 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12017 (linux_target_ops): Install them.
12018 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12019 New field.
12020 * linux-x86-low.c (x86_supports_tracepoints): New.
12021 (the_low_target). Install it.
12022
12023 * mem-break.h (delete_breakpoint): Declare.
12024 * mem-break.c (delete_breakpoint): Make external.
12025
12026 * target.h (struct target_ops): Add `supports_tracepoints',
12027 `read_pc', and `write_pc' fields.
12028 (target_supports_tracepoints): Define.
12029 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12030 (phex_nz): New.
12031
12032 * regcache.h (struct regcache) <registers_owned>: New field.
12033 (init_register_cache, regcache_cpy): Declare.
12034 (regcache_read_pc, regcache_write_pc): Declare.
12035 (register_cache_size): Declare.
12036 (supply_regblock): Declare.
12037 * regcache.c (init_register_cache): New.
12038 (new_register_cache): Use it.
12039 (regcache_cpy): New.
12040 (register_cache_size): New.
12041 (supply_regblock): New.
12042 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 12043
219f2f23
PA
12044 * tracepoint.c: New.
12045
12046 * Makefile.in (OBS): Add tracepoint.o.
12047 (tracepoint.o): New rule.
12048
3a13a53b
L
120492010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12050
12051 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12052 (i386-mmx.o): New.
12053 (i386-mmx.c): Likewise.
12054 (i386-mmx-linux.o): Likewise.
12055 (i386-mmx-linux.c): Likewise.
12056
12057 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12058 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12059 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12060 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12061
12062 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12063 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12064 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12065
1570b33e
L
120662010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12067
12068 * Makefile.in (clean): Updated.
12069 (i386-avx.o): New.
12070 (i386-avx.c): Likewise.
12071 (i386-avx-linux.o): Likewise.
12072 (i386-avx-linux.c): Likewise.
12073 (amd64-avx.o): Likewise.
12074 (amd64-avx.c): Likewise.
12075 (amd64-avx-linux.o): Likewise.
12076 (amd64-avx-linux.c): Likewise.
12077
12078 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12079 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12080 (srv_amd64_regobj): Add amd64-avx.o.
12081 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12082 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12083 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12084 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12085 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12086 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12087 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12088
12089 * i387-fp.c: Include "i386-xstate.h".
12090 (i387_xsave): New.
12091 (i387_cache_to_xsave): Likewise.
12092 (i387_xsave_to_cache): Likewise.
12093 (x86_xcr0): Likewise.
12094
12095 * i387-fp.h (i387_cache_to_xsave): Likewise.
12096 (i387_xsave_to_cache): Likewise.
12097 (x86_xcr0): Likewise.
12098
12099 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12100 * linux-crisv32-low.c (target_regsets): Likewise.
12101 * linux-m68k-low.c (target_regsets): Likewise.
12102 * linux-mips-low.c (target_regsets): Likewise.
12103 * linux-ppc-low.c (target_regsets): Likewise.
12104 * linux-s390-low.c (target_regsets): Likewise.
12105 * linux-sh-low.c (target_regsets): Likewise.
12106 * linux-sparc-low.c (target_regsets): Likewise.
12107 * linux-xtensa-low.c (target_regsets): Likewise.
12108
12109 * linux-low.c: Include <sys/uio.h>.
12110 (regsets_fetch_inferior_registers): Support nt_type.
12111 (regsets_store_inferior_registers): Likewise.
12112 (linux_process_qsupported): New.
12113 (linux_target_ops): Add linux_process_qsupported.
12114
12115 * linux-low.h (regset_info): Add nt_type.
12116 (linux_target_ops): Add process_qsupported.
12117
12118 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12119 and <sys/uio.h>.
12120 (init_registers_i386_avx_linux): New.
12121 (init_registers_amd64_avx_linux): Likewise.
12122 (xmltarget_i386_linux_no_xml): Likewise.
12123 (xmltarget_amd64_linux_no_xml): Likewise.
12124 (PTRACE_GETREGSET): Likewise.
12125 (PTRACE_SETREGSET): Likewise.
12126 (x86_fill_xstateregset): Likewise.
12127 (x86_store_xstateregset): Likewise.
12128 (use_xml): Likewise.
12129 (x86_linux_update_xmltarget): Likewise.
12130 (x86_linux_process_qsupported): Likewise.
12131 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12132 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12133 init_registers_i386_linux here. Call
12134 x86_linux_update_xmltarget.
12135 (the_low_target): Add x86_linux_process_qsupported.
12136
12137 * server.c (handle_query): Call target_process_qsupported.
12138
12139 * target.h (target_ops): Add process_qsupported.
12140 (target_process_qsupported): New.
12141
fc7238bb
PA
121422010-04-03 Pedro Alves <pedro@codesourcery.com>
12143
12144 * inferiors.c (add_thread): Set last_status kind to
12145 TARGET_WAITKIND_IGNORE.
12146 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12147 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12148 (linux_wait_1): Move `thread' local definition to block that uses
12149 it. Don't NULL initialize `event_child'.
12150 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12151 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12152 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12153
bdabb078
PA
121542010-04-01 Pedro Alves <pedro@codesourcery.com>
12155
12156 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12157 an extended waitstatus, or by a watchpoint.
12158 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12159 thread was stepping or has been stopped by a watchpoint.
12160
d3bbe7a0
PA
121612010-04-01 Pedro Alves <pedro@codesourcery.com>
12162
12163 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12164 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12165 of another, then delete the previous, and validate all
12166 breakpoints.
12167 (validate_inserted_breakpoint): New.
12168 (delete_disabled_breakpoints): New.
12169 (validate_breakpoints): New.
12170 (check_mem_read): Validate breakpoints before trusting their
12171 shadow. Delete disabled breakpoints.
12172 (check_mem_write): Validate breakpoints before trusting they
12173 should be inserted. Delete disabled breakpoints.
12174 * mem-break.h (validate_breakpoints):
12175 * server.c (handle_query): Validate breakpoints when we see a
12176 qSymbol query.
12177
8b07ae33
PA
121782010-04-01 Pedro Alves <pedro@codesourcery.com>
12179
12180 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12181 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12182 if we could tell there's a GDB breakpoint at stop_pc.
12183 (need_step_over_p): Don't do a step over if we find a GDB
12184 breakpoint at the resume PC.
12185
12186 * mem-break.c (struct raw_breakpoint): New.
12187 (enum bkpt_type): New type `gdb_breakpoint'.
12188 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12189 fields. New field `raw'.
12190 (find_raw_breakpoint_at): New.
12191 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12192 breakpoint instead.
12193 (set_breakpoint_at): Adjust.
12194 (delete_raw_breakpoint): New.
12195 (release_breakpoint): New.
12196 (delete_breakpoint): Rename to...
12197 (delete_breakpoint_1): ... this. Add proc parameter. Use
12198 release_breakpoint. Return ENOENT.
12199 (delete_breakpoint): Reimplement.
12200 (find_breakpoint_at): Delete.
12201 (find_gdb_breakpoint_at): New.
12202 (delete_breakpoint_at): Delete.
12203 (set_gdb_breakpoint_at): New.
12204 (delete_gdb_breakpoint_at): New.
12205 (gdb_breakpoint_here): New.
12206 (set_reinsert_breakpoint): Use release_breakpoint.
12207 (uninsert_breakpoint): Rename to ...
12208 (uninsert_raw_breakpoint): ... this.
12209 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12210 (reinsert_raw_breakpoint): Change parameter type to
12211 raw_breakpoint.
12212 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12213 instead.
12214 (check_breakpoints): Adjust. Use release_breakpoint.
12215 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12216 (breakpoint_inserted_here): Ditto.
12217 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12218 Don't trust the breakpoint's shadow if it is not inserted.
12219 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12220 (delete_all_breakpoints): Adjust.
12221 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12222 use delete_breakpoint_1.
12223
12224 * mem-break.h (breakpoints_supported): Delete declaration.
12225 (set_gdb_breakpoint_at): Declare.
12226 (gdb_breakpoint_here): Declare.
12227 (delete_breakpoint_at): Delete.
12228 (delete_gdb_breakpoint_at): Declare.
12229
12230 * server.h (struct raw_breakpoint): Forward declare.
12231 (struct process_info): New field `raw_breakpoints'.
12232
12233 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12234 breakpoints.
12235
6bf5e0ba
PA
122362010-03-24 Pedro Alves <pedro@codesourcery.com>
12237
12238 * linux-low.c (status_pending_p_callback): Fix comment.
12239 (linux_wait_for_event_1): Move most of the internal breakpoint
12240 handling from here...
12241 (linux_wait_1): ... to here.
12242 (count_events_callback): New.
12243 (select_singlestep_lwp_callback): New.
12244 (select_event_lwp_callback): New.
12245 (cancel_breakpoints_callback): New.
12246 (select_event_lwp): New.
12247 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12248 priority to all LWPs that have had events that should be reported
12249 to the client. Cancel breakpoints when about to reporting the
12250 event to the client, not while stopping lwps. No longer cancel
12251 finished single-steps here.
12252 (cancel_finished_single_step): Delete.
12253 (cancel_finished_single_steps): Delete.
12254
414a389f
PA
122552010-03-24 Pedro Alves <pedro@codesourcery.com>
12256
12257 * mem-break.c (enum bkpt_type): New.
12258 (struct breakpoint): New field `type'.
12259 (set_breakpoint_at): Change return type to struct breakpoint
12260 pointer. Set type to `other_breakpoint' by default.
12261 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12262 in the breakpoint list.
12263 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12264 (reinsert_breakpoint): Rename to ...
12265 (reinsert_raw_breakpoint): ... this.
12266 (reinsert_breakpoints_at): Adjust.
12267 * mem-break.h (struct breakpoint): Declare.
12268 (set_breakpoint_at): Change return type to struct breakpoint
12269 pointer.
12270
2280c721
PA
122712010-03-24 Pedro Alves <pedro@codesourcery.com>
12272
12273 * server.c (handle_query): Assign, not compare.
12274
d50171e4
PA
122752010-03-24 Pedro Alves <pedro@codesourcery.com>
12276
12277 Teach linux gdbserver to step-over-breakpoints.
12278
12279 * linux-low.c (can_hardware_single_step): New.
12280 (supports_breakpoints): New.
12281 (handle_extended_wait): If stopping threads, read the stop pc of
12282 the new cloned LWP.
12283 (get_pc): New.
12284 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12285 low target doesn't support retrieving the PC.
12286 (add_lwp): Set last_resume_kind to resume_continue.
12287 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12288 (linux_attach): Don't clear stop_expected. Set the lwp's
12289 last_resume_kind to resume_stop.
12290 (linux_detach_one_lwp): Don't check for removed breakpoints.
12291 (check_removed_breakpoint): Delete.
12292 (status_pending_p): Rename to ...
12293 (status_pending_p_callback): ... this. Don't check for removed
12294 breakpoints. Don't consider threads that are stopped from GDB's
12295 perspective.
12296 (linux_wait_for_lwp): Always read the stop_pc here.
12297 (cancel_breakpoint): New.
12298 (step_over_bkpt): New global.
12299 (linux_wait_for_event_1): Implement stepping over breakpoints.
12300 (gdb_wants_lwp_stopped): New.
12301 (gdb_wants_all_stopped): New.
12302 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12303 single-step traps here. Store the thread's last reported target
12304 wait status.
12305 (send_sigstop): Don't clear stop_expected. Always set it,
12306 instead.
12307 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12308 (cancel_finished_single_step): New.
12309 (cancel_finished_single_steps): New.
12310 (wait_for_sigstop): Don't cancel finished single-step traps here.
12311 (linux_resume_one_lwp): Don't check for removed breakpoints.
12312 Don't set `step' on non-hardware step archs.
12313 (linux_set_resume_request): Ignore resume_stop requests if already
12314 stopping or stopped. Set the lwp's last_resume_kind.
12315 (resume_status_pending_p): Don't check for removed breakpoints.
12316 (need_step_over_p): New.
12317 (start_step_over): New.
12318 (finish_step_over): New.
12319 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12320 requests. Clear the thread's last reported target waitstatus.
12321 Don't use the `suspended' flag. Don't consider pending breakpoints.
12322 (linux_resume): Start a step-over if necessary.
12323 (proceed_one_lwp): New.
12324 (proceed_all_lwps): New.
12325 (unstop_all_lwps): New.
12326 * linux-low.h (struct lwp_info): Rewrite comment for the
12327 `suspended' flag. Add the `stop_pc' field. Delete the
12328 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12329 Add `'last_resume_kind' and `need_step_over' fields.
12330 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12331 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12332 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12333 (set_raw_breakpoint_at): New.
12334 (set_breakpoint_at): Rewrite to use it.
12335 (reinsert_breakpoint_handler): Delete.
12336 (set_reinsert_breakpoint): New.
12337 (reinsert_breakpoint_by_bp): Delete.
12338 (delete_reinsert_breakpoints): New.
12339 (uninsert_breakpoint): Rewrite.
12340 (uninsert_breakpoints_at): New.
12341 (reinsert_breakpoint): Rewrite.
12342 (reinsert_breakpoints_at): New.
12343 (check_breakpoints): Rewrite.
12344 (breakpoint_here): New.
12345 (breakpoint_inserted_here): New.
12346 (check_mem_read): Adjust.
12347 * mem-break.h (breakpoints_supported, breakpoint_here)
12348 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12349 (reinsert_breakpoint_by_bp): Delete declaration.
12350 (delete_reinsert_breakpoints): Declare.
12351 (reinsert_breakpoint): Delete declaration.
12352 (reinsert_breakpoints_at): Declare.
12353 (uninsert_breakpoint): Delete declaration.
12354 (uninsert_breakpoints_at): Declare.
12355 (check_breakpoints): Adjust prototype.
12356 * server.h: Adjust include order.
12357 (struct thread_info): Declare here. Add a `last_status' field.
12358
30ba68cb
MS
123592010-03-23 Michael Snyder <msnyder@vmware.com>
12360
12361 * server.c (crc32): New function.
12362 (handle_query): Add handling for 'qCRC:' request.
12363
b9a881c2
PA
123642010-03-23 Pedro Alves <pedro@codesourcery.com>
12365
12366 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12367 lwp had been stopped by a watchpoint.
12368
e92d13d5
PA
123692010-03-16 Pedro Alves <pedro@codesourcery.com>
12370
12371 * server.h (internal_error): Declare.
12372 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12373 * utils.c (internal_error): New function.
12374
64daa791
AS
123752010-03-15 Andreas Schwab <schwab@redhat.com>
12376
12377 * configure.srv: Fix typo setting srv_regobj.
12378
f52cd8cd
PA
123792010-03-15 Pedro Alves <pedro@codesourcery.com>
12380
12381 * linux-low.c (fetch_register): Avoid passing a non string literal
12382 format to `error'.
12383 (usr_store_inferior_registers): Ditto.
12384
93ae6fdc
PA
123852010-03-14 Pedro Alves <pedro@codesourcery.com>
12386
12387 * linux-low.c (linux_write_memory): Bail out early if peeking
12388 memory failed.
12389
c3adc08c
PA
123902010-03-14 Pedro Alves <pedro@codesourcery.com>
12391
12392 * linux-low.h (struct lwp_info): New fields
12393 `stopped_by_watchpoint' and `stopped_data_address'.
12394 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12395 here, and cache them in the lwp object.
12396 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12397 directly.
12398 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12399 field.
12400 (linux_stopped_by_watchpoint): Rewrite.
12401 (linux_stopped_data_address): Rewrite.
12402
bce522a2
PA
124032010-03-06 Simo Melenius <simo.melenius@iki.fi>
12404
12405 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12406 switching the current inferior, not before.
12407
90884b2b
L
124082010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12409
12410 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12411 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12412 i386-linux.c and amd64-linux.c.
12413 (reg-i386.o): Removed.
12414 (reg-i386.c): Likewise.
12415 (reg-i386-linux.o): Likewise.
12416 (reg-i386-linux.c): Likewise.
12417 (reg-x86-64.o): Likewise.
12418 (reg-x86-64.c): Likewise.
12419 (reg-x86-64-linux.o): Likewise.
12420 (reg-x86-64-linux.c): Likewise.
12421 (i386.o): New.
12422 (i386.c): Likewise.
12423 (i386-linux.o): Likewise.
12424 (i386-linux.c): Likewise.
12425 (amd64.o): Likewise.
12426 (amd64.c): Likewise.
12427 (amd64-linux.o): Likewise.
12428 (amd64-linux.c): Likewise.
12429
12430 * configure.srv (srv_i386_regobj): New.
12431 (srv_i386_linux_regobj): Likewise.
12432 (srv_amd64_regobj): Likewise.
12433 (srv_amd64_linux_regobj): Likewise.
12434 (srv_i386_32bit_xmlfiles): Likewise.
12435 (srv_i386_64bit_xmlfiles): Likewise.
12436 (srv_i386_xmlfiles): Likewise.
12437 (srv_amd64_xmlfiles): Likewise.
12438 (srv_i386_linux_xmlfiles): Likewise.
12439 (srv_amd64_linux_xmlfiles): Likewise.
12440 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12441 srv_xmlfiles to $srv_i386_xmlfiles.
12442 (i[34567]86-*-mingw32ce*): Likewise.
12443 (i[34567]86-*-mingw*): Likewise.
12444 (i[34567]86-*-nto*): Likewise.
12445 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12446 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12447 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12448 (x86_64-*-linux*): Likewise.
12449
12450 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12451 (init_registers_amd64_linux): New.
12452 (x86_arch_setup): Replace init_registers_x86_64_linux with
12453 init_registers_amd64_linux.
12454
193f13e6
MK
124552010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12456
12457 * configure.ac: Check for libdl. If it is not available link against
12458 static libthread_db.
12459 * configure: Regenerate.
12460
85d721b8
PA
124612010-02-22 Pedro Alves <pedro@codesourcery.com>
12462
12463 PR9605
12464
12465 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12466 handing a read watchpoint.
12467 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12468
6076632b
DE
124692010-02-12 Doug Evans <dje@google.com>
12470
12471 * linux-low.c (linux_supports_tracefork_flag): Document.
12472 (linux_look_up_symbols): Add comment.
12473
3327ccf7
L
124742010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12475
12476 * regcache.c (supply_register): Clear regcache if buf is NULL.
12477
0718675c 124782010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 12479 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
12480
12481 * inferiors.c (find_inferior): Add function documentation.
12482 (unloaded_dll): Handle the case where the unloaded dll has not
12483 been previously registered in the dll list.
12484
177321bd
DJ
124852010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12486
12487 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12488 (thumb2_breakpoint): New.
12489 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12490
2b009048
DJ
124912010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12492
12493 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12494 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12495 breakpoints.
12496
3be029c7
PA
124972010-01-21 Pedro Alves <pedro@codesourcery.com>
12498
12499 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12500
18f5de3b
JK
125012010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12502
12503 * linux-s390-low.c (s390_collect_ptrace_register)
12504 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12505
3743bb4f
DE
125062010-01-21 Doug Evans <dje@google.com>
12507
14ce3065
DE
12508 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12509 (PTRACE_ARG4_TYPE): New macro.
12510 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12511 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12512 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12513 (usr_store_inferior_registers): Ditto.
12514 (linux_read_memory, linux_write_memory): Ditto.
12515 (linux_test_for_tracefork): Ditto.
12516
3743bb4f
DE
12517 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12518 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12519
8b315be5
PA
125202010-01-21 Pedro Alves <pedro@codesourcery.com>
12521
12522 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12523 target.
12524
85492558
PA
125252010-01-21 Pedro Alves <pedro@codesourcery.com>
12526
12527 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12528 prototype to take a regcache. Adjust.
12529
442ea881
PA
125302010-01-20 Pedro Alves <pedro@codesourcery.com>
12531
12532 * regcache.h (struct thread_info): Forward declare.
12533 (struct regcache): New.
12534 (new_register_cache): Adjust prototype.
12535 (get_thread_regcache): Declare.
12536 (free_register_cache): Adjust prototype.
12537 (registers_to_string, registers_from_string): Ditto.
12538 (supply_register, supply_register_by_name, collect_register)
12539 (collect_register_as_string, collect_register_by_name): Ditto.
12540 * regcache.c (struct inferior_regcache_data): Delete.
12541 (get_regcache): Rename to ...
12542 (get_thread_regcache): ... this. Adjust. Switch inferior before
12543 fetching registers.
12544 (regcache_invalidate_one): Adjust.
12545 (regcache_invalidate): Fix prototype.
12546 (new_register_cache): Return the new register cache.
12547 (free_register_cache): Change prototype.
12548 (realloc_register_cache): Adjust.
12549 (registers_to_string): Change prototype to take a regcache. Adjust.
12550 (registers_from_string): Ditto.
12551 (register_data): Ditto.
12552 (supply_register): Ditto.
12553 (supply_register_by_name): Ditto.
12554 (collect_register): Ditto.
12555 (collect_register_as_string): Ditto.
12556 (collect_register_by_name): Ditto.
12557 * server.c (process_serial_event): Adjust.
12558 * linux-low.h (regset_fill_func, regset_store_func): Change
12559 prototype.
12560 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12561 Change prototype.
12562 * linux-low.c (get_stop_pc): Adjust.
12563 (check_removed_breakpoint): Adjust.
12564 (linux_wait_for_event): Adjust.
12565 (linux_resume_one_lwp): Adjust.
12566 (fetch_register): Add regcache parameter. Adjust.
12567 (usr_store_inferior_registers): Ditto.
12568 (regsets_fetch_inferior_registers): Ditto.
12569 (regsets_store_inferior_registers): Ditto.
12570 (linux_fetch_registers, linux_store_registers): Ditto.
12571 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12572 regcache. Adjust.
43aaf8b6
PA
12573 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12574 Ditto.
442ea881
PA
12575 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12576 prototype to take a regcache.
12577 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12578 * remote-utils.c (convert_ascii_to_int, outreg)
12579 (prepare_resume_reply): Change prototype to take a regcache.
12580 Adjust.
12581 * target.h (struct target_ops) <fetch_registers, store_registers>:
12582 Change prototype to take a regcache.
12583 (fetch_inferior_registers, store_inferior_registers): Change
12584 prototype to take a regcache. Adjust.
12585 * proc-service.c (ps_lgetregs): Adjust.
12586 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12587 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12588 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12589 take a regcache. Adjust.
12590 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12591 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12592 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12593 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12594 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12595 (cris_cannot_fetch_register):
12596 (cris_breakpoint_at): Change prototype to take a regcache.
12597 Adjust.
12598 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12599 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12600 to take a regcache. Adjust.
12601 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12602 Adjust.
12603 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12604 take a regcache. Adjust.
12605 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12606 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12607 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12608 * linux-mips-low.c (mips_get_pc):
12609 (mips_set_pc): Change prototype to take a regcache. Adjust.
12610 (mips_reinsert_addr): Adjust.
12611 (mips_collect_register): Change prototype to take a regcache.
12612 Adjust.
12613 (mips_supply_register):
12614 (mips_collect_register_32bit, mips_supply_register_32bit)
12615 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12616 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12617 * linux-ppc-low.c (ppc_supply_ptrace_register)
12618 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12619 (parse_spufs_run): Adjust.
12620 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12621 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12622 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12623 take a regcache. Adjust.
12624 * linux-s390-low.c (s390_collect_ptrace_register)
12625 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12626 (s390_set_pc): Change prototype to take a regcache. Adjust.
12627 (s390_arch_setup): Adjust.
12628 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12629 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12630 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12631 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12632 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12633 regcache. Adjust.
12634 (sparc_breakpoint_at): Adjust.
12635 * linux-xtensa-low.c (xtensa_fill_gregset):
12636 (xtensa_store_gregset):
12637 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12638 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12639 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12640 prototype to take a regcache. Adjust.
12641 * win32-arm-low.c (arm_fetch_inferior_register)
12642 (arm_store_inferior_register): Change prototype to take a
12643 regcache. Adjust.
12644 * win32-i386-low.c (i386_fetch_inferior_register)
12645 (i386_store_inferior_register): Change prototype to take a
12646 regcache. Adjust.
12647 * win32-low.c (child_fetch_inferior_registers)
12648 (child_store_inferior_registers): Change prototype to take a
12649 regcache. Adjust.
12650 (win32_wait): Adjust.
12651 (win32_fetch_inferior_registers): Change prototype to take a
12652 regcache. Adjust.
12653 (win32_store_inferior_registers): Adjust.
12654 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12655 store_inferior_register>: Change prototype to take a regcache.
12656
60c3d7b0
DE
126572010-01-20 Doug Evans <dje@google.com>
12658
12659 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12660 #ifdef.
12661 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12662 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12663
dc146f7c
VP
126642010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12665
12666 * linux-low.c (linux_core_of_thread): New.
12667 (compare_ints, show_process, list_threads): New.
12668 (linux_qxfer_osdata): Report threads and cores.
12669 (linux_target_op): Register linux_core_of_thread.
12670 * remote-utils.c (prepare_resume_reply): Report the core.
12671 (buffer_xml_printf): Support %d specifier.
12672 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12673 New.
12674 (handle_query): Handle qXfer:threads. Announce availability
12675 thereof.
12676 * target.h (struct target_ops): New field core_of_thread.
12677
7803799a
UW
126782010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12679
12680 * Makefile.in (clean): Remove new generated files.
12681 (reg-s390.o, reg-s390.c): Remove rules.
12682 (reg-s390x.o, reg-s390x.c): Likewise.
12683 (s390-linux32.o, s390-linux32.c): Add rules.
12684 (s390-linux64.o, s390-linux64.c): Likewise.
12685 (s390x-linux64.o, s390x-linux64.c): Likewise.
12686 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12687 * linux-s390-low.c: Include <elf.h>.
12688 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12689 (init_registers_s390): Remove prototype.
12690 (init_registers_s390x): Likewise.
12691 (init_registers_s390_linux32): Add prototype.
12692 (init_registers_s390_linux64): Likewise.
12693 (init_registers_s390x_linux64): Likewise.
12694 (s390_num_regs_3264): New define.
12695 (s390_regmap_3264): New global variable.
12696 (s390_cannot_fetch_register): Remove obsolete check.
12697 (s390_cannot_store_register): Likewise.
12698 (s390_collect_ptrace_register): Handle upper/lower register halves.
12699 (s390_supply_ptrace_register): Likewise.
12700 (s390_fill_gregset): Update to register number changes.
12701 (s390_get_hwcap): New routine.
12702 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12703 Install appropriate regmap and register set.
12704
6e7ffa39
JB
127052010-01-01 Joel Brobecker <brobecker@adacore.com>
12706
12707 * server.c (gdbserver_version): Update copyright year to 2010.
12708 * gdbreplay.c (gdbreplay_version): Likewise.
12709
957f3f49
DE
127102009-12-28 Doug Evans <dje@google.com>
12711
12712 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12713 elf/external.h. Include <elf.h> instead but only if necessary.
12714
ca5c370d
PA
127152009-12-28 Pedro Alves <pedro@codesourcery.com>
12716
12717 * linux-low.c (linux_remove_process): Remove `detaching'
12718 parameter. Don't release/detach from thread_db here.
12719 (linux_kill): Release/detach from thread_db here, ...
12720 (linux_detach): ... and here, before actually detaching.
12721 (linux_wait_1): ... and here, when a process exits.
12722 * thread-db.c (any_thread_of): New.
12723 (thread_db_free): Switch the current inferior to a thread of the
12724 passed in process.
12725
4ee62156
DE
127262009-12-21 Doug Evans <dje@google.com>
12727
d90e6a88
DE
12728 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12729
c5f62d5f
DE
12730 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12731 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12732 warning ifndef __NR_tkill. Move setting of errno there too.
12733 Delete unnecessary resetting of errno after syscall.
12734 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12735
10e86dd7
DE
12736 * configure.ac: Check for dladdr.
12737 * config.in: Regenerate.
12738 * configure: Regenerate.
12739 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12740 (try_thread_db_load): Update.
12741
4ee62156
DE
12742 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12743
00f515da
DE
127442009-12-18 Doug Evans <dje@google.com>
12745
e9464885
DE
12746 * event-loop.c: Include unistd.h if it exists.
12747
07d4f67e
DE
12748 * linux-low.c (my_waitpid): Move definition away from being in
12749 between linux_tracefork_child/linux_test_for_tracefork.
12750
00f515da
DE
12751 * gdb_proc_service.h (psaddr_t): Fix type.
12752 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12753 signature to match glibc.
12754
1de1badb
DE
127552009-12-16 Doug Evans <dje@google.com>
12756
12757 * linux-low.c (linux_read_memory): Fix argument to read.
12758
aeeb81d1
PA
127592009-11-26 Pedro Alves <pedro@codesourcery.com>
12760
12761 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12762 events, don't leave current_inferior pointing at null.
12763
10357975
PA
127642009-11-26 Pedro Alves <pedro@codesourcery.com>
12765
12766 * win32-low.c (LOG): Delete.
12767 (OUTMSG): Output to stderr.
12768 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12769 on compile time LOG macro.
12770 (win32_wait): Fix debug output.
12771
cf6e3471
PA
127722009-11-26 Pedro Alves <pedro@codesourcery.com>
12773
12774 * win32-low.c (win32_add_one_solib): If the dll name is
12775 "ntdll.dll", prepend the system directory to the dll path.
12776
0c85e18e
MK
127772009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12778
12779 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12780
9ac544ce 127812009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12782 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12783
12784 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12785 * configure.ac: Check for __mcoldfire__ and set
12786 gdb_cv_m68k_is_coldfire.
12787 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12788 reg-cf.o and reg-m68k.o.
12789 * configure: Regenerated.
12790
fd7dd3e6
PA
127912009-11-16 Pedro Alves <pedro@codesourcery.com>
12792
12793 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12794 Pass it to thread_db_free.
12795 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12796 proper `detaching' argument to linux_remove_process.
12797 * linux-low.h (thread_db_free): Add `detaching' parameter.
12798 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12799 to thread_db_free.
12800 (thread_db_free): Add `detaching' parameter. Only
12801 call td_ta_clear_event if detaching from process.
12802
75aa492e
MK
128032009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12804
12805 * thread-db.c (thread_db_free): Fix typo.
12806
21e1bee4
PP
128072009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12808
12809 PR gdb/10838
12810 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12811
8838b45e
NS
128122009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12813
12814 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12815 with an i686 compiler.
12816 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12817 needed.
12818 * configure: Rebuilt.
12819
8a35fb51
SL
128202009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12821
12822 PR gdb/10783
12823
12824 * server.c (handle_search_memory_1): Correct read_addr initialization
12825 in loop for searching subsequent chunks.
12826
96f15937
PP
128272009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12828
12829 * configure.ac: New --with-libthread-db option.
12830 * thread-db.c: Allow direct dependence on libthread_db.
12831 (thread_db_free): Adjust.
12832 * config.in: Regenerate.
12833 * configure: Likewise.
889bf7c5 12834
5f7d1694
PP
128352009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12836
12837 PR gdb/10757
12838 * thread-db.c (attach_thread): New function.
12839 (maybe_attach_thread): Return success/failure.
12840 (find_new_threads_callback): Adjust.
889bf7c5
PA
12841 (thread_db_find_new_threads): Loop until no new threads.
12842
88e3b899
PA
128432009-10-13 Pedro Alves <pedro@codesourcery.com>
12844
12845 * proc-service.c (ps_lgetregs): Formatting.
12846
cdbfd419
PP
128472009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12848
12849 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12850 * configure.ac: Adjust.
12851 * linux-low.h (struct process_info_private): Move members to struct
12852 thread_db.
12853 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12854 * linux-low.c (linux_remove_process): Adjust.
12855 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12856 * server.c (handle_query): Move code ...
12857 (handle_monitor_command): ... here. New function.
12858 * target.h (struct target_ops): New member.
12859 * thread-db.c (struct thread_db): New.
12860 (libthread_db_search_path): New variable.
12861 (thread_db_create_event, thread_db_enable_reporting)
12862 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12863 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12864 (try_thread_db_load_1, dladdr_to_soname): New functions.
12865 (try_thread_db_load, thread_db_load_search): New functions.
12866 (thread_db_init): Search for libthread_db.
12867 (thread_db_free): New function.
12868 (thread_db_handle_monitor_command): Likewise.
12869 * config.in: Regenerate.
12870 * configure: Regenerate.
889bf7c5 12871
4168d2d6
UW
128722009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12873
12874 * spu-low.c (spu_kill): Wait for inferior to terminate.
12875 Call clear_inferiors.
12876 (spu_detach): Call clear_inferiors.
12877
81ecdfbb
RW
128782009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12879
12880 * aclocal.m4: Regenerate.
12881 * config.in: Likewise.
12882 * configure: Likewise.
12883
0b9ff2c0
UW
128842009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12885
12886 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12887 (parse_spufs_run): New function.
12888 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12889 (ppc_breakpoint_at): Handle SPU breakpoints.
12890
efcbbd14
UW
128912009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12892
12893 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12894 (SPUFS_MAGIC): Define.
12895 (spu_enumerate_spu_ids): New function.
12896 (linux_qxfer_spu): New function.
12897 (linux_target_ops): Install linux_qxfer_spu.
12898
f4d9bade
UW
128992009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12900
12901 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12902 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12903 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12904 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12905 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12906 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12907 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12908 (init_registers_powerpc_cell32l): Add prototype.
12909 (init_registers_powerpc_cell64l): Likewise.
12910 (ppc_arch_setup): Detect Cell/B.E. architecture.
12911
96e946ca
RW
129122009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12913
12914 * Makefile.in (datarootdir): New variable.
12915
58d6951d
DJ
129162009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12917
12918 * linux-low.c (linux_write_memory): Update debugging output.
12919 * Makefile.in (clean): Add new descriptions.
12920 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12921 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12922 * configure.srv: Add new files for arm*-*-linux*.
12923 * linux-arm-low.c: Add new declarations.
12924 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12925 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12926 (HWCAP_VFPv3D16): New.
12927 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12928 instead of __IWMMXT__.
12929 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12930 (arm_arch_setup): New.
12931 (target_regsets): Remove #ifdef. Add VFP regset.
12932 (the_low_target): Use arm_arch_setup.
12933
12b42a12
DJ
129342009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12935
12936 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12937 the main thread again.
12938
ac8c974e
AR
129392009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12940
12941 Adding Neutrino gdbserver.
12942 * configure: Regenerated.
12943 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12944 * configure.srv (i[34567]86-*-nto*): New target.
12945 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12946 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12947 (nto_comctrl) [__QNX__]: New function.
12948 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12949
4424e0c3 129502009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12951
12952 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12953 srv_tgtobj.
12954
912cf4ba
PA
129552009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12956 Pedro Alves <pedro@codesourcery.com>
12957
12958 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12959 don't support CONTEXT_EXTENDED_REGISTERS.
12960 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12961 (the_low_target): Install them.
12962 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12963 failing with ERROR_PIPE_NOT_CONNECTED.
12964
aa5ca48f
DE
129652009-06-30 Doug Evans <dje@google.com>
12966 Pierre Muller <muller@ics.u-strasbg.fr>
12967
12968 Add h/w watchpoint support to x86-linux, win32-i386.
12969 * Makefile.in (SFILES): Add i386-low.c
12970 (i386_low_h): Define.
12971 (i386-low.o): Add dependencies.
12972 (linux-x86-low.o): Add i386-low.h dependency.
12973 (win32-i386-low.o): Ditto.
12974 * i386-low.c: New file.
12975 * i386-low.h: New file.
12976 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12977 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12978 * linux-low.c (linux_add_process): Initialize arch_private.
12979 (linux_remove_process): Free arch_private.
12980 (add_lwp): Initialize arch_private.
12981 (delete_lwp): Free arch_private.
12982 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12983 provided.
12984 * linux-low.h (process_info_private): New member arch_private.
12985 (lwp_info): New member arch_private.
12986 (linux_target_ops): New members new_process, new_thread,
12987 prepare_to_resume.
12988 (ptid_of): New macro.
12989 * linux-x86-low.c: Include stddef.h, i386-low.h.
12990 (arch_process_info): New struct.
12991 (arch_lwp_info): New struct.
12992 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12993 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12994 (i386_dr_low_get_status): New function.
12995 (x86_insert_point, x86_remove_point): New functions.
12996 (x86_stopped_by_watchpoint): New function.
12997 (x86_stopped_data_address): New function.
12998 (x86_linux_new_process, x86_linux_new_thread): New functions.
12999 (x86_linux_prepare_to_resume): New function.
13000 (the_low_target): Add entries for insert_point, remove_point,
13001 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13002 prepare_to_resume.
13003 * server.c (debug_hw_points): New global.
13004 (monitor_show_help): Document set debug-hw-points.
13005 (handle_query): Process "set debug-hw-points".
13006 * server.h (debug_hw_points): Declare.
13007 (paddress): Declare.
13008 * utils.c (NUMCELLS, CELLSIZE): New macros.
13009 (get_sell, xsnprintf, paddress): New functions.
13010 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13011 remove_point, stopped_by_watchpoint, stopped_data_address.
13012 * win32-i386-low.c: Include i386-low.h.
13013 (debug_reg_state): Replaces dr.
13014 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13015 (i386_dr_low_get_status): New function.
13016 (i386_insert_point, i386_remove_point): New functions.
13017 (i386_stopped_by_watchpoint): New function.
13018 (i386_stopped_data_address): New function.
13019 (i386_initial_stuff): Update.
13020 (get_thread_context,set_thread_context,i386_thread_added): Update.
13021 (the_low_target): Add entries for insert_point,
13022 remove_point, stopped_by_watchpoint, stopped_data_address.
13023 * win32-low.c (win32_insert_watchpoint): New function.
13024 (win32_remove_watchpoint): New function.
13025 (win32_stopped_by_watchpoint): New function.
13026 (win32_stopped_data_address): New function.
13027 (win32_target_ops): Add entries for insert_watchpoint,
13028 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13029 * win32-low.h (win32_target_ops): New members insert_point,
13030 remove_point, stopped_by_watchpoint, stopped_data_address.
13031
d993e290
PA
130322009-06-25 Pedro Alves <pedro@codesourcery.com>
13033
13034 * server.c (process_serial_event): Re-return unsupported, not
13035 error, if the type isn't recognized. Re-allow supporting only
13036 insert or remove packets. Also call require_running for
13037 breakpoints. Add missing break statement to default case. Tidy.
13038 * target.h (struct target_ops): Rename insert_watchpoint to
13039 insert_point, and remove_watchpoint to remove_point.
13040
13041 * linux-low.h (struct linux_target_ops): Likewise.
13042 * linux-low.c (linux_insert_watchpoint): Rename to ...
13043 (linux_insert_point): ... this. Adjust.
13044 (linux_remove_watchpoint): Rename to ...
13045 (linux_remove_point): ... this. Adjust.
13046 (linux_target_ops): Adjust.
13047 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13048 (cris_insert_point): ... this.
13049 (cris_remove_watchpoint): Rename to ...
13050 (cris_remove_point): ... this.
13051 (the_low_target): Adjust.
13052
0f54c268
PM
130532009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13054
13055 * server.c (handle_v_kill): Pass signal_pid to
13056 kill_inferior if multi_process is zero.
13057
c6314022
AR
130582009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13059
13060 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13061 * target.h (target_ops): Comment for *_watchpoint to make it clear
13062 the functions can get types '0' and '1'.
13063
4463ce24
AR
130642009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13065
13066 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13067 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13068 * regcache.c (get_regcache): Likewise.
13069 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13070 * win32-low.c (child_fetch_inferior_registers): Remove check for
13071 regno 0.
13072
cf8fd78b
PA
130732009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13074 Pedro Alves <pedro@codesourcery.com>
13075
13076 * target.h (struct target_ops) <supports_multi_process>: New
13077 callback.
13078 (target_supports_multi_process): New.
13079 * server.c (handle_query): Even if GDB reports support, only
13080 enable multi-process if the target also supports it. Report
13081 multi-process support only if the target backend supports it.
13082 * linux-low.c (linux_supports_multi_process): New function.
13083 (linux_target_ops): Install it as target_supports_multi_process
13084 callback.
13085
47c0c975
DE
130862009-05-24 Doug Evans <dje@google.com>
13087
e09875d4
DE
13088 Global renaming of find_thread_pid to find_thread_ptid.
13089 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13090 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13091 All callers updated.
13092
e27d73f6
DE
13093 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13094 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13095 directly.
13096
47c0c975
DE
13097 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13098 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13099 (linux_resume_one_lwp): Ditto.
13100
2acc282a
DE
131012009-05-23 Doug Evans <dje@google.com>
13102
13103 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13104 from struct inferior_list_entry * to struct lwp_info *.
13105 All callers updated.
13106
9f1036c1
DE
131072009-05-13 Doug Evans <dje@google.com>
13108
13109 * linux-x86-low.c: Don't include assert.h.
13110 (x86_siginfo_fixup): Use fatal, not assert.
13111 (x86_arch_setup): Fix comment.
13112
d0722149
DE
131132009-05-12 Doug Evans <dje@google.com>
13114
13115 Biarch support for i386/amd64 gdbserver.
13116 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13117 Add linux-x86-low.c.
13118 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13119 (linux-x86-low.o): Add.
13120 * linux-x86-64-low.c: Delete.
13121 * linux-i386-low.c: Delete.
13122 * linux-x86-low.c: New file.
13123 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13124 linux-x86-low.o.
13125 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13126 linux-x86-low.o.
13127 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13128 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13129 (linux_child_pid_to_exec_file): New function.
13130 (elf_64_header_p, elf_64_file_p): New functions.
13131 (siginfo_fixup): New function.
13132 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13133 give target a chance to convert layout.
13134 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13135 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13136
fdeb2a12
DE
131372009-05-07 Doug Evans <dje@google.com>
13138
13139 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13140 (regsets_store_inferior_registers): Ditto.
13141
a6dbe5df
PA
131422009-05-06 Pedro Alves <pedro@codesourcery.com>
13143
13144 PR server/10048
13145
13146 * linux-low.c (must_set_ptrace_flags): Delete.
13147 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13148 of the global.
13149 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13150 `lwp->must_set_ptrace_flags' instead.
ba42693b 13151 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
13152 (linux_wait_1): ... not here.
13153
5091eb23
DE
131542009-04-30 Doug Evans <dje@google.com>
13155
9f767825
DE
13156 * inferiors.c (started_inferior_callback): New function.
13157 (attached_inferior_callback): New function.
13158 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13159 * server.c (print_started_pid, print_attached_pid): New functions.
13160 (detach_or_kill_for_exit): New function.
13161 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13162 * server.h (have_started_inferiors_p): Declare.
13163 (have_attached_inferiors_p): Declare.
13164
5091eb23
DE
13165 * inferiors.c (remove_process): Fix memory leak, free process.
13166 * linux-low.c (linux_remove_process): New function.
13167 (linux_kill): Call it instead of remove_process.
13168 (linux_detach, linux_wait_1): Ditto.
13169
155c8968
PA
131702009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13171
13172 * configure.srv: Add x86 Windows CE target.
13173
7fe519cb
UW
131742009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13175
13176 * inferiors.c (get_thread_process): Make global.
13177 * server.h (get_thread_process): Add prototype.
13178 * thread-db.c (find_one_thread): Use get_thread_process
13179 instead of current_process.
13180 (thread_db_get_tls_address): Do not crash if called when
13181 thread layer is not yet initialized.
13182
5472f405
UW
131832009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13184
13185 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13186 * spu-low.c (current_tid): Rename to ...
13187 (current_ptid): ... this.
13188 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13189 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13190 ptid_get_lwp (current_ptid) instead of current_tid.
13191 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13192 instead of current_tid. Use find_process_pid to verify pid
13193 argument is valid. Pass proper argument to remove_process.
13194 (spu_thread_alive): Compare current_ptid instead of current_tid.
13195 (spu_resume): Likewise.
13196
55ac2b99
PA
131972009-04-02 Pedro Alves <pedro@codesourcery.com>
13198
13199 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13200 variable.
13201
95954743
PA
132022009-04-01 Pedro Alves <pedro@codesourcery.com>
13203
13204 Implement the multiprocess extensions, and add linux multiprocess
13205 support.
13206
13207 * server.h (ULONGEST): Declare.
13208 (struct ptid, ptid_t): New.
13209 (minus_one_ptid, null_ptid): Declare.
13210 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13211 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13212 (struct inferior_list_entry): Change `id' type from unsigned from
13213 to ptid_t.
13214 (struct sym_cache, struct breakpoint, struct
13215 process_info_private): Forward declare.
13216 (struct process_info): Declare.
13217 (current_process): Declare.
13218 (all_processes): Declare.
13219 (initialize_inferiors): Declare.
13220 (add_thread): Adjust to use ptid_t.
13221 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13222 (add_process, remove_process, find_thread_pid): Declare.
13223 (find_inferior_id): Adjust to use ptid_t.
13224 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13225 (multi_process): Declare.
13226 (push_event): Adjust to use ptid_t.
13227 (read_ptid, write_ptid): Declare.
13228 (prepare_resume_reply): Adjust to use ptid_t.
13229 (clear_symbol_cache): Declare.
13230 * inferiors.c (all_processes): New.
13231 (null_ptid, minus_one_ptid): New.
13232 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13233 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13234 (add_thread): Change unsigned long to ptid. Remove gdb_id
13235 parameter. Adjust.
13236 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13237 (gdb_id_to_thread): Rename to ...
13238 (find_thread_pid): ... this. Change unsigned long to ptid.
13239 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13240 (loaded_dll, pull_pid_from_list): Adjust.
13241 (add_process, remove_process, find_process_pid)
13242 (get_thread_process, current_process, initialize_inferiors): New.
13243 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13244 (struct target_waitstatus) <related_pid>: Ditto.
13245 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13246 return type to int.
13247 (struct target_ops) <join>: Add `pid' argument.
13248 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13249 (struct target_ops) <wait>: Add `ptid' field. Change return type
13250 to ptid.
13251 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13252 (mywait): Add `ptid' argument. Change return type to ptid_t.
13253 (target_pid_to_str): Declare.
13254 * target.c (set_desired_inferior): Adjust to use ptids.
13255 (mywait): Add new `ptid' argument. Adjust.
13256 (target_pid_to_str): New.
13257 * mem-break.h (free_all_breakpoints): Declare.
13258 * mem-break.c (breakpoints): Delelete.
13259 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13260 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13261 to use per-process breakpoint list.
13262 (free_all_breakpoints): New.
13263 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13264 (symbol_cache, all_symbols_looked_up): Delete.
13265 (hexchars): New.
13266 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13267 read_ptid): New.
13268 (prepare_resume_reply): Change ptid argument's type from unsigned
13269 long to ptid_t. Adjust. Implement W;process and X;process.
13270 (free_sym_cache, clear_symbol_cache): New.
13271 (look_up_one_symbol): Adjust to per-process symbol cache. *
13272 * server.c (cont_thread, general_thread, step_thread): Change type
13273 to ptid_t.
13274 (attached): Delete.
13275 (multi_process): New.
13276 (last_ptid): Change type to ptid_t.
13277 (struct vstop_notif) <ptid>: Change type to ptid_t.
13278 (queue_stop_reply, push_event): Change `ptid' argument's type to
13279 ptid_t.
13280 (discard_queued_stop_replies): Add `pid' argument.
13281 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13282 changes. Don't reference the `attached' global.
13283 (attach_inferior): Adjust to mywait interface changes.
13284 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13285 features. Handle and report "multiprocess+". Handle
13286 "qAttached:PID".
13287 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13288 changes.
13289 (handle_v_kill): New.
13290 (handle_v_stopped): Adjust to use target_pid_to_str.
13291 (handle_v_requests): Allow multiple attaches and runs when
13292 multiprocess extensions are in effect. Handle "vKill".
13293 (myresume): Adjust to use ptids.
13294 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13295 (handle_status): Adjust to discard_queued_stop_replies interface
13296 change.
13297 (first_thread_of, kill_inferior_callback)
13298 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13299 (main): Call initialize_inferiors. Adjust to use ptids, killing
13300 and detaching from all inferiors. Handle multiprocess packet
13301 variants.
13302 * linux-low.h: Include gdb_proc_service.h.
13303 (struct process_info_private): New.
13304 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13305 <lwpid_of>: Use ptid_get_lwp.
13306 (get_lwp_thread): Adjust.
13307 (struct lwp_info): Add `dead' member.
13308 (find_lwp_pid): Declare.
13309 * linux-low.c (thread_db_active): Delete.
13310 (new_inferior): Adjust comment.
13311 (inferior_pid): Delete.
13312 (linux_add_process): New.
13313 (handle_extended_wait): Adjust.
13314 (add_lwp): Change unsigned long to ptid.
13315 (linux_create_inferior): Add process to processes table. Adjust
13316 to use ptids. Don't set new_inferior here.
13317 (linux_attach_lwp): Rename to ...
13318 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13319 it. Adjust to use ptids.
13320 (linux_attach_lwp): New.
13321 (linux_attach): Add process to processes table. Don't set
13322 new_inferior here.
13323 (struct counter): New.
13324 (second_thread_of_pid_p, last_thread_of_process_p): New.
13325 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13326 multiple processes.
13327 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13328 processes. Remove process from process table.
13329 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13330 to multiple processes.
13331 (any_thread_of): New.
13332 (linux_detach): Add `pid' argument, and handle it. Remove process
13333 from processes table.
13334 (linux_join): Add `pid' argument. Handle it.
13335 (linux_thread_alive): Change unsighed long argument to ptid_t.
13336 Consider dead lwps as not being alive.
13337 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13338 threads we're not interested in.
13339 (same_lwp, find_lwp_pid): New.
13340 (linux_wait_for_lwp): Change `pid' argument's type from int to
13341 ptid_t. Adjust.
13342 (linux_wait_for_event): Rename to ...
13343 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13344 from int to ptid_t. Adjust.
13345 (linux_wait_for_event): New.
13346 (linux_wait_1): Add `ptid' argument. Change return type to
13347 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13348 that exit from the process table.
13349 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13350 Adjust.
13351 (mark_lwp_dead): New.
13352 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13353 stopping all threads, mark its main lwp as dead.
13354 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13355 ptids.
13356 (fetch_register, usr_store_inferior_registers)
13357 (regsets_fetch_inferior_registers)
13358 (regsets_store_inferior_registers, linux_read_memory)
13359 (linux_write_memory): Inline `inferior_pid'.
13360 (linux_look_up_symbols): Adjust to use per-process
13361 `thread_db_active'.
13362 (linux_request_interrupt): Adjust to use ptids.
13363 (linux_read_auxv): Inline `inferior_pid'.
13364 (initialize_low): Don't reference thread_db_active.
13365 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13366 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13367 (ps_getpid): Return the pid of the current inferior.
13368 * thread-db.c (proc_handle, thread_agent): Delete.
13369 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13370 per-process data.
13371 (find_one_thread): Change argument type to ptid_t. Adjust to
13372 per-process data.
13373 (maybe_attach_thread): Adjust to per-process data and ptids.
13374 (thread_db_find_new_threads): Ditto.
13375 (thread_db_init): Ditto.
13376 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13377 processes table. Adjust to use ptids.
13378 (spu_kill, spu_detach): Adjust interface. Remove process from
13379 processes table.
13380 (spu_join, spu_thread_alive): Adjust interface.
13381 (spu_wait): Adjust interface. Remove process from processes
13382 table. Adjust to use ptids.
13383 * win32-low.c (current_inferior_tid): Delete.
13384 (current_inferior_ptid): New.
13385 (debug_event_ptid): New.
13386 (thread_rec): Take a ptid. Adjust.
13387 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13388 (child_delete_thread): Ditto.
13389 (do_initial_child_stuff): Add `attached' argument. Add process to
13390 processes table.
13391 (child_fetch_inferior_registers, child_store_inferior_registers):
13392 Adjust.
13393 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13394 (win32_attach): Pass 1 to do_initial_child_stuff.
13395 (win32_kill): Adjust interface. Remove process from processes
13396 table.
13397 (win32_detach): Ditto.
13398 (win32_join): Adjust interface.
13399 (win32_thread_alive): Take a ptid.
13400 (win32_resume): Adjust to use ptids.
13401 (get_child_debug_event): Ditto.
13402 (win32_wait): Adjust interface. Remove exiting process from
13403 processes table.
13404
bd99dc85
PA
134052009-04-01 Pedro Alves <pedro@codesourcery.com>
13406
13407 Non-stop mode support.
13408
13409 * server.h (non_stop): Declare.
13410 (gdb_client_data, handler_func): Declare.
13411 (delete_file_handler, add_file_handler, start_event_loop):
13412 Declare.
13413 (handle_serial_event, handle_target_event, push_event)
13414 (putpkt_notif): Declare.
13415 * target.h (enum resume_kind): New.
13416 (struct thread_resume): Replace `step' field by `kind' field.
13417 (TARGET_WNOHANG): Define.
13418 (struct target_ops) <wait>: Add `options' argument.
13419 <supports_non_stop, async, start_non_stop>: New fields.
13420 (target_supports_non_stop, target_async): New.
13421 (start_non_stop): Declare.
13422 (mywait): Add `options' argument.
13423 * target.c (mywait): Add `options' argument. Print child exit
13424 notifications here.
13425 (start_non_stop): New.
13426 * server.c (non_stop, own_buf, mem_buf): New globals.
13427 (struct vstop_notif): New.
13428 (notif_queue): New global.
13429 (queue_stop_reply, push_event, discard_queued_stop_replies)
13430 (send_next_stop_reply): New.
13431 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13432 interface changes.
13433 (attach_inferior): In non-stop mode, don't wait for the target
13434 here.
13435 (handle_general_set): Handle QNonStop.
13436 (handle_query): When handling qC, return the current general
13437 thread, instead of the first thread of the list.
13438 (handle_query): If the backend supports non-stop mode, include
13439 QNonStop+ in the qSupported query response.
13440 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13441 and non-stop mode.
13442 (handle_v_attach, handle_v_run): Handle non-stop mode.
13443 (handle_v_stopped): New.
13444 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13445 (myresume): Adjust to use resume_kind. Handle non-stop.
13446 (queue_stop_reply_callback): New.
13447 (handle_status): Handle non-stop mode.
13448 (main): Clear non_stop flag on reconnection. Use the event-loop.
13449 Refactor serial protocol handling from here ...
13450 (process_serial_event): ... to this new function. When GDB
13451 selects any thread, select one here. In non-stop mode, wait until
13452 GDB acks all pending events before exiting.
13453 (handle_serial_event, handle_target_event): New.
13454 * remote-utils.c (remote_open): Install remote_desc in the event
13455 loop.
13456 (remote_close): Remove remote_desc from the event loop.
13457 (putpkt_binary): Rename to...
13458 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13459 (putpkt_binary): New as wrapper around putpkt_binary_1.
13460 (putpkt_notif): New.
13461 (prepare_resume_reply): In non-stop mode, don't change the
13462 general_thread.
13463 * event-loop.c: New.
13464 * Makefile.in (OBJ): Add event-loop.o.
13465 (event-loop.o): New rule.
13466
13467 * linux-low.h (pid_of): Moved here.
13468 (lwpid_of): New.
13469 (get_lwp_thread): Use lwpid_of.
13470 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13471 * linux-low.c (pid_of): Delete.
13472 (inferior_pid): Use lwpid_of.
13473 (linux_event_pipe): New.
13474 (target_is_async_p): New.
13475 (delete_lwp): New.
13476 (handle_extended_wait): Use lwpid_of.
13477 (add_lwp): Don't set lwpid field.
13478 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13479 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13480 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13481 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13482 first. Adjust to linux_wait_for_event interface changes. Use
13483 lwpid_of.
13484 (linux_detach): Don't delete the main lwp here.
13485 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13486 (status_pending_p): Don't consider explicitly suspended lwps.
13487 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13488 pointer. Add OPTIONS argument. Change return type to int. Use
13489 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13490 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13491 pointer. Add status pointer argument. Return a pid instead of a
13492 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13493 changes. In non-stop mode, don't switch to a random thread.
13494 (linux_wait): Rename to...
13495 (linux_wait_1): ... this. Add target_options argument, and handle
13496 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13497 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13498 clean exit and signal exit code. Don't stop all threads in
13499 non-stop mode. In all-stop mode, only stop all threads when
13500 reporting a stop to GDB. Handle explicit thread stop requests.
13501 (async_file_flush, async_file_mark): New.
13502 (linux_wait): New.
13503 (send_sigstop): Use lwpid_of.
13504 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13505 interface changes. In non-stop mode, don't switch to a random
13506 thread.
13507 (linux_resume_one_lwp): Use lwpid_of.
13508 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13509 (linux_resume_one_thread): ... this. Handle resume_stop. In
13510 non-stop mode, don't look for pending flag in all threads.
13511 (resume_status_pending_p): Don't consider explicitly suspended
13512 threads.
13513 (my_waitpid): Reimplement. Emulate __WALL.
13514 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13515 Use lwpid_of.
13516 (sigchld_handler, linux_supports_non_stop, linux_async)
13517 (linux_start_non_stop): New.
13518 (linux_target_ops): Register linux_supports_non_stop, linux_async
13519 and linux_start_non_stop.
13520 (initialize_low): Install SIGCHLD handler.
13521 * thread-db.c (thread_db_create_event, find_one_thread)
13522 (thread_db_get_tls_address): Use lwpid_of.
13523 * win32-low.c (win32_detach): Adjust to use resume_kind.
13524 (win32_wait): Add `options' argument.
13525 * spu-low.c (spu_resume): Adjust to use resume_kind.
13526 (spu_wait): Add `options' argument.
13527
5b1c542e
PA
135282009-04-01 Pedro Alves <pedro@codesourcery.com>
13529
13530 Decouple target code from remote protocol.
13531
13532 * target.h (enum target_waitkind): New.
13533 (struct target_waitstatus): New.
13534 (struct target_ops) <wait>: Return an unsigned long. Take a
13535 target_waitstatus pointer instead of a char pointer.
13536 (mywait): Likewise.
13537 * target.c (mywait): Change prototype to return an unsigned long.
13538 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13539 * server.h (thread_from_wait, old_thread_from_wait): Delete
13540 declarations.
13541 (prepare_resume_reply): Change prototype to take a
13542 target_waitstatus.
13543 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13544 (last_status, last_ptid): New.
13545 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13546 pid instead of a signal.
13547 (attach_inferior): Remove "status" and "signal" parameters.
13548 Adjust.
13549 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13550 not as an address.
13551 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13552 (handle_v_requests, myresume): Remove "status" and "signal"
13553 parameters. Adjust.
13554 (handle_status): New.
13555 (main): Delete local `status'. Adjust.
13556 * remote-utils.c: Include target.h.
13557 (prepare_resume_reply): Change prototype to take a
13558 target_waitstatus. Adjust.
13559
13560 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13561 interface.
13562 * spu-low.c (spu_wait): Adjust.
13563 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13564 Delete.
13565 (win32_wait): Adjust.
13566
2bd7c093
PA
135672009-04-01 Pedro Alves <pedro@codesourcery.com>
13568
13569 * target.h (struct thread_resume): Delete leave_stopped member.
13570 (struct target_ops): Add a `n' argument to the `resume' callback.
13571 * server.c (start_inferior): Adjust.
13572 (handle_v_cont, myresume): Adjust.
13573 * linux-low.c (check_removed_breakpoint): Adjust to resume
13574 interface change, and to removed leave_stopped field.
13575 (resume_ptr): Delete.
13576 (struct thread_resume_array): New.
13577 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13578 resume interface change.
13579 (linux_continue_one_thread, linux_queue_one_thread)
13580 (resume_status_pending_p): Check if the resume field is NULL
13581 instead of checking the leave_stopped member.
13582 (linux_resume): Adjust to the target resume interface change.
13583 * spu-low.c (spu_resume): Adjust to the target resume interface
13584 change.
13585 * win32-low.c (win32_detach, win32_resume): Ditto.
13586
c35fafde
PA
135872009-04-01 Pedro Alves <pedro@codesourcery.com>
13588
13589 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13590 flag.
13591 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13592 pending.
13593 (linux_continue_one_thread): Only preserve the stepping flag if
13594 there's a pending breakpoint.
13595
0a59d50b
PA
135962009-03-31 Pedro Alves <pedro@codesourcery.com>
13597
13598 * server.c (main): After the inferior having exited, call
13599 remote_close before exiting gdbserver.
13600
f04c6d38
TJB
136012009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13602
13603 Fix size of FPSCR in Power 7 processors.
13604 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13605 (PPC_FEATURE_HAS_DFP): New #define.
13606 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13607 size of the FPSCR.
13608
78e5cee6
PA
136092009-03-23 Pedro Alves <pedro@codesourcery.com>
13610
13611 * server.c (handle_query) Whitespace and formatting.
13612
1b3f6016
PA
136132009-03-22 Pedro Alves <pedro@codesourcery.com>
13614
13615 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13616 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13617 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13618 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13619 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13620 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13621 Makefile.in, configure.ac: Fix whitespace throughout.
13622 * configure: Regenerate.
13623
a07b2135
PA
136242009-03-22 Pedro Alves <pedro@codesourcery.com>
13625
13626 * inferiors.c (find_inferior): Make it safe for the callback
13627 function to delete the currently iterated inferior.
13628
67cc2626
PA
136292009-03-22 Pedro Alves <pedro@codesourcery.com>
13630
13631 * Makefile.in (linuw_low_h): Move higher.
13632 (thread-db.o): Depend on $(linux_low_h).
13633
54a0b537
PA
136342009-03-17 Pedro Alves <pedro@codesourcery.com>
13635
13636 Rename "process" to "lwp" throughout.
13637
13638 * linux-low.c (all_processes): Rename to...
13639 (all_lwps): ... this.
13640 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13641 (add_process): Rename to ...
13642 (add_lwp): ... this. Adjust.
13643 (linux_create_inferior): Adjust.
13644 (linux_attach_lwp): Adjust.
13645 (linux_attach): Adjust.
13646 (linux_kill_one_process): Rename to ...
13647 (linux_kill_one_lwp): ... this. Adjust.
13648 (linux_kill): Adjust.
13649 (linux_detach_one_process): Rename to ...
13650 (linux_detach_one_lwp): ... this. Adjust.
13651 (linux_detach): Adjust.
13652 (check_removed_breakpoint): Adjust.
13653 (status_pending_p): Adjust.
13654 (linux_wait_for_process): Rename to ...
13655 (linux_wait_for_lwp): ... this. Adjust.
13656 (linux_wait_for_event): Adjust.
13657 (send_sigstop): Adjust.
13658 (wait_for_sigstop): Adjust.
13659 (stop_all_processes): Rename to ...
13660 (stop_all_lwps): ... this.
13661 (linux_resume_one_process): Rename to ...
13662 (linux_resume_one_lwp): ... this. Adjust.
13663 (linux_set_resume_request, linux_continue_one_thread)
13664 (linux_queue_one_thread, resume_status_pending_p)
13665 (usr_store_inferior_registers, regsets_store_inferior_registers)
13666 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13667 Adjust.
13668 * linux-low.h (get_process): Rename to ...
13669 (get_lwp): ... this. Adjust.
13670 (get_thread_process): Rename to ...
13671 (get_thread_lwp): ... this. Adjust.
13672 (get_process_thread): Rename to ...
13673 (get_lwp_thread): ... this. Adjust.
13674 (struct process_info): Rename to ...
13675 (struct lwp_info): ... this.
13676 (all_processes): Rename to ...
13677 (all_lwps): ... this.
13678 * proc-service.c (ps_lgetregs): Adjust.
13679 * thread-db.c (thread_db_create_event, find_one_thread)
13680 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13681
0b16c5cf
PA
136822009-03-14 Pedro Alves <pedro@codesourcery.com>
13683
13684 * server.c (handle_query): Handle "qAttached".
13685
32de4b9d
NS
136862009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13687
13688 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13689 GPLv3, update license URL.
13690
2aecd87f
DE
136912009-03-01 Doug Evans <dje@google.com>
13692
93efd302 13693 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13694 (server_h): Add gdb_signals.h.
13695 (signals.o): Update.
13696 * server.h (target_signal_from_host,target_signal_to_host_p)
13697 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13698
86b1f9c5
PM
136992009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13700
13701 * remote-utils.c (getpkt): Also generate remote-debug
13702 information if noack_mode is set.
13703
4aa995e1
PA
137042009-02-06 Pedro Alves <pedro@codesourcery.com>
13705
13706 * server.c (handle_query): Report qXfer:siginfo:read and
13707 qXfer:siginfo:write as supported and handle them.
13708 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13709 * linux-low.c (linux_xfer_siginfo): New.
13710 (linux_target_ops): Set it.
13711
62709adf
PA
137122009-01-26 Pedro Alves <pedro@codesourcery.com>
13713
13714 * server.c (gdbserver_usage): Mention --remote-debug.
13715 (main): Accept '--remote-debug' switch.
13716
aef93bd7
DE
137172009-01-18 Doug Evans <dje@google.com>
13718
13719 * regcache.c (new_register_cache): No need to check result of xcalloc.
13720 * server.c (handle_search_memory): Back out calls to xmalloc,
13721 result is checked and error is returned to user upon failure.
13722 (handle_query): Ditto. Add more checks for result of malloc.
13723 (handle_v_cont): Check result of malloc, report error back to
13724 user upon failure.
13725 (handle_v_run): Ditto. Call freeargv.
13726 * server.h (freeargv): Declare.
13727 * utils.c (freeargv): New fn.
13728
54363045
DE
137292009-01-15 Doug Evans <dje@google.com>
13730
f626972c
DE
13731 * gdbreplay.c (perror_with_name): Make arg const char *.
13732 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13733 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13734 * utils.c (perror_with_name): Make arg const char *.
54363045 13735
18aae699
PA
137362009-01-14 Pedro Alves <pedro@codesourcery.com>
13737
13738 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13739 when handling a EXIT_PROCESS_DEBUG_EVENT.
13740
ff703abe
JB
137412009-01-06 Joel Brobecker <brobecker@adacore.com>
13742
13743 * gdbreplay.c (gdbreplay_version): Update copyright year.
13744 * server.c (gdbserver_version): Likewise.
13745
f21cc1a2 137462009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13747
13748 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13749 (handle_extended_wait): Improve comment.
0e21c1ec 13750
bca929d3
DE
137512008-12-13 Doug Evans <dje@google.com>
13752
13753 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13754 * server.h (ATTR_MALLOC): New macro.
13755 (xmalloc,xcalloc,xstrdup): Declare.
13756 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13757 * inferiors.c: Ditto.
13758 * linux-low.c: Ditto.
13759 * mem-break.c: Ditto.
13760 * regcache.c: Ditto.
13761 * remote-utils.c: Ditto.
13762 * server.c: Ditto.
13763 * target.c: Ditto.
13764 * win32-low.c: Ditto.
13765
97438e3f
DE
137662008-12-12 Doug Evans <dje@google.com>
13767
896c7fbb
DE
13768 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13769 in debugging printf.
13770
97438e3f
DE
13771 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13772
e3b886f8
DE
137732008-12-09 Doug Evans <dje@google.com>
13774
13775 * linux-low.h (struct process_info): Delete member tid, unused.
13776 * thread-db.c (find_one_thread): Update.
13777 (maybe_attach_thread): Update.
13778
07e059b5
VP
137792008-12-02 Pedro Alves <pedro@codesourcery.com>
13780
889bf7c5
PA
13781 * target.h (struct target_ops): Add qxfer_osdata member.
13782 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13783 and dirent.h.
13784 (linux_qxfer_osdata): New functions.
13785 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13786 callback.
13787 * server.c (handle_query): Handle "qXfer:osdata:read:".
13788 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13789 (buffer_xml_printf): New functions.
13790 * server.h (struct buffer): New.
13791 (buffer_grow_str, buffer_grow_str0): New macros.
13792 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13793 (buffer_xml_printf): Declare.
07e059b5 13794
4cab47ab
DE
137952008-11-24 Doug Evans <dje@google.com>
13796
13797 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13798
f142445f
DJ
137992008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13800
13801 * server.c (handle_v_run): Always use the supplied argument list.
13802
d0107bb6 138032008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13804
d0107bb6
BW
13805 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13806 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13807
2c4ad781
TJB
138082008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13809
13810 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13811 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13812 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13813 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13814 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13815 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13816 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13817 XML target descriptions.
13818 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13819 when inferior is running on an ISA 2.05 or later processor. Add
13820 special case to return offset for full 64-bit slot of FPSCR when
13821 in 32-bits.
13822
dfb64f85
DJ
138232008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13824
13825 * Makefile.in (SFILES, clean): Added sparc64 files.
13826 (reg-sparc64.o, reg-sparc64.c): New.
13827 * configure.srv (sparc*-*-linux*): New configuration.
13828 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13829 syscall arguments for SPARC.
13830 (regsets_store_inferior_registers): Likewise.
13831 * linux-sparc-low.c: New file.
13832
66b6e1dd
DE
138332008-10-21 Doug Evans <dje@google.com>
13834
13835 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13836 (READLINE_DIR,READLINE_DEP): Delete.
13837 (INTERNAL_CFLAGS): Update.
13838 (LINTFLAGS): Update.
13839
9b710a42
PA
138402008-10-10 Pedro Alves <pedro@codesourcery.com>
13841
13842 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13843 whole argv from the last run, not just argv[0].
13844
5822d809
PA
138452008-09-08 Pedro Alves <pedro@codesourcery.com>
13846
13847 * regcache.c (new_register_cache): Return NULL if the register
13848 cache size isn't known yet.
13849 (free_register_cache): Avoid dereferencing a NULL regcache.
13850
74aac56f
DJ
138512008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13852
13853 * configure.srv: Merge MIPS and MIPS64.
13854
400b20f5
MR
138552008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13856
13857 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13858
677c5bb1
LM
138592008-08-18 Luis Machado <luisgpm@br.ibm.com>
13860
13861 * Makefile.in: Add required vsx dependencies.
13862
13863 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13864 Declare init_registers_powerpc_vsx32l.
13865 Declare init_registers_powerpc_vsx64l.
13866 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13867 (ppc_arch_setup): Check for VSX in hwcap.
13868 (ppc_fill_vsxregset): New function.
13869 (ppc_store_vsxregset): New function.
13870 Add new VSX entry in regset_info target_regsets.
13871
13872 * configure.srv: Add new VSX dependencies.
13873
a6f3e723
SL
138742008-08-12 Pedro Alves <pedro@codesourcery.com>
13875
13876 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13877 (remote_open): Set or clear transport_is_reliable.
13878 (putpkt_binary): Don't expect acks in noack mode.
13879 (getpkt): Don't send ack/nac in noack mode.
13880 * server.c (handle_general_set): Handle QStartNoAckMode.
13881 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13882 qSupported.
13883 (main): Reset noack_mode on every connection.
13884 * server.h (noack_mode): Declare.
13885
a417dc56
RW
138862008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13887
13888 * Makefile.in (GDBREPLAY_OBS): New variable.
13889 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13890
3221518c
UW
138912008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13892 Daniel Jacobowitz <dan@codesourcery.com>
13893
13894 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13895 (usr_store_inferior_registers): Likewise.
13896 (regsets_store_inferior_registers): Likewise.
13897
ec56be1b
PA
138982008-07-31 Rolf Jansen <rj@surtec.com>
13899 Pedro Alves <pedro@codesourcery.com>
13900
13901 * configure.ac: Check for memmem declaration.
13902 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13903 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13904 (disable_packet_qfThreadInfo): Unconditionally compile.
13905 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13906 * configure, config.in: Regenerate.
13907
2fe5e3ff
DE
139082008-07-28 Doug Kwan <dougkwan@google.com>
13909
13910 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13911 (linux_write_memory): Remove declaration of errno.
13912
836acd6d
UW
139132008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13914
13915 * linux-low.c (handle_extended_wait): Do not use "status"
13916 variable uninitialized.
13917
aeba519e
PA
139182008-07-07 Pedro Alves <pedro@codesourcery.com>
13919
13920 * server.c (handle_v_attach): Inhibit reporting dll changes.
13921
db42f210
PA
139222008-06-27 Pedro Alves <pedro@codesourcery.com>
13923
13924 * remote-utils.c (prepare_resume_reply): If requested, don't
13925 output "thread:TID" in the T stop reply.
13926
13927 * server.c (disable_packet_vCont, disable_packet_Tthread)
13928 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13929 (handle_query): If requested, disable support for qC, qfThreadInfo
13930 and qsThreadInfo.
13931 (handle_v_requests): If requested, disable support for vCont.
13932 (gdbserver_show_disableable): New.
13933 (main): Handle --disable-packet and --disable-packet=LIST.
13934
13935 * server.h (disable_packet_vCont, disable_packet_Tthread)
13936 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13937
8e4c5421
CD
139382008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13939
13940 * server.c (gdbserver_usage): Mention --version.
13941
6e23a804
DJ
139422008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13943
13944 * Makefile.in (gdbreplay.o): New rule.
13945
90aa6a40
JM
139462008-06-06 Joseph Myers <joseph@codesourcery.com>
13947
13948 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13949 message, not gdbserver.
13950
c16158bc 139512008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13952 Nathan Sidwell <nathan@codesourcery.com>
13953 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13954
13955 * acinclude.m4: Include ../../config/acx.m4.
13956 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13957 * configure, config.in: Regenerate.
13958 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13959 * server.c (gdbserver_version): Print PKGVERSION.
13960 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13961 (main): Adjust gdbserver_usage calls.
13962 * gdbreplay.c (version, host_name): Add declarations.
13963 (gdbreplay_version, gdbreplay_usage): New.
13964 (main): Accept --version and --help options.
13965
aeb75bf5
DJ
139662008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13967
13968 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13969 (arm_breakpoint_at): Handle Thumb.
13970 (the_low_target): Add comment.
13971
76b233dd
UW
139722008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13973
13974 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13975
08388c79
DE
139762008-05-09 Doug Evans <dje@google.com>
13977
a3c83fae
DE
13978 * server.h (decode_search_memory_packet): Declare.
13979 * remote-utils.c (decode_search_memory_packet): New fn.
13980 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13981 (handle_search_memory): New fn.
13982 (handle_query): Process qSearch:memory packets.
13983
bb9c3d36
UW
139842008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13985
13986 * regcache.c (registers_length): Remove.
13987 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13988 full register packet.
13989 * regcache.h (registers_length): Remove prototype.
13990 * server.h (PBUFSIZ): Define to 16384.
13991
7284e1be
UW
139922008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13993
13994 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13995 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13996 powerpc-64l.o, and powerpc-altivec64l.o.
13997 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13998 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13999 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14000 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14001 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14002 to srv_xmlfiles.
14003
14004 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14005 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14006 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14007 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14008 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14009 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14010 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14011 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14012 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14013 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14014 (clean): Update.
14015
14016 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14017 (init_registers_powerpc_32l): ... this new prototype.
14018 (init_registers_powerpc_32): Remove, replace by ...
14019 (init_registers_powerpc_altivec32l): ... this new prototype.
14020 (init_registers_powerpc_e500): Remove, replace by ...
14021 (init_registers_powerpc_e500l): ... this new prototype.
14022 (init_registers_ppc64): Remove, replace by ...
14023 (init_registers_powerpc_64l): ... this new prototype.
14024 (init_registers_powerpc_64): Remove, replace by ...
14025 (init_registers_powerpc_altivec64l): ... this new prototype.
14026 (ppc_num_regs): Set to 73.
14027 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14028 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14029 (ppc_cannot_store_register): Handle orig_r3 and trap.
14030 (ppc_arch_setup): Update init_registers_... calls.
14031 (ppc_fill_gregset): Handle orig_r3 and trap.
14032
14033 * inferiors.c (clear_inferiors): Reset current_inferior.
14034
fdc59709
PB
140352008-04-23 Paolo Bonzini <bonzini@gnu.org>
14036
889bf7c5
PA
14037 * acinclude.m4: Add override.m4.
14038 * configure: Regenerate.
fdc59709 14039
c9b2f845
UW
140402008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14041
14042 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14043 initial call to init_register_ppc64.
14044
550512b8
UW
140452008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14046
43aaf8b6
PA
14047 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14048 single powerpc*-*-linux* case.
550512b8
UW
14049 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14050
b6430ec3
UW
140512008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14052
14053 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 14054 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
14055 from reg_xmlfiles.
14056 * linux-ppc-low.c: Include <elf.h>.
14057 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14058 (ppc_hwcap): New global variable.
14059 (ppc_regmap): Remove __SPE__ #ifdef sections.
14060 (ppc_regmap_e500): New global variable.
14061 (ppc_cannot_store_register): Update __SPE__ special case.
14062 (ppc_get_hwcap): New function.
14063 (ppc_arch_setup): Use it to determine whether inferior supports
14064 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14065 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14066 Do not access registers if target does not support AltiVec.
14067 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14068 Do not access registers if target does not support SPE.
14069 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14070
52fa2412
UW
140712008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14072
14073 * linux-low.c (disabled_regsets, num_regsets): New.
14074 (use_regsets_p): Delete.
14075 (linux_wait_for_process): Clear disabled_regsets.
14076 (regsets_fetch_inferior_registers): Check and set it.
14077 (regsets_store_inferior_registers): Likewise.
14078 (linux_fetch_registers, linux_store_registers): Do not use
14079 use_regsets_p.
14080 (initialize_low): Allocate disabled_regsets.
14081
e28b3332
DJ
140822008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14083
14084 * Makefile.in (LIBOBJS): New.
14085 (OBS): Use LIBOBJS.
14086 (memmem.o): New rule.
14087 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14088 * configure: Regenerated.
14089
4536995d
UW
140902008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14091
14092 * server.c (handle_query): Never return "unsupported" for
14093 qXfer:features:read queries.
14094
221c031f
UW
140952008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14096
14097 * server.c (get_features_xml): Fix inverted condition.
14098 (handle_query): Always support qXfer:feature:read.
14099
ccd213ac
DJ
141002008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14101
14102 * server.c (wrapper_argv): New.
14103 (start_inferior): Handle wrapper_argv. If set, expect an extra
14104 trap.
14105 (gdbserver_usage): Document --wrapper.
14106 (main): Parse --wrapper.
14107
6fe305f7
UW
141082008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14109
14110 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14111 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14112 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14113 (ppc_set_pc): Likewise.
14114 (ppc_arch_setup): New function.
14115 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14116 of collect_register.
889bf7c5 14117 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 14118
5b0a002e
UW
141192008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14120
14121 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14122 instead of linux-ppc64-low.o.
14123 * linux-ppc64-low.c: Remove file.
14124 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14125 (linux-ppc64-low.o): Remove rule.
14126
14127 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14128 (init_registers_powerpc_64): Likewise.
14129 (ppc_regmap): Conditionally define depending on __powerpc64__.
14130 (ppc_cannot_store_register): Do not special-case "fpscr" when
14131 compiled on __powerpc64__.
14132 (ppc_collect_ptrace_register): New function.
14133 (ppc_supply_ptrace_register): New function.
14134 (ppc_breakpoint): Change type to "unsigned int".
14135 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14136 (the_low_target): Conditionally provide initializers for the
889bf7c5 14137 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
14138 collect_ptrace_register and supply_ptrace_register members.
14139
9b4b61c8
UW
141402008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14141
14142 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14143 * server.c (gdbserver_xmltarget): Define.
14144 (get_features_xml): Use it to replace "target.xml" and arch_string.
14145
14146 * configure.srv: Remove srv_xmltarget. Add XML files that were
14147 mentioned there to srv_xmlfiles instead. Remove conditional tests
14148 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14149 srv_xmlfiles and srv_regobj to include all possible choices.
14150 * configure.ac (srv_xmltarget): Remove.
14151 (srv_xmlfiles): Do not add "target.xml".
14152 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14153 checks for supplementary target information.
14154 * configure: Regenerate.
14155 * Makefile.in (XML_TARGET): Remove.
14156 (target.xml): Remove rule.
14157 (clean): Do not clean up target.xml.
14158 (.PRECIOUS): Do not mention target.xml.
14159
14160 * target.h (struct target_ops): Remove arch_string member.
14161 * linux-low.c (linux_arch_string): Remove.
14162 (linux_target_ops): Remove arch_string initializer.
14163 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14164 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14165 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14166 * spu-low.c (spu_arch_string): Remove.
14167 (spu_target_ops): Remove arch_string initializer.
14168 * win32-low.c (win32_arch_string): Remove.
14169 (win32_target_ops): Remove arch_string initializer.
14170 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14171 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14172 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14173
ee1a7ae4
UW
141742008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14175
14176 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14177 by collect_ptrace_register and supply_ptrace_register hooks.
14178 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14179 instead of checking for the_low_target.left_pad_xfer.
14180 (usr_store_inferior_registers): Use collect_ptrace_register callback
14181 instead of checking for the_low_target.left_pad_xfer.
14182
14183 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14184 (s390_supply_ptrace_register): Likewise.
14185 (s390_fill_gregset): Call s390_collect_ptrace_register.
14186 (the_low_target): Update.
14187
14188 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14189 (ppc_supply_ptrace_register): Likewise.
14190 (the_low_target): Update.
14191
14192 * linux-i386-low.c (the_low_target): Update.
14193 * linux-x86-64-low.c (the_low_target): Update.
14194
d61ddec4
UW
141952008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14196
14197 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14198 reg-s390.o and reg-s390x.o.
14199
14200 * linux-low.c (new_inferior): New global variable.
14201 (linux_create_inferior, linux_attach): Set it.
14202 (linux_wait_for_process): Call the_low_target.arch_setup after the
14203 target has stopped for the first time.
14204 (initialize_low): Do not call the_low_target.arch_setup.
14205
14206 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14207 (s390_set_pc): Likewise.
14208 (s390_arch_setup): New function.
14209 (the_low_target): Use s390_arch_setup as arch_setup routine.
14210
14211 * regcache.c (realloc_register_cache): New function.
14212 (set_register_cache): Call it for each existing regcache.
14213
d05b4ac3
UW
142142008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14215
14216 * server.h (init_registers): Remove prototype.
14217
14218 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14219 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14220 instead of init_registers ().
14221 * linux-arm-low.c (init_registers_arm): Add prototype.
14222 (init_registers_arm_with_iwmmxt): Likewise.
14223 (the_low_target): Add initializer for arch_setup field.
14224 * linux-cris-low.c (init_registers_cris): Add prototype.
14225 (the_low_target): Add initializer for arch_setup field.
14226 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14227 (the_low_target): Add initializer for arch_setup field.
14228 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14229 (the_low_target): Add initializer for arch_setup field.
14230 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14231 (the_low_target): Add initializer for arch_setup field.
14232 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14233 (the_low_target): Add initializer for arch_setup field.
14234 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14235 (the_low_target): Add initializer for arch_setup field.
14236 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14237 (init_registers_mips64_linux): Likewise.
14238 (the_low_target): Add initializer for arch_setup field.
14239 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14240 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14241 (the_low_target): Add initializer for arch_setup field.
14242 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14243 (init_registers_powerpc_64): Likewise.
14244 (the_low_target): Add initializer for arch_setup field.
14245 * linux-s390-low.c (init_registers_s390): Add prototype.
14246 (init_registers_s390x): Likewise.
14247 (the_low_target): Add initializer for arch_setup field.
14248 * linux-sh-low.c (init_registers_sh): Add prototype.
14249 (the_low_target): Add initializer for arch_setup field.
14250 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14251 (the_low_target): Add initializer for arch_setup field.
14252 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14253 (the_low_target): Add initializer for arch_setup field.
14254
14255 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14256 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14257 instead of init_registers ().
14258 * win32-arm-low.c (init_registers_arm): Add prototype.
14259 (the_low_target): Add initializer for arch_setup field.
14260 * win32-i386-low.c (init_registers_i386): Add prototype.
14261 (the_low_target): Add initializer for arch_setup field.
14262
14263 * spu-low.c (init_registers_spu): Add prototype.
14264 (initialize_low): Call initialie_registers_spu () instead of
14265 initialize_registers ().
14266
fd96d250
PA
142672008-02-19 Pedro Alves <pedro@codesourcery.com>
14268
14269 * server.c (handle_v_requests): When handling the vRun and vAttach
14270 packets, if already debugging a process, don't kill it. Return an
14271 error instead.
14272
d41b6bb4
DJ
142732008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14274
14275 * server.c (handle_query): Correct length check.
14276
5ac588cf
PA
142772008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14278
14279 * win32-low.c (do_initial_child_stuff): Add process handle
14280 parameter. Set current_process_handle and current_process_id from the
14281 parameters. Clear globals.
14282 (win32_create_inferior): Don't set current_process_handle and
14283 current_process_id here. Instead pass them on the call to
14284 do_initial_child_stuff.
14285 (win32_attach): Likewise.
14286 (win32_clear_inferiors): New.
14287 (win32_kill): Don't close the current process handle or the
14288 current thread handle here. Instead call win32_clear_inferiors.
14289 (win32_detach): Don't open a new handle to the process. Call
14290 win32_clear_inferiors.
14291 (win32_join): Don't rely on current_process_handle; open a new
14292 handle using the process id.
14293 (win32_wait): Call win32_clear_inferiors when the inferior process
14294 has exited.
14295
ecd7ecbc
DJ
142962008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14297
14298 * server.c (monitor_show_help): Add "exit".
14299
1525d545
MG
143002008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14301
ecd7ecbc 14302 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
14303 (clean): Add reg-xtensa.c.
14304 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
14305 * configure.srv (xtensa*-*-linux*) New target.
14306 * linux-xtensa-low.c: New.
14307 * xtensa-xtregs.c: New.
1525d545 14308
59a016f0
PA
143092008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14310
14311 * hostio.c: Don't include errno.h.
14312 (errno_to_fileio_errno): Move to hostio-errno.
14313 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14314 error number outputting to the target->hostio_last_error callback.
14315 (hostio_packet_error): Use FILEIO_EINVAL directly.
14316 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14317 calls to hostio_error.
14318 * hostio-errno.c: New.
14319 * server.h (hostio_last_error_from_errno): Declare.
14320 * target.h (target_ops): Add hostio_last_error member.
14321 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14322 as hostio_last_error handler.
889bf7c5 14323 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
14324 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14325 (wince_hostio_last_error): New functions.
14326 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14327 as hostio_last_error handler.
14328 (win32_target_ops) [!_WIN32_WCE]: Register
14329 hostio_last_error_from_errno as hostio_last_error handler.
14330 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14331 (hostio-errno.o): New rule.
14332 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14333 * configure.srv (srv_hostio_err_objs): New variable. Default to
14334 hostio-errno.o.
14335 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14336 * configure: Regenerate.
14337
2d717e4f
DJ
143382008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14339
14340 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14341 (linux_kill, linux_detach): Clean up the process list.
14342 * remote-utils.c (remote_open): Improve port number parsing.
14343 (putpkt_binary, input_interrupt): Only send interrupts if the target
14344 is running.
14345 * server.c (extended_protocol): Make static.
14346 (attached): Define earlier.
14347 (exit_requested, response_needed, program_argv): New variables.
14348 (target_running): New.
14349 (start_inferior): Clear attached here.
14350 (attach_inferior): Set attached here.
14351 (require_running): Define.
14352 (handle_query): Use require_running and target_running. Implement
14353 "monitor exit".
14354 (handle_v_attach, handle_v_run): New.
14355 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14356 (gdbserver_usage): Update.
14357 (main): Redo argument parsing. Handle --debug and --multi. Handle
14358 --attach along with other options or after the port. Save
14359 program_argv. Support no initial program. Resynchronize
14360 communication with GDB after an error. Handle "monitor exit".
14361 Use require_running and target_running. Always allow the extended
14362 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14363 restart in extended mode.
14364 * README: Refer to the GDB manual. Update --attach usage.
14365
7407e2de
AS
143662007-12-20 Andreas Schwab <schwab@suse.de>
14367
14368 * linux-low.c (STACK_SIZE): Define.
14369 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14370 (linux_test_for_tracefork): Likewise.
14371
b65d95c5
DJ
143722007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14373
14374 * linux-low.c (linux_wait_for_event): Update messages. Do not
14375 reinsert auto-delete breakpoints.
14376 * mem-break.c (struct breakpoint): Change return type of handler to
14377 int.
14378 (set_breakpoint_at): Update handler type.
14379 (reinsert_breakpoint_handler): Return 1 instead of calling
14380 delete_breakpoint.
14381 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14382 setting a new one.
14383 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14384 * mem-break.h (set_breakpoint_at): Update handler type.
14385 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14386 * win32-low.c (auto_delete_breakpoint): New.
14387 (get_child_debug_event): Use it.
14388
4e799345
DJ
143892007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14390
14391 * configure.ac: Check for pread and pwrite.
14392 * hostio.c (handle_pread): Fall back to lseek and read.
14393 (handle_pwrite): Fall back to lseek and write.
14394 * config.in, configure: Regenerated.
14395
27524b67
DJ
143962007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14397
14398 * server.c (myresume): Add own_buf argument.
14399 (main): Update calls.
14400
a20d5e98
DJ
144012007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14402
14403 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14404 * remote-utils.c (remote_open): Do not call disable_async_io.
14405 (block_async_io): Delete.
14406 (unblock_async_io): Make static.
14407 (initialize_async_io): New.
14408 * server.c (handle_v_cont): Handle async I/O here.
14409 (myresume): Likewise. Move other common resume tasks here...
14410 (main): ... from here. Call initialize_async_io. Disable async
14411 I/O before the main loop.
14412 * server.h (initialize_async_io): Declare.
14413 (block_async_io, unblock_async_io): Delete prototypes.
14414 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14415
b79d787e
DJ
144162007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14417
14418 * remote-utils.c (readchar): Allow binary data in received messages.
14419
d97903b2
PA
144202007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14421
14422 * win32-low.c (attaching): New global.
14423 (win32_create_inferior): Clear the `attaching' global.
14424 (win32_attach): Set the `attaching' global.
14425 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14426 attaching. Only set a breakpoint at the entry point if not
14427 attaching.
14428
311de423
PA
144292007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14430
14431 * server.c (main): Don't report dll events on the initial
14432 connection on attaches.
14433
6c2d16d2
PA
144342007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14435
14436 * server.c (main): Relax numerical bases supported for the pid of
14437 the --attach command line argument.
14438
5ca906e6
PA
144392007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14440
14441 * win32-low.c (win32_attach): Call OpenProcess before
14442 DebugActiveProcess, not after. Add last error output to error
14443 call.
14444
9c6c8194
PA
144452007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14446
14447 * win32-low.c (win32_get_thread_context)
14448 (win32_set_thread_context): New functions.
14449 (thread_rec): Use win32_get_thread_context.
14450 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14451 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14452 field.
14453
4d5d1aaa
PA
144542007-12-03 Leo Zayas
14455 Pedro Alves <pedro_alves@portugalmail.pt>
14456
14457 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14458 global variables.
14459 (child_add_thread): Minor cleanup.
14460 (child_continue): Resume artificially suspended threads before
14461 calling ContinueDebugEvent.
14462 (suspend_one_thread): New.
14463 (fake_breakpoint_event): New.
14464 (get_child_debug_event): Change return type to int. Check here if
14465 gdb sent an interrupt request. If a soft interrupt was requested,
14466 fake a breakpoint event. Return 0 if there is no event to handle,
14467 and 1 otherwise.
14468 (win32_wait): Don't check here if gdb sent an interrupt request.
14469 Ensure there is a valid event to handle.
14470 (win32_request_interrupt): Add soft interruption method as last
14471 resort.
14472
c436e841
PA
144732007-12-03 Leo Zayas
14474 Pedro Alves <pedro_alves@portugalmail.pt>
14475
14476 * win32-low.h (win32_thread_info): Add descriptions to the
14477 structure members. Replace `suspend_count' counter by a
14478 `suspended' flag.
14479 * win32-low.c (thread_rec): Update condition of when to get the
14480 context from the inferior. Rely on ContextFlags being set if it
14481 has already been retrieved. Only suspend the inferior thread if
14482 we haven't already. Warn if that fails.
14483 (continue_one_thread): s/suspend_count/suspended/. Only call
14484 ResumeThread once. Warn if that fails.
14485
e7b5fa67
PA
144862007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14487
14488 * win32-low.c (win32_wait): Don't read from the inferior when it
14489 has already exited.
14490
a385171d
PA
144912007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14492
14493 * Makefile.in (win32_low_h): New variable.
14494 (win32-low.o): Add dependency on $(win32_low_h).
14495 (win32-arm-low.o, win32-i386-low.o): New rules.
14496
f80c84b3
DJ
144972007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14498
14499 * hostio.c: Correct copyright year.
14500
a6b151f1
DJ
145012007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14502
14503 * Makefile.in (OBS): Add hostio.o.
14504 (hostio.o): New rule.
14505 * server.h (handle_vFile): Declare.
14506 * hostio.c: New file.
14507 * server.c (handle_v_requests): Take packet_len and new_packet_len
14508 for binary packets. Call handle_vFile.
14509 (main): Update call to handle_v_requests.
14510
f9387fc3
DJ
145112007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14512
14513 * linux-low.c: Include <sched.h>.
14514
51c2684e
DJ
145152007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14516
14517 * linux-low.c (linux_tracefork_grandchild): New.
14518 (linux_tracefork_child): Use clone.
14519 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14520
75f83163
JB
145212007-10-31 Joel Brobecker <brobecker@adacore.com>
14522
14523 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14524
da5898ce
DJ
145252007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14526
14527 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14528
24a09b5f
DJ
145292007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14530
14531 * inferiors.c (change_inferior_id): Delete.
14532 (add_pid_to_list, pull_pid_from_list): New.
14533 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14534 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14535 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14536 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14537 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14538 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14539 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14540 (using_threads): Always set to 1.
14541 (handle_extended_wait): New.
14542 (add_process): Do not set TID.
14543 (linux_create_inferior): Set must_set_ptrace_flags.
14544 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14545 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14546 (linux_thread_alive): Rename TID argument to LWPID.
14547 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14548 (linux_wait_for_event): Do not use TID or check using_threads. Update
14549 call to dead_thread_notify. Call handle_extended_wait.
14550 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14551 (send_sigstop): Delete sigstop_sent.
14552 (wait_for_sigstop): Avoid TID.
14553 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14554 (linux_test_for_tracefork): New.
14555 (linux_lookup_signals): Use thread_db_active and
14556 linux_supports_tracefork_flag.
14557 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14558 * linux-low.h (get_process_thread): Avoid TID.
14559 (struct process_ifo): Move thread_known and tid to the end. Remove
14560 sigstop_sent.
14561 (linux_attach_lwp, thread_db_init): Update prototypes.
14562 * server.h (change_inferior_id): Delete prototype.
14563 (add_pid_to_list, pull_pid_from_list): New prototypes.
14564 * thread-db.c (thread_db_use_events): New.
14565 (find_first_thread): Rename to...
14566 (find_one_thread): ...this. Update callers and messages. Do not
14567 call fatal. Check thread_db_use_events. Do not call
14568 change_inferior_id or new_thread_notify.
14569 (maybe_attach_thread): Update. Do not call new_thread_notify.
14570 (thread_db_init): Set thread_db_use_events. Check use_events.
14571 * utils.c (fatal, warning): Correct message prefix.
14572
30ed0a8f
DJ
145732007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14574
14575 * Makefile.in (clean): Remove new files.
14576 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14577 (powerpc-64.o, powerpc-64.c): New rules.
14578 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14579 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14580 with SPE.
14581 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14582 SPE targets.
14583 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14584 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14585 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14586 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14587 (target_regsets): Add AltiVec and SPE register sets.
14588 * configure.ac: Check for AltiVec and SPE.
14589 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14590 (ppc_fill_vrregset, ppc_store_vrregset): New.
14591 (target_regsets): Add AltiVec register set.
14592 * configure: Regenerated.
14593
fd462a61
DJ
145942007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14595
14596 * linux-low.c (O_LARGEFILE): Define.
14597 (linux_read_memory): Use /proc/PID/mem.
14598 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14599 * configure, config.in: Regenerated.
14600
69f223ed
DJ
146012007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14602
14603 * linux-low.c (linux_wait_for_event): Do not pass signals while
14604 single-stepping.
14605
aec18585
PA
146062007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14607
14608 * win32-low.c (create_process): New.
14609 (win32_create_inferior): Use create_process instead of
14610 CreateProcess. If create_process failed retry appending an ".exe"
14611 suffix. Store the GetLastError result immediatelly after
14612 create_process calls and use it on the call to error.
14613
34d86ddd
PA
146142007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14615
14616 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14617
5a0e3bd0
JB
146182007-08-23 Joel Brobecker <brobecker@adacore.com>
14619
14620 * configure.ac: Switch license to GPLv3.
14621
f88c79e6
MS
146222007-08-01 Michael Snyder <msnyder@access-company.com>
14623
14624 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14625
6b3d9b83
PA
146262007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14627
14628 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14629 typedef.
14630 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14631 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14632 CloseToolhelp32Snapshot.
14633 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14634 CloseToolhelp32Snapshot.
14635
c588c53c
MS
146362007-07-27 Michael Snyder <michael.snyder@access-company.com>
14637
14638 * server.c (main): Check for inferior exit before main loop.
14639
aa0403d9
PA
146402007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14641
14642 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14643 instead of on tmp_desc.
14644
255e7678
DJ
146452007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14646 Daniel Jacobowitz <dan@codesourcery.com>
14647
14648 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14649 (add_thread): Minor cleanups.
14650 (clear_inferiors): Move lower in the file. Clear the DLL
14651 list.
14652 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14653 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14654 (xml_escape_text): New.
14655 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14656 for qSupported.
14657 (handle_v_cont): Report errors.
14658 (gdbserver_version): Update.
14659 (main): Correct size of own_buf. Do not report initial DLL events.
14660 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14661 (unloaded_dll, xml_escape_text): New.
14662 * win32-low.c (enum target_waitkind): Update comments.
14663 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14664 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14665 (win32_EnumProcessModules, win32_GetModuleInformation)
14666 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14667 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14668 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14669 (win32_Module32First, win32_Module32Next, load_toolhelp)
14670 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14671 (get_child_debug_event): Handle DLL events.
14672 (win32_wait): Likewise.
14673
0d37add9
DJ
146742007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14675
14676 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14677 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14678
45e2715e
PA
146792007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14680
14681 * win32-low.c (handle_output_debug_string): Ignore event if not
14682 waiting.
14683
c5674cf1
PA
146842007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14685
14686 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14687
2bbe3cc1
DJ
146882007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14689
14690 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14691
ae13219e
DJ
146922007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14693
14694 * inferiors.c (change_inferior_id): Add comment.
14695 * linux-low.c (check_removed_breakpoint): Add an early
14696 prototype. Improve debug output.
14697 (linux_attach): Doc update.
14698 (linux_detach_one_process, linux_detach): Clean up before releasing
14699 each process.
14700 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14701 * linux-low.h (struct process_info): Doc improvement.
14702 * mem-break.c (delete_all_breakpoints): New.
14703 * mem-break.h (delete_all_breakpoints): New prototype.
14704 * thread-db.c (find_first_thread): New.
14705 (thread_db_create_event): Call it instead of
14706 thread_db_find_new_threads. Clean up unused variables.
14707 (maybe_attach_thread): Remove first thread handling.
14708 (thread_db_find_new_threads): Use find_first_thread.
14709 (thread_db_get_tls_address): Likewise.
14710
4105de34
DJ
147112007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14712
14713 * thread-db.c (thread_db_find_new_threads): Add prototype.
14714 (thread_db_create_event): Check for the main thread before adding
14715 a new thread.
14716 (maybe_attach_thread): Only enable event reporting if TID == 0.
14717 (thread_db_get_tls_address): Check for new threads.
14718
2b876972
DJ
147192007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14720
14721 * linux-low.c (linux_create_inferior): Try execv before execvp.
14722 * spu-low.c (spu_create_inferior): Likewise.
14723
7a245884
DJ
147242007-06-13 Mike Frysinger <vapier@gentoo.org>
14725
14726 * linux-low.c (linux_create_inferior): Change execv to execvp.
14727 * spu-low.c (spu_create_inferior): Likewies.
14728
117ce543
DJ
147292007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14730
14731 * Makefile.in (clean): Clean new files instead of deleted ones.
14732 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14733 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14734 rules.
14735 * configure.srv: Specify XML files and new regformats for MIPS and
14736 MIPS64 GNU/Linux.
14737 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14738 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14739 an entry for the restart register.
14740 (mips_cannot_fetch_register, mips_cannot_store_register)
14741 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14742 register names to match the XML descriptions.
14743 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14744 restart register instead of $0.
14745
0e7f50da
UW
147462007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14747 Markus Deuling <deuling@de.ibm.com>
14748
14749 * remote-utils.c (decode_xfer_write): New function.
14750 * server.h (decode_xfer_write): Add prototype.
14751 * server.c (handle_query): Add PACKET_LEN argument. Support
14752 qXfer:spu:read and qXfer:spu:write packets.
14753 (main): Pass packet_len to handle_query.
14754 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14755 * target.h (target_ops): Add qxfer_spu.
14756
374c1d38
UW
147572007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14758
14759 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14760 accessing non-seekable spufs files.
14761
bb63802a
UW
147622007-05-16 Markus Deuling <deuling@de.ibm.com>
14763
889bf7c5 14764 * server.c (handle_query): Add reply for qC packet.
bb63802a 14765
7390519e
PA
147662007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14767 Leo Zayas <lerele@champenstudios@com>
14768
14769 * server.h (check_remote_input_interrupt_request): New function.
14770 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14771 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14772 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14773 (check_remote_input_interrupt_request): New function.
14774 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14775 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14776 winapi_GenerateConsoleCtrlEvent): New typedefs.
14777 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14778 to 250 ms.
14779 (win32_wait): Check for remote interrupt request
14780 with check_remote_input_interrupt_request.
14781 (win32_request_interrupt): New function.
14782 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14783
34b34921
PA
147842007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14785
14786 * win32-low.c (debug_registers_changed,
14787 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14788 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14789 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14790 (thread_rec): Get context using the low target.
14791 (child_add_thread): Call thread_added on the low target,
14792 which does the same thing.
14793 (regptr): Delete.
14794 (do_initial_child_stuff): Remove debug registers references.
14795 Set context using the low target. Resume threads after
14796 setting the contexts.
14797 (child_continue): Remove dead variable. Remove debug
14798 registers references.
14799 (child_fetch_inferior_registers): Go through the low target.
14800 (do_child_store_inferior_registers): Remove.
14801 (child_store_inferior_registers): Go through the low target.
14802 (win32_resume): Remove debug registers references.
14803 Set context using the low target.
14804 (handle_exception): Change return type to void. Don't record
14805 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14806 first chance exception.
889bf7c5 14807 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14808 goto loop. Always return after waiting for debug event.
14809 (win32_wait): Convert to switch statement. Handle spurious
14810 events.
14811
14812 * win32-i386-low.c (debug_registers_changed,
14813 debug_registers_used): New.
14814 (initial_stuff): Rename to ...
14815 (i386_initial_stuff): ... this. Clear debug registers
14816 state variables.
14817 (store_debug_registers): Delete.
14818 (i386_get_thread_context): New.
14819 (load_debug_registers): Delete.
14820 (i386_set_thread_context): New.
14821 (i386_thread_added): New.
14822 (single_step): Rename to ...
14823 (i386_single_step): ... this.
14824 (do_fetch_inferior_registers): Rename to ...
14825 (i386_fetch_inferior_register): ... this.
14826 (i386_store_inferior_register): New.
14827 (the_low_target): Adapt to new interface.
14828
14829 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14830 (arm_get_thread_context): New.
14831 (arm_set_thread_context): New.
14832 (regptr): New.
14833 (do_fetch_inferior_registers): Rename to ...
14834 (arm_fetch_inferior_register): ... this.
14835 (arm_store_inferior_register): New.
14836 (arm_wince_breakpoint): Reimplement as unsigned long.
14837 (arm_wince_breakpoint_len): Define.
14838 (the_low_target): Adapt to new interface.
14839
14840 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14841 load_debug_registers. Add get_thread_context, set_thread_context,
14842 thread_added and store_inferior_register. Rename
14843 fetch_inferior_registers to fetch_inferior_register.
14844 (regptr): Remove declaration.
14845
dd6953e1
PA
148462007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14847
14848 * linux-low.c (linux_detach): Change return type to int. Return 0.
14849 * spu-low.c (spu_detach): Likewise.
14850
444d6139
PA
148512007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14852
14853 * target.h (target_ops): Change return type of detach to int.
14854 Add join.
14855 (join_inferior): New.
14856 * server.c (main): Don't skip detach support on mingw32.
14857 If the inferior doesn't support detaching return error.
14858 Call join_inferior instead of using waitpid.
14859 * linux-low.c (linux_join): New.
14860 (linux_target_op): Add linux_join.
14861 * spu-low.c (spu_join): New.
14862 (spu_target_ops): Add spu_join.
14863 * win32-low.c (win32_detach): Adapt to new interface.
14864 Reopen current_process_handle before detaching. Issue a child
14865 resume before detaching.
14866 (win32_join): New.
14867 (win32_target_op): Add win32_join.
14868
1d5315fe
PA
148692007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14870
14871 * win32-low.c (win32-attach): Fix return value.
14872 * target.h (target_ops): Describe ATTACH return values.
14873
bf914831
PA
148742007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14875
14876 * win32-low.c (GETPROCADDRESS): Define.
14877 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14878 (winapi_DebugSetProcessKillOnExit): Likewise.
14879 (win32_create_inferior): Force usage of ansi CreateProcessA.
14880 (win32_attach): Use GETPROCADDRESS.
14881 (win32_detach): Likewise.
14882
f72f3e60
PA
148832007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14884
14885 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14886
ed50f18f
PA
148872007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14888
14889 * win32-low.c: Commit leftover changes from 2007-03-29.
14890
0c2ead7e
DJ
148912007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14892
14893 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14894 fields short instead of int. Add explicit padding.
14895 (i387_cache_to_fsave): Remove unnecessary casts.
14896 (i387_fsave_to_cache): Doc fix.
14897 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14898
73725ff3
DJ
148992007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14900
14901 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14902 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14903
d99f33d8
PA
149042007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14905
14906 * configure.srv (arm*-*-mingw32ce*): Move near the other
14907 arm targets.
14908
68070c10
PA
149092007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14910
2482afc6 14911 * configure.ac: Add errno checking.
68070c10
PA
14912 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14913 sys/file.h and malloc.h.
14914 (AC_CHECK_DECLS): Add perror.
14915 (srv_mingwce): Handle.
2482afc6 14916 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14917 win32-i386-low.o to srv_tgtobj.
14918 (i[34567]86-*-mingw*): Likewise.
14919 (arm*-*-mingw32ce*): Add case.
14920 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14921 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14922 [__MINGW32CE__] (strerror): New function.
14923 [__MINGW32CE__] (errno): Define to GetLastError.
14924 [__MINGW32CE__] (COUNTOF): New macro.
14925 (remote_open): Remove extra close call.
14926 * mem-break.c (delete_breakpoint_at): New function.
14927 * mem-break.h (delete_breakpoint_at): Declare.
14928 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14929 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14930 [USE_WIN32API] (read, write): Add char* casts.
14931 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14932 * server.h: Include wincecompat.h on Windows CE.
14933 [HAVE_ERRNO_H]: Check.
14934 (perror): Declare if not declared.
14935 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14936 (perror_with_name): Remove errno declaration.
14937 * wincecompat.h: New.
14938 * wincecompat.c: New.
14939 * win32-low.h: New.
14940 * win32-arm-low.c: New.
14941 * win32-i386-low.c: New.
14942 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14943 (OUTMSG2): Make it safe.
14944 (_T): New macro.
14945 (COUNTOF): New macro.
14946 (NUM_REGS): Get it from the low target.
14947 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14948 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14949 (thread_rec): Let low target handle debug registers.
14950 (child_add_thread): Likewise.
14951 (child_init_thread_list): Likewise.
14952 (continue_one_thread): Likewise.
14953 (regptr): New.
14954 (do_child_fetch_inferior_registers): Move to ...
14955 * win32-i386-low.c: ... here, and rename to ...
14956 (do_fetch_inferior_registers): ... this.
889bf7c5 14957 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14958 Go through the low target.
14959 (do_child_store_inferior_registers): Use regptr.
14960 (strwinerror): New function.
14961 (win32_create_inferior): Handle Windows CE.
14962 Use strwinerror instead of strerror on Windows error
14963 codes. Add program to the error output.
14964 Don't close the main thread handle on Windows CE.
14965 (win32_attach): Use coredll.dll on Windows CE.
14966 (win32_kill): Close current process and current
14967 thread handles.
14968 (win32_detach): Use coredll.dll on Windows CE.
14969 (win32_resume): Let low target handle debug registers, and
14970 step request.
14971 (handle_exception): Add/Remove initial breakpoint. Avoid
14972 non-existant WSTOPSIG on Windows CE.
14973 (win32_read_inferior_memory): Cast to remove warning.
14974 (win32_arch_string): Go through the low target.
14975 (initialize_low): Call set_breakpoint_data with the low
14976 target's breakpoint.
14977 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14978 FOP_REGNUM, mappings): Move to ...
14979 * win32-i386-low.c: ... here.
14980 * win32-low.c (win32_thread_info): Move to ...
14981 * win32-low.h: ... here.
14982 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14983 win32-arm-low.c and wincecompat.c.
14984 (all:): Add $EXEEXT.
14985 (install-only:): Likewise.
14986 (gdbserver:): Likewise.
14987 (gdbreplay:): Likewise.
14988 * config.in: Regenerate.
14989 * configure: Regenerate.
14990
41093d81
PA
149912007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14992
14993 * win32-low.c: Rename typedef thread_info to
14994 win32_thread_info throughout.
14995
544afa54
PA
149962007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14997
14998 * win32-i386-low.c: Rename to ...
14999 * win32-low.c: ... this.
15000 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15001 * Makefile.in: Likewise.
15002
bce7165d
PA
150032007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15004
15005 * remote-utils.c (monitor_output): Constify msg parameter.
15006 * server.h (monitor_output): Likewise.
15007 * win32-i386-low.c (handle_output_debug_string): New.
15008 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15009 handle_output_debug_string.
15010 (get_child_debug_event): Likewise.
15011
506c7aa0
DJ
150122007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15013
15014 * server.c (main): Correct strtoul check.
15015
42c81e2a
DJ
150162007-03-27 Jon Ringle <jon@ringle.org>
15017
15018 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15019
9453113a
DJ
150202007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15021
15022 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15023
64a69107
DJ
150242007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15025
15026 * terminal.h: Check HAVE_SGTTY_H.
15027
150282007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
15029
15030 * remote-utils.c (remote_open): Print out the assigned port number.
15031
c74d0ad8
DJ
150322007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15033
15034 * remote-utils.c (monitor_output): New function.
15035 * server.c (debug_threads): Define here.
15036 (monitor_show_help): New function.
15037 (handle_query): Handle qRcmd.
15038 (main): Do not handle 'd' packet.
15039 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15040 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15041 of debug_threads.
15042
de7c3b4a
PA
150432007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15044
15045 * Makefile.in (EXEEXT): New.
15046 (clean): Use $(EXEEXT).
15047
ef57601b
PA
150482007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15049
15050 * target.h (target_ops): Rename send_signal to request_interrupt,
15051 and remove enum target_signal parameter.
15052 * linux-low.c (linux_request_interrupt): Rename from
15053 linux_send_signal, and always send SIGINT.
15054 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15055 and always send SIGINT.
15056 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15057 of send_signal.
15058 (input_interrupt): Likewise.
15059
820f2bda
PA
150602007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15061
15062 * server.c (get_features_xml): Check if target implemented
15063 arch_string.
15064 * win32-i386-low.c (win32_arch_string): New.
15065 (win32_target_ops): Add win32_arch_string as arch_string member.
15066
ab39bf24
UW
150672007-02-22 Markus Deuling <deuling@de.ibm.com>
15068
15069 * spu-low.c (spu_arch_string): New.
15070 (spu_target_ops): Add spu_arch_string.
15071
61ff6e04
DJ
150722007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15073
15074 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15075 * configure.ac: Do not check for terminal.h.
15076 * configure, config.in: Regenerated.
15077
fb1e4ffc
DJ
150782007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15079
15080 * Makefile.in (OBS): Add $(XML_BUILTIN).
15081 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15082 (clean): Update.
15083 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15084 (arm-with-iwmmxt.c): New.
15085 * config.in, configure: Regenerate.
15086 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15087 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15088 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15089 (arm*-*-linux*): Add iWMMXt and regset support.
15090 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15091 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15092 (arm_store_wmmxregset, target_regsets): New.
15093 * server.c (get_features_xml): Take annex argument. Check builtin
15094 XML documents.
15095 (handle_query): Handle multiple annexes.
15096
0f48aa01
DJ
150972007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15098
15099 * remote-utils.c [USE_WIN32API] (read, write): Define.
15100 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15101 write.
15102
23181151
DJ
151032007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15104
15105 * linux-i386-low.c (the_low_target): Set arch_string.
15106 * linux-x86-64-low.c (the_low_target): Likewise.
15107 * linux-low.c (linux_arch_string): New.
15108 (linux_target_ops): Add it.
15109 * linux-low.h (struct linux_target_ops): Add arch_string.
15110 * server.c (write_qxfer_response): Use const void * for DATA.
15111 (get_features_xml): New.
15112 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15113 * target.h (struct target_ops): Add arch_string method.
15114
9d606399
DJ
151152007-01-03 Denis Pilat <denis.pilat@st.com>
15116 Daniel Jacobowitz <dan@codesourcery.com>
15117
15118 * linux-low.c (linux_kill): Handle being called with no threads.
15119 * win32-i386-low.c (win32_kill): Likewise.
15120 (get_child_debug_event): Clear current_process_handle.
15121
151222006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
15123 Daniel Jacobowitz <dan@codesourcery.com>
15124
15125 * remote-utils.c (remote_open): Check the type of specified
15126 serial port devices before opening them.
15127 * server.c (main): Kill the inferior if an error occurs during
15128 the first remote_open.
15129
a5e13d24
DJ
151302006-12-05 Markus Deuling <deuling@de.ibm.com>
15131
15132 * README: Update supported targets.
15133
186947f7
DJ
151342006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15135
15136 * Makefile.in (clean): Remove reg-mips64.c.
15137 (reg-mips64.c, reg-mips64.o): New rules.
15138 * configure.srv: Handle mips64. Include regset support for mips.
15139 * linux-mips-low.c (union mips_register): New.
15140 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15141 (mips_breakpoint, mips_breakpoint_at): Use int.
15142 (mips_collect_register, mips_supply_register)
15143 (mips_collect_register_32bit, mips_supply_register_32bit)
15144 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15145 (mips_store_fpregset, target_regsets): New.
15146 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15147
a13e2c95
UW
151482006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15149
15150 * configure.srv: Add target "spu*-*-*".
15151 * Makefile.in (clean): Remove reg-spu.c.
15152 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15153 * spu-low.c: New file.
15154
cb7283db
DJ
151552006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15156
15157 * configure.ac: Correct td_thr_tls_get_addr test.
15158 * configure: Regenerated.
15159
89be2091
DJ
151602006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15161
15162 * linux-low.c (linux_wait_for_event): Reformat. Use the
15163 pass_signals array.
15164 * remote-utils.c (decode_address_to_semicolon): New.
15165 * server.c (pass_signals, handle_general_set): New.
15166 (handle_query): Mention QPassSignals for qSupported.
15167 (main): Call handle_general_set.
15168 * server.h (pass_signals, decode_address_to_semicolon): New.
15169
000ef4f0
DJ
151702006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15171
15172 * server.c (handle_query): Correct error handling for read_auxv.
15173
b7149293
UW
151742005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15175
15176 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15177 and srv_linux_thread_db to yes.
15178 * linux-s390-low.c (s390_fill_gregset): New function.
15179 (target_regsets): Define data structure.
15180
dae5f5cf
DJ
151812006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15182
15183 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15184 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15185 * config.in, configure: Regenerated.
15186 * inferiors.c (gdb_id_to_thread): New function.
15187 (gdb_id_to_thread_id): Use it.
15188 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15189 * linux-low.h (struct process_info): Add th member.
15190 (thread_db_get_tls_address): New prototype.
15191 * remote-utils.c (decode_address): Make non-static.
15192 * server.c (handle_query): Handle qGetTLSAddr.
15193 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15194 * target.h (struct target_ops): Add get_tls_address.
15195 * thread-db.c (maybe_attach_thread): Save the thread handle.
15196 (thread_db_get_tls_address): New.
15197
32ca6d61
DJ
151982006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15199
15200 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15201 (linux_resume_one_process): Take a siginfo_t *. Update all
15202 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15203 (struct pending_signals): Add a siginfo_t.
15204 (linux_wait_for_process): Always set last_status.
15205 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15206 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15207 * linux-low.h (struct process_info): Add last_status.
15208
5ffff7c1
DJ
152092006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15210
15211 * remote-utils.c (try_rle): New function.
15212 (putpkt_binary): Use it.
15213
8695c747
DJ
152142006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15215
15216 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15217 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15218 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15219 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15220 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15221 point registers.
15222
290fadea
RS
152232006-08-08 Richard Sandiford <richard@codesourcery.com>
15224
15225 * server.c (terminal_fd): New variable.
15226 (old_foreground_pgrp): Likewise.
15227 (restore_old_foreground_pgrp): New function.
15228 (start_inferior): Record the terminal file descriptor in terminal_fd
15229 and its original foreground group in old_foreground_pgrp. Register
15230 restore_old_foreground_pgrp with atexit().
15231
9f2e1e63
DJ
152322006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15233
15234 * server.c (handle_query): Correct qPart to qXfer.
15235
b80864fb
DJ
152362006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15237
15238 * configure.ac: Check for more headers which are missing on
15239 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15240 * configure.srv: Add Cygwin and mingw32.
15241 * remote-utils.c: Don't include headers unconditionally which
15242 are missing on mingw32. Include <winsock.h> for mingw32.
15243 (remote_open): Adjust for mingw32 support. Flush
15244 standard error after writing to it.
15245 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15246 (unblock_async_io, enable_async_io, disable_async_io)
15247 (readchar, getpkt): Update for Winsock support.
15248 (prepare_resume_reply): Expect a protocol signal number.
15249 * server.c: Disable <sys/wait.h> on mingw32.
15250 (start_inferior): Adjust for mingw32 support. Flush
15251 standard error after writing to it.
15252 (attach_inferior): Likewise. Use protocol signal
15253 numbers.
15254 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15255 and names.
15256 * win32-i386-low.c: New file.
15257 * Makefile.in (XM_CLIBS): Set.
15258 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15259 (win32-i386-low.o): New dependency rule.
15260 * linux-low.c (linux_wait): Use target signal numbers.
15261 * target.h (struct target_ops): Doc fix.
15262 * server.h (target_signal_to_name): New prototype.
15263 * gdbreplay.c: Don't include headers unconditionally which
15264 are missing on mingw32. Include <winsock.h> for mingw32.
15265 (remote_close, remote_open): Adjust for Winsock support.
15266 * configure, config.in: Regenerated.
15267
0876f84a
DJ
152682006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15269
15270 * server.c (decode_xfer_read, write_qxfer_response): New.
15271 (handle_query): Take a packet length argument. Handle
15272 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15273 the qSupported response.
15274 (main): Update call to handle_query.
15275
01f9e8fa
DJ
152762006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15277
15278 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15279 (putpkt_binary): Renamed from putpkt and adjusted for binary
15280 data.
15281 (putpkt): New wrapper for putpkt_binary.
15282 (readchar): Don't mask off the high bit.
15283 (decode_X_packet): New function.
15284 * server.c (main): Call putpkt_binary if a handler sets the packet
15285 length. Save the length of the incoming packet. Handle 'X'.
15286 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15287
be2a5f71
DJ
152882006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15289
15290 * server.c (handle_query): Handle qSupported.
15291
ea025f5f
DJ
152922006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15293
15294 * remote-utils.c (all_symbols_looked_up): New variable.
15295 (look_up_one_symbol): Check it.
15296 * server.h (look_up_one_symbol): New declaration.
15297 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15298
9308fc88
DJ
152992006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15300
15301 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 15302 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
15303 (PTRACE_GET_THREAD_AREA): Define.
15304 (ps_get_thread_area): New function.
15305
52fb6437
NS
153062006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15307
15308 * configure.srv (m68k*-*-uclinux*): New target.
15309 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15310 (linux_resume_one_process): Remove extraneous cast.
15311 (linux_read_offsets): New.
15312 (linux_target_op): Add linux_read_offsets on mmuless systems.
15313 * server.c (handle_query): Add qOffsets logic.
15314 * target.h (struct target_ops): Add read_offsets.
15315
21b0f40c
DJ
153162006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15317
15318 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15319 (PTRACE_GET_THREAD_AREA): Define.
15320 (ps_get_thread_area): New function.
15321 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15322 (linux-x86-64-low.o): Update.
15323
0050a760
DJ
153242006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15325
15326 * configure.ac: Remove checks for prfpregset_t.
15327 * gdb_proc_service.h: New file.
15328 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15329 new "gdb_proc_service.h".
15330 * proc-service.c: Likewise.
15331 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15332 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15333 * Makefile.in (gdb_proc_service_h): Updated.
15334 * configure, config.in: Regenerated.
15335
b92a518e
DJ
153362006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15337
15338 * remote-utils.c (prepare_resume_reply): Move declaration
15339 of gdb_id_from_wait to the top of the block.
15340
545587ee
DJ
153412006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15342
15343 * linux-low.c (regsets_store_inferior_registers): Read the regset
15344 from the target before filling it.
15345
9db87ebd
DJ
153462006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15347
15348 * server.c (attach_inferior): Return SIGTRAP for a successful
15349 attach.
15350
dd24457d
DJ
153512006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15352
15353 * Makefile.in (OBS): Add version.o.
15354 (STAGESTUFF): Delete.
15355 (version.o): Add dependencies.
15356 (version.c): Replace rule.
15357 (clean): Remove version.c.
15358 * server.c (gdbserver_version): New.
15359 (gdbserver_usage): Use printf.
15360 (main): Handle --version and --help.
15361 * server.h (version, host_name): Add declarations.
15362
6f0f660e
EZ
153632005-12-23 Eli Zaretskii <eliz@gnu.org>
15364
889bf7c5
PA
15365 * linux-arm-low.c:
15366 * linux-arm-low.c:
15367 * inferiors.c:
15368 * i387-fp.h:
15369 * i387-fp.c:
15370 * gdbreplay.c:
15371 * regcache.c:
15372 * proc-service.c:
15373 * mem-break.h:
15374 * mem-break.c:
15375 * linux-x86-64-low.c:
15376 * linux-sh-low.c:
15377 * linux-s390-low.c:
15378 * linux-ppc64-low.c:
15379 * linux-ppc-low.c:
15380 * linux-mips-low.c:
15381 * linux-m68k-low.c:
15382 * linux-m32r-low.c:
15383 * linux-low.h:
15384 * linux-low.c:
15385 * linux-ia64-low.c:
15386 * linux-i386-low.c:
15387 * linux-crisv32-low.c:
15388 * thread-db.c:
15389 * terminal.h:
15390 * target.h:
15391 * target.c:
15392 * server.h:
15393 * server.c:
15394 * remote-utils.c:
15395 * regcache.h:
15396 * utils.c:
15397 * Makefile.in:
15398 * configure.ac:
6f0f660e
EZ
15399 * gdbserver.1: Add (C) after Copyright. Update the FSF
15400 address.
15401
9d1fb177
DJ
154022005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15403
15404 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15405 (arm_breakpoint_at): Recognize both breakpoints.
15406 (the_low_target): Use the correct breakpoint instruction.
15407
011a70c2
DJ
154082005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15409
15410 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15411 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15412 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15413 (the_low_target): Update.
15414
7fb85e41
AS
154152005-10-25 Andreas Schwab <schwab@suse.de>
15416
15417 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15418
15419 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15420 (ia64_num_regs): Reduce to 462.
15421
3db0444b
DJ
154222005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15423
15424 * acinclude.m4: Correct quoting.
15425 * aclocal.m4: Regenerated.
15426
15427 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15428 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15429 (thread_db_init): Call thread_db_err_str.
15430 * configure.ac: Check for TD_VERSION.
15431 * config.in, configure: Regenerated.
15432
bee0189a
DJ
154332005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15434
15435 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15436
e9d25b98
DJ
154372005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15438
15439 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15440 is not available. Define HAVE_PTRACE_GETREGS if it is.
15441 * config.in, configure: Regenerated.
15442 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15443 * linux-i386-low.c, linux-m68k-low.c: Update to use
15444 HAVE_PTRACE_GETREGS.
15445 * linux-low.c (regsets_fetch_inferior_registers)
15446 (regsets_store_inferior_registers): Only return 0 if we processed
15447 GENERAL_REGS.
15448 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15449 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15450
a06660f7
DJ
154512005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15452
15453 * inferiors.c (struct thread_info): Add gdb_id.
15454 (add_thread): Add gdb_id argument.
15455 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15456 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15457 calls to add_thread.
15458 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15459 * server.c (handle_query): Use thread_to_gdb_id.
15460 (handle_v_cont, main): Use gdb_id_to_thread_id.
15461 * server.h (add_thread): Update prototype.
15462 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15463 prototypes.
15464
5a1f5858
DJ
154652005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15466
15467 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15468 left-padded registers.
15469 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15470 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15471
e122f1f5
SE
154722005-07-01 Steve Ellcey <sje@cup.hp.com>
15473
15474 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15475 * configure: Regenerate.
15476 * config.in: Regenerate.
15477 * server.h (NEED_DECLARATION_STRERROR):
15478 Replace with !HAVE_DECL_STRERROR.
15479
d592fa2f
DJ
154802005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15481
15482 * linux-low.c (linux_wait, linux_send_signal): Don't test
15483 an unsigned long variable for > 0 if it could be MAX_ULONG.
15484 * server.c (myresume): Likewise.
15485 * target.c (set_desired_inferior): Likewise.
15486
ccbd4912
MK
154872005-06-13 Mark Kettenis <kettenis@gnu.org>
15488
15489 * configure.ac: Simplify and improve check for socklen_t.
15490 * configure, config.in: Regenerate.
15491
f450004a
DJ
154922005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15493
15494 * acconfig.h: Remove.
15495 * configure.ac: Add a test for socklen_t. Use three-argument
15496 AC_DEFINE throughout.
15497 * config.in: Regenerated using autoheader 2.59.
15498 * configure: Regenerated.
15499
15500 * gdbreplay.c (socklen_t): Provide a default.
15501 (remote_open): Use socklen_t.
15502 * remote-utils.c (socklen_t): Provide a default.
15503 (remote_open): Use socklen_t.
15504 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15505 unsigned char.
15506
15507 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15508 char for buffers.
15509 * linux-low.c (linux_read_memory, linux_write_memory)
15510 (linux_read_auxv): Likewise.
15511 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15512 (check_mem_write): Likewise.
15513 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15514 Likewise.
15515 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15516 (registers_from_string, register_data): Likewise.
15517 * server.c (handle_query, main): Likewise.
15518 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15519 (decode_M_packet): Likewise.
15520 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15521 * target.h (struct target_ops): Update read_memory, write_memory,
15522 and read_auxv.
15523 (read_inferior_memory, write_inferior_memory): Update.
15524 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15525 to unsigned char *.
15526 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15527 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15528 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15529 linux-s390-low.c, linux-sh-low.c: Update for changes in
15530 read_inferior_memory and the_low_target->breakpoint.
15531
eee84df1
DJ
155322005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15533
15534 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15535 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15536 * configure.srv: Add powerpc64-*-linux*.
15537 * linux-ppc64-low.c: New file.
15538
45b134e5
OF
155392005-05-23 Orjan Friberg <orjanf@axis.com>
15540
15541 * linux-cris-low.c: New file with support for CRIS.
15542 * linux-crisv32-low.c: Ditto for CRISv32.
15543 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15544 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15545 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15546 reg-crisv32.o, and reg-crisv32.c to make rules.
15547 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15548 recognized targets.
15549
48d93c75
UW
155502005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15551
15552 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15553 of sizeof (PTRACE_XFER_TYPE).
15554 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15555
e013ee27
OF
155562005-05-12 Orjan Friberg <orjanf@axis.com>
15557
889bf7c5 15558 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15559 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15560 pointers for hardware watchpoint support.
15561 * linux-low.h (struct linux_target_ops): Ditto.
15562 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15563 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15564 to linux_target_ops.
15565 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15566 reply packet.
15567 * server.c (main): Recognize 'Z' and 'z' packets.
15568
b0ded00b
UW
155692005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15570
15571 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15572 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15573 (the_low_target): Add new members.
15574
8643e2ad
DJ
155752005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15576
15577 * proc-service.c (ps_lgetregs): Search all_processes instead of
15578 all_threads.
15579
fc620387
DJ
155802005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15581
15582 * server.c (start_inferior): Change return type to int.
15583 (attach_inferior): Change sigptr to int *.
15584 (handle_v_cont, handle_v_requests): Change signal to int *.
15585 (main): Change signal to int.
15586
155872005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15588
15589 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15590 * configure.srv: Add m32r*-*-linux*.
15591 * linux-m32r-low.c: New file.
15592
e0e76420
DJ
155932005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15594
15595 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15596
a1928bad
DJ
155972005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15598
15599 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15600 Take unsigned long arguments for PIDs.
15601 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15602 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15603 (wait_for_sigstop, linux_resume_one_process)
15604 (regsets_fetch_inferior_registers, linux_send_signal)
15605 (linux_read_auxv): Likewise. Update the types of variables holding
15606 PIDs. Update format string specifiers.
15607 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15608 * remote-utils.c (prepare_resume_reply): Likewise.
15609 * server.c (cont_thread, general_thread, step_thread)
15610 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15611 unsigned long.
15612 (handle_query): Update format specifiers.
15613 (handle_v_cont, main): Use strtoul for thread IDs.
15614 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15615 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15616 (general_thread, step_thread, thread_from_wait)
15617 (old_thread_from_wait): Update.
15618 * target.h (struct thread_resume): Use unsigned long for THREAD.
15619 (struct target_ops): Use unsigned long for arguments to attach and
15620 thread_alive.
15621
dcdb98d2
DJ
156222005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15623
15624 * acinclude.m4: Include bfd/bfd.m4 directly.
15625 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15626 <agriffis@toolchain.org>.
15627 * aclocal.m4, configure: Regenerated.
15628
bec39cab
AC
156292005-01-07 Andrew Cagney <cagney@gnu.org>
15630
15631 * configure.ac: Rename configure.in, require autoconf 2.59.
15632 * configure: Re-generate.
15633
434c4c77
DJ
156342004-12-08 Daniel Jacobowitz <dan@debian.org>
15635
15636 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15637 LIBS when finished.
15638 * aclocal.m4: Regenerated.
15639 * configure: Regenerated.
15640
db1d3e1b
AS
156412004-11-21 Andreas Schwab <schwab@suse.de>
15642
15643 * linux-m68k-low.c (m68k_num_gregs): Define.
15644 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15645 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15646 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15647 (m68k_breakpoint_at): New. Add to the_low_target.
15648
15649 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15650 srv_linux_thread_db to yes.
15651
43360365
JB
156522004-10-20 Joel Brobecker <brobecker@gnat.com>
15653
15654 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15655 (ARCH_SET_FS): Likewise.
15656 (ARCH_GET_FS): Likewise.
15657 (ARCH_GET_GS): Likewise.
15658
fd500816
DJ
156592004-10-16 Daniel Jacobowitz <dan@debian.org>
15660
15661 * linux-i386-low.c (ps_get_thread_area): New.
15662 * linux-x86-64-low.c (ps_get_thread_area): New.
15663 * linux-low.c: Include <sys/syscall.h>.
15664 (linux_kill_one_process): Don't kill the first thread here.
15665 (linux_kill): Kill the first thread here.
15666 (kill_lwp): New function.
15667 (send_sigstop, linux_send_signal): Use it.
15668 * proc-service.c: Clean up #ifdefs.
15669 (fpregset_info): Delete.
15670 (ps_lgetregs): Update and enable implementation.
15671 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15672 implementations.
15673 * remote-utils.c (struct sym_cache, symbol_cache): New.
15674 (input_interrupt): Print a clearer message.
15675 (async_io_enabled): New variable.
15676 (enable_async_io, disable_async_io): Use it. Update comments.
15677 (look_up_one_symbol): Use the symbol cache.
15678 * thread-db.c (thread_db_look_up_symbols): New function.
15679 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15680
f6de3c42
DJ
156812004-10-16 Daniel Jacobowitz <dan@debian.org>
15682
15683 * configure.in: Test for -rdynamic.
15684 * configure: Regenerated.
15685 * Makefile (INTERNAL_LDFLAGS): New.
15686 (gdbserver, gdbreplay): Use it.
15687
2c0fc042
AC
156882004-09-02 Andrew Cagney <cagney@gnu.org>
15689
15690 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15691
075b3282
DJ
156922004-03-23 Daniel Jacobowitz <drow@mvista.com>
15693
15694 * linux-low.c (linux_wait): Clear all_processes list also.
15695
fa6a77dc
DJ
156962004-03-12 Daniel Jacobowitz <drow@mvista.com>
15697
15698 * linux-low.c: Include <errno.h>. Remove extern declaration of
15699 errno.
15700
6d782a97
DJ
157012004-03-12 Daniel Jacobowitz <drow@mvista.com>
15702
15703 * gdbreplay.c, server.h, utils.c: Update copyright years.
15704
3a7fb99b
DJ
157052004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15706
15707 * server.c (main): Print child status or termination signal from
15708 variable 'signal', not 'sig'.
15709
c3e735a6
DJ
157102004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15711
15712 * linux-low.c (linux_read_memory): Change return type to
15713 int. Check for and return error from ptrace().
15714 * target.c (read_inferior_memory): Change return type to int. Pass
15715 back return status from the_target->read_memory().
15716 * target.h (struct target_ops): Adapt *read_memory() prototype.
15717 Update comment.
15718 (read_inferior_memory): Adapt prototype.
15719 * server.c (main): Return an error packet if
15720 read_inferior_memory() returns an error.
15721
a59d1c82
DJ
157222004-03-04 Daniel Jacobowitz <drow@mvista.com>
15723
15724 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15725 Unify with other clean targets.
15726
dc3f8883
DJ
157272004-02-29 Daniel Jacobowitz <drow@mvista.com>
15728
15729 * server.c (handle_v_cont): Call set_desired_inferior.
15730
89a208da
DJ
157312004-02-29 Daniel Jacobowitz <drow@mvista.com>
15732
15733 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15734
62ea82f5
DJ
157352004-02-29 Daniel Jacobowitz <drow@mvista.com>
15736
15737 * linux-low.c (linux_wait): Unblock async I/O.
15738 (linux_resume): Block and enable async I/O.
15739 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15740 * server.h (block_async_io, unblock_async_io): Add prototypes.
15741
6910d122
DJ
157422004-02-29 Daniel Jacobowitz <drow@mvista.com>
15743
15744 * remote-utils.c (remote_open): Print a status notice after
15745 opening a TCP port.
15746 * server.c (attach_inferior): Print a status notice after
15747 attaching.
15748
157492004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15750
15751 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15752
c89dc5d4
DJ
157532004-02-26 Daniel Jacobowitz <drow@mvista.com>
15754
15755 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15756 error packet.
15757 * server.c, target.h: Update copyright years.
15758
4b8dad4a
RM
157592004-02-25 Roland McGrath <roland@redhat.com>
15760
15761 * target.h (struct target_ops): New member `read_auxv'.
15762 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15763 * linux-low.c (linux_read_auxv): New function.
15764 (linux_target_ops): Initialize `read_auxv' member to that.
15765
d7446758
JB
157662004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15767
15768 Committed by Jim Blandy <jimb@redhat.com>.
15769
15770 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15771 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15772 instead of GPR_SIZE to distiguish s390 and s390x targets.
15773
5544ad89
DJ
157742004-01-31 Daniel Jacobowitz <drow@mvista.com>
15775
15776 * linux-low.c: Update copyright year.
15777 (check_removed_breakpoint): Clear pending_is_breakpoint.
15778 (linux_set_resume_request, linux_queue_one_thread)
15779 (resume_status_pending_p): New functions.
15780 (linux_continue_one_thread): Use process->resume.
15781 (linux_resume): Only resume threads if there are no pending events.
15782 * linux-low.h (struct process_info): Add resume request
15783 pointer.
15784
2a68b70e
DJ
157852004-01-30 Daniel Jacobowitz <drow@mvista.com>
15786
15787 * regcache.c (new_register_cache): Clear the allocated register
15788 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15789
64386c31
DJ
157902003-10-13 Daniel Jacobowitz <drow@mvista.com>
15791
15792 * linux-low.c (linux_resume): Take a struct thread_resume *
15793 argument.
15794 (linux_wait): Update call.
15795 (resume_ptr): New static variable.
15796 (linux_continue_one_thread): Renamed from
15797 linux_continue_one_process. Use resume_ptr.
15798 (linux_resume): Use linux_continue_one_thread.
15799 * server.c (handle_v_cont, handle_v_requests): New functions.
15800 (myresume): New function.
15801 (main): Handle 'v' case.
15802 * target.h (struct thread_resume): New type.
15803 (struct target_ops): Change argument of "resume" to struct
15804 thread_resume *.
15805 (myresume): Delete macro.
15806
c938e9b0
L
158072003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15808
15809 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15810 (uninstall): Support DESTDIR.
15811
7f313d07
BC
15812Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15813
15814 * configure.srv: Add xscale*linux copy of arm*linux entry.
15815
3b2fc2ea
DJ
158162003-07-24 Daniel Jacobowitz <drow@mvista.com>
15817
15818 * linux-arm-low.c (arm_reinsert_addr): New function.
15819 (the_low_target): Add arm_reinsert_addr.
15820
1c0a559e
MK
158212003-07-08 Mark Kettenis <kettenis@gnu.org>
15822
15823 * mem-break.c: Remove whitespace at end of file.
15824
43d5792c
DJ
158252003-06-28 Daniel Jacobowitz <drow@mvista.com>
15826
15827 * configure.in: Check whether we need to prototype strerror.
15828 * server.h: Optionally prototype strerror.
15829 * gdbreplay.c (perror_with_name): Use strerror.
15830 * linux-low.c (linux_attach_lwp): Use strerror.
15831 * utils.c (perror_with_name): Use strerror.
15832 * config.in, configure: Regenerated.
15833
c8a86edf
DJ
158342003-06-28 Daniel Jacobowitz <drow@mvista.com>
15835
15836 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15837 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15838
73d37363
DJ
158392003-06-20 Daniel Jacobowitz <drow@mvista.com>
15840
15841 * Makefile.in (SFILES): Update.
15842 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15843 low-sun3.c: Remove files.
15844
6ad8ae5c
DJ
158452003-06-17 Daniel Jacobowitz <drow@mvista.com>
15846
15847 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15848 (linux_detach_one_process, linux_detach): New functions.
15849 (linux_target_ops): Add linux_detach.
15850 * server.c (main): Handle 'D' packet.
15851 * target.h (struct target_ops): Add "detach" member.
15852 (detach_inferior): Define.
15853
1581182a
MK
158542003-06-13 Mark Kettenis <kettenis@gnu.org>
15855
15856 From Kelley Cook <kelleycook@wideopenwest.com>:
15857 * configure.srv: Accept i[34567]86 variants.
15858
e5379b03
DJ
158592003-06-05 Daniel Jacobowitz <drow@mvista.com>
15860
15861 * linux-low.c (linux_wait_for_event): Correct comment typos.
15862 (linux_resume_one_process): Call check_removed_breakpoint.
15863 (linux_send_signal): New function.
15864 (linux_target_ops): Add linux_send_signal.
15865 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15866 of kill.
15867 * target.h (struct target_ops): Add send_signal.
15868
2ff29de4
JB
158692003-05-29 Jim Blandy <jimb@redhat.com>
15870
15871 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15872 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15873 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15874 away part of the register's value.
15875
254787d4
DJ
158762003-03-26 Daniel Jacobowitz <drow@mvista.com>
15877
15878 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15879 (linux_wait_for_event, linux_init_signals): Likewise.
15880
94e10508
DJ
158812003-03-17 Daniel Jacobowitz <drow@mvista.com>
15882
15883 * configure.in: Check for stdlib.h.
15884 * configure: Regenerated.
15885 * config.in: Regenerated.
15886
4c0711e0
DJ
158872003-01-04 Andreas Schwab <schwab@suse.de>
15888
15889 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15890
ef66e766
AC
158912003-01-02 Andrew Cagney <ac131313@redhat.com>
15892
15893 * Makefile.in: Remove obsolete code.
15894
a1358604
DJ
158952002-11-20 Daniel Jacobowitz <drow@mvista.com>
15896
15897 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15898 defined(PT_FPR0_HI).
15899
23ce3b1c
DJ
159002002-11-17 Stuart Hughes <seh@zee2.com>
15901
15902 * linux-arm-low.c (arm_num_regs): Increase.
15903 (arm_regmap): Include status register.
15904
159052002-11-17 Daniel Jacobowitz <drow@mvista.com>
15906
15907 * linux-low.c (register_addr): Remove incorrect -1 check.
15908
a9fa9f7d
DJ
159092002-08-29 Daniel Jacobowitz <drow@mvista.com>
15910
15911 * linux-low.c (linux_create_inferior): Call setpgid. Return
15912 the new PID.
15913 (unstopped_p, linux_signal_pid): Remove.
15914 (linux_target_ops): Remove linux_signal_pid.
15915 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15916 global instead of target method.
15917 * target.h (struct target_ops): Remove signal_pid. Update comment
15918 for create_inferior.
15919 * server.c (signal_pid): New variable.
15920 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15921 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15922 (attach_inferior): Set signal_pid.
15923
17574093
DJ
159242002-08-23 Daniel Jacobowitz <drow@mvista.com>
15925
15926 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15927
159282002-08-20 Jim Blandy <jimb@redhat.com>
15929
15930 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15931 default for this.
15932
159332002-08-01 Andrew Cagney <cagney@redhat.com>
15934
15935 * Makefile.in: Make chill references obsolete.
15936
159372002-07-24 Kevin Buettner <kevinb@redhat.com>
15938
15939 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15940 * configure: Regenerate.
15941 * config.in: Regenerate.
15942
159432002-07-09 David O'Brien <obrien@FreeBSD.org>
15944
15945 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15946 (perror_with_name, remote_close, remote_open, expect, play): Static.
15947
159482002-07-04 Michal Ludvig <mludvig@suse.cz>
15949
4b8dad4a 15950 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15951 byte offsets instead of an array of indexes.
15952 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15953
159542002-06-13 Daniel Jacobowitz <drow@mvista.com>
15955
15956 * regcache.c: Add comment.
15957
159582002-06-11 Daniel Jacobowitz <drow@mvista.com>
15959
15960 * thread-db.c: New file.
15961 * proc-service.c: New file.
15962 * acinclude.m4: New file.
15963 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15964 proc-service.o, and thread-db.o.
15965 (linux-low.o): Add USE_THREAD_DB.
15966 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15967 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15968 * aclocal.m4: Regenerated.
15969 * config.in: Regenerated.
15970 * configure: Regenerated.
15971 * configure.in: Check for proc_service.h, sys/procfs.h,
15972 thread_db.h, and linux/elf.h headrs.
15973 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15974 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15975 Check for -lthread_db and thread support.
15976 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15977 PowerPC, and SuperH.
15978 * i387-fp.c: Constify arguments.
15979 * i387-fp.h: Likewise.
15980 * inferiors.c: (struct thread_info): Renamed from
15981 `struct inferior_info'. Remove PID member. Use generic inferior
15982 list header. All uses updated.
15983 (inferiors, signal_pid): Removed.
15984 (all_threads): New variable.
15985 (get_thread): Define.
15986 (add_inferior_to_list): New function.
15987 (for_each_inferior): New function.
15988 (change_inferior_id): New function.
15989 (add_inferior): Removed.
15990 (remove_inferior): New function.
15991 (add_thread): New function.
15992 (free_one_thread): New function.
15993 (remove_thread): New function.
15994 (clear_inferiors): Use for_each_inferior and free_one_thread.
15995 (find_inferior): New function.
15996 (find_inferior_id): New function.
15997 (inferior_target_data): Update argument type.
15998 (set_inferior_target_data): Likewise.
15999 (inferior_regcache_data): Likewise.
16000 (set_inferior_regcache_data): Likewise.
16001 * linux-low.c (linux_bp_reinsert): Remove.
16002 (all_processes, stopping_threads, using_thrads)
16003 (struct pending_signals, debug_threads, pid_of): New.
16004 (inferior_pid): Replace with macro.
16005 (struct inferior_linux_data): Remove.
16006 (get_stop_pc, add_process): New functions.
16007 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16008 Use add_process and add_thread.
16009 (linux_attach_lwp): New function, based on old linux_attach. Use
16010 add_process and add_thread. Set stop_expected for new threads.
16011 (linux_attach): New function.
16012 (linux_kill_one_process): New function.
16013 (linux_kill): Kill all LWPs.
16014 (linux_thread_alive): Use find_inferior_id.
16015 (check_removed_breakpoints, status_pending_p): New functions.
16016 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16017 Update. Use WNOHANG. Wait for cloned processes also. Update process
16018 struct for the found process.
16019 (linux_wait_for_event): New function.
16020 (linux_wait): Use it. Support LWPs.
16021 (send_sigstop, wait_for_sigstop, stop_all_processes)
16022 (linux_resume_one_process, linux_continue_one_process): New functions.
16023 (linux_resume): Support LWPs.
16024 (REGISTER_RAW_SIZE): Remove.
16025 (fetch_register): Use register_size instead. Call supply_register.
16026 (usr_store_inferior_registers): Likewise. Call collect_register.
16027 Fix recursive case.
16028 (regsets_fetch_inferior_registers): Improve error message.
16029 (regsets_store_inferior_registers): Add debugging.
16030 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16031 (unstopped_p, linux_signal_pid): New functions.
16032 (linux_target_ops): Add linux_signal_pid.
16033 (linux_init_signals): New function.
16034 (initialize_low): Call it. Initialize using_threads.
16035 * regcache.c (inferior_regcache_data): Add valid
16036 flag.
16037 (get_regcache): Fetch registers lazily. Add fetch argument
16038 and update all callers.
16039 (regcache_invalidate_one, regcache_invalidate): New
16040 functions.
16041 (new_register_cache): Renamed from create_register_cache.
16042 Return the new regcache.
16043 (free_register_cache): Change argument to a void *.
16044 (registers_to_string, registers_from_string): Call get_regcache
16045 with fetch flag set.
16046 (register_data): Make static. Pass fetch flag to get_regcache.
16047 (supply_register): Call get_regcache with fetch flag clear.
16048 (collect_register): Call get_regcache with fetch flag set.
16049 (collect_register_as_string): New function.
16050 * regcache.h: Update.
16051 * remote-utils.c (putpkt): Flush after debug output and use
16052 stderr.
16053 Handle input interrupts while waiting for an ACK.
16054 (input_interrupt): Use signal_pid method.
16055 (getpkt): Flush after debug output and use stderr.
16056 (outreg): Use collect_register_as_string.
16057 (new_thread_notify, dead_thread_notify): New functions.
16058 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16059 and general_thread.
16060 (look_up_one_symbol): Flush after debug output.
16061 * server.c (step_thread, server_waiting): New variables.
16062 (start_inferior): Don't use signal_pid. Update call to mywait.
16063 (attach_inferior): Update call to mywait.
16064 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16065 (main): Don't fetch/store registers explicitly. Use
16066 set_desired_inferior. Support proposed ``Hs'' packet. Update
16067 calls to mywait.
16068 * server.h: Update.
16069 (struct inferior_list, struct_inferior_list_entry): New.
16070 * target.c (set_desired_inferior): New.
16071 (write_inferior_memory): Constify.
16072 (mywait): New function.
16073 * target.h: Update.
16074 (struct target_ops): New signal_pid method.
16075 (mywait): Removed macro, added prototype.
16076
16077 * linux-low.h (regset_func): Removed.
16078 (regset_fill_func, regset_store_func): New.
16079 (enum regset_type): New.
16080 (struct regset_info): Add type field. Use new operation types.
16081 (struct linux_target_ops): stop_pc renamed to get_pc.
16082 Add decr_pc_after_break and breakpoint_at.
16083 (get_process, get_thread_proess, get_process_thread)
16084 (strut process_info, all_processes, linux_attach_lwp)
16085 (thread_db_init): New.
16086
16087 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16088 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16089 (the_low_target): Add new members.
16090 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16091 (i386_store_fpxregset): Constify.
16092 (target_regsets): Add new kind identifier.
16093 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16094 (i386_set_pc): Add debugging.
16095 (i386_breakpoint_at): New function.
16096 (the_low_target): Add new members.
16097 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16098 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16099 (mips_breakpoint_at): New.
16100 (the_low_target): Add new members.
16101 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16102 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16103 (the_low_target): Add new members.
16104 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16105 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16106 (the_low_target): Add new members.
16107 * linux-x86-64-low.c (target_regsets): Add new kind
16108 identifier.
16109
161102002-05-15 Daniel Jacobowitz <drow@mvista.com>
16111
16112 From Martin Pool <mbp@samba.org>:
16113 * server.c (gdbserver_usage): New function.
16114 (main): Call it.
16115
161162002-05-14 Daniel Jacobowitz <drow@mvista.com>
16117
16118 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16119 stop_at -> stop_pc.
16120
161212002-05-04 Andrew Cagney <ac131313@redhat.com>
16122
16123 * Makefile.in: Remove obsolete code.
16124
161252002-04-24 Michal Ludvig <mludvig@suse.cz>
16126
16127 * linux-low.c (regsets_fetch_inferior_registers),
16128 (regsets_store_inferior_registers): Removed cast to int from
16129 ptrace() calls.
16130 * regcache.h: Added declaration of struct inferior_info.
16131
161322002-04-20 Daniel Jacobowitz <drow@mvista.com>
16133
16134 * inferiors.c (struct inferior_info): Add regcache_data.
16135 (add_inferior): Call create_register_cache.
16136 (clear_inferiors): Call free_register_cache.
16137 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16138 * regcache.c (struct inferior_regcache_data): New.
16139 (registers): Remove.
16140 (get_regcache): New function.
16141 (create_register_cache, free_register_cache): New functions.
16142 (set_register_cache): Don't initialize the register cache here.
16143 (registers_to_string, registers_from_string, register_data): Call
16144 get_regcache.
16145 * regcache.h: Add prototypes.
16146 * server.h: Likewise.
16147
161482002-04-20 Daniel Jacobowitz <drow@mvista.com>
16149
16150 * mem-break.c: New file.
16151 * mem-break.h: New file.
16152 * Makefile.in: Add mem-break.o rule; update server.h
16153 dependencies.
16154 * inferiors.c (struct inferior_info): Add target_data
16155 member.
16156 (clear_inferiors): Free target_data member if set.
16157 (inferior_target_data, set_inferior_target_data): New functions.
16158 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16159 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16160 * linux-low.c (linux_bp_reinsert): New variable.
16161 (struct inferior_linux_data): New.
16162 (linux_create_inferior): Use set_inferior_target_data.
16163 (linux_attach): Likewise. Call add_inferior.
16164 (linux_wait_for_one_inferior): New function.
16165 (linux_wait): Call it.
16166 (linux_write_memory): Add const.
16167 (initialize_low): Call set_breakpoint_data.
16168 * linux-low.h (struct linux_target_ops): Add breakpoint
16169 handling members.
16170 * server.c (attach_inferior): Remove extra add_inferior
16171 call.
16172 * server.h: Include mem-break.h. Update inferior.c
16173 prototypes.
16174 * target.c (read_inferior_memory)
16175 (write_inferior_memory): New functions.
16176 * target.h (read_inferior_memory)
16177 (write_inferior_memory): Change macros to prototypes.
16178 (struct target_ops): Update comments. Add const to write_memory
16179 definition.
16180
161812002-04-11 Daniel Jacobowitz <drow@mvista.com>
16182
16183 * linux-low.c (usr_store_inferior_registers): Support
16184 registers which are allowed to fail to store.
16185 * linux-low.h (linux_target_ops): Likewise.
16186 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16187 (ppc_cannot_store_register): FPSCR may not be storable.
16188
161892002-04-09 Daniel Jacobowitz <drow@mvista.com>
16190
16191 * server.h: Include <string.h> if HAVE_STRING_H.
16192 * ChangeLog: Correct paths in last ChangeLog entry.
16193
161942002-04-09 Daniel Jacobowitz <drow@mvista.com>
16195
16196 * linux-low.h: Remove obsolete prototypes.
16197 (struct linux_target_ops): New.
16198 (extern the_low_target): New.
16199 * linux-low.c (num_regs, regmap): Remove declarations.
16200 (register_addr): Use the_low_target explicitly.
16201 (fetch_register): Likewise.
16202 (usr_fetch_inferior_registers): Likewise.
16203 (usr_store_inferior_registers): Likewise.
16204 * linux-arm-low.c (num_regs): Remove.
16205 (arm_num_regs): Define.
16206 (arm_regmap): Renamed from regmap, made static.
16207 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16208 made static.
16209 (arm_cannot_store_register): Renamed from cannot_store_register,
16210 made static.
16211 (the_low_target): New.
16212 * linux-i386-low.c (num_regs): Remove.
16213 (i386_num_regs): Define.
16214 (i386_regmap): Renamed from regmap, made static.
16215 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16216 made static.
16217 (i386_cannot_store_register): Renamed from cannot_store_register,
16218 made static.
16219 (the_low_target): New.
16220 * linux-ia64-low.c (num_regs): Remove.
16221 (ia64_num_regs): Define.
16222 (ia64_regmap): Renamed from regmap, made static.
16223 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16224 made static.
16225 (ia64_cannot_store_register): Renamed from cannot_store_register,
16226 made static.
16227 (the_low_target): New.
16228 * linux-m68k-low.c (num_regs): Remove.
16229 (m68k_num_regs): Define.
16230 (m68k_regmap): Renamed from regmap, made static.
16231 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16232 made static.
16233 (m68k_cannot_store_register): Renamed from cannot_store_register,
16234 made static.
16235 (the_low_target): New.
16236 * linux-mips-low.c (num_regs): Remove.
16237 (mips_num_regs): Define.
16238 (mips_regmap): Renamed from regmap, made static.
16239 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16240 made static.
16241 (mips_cannot_store_register): Renamed from cannot_store_register,
16242 made static.
16243 (the_low_target): New.
16244 * linux-ppc-low.c (num_regs): Remove.
16245 (ppc_num_regs): Define.
16246 (ppc_regmap): Renamed from regmap, made static.
16247 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16248 made static.
16249 (ppc_cannot_store_register): Renamed from cannot_store_register,
16250 made static.
16251 (the_low_target): New.
16252 * linux-s390-low.c (num_regs): Remove.
16253 (s390_num_regs): Define.
16254 (s390_regmap): Renamed from regmap, made static.
16255 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16256 made static.
16257 (s390_cannot_store_register): Renamed from cannot_store_register,
16258 made static.
16259 (the_low_target): New.
16260 * linux-sh-low.c (num_regs): Remove.
16261 (sh_num_regs): Define.
16262 (sh_regmap): Renamed from regmap, made static.
16263 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16264 made static.
16265 (sh_cannot_store_register): Renamed from cannot_store_register,
16266 made static.
16267 (the_low_target): New.
16268 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16269 (the_low_target): New.
16270
162712002-04-09 Daniel Jacobowitz <drow@mvista.com>
16272
16273 * Makefile.in: Add stamp-h target.
16274 * configure.in: Create stamp-h.
16275 * configure: Regenerated.
16276
162772002-04-09 Daniel Jacobowitz <drow@mvista.com>
16278
16279 * inferiors.c: New file.
16280 * target.c: New file.
16281 * target.h: New file.
16282 * Makefile.in: Add target.o and inferiors.o. Update
16283 dependencies.
16284 * linux-low.c (inferior_pid): New static variable,
16285 moved from server.c.
16286 (linux_create_inferior): Renamed from create_inferior.
16287 Call add_inferior. Return 0 on success instead of a PID.
16288 (linux_attach): Renamed from myattach.
16289 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16290 (linux_thread_alive): Renamed from mythread_alive.
16291 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16292 child dies.
16293 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16294 (regsets_store_inferior_registers): Correct error message.
16295 Add missing ``return 0''.
16296 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16297 (linux_store_registers): Renamed from store_inferior_registers.
16298 (linux_read_memory): Renamed from read_inferior_memory.
16299 (linux_write_memory): Renamed from write_inferior_memory.
16300 (linux_target_ops): New structure.
16301 (initialize_low): Call set_target_ops ().
16302 * remote-utils.c (unhexify): New function.
16303 (hexify): New function.
16304 (input_interrupt): Send signals to ``signal_pid''.
16305 * server.c (inferior_pid): Remove.
16306 (start_inferior): Update create_inferior call.
16307 (attach_inferior): Call add_inferior.
16308 (handle_query): New function.
16309 (main): Call handle_query for `q' packets.
16310 * server.h: Include "target.h". Remove obsolete prototypes.
16311 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16312
163132002-04-09 Daniel Jacobowitz <drow@mvista.com>
16314
16315 * Makefile.in: Add WARN_CFLAGS. Update configury
16316 dependencies.
16317 * configure.in: Check for <string.h>
16318 * configure: Regenerate.
16319 * config.in: Regenerate.
16320 * gdbreplay.c: Include needed system headers.
16321 (remote_open): Remove strchr prototype.
16322 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16323 * regcache.c (supply_register): Change buf argument to const void *.
16324 (supply_register_by_name): Likewise.
16325 (collect_register): Change buf argument to void *.
16326 (collect_register_by_name): Likewise.
16327 * regcache.h: Add missing prototypes.
16328 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16329 * server.c (handle_query): New function.
16330 (attached): New static variable, moved out of main.
16331 (main): Quiet longjmp clobber warnings.
16332 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16333 * utils.c (error): Remove NORETURN.
16334 (fatal): Likewise.