Use std::vector and std::string instead of VEC(char_ptr) in gdbserver tdesc
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
17d08cd4
SM
12018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * tdesc.h (struct target_desc) <features>: Change type to
4 std::vector<std::string>.
5 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
6 changes.
7 (tdesc_get_features_xml): Likewise.
8 (tdesc_create_feature): Likewise.
9
5cd3e386
AH
102018-03-26 Alan Hayward <alan.hayward@arm.com>
11
12 * regcache.c (find_register_by_number): Return a ref.
13 (find_regno): Use references.
14 (register_size): Likewise.
15 (register_data): Likewise.
16 * tdesc.c (target_desc::~target_desc): Remove free calls.
17 (target_desc::operator==): Use std::vector compare.
18 (init_target_desc): Use reference.
19 (tdesc_create_reg): Use reg constructors.
20 * tdesc.h (struct target_desc): Replace pointer with object.
21
dff7492c
AH
222018-03-23 Alan Hayward <alan.hayward@arm.com>
23
24 * regcache.c (find_register_by_number): Make static.
25 (find_regno): Use find_register_by_number
26 * regcache.h (struct reg): Remove declaration.
27
d80e5242
AH
282018-03-23 Alan Hayward <alan.hayward@arm.com>
29
30 * tdesc.c (target_desc::~target_desc): Move to here.
31 (target_desc::operator==): Likewise.
32 * tdesc.h (target_desc::~target_desc): Move from here.
33 (target_desc::operator==): Likewise.
34
f69c5afb
AA
352018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
36
37 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
38
ce29f843
AA
392018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
40
41 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
42 S390_TDESC_GS.
43 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
44 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
45 and init_registers_s390_gs_linux64.
46
c49bd90b
AA
472018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
48
49 * linux-s390-low.c (s390_fill_gs): Remove function.
50 (s390_fill_gsbc): Remove function.
51 (s390_regsets): Set fill functions for the guarded storage regsets
52 to NULL.
53
7edb9bd3
AA
542018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
55
56 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
57 the word size. Add comment.
58 (s390_get_wordsize): New function.
59 (s390_arch_setup): No longer select a temporary tdesc to fetch the
60 pswm with it. Instead, use s390_get_wordsize to determine the
61 word size first and derive the correct tdesc from that directly.
62
39be3c7e
SM
632018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
64
65 * Makefile.in: Include silent-rules.mk.
66 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
67 (COMPILE): Add ECHO_CXX.
68 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
69 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
70 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
71 (version-generated.c): Add ECHO_GEN.
72 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
73 (IPAGENT_COMPILE): Add ECHO_CXX.
74 (%-generated.c): Add ECHO_REGDAT.
75
3ae9ce5d
TT
762018-03-14 Tom Tromey <tom@tromey.com>
77
78 PR cli/14977:
79 * ax.c (ax_printf): Special case for NULL.
80
e6a58aa8
SM
812018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
82
83 * linux-low.c (linux_qxfer_libraries_svr4): Use
84 xml_escape_text_append.
85
f6e8a41e
SM
862018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
87
88 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
89
b9671caf
SM
902018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
91
92 * server.c (handle_general_set): Remove unnecessary xstrdup.
93
e80aaf61
SM
942018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
95
96 * server.c (parse_debug_format_options): Adjust to
97 delim_string_to_char_ptr_vec changes.
98 * thread-db.c (thread_db_load_search): Adjust to
99 dirnames_to_char_ptr_vec changes.
100
b1223e78
MM
1012018-03-01 Markus Metzger <markus.t.metzger@intel.com>
102
103 * target.h (target_enable_btrace, target_disable_btrace)
104 (target_read_btrace, target_read_btrace_conf): Turn macro into
105 inline function. Throw error if target method is not defined.
106 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
107 check for btrace target method. Be prepared to handle exceptions
108 from btrace target methods.
109
81561546
SDJ
1102018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
111
112 * server.c (captured_main): Change order of error message printed
113 when the current working directory cannot be found.
114
25e3c82c
SDJ
1152018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
116
117 * server.c: Include "filenames.h" and "pathstuff.h".
118 (program_name): Delete variable.
119 (program_path): New anonymous class.
120 (get_exec_wrapper): Use "program_path" instead of
121 "program_name".
122 (handle_v_run): Likewise.
123 (captured_main): Likewise.
124 (process_serial_event): Likewise.
125
b4987c95
SDJ
1262018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
127
128 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
129 (OBJS): Add "pathstuff.o".
130 * server.c (current_directory): New global variable.
131 (captured_main): Initialize "current_directory".
132
f46cd62a
AH
1332018-02-26 Alan Hayward <alan.hayward@arm.com>
134
135 * tdesc.c: Use common/tdesc.h.
136 * tdesc.h: Likewise.
137
a543c5ca
AH
1382018-02-20 Alan Hayward <alan.hayward@arm.com>
139 Simon Marchi <simon.marchi@ericsson.com>
140
141 * Makefile.in: Switch order of make rules.
142
b5884fa7
AH
1432018-02-19 Alan Hayward <alan.hayward@arm.com>
144
145 * Makefile.in: Add common directory in build.
146 * configure.ac: Add common reference.
147 * configure: Regenerate.
148
de6242d3
MM
1492018-02-09 Markus Metzger <markus.t.metzger@intel.com>
150
151 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
152 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
153 * spu-low.c (spu_target_ops): Likewise.
154 * win32-low.c (win32_target_ops): Likewise.
155 * server.c (supported_btrace_packets): Report packets unconditionally.
156 * target.h (target_ops) <supports_btrace>: Remove.
157 (target_supports_btrace): Remove.
158
9ee23a85
MM
1592018-02-09 Markus Metzger <markus.t.metzger@intel.com>
160
161 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
162 (handle_btrace_disable): Change return type to void. Use exceptions
163 to report errors.
164 (handle_btrace_general_set): Catch exception and copy message to
165 return message.
166
8ce47547
TT
1672018-02-08 Tom Tromey <tom@tromey.com>
168
169 * linux-low.c (install_software_single_step_breakpoints): Use
170 make_scoped_restore.
171 * inferiors.c (make_cleanup_restore_current_thread): Remove.
172 (do_restore_current_thread_cleanup): Remove.
173 * gdbthread.h (make_cleanup_restore_current_thread): Don't
174 declare.
175
45dd3607
TT
1762018-02-08 Tom Tromey <tom@tromey.com>
177
178 * mem-break.c (set_raw_breakpoint_at): Use
179 gdb::unique_xmalloc_ptr.
180
e671cd59
PA
1812018-01-30 Pedro Alves <palves@redhat.com>
182
183 PR gdb/13211
184 * target.c (target_terminal::terminal_state): Rename to ...
185 (target_terminal::m_terminal_state): ... this.
186
a0aad537
JC
1872018-01-19 James Clarke <jrtc27@jrtc27.com>
188
189 * linux-low.c (handle_extended_wait): Surround call to
190 thread_db_notice_clone with #ifdef USE_THREAD_DB.
191
4d9b86e1
SM
1922018-01-17 Simon Marchi <simon.marchi@ericsson.com>
193
194 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
195 linux_ptrace_attach_fail_reason_string now returning an
196 std::string.
197 (linux_attach): Likewise.
198 * thread-db.c (attach_thread): Likewise.
199
f517c180
EA
2002018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
201
202 PR gdb/21559
203 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
204 checking for fs_base/gs_base fields in struct user_regs_struct.
205 * configure: Regenerate.
206
9a70f35c
YQ
2072018-01-16 Yao Qi <yao.qi@linaro.org>
208
209 PR gdb/18749
210 * linux-low.c (fetch_register): Call supply_register instead of
211 error.
212
605fd3c6
YQ
2132018-01-08 Yao Qi <yao.qi@linaro.org>
214 Simon Marchi <simon.marchi@ericsson.com>
215
216 * Makefile.in (OBS): Remove selftest.o.
217 * configure.ac: Set srv_selftest_objs if $development is true.
218 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
219 * configure: Re-generated.
220 * server.c (captured_main): Wrap variable selftest_filter with
221 GDB_SELF_TEST.
222
2cc05030
SM
2232018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
224
225 * server.c (parse_debug_format_options): Return std::string.
226 (handle_monitor_command, captured_main): Adjust.
227
e379cee6
PA
2282018-01-05 Pedro Alves <palves@redhat.com>
229
230 PR gdb/18653
231 * server.c (captured_main): Pass quiet=false to
232 save_original_signals_state.
233
82e1e79a
JB
2342018-01-01 Joel Brobecker <brobecker@adacore.com>
235
236 * gdbreplay.c (gdbreplay_version): Update copyright year in
237 version message.
238 * server.c (gdbserver_version): Likewise.
239
8e481c3b
TT
2402017-12-08 Tom Tromey <tom@tromey.com>
241
242 * ax.c (ax_printf): Update.
243
a8806230
YQ
2442017-12-07 Yao Qi <yao.qi@linaro.org>
245
246 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
247 aarch64_linux_read_description.
248 * linux-amd64-ipa.c (idx2mask): New array.
249 (get_ipa_tdesc): Move idx2mask out.
250 (initialize_low_tracepoint): Initialize target descriptions.
251 * linux-i386-ipa.c (idx2mask): New array.
252 (get_ipa_tdesc): Move idx2mask out.
253 (initialize_low_tracepoint): Initialize target descriptions.
254
d4a0e8b5
SM
2552017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
256
257 * tdesc.c (struct tdesc_type): Change return type.
258 (tdesc_add_flag): Change parameter type.
259 (tdesc_add_bitfield): Likewise.
260 (tdesc_add_field): Likewise.
261 (tdesc_set_struct_size): Likewise.
262
798a7429
SM
2632017-12-05 Simon Marchi <simon.marchi@ericsson.com>
264
265 * regcache.c (registers_to_string): Remove unused variable.
266
c0e15c9b
SM
2672017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
268
269 * inferiors.c (for_each_inferior_with_data): Remove.
270 * inferiors.h (for_each_inferior_with_data): Remove.
271 * server.c (handle_qxfer_threads_worker): Change parameter type.
272 (handle_qxfer_threads_proper): Use for_each_thread.
273
f0045347
SM
2742017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
275
276 * inferiors.c (for_each_inferior): Remove.
277 (clear_inferiors): Use for_each_thread.
278 * inferiors.h (for_each_inferior): Remove.
279 * linux-low.c (linux_wait_for_event_filtered): Use
280 for_each_thread.
281 (linux_stabilize_threads): Likewise.
282 * regcache.c (regcache_release): Likewise.
283 * server.c (gdb_wants_all_threads_stopped): Likewise.
284 (clear_pending_status_callback): Remove.
285 (handle_status): Use for_each_thread.
286 (captured_main): Likewise.
287 * win32-low.c (child_init_thread_list): Likewise.
288 (win32_clear_inferiors): Likewise.
289 (fake_breakpoint_event): Likewise.
290
9521758b
SM
2912017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
292
293 * inferiors.h (find_inferior): Remove.
294 * inferiors.c (find_inferior): Remove.
295
8f86d7aa
SM
2962017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
297
298 * linux-low.c (resume_status_pending_p): Update comment.
299 (need_step_over_p): Update comment.
300
e2b44075
SM
3012017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
302
303 * linux-low.c (proceed_one_lwp): Return void, change parameter
304 type.
305 (unsuspend_and_proceed_one_lwp): Likewise.
306 (proceed_all_lwps): Use for_each_thread.
307 (unstop_all_lwps): Likewise.
308
c80825ff
SM
3092017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
310
311 * linux-low.c (linux_resume_one_thread): Return void, take
312 parameter directly.
313 (linux_resume): Use for_each_thread.
314
df3e4dbe
SM
3152017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
316
317 * linux-low.c (send_sigstop_callback): Return void, change
318 parameter type. Rename to...
319 (send_sigstop): ... this.
320 (suspend_and_send_sigstop_callback): Return void, change parameter
321 type. Rename to...
322 (suspend_and_send_sigstop): ... this.
323 (stop_all_lwps): Use for_each_thread.
324
5a6b0a41
SM
3252017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
326
327 * linux-low.c (lwp_running): Return bool, remove unused
328 argument.
329 (linux_stabilize_threads): Use find_thread.
330
39a64da5
SM
3312017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
332
333 * linux-low.c (select_singlestep_lwp_callback): Remove.
334 (count_events_callback): Remove.
335 (select_event_lwp_callback): Remove.
336 (select_event_lwp): Use find_thread/for_each_thread.
337
a1385b7b
SM
3382017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
339
340 * linux-low.c (not_stopped_callback): Return bool, take filter
341 argument directly.
342 (linux_wait_for_event_filtered): Use find_thread.
343 (linux_wait_1): Likewise.
344
454296a2
SM
3452017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
346
347 * linux-low.c (same_lwp): Remove.
348 (find_lwp_pid): Use find_thread.
349
6b2a85da
SM
3502017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
351
352 * linux-low.c (delete_lwp_callback): Remove.
353 (linux_mourn): Use for_each_thread.
354
798a38e8
SM
3552017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
356
357 * linux-low.c (linux_detach_lwp_callback): Return void, remove
358 args parameter, don't check for pid.
359 (linux_detach): Use for_each_thread.
360
e4eb0dec
SM
3612017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
362
363 * linux-low.c (struct counter): Remove.
364 (second_thread_of_pid_p): Remove.
365 (last_thread_of_process_p): Use find_thread.
366
83e1b6c1
SM
3672017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
368
369 * inferiors.c (find_inferior_in_random): Remove.
370 * inferiors.h (find_inferior_in_random): Remove.
371 * linux-low.c (status_pending_p_callback): Return bool, accept
372 parameter ptid directly.
373 (linux_wait_for_event_filtered): Use find_thread_in_random.
374 (linux_wait_1): Likewise.
375
8dc7b443
SM
3762017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
377
378 * inferiors.c (find_inferior_id): Remove.
379 (find_thread_ptid): Move implemention from find_inferior_id to
380 here.
381 * inferiors.h (find_inferior_id): Remove.
382 * server.c (handle_status): Use find_thread_ptid.
383 (process_serial_event): Likewise.
384 * thread-db.c (find_one_thread): Likewise.
385 (thread_db_thread_handle): Likewise.
386 * win32-low.c (thread_rec): Likewise.
387 (child_delete_thread): Likewise.
388 (win32_thread_alive): Likewise.
389 (get_child_debug_event): Likewise.
390
da25033c
SM
3912017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
392
393 * linux-mips-low.c (update_watch_registers_callback): Return
394 void, remove pid_p parameter, don't check for pid.
395 (mips_insert_point, mips_remove_point): Use for_each_thread.
396
c91bb56b
SM
3972017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
398
399 * lynx.low (lynx_delete_thread_callback): Remove.
400 (lynx_mourn): Use for_each_thread.
401
634a3254
SM
4022017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
403
404 * regcache.c (regcache_invalidate_one): Remove.
405 (regcache_invalidate_pid): use for_each_thread.
406
41272101
TT
4072017-11-26 Tom Tromey <tom@tromey.com>
408
409 * linux-low.c (linux_create_inferior): Update.
410
f5291a6f
UW
4112017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
412
413 * spu-low.c (spu_create_inferior): Fix typo in argument name.
414
6654d750
AH
4152017-11-24 Alan Hayward <alan.hayward@arm.com>
416
417 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
418 * linux-aarch64-low.c (initialize_low_arch): Call init func.
419 * linux-aarch64-tdesc-selftest.c: New file.
420 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
421
4222017-11-24 Alan Hayward <alan.hayward@arm.com>
423
424 * configure.srv: Add new file.
425 * linux-aarch64-low.c (initialize_low_arch): Call init func.
426 * linux-aarch64-tdesc-selftest.c: New file.
427 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
428
49bdb7ee
AH
4292017-11-24 Alan Hayward <alan.hayward@arm.com>
430
431 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
432 * linux-aarch64-low.c (initialize_low_arch): Remove init.
433 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
434
d6d7ce56
AH
4352017-11-24 Alan Hayward <alan.hayward@arm.com>
436
437 * configure.srv: Add new files.
438 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
439 aarch64_linux_read_description.
440 * linux-aarch64-low.c (aarch64_linux_read_description):
441 Merge with aarch64_arch_setup.
442 (aarch64_arch_setup): Call aarch64_linux_read_description.
443 * linux-aarch64-tdesc.c: New file.
444 * linux-aarch64-tdesc.h: New file.
445
506fe5f4
YQ
4462017-11-24 Yao Qi <yao.qi@linaro.org>
447
448 * configure.srv: Set $srv_regobj for tic6x-linux.
449 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
450 (tic6x_read_description): Move some code to tic6x_arch_setup.
451 (tic6x_tdesc_test): New function.
452 (initialize_low_arch): Call selftests::register_test.
453
29f9a567
YQ
4542017-11-22 Yao Qi <yao.qi@linaro.org>
455
456 * remote-utils.c (prepare_resume_reply): Use memcpy.
457
578290ec
SM
4582017-11-19 Simon Marchi <simon.marchi@ericsson.com>
459
460 * linux-low.c (kill_one_lwp_callback): Return void, take
461 argument directly, don't filter on pid.
462 (linux_kill): Use for_each_thread.
463
eca55aec
SM
4642017-11-19 Simon Marchi <simon.marchi@ericsson.com>
465
466 * linux-low.c (need_step_over_p): Return bool, remove dummy
467 argument.
468 (linux_resume, proceed_all_lwps): Use find_thread.
469
25c28b4d
SM
4702017-11-19 Simon Marchi <simon.marchi@ericsson.com>
471
472 * linux-low.c (resume_status_pending_p): Return bool, remove
473 flag_p argument.
474 (linux_resume): Use find_thread.
475
5fdda392
SM
4762017-11-19 Simon Marchi <simon.marchi@ericsson.com>
477
478 * linux-low.c (struct thread_resume_array): Remove.
479 (linux_set_resume_request): Return void, take arguments
480 directly.
481 (linux_resume): Use for_each_thread.
482
fcb056a5
SM
4832017-11-19 Simon Marchi <simon.marchi@ericsson.com>
484
485 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
486 return bool, remove data argument.
487 (linux_stabilize_threads): Use find_thread.
488
139720c5
SM
4892017-11-19 Simon Marchi <simon.marchi@ericsson.com>
490
491 * linux-low.c (unsuspend_one_lwp): Remove.
492 (unsuspend_all_lwps): Use for_each_thread, inline code from
493 unsuspend_one_lwp.
494
6d1e5673
SM
4952017-11-19 Simon Marchi <simon.marchi@ericsson.com>
496
497 * gdbthread.h (find_thread): Add overload with ptid_t filter.
498 * linux-low.c (struct iterate_over_lwps_args): Remove.
499 (iterate_over_lwps_filter): Remove.
500 (iterate_over_lwps): Use find_thread.
501
bbf550d5
SM
5022017-11-19 Simon Marchi <simon.marchi@ericsson.com>
503
504 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
505 (linux_handle_new_gdb_connection): Use for_each_thread, inline
506 code from reset_lwp_ptrace_options_callback.
507
00192f77
SM
5082017-11-19 Simon Marchi <simon.marchi@ericsson.com>
509
510 * linux-arm-low.c (struct update_registers_data): Remove.
511 (update_registers_callback): Return void, take arguments
512 directly, don't check thread's pid.
513 (arm_insert_point, arm_remove_point): Use for_each_thread.
514
2bee2b6c
SM
5152017-11-19 Simon Marchi <simon.marchi@ericsson.com>
516
517 * win32-low.c (continue_one_thread): Return void, take argument
518 directly.
519 (child_continue): Use for_each_thread.
520
0b360f19
SM
5212017-11-19 Simon Marchi <simon.marchi@ericsson.com>
522
523 * win32-i386-low.c (update_debug_registers_callback): Rename
524 to ...
525 (update_debug_registers): ... this, return void, remove pid_p arg.
526 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
527
f27866ba
SM
5282017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
529
530 * inferiors.h (struct process_info): Add constructor, initialize
531 fields..
532 <syscalls_to_catch>: Change type to std::vector<int>.
533 * inferiors.c (add_process): Allocate process_info with new.
534 (remove_process): Free process_info with delete.
535 * linux-low.c (handle_extended_wait): Adjust.
536 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
537 * server.c (handle_general_set): Adjust.
538
e849ea89
PA
5392017-11-16 Pedro Alves <palves@redhat.com>
540
541 * remote-utils.c (remote_close): Block SIGIO signals instead of
542 uninstalling the SIGIO handler.
543
1d0aa65c
AH
5442017-11-16 Alan Hayward <alan.hayward@arm.com>
545
546 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
547
3491a34c
YQ
5482017-11-16 Yao Qi <yao.qi@linaro.org>
549
550 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
551 (tic6x_store_gregset): Likewise.
552 (tic6x_usrregs_info): Move it up.
553
a602f924
AH
5542017-11-15 Alan Hayward <alan.hayward@arm.com>
555
556 * Makefile.in: Update arch rules.
557 * configure.srv: Explicitly mark arch/ files.
558
5616b6c3
AS
5592017-11-13 Andreas Schwab <schwab@suse.de>
560
561 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
562 function.
563 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
564
d1928160
PA
5652017-11-06 Pedro Alves <palves@redhat.com>
566
567 * config.in, configure: Regenerate.
568
bac608e7
SM
5692017-10-27 Simon Marchi <simon.marchi@ericsson.com>
570
571 * target.c (struct thread_search): Remove.
572 (thread_search_callback): Remove.
573 (prepare_to_access_memory): Use for_each_thread instead of
574 find_inferior. Inline code from thread_search_callback.
575
eaddb425
SM
5762017-10-27 Simon Marchi <simon.marchi@ericsson.com>
577
578 * server.c (struct visit_actioned_threads_data): Remove.
579 (visit_actioned_threads): Change prototype to take arguments
580 directly.
581 (resume): Use find_thread instead of find_inferior.
582
99078d34
SM
5832017-10-27 Simon Marchi <simon.marchi@ericsson.com>
584
585 * server.c (queue_stop_reply_callback): Change prototype, return
586 void.
587 (find_status_pending_thread_callback): Remove.
588 (handle_status): Replace find_inferior with find_thread and
589 for_each_thread.
590
cc628f3d
AH
5912017-10-25 Alan Hayward <alan.hayward@arm.com>
592
593 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
594 with REGNO.
595 (aarch64_store_gregset): Likewise.
596 (aarch64_fill_fpregset): Likewise.
597 (aarch64_store_fpregset): Likewise.
598
4d3bb80e
SM
5992017-10-21 Simon Marchi <simon.marchi@ericsson.com>
600
601 * gdbthread.h (find_thread, for_each_thread): New functions.
602 * inferiors.c (thread_of_pid): Remove.
603 (find_any_thread_of_pid): Use find_thread.
604 * linux-low.c (num_lwps): Use for_each_thread.
605
7a7cdfa0
YQ
6062017-10-17 Yao Qi <yao.qi@linaro.org>
607
608 * Makefile.in: Remove one rule.
609 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
610
e675d170
YQ
6112017-10-17 Yao Qi <yao.qi@linaro.org>
612
613 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
614 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
615
7eb4e0f9
YQ
6162017-10-17 Yao Qi <yao.qi@linaro.org>
617
618 * configure.srv: Rename arm.o with arch/arm.o.
619
60d6cfc9
YQ
6202017-10-17 Yao Qi <yao.qi@linaro.org>
621
622 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
623 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
624 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
625 (arch-i386.o, arch-amd64.o): Remove rules.
626 (arch/%.o): New rule.
627 Update POSTCOMPILE and COMPILE.pre.
628 * configure.ac: Invoke AC_CONFIG_COMMANDS.
629 * configure: Re-generated.
630 * configure.srv: Replace arch-i386.o with arch/i386.o.
631 Replace arch-amd64.o with arch/amd64.o.
632
5bfda255
YQ
6332017-10-16 Yao Qi <yao.qi@linaro.org>
634
635 * configure: Regenerated.
636
9c80ecd6
SM
6372017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
638
639 * inferiors.h: (struct inferior_list): Remove.
640 (struct inferior_list_entry); Remove.
641 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
642 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
643 get_first_inferior): Remove.
644 (for_each_inferior, for_each_inferior_with_data, find_inferior,
645 find_inferior_id, find_inferior_in_random): Change signature.
646 * inferiors.c (all_threads): Change type to
647 std::list<thread_info *>.
648 (get_thread): Remove macro.
649 (find_inferior, find_inferior_id): Change signature, implement
650 using find_thread.
651 (find_inferior_in_random): Change signature, implement using
652 find_thread_in_random.
653 (for_each_inferior, for_each_inferior_with_data): Change
654 signature, implement using for_each_thread.
655 (add_inferior_to_list, remove_inferior): Remove.
656 (add_thread, get_first_thread, thread_of_pid,
657 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
658 (get_first_inferior, one_inferior_p, clear_inferior_list):
659 Remove.
660 (clear_inferiors, get_thread_process): Update.
661 * gdbthread.h: Include <list>.
662 (struct thread_info) <entry>: Remove field.
663 <id>: New field.
664 (all_threads): Change type to std::list<thread_info *>.
665 (get_first_inferior): Add doc.
666 (find_thread, for_each_thread, find_thread_in_random): New
667 functions.
668 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
669 * linux-arm-low.c (update_registers_callback): Update.
670 * linux-low.c (second_thread_of_pid_p): Update.
671 (kill_one_lwp_callback, linux_detach_lwp_callback,
672 delete_lwp_callback, status_pending_p_callback, same_lwp,
673 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
674 iterate_over_lwps, not_stopped_callback,
675 resume_stopped_resumed_lwps, count_events_callback,
676 select_singlestep_lwp_callback, select_event_lwp_callback,
677 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
678 suspend_and_send_sigstop_callback, wait_for_sigstop,
679 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
680 lwp_running, linux_set_resume_request, resume_status_pending_p,
681 need_step_over_p, start_step_over, linux_resume_one_thread,
682 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
683 reset_lwp_ptrace_options_callback): Update.
684 * linux-mips-low.c (update_watch_registers_callback): Update.
685 * regcache.c (regcache_invalidate_one, regcache_invalidate):
686 Update.
687 (free_register_cache_thread_one): Remove.
688 (regcache_release): Update.
689 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
690 handle_qxfer_threads_worker): Update.
691 (handle_query): Update, use list iterator.
692 (visit_actioned_threads, handle_pending_status,
693 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
694 clear_pending_status_callback, set_pending_status_callback,
695 find_status_pending_thread_callback, handle_status,
696 process_serial_event): Update.
697 * target.c (thread_search_callback): Update.
698 * thread-db.c (thread_db_get_tls_address): Update.
699 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
700 Update.
701 * win32-i386-low.c (update_debug_registers_callback): Update.
702 * win32-low.c (delete_thread_info, child_delete_thread,
703 continue_one_thread, suspend_one_thread,
704 get_child_debug_event): Adjust.
705
9179355e
SM
7062017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
707
708 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
709 * inferiors.h: Include <list>.
710 (struct process_info) <entry>: Remove field.
711 <pid>: New field.
712 (pid_of): Change macro to function.
713 (ptid_of, lwpid_of): Remove macro.
714 (all_processes): Change type to std::list<process_info *>.
715 (ALL_PROCESSES): Remove macro.
716 (for_each_process, find_process): New function.
717 * inferiors.c (all_processes): Change type to
718 std::list<process_info *>.
719 (find_thread_process): Adjust.
720 (add_process): Likewise.
721 (remove_process): Likewise.
722 (find_process_pid): Likewise.
723 (get_first_process): Likewise.
724 (started_inferior_callback): Remove.
725 (have_started_inferiors_p): Adjust.
726 (attached_inferior_callback): Remove.
727 (have_attached_inferiors_p): Adjust.
728 * linux-low.c (check_zombie_leaders): Likewise.
729 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
730 (x86_linux_update_xmltarget): Adjust.
731 * server.c (handle_query): Likewise.
732 (gdb_reattached_process): Remove.
733 (handle_status): Adjust.
734 (kill_inferior_callback): Likewise.
735 (detach_or_kill_inferior): Remove.
736 (print_started_pid): Likewise.
737 (print_attached_pid): Likewise.
738 (detach_or_kill_for_exit): Update.
739 (process_serial_event): Likewise.
740 * linux-arm-low.c (arm_new_fork): Likewise.
741
c9cb8905
SM
7422017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
743
744 * dll.h: Include <list>.
745 (struct dll_info): Add constructor.
746 <entry>: Remove field.
747 (all_dlls): Change type to std::list<dll_info>.
748 * dll.c: Include <algorithm>.
749 (get_dll): Remove macro.
750 (all_dlls): Change type to std::list<dll_info *>.
751 (free_one_dll): Remove.
752 (match_dll): Likewise.
753 (loaded_dll): Adjust.
754 (unloaded_dll): Adjust to all_dlls type change, use
755 std::find_if. Inline code from match_dll.
756 (clear_dlls): Adjust to all_dlls type change.
757 * server.c (emit_dll_description): Remove.
758 (handle_qxfer_libraries): Adjust to all_dlls type change,
759 integrate emit_dll_description's functionality.
760
04ec7890
SM
7612017-10-12 Simon Marchi <simon.marchi@ericsson.com>
762
763 * linux-low.h (struct linux_target_ops) <delete_process>: New
764 field.
765 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
766 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
767 (struct linux_target_ops): Add delete_process callback.
768 * linux-arm-low.c (arm_delete_process): New.
769 (struct linux_target_ops): Add delete_process callback.
770 * linux-bfin-low.c (struct linux_target_ops): Likewise.
771 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
772 * linux-m32r-low.c (struct linux_target_ops): Likewise.
773 * linux-mips-low.c (mips_linux_delete_process): New.
774 (struct linux_target_ops): Add delete_process callback.
775 * linux-ppc-low.c (struct linux_target_ops): Likewise.
776 * linux-s390-low.c (struct linux_target_ops): Likewise.
777 * linux-sh-low.c (struct linux_target_ops): Likewise.
778 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
779 * linux-tile-low.c (struct linux_target_ops): Likewise.
780 * linux-x86-low.c (x86_linux_delete_process): New.
781 (struct linux_target_ops): Add delete_process callback.
782 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
783
466eecee
SM
7842017-10-12 Simon Marchi <simon.marchi@ericsson.com>
785
786 * linux-aarch64-low.c (the_low_target): Add thread delete
787 callback.
788 * linux-arm-low.c (arm_delete_thread): New function.
789 (the_low_target): Add thread delete callback.
790 * linux-bfin-low.c (the_low_target): Likewise.
791 * linux-crisv32-low.c (the_low_target): Likewise.
792 * linux-low.c (delete_lwp): Invoke delete_thread callback if
793 set.
794 * linux-low.h (struct linux_target_ops) <delete_thread>: New
795 field.
796 * linux-m32r-low.c (the_low_target): Add thread delete callback.
797 * linux-mips-low.c (mips_linux_delete_thread): New function.
798 (the_low_target): Add thread delete callback.
799 * linux-ppc-low.c (the_low_target): Likewise.
800 * linux-s390-low.c (the_low_target): Likewise.
801 * linux-sh-low.c (the_low_target): Likewise.
802 * linux-tic6x-low.c (the_low_target): Likewise.
803 * linux-tile-low.c (the_low_target): Likewise.
804 * linux-x86-low.c (the_low_target): Likewise.
805 * linux-xtensa-low.c (the_low_target): Likewise.
806
b79f7801
YZ
8072017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
808
809 * win32-low.c: Include "common-inferior.h".
810
bc3b087d
SDJ
8112017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
812
813 * inferiors.c (set_inferior_cwd): New function.
814 * server.c (handle_general_set): Handle QSetWorkingDir packet.
815 (handle_query): Inform that QSetWorkingDir is supported.
816 * win32-low.c (create_process): Pass the inferior's cwd to
817 CreateProcess.
818
d092c5a2
SDJ
8192017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
820
821 * inferiors.c (current_inferior_cwd): New global variable.
822 (get_inferior_cwd): New function.
823 * inferiors.h (struct process_info) <cwd>: New field.
824
7da0a886
SDJ
8252017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
826
827 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
828 (OBS): Add gdb_tilde_expand.o.
829
289a6840
SM
8302017-10-02 Simon Marchi <simon.marchi@ericsson.com>
831
832 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
833 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
834
256642e8
PA
8352017-09-29 Pedro Alves <palves@redhat.com>
836
837 * ax.c (gdb_parse_agent_expr): Constify.
838 * ax.h (gdb_parse_agent_expr): Constify.
839 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
840 Constify.
841 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
842 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
843 * remote-utils.h (read_ptid): Constify.
844 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
845 (process_point_options, process_serial_event): Constify.
846 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
847 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
848 (cmd_qtbuffer): Constify.
849
5b9ca4d4
PA
8502017-09-29 Pedro Alves <palves@redhat.com>
851
852 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
853 fails.
854
94c207e0
PA
8552017-09-29 Pedro Alves <palves@redhat.com>
856
857 * linux-low.c (handle_extended_wait): Pass parent thread instead
858 of process to thread_db_notice_clone.
859 * linux-low.h (thread_db_notice_clone): Replace parent process
860 parameter with parent thread parameter.
861 * thread-db.c (find_one_thread): Add comment.
862 (thread_db_notice_clone): Replace parent process parameter with
863 parent thread parameter. Temporarily switch to the parent thread.
864
75352e28
SDJ
8652017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
866
867 * gdbthread.h: Include "common-gdbthread.h".
868 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
869 "if" when validating the ptid.
870 * remote-utils.c: Include "gdbthread.h".
871 (prepare_resume_reply): Use "switch_to_thread".
872 * target.c (done_accessing_memory): Likewise.
873
ad339634
AA
8742017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
875
876 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
877 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
878 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
879 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
880 s390x-gs-linux64-ipa.o to ipa_obj.
881 * linux-s390-low.c (HWCAP_S390_GS): New define.
882 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
883 New functions.
884 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
885 (s390_arch_setup): Check for guarded-storage support and choose
886 appropriate tdesc.
887 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
888 init_registers_s390x_gs_linux64.
889 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
890 enum value.
891 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
892 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
893
cc4d742f
SM
8942017-09-22 Simon Marchi <simon.marchi@ericsson.com>
895
896 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
897
f6327dcb
KB
8982017-09-21 Kevin Buettner <kevinb@redhat.com>
899
900 * linux-low.h (struct lwp_info): Add new field, thread_handle.
901 (thread_db_thread_handle): Declare.
902 * linux-low.c (linux_target_ops): Initialize thread_handle.
903 * server.c (handle_qxfer_threads_worker): Add support for
904 "handle" attribute.
905 * target.h (struct target_ops): Add new function pointer,
906 thread_handle.
907 (target_thread_handle): Define.
908 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
909 field in lwp.
910 (thread_db_thread_handle): New function.
911
86299109
KB
9122017-09-21 Kevin Buettner <kevinb@redhat.com>
913
914 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
915 * linux-low.h (thread_db_notice_clone): Declare.
916 * thread-db.c (thread_db_notice_clone): New function.
917
f557a88a
PA
9182017-09-21 Pedro Alves <palves@redhat.com>
919
920 * server.c (gdb_read_memory, handle_status, process_serial_event)
921 (handle_serial_event, handle_target_event): Adjust to
922 set_desired_thread prototype change.
923 * target.c (set_desired_thread): Remove 'use_general' parameter
924 and adjust.
925 * target.h (set_desired_thread): Remove 'use_general' parameter.
926
223ffa71
TT
9272017-09-20 Tom Tromey <tom@tromey.com>
928
929 * target.c (target_terminal::terminal_state): Define.
930 (target_terminal::init): Rename from target_terminal_init.
931 (target_terminal::inferior): Rename from
932 target_terminal_inferior.
933 (target_terminal::ours): Rename from target_terminal_ours.
934 (target_terminal::ours_for_output, target_terminal::info): New.
935
04fd3ba9
SM
9362017-09-16 Simon Marchi <simon.marchi@ericsson.com>
937
938 * server.c (accumulate_file_name_length): Remove.
939 (emit_dll_description): Adjust to std::string change.
940 (handle_qxfer_libraries): Use std::string to hold document.
941
5e187554
SM
9422017-09-16 Simon Marchi <simon.marchi@ericsson.com>
943
944 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
945 return type of xml_escape_text.
946 * server.c (emit_dll_description): Likewise.
947
1526853e
SM
9482017-09-16 Simon Marchi <simon.marchi@ericsson.com>
949
950 * server.c (captured_main): Accept argument for --selftest.
951 Update run_tests call.
952 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
953 when registering selftests.
954
c4dfafab
SDJ
9552017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
956
957 * regcache.c (get_thread_regcache): Update code to use "std::vector"
958 instead of "VEC" for "target_desc.reg_defs".
959 (regcache_cpy): Likewise.
960 (registers_to_string): Likewise.
961 (registers_from_string): Likewise.
962 (find_regno): Likewise.
963 (supply_regblock): Likewise.
964 (regcache_raw_read_unsigned): Likewise.
965 * tdesc.c (init_target_desc): Likewise.
966 (tdesc_create_reg): Likewise.
967 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
968 (struct target_desc) <reg_defs>: Convert to "std::vector".
969 (target_desc): Do not initialize "reg_defs".
970 (~target_desc): Update code to use "std::vector" instead of "VEC"
971 for "target_desc.reg_defs".
972 (operator==): Likewise.
973
124aceb4
SM
9742017-09-15 Simon Marchi <simon.marchi@ericsson.com>
975
976 * inferiors.h (thread_to_gdb_id): Remove.
977 * inferiors.c (thread_to_gdb_id): Remove.
978 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
979 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
980 lynx_store_registers, lynx_read_memory, lynx_write_memory):
981 Likewise.
982 * nto-low.c (nto_fetch_registers, nto_store_registers,
983 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
984
96cde54f
SM
9852017-09-15 Simon Marchi <simon.marchi@ericsson.com>
986
987 * inferiors.h (gdb_id_to_thread_id): Remove.
988 * inferiors.c (gdb_id_to_thread_id): Remove.
989 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
990 removal. Move pid declaration closer to where it's used.
991
e8ca139e
SM
9922017-09-15 Simon Marchi <simon.marchi@ericsson.com>
993
994 * server.c (handle_detach): New function.
995 (process_serial_event): Move code out, call handle_detach.
996
f8a4e119
SM
9972017-09-15 Simon Marchi <simon.marchi@ericsson.com>
998
999 * server.c (require_running): Rename to ...
1000 (require_running_or_return): ... this ...
1001 (require_running_or_break): ... and this.
1002 (handle_query, process_serial_event): Adjust.
1003
0eb0a407
SM
10042017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1005
1006 * linux-low.c (linux_set_resume_request): Remove unused
1007 variables.
1008
785922a5
SM
10092017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1010
1011 * server.c (first_thread_of): Remove.
1012 (process_serial_event): Replace usage of first_thread_of with
1013 find_any_thread_of_pid.
1014 * tracepoint.c (same_process_p): Remove.
1015 (gdb_agent_about_to_close): Replace usage of same_process_p with
1016 find_any_thread_of_pid.
1017 * linux-x86-low.c (same_process_callback): Remove.
1018 (x86_arch_setup_process_callback): Replace usage of
1019 same_process_callback with find_any_thread_of_pid.
1020 * thread-db.c (any_thread_of): Remove.
1021 (switch_to_process): Replace usage of any_thread_of with
1022 find_any_thread_of_pid.
1023 * inferiors.c (thread_pid_matches_callback): Remove.
1024 (find_thread_process): Adjust to use find_any_thread_of_pid.
1025
a059f00c
SDJ
10262017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1027
1028 * regcache.c (get_thread_regcache): Guard calls to "memset"
1029 with "!VEC_empty".
1030
cc397f3a
SDJ
10312017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1032
1033 * linux-low.c (handle_extended_wait): Use
1034 "allocate_target_description" instead of "XNEW".
1035 * linux-x86-low.c (initialize_low_arch): Likewise.
1036
22916b07
YQ
10372017-09-05 Yao Qi <yao.qi@linaro.org>
1038
1039 * configure.srv (srv_i386_regobj): Remove.
1040 (srv_amd64_regobj): Remove.
1041 (srv_regobj): Set it to "" for x86 non-linux targets.
1042 * linux-x86-tdesc.c (i386_linux_read_description):
1043 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1044 (init_registers_i386): Remove the declaration.
1045 (tdesc_i386): Remove the declaration.
1046 (lynx_i386_arch_setup): Call i386_create_target_description.
1047 * nto-x86-low.c: Likewise.
1048 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1049 [!__x86_64__]: include arch/i386.h.
1050 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1051
38602d55
YQ
10522017-09-05 Yao Qi <yao.qi@linaro.org>
1053
1054 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1055 i386/amd64-XXX-linux from it.
1056
44b886ff
YQ
10572017-09-05 Yao Qi <yao.qi@linaro.org>
1058
1059 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1060 false.
1061 (ipa_amd64_linux_regobj): Remove.
1062 (ipa_x32_linux_regobj): Remove.
1063
b4570e4b
YQ
10642017-09-05 Yao Qi <yao.qi@linaro.org>
1065
1066 * Makefile.in (arch-amd64.o): New rule.
1067 * configure.srv: Append arch-amd64.o.
1068 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1069 (get_ipa_tdesc): Call amd64_linux_read_description.
1070 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1071 and init_registers_amd64_XXX.
1072 * linux-x86-low.c (x86_linux_read_description): Call
1073 amd64_linux_read_description.
1074 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1075 (initialize_low_arch): Don't call init_registers_x32_XXX and
1076 init_registers_amd64_XXX.
1077 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1078 and tdesc_amd64_XXX.
1079 [__x86_64__] (amd64_tdesc_test): New function.
1080 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1081 and init_registers_amd64_XXX.
1082 * linux-x86-tdesc.c: Include arch/amd64.h.
1083 (xcr0_to_tdesc_idx): New function.
1084 (i386_linux_read_description): New function.
1085 (amd64_get_ipa_tdesc_idx): New function.
1086 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1087 (amd64_get_ipa_tdesc): Declare.
1088
d1f28ea2
YQ
10892017-09-05 Yao Qi <yao.qi@linaro.org>
1090
1091 * configure.srv (srv_i386_linux_xmlfiles): Remove
1092 i386/i386-XXX-linux.xml from it.
1093
25a93583
YQ
10942017-09-05 Yao Qi <yao.qi@linaro.org>
1095
1096 * configure.srv: Set srv_i386_linux_regobj empty if $development
1097 is false.
1098 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1099 initialize_low_tdesc.
1100 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1101 with #if initialize_low_tdesc.
1102 * linux-x86-tdesc-selftest.c: New file.
1103 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1104
5f035c07
YQ
11052017-09-05 Yao Qi <yao.qi@linaro.org>
1106
1107 * Makefile.in (arch-i386.o): New rule.
1108 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1109 (x86_64-*-linux*): Likewise.
1110 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1111 include arch/i386.h.
1112 (i386_linux_read_description): Remove code and call
1113 i386_create_target_description.
1114 * tdesc.c (allocate_target_description): New function.
1115 * tdesc.h (set_tdesc_architecture): Remove declaration.
1116 (set_tdesc_osabi): Likewise.
1117
0abe8a89
YQ
11182017-09-05 Yao Qi <yao.qi@linaro.org>
1119
1120 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1121 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1122 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1123 .xmltarget.
1124 * server.c (get_features_xml): Call tdesc_get_features_xml.
1125 * tdesc.c (set_tdesc_architecture): New function.
1126 (set_tdesc_osabi): New function.
1127 (tdesc_get_features_xml): New function.
1128 (tdesc_create_feature): Add an argument.
1129 * tdesc.h (struct target_desc) <features>: New field.
1130 <arch, osabi>: New field.
1131 (~target_desc): xfree features, arch, and osabi.
1132 (target_desc::oerator==): Don't compare .xmltarget.
1133 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1134 (set_tdesc_osabi): Likewise.
1135 (tdesc_get_features_xml): Likewise.
1136
0a188386
YQ
11372017-09-05 Yao Qi <yao.qi@linaro.org>
1138
1139 * linux-x86-tdesc.c: Include selftest.h.
1140 (i386_tdesc_test): New function.
1141 (initialize_low_tdesc): Call selftests::register_test.
1142 * tdesc.h: Include regdef.h.
1143 (target_desc): Override operator == and !=.
1144
f49ff000
YQ
11452017-09-05 Yao Qi <yao.qi@linaro.org>
1146
1147 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1148 (ipa_obj): Likewise.
1149 * linux-i386-ipa.c: Include common/x86-xstate.h
1150 (get_ipa_tdesc): Call i386_linux_read_description.
1151 (initialize_low_tracepoint): Don't call init_registers_XXX
1152 functions, call initialize_low_tdesc instead.
1153 * linux-x86-low.c (x86_linux_read_description): Call
1154 i386_linux_read_description.
1155 (initialize_low_arch): Don't call init_registers_i386_XXX
1156 functions, call initialize_low_tdesc.
1157 * linux-x86-tdesc.c: New file.
1158 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1159 (i386_get_ipa_tdesc_idx): Declare.
1160 (i386_get_ipa_tdesc): Declare.
1161 (initialize_low_tdesc): Declare.
1162
2b68ef2f
YQ
11632017-09-05 Yao Qi <yao.qi@linaro.org>
1164
1165 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1166 instead of 0.
1167
f7000548
YQ
11682017-09-05 Yao Qi <yao.qi@linaro.org>
1169
1170 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1171 * regcache.c (get_thread_regcache): Use VEC_length.
1172 (init_register_cache): Likewise.
1173 (regcache_cpy): Likewise.
1174 (registers_to_string): Iterate reg_defs via VEC_iterate.
1175 (find_regno): Likewise.
1176 (find_register_by_number): Use VEC_index.
1177 (register_size): Call find_register_by_number.
1178 (register_data): Call find_register_by_number.
1179 (supply_regblock): Use VEC_length.
1180 (regcache_raw_read_unsigned): Likewise.
1181 * tdesc.c (init_target_desc): Iterate reg_defs via
1182 VEC_iterate.
1183 (default_description): Update initializer.
1184 (copy_target_description): Don't update field num_registers.
1185 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1186 <num_registers>: Remove.
1187
50a421ac
SM
11882017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1189
1190 * Makefile.in (.SECONDARY): Define target.
1191
23fdd69e
SM
11922017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1193
1194 * linux-low.c (linux_wait_1): Adjust.
1195 * server.c (queue_stop_reply_callback): Adjust.
1196
0a2dde4a
SDJ
11972017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1198
1199 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1200 QEnvironmentUnset and QEnvironmentReset packets.
1201 (handle_query): Inform remote that QEnvironmentHexEncoded,
1202 QEnvironmentUnset and QEnvironmentReset are supported.
1203
6afd337d
SM
12042017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1205
1206 * inferiors.h (inferior_target_data): Rename to ...
1207 (thread_target_data): ... this.
1208 (inferior_regcache_data): Rename to ...
1209 (thread_regcache_data): ... this.
1210 (set_inferior_regcache_data): Rename to ...
1211 (set_thread_regcache_data): ... this.
1212 * inferiors.c (inferior_target_data): Rename to ...
1213 (thread_target_data): ... this.
1214 (inferior_regcache_data): Rename to ...
1215 (thread_regcache_data): ... this.
1216 (set_inferior_regcache_data): Rename to ...
1217 (set_thread_regcache_data): ... this.
1218 (free_one_thread): Update.
1219 * linux-low.h (get_thread_lwp): Update.
1220 * regcache.c (get_thread_regcache): Update.
1221 (regcache_invalidate_thread): Update.
1222 (free_register_cache_thread): Update.
1223 * win32-i386-low.c (update_debug_registers_callback): Update.
1224 (win32_get_current_dr): Update.
1225 * win32-low.c (thread_rec): Update.
1226 (delete_thread_info): Update.
1227 (continue_one_thread): Update.
1228 (suspend_one_thread): Update.
1229
a160cc46
SM
12302017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1231
1232 * inferiors.c (set_inferior_target_data): Remove.
1233 * inferiors.h (set_inferior_target_data): Remove.
1234
6d580b63
YQ
12352017-08-18 Yao Qi <yao.qi@linaro.org>
1236
1237 * Makefile.in (OBS): Add selftest.o.
1238 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1239 * configure, config.in: Re-generated.
1240 * server.c: Include common/sefltest.h.
1241 (captured_main): Handle option --selftest.
1242
f5a29eb0
YQ
12432017-08-09 Yao Qi <yao.qi@linaro.org>
1244
1245 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1246 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1247 i386-avx-mpx.o and i386-mmx.o.
1248 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1249 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1250 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1251 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1252 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1253 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1254 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1255 i386/amd64-avx-mpx.xml.
1256
57757c2f
YQ
12572017-08-09 Yao Qi <yao.qi@linaro.org>
1258
1259 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1260 and x32-avx-avx512.o.
1261 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1262 i386/x32-avx-avx512.xml.
1263
229d26fc
SM
12642017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1265
1266 * tracepoint.h (enum class fast_tpoint_collect_result): New
1267 enumeration.
1268 (fast_tracepoint_collecting): Change return type to
1269 fast_tpoint_collect_result.
1270 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1271 * linux-low.h: Include tracepoint.h.
1272 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1273 fast_tpoint_collect_result.
1274 * linux-low.c (handle_tracepoints): Adjust.
1275 (linux_fast_tracepoint_collecting): Change return type to
1276 fast_tpoint_collect_result.
1277 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1278 linux_wait_1, stuck_in_jump_pad_callback,
1279 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1280 proceed_one_lwp): Adjust to type change.
1281
2e1e43e1
YQ
12822017-07-10 Yao Qi <yao.qi@linaro.org>
1283
1284 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1285
adc764e7
YQ
12862017-06-29 Yao Qi <yao.qi@linaro.org>
1287
1288 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1289 Remove.
1290 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1291
a206891a
SM
12922017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1293
1294 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1295
9a6c7d9c
SDJ
12962017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1297
1298 * linux-low.c (linux_create_inferior): Adjust code to access the
1299 environment information via 'gdb_environ' class.
1300 * lynx-low.c (lynx_create_inferior): Likewise.
1301 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1302 (get_environ): Return a pointer to 'our_environ'.
1303 (captured_main): Initialize 'our_environ'.
1304 * server.h (get_environ): Adjust prototype.
1305 * spu-low.c (spu_create_inferior): Adjust code to access the
1306 environment information via 'gdb_environ' class.
1307
ae3e2ccf
SM
13082017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1309
1310 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1311 usage of "register" keyword.
1312
3e019bdc
SM
13132017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1314
1315 * configure: Re-generate.
1316
8465943a
SM
13172017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1318
1319 * configure: Re-generate.
1320
cf0dd6f0
SM
13212017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1322
1323 * Makefile.in (COMPILE.pre): Add "-x c++".
1324
9845682b
SDJ
13252017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1326
1327 * fork-child.c: Conditionally include <signal.h>.
1328
aefd8b33
SDJ
13292017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1330
1331 * server.c (handle_general_set): Handle new packet
1332 "QStartupWithShell".
1333 (handle_query): Add "QStartupWithShell" to the list of supported
1334 packets.
1335 (gdbserver_usage): Add help text explaining the
1336 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1337 options.
1338 (captured_main): Recognize and act upon the presence of the new
1339 CLI options.
1340
2090129c
SDJ
13412017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1342 Pedro Alves <palves@redhat.com>
1343
1344 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1345 * configure: Regenerate.
1346 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1347 "fork-inferior.o".
1348 (i[34567]86-*-lynxos*): Likewise.
1349 (spu*-*-*): Likewise.
1350 * fork-child.c: New file.
1351 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1352 and "environ.h".
1353 (linux_ptrace_fun): New function.
1354 (linux_create_inferior): Adjust function prototype to reflect
1355 change on "target.h". Adjust function code to use
1356 "fork_inferior".
1357 (linux_request_interrupt): Delete "signal_pid".
1358 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1359 (lynx_ptrace_fun): New function.
1360 (lynx_create_inferior): Adjust function prototype to reflect
1361 change on "target.h". Adjust function code to use
1362 "fork_inferior".
1363 * nto-low.c (nto_create_inferior): Adjust function prototype and
1364 code to reflect change on "target.h". Update comments.
1365 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1366 "common-terminal.h" and "environ.h".
1367 (terminal_fd): Moved to fork-child.c.
1368 (old_foreground_pgrp): Likewise.
1369 (restore_old_foreground_pgrp): Likewise.
1370 (last_status): Make it global.
1371 (last_ptid): Likewise.
1372 (our_environ): New variable.
1373 (startup_with_shell): Likewise.
1374 (program_name): Likewise.
1375 (program_argv): Rename to...
1376 (program_args): ...this.
1377 (wrapper_argv): New variable.
1378 (start_inferior): Delete function.
1379 (get_exec_wrapper): New function.
1380 (get_exec_file): Likewise.
1381 (get_environ): Likewise.
1382 (prefork_hook): Likewise.
1383 (post_fork_inferior): Likewise.
1384 (postfork_hook): Likewise.
1385 (postfork_child_hook): Likewise.
1386 (handle_v_run): Update code to deal with arguments coming from the
1387 remote host. Update calls from "start_inferior" to
1388 "create_inferior".
1389 (captured_main): Likewise. Initialize environment variable. Call
1390 "have_job_control".
1391 * server.h (post_fork_inferior): New prototype.
1392 (get_environ): Likewise.
1393 (last_status): Declare.
1394 (last_ptid): Likewise.
1395 (signal_pid): Likewise.
1396 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1397 (spu_ptrace_fun): New function.
1398 (spu_create_inferior): Adjust function prototype to reflect change
1399 on "target.h". Adjust function code to use "fork_inferior".
1400 * target.c (target_terminal_init): New function.
1401 (target_terminal_inferior): Likewise.
1402 (target_terminal_ours): Likewise.
1403 * target.h: Include <vector>.
1404 (struct target_ops) <create_inferior>: Update prototype.
1405 (create_inferior): Update macro.
1406 * utils.c (gdb_flush_out_err): New function.
1407 * win32-low.c (win32_create_inferior): Adjust function prototype
1408 and code to reflect change on "target.h".
1409
043a4934
SDJ
14102017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1411
1412 * inferiors.c (switch_to_thread): New function.
1413
15652511
SDJ
14142017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1415
1416 * Makefile.in (SFILE): Add "common/job-control.c".
1417 (OBS): Add "job-control.o".
1418
21ea5acd
SDJ
14192017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1420
1421 * Makefile: Remove "@host_makefile_frag@".
1422
e13cb306
PA
14232017-05-05 Pedro Alves <palves@redhat.com>
1424
1425 * configure: Regenerate.
1426
c94fee56
SDJ
14272017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1428
1429 * configure: Regenerate.
1430
a0ff9e1a
SM
14312017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1432
1433 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1434 software_single_step change of return type to
1435 std::vector<CORE_ADDR>.
1436 * linux-low.c (install_software_single_step_breakpoints):
1437 Likewise.
1438 * linux-low.h (install_software_single_step_breakpoints):
1439 Likewise.
1440
be628ab8
SDJ
14412017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1442
1443 * remote-utils.c: Include "gdb_termios.h" instead of
1444 "terminal.h".
1445 * terminal.h: Delete file.
1446
7c5ded6a
SDJ
14472017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1448
1449 * server.c: Include <vector>.
1450 <program_argv, wrapper_argv>: Convert to std::vector.
1451 (start_inferior): Rewrite function to use C++.
1452 (handle_v_run): Likewise. Update code that calculates the argv
1453 based on the vRun packet; use C++.
1454 (captured_main): Likewise.
1455
436252de
SM
14562017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1457
1458 * server.c (handle_v_cont): Initialize thread_resume::thread
1459 with null_ptid.
1460
9bf2a700
PA
14612017-04-05 Pedro Alves <palves@redhat.com>
1462
1463 * configure: Regenerate.
1464
a121b7c1
PA
14652017-04-05 Pedro Alves <palves@redhat.com>
1466
1467 * gdbreplay.c (sync_error): Constify.
1468 * linux-x86-low.c (push_opcode): Constify.
1469
21c8a587
PA
14702017-04-05 Pedro Alves <palves@redhat.com>
1471
1472 * win32-low.c (get_child_debug_event)
1473 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1474 Report TARGET_WAITKIND_SPURIOUS instead.
1475
fb32b4f7
PA
14762017-04-05 Pedro Alves <palves@redhat.com>
1477
1478 * remote-utils.c (remote_prepare, remote_open): Constify.
1479 * remote-utils.h (remote_prepare, remote_open): Constify.
1480 * server.c (captured_main): Constify 'port' handling.
1481
65dd1e59
SM
14822017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1483
1484 * Makefile.in (clean): Clear .deps.
1485
8fa5b777
SM
14862017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1487
1488 * .gitignore: Remove generated files, replace with wildcard.
1489 * (clean): Replace removal of generated files with wildcard.
1490 (version.c): Replace with...
1491 (version-generated.c): ...this.
1492 (xml-builtin.c): Replace with...
1493 (xml-builtin-generated.c): ...this.
1494 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1495 (%.c: *regformats*): Replace with...
1496 (%-generated.c: *regformats*): ...this.
1497
a12e714b
MF
14982017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1499
1500 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1501 (xtensa_fill_gregset): Call collect_register_by_name for
1502 threadptr register.
1503 (xtensa_store_gregset): Call supply_register_by_name for
1504 threadptr register.
1505
1a09b50a
MF
15062017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1507
1508 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1509 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1510 (xtensa_store_gregset): Call supply_register for all registers in
1511 a0_regnum..a0_regnum + C0_NREGS range.
1512
1a01e7c6
SM
15132017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1514
1515 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1516 (ax-ipa.o: ax.c): Remove.
1517 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1518 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1519 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1520 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1521 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1522
36bc18a8
SM
15232017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1524
1525 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1526 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1527 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1528 (errors-ipa.o: ../common/errors.c): Remove.
1529 (format-ipa.o: ../common/format.c): Remove.
1530 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1531
a8ebe3d5
SM
15322017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1533
1534 * Makefile.in (%-ipa.o: %.c): New rule.
1535 (tracepoint-ipa.o: tracepoint.c): Remove.
1536 (utils-ipa.o: utils.c): Remove.
1537 (remote-utils-ipa.o: remote-utils.c): Remove.
1538 (regcache-ipa.o: regcache.c): Remove.
1539 (i386-linux-ipa.o: i386-linux.c): Remove.
1540 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1541 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1542 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1543 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1544 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1545 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1546 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1547 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1548 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1549 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1550 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1551 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1552 (aarch64-ipa.o: aarch64.c): Remove.
1553 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1554 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1555 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1556 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1557 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1558 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1559 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1560 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1561 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1562 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1563 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1564 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1565 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1566 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1567 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1568 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1569 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1570 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1571 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1572 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1573 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1574 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1575 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1576 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1577 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1578 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1579 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1580 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1581 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1582 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1583 (tdesc-ipa.o: tdesc.c): Remove.
1584 (x32-linux-ipa.o: x32-linux.c): Remove.
1585 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1586 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1587
50cfacb7
SM
15882017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1589
1590 * Makefile.in (%.o: ../arch/%.c): New rule.
1591 (arm.o: ../arch/arm.c): Remove.
1592 (arm-linux.o: ../arch/arm-linux.c): Remove.
1593 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1594 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1595
c5a22423
SM
15962017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1597
1598 * Makefile.in (%.o: ../nat/%.c): New rule.
1599 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1600 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1601 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1602 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1603 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1604 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1605 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1606 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1607 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1608 (linux-personality.o: ../nat/linux-personality.c): Remove.
1609 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1610 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1611 (x86-linux.o: ../nat/x86-linux.c): Remove.
1612 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1613 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1614
6bda016b
SM
16152017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1616
1617 * Makefile.in (%.o: ../common/%.c): New rule.
1618 (signals.o: ../common/signals.c): Remove.
1619 (print-utils.o: ../common/print-utils.c): Remove.
1620 (rsp-low.o: ../common/rsp-low.c): Remove.
1621 (common-utils.o: ../common/common-utils.c): Remove.
1622 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1623 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1624 (vec.o: ../common/vec.c): Remove.
1625 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1626 (xml-utils.o: ../common/xml-utils.c): Remove.
1627 (ptid.o: ../common/ptid.c): Remove.
1628 (buffer.o: ../common/buffer.c): Remove.
1629 (format.o: ../common/format.c): Remove.
1630 (filestuff.o: ../common/filestuff.c): Remove.
1631 (agent.o: ../common/agent.c): Remove.
1632 (errors.o: ../common/errors.c): Remove.
1633 (environ.o: ../common/environ.c): Remove.
1634 (common-debug.o: ../common/common-debug.c): Remove.
1635 (cleanups.o: ../common/cleanups.c): Remove.
1636 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1637 (fileio.o: ../common/fileio.c): Remove.
1638 (common-regcache.o: ../common/common-regcache.c): Remove.
1639 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1640 (new-op.o: ../common/new-op.c): Remove.
1641 (btrace-common.o: ../common/btrace-common.c): Remove.
1642
21122961
SM
16432017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1644
1645 * Makefile.in (%.o: ../target/%.c): New rule.
1646 (waitstatus.o: ../target/waitstatus.c): Remove.
1647
c362e621
SM
16482017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1649
1650 * Makefile.in
1651 (%.c: ../regformats/%.dat,
1652 (%.c: ../regformats/arm/%.dat,
1653 (%.c: ../regformats/i386/%.dat,
1654 (%.c: ../regformats/rs6000/%.dat): New rules.
1655 (aarch64.c): Remove.
1656 (reg-arm.c): Remove.
1657 (arm-with-iwmmxt.c): Remove.
1658 (arm-with-vfpv2.c): Remove.
1659 (arm-with-vfpv3.c): Remove.
1660 (arm-with-neon.c): Remove.
1661 (reg-bfin.c): Remove.
1662 (reg-cris.c): Remove.
1663 (reg-crisv32.c): Remove.
1664 (i386.c): Remove.
1665 (i386-linux.c): Remove.
1666 (i386-avx.c): Remove.
1667 (i386-avx-linux.c): Remove.
1668 (i386-avx-avx512.c): Remove.
1669 (i386-avx-avx512-linux.c): Remove.
1670 (i386-mpx.c): Remove.
1671 (i386-mpx-linux.c): Remove.
1672 (i386-avx-mpx-avx512-pku.c): Remove.
1673 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1674 (i386-avx-mpx.c): Remove.
1675 (i386-avx-mpx-linux.c): Remove.
1676 (i386-mmx.c): Remove.
1677 (i386-mmx-linux.c): Remove.
1678 (reg-ia64.c): Remove.
1679 (reg-m32r.c): Remove.
1680 (reg-m68k.c): Remove.
1681 (reg-cf.c): Remove.
1682 (mips-linux.c): Remove.
1683 (mips-dsp-linux.c): Remove.
1684 (mips64-linux.c): Remove.
1685 (mips64-dsp-linux.c): Remove.
1686 (nios2-linux.c): Remove.
1687 (powerpc-32.c): Remove.
1688 (powerpc-32l.c): Remove.
1689 (powerpc-altivec32l.c): Remove.
1690 (powerpc-cell32l.c): Remove.
1691 (powerpc-vsx32l.c): Remove.
1692 (powerpc-isa205-32l.c): Remove.
1693 (powerpc-isa205-altivec32l.c): Remove.
1694 (powerpc-isa205-vsx32l.c): Remove.
1695 (powerpc-e500l.c): Remove.
1696 (powerpc-64l.c): Remove.
1697 (powerpc-altivec64l.c): Remove.
1698 (powerpc-cell64l.c): Remove.
1699 (powerpc-vsx64l.c): Remove.
1700 (powerpc-isa205-64l.c): Remove.
1701 (powerpc-isa205-altivec64l.c): Remove.
1702 (powerpc-isa205-vsx64l.c): Remove.
1703 (s390-linux32.c): Remove.
1704 (s390-linux32v1.c): Remove.
1705 (s390-linux32v2.c): Remove.
1706 (s390-linux64.c): Remove.
1707 (s390-linux64v1.c): Remove.
1708 (s390-linux64v2.c): Remove.
1709 (s390-te-linux64.c): Remove.
1710 (s390-vx-linux64.c): Remove.
1711 (s390-tevx-linux64.c): Remove.
1712 (s390x-linux64.c): Remove.
1713 (s390x-linux64v1.c): Remove.
1714 (s390x-linux64v2.c): Remove.
1715 (s390x-te-linux64.c): Remove.
1716 (s390x-vx-linux64.c): Remove.
1717 (s390x-tevx-linux64.c): Remove.
1718 (tic6x-c64xp-linux.c): Remove.
1719 (tic6x-c64x-linux.c): Remove.
1720 (tic6x-c62x-linux.c): Remove.
1721 (reg-sh.c): Remove.
1722 (reg-sparc64.c): Remove.
1723 (reg-spu.c): Remove.
1724 (amd64.c): Remove.
1725 (amd64-linux.c): Remove.
1726 (amd64-avx.c): Remove.
1727 (amd64-avx-linux.c): Remove.
1728 (amd64-avx-avx512.c): Remove.
1729 (amd64-avx-avx512-linux.c): Remove.
1730 (amd64-mpx.c): Remove.
1731 (amd64-mpx-linux.c): Remove.
1732 (amd64-avx-mpx-avx512-pku.c): Remove.
1733 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1734 (amd64-avx-mpx.c): Remove.
1735 (amd64-avx-mpx-linux.c): Remove.
1736 (x32.c): Remove.
1737 (x32-linux.c): Remove.
1738 (x32-avx.c): Remove.
1739 (x32-avx-linux.c): Remove.
1740 (x32-avx-avx512.c): Remove.
1741 (x32-avx-avx512-linux.c): Remove.
1742 (reg-xtensa.c): Remove.
1743 (reg-tilegx.c): Remove.
1744 (reg-tilegx32.c): Remove.
1745
1672e0d9
SDJ
17462017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1747
1748 * Makefile.in (SFILES): Add "common/environ.c".
1749 (OBJS): Add "common/environ.h".
1750
239b6d10
WT
17512017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1752
1753 * configure.ac: Check if the fs_base and gs_base members of
1754 `struct user_regs_struct' exist.
1755 * config.in: Regenerated.
1756 * configure: Likewise.
1757
694b382c
AT
17582017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1759
1760 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1761 target_read_memory.
1762 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1763 (get_next_pcs_syscall_next_pc): Likewise.
1764
7dc53023
LM
17652016-12-23 Luis Machado <lgustavo@codesourcery.com>
1766
1767 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1768 * nto-x86-low.c: Likewise.
1769
ad02e4fe
SM
17702016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1771
1772 * Makefile.in: Include disable-implicit-rules.mk.
1773
dcb07cfa
PA
17742016-11-23 Pedro Alves <palves@redhat.com>
1775
1776 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1777 (debug_vprintf): Use std::chrono::steady_clock instead of
1778 gettimeofday. Use '.' instead of ':'.
1779 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1780 (get_timestamp): Use std::chrono::steady_clock instead of
1781 gettimeofday.
1782
8629c02c
SM
17832016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1784
1785 * Makefile.in: Fix whitespace formatting.
1786
b593ecca
SM
17872016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1788
1789 * Makefile.in (SFILES, OBS): Flatten list and order
1790 alphabetically.
1791
9986ba08
PA
17922016-11-23 Pedro Alves <palves@redhat.com>
1793
1794 * event-loop.c (handle_file_event): Use warning.
1795 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1796 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1797 Use warning.
1798
4eefa7bc
PA
17992016-11-23 Pedro Alves <palves@redhat.com>
1800
1801 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1802 output.
1803 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1804 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1805 debug_printf and debug_flush for debug output.
1806 * server.c (handle_general_set): Likewise.
1807 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1808 output.
1809
5443506e
SM
18102016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1811
1812 * Makefile.in (.c.o): Replace rule with ...
1813 (%.o: %.c): ... this one.
1814
3b165252
SM
18152016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1816
1817 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1818 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1819 make.
1820 * configure.ac: Remove checks for the make program.
1821 * configure: Re-generate.
1822
0bcda685
PA
18232016-10-28 Pedro Alves <palves@redhat.com>
1824
1825 * Makefile.in (CXX_DIALECT): Get from configure.
1826 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1827 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1828 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1829 * config.in: Regenerate.
1830 * configure: Regenerate.
1831
c3805894
YQ
18322016-10-27 Yao Qi <yao.qi@linaro.org>
1833
1834 * linux-low.c (linux_supports_range_stepping): Return true if
1835 can_software_single_step return true.
1836
89342618
YQ
18372016-10-27 Yao Qi <yao.qi@linaro.org>
1838
1839 * inferiors.c (find_inferior_in_random): New function.
1840 * inferiors.h (find_inferior_in_random): Declare.
1841 * linux-low.c (linux_wait_for_event_filtered): Call
1842 find_inferior_in_random instead of find_inferior.
1843
e3652c84
YQ
18442016-10-27 Yao Qi <yao.qi@linaro.org>
1845
1846 * linux-low.c (linux_wait_1): If single-step breakpoints are
1847 inserted, remove them.
1848
5a04c4cf
PA
18492016-10-26 Pedro Alves <palves@redhat.com>
1850
1851 * linux-low.c (handle_extended_wait): Link parent/child fork
1852 threads.
1853 (linux_wait_1): Unlink them.
1854 (linux_set_resume_request): Ignore resume requests for
1855 already-resumed and unhandled fork child threads.
1856 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1857 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1858 New functions.
1859 (handle_v_requests) <vCont>: Don't call require_running.
1860 * server.h (in_queued_stop_replies): New declaration.
1861
cb93dc7f
YQ
18622016-10-24 Yao Qi <yao.qi@linaro.org>
1863
1864 PR server/20733
1865 * linux-aarch64-low.c (append_insns): Cast the return value to
1866 'uint32_t *'.
1867
a1078bea
YQ
18682016-10-10 Yao Qi <yao.qi@linaro.org>
1869
1870 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1871
1fb77080
SDJ
18722016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1873
1874 * target.c (target_supports_multi_process): New function, moved
1875 from...
1876 * target.h (target_supports_multi_process): ... here. Remove
1877 macro.
1878
39b5a3b9
TT
18792016-10-05 Tom Tromey <tom@tromey.com>
1880
1881 PR remote/20655:
1882 * tracepoint.c (handle_tracepoint_bkpts): Check
1883 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1884
c1d0b70a
YQ
18852016-10-05 Yao Qi <yao.qi@linaro.org>
1886
1887 * configure.srv: Update the path of arm-*.xml files.
1888
0a69eedb
YQ
18892016-10-05 Terry Guo <terry.guo@arm.com>
1890 Yao Qi <yao.qi@linaro.org>
1891
1892 * Makefile.in: Adjust the path of rules.
1893 * configure.srv: Update the path of xml files.
1894 * regformats/arm-with-iwmmxt.dat: Regenerated.
1895 * regformats/arm-with-neon.dat: Likewise.
1896 * regformats/arm-with-vfpv2.dat: Likewise.
1897 * regformats/arm-with-vfpv3.dat Likewise.
1898
17e16485
YQ
18992016-09-30 Yao Qi <yao.qi@linaro.org>
1900
1901 PR gdbserver/20627
1902 * target.c (target_stop_and_wait): Don't call
1903 target_continue_no_signal, use resume_stop instead.
1904
edeeb602
YQ
19052016-09-26 Yao Qi <yao.qi@linaro.org>
1906
1907 * linux-low.c (linux_wait_1): Call debug_exit.
1908
503b1c39
PA
19092016-09-23 Pedro Alves <palves@redhat.com>
1910
1911 * Makefile.in (SFILES): Add common/new-op.c.
1912 (OBS): Add common/new-op.o.
1913 (new-op.o): New rule.
1914
74172ecf
SM
19152016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1916
1917 * .gitinore: Ignore more files.
1918
fc6cda2e
YQ
19192016-09-21 Yao Qi <yao.qi@linaro.org>
1920
1921 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1922 23.
1923
bc1e6c81
SDJ
19242016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1925
1926 * server.c (start_inferior): Call target_mourn_inferior instead of
1927 mourn_inferior; pass ptid_t argument to it.
1928 (resume): Likewise.
1929 (handle_target_event): Likewise.
1930 * target.c (target_mourn_inferior): New function.
1931 * target.h (mourn_inferior): Delete macro.
1932
0e00e962
AA
19332016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1934
1935 * linux-low.c (lwp_is_stepping): New function.
1936
1d8cb77d
CL
19372016-09-06 Carl Love <cel@us.ibm.com>
1938
1939 * server.c (start_inferior): Fixed comment, requested comment change
1940 didn't get updated correctly. Removed reference to ptrace () call as
1941 it is only true on Linux systems.
1942
7313bced
CL
19432016-09-06 Carl Love <cel@us.ibm.com>
1944
1945 * server.c (start_inferior): Do not call
1946 function target_post_create_inferior () if the
1947 inferior process has already exited.
1948
cf6de44d
PA
19492016-09-05 Pedro Alves <palves@redhat.com>
1950
1951 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1952 (COMPILE.pre, CC_LD): Use CXX directly.
1953 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1954 * acinclude.m4: Don't include build-with-cxx.m4.
1955 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1956 * configure: Regenerate.
1957
c1da6748
AT
19582016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1959
1960 PR gdb/19495
1961 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1962 call writing data to own_buf.
1963
f2b9e3df
SDJ
19642016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1965
1966 * target.c (mywait): Call target_wait instead of
1967 the_target->wait.
1968 (target_wait): New function.
1969
049a8570
SDJ
19702016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1971
1972 * server.c (start_inferior): New variable 'ptid'. Replace calls
1973 to the_target->resume by target_continue{,_no_signal}, depending
1974 on the case.
1975 * target.c (target_stop_and_wait): Call target_continue_no_signal
1976 instead of the_target->resume.
1977 (target_continue): New function.
1978
3aa5cfa0
AT
19792016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1980
1981 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1982
754653a7
AZ
19832016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1984
1985 PR server/20491
1986 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1987 ps_prochandle.
1988 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1989 * linux-arm-low.c (ps_get_thread_area): Likewise.
1990 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1991 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1992 * linux-mips-low.c (ps_get_thread_area): Likewise.
1993 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1994 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1995 * linux-x86-low.c (ps_get_thread_area): Likewise.
1996 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1997
ed036b40
PA
19982016-08-19 Pedro Alves <palves@redhat.com>
1999
2000 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2001
c8ef42ee
PA
20022016-08-19 Pedro Alves <palves@redhat.com>
2003
2004 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2005 comment. Use memcpy instead of casting through unsigned long.
2006
9c235a72
PA
20072016-08-19 Pedro Alves <palves@redhat.com>
2008
2009 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2010 allocating around 0x80000000.
2011
201506da
PA
20122016-08-19 Pedro Alves <palves@redhat.com>
2013
2014 PR gdb/20415
2015 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2016 (x32-avx512-linux-ipa.o): New rules.
2017 * configure.ac (x86_64-*-linux*): New x32 check.
2018 * configure.srv (ipa_x32_linux_regobj): New.
2019 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2020 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2021 descriptions.
2022 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2023 descriptions.
2024 * configure: Regenerate.
2025
f348d89a
PA
20262016-08-09 Pedro Alves <palves@redhat.com>
2027
2028 PR gdb/18653
2029 * Makefile.in (OBS): Add signals-state-save-restore.o.
2030 (signals-state-save-restore.o): New rule.
2031 * config.in: Regenerate.
2032 * configure: Regenerate.
2033 * linux-low.c: Include "signals-state-save-restore.h".
2034 (linux_create_inferior): Call
2035 restore_original_signals_state.
2036 * server.c: Include "dispositions-save-restore.h".
2037 (captured_main): Call save_original_signals_state.
2038
1baf5149
PA
20392016-08-05 Pedro Alves <palves@redhat.com>
2040
2041 * configure: Regenerate.
2042
fcd4a73d
YQ
20432016-08-04 Yao Qi <yao.qi@linaro.org>
2044
2045 * linux-low.c (regsets_fetch_inferior_registers): Check
2046 errno is ESRCH or not.
2047
979659d0
YQ
20482016-08-02 Yao Qi <yao.qi@linaro.org>
2049
2050 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2051 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2052 (thread_db_load_search): Update.
2053 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2054 td_ta_set_event and td_ta_event_getmsg.
2055
6598661d
PA
20562016-07-26 Pedro Alves <palves@redhat.com>
2057
2058 PR server/20414
2059 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2060 of unsigned long for 64-bit registers and use uint32_t instead of
2061 unsigned int for 32-bit registers.
2062
9cf12d57
PA
20632016-07-26 Pedro Alves <palves@redhat.com>
2064
2065 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2066 to 'ptrace'.
2067
305450ed
TT
20682016-07-21 Tom Tromey <tom@tromey.com>
2069
2070 * configure: Rebuild.
2071
2583da7c
YQ
20722016-07-21 Yao Qi <yao.qi@linaro.org>
2073
2074 * mem-break.c (find_gdb_breakpoint): Cast bp to
2075 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2076
21536b36
YQ
20772016-07-21 Yao Qi <yao.qi@linaro.org>
2078
2079 * server.c (handle_v_requests): Support s and S actions
2080 if target_supports_software_single_step return true.
2081
8901d193
YQ
20822016-07-21 Yao Qi <yao.qi@linaro.org>
2083
2084 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2085 is resume_step, call maybe_hw_step.
2086 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2087 and unstop them.
2088 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2089 breakpoints or not.
2090 (proceed_one_lwp): If resume request is resume_step, install
2091 reinsert breakpoints and call maybe_hw_step.
2092
0e9a339e
YQ
20932016-07-21 Yao Qi <yao.qi@linaro.org>
2094
2095 * linux-low.c (proceed_one_lwp): Declare.
2096 (linux_resume_one_thread): Remove local variable 'step'.
2097 Lift code enqueue signal. Call proceed_one_lwp instead of
2098 linux_resume_one_lwp.
2099
4281b351
YQ
21002016-07-21 Yao Qi <yao.qi@linaro.org>
2101
2102 * linux-low.c (linux_resume_one_thread): Call
2103 enqueue_pending_signal.
2104
984a2c04
YQ
21052016-07-21 Yao Qi <yao.qi@linaro.org>
2106
2107 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2108 * inferiors.c (do_restore_current_thread_cleanup): New function.
2109 (make_cleanup_restore_current_thread): Likewise.
2110 * linux-low.c (install_software_single_step_breakpoints): Call
2111 make_cleanup_restore_current_thread. Switch current_thread to
2112 thread.
2113
bec903c9
YQ
21142016-07-21 Yao Qi <yao.qi@linaro.org>
2115
2116 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2117 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2118 (clone_one_breakpoint): Likewise.
2119 (delete_reinsert_breakpoints): Change parameter to thread.
2120 Callers updated.
2121 (has_reinsert_breakpoints): Likewise.
2122 (uninsert_reinsert_breakpoints): Likewise.
2123 (reinsert_reinsert_breakpoints): Likewise.
2124 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2125 (delete_reinsert_breakpoints): Likewise.
2126 (reinsert_reinsert_breakpoints): Likewise.
2127 (uninsert_reinsert_breakpoints): Likewise.
2128 (has_reinsert_breakpoints): Likewise.
2129
63c40ec7
YQ
21302016-07-21 Yao Qi <yao.qi@linaro.org>
2131
2132 * inferiors.c (get_thread_process): Make parameter const.
2133 * inferiors.h (get_thread_process): Update declaration.
2134 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2135 Add new parameters child_thread and parent_thread. Callers
2136 updated.
2137 * mem-break.h (clone_all_breakpoints): Update declaration.
2138
9aa76cd0
YQ
21392016-07-21 Yao Qi <yao.qi@linaro.org>
2140
2141 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2142 <command_list, handler>: Remove.
2143 (struct gdb_breakpoint): New.
2144 (struct other_breakpoint): New.
2145 (struct reinsert_breakpoint): New.
2146 (is_gdb_breakpoint): New function.
2147 (any_persistent_commands): Update command_list if
2148 is_gdb_breakpoint returns true.
2149 (set_breakpoint): Create breakpoints according to their types.
2150 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2151 (set_gdb_breakpoint_1): Likewise.
2152 (set_gdb_breakpoint): Likewise.
2153 (clear_breakpoint_conditions): Change parameter type to
2154 'struct gdb_breakpoint *'.
2155 (clear_breakpoint_commands): Likewise.
2156 (clear_breakpoint_conditions_and_commands): Likewise.
2157 (add_condition_to_breakpoint): Likewise.
2158 (add_breakpoint_condition): Likewise.
2159 (add_commands_to_breakpoint): Likewise.
2160 (check_breakpoints): Check other_breakpoint.
2161 (clone_one_breakpoint): Clone breakpopint according to its type.
2162 * mem-break.h (struct gdb_breakpoint): Declare.
2163 (set_gdb_breakpoint): Update declaration.
2164 (clear_breakpoint_conditions_and_commands): Likewise.
2165 (add_breakpoint_condition): Likewise.
2166 (add_breakpoint_commands): Likewise.
2167 * server.c (process_point_options): Change parameter type to
2168 'struct gdb_breakpoint *'.
2169
811f8301
YQ
21702016-07-21 Yao Qi <yao.qi@linaro.org>
2171
2172 * mem-break.c (set_breakpoint_at): Rename it to ...
2173 (set_breakpoint_type_at): ... it.
2174 (set_breakpoint_at): Call set_breakpoint_type_at.
2175 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2176 * mem-break.h (set_breakpoint_at): Update comments.
2177
b1c51e36
CLT
21782016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2179
2180 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2181 to buf parameter.
2182 (nios2_store_gregset): Likewise.
2183
ced2dffb
PA
21842016-07-01 Pedro Alves <palves@redhat.com>
2185 Antoine Tremblay <antoine.tremblay@ericsson.com>
2186
2187 * linux-low.c: Change interface to take the target lwp_info
2188 pointer directly and return void. Handle detaching from a zombie
2189 thread.
2190 (linux_detach_lwp_callback): New function.
2191 (linux_detach): Detach from the leader thread after detaching from
2192 the clone threads.
2193
2ac09a5b
YQ
21942016-06-28 Yao Qi <yao.qi@linaro.org>
2195
2196 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2197 for variable new_offset.
2198 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2199 (aarch64_ftrace_insn_reloc_cb): Likewise.
2200 (aarch64_ftrace_insn_reloc_tb): Likewise.
2201 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2202 PRIx64 instead of PRIx32.
2203
79e7fd4f
YQ
22042016-06-28 Yao Qi <yao.qi@linaro.org>
2205
2206 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2207 (the_low_target): Install arm_get_syscall_trapinfo.
2208
061fc021
YQ
22092016-06-28 Yao Qi <yao.qi@linaro.org>
2210
2211 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2212 function.
2213 (the_low_target): Install aarch64_get_syscall_trapinfo.
2214
4cc32bec
YQ
22152016-06-28 Yao Qi <yao.qi@linaro.org>
2216
2217 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2218 Callers updated.
2219 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2220 Remove parameter sysno.
2221 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2222 sysret.
2223
782c1122
AA
22242016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2225
2226 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2227 (s390_emit_ne_goto): Likewise.
2228 (s390_emit_lt_goto): Likewise.
2229 (s390_emit_le_goto): Likewise.
2230 (s390_emit_gt_goto): Likewise.
2231 (s390_emit_ge_goto): Likewise.
2232 (s390x_emit_eq_goto): Likewise.
2233 (s390x_emit_ne_goto): Likewise.
2234 (s390x_emit_lt_goto): Likewise.
2235 (s390x_emit_le_goto): Likewise.
2236 (s390x_emit_gt_goto): Likewise.
2237 (s390x_emit_ge_goto): Likewise.
2238 (s390_emit_ops_impl): Mark variable static.
2239 (s390x_emit_ops): Likewise.
2240
2e7b624b
YQ
22412016-06-17 Yao Qi <yao.qi@linaro.org>
2242
2243 * linux-low.c (handle_extended_wait): Call
2244 uninsert_reinsert_breakpoints for the parent process. Remove
2245 reinsert breakpoints from the child process. Reinsert them to
2246 the parent process when vfork is done.
2247 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2248 (reinsert_reinsert_breakpoints): New function.
2249 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2250 (reinsert_reinsert_breakpoints): Declare.
2251
8a81c5d7
YQ
22522016-06-17 Yao Qi <yao.qi@linaro.org>
2253
2254 * linux-low.c (handle_extended_wait): If the parent is doing
2255 step-over, remove the reinsert breakpoints from the forked child.
2256
f50bf8e5
YQ
22572016-06-17 Yao Qi <yao.qi@linaro.org>
2258
2259 * linux-low.c (unsuspend_all_lwps): Declare.
2260 (linux_low_filter_event): If thread exited, call finish_step_over.
2261 If step-over is finished, unsuspend other threads.
2262
8376a3cb
YQ
22632016-06-17 Yao Qi <yao.qi@linaro.org>
2264
2265 * linux-low.c (linux_resume_one_lwp_throw): Assert
2266 has_reinsert_breakpoints returns false.
2267 * mem-break.c (delete_disabled_breakpoints): Assert
2268 bp type isn't reinsert_breakpoint.
2269
f79b145d
YQ
22702016-06-17 Yao Qi <yao.qi@linaro.org>
2271
2272 * linux-low.c (maybe_hw_step): New function.
2273 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2274 (finish_step_over): Switch current_thread to lwp temporarily,
2275 and assert has_reinsert_breakpoints returns true.
2276 (proceed_one_lwp): Call maybe_hw_step.
2277 * mem-break.c (has_reinsert_breakpoints): New function.
2278 * mem-break.h (has_reinsert_breakpoints): Declare.
2279
0ae534d2
JT
22802016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2281
2282 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2283
fcdad592
YQ
22842016-05-17 Yao Qi <yao.qi@linaro.org>
2285
2286 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2287 instead of find_inferior.
2288
9e784964
YQ
22892016-05-05 Yao Qi <yao.qi@linaro.org>
2290
2291 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2292 Initialize res to zero.
2293
cf2ebb6e
YQ
22942016-05-05 Yao Qi <yao.qi@linaro.org>
2295
2296 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2297 to uint32_t.
2298
c1aebf87
UW
22992016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2300
2301 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2302 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2303 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2304
35fd2deb 23052016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 2306 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
2307
2308 * tracepoint.c (write_inferior_int8): New function.
2309 (cmd_qtenable_disable): Write enable flag using
2310 write_inferior_int8.
2311
484b3c32
YQ
23122016-04-25 Yao Qi <yao.qi@linaro.org>
2313
2314 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2315 (need_step_over_p): Return zero if the LWP has pending signals
2316 can be delivered on software single step target.
2317
85ba7d86
YQ
23182016-04-25 Yao Qi <yao.qi@linaro.org>
2319
2320 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2321 return instead of error.
2322
3539aa13
YQ
23232016-04-22 Yao Qi <yao.qi@linaro.org>
2324
2325 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2326 to 23.
2327
5b061e98
YQ
23282016-04-22 Yao Qi <yao.qi@linaro.org>
2329
2330 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2331 signal when stepping over breakpoint with software single
2332 step.
2333
3451269c
PA
23342016-04-21 Pedro Alves <palves@redhat.com>
2335
2336 * linux-s390-low.c (s390_collect_ptrace_register)
2337 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2338 add casts.
2339 (s390_check_regset): Use void * instead of gdb_byte *.
2340
a2358508
PA
23412016-04-20 Pedro Alves <palves@redhat.com>
2342
2343 * configure: Renegerate.
2344
6885166d
YQ
23452016-04-20 Yao Qi <yao.qi@linaro.org>
2346
2347 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2348 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2349 number 16.
2350 (arm_store_gregset): Likewise.
2351
2b863f51
WT
23522016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2353
2354 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2355 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2356 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2357 (amd64-avx-mpx-linux.c): New rules.
2358 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2359 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2360 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2361 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2362 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2363 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2364 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2365 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2366 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2367 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2368 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2369 * linux-x86-low.c (x86_linux_read_description): Add case for
2370 X86_XSTATE_AVX_MPX_MASK.
2371 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2372 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2373 init_registers_i386_avx_mpx_linux.
2374 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2375 (initialize_low_tracepoint): Call
2376 init_registers_i386_avx_mpx_linux.
2377 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2378 (initialize_low_tracepoint): Call
2379 init_registers_amd64_avx_mpx_linux.
2380 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2381 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2382 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2383 declarations.
2384
9b30624b
PA
23852016-04-18 Pedro Alves <palves@redhat.com>
2386
2387 * configure: Regenerate.
2388
45e3745e
AT
23892016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2390
2391 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2392 (aarch64_emit_sub): Likewise.
2393
2afc13ff
PA
23942016-04-12 Pedro Alves <palves@redhat.com>
2395
2396 * utils.c (prepare_to_throw_exception): Delete.
2397
6e774b13
SM
23982016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2399
2400 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2401
4dca19f8
MK
24022016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2403
2404 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2405
d0a9981f
MK
24062016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2407
2408 * linux-aarch64-ipa.c: Add <elf.h> include.
2409 * linux-ppc-ipa.c: Add <elf.h> include.
2410 * linux-s390-ipa.c: Add <elf.h> include.
2411
252db07e
MK
24122016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2413
2414 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2415 (get_raw_reg_ptr): Likewise.
2416 (get_trace_state_variable_value_ptr): Likewise.
2417 (set_trace_state_variable_value_ptr): Likewise.
2418 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2419 char *.
2420
14e2b6d9
MK
24212016-03-31 Wei-cheng Wang <cole945@gmail.com>
2422 Marcin Kościelnicki <koriakin@0x04.net>
2423
2424 PR/17221
2425 * linux-ppc-low.c (emit_insns): New function.
2426 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2427 (ppc_emit_prologue): New function.
2428 (ppc_emit_epilogue): New function.
2429 (ppc_emit_add): New function.
2430 (ppc_emit_sub): New function.
2431 (ppc_emit_mul): New function.
2432 (ppc_emit_lsh): New function.
2433 (ppc_emit_rsh_signed): New function.
2434 (ppc_emit_rsh_unsigned): New function.
2435 (ppc_emit_ext): New function.
2436 (ppc_emit_zero_ext): New function.
2437 (ppc_emit_log_not): New function.
2438 (ppc_emit_bit_and): New function.
2439 (ppc_emit_bit_or): New function.
2440 (ppc_emit_bit_xor): New function.
2441 (ppc_emit_bit_not): New function.
2442 (ppc_emit_equal): New function.
2443 (ppc_emit_less_signed): New function.
2444 (ppc_emit_less_unsigned): New function.
2445 (ppc_emit_ref): New function.
2446 (ppc_emit_const): New function.
2447 (ppc_emit_reg): New function.
2448 (ppc_emit_pop): New function.
2449 (ppc_emit_stack_flush): New function.
2450 (ppc_emit_swap): New function.
2451 (ppc_emit_stack_adjust): New function.
2452 (ppc_emit_call): New function.
2453 (ppc_emit_int_call_1): New function.
2454 (ppc_emit_void_call_2): New function.
2455 (ppc_emit_if_goto): New function.
2456 (ppc_emit_goto): New function.
2457 (ppc_emit_eq_goto): New function.
2458 (ppc_emit_ne_goto): New function.
2459 (ppc_emit_lt_goto): New function.
2460 (ppc_emit_le_goto): New function.
2461 (ppc_emit_gt_goto): New function.
2462 (ppc_emit_ge_goto): New function.
2463 (ppc_write_goto_address): New function.
2464 (ppc_emit_ops_impl): New static variable.
2465 (ppc64v1_emit_prologue): New function.
2466 (ppc64v2_emit_prologue): New function.
2467 (ppc64_emit_epilogue): New function.
2468 (ppc64_emit_add): New function.
2469 (ppc64_emit_sub): New function.
2470 (ppc64_emit_mul): New function.
2471 (ppc64_emit_lsh): New function.
2472 (ppc64_emit_rsh_signed): New function.
2473 (ppc64_emit_rsh_unsigned): New function.
2474 (ppc64_emit_ext): New function.
2475 (ppc64_emit_zero_ext): New function.
2476 (ppc64_emit_log_not): New function.
2477 (ppc64_emit_bit_and): New function.
2478 (ppc64_emit_bit_or): New function.
2479 (ppc64_emit_bit_xor): New function.
2480 (ppc64_emit_bit_not): New function.
2481 (ppc64_emit_equal): New function.
2482 (ppc64_emit_less_signed): New function.
2483 (ppc64_emit_less_unsigned): New function.
2484 (ppc64_emit_ref): New function.
2485 (ppc64_emit_const): New function.
2486 (ppc64v1_emit_reg): New function.
2487 (ppc64v2_emit_reg): New function.
2488 (ppc64_emit_pop): New function.
2489 (ppc64_emit_stack_flush): New function.
2490 (ppc64_emit_swap): New function.
2491 (ppc64v1_emit_call): New function.
2492 (ppc64v2_emit_call): New function.
2493 (ppc64v1_emit_int_call_1): New function.
2494 (ppc64v2_emit_int_call_1): New function.
2495 (ppc64v1_emit_void_call_2): New function.
2496 (ppc64v2_emit_void_call_2): New function.
2497 (ppc64_emit_if_goto): New function.
2498 (ppc64_emit_eq_goto): New function.
2499 (ppc64_emit_ne_goto): New function.
2500 (ppc64_emit_lt_goto): New function.
2501 (ppc64_emit_le_goto): New function.
2502 (ppc64_emit_gt_goto): New function.
2503 (ppc64_emit_ge_goto): New function.
2504 (ppc64v1_emit_ops_impl): New static variable.
2505 (ppc64v2_emit_ops_impl): New static variable.
2506 (ppc_emit_ops): New function.
2507 (linux_low_target): Wire in ppc_emit_ops.
2508
a2174ba4
MK
25092016-03-31 Wei-cheng Wang <cole945@gmail.com>
2510 Marcin Kościelnicki <koriakin@0x04.net>
2511
2512 PR/17221
2513 * Makefile.in: Add powerpc-*-ipa.o
2514 * configure.srv: Add ipa_obj for powerpc*-linux.
2515 * linux-ppc-ipa.c: New file.
2516 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2517 includes.
2518 (PPC_FIELD): New macro.
2519 (PPC_SEXT): New macro.
2520 (PPC_OP6): New macro.
2521 (PPC_BO): New macro.
2522 (PPC_LI): New macro.
2523 (PPC_BD): New macro.
2524 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2525 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2526 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2527 (ppc_get_thread_area): New function.
2528 (is_elfv2_inferior): New function.
2529 (gen_ds_form): New function.
2530 (GEN_STD): New macro.
2531 (GEN_STDU): New macro.
2532 (GEN_LD): New macro.
2533 (GEN_LDU): New macro.
2534 (gen_d_form): New function.
2535 (GEN_ADDI): New macro.
2536 (GEN_ADDIS): New macro.
2537 (GEN_LI): New macro.
2538 (GEN_LIS): New macro.
2539 (GEN_ORI): New macro.
2540 (GEN_ORIS): New macro.
2541 (GEN_LWZ): New macro.
2542 (GEN_STW): New macro.
2543 (GEN_STWU): New macro.
2544 (gen_xfx_form): New function.
2545 (GEN_MFSPR): New macro.
2546 (GEN_MTSPR): New macro.
2547 (GEN_MFCR): New macro.
2548 (GEN_MTCR): New macro.
2549 (GEN_SYNC): New macro.
2550 (GEN_LWSYNC): New macro.
2551 (gen_x_form): New function.
2552 (GEN_OR): New macro.
2553 (GEN_MR): New macro.
2554 (GEN_LWARX): New macro.
2555 (GEN_STWCX): New macro.
2556 (GEN_CMPW): New macro.
2557 (gen_md_form): New function.
2558 (GEN_RLDICL): New macro.
2559 (GEN_RLDICR): New macro.
2560 (gen_i_form): New function.
2561 (GEN_B): New macro.
2562 (GEN_BL): New macro.
2563 (gen_b_form): New function.
2564 (GEN_BNE): New macro.
2565 (GEN_LOAD): New macro.
2566 (GEN_STORE): New macro.
2567 (gen_limm): New function.
2568 (gen_atomic_xchg): New function.
2569 (gen_call): New function.
2570 (ppc_relocate_instruction): New function.
2571 (ppc_install_fast_tracepoint_jump_pad): New function.
2572 (ppc_get_min_fast_tracepoint_insn_len): New function.
2573 (ppc_get_ipa_tdesc_idx): New function.
2574 (the_low_target): Wire in the new functions.
2575 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2576 tdescs.
2577 * linux-ppc-tdesc.h: New file.
2578
a13c4696
MK
25792016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2580
2581 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2582 (alloc_jump_pad_buffer): New function.
2583 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2584 (alloc_jump_pad_buffer): New function.
2585 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2586 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2587 (alloc_jump_pad_buffer): New function.
2588 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2589 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2590 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2591 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2592
1cda1512
MK
25932016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2594
2595 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2596 * linux-amd64-ipa.c: Likewise.
2597 * linux-i386-ipa.c: Likewise.
2598 * linux-s390-ipa.c: Likewise.
2599 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2600 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2601 set_trace_state_variable_value_ptr.
2602 (struct ipa_sym_addresses): Likewise.
2603 (symbol_list): Likewise.
2604 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2605 accessing gdb_collect directly.
2606 (gdb_collect_ptr_type): New typedef.
2607 (get_raw_reg_ptr_type): New typedef.
2608 (get_trace_state_variable_value_ptr_type): New typedef.
2609 (set_trace_state_variable_value_ptr_type): New typedef.
2610 (gdb_collect_ptr): New global.
2611 (get_raw_reg_ptr): New global.
2612 (get_trace_state_variable_value_ptr): New global.
2613 (set_trace_state_variable_value_ptr): New global.
2614 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2615 accessing get_raw_reg directly.
2616 (get_get_tsv_func_addr): Likewise for
2617 get_trace_state_variable_value_ptr.
2618 (get_set_tsv_func_addr): Likewise for
2619 set_trace_state_variable_value_ptr.
2620 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2621
72fb5488
SM
26222016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2623
2624 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2625
28170b88
MK
26262016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2627
2628 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2629 packets.
2630 (relocate_instruction): Remove own_buf.
2631 * server.c (own_buf): Make global.
2632 (handle_v_requests): Make global.
2633 * server.h (own_buf): New declaration.
2634 (handle_v_requests): New prototype.
2635
f39e8743
MK
26362016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2637
2638 PR 18377
2639 * linux-s390-low.c (add_insns): New function.
2640 (s390_emit_prologue): New function.
2641 (s390_emit_epilogue): New function.
2642 (s390_emit_add): New function.
2643 (s390_emit_sub): New function.
2644 (s390_emit_mul): New function.
2645 (s390_emit_lsh): New function.
2646 (s390_emit_rsh_signed): New function.
2647 (s390_emit_rsh_unsigned): New function.
2648 (s390_emit_ext): New function.
2649 (s390_emit_log_not): New function.
2650 (s390_emit_bit_and): New function.
2651 (s390_emit_bit_or): New function.
2652 (s390_emit_bit_xor): New function.
2653 (s390_emit_bit_not): New function.
2654 (s390_emit_equal): New function.
2655 (s390_emit_less_signed): New function.
2656 (s390_emit_less_unsigned): New function.
2657 (s390_emit_ref): New function.
2658 (s390_emit_if_goto): New function.
2659 (s390_emit_goto): New function.
2660 (s390_write_goto_address): New function.
2661 (s390_emit_litpool): New function.
2662 (s390_emit_const): New function.
2663 (s390_emit_call): New function.
2664 (s390_emit_reg): New function.
2665 (s390_emit_pop): New function.
2666 (s390_emit_stack_flush): New function.
2667 (s390_emit_zero_ext): New function.
2668 (s390_emit_swap): New function.
2669 (s390_emit_stack_adjust): New function.
2670 (s390_emit_set_r2): New function.
2671 (s390_emit_int_call_1): New function.
2672 (s390_emit_void_call_2): New function.
2673 (s390_emit_eq_goto): New function.
2674 (s390_emit_ne_goto): New function.
2675 (s390_emit_lt_goto): New function.
2676 (s390_emit_le_goto): New function.
2677 (s390_emit_gt_goto): New function.
2678 (s390_emit_ge_goto): New function.
2679 (s390x_emit_prologue): New function.
2680 (s390x_emit_epilogue): New function.
2681 (s390x_emit_add): New function.
2682 (s390x_emit_sub): New function.
2683 (s390x_emit_mul): New function.
2684 (s390x_emit_lsh): New function.
2685 (s390x_emit_rsh_signed): New function.
2686 (s390x_emit_rsh_unsigned): New function.
2687 (s390x_emit_ext): New function.
2688 (s390x_emit_log_not): New function.
2689 (s390x_emit_bit_and): New function.
2690 (s390x_emit_bit_or): New function.
2691 (s390x_emit_bit_xor): New function.
2692 (s390x_emit_bit_not): New function.
2693 (s390x_emit_equal): New function.
2694 (s390x_emit_less_signed): New function.
2695 (s390x_emit_less_unsigned): New function.
2696 (s390x_emit_ref): New function.
2697 (s390x_emit_if_goto): New function.
2698 (s390x_emit_const): New function.
2699 (s390x_emit_call): New function.
2700 (s390x_emit_reg): New function.
2701 (s390x_emit_pop): New function.
2702 (s390x_emit_stack_flush): New function.
2703 (s390x_emit_zero_ext): New function.
2704 (s390x_emit_swap): New function.
2705 (s390x_emit_stack_adjust): New function.
2706 (s390x_emit_int_call_1): New function.
2707 (s390x_emit_void_call_2): New function.
2708 (s390x_emit_eq_goto): New function.
2709 (s390x_emit_ne_goto): New function.
2710 (s390x_emit_lt_goto): New function.
2711 (s390x_emit_le_goto): New function.
2712 (s390x_emit_gt_goto): New function.
2713 (s390x_emit_ge_goto): New function.
2714 (s390_emit_ops): New function.
2715 (struct linux_target_ops): Fill in emit_ops hook.
2716
abd9baf9
MK
27172016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2718
2719 PR 18377
2720 * Makefile.in: Add s390 IPA files.
2721 * configure.srv: Build IPA for s390.
2722 * linux-s390-ipa.c: New file.
2723 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2724 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2725 (tdesc_s390_linux32): Likewise.
2726 (init_registers_s390_linux32v1): Likewise.
2727 (tdesc_s390_linux32v1): Likewise.
2728 (init_registers_s390_linux32v2): Likewise.
2729 (tdesc_s390_linux32v2): Likewise.
2730 (init_registers_s390_linux64): Likewise.
2731 (tdesc_s390_linux64): Likewise.
2732 (init_registers_s390_linux64v1): Likewise.
2733 (tdesc_s390_linux64v1): Likewise.
2734 (init_registers_s390_linux64v2): Likewise.
2735 (tdesc_s390_linux64v2): Likewise.
2736 (init_registers_s390_te_linux64): Likewise.
2737 (tdesc_s390_te_linux64): Likewise.
2738 (init_registers_s390_vx_linux64): Likewise.
2739 (tdesc_s390_vx_linux64): Likewise.
2740 (init_registers_s390_tevx_linux64): Likewise.
2741 (tdesc_s390_tevx_linux64): Likewise.
2742 (init_registers_s390x_linux64): Likewise.
2743 (tdesc_s390x_linux64): Likewise.
2744 (init_registers_s390x_linux64v1): Likewise.
2745 (tdesc_s390x_linux64v1): Likewise.
2746 (init_registers_s390x_linux64v2): Likewise.
2747 (tdesc_s390x_linux64v2): Likewise.
2748 (init_registers_s390x_te_linux64): Likewise.
2749 (tdesc_s390x_te_linux64): Likewise.
2750 (init_registers_s390x_vx_linux64): Likewise.
2751 (tdesc_s390x_vx_linux64): Likewise.
2752 (init_registers_s390x_tevx_linux64): Likewise.
2753 (tdesc_s390x_tevx_linux64): Likewise.
2754 (have_hwcap_s390_vx): New static variable.
2755 (s390_arch_setup): Fill have_hwcap_s390_vx.
2756 (s390_get_thread_area): New function.
2757 (s390_ft_entry_gpr_esa): New const.
2758 (s390_ft_entry_gpr_zarch): New const.
2759 (s390_ft_entry_misc): New const.
2760 (s390_ft_entry_fr): New const.
2761 (s390_ft_entry_vr): New const.
2762 (s390_ft_main_31): New const.
2763 (s390_ft_main_64): New const.
2764 (s390_ft_exit_fr): New const.
2765 (s390_ft_exit_vr): New const.
2766 (s390_ft_exit_misc): New const.
2767 (s390_ft_exit_gpr_esa): New const.
2768 (s390_ft_exit_gpr_zarch): New const.
2769 (append_insns): New function.
2770 (s390_relocate_instruction): New function.
2771 (s390_install_fast_tracepoint_jump_pad): New function.
2772 (s390_get_min_fast_tracepoint_insn_len): New function.
2773 (s390_get_ipa_tdesc_idx): New function.
2774 (struct linux_target_ops): Wire in the above functions.
2775 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2776 * linux-s390-tdesc.h: New file.
2777
a4105d04
MK
27782016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2779
2780 * linux-s390-low.c (s390_supports_tracepoints): New function.
2781 (struct linux_target_ops): Fill supports_tracepoints hook.
2782
35ac8b3e
YQ
27832016-03-18 Yao Qi <yao.qi@linaro.org>
2784
2785 * linux-low.c (lwp_signal_can_be_delivered): New function.
2786 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2787
94610ec4
YQ
27882016-03-18 Yao Qi <yao.qi@linaro.org>
2789
2790 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2791 0 if signal is enqueued. Remove 'signal' from one debugging
2792 message. Move one debugging message to some lines below.
2793 Remove code setting 'signal' to 0.
2794
80aea927
YQ
27952016-03-18 Yao Qi <yao.qi@linaro.org>
2796
2797 * linux-low.c (linux_low_filter_event): Remove redundant
2798 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2799
b04fd3be
MK
28002016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2801
2802 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2803 (struct linux_target_ops): Wire in the above.
2804
c40c8d4b
YQ
28052016-03-03 Yao Qi <yao.qi@linaro.org>
2806
2807 * linux-low.c: Update comments to start_step_over.
2808
0f8288ae
YQ
28092016-03-03 Yao Qi <yao.qi@linaro.org>
2810
2811 PR server/19736
2812 * linux-low.c (handle_extended_wait): Set child suspended
2813 if event_lwp->bp_reinsert isn't zero.
2814
fdbd04a8
YQ
28152016-03-02 Yao Qi <yao.qi@linaro.org>
2816
2817 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2818 enqueue_pending_signal.
2819
6896a8fa
MK
28202016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2821
2822 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2823 is actually loaded.
2824
ab503087
MK
28252016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2826
2827 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2828 (s390_regmap_3264) [!__s390x__]: New global.
2829 (s390_collect_ptrace_register): Skip map entries containing -1.
2830 (s390_supply_ptrace_register): Ditto.
2831 (s390_fill_gprs_high): New function.
2832 (s390_store_gprs_high): New function.
2833 (s390_regsets): Add NT_S390_HIGH_GPRS.
2834 (s390_get_hwcap): Enable on 31-bit.
2835 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2836 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2837 Detect NT_S390_HIGH_GPRS.
2838 (s390_usrregs_info_3264): Enable on 31-bit.
2839 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2840 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2841
ae91f625
MK
28422016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2843
2844 PR gdb/13808
2845 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2846 * configure.srv: Ditto.
2847 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2848 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2849 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2850 (init_registers_amd64_linux): Remove prototype.
2851 (tdesc_amd64_linux): Remove declaration.
2852 (get_ipa_tdesc): New function.
2853 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2854 initialize remaining tdescs.
2855 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2856 (init_registers_i386_linux): Remove prototype.
2857 (tdesc_i386_linux): Remove declaration.
2858 (get_ipa_tdesc): New function.
2859 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2860 initialize remaining tdescs.
2861 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2862 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2863 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2864 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2865 (x86_get_ipa_tdesc_idx): New function.
2866 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2867 * linux-x86-tdesc.h: New file.
2868 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2869 (target_get_ipa_tdesc_idx): New macro.
2870 * tracepoint.c (ipa_tdesc_idx): New macro.
2871 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2872 (symbol_list): Add ipa_tdesc_idx.
2873 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2874 (ipa_tdesc): Remove.
2875 (ipa_tdesc_idx): New variable.
2876 (get_context_regcache): Use get_ipa_tdesc.
2877 (gdb_collect): Ditto.
2878 (gdb_probe): Ditto.
2879 * tracepoint.h (get_ipa_tdesc): New prototype.
2880 (ipa_tdesc): Remove.
2881
e7ad2f14
PA
28822016-02-24 Pedro Alves <palves@redhat.com>
2883
2884 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2885 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2886 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2887 Factor out common code between the USE_SIGTRAP_SIGINFO and
2888 !USE_SIGTRAP_SIGINFO blocks.
2889 (linux_low_filter_event): Call save_stop_reason instead of
2890 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2891 Update comments.
2892 (linux_wait_1): Update comments.
2893
657f9cde
WW
28942016-02-24 Wei-cheng Wang <cole945@gmail.com>
2895
2896 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2897 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2898 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2899 ppc_insert_point, ppc_remove_point.
2900
b00b61e1
MK
29012016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2902
2903 * linux-s390-low.c (s390_supports_z_point_type): New function.
2904 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2905
553cb527
YQ
29062016-02-16 Yao Qi <yao.qi@linaro.org>
2907
2908 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2909 PC. Get pc from regcache_read_pc.
2910
a5652c21
YQ
29112016-02-12 Yao Qi <yao.qi@linaro.org>
2912
2913 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2914 or linux_get_pc_32bit.
2915 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2916
ed443b61
YQ
29172016-02-12 Yao Qi <yao.qi@linaro.org>
2918
2919 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2920 arm_linux_get_next_pcs_fixup.
2921
020ecd38
MK
29222016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2923
2924 * tracepoint.c (x_tracepoint_action_download): Change
2925 write_inferior_data_ptr to write_inferior_data_pointer.
2926 (cmd_qtstart): Likewise.
2927 (write_inferior_data_ptr): Remove.
2928 (download_agent_expr): Change write_inferior_data_ptr to
2929 write_inferior_data_pointer.
2930 (download_tracepoint_1): Likewise.
2931 (download_tracepoint): Likewise.
2932 (download_trace_state_variables): Likewise.
2933
7cae9051
WW
29342016-02-11 Wei-cheng Wang <cole945@gmail.com>
2935 Marcin Kościelnicki <koriakin@0x04.net>
2936
2937 * tracepoint.c (struct tracepoint_action_ops): Remove.
2938 (struct tracepoint_action): Remove ops.
2939 (m_tracepoint_action_download, r_tracepoint_action_download)
2940 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2941 size and offset accordingly.
2942 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2943 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2944 (tracepoint_action_send, tracepoint_action_download): New functions.
2945 Helpers for trace action handlers.
2946 (add_tracepoint_action): Remove setup actions ops.
2947 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2948
9f6a71b4
YQ
29492016-02-10 Yao Qi <yao.qi@linaro.org>
2950
2951 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2952
1e94266c
SM
29532016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2954
2955 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2956 to AC_OUTPUT.
2957 * configure: Regenerate.
2958
8adce034
SM
29592016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2960
2961 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2962 void * to gdb_byte *.
2963 * linux-low.c (siginfo_fixup): Likewise.
2964 (linux_xfer_siginfo): Likewise.
2965 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2966 Likewise.
2967 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2968
93813b37
WT
29692016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2970
2971 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2972 to srv_tgtobj.
2973 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2974 to srv_tgtobj.
2975 * linux-x86-low.c [__x86_64__]: Include
2976 "nat/amd64-linux-siginfo.h".
2977 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2978 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2979 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2980 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2981 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2982 (cpt_si_fd, si_timerid, si_overrun): Move from
2983 nat/amd64-linux-siginfo.c.
2984 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2985
8424cc97
SM
29862016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2987
2988 * server.c (skip_to_semicolon): Remove.
2989 (process_point_options): Use strchrnul instead of
2990 skip_to_semicolon.
2991
4d18591b
YQ
29922016-01-26 Yao Qi <yao.qi@linaro.org>
2993
2994 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2995 * linux-low.c (install_software_single_step_breakpoints): Don't
2996 call regcache_read_pc.
2997 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2998 argument pc.
2999
d8020970
YQ
30002016-01-26 Yao Qi <yao.qi@linaro.org>
3001
3002 * linux-low.c (install_software_single_step_breakpoints): Call
3003 regcache_read_pc instead of get_pc.
3004
8b207339
YQ
30052016-01-26 Yao Qi <yao.qi@linaro.org>
3006
3007 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3008 (unblock_async_io): Rename to ...
3009 (block_unblock_async_io): ... it. New function.
3010 (enable_async_io): Don't install SIGIO handler. Unblock it
3011 instead.
3012 (disable_async_io): Don't ignore SIGIO. Block it instead.
3013 (initialize_async_io): Install SIGIO handler. Don't call
3014 unblock_async_io.
3015
18879fef
YQ
30162016-01-26 Yao Qi <yao.qi@linaro.org>
3017
3018 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3019 first character is '\003', call *the_target->request_interrupt.
3020
a0f8e08a
YQ
30212016-01-25 Yao Qi <yao.qi@linaro.org>
3022
3023 * remote-utils.c (new_thread_notify): Remove.
3024 (dead_thread_notify): Likewise.
3025 * remote-utils.h (new_thread_notify): Remove declaration.
3026 (dead_thread_notify): Likewise.
3027
cc5fd9ab
MK
30282016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3029
3030 * gdb.trace/pending.exp: Fix expected message on continue.
3031
99e8eb11
MK
30322016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3033
3034 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3035 it works properly on big-endian machines where sizeof (CORE_ADDR)
3036 != sizeof (void *).
3037
a994041d
PA
30382016-01-21 Pedro Alves <palves@redhat.com>
3039
3040 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3041 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3042 * configure: Regenerate.
3043
f7a6a40d
YQ
30442016-01-21 Yao Qi <yao.qi@linaro.org>
3045
3046 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3047 is_thumb and set it according to CPSR saved on the stack.
3048 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3049 arm_sigreturn_next_pc.
3050
6f69e520
YQ
30512016-01-18 Yao Qi <yao.qi@linaro.org>
3052
3053 * linux-low.c (linux_set_pc_64bit): New function.
3054 (linux_get_pc_64bit): New function.
3055 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3056 Declare.
3057 * linux-sparc-low.c (debug_threads): Remove declaration.
3058 (sparc_get_pc): Remove.
3059 (the_low_target): Use linux_get_pc_64bit instead of
3060 sparc_get_pc.
3061 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3062 (the_low_target): Use linux_get_pc_64bit and
3063 linux_set_pc_64bit.
3064
276d4552
YQ
30652016-01-18 Yao Qi <yao.qi@linaro.org>
3066
3067 * linux-arm-low.c (debug_threads): Remove declaration.
3068 (arm_get_pc, arm_set_pc): Remove.
3069 (the_low_target): Use linux_get_pc_32bit and
3070 linux_set_pc_32bit.
3071 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3072 (the_low_target): Use linux_get_pc_32bit and
3073 linux_set_pc_32bit.
3074 * linux-cris-low.c (debug_threads): Remove declaration.
3075 (cris_get_pc, cris_set_pc,): Remove.
3076 (the_low_target): Use linux_get_pc_32bit and
3077 linux_set_pc_32bit.
3078 * linux-crisv32-low.c (debug_threads): Remove declaration.
3079 (cris_get_pc, cris_set_pc): Remove.
3080 (the_low_target): Use linux_get_pc_32bit and
3081 linux_set_pc_32bit.
3082 * linux-low.c: Include inttypes.h.
3083 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3084 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3085 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3086 (the_low_target): Use linux_get_pc_32bit and
3087 linux_set_pc_32bit.
3088 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3089 (the_low_target): Use linux_get_pc_32bit and
3090 linux_set_pc_32bit.
3091 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3092 (the_low_target): Use linux_get_pc_32bit and
3093 linux_set_pc_32bit.
3094 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3095 (the_low_target): Use linux_get_pc_32bit and
3096 linux_set_pc_32bit.
3097 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3098 (the_low_target): Use linux_get_pc_32bit and
3099 linux_set_pc_32bit.
3100
eb0edac8
GB
31012016-01-18 Gary Benson <gbenson@redhat.com>
3102
3103 * configure.ac (AC_FUNC_FORK): New check.
3104 * config.in: Regenerate.
3105 * configure: Likewise.
3106
1b451dda
YQ
31072016-01-14 Yao Qi <yao.qi@linaro.org>
3108
3109 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3110 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3111 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3112 arm_get_next_pcs_ctor.
3113
82075af2
JS
31142016-01-12 Josh Stone <jistone@redhat.com>
3115 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3116
3117 * inferiors.h: Include "gdb_vecs.h".
3118 (struct process_info): Add syscalls_to_catch.
3119 * inferiors.c (remove_process): Free syscalls_to_catch.
3120 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3121 syscall_return stops.
3122 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3123 * server.c (handle_general_set): Handle QCatchSyscalls.
3124 (handle_query): Report support for QCatchSyscalls.
3125 * target.h (struct target_ops): Add supports_catch_syscall.
3126 (target_supports_catch_syscall): New macro.
3127 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3128 (struct lwp_info): Add syscall_state.
3129 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3130 Maintain syscall_state and syscalls_to_catch across exec.
3131 (get_syscall_trapinfo): New function, proxy to the_low_target.
3132 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3133 (linux_low_filter_event): Toggle syscall_state entry/return for
3134 syscall traps, and set it ignored for all others.
3135 (gdb_catching_syscalls_p): New function.
3136 (gdb_catch_this_syscall_p): New function.
3137 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3138 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3139 (linux_supports_catch_syscall): New function.
3140 (linux_target_ops): Install it.
3141 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3142 (the_low_target): Install it.
3143
8f13a3ce
MF
31442016-01-12 Mike Frysinger <vapier@gentoo.org>
3145
3146 * acinclude.m4: Include new ../warning.m4 file.
3147 * configure: Regenerated.
3148 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3149
5b3da067
MF
31502016-01-12 Mike Frysinger <vapier@gentoo.org>
3151
3152 * ax.c (is_goto_target): Mark static.
3153 * linux-low.c (register_addr): Likewise.
3154 (linux_fetch_registers, linux_store_registers): Likewise.
3155 * mem-break.c (any_persistent_commands): Fix old prototype.
3156 (add_commands_to_breakpoint): Mark static.
3157 * regcache.c (find_register_by_name): Delete unused func.
3158 * remote-utils.c (hex_or_minus_one): Mark static.
3159 * server.c (monitor_show_help): Mark static.
3160 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3161 handle_v_requests): Likewise.
3162
bc504a31
PA
31632016-01-12 Pedro Alves <palves@redhat.com>
3164
3165 Remove use of the registered trademark symbol throughout.
3166
5a0dd67a
YQ
31672016-01-08 Yao Qi <yao.qi@linaro.org>
3168
3169 * remote-utils.c (getpkt): If c is '\003', call target hook
3170 request_interrupt.
3171
b2ca446f
YQ
31722016-01-06 Yao Qi <yao.qi@linaro.org>
3173
3174 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3175 linux-aarch32-low.c.
3176 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3177 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3178 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3179 (thumb2_breakpoint): Declare.
3180 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3181 linux-aarch32-low.h.
3182 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3183 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3184 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3185
edd88788
JB
31862016-01-01 Joel Brobecker <brobecker@adacore.com>
3187
3188 * gdbreplay.c (gdbreplay_version): Change copyright year in
3189 version message.
3190 * server.c (gdbserver_version): Likewise.
3191
65da7f14
PP
31922015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3193
3194 * server.c (crc32_table): Delete.
3195 (crc32): Use libiberty's xcrc32 function.
3196
4abd5ed2
JB
31972015-12-22 Joel Brobecker <brobecker@adacore.com>
3198
3199 * lynx-low.c (lynx_delete_thread_callback): New function.
3200 (lynx_mourn): Properly delete our process and all of its
3201 threads. Remove call to clear_inferiors.
3202
0e50fe5c
JB
32032015-12-22 Joel Brobecker <brobecker@adacore.com>
3204
3205 * target.c (thread_search_callback): Add check that
3206 the thread_stopped target callback is not NULL before
3207 calling it.
3208
35adc03f
YQ
32092015-12-21 Yao Qi <yao.qi@linaro.org>
3210
3211 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3212 arm breakpoint.
3213
bd2b2909
AT
32142015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3215
3216 * server.c (handle_query): Call target_supports_software_single_step.
3217
7fe5e27e
AT
32182015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3219
3220 * linux-low.c (single_step): New function.
3221 (linux_resume_one_lwp_throw): Call single_step.
3222 (start_step_over): Likewise.
3223
d9311bfa
AT
32242015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3225
3226 * Makefile.in (SFILES): Append arch/arm-linux.c,
3227 arch/arm-get-next-pcs.c.
3228 (arm-linux.o): New rule.
3229 (arm-get-next-pcs.o): New rule.
3230 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3231 arm-linux.o.
3232 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3233 to linux-aarch32-low.c.
3234 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3235 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3236 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3237 (thumb2_breakpoint_len): Likewise.
3238 (arm_is_thumb_mode): Make non-static.
3239 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3240 from linux-aarch32-low.c.
3241 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3242 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3243 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3244 (thumb2_breakpoint_len): Likewise.
3245 (arm_is_thumb_mode): New declaration.
3246 * linux-arm-low.c: Include arch/arm-linux.h
3247 aarch/arm-get-next-pcs.h, sys/syscall.h.
3248 (get_next_pcs_ops): New struct.
3249 (get_next_pcs_addr_bits_remove): New function.
3250 (get_next_pcs_is_thumb): New function.
3251 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3252 (arm_sigreturn_next_pc): Likewise.
3253 (get_next_pcs_syscall_next_pc): Likewise.
3254 (arm_gdbserver_get_next_pcs): Likewise.
3255 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3256 Initialize.
3257 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3258 * server.h: Include gdb_vecs.h.
3259
68ce2059
AT
32602015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3261
3262 * Makefile.in (SFILES): Append common/common-regcache.c.
3263 (OBS): Append common-regcache.o.
3264 (common-regcache.o): New rule.
3265 * regcache.c (init_register_cache): Initialize cache to
3266 REG_UNAVAILABLE.
3267 (regcache_raw_read_unsigned): New function.
3268 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3269 register_status enum.
3270
fa5308bd
AT
32712015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3272
3273 * linux-aarch64-low.c (the_low_targets): Rename
3274 breakpoint_reinsert_addr to get_next_pcs.
3275 * linux-arm-low.c (the_low_targets): Likewise.
3276 * linux-bfin-low.c (the_low_targets): Likewise.
3277 * linux-cris-low.c (the_low_targets): Likewise.
3278 * linux-crisv32-low.c (the_low_targets): Likewise.
3279 * linux-low.c (can_software_single_step): Likewise.
3280 (install_software_single_step_breakpoints): New function.
3281 (start_step_over): Use install_software_single_step_breakpoints.
3282 * linux-low.h: New CORE_ADDR vector.
3283 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3284 get_next_pcs.
3285 * linux-mips-low.c (the_low_targets): Likewise.
3286 * linux-nios2-low.c (the_low_targets): Likewise.
3287 * linux-sparc-low.c (the_low_targets): Likewise.
3288
4a6ed09b
PA
32892015-12-17 Pedro Alves <palves@redhat.com>
3290
3291 * linux-low.c (linux_kill_one_lwp): Remove references to
3292 LinuxThreads.
3293 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3294 to 'kill'.
3295 (linux_init_signals): Delete.
3296 (initialize_low): Adjust.
3297 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3298
7544db95
PA
32992015-12-16 Pedro Alves <palves@redhat.com>
3300
3301 * configure.ac (compiler warning flags): When testing a
3302 -Wno-foo option, check whether -Wfoo works instead.
3303 * configure: Regenerate.
3304
8020350c
DB
33052015-12-11 Don Breazeal <donb@codesourcery.com>
3306
3307 * server.c (process_serial_event): Don't exit from gdbserver
3308 in remote mode if there are still active inferiors.
3309
db91f502
YQ
33102015-12-11 Yao Qi <yao.qi@linaro.org>
3311
3312 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3313 arm_breakpoint_at if the process is 32-bit.
3314
b37a6290
YQ
33152015-12-11 Yao Qi <yao.qi@linaro.org>
3316
3317 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3318 arm breakpoint.
3319
17b1509a
YQ
33202015-12-07 Yao Qi <yao.qi@linaro.org>
3321
3322 * configure.srv: Append arm.o to srv_tgtobj for
3323 aarch64*-*-linux* target.
3324 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3325 from linux-arm-low.c.
3326 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3327 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3328 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3329 (thumb2_breakpoint_len): Likewise.
3330 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3331 (arm_breakpoint_kinds): Likewise.
3332 (arm_breakpoint_kind_from_pc): Likewise.
3333 (arm_sw_breakpoint_from_kind): Likewise.
3334 (arm_breakpoint_kind_from_current_state): Likewise.
3335 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3336 (arm_sw_breakpoint_from_kind): Declare.
3337 (arm_breakpoint_kind_from_current_state): Declare.
3338 (arm_breakpoint_at): Declare.
3339 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3340 arm_sw_breakpoint_from_kind if process is 32-bit.
3341 (aarch64_breakpoint_kind_from_pc): New function.
3342 (aarch64_breakpoint_kind_from_current_state): New function.
3343 (the_low_target): Initialize fields breakpoint_kind_from_pc
3344 and breakpoint_kind_from_current_state.
3345 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3346 linux-aarch32-low.c.
3347 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3348 (arm_breakpoint, arm_breakpoint_len): Likewise.
3349 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3350 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3351 (arm_is_thumb_mode): Likewise.
3352 (arm_breakpoint_at): Likewise.
3353 (arm_breakpoint_kind_from_pc): Likewise.
3354 (arm_sw_breakpoint_from_kind): Likewise.
3355 (arm_breakpoint_kind_from_current_state): Likewise.
3356
3357 Revert:
3358 2015-08-04 Yao Qi <yao.qi@linaro.org>
3359
3360 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3361 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3362 * server.c (extended_protocol): Remove "static".
3363 * server.h (extended_protocol): Declare it.
3364
ece66d65
JS
33652015-12-04 Josh Stone <jistone@redhat.com>
3366
3367 * target.h (struct target_ops) <arch_setup>: Rename to ...
3368 (struct target_ops) <post_create_inferior>: ... this.
3369 (target_arch_setup): Rename to ...
3370 (target_post_create_inferior): ... this, calling post_create_inferior.
3371 * server.c (start_inferior): Update target_arch_setup calls to
3372 target_post_create_inferior.
3373 * linux-low.c (linux_low_ptrace_options): Forward declare.
3374 (linux_arch_setup): Update its comment for general use.
3375 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3376 (struct linux_target_ops): Use linux_post_create_inferior.
3377 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3378 to post_create_inferior.
3379 * nto-low.c (struct nto_target_ops): Likewise.
3380 * spu-low.c (struct spu_target_ops): Likewise.
3381 * win32-low.c (struct win32_target_ops): Likewise.
3382
e58c48b4
AT
33832015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3384
3385 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3386
fbec8956
AT
33872015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3388
3389 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3390 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3391 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3392 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3393 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3394 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3395 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3396 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3397 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3398 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3399 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3400 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3401
9b4c5f87
AT
34022015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3403
3404 * linux-low.c (linux_look_up_symbols): Don't call
3405 linux_supports_traceclone.
3406 * linux-low.h (thread_db_init): Remove use_events argument.
3407 * thread-db.c (thread_db_use_event): Remove global variable.
3408 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3409 (struct thread_db) <td_create_bp>: Remove field.
3410 (thread_db_create_event): Remove function.
3411 (thread_db_enable_reporting): Likewise.
3412 (find_one_thread): Don't check for thread_db_use_events.
3413 (attach_thread): Likewise.
3414 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3415 (try_thread_db_load_1): Don't check for thread_db_use_events.
3416 (thread_db_init): Remove use_events argument and thread events
3417 handling.
3418 (remove_thread_event_breakpoints): Remove function.
3419 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3420
7d00775e
AT
34212015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3422
3423 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3424 New function.
3425 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3426 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3427 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3428 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3429 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3430 Initialize.
3431 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3432 New function.
3433 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3434 * linux-low.c (can_hardware_single_step): Use
3435 supports_hardware_single_step.
3436 (can_software_single_step): New function.
3437 (start_step_over): Call can_software_single_step.
3438 (linux_supports_hardware_single_step): New function.
3439 (struct target_ops) <supports_software_single_step>: Initialize.
3440 * linux-low.h (struct linux_target_ops)
3441 <supports_hardware_single_step>: Initialize.
3442 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3443 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3444 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3445 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3446 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3447 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3448 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3449 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3450 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3451 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3452 Initialize.
3453 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3454 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3455 Initialize.
3456 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3457 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3458 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3459 New function.
3460 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3461 * target.h (struct target_ops): <supports_software_single_step>:
3462 New field.
3463 (target_supports_software_single_step): New macro.
3464
2d97cd35
AT
34652015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3466
3467 * linux-low.c (linux_wait_1): Fix pc advance condition.
3468 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3469 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3470
769ef81f
AT
34712015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3472
3473 * linux-arm-low.c (arm_is_thumb_mode): New function.
3474 (arm_breakpoint_at): Use arm_is_thumb_mode.
3475 (arm_breakpoint_kind_from_current_state): New function.
3476 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3477 Initialize.
3478 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3479 (linux_breakpoint_kind_from_current_state): New function.
3480 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3481 * linux-low.h (struct linux_target_ops)
3482 <breakpoint_kind_from_current_state>: New field.
3483 * target.h (struct target_ops): Likewise.
3484 (target_breakpoint_kind_from_current_state): New macro.
3485
1bebeeca
PA
34862015-11-30 Pedro Alves <palves@redhat.com>
3487
3488 * linux-low.c (linux_resume): Wake up the event loop before
3489 returning.
3490
a67a9fae
PA
34912015-11-30 Pedro Alves <palves@redhat.com>
3492
3493 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3494 check.
3495 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3496 to -1.
3497 * target.c (struct thread_search): New structure.
3498 (thread_search_callback): New function.
3499 (prev_general_thread): New global.
3500 (prepare_to_access_memory, done_accessing_memory): New functions.
3501 * target.h (prepare_to_access_memory, done_accessing_memory):
3502 Replace macros with function declarations.
3503
f2faf941
PA
35042015-11-30 Pedro Alves <palves@redhat.com>
3505
3506 PR 14618
3507 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3508 report TARGET_WAITKIND_NO_RESUMED.
3509 * remote-utils.c (prepare_resume_reply): Handle
3510 TARGET_WAITKIND_NO_RESUMED.
3511 * server.c (report_no_resumed): New global.
3512 (handle_query) <qSupported>: Handle "no-resumed+". Report
3513 "no-resumed+" support.
3514 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3515 return error if the client doesn't support no-resumed events.
3516 (push_stop_notification): New function.
3517 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3518 events if the client supports them.
3519
a681f9c9
PA
35202015-11-30 Pedro Alves <palves@redhat.com>
3521
3522 * linux-low.c (thread_still_has_status_pending_p): Don't check
3523 vCont;t here.
3524 (lwp_resumed): New function.
3525 (status_pending_p_callback): Return early if the LWP is not
3526 supposed to be resumed.
3527
65706a29
PA
35282015-11-30 Pedro Alves <palves@redhat.com>
3529
3530 * linux-low.c (handle_extended_wait): Assert that the LWP's
3531 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3532 thread create events, leave the new child's status pending.
3533 (linux_low_filter_event): If GDB wants to hear about thread exit
3534 events, leave the LWP marked dead and don't delete it.
3535 (linux_wait_for_event_filtered): Don't check for thread exit.
3536 (filter_exit_event): New function.
3537 (linux_wait_1): Use it, when returning an exit event.
3538 (linux_resume_one_lwp_throw): Assert that the LWP's
3539 waitstatus is TARGET_WAITKIND_IGNORE.
3540 * remote-utils.c (prepare_resume_reply): Handle
3541 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3542 * server.c (report_thread_events): New global.
3543 (handle_general_set): Handle QThreadEvents.
3544 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3545 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3546 TARGET_WAITKIND_THREAD_EXITED.
3547 * server.h (report_thread_events): Declare.
3548
56cf4bed
PA
35492015-11-30 Pedro Alves <palves@redhat.com>
3550
3551 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3552 the thread's last_resume_kind was resume_stop.
3553
500c1d85
PA
35542015-11-30 Pedro Alves <palves@redhat.com>
3555
3556 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3557 before returning.
3558
de979965
PA
35592015-11-30 Pedro Alves <palves@redhat.com>
3560
3561 * server.c (handle_v_requests): Handle vCtrlC.
3562
34c65914
PA
35632015-11-30 Pedro Alves <palves@redhat.com>
3564
3565 * gdbthread.h (find_any_thread_of_pid): Declare.
3566 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3567 functions.
3568 * server.c (handle_query): If current_thread is NULL, look for
3569 another thread of the selected process.
3570
79efa585 35712015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3572 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3573
3574 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3575 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3576 name in reply.
3577 * target.h (struct target_ops) <thread_name>: New field.
3578 (target_thread_name): New macro.
3579
80d82c19
JB
35802015-11-23 Joel Brobecker <brobecker@adacore.com>
3581
3582 * regcache.h (regcache_invalidate_pid): Add declaration.
3583 * regcache.c (regcache_invalidate_pid): New function, extracted
3584 from regcache_invalidate.
3585 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3586 Add trivial documentation comment.
3587 * lynx-low.c: Use regcache_invalidate_pid instead of
3588 regcache_invalidate.
3589
64da5dd5
JB
35902015-11-23 Joel Brobecker <brobecker@adacore.com>
3591
3592 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3593 and Elf64_auxv_t if the target is Android.
3594
37ce4055
DE
35952015-11-22 Doug Evans <xdje42@gmail.com>
3596
3597 * target.h: #include <sys/types.h>.
3598
06e03fff
PA
35992015-11-19 Pedro Alves <palves@redhat.com>
3600
3601 * linux-low.c (linux_process_qsupported): Change prototype.
3602 Adjust.
3603 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3604 Change prototype.
3605 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3606 and adjust to loop over all features.
3607 * server.c (handle_query) <qSupported>: Adjust to call
3608 target_process_qsupported once, passing it a vector of unprocessed
3609 features.
3610 * target.h (struct target_ops) <process_qsupported>: Change
3611 prototype.
3612 (target_process_qsupported): Adjust.
3613
9a084706
PA
36142015-11-19 Pedro Alves <palves@redhat.com>
3615
3616 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3617 mode.
3618 * configure: Regenerate.
3619
dad44a1f
PA
36202015-11-19 Pedro Alves <palves@redhat.com>
3621
3622 * configure: Regenerate.
3623
231c0592
YQ
36242015-11-19 Yao Qi <yao.qi@linaro.org>
3625
3626 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3627 type to uint32_t.
3628
6c1c9a8b
YQ
36292015-11-19 Yao Qi <yao.qi@linaro.org>
3630
3631 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3632 (struct aarch64_operand): Move enum out.
3633
9caa3311
YQ
36342015-11-19 Yao Qi <yao.qi@linaro.org>
3635
3636 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3637 struct user_fpsimd_state *.
3638 (aarch64_store_fpregset): Likewise.
3639
6a69a054
YQ
36402015-11-19 Yao Qi <yao.qi@linaro.org>
3641
3642 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3643 struct user_pt_regs *.
3644 (aarch64_store_gregset): Likewise.
3645
1798301e
PA
36462015-11-18 Pedro Alves <palves@redhat.com>
3647
3648 * Makefile.in (all_object_files): Add $IPA_OBJS.
3649
ce7715e2
PA
36502015-11-17 Pedro Alves <palves@redhat.com>
3651
3652 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3653 GDB_SIGNAL_0 and gdb_signal_to_string.
3654
c0879059
PA
36552015-11-17 Pedro Alves <palves@redhat.com>
3656
3657 * win32-low.c (handle_output_debug_string): Remove parameter.
3658 (win32_kill): Remove our_status local and adjust call to
3659 handle_output_debug_string.
3660 (get_child_debug_event): Adjust call to
3661 handle_output_debug_string.
3662
1996e237
SM
36632015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3664
3665 * linux-mips-low.c (mips_fill_gregset): Add cast.
3666 (mips_store_gregset): Likewise.
3667 (mips_fill_fpregset): Likewise.
3668 (mips_store_fpregset): Likewise.
3669
cbec665b
SM
36702015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3671
3672 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3673 priv.
3674
eb3e3c67
SM
36752015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3676
3677 * linux-mips-low.c (mips_linux_new_thread): Change type of
3678 watch_type to enum target_hw_bp_type.
3679
171de4b8
SM
36802015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3681
3682 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3683 Change return type to arm_hwbp_type.
3684
04248ead
SM
36852015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3686
3687 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3688 (arm_store_gregset): Likewise.
3689 * linux-arm-low.c (arm_get_hwcap): Likewise.
3690 (arm_read_description): Likewise.
3691
04b3479c
SM
36922015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3693
3694 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3695
2bc84e8a
SM
36962015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3697
3698 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3699 (ppc_fill_vsxregset): Likewise.
3700 (ppc_store_vsxregset): Likewise.
3701 (ppc_fill_vrregset): Likewise.
3702 (ppc_store_vrregset): Likewise.
3703 (ppc_fill_evrregset): Likewise.
3704 (ppc_store_evrregset): Likewise.
3705
e6c5bb05
SM
37062015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3707
3708 * linux-ppc-low.c (ppc_usrregs_info): Remove
3709 forward-declaration.
3710 (ppc_arch_setup): Move lower in file.
3711
7ea45d72
SM
37122015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3713
3714 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3715 (ps_pdwrite): Likewise.
3716
69291610
HW
37172015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3718
3719 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3720 to after assert checks.
3721
b42945fd
SM
37222015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3723
3724 * proc-service.c (ps_pdread): Add/adjust casts.
3725 (ps_pdwrite): Add/adjust casts.
3726
d6f85c84
SM
37272015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3728
3729 * server.c (handle_search_memory_1): Cast return value of
3730 memmem.
3731
f98cd059
SM
37322015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3733
3734 * server.c (write_qxfer_response): Change type of data to
3735 gdb_byte *.
3736
d2412fa5
PA
37372015-10-29 Pedro Alves <palves@redhat.com>
3738
3739 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3740
c17414a2
PA
37412015-10-29 Pedro Alves <palves@redhat.com>
3742
3743 * tracepoint.c (clear_installed_tracepoints): Add casts.
3744
e053fbc4
PA
37452015-10-29 Pedro Alves <palves@redhat.com>
3746
3747 * server.c (handle_v_cont, process_serial_event): Add enum
3748 gdb_signal casts to signal parsing code.
3749
add67df8
PA
37502015-10-29 Pedro Alves <palves@redhat.com>
3751
3752 * linux-low.h (NULL_REGSET): Define.
3753 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3754 * linux-arm-low.c (arm_regsets): Likewise.
3755 * linux-crisv32-low.c (cris_regsets): Likewise.
3756 * linux-m68k-low.c (m68k_regsets): Likewise.
3757 * linux-mips-low.c (mips_regsets): Likewise.
3758 * linux-nios2-low.c (nios2_regsets): Likewise.
3759 * linux-ppc-low.c (ppc_regsets): Likewise.
3760 * linux-s390-low.c (s390_regsets): Likewise.
3761 * linux-sh-low.c (sh_regsets): Likewise.
3762 * linux-sparc-low.c (sparc_regsets): Likewise.
3763 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3764 * linux-tile-low.c (tile_regsets): Likewise.
3765 * linux-x86-low.c (x86_regsets): Likewise.
3766 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3767
50bc912a
PA
37682015-10-29 Pedro Alves <palves@redhat.com>
3769
3770 * linux-low.h (NULL_REGSET): Define.
3771 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3772 * linux-arm-low.c (arm_regsets): Likewise.
3773 * linux-crisv32-low.c (cris_regsets): Likewise.
3774 * linux-m68k-low.c (m68k_regsets): Likewise.
3775 * linux-mips-low.c (mips_regsets): Likewise.
3776 * linux-nios2-low.c (nios2_regsets): Likewise.
3777 * linux-ppc-low.c (ppc_regsets): Likewise.
3778 * linux-s390-low.c (s390_regsets): Likewise.
3779 * linux-sh-low.c (sh_regsets): Likewise.
3780 * linux-sparc-low.c (sparc_regsets): Likewise.
3781 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3782 * linux-tile-low.c (tile_regsets): Likewise.
3783 * linux-x86-low.c (x86_regsets): Likewise.
3784 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3785
682b2546
DE
37862015-10-26 Doug Evans <dje@google.com>
3787
3788 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3789
963843d4
DE
37902015-10-26 Doug Evans <dje@google.com>
3791
3792 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3793
d41401ac
DE
37942015-10-26 Doug Evans <dje@google.com>
3795
3796 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3797 for debug_printf.
3798 (attach_thread, find_new_threads_callback): Ditto.
3799
3db28855
AT
38002015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3801
3802 * mem-break.h (set_breakpoint_data): Remove.
3803
fb78e89c
AT
38042015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3805
3806 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3807 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3808 (initialize_low): Remove set_breakpoint_data call.
3809 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3810 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3811 (initialize_low): Remove set_breakpoint_data call.
3812 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3813 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3814 (initialize_low): Remove set_breakpoint_data call.
3815
2e6ee069
AT
38162015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3817
3818 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3819 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3820 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3821 * target.h (target_breakpoint_kind_from_pc): New macro.
3822
1652a986
AT
38232015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3824
3825 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3826 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3827 the default breakpoint kind.
3828
abeead09
AT
38292015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3830
3831 * linux-arm-low.c (arm_supports_z_point_type): Add software
3832 breakpoint support.
3833
b0b4b501
AT
38342015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3835
3836 * linux-arm-low.c: Refactor breakpoint definitions.
3837 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3838 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3839
8689682c
AT
38402015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3841
3842 * Makefile.in: Add arm.c/o.
3843 * configure.srv: Likewise.
3844 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3845 (arm_breakpoint_kind_from_pc): New function.
3846 (arm_sw_breakpoint_from_kind): Return proper kind.
3847 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3848
27165294
AT
38492015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3850
3851 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3852 removal.
3853 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3854 (struct raw_breakpoint) <size>: Remove.
3855 (struct raw_breakpoint) <kind>: Add.
3856 (bp_size): New function.
3857 (bp_opcode): Likewise.
3858 (find_raw_breakpoint_at): Adjust for kind.
3859 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3860 (remove_memory_breakpoint): Adjust for kind call bp_size.
3861 (set_raw_breakpoint_at): Adjust for kind.
3862 (set_breakpoint): Likewise.
3863 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3864 (delete_raw_breakpoint): Adjust for kind.
3865 (delete_breakpoint): Likewise.
3866 (find_gdb_breakpoint): Likewise.
3867 (set_gdb_breakpoint_1): Likewise.
3868 (set_gdb_breakpoint): Likewise.
3869 (delete_gdb_breakpoint_1): Likewise.
3870 (delete_gdb_breakpoint): Likewise.
3871 (uninsert_raw_breakpoint): Likewise.
3872 (reinsert_raw_breakpoint): Likewise.
3873 (set_breakpoint_data): Remove.
3874 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3875 (check_mem_read): Adjust for kind call bp_size.
3876 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3877 (clone_one_breakpoint): Adjust for kind.
3878 * mem-break.h (set_gdb_breakpoint): Likewise.
3879 (delete_gdb_breakpoint): Likewise.
3880 * server.c (process_serial_event): Likewise.
3881
dd373349
AT
38822015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3883
3884 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3885 (struct linux_target_ops) <breakpoint>: Remove.
3886 (struct linux_target_ops) <breakpoint_len>: Remove.
3887 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3888 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3889 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3890 (arm_sw_breakpoint_from_kind): New function.
3891 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3892 (struct linux_target_ops) <breakpoint>: Remove.
3893 (struct linux_target_ops) <breakpoint_len>: Remove.
3894 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3895 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3896 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3897 (struct linux_target_ops) <breakpoint>: Remove.
3898 (struct linux_target_ops) <breakpoint_len>: Remove.
3899 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3900 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3901 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3902 (struct linux_target_ops) <breakpoint>: Remove.
3903 (struct linux_target_ops) <breakpoint_len>: Remove.
3904 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3905 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3906 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3907 and sw_breakpoint_from_kind to increment the pc.
3908 (linux_breakpoint_kind_from_pc): New function.
3909 (linux_sw_breakpoint_from_kind): New function.
3910 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3911 (initialize_low): Call breakpoint_kind_from_pc and
3912 sw_breakpoint_from_kind to replace breakpoint_data/len.
3913 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3914 New field.
3915 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3916 * linux-m32r-low.c (m32r_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-m68k-low.c (m68k_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 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3927 (struct linux_target_ops) <breakpoint>: Remove.
3928 (struct linux_target_ops) <breakpoint_len>: Remove.
3929 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3930 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3931 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3932 (struct linux_target_ops) <breakpoint>: Remove.
3933 (struct linux_target_ops) <breakpoint_len>: Remove.
3934 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3935 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3936 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3937 (struct linux_target_ops) <breakpoint>: Remove.
3938 (struct linux_target_ops) <breakpoint_len>: Remove.
3939 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3940 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3941 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3942 (struct linux_target_ops) <breakpoint>: Remove.
3943 (struct linux_target_ops) <breakpoint_len>: Remove.
3944 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3945 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3946 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3947 (struct linux_target_ops) <breakpoint>: Remove.
3948 (struct linux_target_ops) <breakpoint_len>: Remove.
3949 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3950 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3951 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3952 (struct linux_target_ops) <breakpoint>: Remove.
3953 (struct linux_target_ops) <breakpoint_len>: Remove.
3954 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3955 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3956 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3957 (struct linux_target_ops) <breakpoint>: Remove.
3958 (struct linux_target_ops) <breakpoint_len>: Remove.
3959 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3960 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3961 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3962 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3963 (struct linux_target_ops) <breakpoint>: Remove.
3964 (struct linux_target_ops) <breakpoint_len>: Remove.
3965 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3966 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3967 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3968 (struct linux_target_ops) <breakpoint>: Remove.
3969 (struct linux_target_ops) <breakpoint_len>: Remove.
3970 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3971 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3972
4cd98a19
AT
39732015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3974
3975 * linux-cris-low.c (cris_get_pc): Remove void arg.
3976
774ee6d2
AR
39772015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3978
3979 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3980 variable name.
3981
833dcd29
AR
39822015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3983
3984 * inferiors.c (thread_pid_matches_callback): New function.
3985 (find_thread_process): New function.
3986 (remove_thread): Reset current_thread.
3987 (remove_process): Assert threads have been removed first.
3988
8d689ee5
YQ
39892015-10-15 Yao Qi <yao.qi@linaro.org>
3990
3991 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3992 if it is 3.
3993 (aarch64_remove_point): Likewise.
3994 * regcache.c (regcache_register_size): New function.
3995
1c2e1515
YQ
39962015-10-12 Yao Qi <yao.qi@linaro.org>
3997
3998 * linux-aarch64-low.c: Update all callers as emit_load_store
3999 is renamed to aarch64_emit_load_store.
4000
e1c587c3
YQ
40012015-10-12 Yao Qi <yao.qi@linaro.org>
4002
4003 * linux-aarch64-low.c: Update all callers of function renaming
4004 from emit_insn to aarch64_emit_insn.
4005
b6542f81
YQ
40062015-10-12 Yao Qi <yao.qi@linaro.org>
4007
4008 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4009 arch/aarch64-insn.h.
4010 (struct aarch64_memory_operand): Likewise.
4011 (ENCODE): Likewise.
4012 (emit_insn): Move to arch/aarch64-insn.c.
4013 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4014 (emit_load_store): Move to arch/aarch64-insn.c.
4015 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4016 (can_encode_int32): Remove.
4017
246994ce
YQ
40182015-10-12 Yao Qi <yao.qi@linaro.org>
4019
4020 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4021 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4022 (aarch64_relocate_instruction): Likewise.
4023 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4024 (struct aarch64_insn_visitor): Likewise.
4025
0badd99f
YQ
40262015-10-12 Yao Qi <yao.qi@linaro.org>
4027
4028 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4029 (struct aarch64_insn_visitor): New.
4030 (struct aarch64_insn_relocation_data): New.
4031 (aarch64_ftrace_insn_reloc_b): New function.
4032 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4033 (aarch64_ftrace_insn_reloc_cb): Likewise.
4034 (aarch64_ftrace_insn_reloc_tb): Likewise.
4035 (aarch64_ftrace_insn_reloc_adr): Likewise.
4036 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4037 (aarch64_ftrace_insn_reloc_others): Likewise.
4038 (visitor): New.
4039 (aarch64_relocate_instruction): Use visitor.
4040
dfaffe9d
YQ
40412015-10-12 Yao Qi <yao.qi@linaro.org>
4042
4043 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4044 int. Add argument buf.
4045 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4046 aarch64_relocate_instruction.
4047
70b439f0
YQ
40482015-10-12 Yao Qi <yao.qi@linaro.org>
4049
4050 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4051 argument insn. Remove local variable insn. Don't call
4052 target_read_uint32.
4053 (aarch64_install_fast_tracepoint_jump_pad): Call
4054 target_read_uint32.
4055
7781c06f
YQ
40562015-09-30 Yao Qi <yao.qi@linaro.org>
4057
4058 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4059 (emit_load_store_pair): Likewise.
4060
9a3c8263
SM
40612015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4062
4063 * dll.c (match_dll): Add cast(s).
4064 (unloaded_dll): Likewise.
4065 * linux-low.c (second_thread_of_pid_p): Likewise.
4066 (delete_lwp_callback): Likewise.
4067 (count_events_callback): Likewise.
4068 (select_event_lwp_callback): Likewise.
4069 (linux_set_resume_request): Likewise.
4070 * server.c (accumulate_file_name_length): Likewise.
4071 (emit_dll_description): Likewise.
4072 (handle_qxfer_threads_worker): Likewise.
4073 (visit_actioned_threads): Likewise.
4074 * thread-db.c (any_thread_of): Likewise.
4075 * tracepoint.c (same_process_p): Likewise.
4076 (match_blocktype): Likewise.
4077 (build_traceframe_info_xml): Likewise.
4078
224c3ddb
SM
40792015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4080
4081 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4082 assignment.
4083 (gdb_unparse_agent_expr): Likewise.
4084 * hostio.c (require_data): Likewise.
4085 (handle_pread): Likewise.
4086 * linux-low.c (disable_regset): Likewise.
4087 (fetch_register): Likewise.
4088 (store_register): Likewise.
4089 (get_dynamic): Likewise.
4090 (linux_qxfer_libraries_svr4): Likewise.
4091 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4092 (set_fast_tracepoint_jump): Likewise.
4093 (uninsert_fast_tracepoint_jumps_at): Likewise.
4094 (reinsert_fast_tracepoint_jumps_at): Likewise.
4095 (validate_inserted_breakpoint): Likewise.
4096 (clone_agent_expr): Likewise.
4097 * regcache.c (init_register_cache): Likewise.
4098 * remote-utils.c (putpkt_binary_1): Likewise.
4099 (decode_M_packet): Likewise.
4100 (decode_X_packet): Likewise.
4101 (look_up_one_symbol): Likewise.
4102 (relocate_instruction): Likewise.
4103 (monitor_output): Likewise.
4104 * server.c (handle_search_memory): Likewise.
4105 (handle_qxfer_exec_file): Likewise.
4106 (handle_qxfer_libraries): Likewise.
4107 (handle_qxfer): Likewise.
4108 (handle_query): Likewise.
4109 (handle_v_cont): Likewise.
4110 (handle_v_run): Likewise.
4111 (captured_main): Likewise.
4112 * target.c (write_inferior_memory): Likewise.
4113 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4114 * tracepoint.c (init_trace_buffer): Likewise.
4115 (add_tracepoint_action): Likewise.
4116 (add_traceframe): Likewise.
4117 (add_traceframe_block): Likewise.
4118 (cmd_qtdpsrc): Likewise.
4119 (cmd_qtdv): Likewise.
4120 (cmd_qtstatus): Likewise.
4121 (response_source): Likewise.
4122 (response_tsv): Likewise.
4123 (cmd_qtnotes): Likewise.
4124 (gdb_collect): Likewise.
4125 (initialize_tracepoint): Likewise.
4126
afbe19f8
PL
41272015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4128
4129 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4130 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4131 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4132 <NOP>: New.
4133 (enum aarch64_condition_codes): New enum.
4134 (w0): New static global.
4135 (fp): Likewise.
4136 (lr): Likewise.
4137 (struct aarch64_memory_operand) <type>: New
4138 MEMORY_OPERAND_POSTINDEX type.
4139 (postindex_memory_operand): New helper function.
4140 (emit_ret): New function.
4141 (emit_load_store_pair): New function, factored out of emit_stp
4142 with support for MEMORY_OPERAND_POSTINDEX.
4143 (emit_stp): Rewrite using emit_load_store_pair.
4144 (emit_ldp): New function.
4145 (emit_load_store): Likewise.
4146 (emit_ldr): Mention post-index instruction in comment.
4147 (emit_ldrh): New function.
4148 (emit_ldrb): New function.
4149 (emit_ldrsw): Mention post-index instruction in comment.
4150 (emit_str): Likewise.
4151 (emit_subs): New function.
4152 (emit_cmp): Likewise.
4153 (emit_and): Likewise.
4154 (emit_orr): Likewise.
4155 (emit_orn): Likewise.
4156 (emit_eor): Likewise.
4157 (emit_mvn): Likewise.
4158 (emit_lslv): Likewise.
4159 (emit_lsrv): Likewise.
4160 (emit_asrv): Likewise.
4161 (emit_mul): Likewise.
4162 (emit_sbfm): Likewise.
4163 (emit_sbfx): Likewise.
4164 (emit_ubfm): Likewise.
4165 (emit_ubfx): Likewise.
4166 (emit_csinc): Likewise.
4167 (emit_cset): Likewise.
4168 (emit_nop): Likewise.
4169 (emit_ops_insns): New helper function.
4170 (emit_pop): Likewise.
4171 (emit_push): Likewise.
4172 (aarch64_emit_prologue): New function.
4173 (aarch64_emit_epilogue): Likewise.
4174 (aarch64_emit_add): Likewise.
4175 (aarch64_emit_sub): Likewise.
4176 (aarch64_emit_mul): Likewise.
4177 (aarch64_emit_lsh): Likewise.
4178 (aarch64_emit_rsh_signed): Likewise.
4179 (aarch64_emit_rsh_unsigned): Likewise.
4180 (aarch64_emit_ext): Likewise.
4181 (aarch64_emit_log_not): Likewise.
4182 (aarch64_emit_bit_and): Likewise.
4183 (aarch64_emit_bit_or): Likewise.
4184 (aarch64_emit_bit_xor): Likewise.
4185 (aarch64_emit_bit_not): Likewise.
4186 (aarch64_emit_equal): Likewise.
4187 (aarch64_emit_less_signed): Likewise.
4188 (aarch64_emit_less_unsigned): Likewise.
4189 (aarch64_emit_ref): Likewise.
4190 (aarch64_emit_if_goto): Likewise.
4191 (aarch64_emit_goto): Likewise.
4192 (aarch64_write_goto_address): Likewise.
4193 (aarch64_emit_const): Likewise.
4194 (aarch64_emit_call): Likewise.
4195 (aarch64_emit_reg): Likewise.
4196 (aarch64_emit_pop): Likewise.
4197 (aarch64_emit_stack_flush): Likewise.
4198 (aarch64_emit_zero_ext): Likewise.
4199 (aarch64_emit_swap): Likewise.
4200 (aarch64_emit_stack_adjust): Likewise.
4201 (aarch64_emit_int_call_1): Likewise.
4202 (aarch64_emit_void_call_2): Likewise.
4203 (aarch64_emit_eq_goto): Likewise.
4204 (aarch64_emit_ne_goto): Likewise.
4205 (aarch64_emit_lt_goto): Likewise.
4206 (aarch64_emit_le_goto): Likewise.
4207 (aarch64_emit_gt_goto): Likewise.
4208 (aarch64_emit_ge_got): Likewise.
4209 (aarch64_emit_ops_impl): New static global variable.
4210 (aarch64_emit_ops): New target function, return
4211 &aarch64_emit_ops_impl.
4212 (struct linux_target_ops): Install it.
4213
bb903df0
PL
42142015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4215
4216 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4217 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4218 aarch64-ipa.o.
4219 * linux-aarch64-ipa.c: New file.
4220 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4221 and endian.h.
4222 (aarch64_get_thread_area): New target method.
4223 (extract_signed_bitfield): New helper function.
4224 (aarch64_decode_ldr_literal): New function.
4225 (enum aarch64_opcodes): New enum.
4226 (struct aarch64_register): New struct.
4227 (struct aarch64_operand): New struct.
4228 (x0): New static global.
4229 (x1): Likewise.
4230 (x2): Likewise.
4231 (x3): Likewise.
4232 (x4): Likewise.
4233 (w2): Likewise.
4234 (ip0): Likewise.
4235 (sp): Likewise.
4236 (xzr): Likewise.
4237 (aarch64_register): New helper function.
4238 (register_operand): Likewise.
4239 (immediate_operand): Likewise.
4240 (struct aarch64_memory_operand): New struct.
4241 (offset_memory_operand): New helper function.
4242 (preindex_memory_operand): Likewise.
4243 (enum aarch64_system_control_registers): New enum.
4244 (ENCODE): New macro.
4245 (emit_insn): New helper function.
4246 (emit_b): New function.
4247 (emit_bcond): Likewise.
4248 (emit_cb): Likewise.
4249 (emit_tb): Likewise.
4250 (emit_blr): Likewise.
4251 (emit_stp): Likewise.
4252 (emit_ldp_q_offset): Likewise.
4253 (emit_stp_q_offset): Likewise.
4254 (emit_load_store): Likewise.
4255 (emit_ldr): Likewise.
4256 (emit_ldrsw): Likewise.
4257 (emit_str): Likewise.
4258 (emit_ldaxr): Likewise.
4259 (emit_stxr): Likewise.
4260 (emit_stlr): Likewise.
4261 (emit_data_processing_reg): Likewise.
4262 (emit_data_processing): Likewise.
4263 (emit_add): Likewise.
4264 (emit_sub): Likewise.
4265 (emit_mov): Likewise.
4266 (emit_movk): Likewise.
4267 (emit_mov_addr): Likewise.
4268 (emit_mrs): Likewise.
4269 (emit_msr): Likewise.
4270 (emit_sevl): Likewise.
4271 (emit_wfe): Likewise.
4272 (append_insns): Likewise.
4273 (can_encode_int32_in): New helper function.
4274 (aarch64_relocate_instruction): New function.
4275 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4276 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4277 (struct linux_target_ops): Install aarch64_get_thread_area,
4278 aarch64_install_fast_tracepoint_jump_pad and
4279 aarch64_get_min_fast_tracepoint_insn_len.
4280
787749ea
PL
42812015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4282
4283 * Makefile.in (aarch64-insn.o): New rule.
4284 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4285
9812b2e6
YQ
42862015-09-21 Yao Qi <yao.qi@linaro.org>
4287
4288 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4289
18fe412b
YQ
42902015-09-21 Yao Qi <yao.qi@linaro.org>
4291
4292 * tracepoint.c (max_jump_pad_size): Remove.
4293
a0cc84cd
YQ
42942015-09-18 Yao Qi <yao.qi@linaro.org>
4295
4296 * linux-aarch64-low.c: Don't include sys/uio.h.
4297 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4298
d78908cf
WW
42992015-09-16 Wei-cheng Wang <cole945@gmail.com>
4300
4301 * tracepoint.c (eval_result_type): Change prototype.
4302 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4303
d57e0d50
PA
43042015-09-15 Pedro Alves <palves@redhat.com>
4305
4306 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4307 Check whether to report exec events instead of checking whether
4308 multiprocess is enabled.
4309
5a676acc
PA
43102015-09-15 Pedro Alves <palves@redhat.com>
4311
4312 PR remote/18965
4313 * remote-utils.c (prepare_resume_reply): Merge
4314 TARGET_WAITKIND_VFORK_DONE switch case with the
4315 TARGET_WAITKIND_FORKED case.
4316
7c5d0fad
YQ
43172015-09-15 Yao Qi <yao.qi@linaro.org>
4318
4319 * server.c (handle_query): Check string comparison using
4320 "else if" instead of "if".
4321
750ce8d1
YQ
43222015-09-15 Yao Qi <yao.qi@linaro.org>
4323
4324 * server.c (vCont_supported): New global variable.
4325 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4326 matches. Append ";vContSupported+" to own_buf.
4327 (handle_v_requests): Append ";s;S" to own_buf if target supports
4328 hardware single step or vCont_supported is false.
4329 (capture_main): Set vCont_supported to zero.
4330
70b90b91
YQ
43312015-09-15 Yao Qi <yao.qi@linaro.org>
4332
4333 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4334 it to ...
4335 (linux_supports_hardware_single_step): ... New function.
4336 (linux_target_ops): Update.
4337 * lynx-low.c (lynx_target_ops): Set field
4338 supports_hardware_single_step to target_can_do_hardware_single_step.
4339 * nto-low.c (nto_target_ops): Likewise.
4340 * spu-low.c (spu_target_ops): Likewise.
4341 * win32-low.c (win32_target_ops): Likewise.
4342 * target.c (target_can_do_hardware_single_step): New function.
4343 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4344 Remove. <supports_hardware_single_step>: New field.
4345 (target_supports_conditional_breakpoints): Remove.
4346 (target_supports_hardware_single_step): New macro.
4347 (target_can_do_hardware_single_step): Declare.
4348 * server.c (handle_query): Use target_supports_hardware_single_step
4349 instead of target_supports_conditional_breakpoints.
4350
ade90bde
YQ
43512015-09-15 Yao Qi <yao.qi@linaro.org>
4352
4353 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4354 function.
4355 (struct linux_target_ops the_low_target): Install
4356 aarch64_linux_siginfo_fixup.
4357
94585166
DB
43582015-09-11 Don Breazeal <donb@codesourcery.com>
4359 Luis Machado <lgustavo@codesourcery.com>
4360
4361 * linux-low.c (linux_mourn): Static declaration.
4362 (linux_arch_setup): Move in front of
4363 handle_extended_wait.
4364 (linux_arch_setup_thread): New function.
4365 (handle_extended_wait): Handle exec events. Call
4366 linux_arch_setup_thread. Make event_lwp argument a
4367 pointer-to-a-pointer.
4368 (check_zombie_leaders): Do not check stopped threads.
4369 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4370 (linux_low_filter_event): Add lwp and thread for exec'ing
4371 non-leader thread if leader thread has been deleted.
4372 Refactor code into linux_arch_setup_thread and call it.
4373 Pass child lwp pointer by reference to handle_extended_wait.
4374 (linux_wait_for_event_filtered): Update comment.
4375 (linux_wait_1): Prevent clobbering exec event status.
4376 (linux_supports_exec_events): New function.
4377 (linux_target_ops) <supports_exec_events>: Initialize new member.
4378 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4379 new member.
4380 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4381 * server.c (report_exec_events): New global variable.
4382 (handle_query): Handle qSupported query for exec-events feature.
4383 (captured_main): Initialize report_exec_events.
4384 * server.h (report_exec_events): Declare new global variable.
4385 * target.h (struct target_ops) <supports_exec_events>: New
4386 member.
4387 (target_supports_exec_events): New macro.
4388 * win32-low.c (win32_target_ops) <supports_exec_events>:
4389 Initialize new member.
4390
0568462b
MM
43912015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4392
4393 * linux-low.c (linux_low_enable_btrace): Remove.
4394 (linux_target_ops): Replace linux_low_enable_btrace with
4395 linux_enable_btrace.
4396
39edd165
YQ
43972015-09-03 Yao Qi <yao.qi@linaro.org>
4398
4399 * linux-aarch64-low.c (aarch64_insert_point): Call
4400 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4401 returns true.
4402
1db33b5a
UW
44032015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4404
4405 * linux-low.c (check_stopped_by_breakpoint): Use
4406 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4407
ab290430
PA
44082015-08-27 Pedro Alves <palves@redhat.com>
4409
4410 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4411
8d749320
SM
44122015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4413
6711b7f8
SM
4414 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4415 the XNEW-family equivalent.
8d749320
SM
4416 (compile_bytecodes): Likewise.
4417 * dll.c (loaded_dll): Likewise.
4418 * event-loop.c (append_callback_event): Likewise.
4419 (create_file_handler): Likewise.
4420 (create_file_event): Likewise.
4421 * hostio.c (handle_open): Likewise.
4422 * inferiors.c (add_thread): Likewise.
4423 (add_process): Likewise.
4424 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4425 * linux-arm-low.c (arm_new_process): Likewise.
4426 (arm_new_thread): Likewise.
4427 * linux-low.c (add_to_pid_list): Likewise.
4428 (linux_add_process): Likewise.
4429 (handle_extended_wait): Likewise.
4430 (add_lwp): Likewise.
4431 (enqueue_one_deferred_signal): Likewise.
4432 (enqueue_pending_signal): Likewise.
4433 (linux_resume_one_lwp_throw): Likewise.
4434 (linux_resume_one_thread): Likewise.
4435 (linux_read_memory): Likewise.
4436 (linux_write_memory): Likewise.
4437 * linux-mips-low.c (mips_linux_new_process): Likewise.
4438 (mips_linux_new_thread): Likewise.
4439 (mips_add_watchpoint): Likewise.
4440 * linux-x86-low.c (initialize_low_arch): Likewise.
4441 * lynx-low.c (lynx_add_process): Likewise.
4442 * mem-break.c (set_raw_breakpoint_at): Likewise.
4443 (set_breakpoint): Likewise.
4444 (add_condition_to_breakpoint): Likewise.
4445 (add_commands_to_breakpoint): Likewise.
4446 (clone_agent_expr): Likewise.
4447 (clone_one_breakpoint): Likewise.
4448 * regcache.c (new_register_cache): Likewise.
4449 * remote-utils.c (look_up_one_symbol): Likewise.
4450 * server.c (queue_stop_reply): Likewise.
4451 (start_inferior): Likewise.
4452 (queue_stop_reply_callback): Likewise.
4453 (handle_target_event): Likewise.
4454 * spu-low.c (fetch_ppc_memory): Likewise.
4455 (store_ppc_memory): Likewise.
4456 * target.c (set_target_ops): Likewise.
4457 * thread-db.c (thread_db_load_search): Likewise.
4458 (try_thread_db_load_1): Likewise.
4459 * tracepoint.c (add_tracepoint): Likewise.
4460 (add_tracepoint_action): Likewise.
4461 (create_trace_state_variable): Likewise.
4462 (cmd_qtdpsrc): Likewise.
4463 (cmd_qtro): Likewise.
4464 (add_while_stepping_state): Likewise.
4465 * win32-low.c (child_add_thread): Likewise.
4466 (get_image_name): Likewise.
4467
ed8b7b42
YQ
44682015-08-25 Yao Qi <yao.qi@linaro.org>
4469
4470 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4471
db3cb7cb
YQ
44722015-08-25 Yao Qi <yao.qi@linaro.org>
4473
4474 * Makefile.in (aarch64-linux.o): New rule.
4475 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4476 srv_tgtobj.
4477 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4478 (aarch64_init_debug_reg_state): Make it extern.
4479 (aarch64_linux_prepare_to_resume): Remove.
4480
f6011a1c
YQ
44812015-08-25 Yao Qi <yao.qi@linaro.org>
4482
4483 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4484 lwp_arch_private_info and ptid_of_lwp.
4485
88e2cf7e
YQ
44862015-08-25 Yao Qi <yao.qi@linaro.org>
4487
4488 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4489 Find proc_info by find_process_pid. All callers updated.
4490
5e35436e
YQ
44912015-08-25 Yao Qi <yao.qi@linaro.org>
4492
4493 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4494 Remove.
4495 (debug_reg_change_callback): Remove.
4496 (aarch64_notify_debug_reg_change): Remove.
4497
4a8a7965
YQ
44982015-08-25 Yao Qi <yao.qi@linaro.org>
4499
4500 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4501 Call current_lwp_ptid.
4502
32a271ee
YQ
45032015-08-25 Yao Qi <yao.qi@linaro.org>
4504
4505 * linux-aarch64-low.c (debug_reg_change_callback): Use
4506 debug_printf.
4507
0d51c8d7
YQ
45082015-08-25 Yao Qi <yao.qi@linaro.org>
4509
4510 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4511
31a43dd5
YQ
45122015-08-25 Yao Qi <yao.qi@linaro.org>
4513
4514 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4515
8ee52567
YQ
45162015-08-25 Yao Qi <yao.qi@linaro.org>
4517
4518 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4519 the code.
4520
ff3f0f45
YQ
45212015-08-25 Yao Qi <yao.qi@linaro.org>
4522
4523 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4524 Remove.
4525 (debug_reg_change_callback): Remove argument entry and add argument
4526 lwp. Remove local variable thread. Don't print thread id in the
4527 debugging output. Don't check whether pid of thread equals to pid.
4528 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4529 iterate_over_lwps instead find_inferior.
4530
3d40fbb5
PA
45312015-08-24 Pedro Alves <palves@redhat.com>
4532
4533 * inferiors.c (get_first_process): New function.
4534 * inferiors.h (get_first_process): New declaration.
4535 * remote-utils.c (read_ptid): Default to the first process in the
4536 list, instead of to the current thread's process.
4537
438e1e42
PA
45382015-08-24 Pedro Alves <palves@redhat.com>
4539
4540 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4541 * event-loop.c: Likewise.
4542 * remote-utils.c: Likewise.
4543 * tracepoint.c: Likewise.
4544
a8c6d4fc
PA
45452015-08-24 Pedro Alves <palves@redhat.com>
4546
4547 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4548 ptid_get_lwp.
4549
99b0bb12
PA
45502015-08-21 Pedro Alves <palves@redhat.com>
4551
4552 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4553 instead of literal 1.
4554
f8904751
PA
45552015-08-21 Pedro Alves <palves@redhat.com>
4556
4557 * tdesc.c (default_description): Explicitly zero-initialize.
4558
465a859e
PA
45592015-08-21 Pedro Alves <palves@redhat.com>
4560
4561 PR gdb/18749
4562 * inferiors.c (remove_thread): Discard any pending stop reply for
4563 this thread.
4564 * server.c (remove_all_on_match_pid): Rename to ...
4565 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4566 instead of a pid.
4567 (discard_queued_stop_replies): Change parameter to a ptid. Now
4568 extern.
4569 (handle_v_kill, kill_inferior_callback, captured_main)
4570 (process_serial_event): Adjust.
4571 * server.h (discard_queued_stop_replies): Declare.
4572
f0db101d
PA
45732015-08-21 Pedro Alves <palves@redhat.com>
4574
4575 * linux-low.c (wait_for_sigstop): Always switch to no thread
4576 selected if the previously current thread dies.
4577 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4578 process instead of the current thread's.
4579 * remote-utils.c (input_interrupt): Don't check if there's no
4580 current thread.
4581 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4582 current thread to the general thread fails, error out.
4583 (handle_qxfer_auxv, handle_qxfer_libraries)
4584 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4585 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4586 (handle_query): Check if there's a thread selected instead of
4587 checking whether there's any thread in the thread list.
4588 (handle_qxfer_threads, handle_qxfer_btrace)
4589 (handle_qxfer_btrace_conf): Don't error out early if there's no
4590 thread in the thread list.
4591 (handle_v_cont, myresume): Don't set the current thread to the
4592 continue thread.
4593 (process_serial_event) <Hg handling>: Also set thread_id if the
4594 previous general thread is still alive.
4595 (process_serial_event) <g/G handling>: If setting the current
4596 thread to the general thread fails, error out.
4597 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4598 thread's lwp instead of the current thread's.
4599 * target.c (set_desired_thread): If the desired thread was not
4600 found, leave the current thread pointing to NULL. Return an int
4601 (boolean) indicating success.
4602 * target.h (set_desired_thread): Change return type to int.
4603
40045d91
MF
46042015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4605
4606 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4607 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4608 #includes.
4609 (ps_get_thread_area): New function.
4610
45face3b
GB
46112015-08-19 Gary Benson <gbenson@redhat.com>
4612
4613 * hostio.c (handle_pread): Do not attempt to read more data
4614 than hostio_reply_with_data can fit in a packet.
4615
16d5f642
JB
46162015-08-18 Joel Brobecker <brobecker@adacore.com>
4617
4618 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4619
a738da3a
MF
46202015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4621
4622 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4623
33ebda9d
PA
46242015-08-06 Pedro Alves <palves@redhat.com>
4625
4626 * tracepoint.c (expr_eval_result): Now an int.
4627
a44892be
PA
46282015-08-06 Pedro Alves <palves@redhat.com>
4629
4630 * gdbthread.h (struct regcache): Forward declare.
4631 (struct thread_info) <regcache_data>: Now a struct regcache
4632 pointer.
4633 * inferiors.c (inferior_regcache_data)
4634 (set_inferior_regcache_data): Now work with struct regcache
4635 pointers.
4636 * inferiors.h (struct regcache): Forward declare.
4637 (inferior_regcache_data, set_inferior_regcache_data): Now work
4638 with struct regcache pointers.
4639 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4640 (free_register_cache_thread): Remove struct regcache pointer
4641 casts.
4642
608a1e46
PA
46432015-08-06 Pedro Alves <palves@redhat.com>
4644
4645 * server.c (captured_main): On error, print the exception message
4646 to stderr, and if run_once is set, throw a quit.
4647
f0ce0d3a
PA
46482015-08-06 Pedro Alves <palves@redhat.com>
4649
4650 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4651 the current thread.
4652
bf47e248
PA
46532015-08-06 Pedro Alves <palves@redhat.com>
4654
4655 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4656 reading beyond the passed in buffer length.
4657
b6b9ffcc
PL
46582015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4659
4660 * tracepoint.c (symbol_list) <required>: Remove.
4661
863d01bd
PA
46622015-08-06 Pedro Alves <palves@redhat.com>
4663
4664 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4665 count if stopping and suspending threads.
4666 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4667 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4668 (linux_detach): Complete an ongoing step-over.
4669 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4670 throughout.
4671 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4672 (linux_wait_1): If passing a signal to the inferior after
4673 finishing a step-over, unsuspend and re-resume all lwps. If we
4674 see a single-step event but the thread should be continuing, don't
4675 pass the trap to gdb.
4676 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4677 internal_error instead of gdb_assert.
4678 (enqueue_pending_signal): New function.
4679 (check_ptrace_stopped_lwp_gone): Add debug output.
4680 (start_step_over): Use internal_error instead of gdb_assert.
4681 (complete_ongoing_step_over): New function.
4682 (linux_resume_one_thread): Don't resume a suspended thread.
4683 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4684 it stepping.
4685
00db26fa
PA
46862015-08-06 Pedro Alves <palves@redhat.com>
4687
4688 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4689 (linux_thread_alive): Use lwp_is_marked_dead.
4690 (extended_event_reported): Delete.
4691 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4692 instead of extended_event_reported.
4693 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4694 as well.
4695 (lwp_is_marked_dead): New function.
4696 (lwp_running): Use lwp_is_marked_dead.
4697 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4698 comment.
4699
ad071a30
PA
47002015-08-06 Pedro Alves <palves@redhat.com>
4701
4702 * linux-low.c (linux_wait_1): Move fork event output out of the
4703 !report_to_gdb check. Pass event_child->waitstatus to
4704 target_waitstatus_to_string instead of ourstatus.
4705
524b57e6
YQ
47062015-08-04 Yao Qi <yao.qi@linaro.org>
4707
4708 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4709 if current_thread is 32 bit.
4710
6085d6f6
YQ
47112015-08-04 Yao Qi <yao.qi@linaro.org>
4712
4713 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4714 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4715 * server.c (extended_protocol): Remove "static".
4716 * server.h (extended_protocol): Declare it.
4717
8a7e4587
YQ
47182015-08-04 Yao Qi <yao.qi@linaro.org>
4719
4720 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4721 both aarch64 and aarch32.
4722 (aarch64_set_pc): Likewise.
4723
3b53ae99
YQ
47242015-08-04 Yao Qi <yao.qi@linaro.org>
4725
4726 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4727 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4728 arm-with-neon.xml to srv_xmlfiles.
4729 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4730 (is_64bit_tdesc): New function.
4731 (aarch64_linux_read_description): New function.
4732 (aarch64_arch_setup): Call aarch64_linux_read_description.
4733 (regs_info): Rename to regs_info_aarch64.
4734 (aarch64_regs_info): Return right regs_info.
4735 (initialize_low_arch): Call initialize_low_arch_aarch32.
4736
bd9e6534
YQ
47372015-08-04 Yao Qi <yao.qi@linaro.org>
4738
4739 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4740 * linux-aarch32-low.c: New file.
4741 * linux-aarch32-low.h: New file.
4742 * linux-arm-low.c (arm_fill_gregset): Move it to
4743 linux-aarch32-low.c.
4744 (arm_store_gregset): Likewise.
4745 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4746 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4747 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4748 (regs_info): Rename to regs_info_arm.
4749 (arm_regs_info): Return regs_info_aarch32 if
4750 have_ptrace_getregset is 1 and target description is
4751 arm_with_neon or arm_with_vfpv3.
4752 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4753 Call initialize_low_arch_aarch32 instead.
4754
ded48a5e
YQ
47552015-08-04 Yao Qi <yao.qi@linaro.org>
4756
4757 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4758 * linux-low.c: ... here.
4759 * linux-low.h (have_ptrace_getregset): Declare it.
4760
96e9210f
PA
47612015-08-04 Pedro Alves <palves@redhat.com>
4762
4763 * thread-db.c (struct thread_db): Use new typedefs.
4764 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4765 CHK calls.
4766 (disable_thread_event_reporting): Cast result of dlsym to
4767 destination function pointer type.
4768 (thread_db_mourn): Use td_ta_delete_ftype.
4769
af60a1ef
SL
47702015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4771
4772 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4773 arch variant.
4774 (CDX_BREAKPOINT): Define for R2.
4775 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4776 (the_low_target): Add comments.
4777
e8b41681
YQ
47782015-07-30 Yao Qi <yao.qi@linaro.org>
4779
4780 * linux-arm-low.c (arm_hwcap): Remove it.
4781 (arm_read_description): New local variable arm_hwcap. Don't
4782 set arm_hwcap to zero.
4783
89abb039
YQ
47842015-07-30 Yao Qi <yao.qi@linaro.org>
4785
4786 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4787 Use regcache->tdesc instead.
4788 (arm_store_wmmxregset): Likewise.
4789 (arm_fill_vfpregset): Likewise.
4790 (arm_store_vfpregset): Likewise.
4791
deca266c
YQ
47922015-07-30 Yao Qi <yao.qi@linaro.org>
4793
4794 * linux-arm-low.c: Include arch/arm.h.
4795 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4796 (arm_store_gregset): Likewise.
4797
aa58a496
SM
47982015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4799
4800 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4801 ptrace's 4th parameter.
4802
50904b25
YQ
48032015-07-27 Yao Qi <yao.qi@linaro.org>
4804
4805 * configure.srv (case aarch64*-*-linux*): Don't set
4806 srv_linux_usrregs.
4807
5826e159
PA
48082015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4809
4810 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4811 sys/ptrace.h.
4812 * linux-arm-low.c: Likewise.
4813 * linux-cris-low.c: Likewise.
4814 * linux-crisv32-low.c: Likewise.
4815 * linux-low.c: Likewise.
4816 * linux-m68k-low.c: Likewise.
4817 * linux-mips-low.c: Likewise.
4818 * linux-nios2-low.c: Likewise.
4819 * linux-s390-low.c: Likewise.
4820 * linux-sparc-low.c: Likewise.
4821 * linux-tic6x-low.c: Likewise.
4822 * linux-tile-low.c: Likewise.
4823 * linux-x86-low.c: Likewise.
4824
54019719
PA
48252015-07-24 Pedro Alves <palves@redhat.com>
4826
4827 * config.in: Regenerate.
4828 * configure: Regenerate.
4829
eb7aa561
PA
48302015-07-24 Pedro Alves <palves@redhat.com>
4831
4832 * acinclude.m4: Include ../ptrace.m4.
4833 * configure.ac: Call GDB_AC_PTRACE.
4834 * config.in, configure: Regenerate.
4835
55d7b841
YQ
48362015-07-24 Yao Qi <yao.qi@linaro.org>
4837
4838 * linux-low.c (linux_create_inferior): Remove setting to
4839 proc->priv->new_inferior.
4840 (linux_attach): Likewise.
4841 (linux_low_filter_event): Likewise.
4842 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4843
c06cbd92
YQ
48442015-07-24 Yao Qi <yao.qi@linaro.org>
4845
4846 * linux-low.c (linux_arch_setup): New function.
4847 (linux_low_filter_event): If proc->tdesc is NULL and
4848 proc->attached is true, call the_low_target.arch_setup.
4849 Otherwise, keep status pending, and return.
4850 (linux_resume_one_lwp_throw): Don't call get_pc if
4851 thread->while_stepping isn't NULL. Don't call
4852 get_thread_regcache if proc->tdesc is NULL.
4853 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4854 (linux_target_ops): Install arch_setup.
4855 * server.c (start_inferior): Call the_target->arch_setup.
4856 * target.h (struct target_ops) <arch_setup>: New field.
4857 (target_arch_setup): New marco.
4858 * lynx-low.c (lynx_target_ops): Update.
4859 * nto-low.c (nto_target_ops): Update.
4860 * spu-low.c (spu_target_ops): Update.
4861 * win32-low.c (win32_target_ops): Update.
4862
5ae3ebba
YQ
48632015-07-24 Yao Qi <yao.qi@linaro.org>
4864
4865 * linux-low.c (linux_add_process): Don't set
4866 proc->priv->new_inferior.
4867 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4868 (linux_attach): Likewise.
4869
eb97750b
YQ
48702015-07-24 Yao Qi <yao.qi@linaro.org>
4871
4872 * server.c (start_inferior): Code refactor.
4873
51aee833
YQ
48742015-07-24 Yao Qi <yao.qi@linaro.org>
4875
4876 * server.c (process_serial_event): Set general_thread.
4877
af1b22f3
YQ
48782015-07-21 Yao Qi <yao.qi@linaro.org>
4879
4880 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4881 aarch64_linux_get_debug_reg_capacity.
4882
554717a3
YQ
48832015-07-17 Yao Qi <yao.qi@linaro.org>
4884
4885 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4886 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4887 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4888 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4889 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4890 (AARCH64_HWP_ALIGNMENT): Likewise.
4891 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4892 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4893 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4894 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4895 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4896 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4897 (struct aarch64_debug_reg_state): Likewise.
4898 (struct arch_lwp_info): Likewise.
4899 (aarch64_align_watchpoint): Likewise.
4900 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4901 (aarch64_watchpoint_length): Likewise.
4902 (aarch64_point_encode_ctrl_reg): Likewise
4903 (aarch64_point_is_aligned): Likewise.
4904 (aarch64_align_watchpoint): Likewise.
4905 (aarch64_linux_set_debug_regs):
4906 (aarch64_dr_state_insert_one_point): Likewise.
4907 (aarch64_dr_state_remove_one_point): Likewise.
4908 (aarch64_handle_breakpoint): Likewise.
4909 (aarch64_handle_aligned_watchpoint): Likewise.
4910 (aarch64_handle_unaligned_watchpoint): Likewise.
4911 (aarch64_handle_watchpoint): Likewise.
4912
c67ca4de
YQ
49132015-07-17 Yao Qi <yao.qi@linaro.org>
4914
4915 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4916 and don't aarch64_get_debug_reg_state. All callers update.
4917 (aarch64_handle_aligned_watchpoint): Likewise.
4918 (aarch64_handle_unaligned_watchpoint): Likewise.
4919 (aarch64_handle_watchpoint): Likewise.
4920 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4921 (aarch64_remove_point): Likewise.
4922
25abf979
YQ
49232015-07-17 Yao Qi <yao.qi@linaro.org>
4924
4925 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4926 debug_printf.
4927 (aarch64_handle_unaligned_watchpoint): Likewise.
4928
db1ff28b
JK
49292015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4930
4931 Revert the previous 3 commits:
4932 Move gdb_regex* to common/
4933 Move linux_find_memory_regions_full & co.
4934 gdbserver build-id attribute generator
4935
700ca40f
JK
49362015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4937 Jan Kratochvil <jan.kratochvil@redhat.com>
4938
4939 gdbserver build-id attribute generator.
4940 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4941 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4942 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4943 (find_phdr): New.
4944 (get_dynamic): Use find_pdhr to traverse program headers.
4945 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4946 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4947 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4948 (get_hex_build_id): New.
4949 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4950 to reply XML document.
4951
9904185c
JK
49522015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4953 Jan Kratochvil <jan.kratochvil@redhat.com>
4954
4955 * target.c: Include target/target-utils.h and fcntl.h.
4956 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4957 (target_fileio_read_stralloc): New functions.
4958
6e5b4429
JK
49592015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4960
4961 * Makefile.in (OBS): Add gdb_regex.o.
4962 (gdb_regex.o): New.
4963 * config.in: Rebuilt.
4964 * configure: Rebuilt.
4965
ddc98fbf
JK
49662015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4967 Jan Kratochvil <jan.kratochvil@redhat.com>
4968
4969 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4970 * Makefile.in (OBS): Add target-utils.o.
4971 (linux-maps.o, target-utils.o): New.
4972 * configure.srv (srv_linux_obj): Add linux-maps.o.
4973
e57bb7a0
PL
49742015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4975
4976 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4977 function, return 1.
4978 (the_low_target): Install it.
4979
586b02a9
PA
49802015-07-14 Pedro Alves <palves@redhat.com>
4981
4982 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4983 Instead, ignore ECHILD, and throw an error for other errnos.
4984
58c1b36c
PA
49852015-07-10 Pedro Alves <palves@redhat.com>
4986
4987 * event-loop.c (struct callback_event) <data>: Change type to
4988 gdb_client_data instance instead of gdb_client_data pointer.
4989 (append_callback_event): Adjust.
4990
421530db
PL
49912015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4992
4993 * linux-aarch64-low.c: Add comments for each linux_target_ops
4994 method. Remove comments already covered in target_ops and
4995 linux_target_ops definitions.
4996 (the_low_target): Add comments for each unimplemented method.
4997
c2d65f38
YQ
49982015-07-09 Yao Qi <yao.qi@linaro.org>
4999
5000 * linux-aarch64-low.c (aarch64_regmap): Remove.
5001 (aarch64_usrregs_info): Remove.
5002 (regs_info): Set field usrregs to NULL.
5003
b20a6524
MM
50042015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5005
5006 * linux-low.c: Include "rsp-low.h"
5007 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5008 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5009 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5010 (handle_btrace_enable_pt): New.
5011 (handle_btrace_general_set): Support "pt".
5012 (handle_btrace_conf_general_set): Support "pt:size".
5013
96c97461
PL
50142015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5015
5016 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5017 Z_PACKET_SW_BP.
5018
37d66942
PL
50192015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5020
5021 * linux-aarch64-low.c: Remove comment about endianness.
5022 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5023 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5024 memcmp.
5025
dc06243f
GB
50262015-06-24 Gary Benson <gbenson@redhat.com>
5027
5028 * linux-i386-ipa.c (stdint.h): Do not include.
5029 * lynx-i386-low.c (stdint.h): Likewise.
5030 * lynx-ppc-low.c (stdint.h): Likewise.
5031 * mem-break.c (stdint.h): Likewise.
5032 * thread-db.c (stdint.h): Likewise.
5033 * tracepoint.c (stdint.h): Likewise.
5034 * win32-low.c (stdint.h): Likewise.
5035
124e13d9
SM
50362015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5037
5038 * server.c (write_qxfer_response): Update call to
5039 remote_escape_output.
5040
909c2cda
JK
50412015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5042 Jan Kratochvil <jan.kratochvil@redhat.com>
5043
5044 Merge multiple hex conversions.
5045 * gdbreplay.c (tohex): Rename to 'fromhex'.
5046 (logchar): Use fromhex.
5047
24c05f46
JK
50482015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5049
5050 * server.c (handle_qxfer_libraries): Set `version' attribute for
5051 <library-list>.
5052
14d2069a
GB
50532015-06-10 Gary Benson <gbenson@redhat.com>
5054
5055 * target.h (struct target_ops) <multifs_open>: New field.
5056 <multifs_unlink>: Likewise.
5057 <multifs_readlink>: Likewise.
5058 * linux-low.c (nat/linux-namespaces.h): New include.
5059 (linux_target_ops): Initialize the_target->multifs_open,
5060 the_target->multifs_unlink and the_target->multifs_readlink.
5061 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5062 * hostio.c (hostio_fs_pid): New static variable.
5063 (hostio_handle_new_gdb_connection): New function.
5064 (handle_setfs): Likewise.
5065 (handle_open): Use the_target->multifs_open as appropriate.
5066 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5067 (handle_readlink): Use the_target->multifs_readlink as
5068 appropriate.
5069 (handle_vFile): Handle vFile:setfs packets.
5070 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5071 after target_handle_new_gdb_connection.
5072
4b8b5e72
GB
50732015-06-10 Gary Benson <gbenson@redhat.com>
5074
5075 * configure.ac (AC_CHECK_FUNCS): Add setns.
5076 * config.in: Regenerate.
5077 * configure: Likewise.
5078 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5079 (linux-namespaces.o): New rule.
5080 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5081
3ac2e371
GB
50822015-06-09 Gary Benson <gbenson@redhat.com>
5083
5084 * hostio.c (handle_open): Process mode argument with
5085 fileio_to_host_mode.
5086
ca9b78ce
YQ
50872015-06-01 Yao Qi <yao.qi@linaro.org>
5088
5089 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5090 * linux-x86-low.c: Likewise.
5091
bfacd19d
DB
50922015-05-28 Don Breazeal <donb@codesourcery.com>
5093
5094 * linux-low.c (handle_extended_wait): Initialize
5095 thread_info.last_resume_kind for new fork children.
5096
452003ef
PA
50972015-05-15 Pedro Alves <palves@redhat.com>
5098
5099 * target.h (target_handle_new_gdb_connection): Rewrite using if
5100 wrapped in do/while.
5101
1041a03c
JB
51022015-05-14 Joel Brobecker <brobecker@adacore.com>
5103
5104 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5105 * configure, config.in: Regenerate.
5106 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5107 Declare typedef.
5108
c269dbdb
DB
51092015-05-12 Don Breazeal <donb@codesourcery.com>
5110
5111 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5112 PTRACE_EVENT_VFORK_DONE.
5113 (linux_low_ptrace_options, extended_event_reported): Add vfork
5114 events.
5115 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5116 and "vforkdone" for RSP 'T' Stop Reply Packet.
5117 * server.h (report_vfork_events): Declare
5118 global variable.
5119
3a8a0396
DB
51202015-05-12 Don Breazeal <donb@codesourcery.com>
5121
5122 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5123 (the_low_target) <new_fork>: Initialize new member.
5124 * linux-arm-low.c (arm_new_fork): New function.
5125 (the_low_target) <new_fork>: Initialize new member.
5126 * linux-low.c (handle_extended_wait): Call new target function
5127 new_fork.
5128 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5129 * linux-mips-low.c (mips_add_watchpoint): New function
5130 extracted from mips_insert_point.
5131 (the_low_target) <new_fork>: Initialize new member.
5132 (mips_linux_new_fork): New function.
5133 (mips_insert_point): Call mips_add_watchpoint.
5134 * linux-x86-low.c (x86_linux_new_fork): New function.
5135 (the_low_target) <new_fork>: Initialize new member.
5136
de0d863e
DB
51372015-05-12 Don Breazeal <donb@codesourcery.com>
5138
5139 * linux-low.c (handle_extended_wait): Implement return value,
5140 rename argument 'event_child' to 'event_lwp', handle
5141 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5142 (linux_low_ptrace_options): New function.
5143 (linux_low_filter_event): Call linux_low_ptrace_options,
5144 use different argument fo linux_enable_event_reporting,
5145 use return value from handle_extended_wait.
5146 (extended_event_reported): New function.
5147 (linux_wait_1): Call extended_event_reported and set
5148 status to report fork events.
5149 (linux_write_memory): Add pid to debug message.
5150 (reset_lwp_ptrace_options_callback): New function.
5151 (linux_handle_new_gdb_connection): New function.
5152 (linux_target_ops): Initialize new structure member.
5153 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5154 * lynx-low.c: Initialize new structure member.
5155 * remote-utils.c (prepare_resume_reply): Implement stop reason
5156 "fork" for "T" stop message.
5157 * server.c (handle_query): Call handle_new_gdb_connection.
5158 * server.h (report_fork_events): Declare global flag.
5159 * target.h (struct target_ops) <handle_new_gdb_connection>:
5160 New member.
5161 (target_handle_new_gdb_connection): New macro.
5162 * win32-low.c: Initialize new structure member.
5163
ddcbc397
DB
51642015-05-12 Don Breazeal <donb@codesourcery.com>
5165
5166 * mem-break.c (APPEND_TO_LIST): Define macro.
5167 (clone_agent_expr): New function.
5168 (clone_one_breakpoint): New function.
5169 (clone_all_breakpoints): New function.
5170 * mem-break.h: Declare new functions.
5171
89245bc0
DB
51722015-05-12 Don Breazeal <donb@codesourcery.com>
5173
5174 * linux-low.c (linux_supports_fork_events): New function.
5175 (linux_supports_vfork_events): New function.
5176 (linux_target_ops): Initialize new structure members.
5177 (initialize_low): Call linux_check_ptrace_features.
5178 * lynx-low.c (lynx_target_ops): Initialize new structure
5179 members.
5180 * server.c (report_fork_events, report_vfork_events):
5181 New global flags.
5182 (handle_query): Add new features to qSupported packet and
5183 response.
5184 (captured_main): Initialize new global variables.
5185 * target.h (struct target_ops) <supports_fork_events>:
5186 New member.
5187 <supports_vfork_events>: New member.
5188 (target_supports_fork_events): New macro.
5189 (target_supports_vfork_events): New macro.
5190 * win32-low.c (win32_target_ops): Initialize new structure
5191 members.
5192
835205d0
GB
51932015-05-12 Gary Benson <gbenson@redhat.com>
5194
5195 * server.c (handle_qxfer_exec_file): Use current process
5196 if annex is empty.
5197
21e94bd9
SL
51982015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5199
5200 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5201 Remove HAVE_PTRACE_GETREGS conditionals.
5202 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5203 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5204
45614f15
YQ
52052015-05-08 Yao Qi <yao.qi@linaro.org>
5206
5207 * linux-low.c (linux_supports_conditional_breakpoints): New
5208 function.
5209 (linux_target_ops): Install new target method.
5210 * lynx-low.c (lynx_target_ops): Install NULL hook for
5211 supports_conditional_breakpoints.
5212 * nto-low.c (nto_target_ops): Likewise.
5213 * spu-low.c (spu_target_ops): Likewise.
5214 * win32-low.c (win32_target_ops): Likewise.
5215 * server.c (handle_query): Check
5216 target_supports_conditional_breakpoints.
5217 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5218 New field.
5219 (target_supports_conditional_breakpoints): New macro.
5220
80ad801e
PA
52212015-05-06 Pedro Alves <palves@redhat.com>
5222
5223 PR server/18081
5224 * server.c (start_inferior): If the process exits, mourn it.
5225
819843c7
GB
52262015-04-21 Gary Benson <gbenson@redhat.com>
5227
5228 * hostio.c (fileio_open_flags_to_host): Factored out to
5229 fileio_to_host_openflags in common/fileio.c. Single use
5230 updated.
5231
a2d5a9d7
MF
52322015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5233
5234 * linux-xtensa-low.c (xtensa_fill_gregset)
5235 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5236 XCHAL_HAVE_LOOP.
5237
deb44829
MF
52382015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5239
5240 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5241 (regs_info): Replace usrregs pointer with NULL.
5242
e57f1de3
GB
52432015-04-17 Gary Benson <gbenson@redhat.com>
5244
5245 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5246 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5247 * server.c (handle_qxfer_exec_file): New function.
5248 (qxfer_packets): Add exec-file entry.
5249 (handle_query): Report qXfer:exec-file:read as supported packet.
5250
62828379
RN
52512015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5252
5253 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5254
b88bb450
GB
52552015-04-09 Gary Benson <gbenson@redhat.com>
5256
5257 * hostio-errno.c (errno_to_fileio_error): Remove function.
5258 Update caller to use remote_fileio_to_fio_error.
5259
c8f4bfdd
YQ
52602015-04-09 Yao Qi <yao.qi@linaro.org>
5261
5262 * linux-low.c (linux_insert_point): Call
5263 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5264 (linux_remove_point): Call remove_memory_breakpoint if type is
5265 raw_bkpt_type_sw.
5266 * linux-x86-low.c (x86_insert_point): Don't call
5267 insert_memory_breakpoint.
5268 (x86_remove_point): Don't call remove_memory_breakpoint.
5269
41f98f02
PA
52702015-04-01 Pedro Alves <palves@redhat.com>
5271 Cleber Rosa <crosa@redhat.com>
5272
5273 * server.c (gdbserver_usage): Reorganize and extend the usage
5274 message.
5275
2bf6fb9d
PA
52762015-03-24 Pedro Alves <palves@redhat.com>
5277
5278 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5279 output. Also dump TRAP_TRACE.
5280 (linux_low_filter_event): In debug output, distinguish a
5281 resume_stop SIGSTOP from a delayed SIGSTOP.
5282
369f6daa
GB
52832015-03-24 Gary Benson <gbenson@redhat.com>
5284
5285 * linux-x86-low.c (x86_linux_new_thread): Moved to
5286 nat/x86-linux.c.
5287 (x86_linux_prepare_to_resume): Likewise.
5288
8e5d4070
GB
52892015-03-24 Gary Benson <gbenson@redhat.com>
5290
5291 * Makefile.in (x86-linux-dregs.o): New rule.
5292 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5293 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5294 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5295 (x86_linux_dr_get): Likewise.
5296 (x86_linux_dr_set): Likewise.
5297 (update_debug_registers_callback): Likewise.
5298 (x86_linux_dr_set_addr): Likewise.
5299 (x86_linux_dr_get_addr): Likewise.
5300 (x86_linux_dr_set_control): Likewise.
5301 (x86_linux_dr_get_control): Likewise.
5302 (x86_linux_dr_get_status): Likewise.
5303 (x86_linux_update_debug_registers): Likewise.
5304
2b95d440
GB
53052015-03-24 Gary Benson <gbenson@redhat.com>
5306
5307 * linux-x86-low.c (x86_linux_update_debug_registers):
5308 New function, factored out from...
5309 (x86_linux_prepare_to_resume): ...this.
5310
14b0bc68
GB
53112015-03-24 Gary Benson <gbenson@redhat.com>
5312
5313 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5314 (x86_linux_dr_set): Likewise.
5315 (update_debug_registers_callback): Likewise.
5316 (x86_linux_dr_set_addr): Likewise.
5317 (x86_linux_dr_get_addr): Likewise.
5318 (x86_linux_dr_set_control): Likewise.
5319 (x86_linux_dr_get_control): Likewise.
5320 (x86_linux_dr_get_status): Likewise.
5321 (x86_linux_prepare_to_resume): Likewise.
5322
5dfe6ca8
GB
53232015-03-24 Gary Benson <gbenson@redhat.com>
5324
5325 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5326 Use perror_with_name. Pass string through gettext.
5327 (x86_linux_dr_set): Likewise.
5328
d33472ad
GB
53292015-03-24 Gary Benson <gbenson@redhat.com>
5330
5331 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5332 (x86_linux_dr_set_addr): ...this.
5333 (x86_dr_low_get_addr): Rename to...
5334 (x86_linux_dr_get_addr): ...this.
5335 (x86_dr_low_set_control): Rename to...
5336 (x86_linux_dr_set_control): ...this.
5337 (x86_dr_low_get_control): Rename to...
5338 (x86_linux_dr_get_control): ...this.
5339 (x86_dr_low_get_status): Rename to...
5340 (x86_linux_dr_get_status): ...this.
5341 (x86_dr_low): Update with new function names.
5342
4b134ca1
GB
53432015-03-24 Gary Benson <gbenson@redhat.com>
5344
5345 * Makefile.in (x86-linux.o): New rule.
5346 * configure.srv: Add x86-linux.o to relevant targets.
5347 * linux-low.c (lwp_set_arch_private_info): New function.
5348 (lwp_arch_private_info): Likewise.
5349 * linux-x86-low.c: Include nat/x86-linux.h.
5350 (arch_lwp_info): Removed structure.
5351 (update_debug_registers_callback):
5352 Use lwp_set_debug_registers_changed.
5353 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5354 and lwp_set_debug_registers_changed.
5355 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5356
34c703da
GB
53572015-03-24 Gary Benson <gbenson@redhat.com>
5358
5359 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5360 * linux-arm-low.c (arm_new_thread): Likewise.
5361 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5362 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5363 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5364 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5365
cff068da
GB
53662015-03-24 Gary Benson <gbenson@redhat.com>
5367
5368 * linux-low.c (ptid_of_lwp): New function.
5369 (lwp_is_stopped): Likewise.
5370 (lwp_stop_reason): Likewise.
5371 * linux-x86-low.c (update_debug_registers_callback):
5372 Use lwp_is_stopped.
5373 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5374 lwp_stop_reason.
5375
b2f7c7e8
GB
53762015-03-24 Gary Benson <gbenson@redhat.com>
5377
5378 * linux-low.h (linux_stop_lwp): Remove declaration.
5379
6d4ee8c6
GB
53802015-03-24 Gary Benson <gbenson@redhat.com>
5381
5382 * linux-low.h: Include nat/linux-nat.h.
5383 * linux-low.c (iterate_over_lwps_args): New structure.
5384 (iterate_over_lwps_filter): New function.
5385 (iterate_over_lwps): Likewise.
5386 * linux-x86-low.c (update_debug_registers_callback):
5387 Update signature to what iterate_over_lwps expects.
5388 Remove PID check that iterate_over_lwps now performs.
5389 (x86_dr_low_set_addr): Use iterate_over_lwps.
5390 (x86_dr_low_set_control): Likewise.
5391
70a0bb6b
GB
53922015-03-24 Gary Benson <gbenson@redhat.com>
5393
5394 * linux-x86-low.c (x86_debug_reg_state): New function.
5395 (x86_linux_prepare_to_resume): Use the above.
5396
7b669087
GB
53972015-03-24 Gary Benson <gbenson@redhat.com>
5398
5399 * linux-low.c (current_lwp_ptid): New function.
5400 * linux-x86-low.c: Include nat/linux-nat.h.
5401 (x86_dr_low_get_addr): Use current_lwp_ptid.
5402 (x86_dr_low_get_control): Likewise.
5403 (x86_dr_low_get_status): Likewise.
5404
eef49a3d
PA
54052015-03-20 Pedro Alves <palves@redhat.com>
5406
5407 * tracepoint.c (cmd_qtstatus): Make "str" const.
5408
b2333d22
PA
54092015-03-20 Pedro Alves <palves@redhat.com>
5410
5411 * server.c (handle_general_set): Make "req_str" const.
5412
23f238d3
PA
54132015-03-19 Pedro Alves <palves@redhat.com>
5414
5415 * linux-low.c (linux_resume_one_lwp): Rename to ...
5416 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5417 instead call perror_with_name.
5418 (check_ptrace_stopped_lwp_gone): New function.
5419 (linux_resume_one_lwp): Reimplement as wrapper around
5420 linux_resume_one_lwp_throw that swallows errors if the LWP is
5421 gone.
5422
91baf43f
PA
54232015-03-19 Pedro Alves <palves@redhat.com>
5424
5425 * linux-low.c (count_events_callback, select_event_lwp_callback):
5426 No longer check whether the thread has resume_stop as last resume
5427 kind.
5428
8bf3b159
PA
54292015-03-19 Pedro Alves <palves@redhat.com>
5430
5431 * linux-low.c (count_events_callback, select_event_lwp_callback):
5432 Use the lwp's status_pending_p field, not the thread's.
5433
b90fc188
PA
54342015-03-19 Pedro Alves <palves@redhat.com>
5435
5436 * linux-low.c (select_event_lwp_callback): Update comments to
5437 no longer mention SIGTRAP.
5438
464b0089
GB
54392015-03-18 Gary Benson <gbenson@redhat.com>
5440
5441 * server.c (handle_query): Do not report vFile:fstat as supported.
5442
aa9e327f
GB
54432015-03-11 Gary Benson <gbenson@redhat.com>
5444
5445 * hostio.c (sys/types.h): New include.
5446 (sys/stat.h): Likewise.
5447 (common-remote-fileio.h): Likewise.
5448 (handle_fstat): New function.
5449 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 5450
791c0056
GB
54512015-03-11 Gary Benson <gbenson@redhat.com>
5452
5453 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5454 struct stat.st_blocks and struct stat.st_blksize.
5455 * configure: Regenerate.
5456 * config.in: Likewise.
5457 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5458 (OBS): Add common-remote-fileio.o.
5459 (common-remote-fileio.o): New rule.
5460
9a9df970
PA
54612015-03-09 Pedro Alves <palves@redhat.com>
5462
5463 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5464 'struct sockaddr' pointer in 'accept' call.
5465
9eb1356e
PA
54662015-03-09 Pedro Alves <palves@redhat.com>
5467
5468 Revert:
5469 2015-03-07 Pedro Alves <palves@redhat.com>
5470 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5471 or <winsock2.h> here. Instead include "gdb_socket.h".
5472 (remote_open): Use union gdb_sockaddr_u.
5473 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5474 or <winsock2.h> here. Instead include "gdb_socket.h".
5475 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5476 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5477 or <sys/un.h>.
5478 (init_named_socket, gdb_agent_helper_thread): Use union
5479 gdb_sockaddr_u.
5480
aac331e4
PA
54812015-03-07 Pedro Alves <palves@redhat.com>
5482
5483 * configure.ac (build_warnings): Move
5484 -Wdeclaration-after-statement to the C-specific set.
5485 * configure: Regenerate.
5486
366c75fc
PA
54872015-03-07 Pedro Alves <palves@redhat.com>
5488
5489 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5490 or <winsock2.h> here. Instead include "gdb_socket.h".
5491 (remote_open): Use union gdb_sockaddr_u.
5492 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5493 or <winsock2.h> here. Instead include "gdb_socket.h".
5494 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5495 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5496 or <sys/un.h>.
5497 (init_named_socket, gdb_agent_helper_thread): Use union
5498 gdb_sockaddr_u.
5499
492d29ea
PA
55002015-03-07 Pedro Alves <palves@redhat.com>
5501
5502 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5503 instead.
5504
60a191ed
YQ
55052015-03-06 Yao Qi <yao.qi@linaro.org>
5506
5507 * linux-aarch64-low.c (aarch64_insert_point): Use
5508 show_debug_regs as a boolean.
5509 (aarch64_remove_point): Likewise.
5510
f5771b1d
PA
55112015-03-05 Pedro Alves <palves@redhat.com>
5512
5513 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5514 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5515 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5516 * nto-low.c (nto_target_ops): Likewise.
5517 * spu-low.c (spu_target_ops): Likewise.
5518 * win32-low.c (win32_target_ops): Likewise.
5519
3e572f71
PA
55202015-03-04 Pedro Alves <palves@redhat.com>
5521
72f4393d 5522 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
5523 Decide whether a breakpoint triggered based on the SIGTRAP's
5524 siginfo.si_code.
72f4393d
L
5525 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5526 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
5527 (linux_low_filter_event): Check for breakpoints before checking
5528 watchpoints.
5529 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5530 siginfo.si_code.
72f4393d
L
5531 (linux_stopped_by_sw_breakpoint)
5532 (linux_supports_stopped_by_sw_breakpoint)
5533 (linux_stopped_by_hw_breakpoint)
5534 (linux_supports_stopped_by_hw_breakpoint): New functions.
5535 (linux_target_ops): Install new target methods.
3e572f71 5536
1ec68e26
PA
55372015-03-04 Pedro Alves <palves@redhat.com>
5538
5539 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5540 * server.c (swbreak_feature, hwbreak_feature): New globals.
5541 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5542 (captured_main): Clear swbreak_feature and hwbreak_feature.
5543 * server.h (swbreak_feature, hwbreak_feature): Declare.
5544 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5545 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5546 supports_stopped_by_hw_breakpoint>: New fields.
5547 (target_supports_stopped_by_sw_breakpoint)
5548 (target_stopped_by_sw_breakpoint)
5549 (target_supports_stopped_by_hw_breakpoint)
5550 (target_stopped_by_hw_breakpoint): Declare.
5551
15c66dd6
PA
55522015-03-04 Pedro Alves <palves@redhat.com>
5553
5554 enum lwp_stop_reason -> enum target_stop_reason
5555 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5556 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5557 (linux_wait_1, stuck_in_jump_pad_callback)
5558 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5559 (linux_stopped_by_watchpoint):
5560 * linux-low.h (enum lwp_stop_reason): Delete.
5561 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5562 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5563
98fc70d6
YQ
55642015-03-04 Yao Qi <yao.qi@linaro.org>
5565
5566 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5567
dd2ac174
GB
55682015-03-03 Gary Benson <gbenson@redhat.com>
5569
5570 * hostio.c (handle_vFile): Fix prefix lengths.
5571
d68e53f4
MM
55722015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5573
5574 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5575 ptr_bits.
5576
bf2d68ab
AA
55772015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5578
5579 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5580 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5581 (clean): Add "rm -f" for above C files.
5582 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5583 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5584 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5585 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5586 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5587 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5588 (init_registers_s390x_vx_linux64)
5589 (init_registers_s390x_tevx_linux64)
5590 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5591 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5592 declarations.
5593 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5594 (s390_store_vxrs_high): New functions.
5595 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5596 NT_S390_VXRS_HIGH.
5597 (s390_arch_setup): Add logic for selecting one of the new target
5598 descriptions. Activate the new vector regsets if applicable.
5599 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5600 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5601 and init_registers_s390x_tevx_linux64.
5602
c966a859
PA
56032015-03-01 Pedro Alves <palves@redhat.com>
5604
5605 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5606 parameter.
5607
4180215b
PA
56082015-02-27 Pedro Alves <palves@redhat.com>
5609
5610 * linux-x86-low.c (u_debugreg_offset): New function.
5611 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5612
749bab01
PA
56132015-02-27 Pedro Alves <palves@redhat.com>
5614
5615 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5616 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5617 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5618 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5619 (ps_lsetfpregs, ps_getpid)
5620 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5621 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5622 (ps_lsetxregs, ps_plog): Declare.
5623
3c14e5a3
PA
56242015-02-27 Pedro Alves <palves@redhat.com>
5625
5626 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5627 IP_AGENT_EXPORT_FUNC.
5628 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5629 IP_AGENT_EXPORT_FUNC.
5630 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5631 (IP_AGENT_EXPORT): Delete.
5632 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5633 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5634 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5635 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5636 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5637 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5638 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5639 (traceframe_read_count, traceframe_write_count)
5640 (traceframes_created, trace_state_variables, get_raw_reg)
5641 (get_trace_state_variable_value, set_trace_state_variable_value)
5642 (ust_loaded, helper_thread_id, cmd_buf): Use
5643 IPA_SYM_EXPORTED_NAME.
5644 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5645 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5646 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5647 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5648 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5649 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5650 EXTERN_C_PUSH/EXTERN_C_POP.
5651 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5652 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5653 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5654 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5655 (traceframe_write_count, traceframe_read_count)
5656 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5657 (about_to_request_buffer_space, get_trace_state_variable_value)
5658 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5659 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5660 EXTERN_C_PUSH/EXTERN_C_POP.
5661 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5662 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5663 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5664 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5665 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5666 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5667 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5668 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5669 Define.
5670 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5671 (IP_AGENT_EXPORT_VAR_DECL): Define.
5672 (tracing): Declare.
5673 (gdb_agent_get_raw_reg): Declare.
5674
fe978cb0
PA
56752015-02-27 Tom Tromey <tromey@redhat.com>
5676 Pedro Alves <palves@redhat.com>
5677
5678 Rename symbols whose names are reserved C++ keywords throughout.
5679
3bc3d82a
PA
56802015-02-27 Pedro Alves <palves@redhat.com>
5681
5682 * Makefile.in (COMPILER): New, get it from autoconf.
5683 (CXX): Get from autoconf instead.
5684 (COMPILE.pre): Use COMPILER.
5685 (CC-LD): Rename to ...
5686 (CC_LD): ... this. Use COMPILER.
5687 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5688 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5689 * acinclude.m4: Include build-with-cxx.m4.
5690 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5691 Disable -Werror by default if building in C++ mode.
5692 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5693 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5694 the C++ compiler. Save/restore CXXFLAGS too.
5695 * configure: Regenerate.
5696
07697489
PA
56972015-02-27 Pedro Alves <palves@redhat.com>
5698
5699 * acinclude.m4: Include libiberty.m4.
5700 * configure.ac: Call libiberty_INIT.
5701 * config.in, configure: Regenerate.
5702
9beb7c4e
PA
57032015-02-26 Pedro Alves <palves@redhat.com>
5704
5705 * linux-low.c (linux_wait_1): When incrementing the PC past a
5706 program breakpoint always use the_low_target.breakpoint_len as
5707 increment, rather than the maximum between that and
5708 the_low_target.decr_pc_after_break.
5709
8090aef2
PA
57102015-02-23 Pedro Alves <palves@redhat.com>
5711
5712 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5713 thread was doing a step-over; always adjust the PC if
5714 we stepped over a permanent breakpoint.
5715 (linux_wait_1): If we stepped over breakpoint that was on top of a
5716 permanent breakpoint, manually advance the PC past it.
5717
bc9540e8
PA
57182015-02-23 Pedro Alves <palves@redhat.com>
5719
5720 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5721 modes.
5722 (x86_fill_gregset, x86_store_gregset): Use it when handling
5723 $orig_eax.
5724
2db9a427
PA
57252015-02-20 Pedro Alves <palves@redhat.com>
5726
5727 * thread-db.c: Include "nat/linux-procfs.h".
5728 (thread_db_init): Skip listing new threads if the kernel supports
5729 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5730
afa8d396
PA
57312015-02-20 Pedro Alves <palves@redhat.com>
5732
5733 * linux-low.c (status_pending_p_callback): Use ptid_match.
5734
c9587f88
AT
57352015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5736
5737 PR breakpoints/16812
5738 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5739 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5740 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5741
b05ec7a5
AT
57422015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5743
5744 PR breakpoints/15956
5745 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5746
d33501a5
MM
57472015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5748
5749 * linux-low.c (linux_low_btrace_conf): Print size.
5750 * server.c (handle_btrace_conf_general_set): New.
5751 (hanle_general_set): Call handle_btrace_conf_general_set.
5752 (handle_query): Report Qbtrace-conf:bts:size as supported.
5753
f4abbc16
MM
57542015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5755
5756 * linux-low.c (linux_low_enable_btrace): Update parameters.
5757 (linux_low_btrace_conf): New.
5758 (linux_target_ops)<to_btrace_conf>: Initialize.
5759 * server.c (current_btrace_conf): New.
5760 (handle_btrace_enable): Rename to ...
5761 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5762 to target_enable_btrace. Update comment. Update users.
5763 (handle_qxfer_btrace_conf): New.
5764 (qxfer_packets): Add btrace-conf entry.
5765 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5766 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5767 (target_ops)<read_btrace_conf>: New.
5768 (target_enable_btrace): Update parameters.
5769 (target_read_btrace_conf): New.
5770
043c3577
MM
57712015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5772
5773 * server.c (handle_btrace_general_set): Remove call to
5774 target_supports_btrace.
5775 (supported_btrace_packets): New.
5776 (handle_query): Call supported_btrace_packets.
5777 * target.h: include btrace-common.h.
5778 (btrace_target_info): Removed.
5779 (supports_btrace, target_supports_btrace): Update parameters.
5780
734b0e4b
MM
57812015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5782
5783 * Makefile.in (SFILES): Add common/btrace-common.c.
5784 (OBS): Add common/btrace-common.o.
5785 (btrace-common.o): Add build rules.
5786 * linux-low: Include btrace-common.h.
5787 (linux_low_read_btrace): Use struct btrace_data. Call
5788 btrace_data_init and btrace_data_fini.
5789
d6c146e9
PA
57902015-02-06 Pedro Alves <palves@redhat.com>
5791
5792 * thread-db.c (find_new_threads_callback): Add debug output.
5793
20ba1ce6
PA
57942015-02-04 Pedro Alves <palves@redhat.com>
5795
5796 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5797 (resume_stopped_resumed_lwps): New function.
5798 (linux_wait_for_event_filtered): Use it.
5799
8cc73a39
SDJ
58002015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5801
5802 * Makefile.in (SFILES): Add linux-personality.c.
5803 (linux-personality.o): New rule.
5804 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5805 list of objects to be built.
5806 * linux-low.c: Include nat/linux-personality.h.
5807 (linux_create_inferior): Remove code to disable address space
5808 randomization (moved to ../nat/linux-personality.c). Create
5809 cleanup to disable address space randomization.
5810
fb23d554
SDJ
58112015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5812
5813 * Makefile.in (posix-strerror.o): New rule.
5814 (mingw-strerror.o): Likewise.
5815 * configure: Regenerated.
5816 * configure.ac: Source file ../common/common.host. Initialize new
5817 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5818
cdf43629
YQ
58192015-01-14 Yao Qi <yao@codesourcery.com>
5820
5821 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5822 (ppc-linux.o): New rule.
5823 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5824 * configure.ac: AC_CHECK_FUNCS(getauxval).
5825 * config.in: Re-generated.
5826 * configure: Re-generated.
5827 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5828 ppc64_64bit_inferior_p
5829
514c5338
YQ
58302015-01-14 Yao Qi <yao@codesourcery.com>
5831
5832 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5833 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5834 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5835 (PT_ORIG_R3, PT_TRAP): Likewise.
5836 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5837 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5838 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5839
3368c1e5
JB
58402015-01-10 Joel Brobecker <brobecker@adacore.com>
5841
5842 * i387-fp.c (i387_cache_to_xsave): In look over
5843 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5844 zmmh_low_space field by use of zmmh_high_space.
5845
582511be
PA
58462015-01-09 Pedro Alves <palves@redhat.com>
5847
5848 * linux-low.c (step_over_bkpt): Move higher up in the file.
5849 (handle_extended_wait): Don't store the stop_pc here.
5850 (get_stop_pc): Adjust comments and rename to ...
5851 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5852 stopped for a software breakpoint or hardware breakpoint.
5853 (thread_still_has_status_pending_p): New function.
5854 (status_pending_p_callback): Use
5855 thread_still_has_status_pending_p. If the event is no longer
5856 interesting, resume the LWP.
5857 (handle_tracepoints): Add assert.
5858 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5859 (wstatus_maybe_breakpoint): New function.
5860 (cancel_breakpoint): Delete function.
5861 (check_stopped_by_watchpoint): New function, factored out from
5862 linux_low_filter_event.
5863 (lp_status_maybe_breakpoint): Delete function.
5864 (linux_low_filter_event): Remove filter_ptid argument.
5865 Leave thread group exits pending here. Store the LWP's stop PC.
5866 Always leave events pending.
5867 (linux_wait_for_event_filtered): Pull all events out of the
5868 kernel, and leave them all pending.
5869 (count_events_callback, select_event_lwp_callback): Consider all
5870 events.
5871 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5872 (select_event_lwp): Only give preference to the stepping LWP in
5873 all-stop mode. Adjust comments.
5874 (ignore_event): New function.
5875 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5876 references to cancel_breakpoints. Adjust to renames. Also give
5877 equal priority to all LWPs that have had events in non-stop mode.
5878 If reporting a software breakpoint event, unadjust the LWP's PC.
5879 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5880 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5881 Adjust.
5882 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5883 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5884 (linux_stopped_by_watchpoint): Adjust.
5885 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5886 * linux-low.h (enum lwp_stop_reason): New.
5887 (struct lwp_info) <stop_pc>: Adjust comment.
5888 <stopped_by_watchpoint>: Delete field.
5889 <stop_reason>: New field.
5890 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5891 * mem-break.c (software_breakpoint_inserted_here)
5892 (hardware_breakpoint_inserted_here): New function.
5893 * mem-break.h (software_breakpoint_inserted_here)
5894 (hardware_breakpoint_inserted_here): Declare.
5895 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5896 (cancel_breakpoints): Delete.
5897 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5898 (upload_fast_traceframes): Remove references to
5899 cancel_breakpoints.
5900
a33e3959
PA
59012015-01-09 Pedro Alves <palves@redhat.com>
5902
5903 * thread-db.c (find_new_threads_callback): Ignore thread if the
5904 kernel thread ID is -1.
5905
8784d563
PA
59062015-01-09 Pedro Alves <palves@redhat.com>
5907
5908 * linux-low.c (linux_attach_fail_reason_string): Move to
5909 nat/linux-ptrace.c, and rename.
5910 (linux_attach_lwp): Update comment.
5911 (attach_proc_task_lwp_callback): New function.
5912 (linux_attach): Adjust to rename and use
5913 linux_proc_attach_tgid_threads.
5914 (linux_attach_fail_reason_string): Delete declaration.
5915
76f2b779
JB
59162015-01-01 Joel Brobecker <brobecker@adacore.com>
5917
5918 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5919 * server.c (gdbserver_version): Likewise.
5920
fafcc06a
SDJ
59212014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5922
5923 * remote-utils.c: Include ctype.h.
5924 (input_interrupt): Explicitly handle the case when the char
5925 received is the NUL byte. Improve the printing of non-ASCII
5926 characters.
5927
beed38b8
JB
59282014-12-16 Joel Brobecker <brobecker@adacore.com>
5929
5930 * linux-low.c (linux_low_filter_event): Update call to
5931 linux_enable_event_reporting following the addition of
5932 a new parameter to that function.
5933
bf330350
CU
59342014-12-16 Catalin Udma <catalin.udma@freescale.com>
5935
5936 PR server/17457
5937 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5938 (AARCH64_FPCR_REGNO): Likewise.
5939 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5940 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5941 (aarch64_store_fpregset): Likewise.
5942
5227d625
JB
59432014-12-15 Joel Brobecker <brobecker@adacore.com>
5944
5945 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5946 Remove FIXME comment about assumption about N.
5947
f93b65a0
JB
59482014-12-13 Joel Brobecker <brobecker@adacore.com>
5949
5950 * configure.ac: If large-file support is disabled in GDBserver,
5951 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5952 * configure: Regenerate.
5953
e5a9158d
AA
59542014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5955
5956 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5957 warning upon ENODATA from ptrace.
5958 * linux-s390-low.c (s390_store_tdb): New.
5959 (s390_regsets): Add regset for NT_S390_TDB.
5960
feea5f36
AA
59612014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5962
5963 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5964 without a fill_function.
5965 * linux-s390-low.c (s390_fill_last_break): Remove.
5966 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5967 (s390_arch_setup): Use regset's size instead of fill_function for
5968 loop end condition.
5969
098dbe61
AA
59702014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5971
5972 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5973 the regset's store function when ptrace returned an error.
5974 * regcache.c (get_thread_regcache): Invalidate register cache
5975 before fetching inferior's registers.
5976
28eef672
AA
59772014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5978
5979 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5980 while-loop as for-loop.
5981 (regsets_store_inferior_registers): Likewise.
5982
bdca27a2
YQ
59832014-11-28 Yao Qi <yao@codesourcery.com>
5984
5985 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5986 * config.in, configure: Re-generate.
5987 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5988 is defined.
5989
9c232dda
YQ
59902014-11-21 Yao Qi <yao@codesourcery.com>
5991
5992 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5993 (AC_CHECK_HEADERS): Remove malloc.h.
5994 * configure: Re-generated.
5995 * config.in: Re-generated.
5996 * server.h: Don't include alloca.h and malloc.h.
5997 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5998 Don't include malloc.h.
5999
43968415
JB
60002014-11-17 Joel Brobecker <brobecker@adacore.com>
6001
6002 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6003 corresponding ERRNO check in same block.
6004
40e91bc7
PA
60052014-11-12 Pedro Alves <palves@redhat.com>
6006
6007 * server.c (cont_thread): Update comment.
6008 (start_inferior, attach_inferior): No longer clear cont_thread.
6009 (handle_v_cont): No longer set cont_thread.
6010 (captured_main): Clear cont_thread each time a GDB connects.
6011
c2c118cf
PA
60122014-11-12 Pedro Alves <palves@redhat.com>
6013
6014 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6015 thread, and don't resume all threads if the Hc thread has exited.
6016
78708b7c
PA
60172014-11-12 Pedro Alves <palves@redhat.com>
6018
6019 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6020 the process group instead of to a specific LWP.
6021
a2abc7de
PA
60222014-10-15 Pedro Alves <palves@redhat.com>
6023
6024 PR server/17487
6025 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6026 parameter.
6027 (arm_set_thread_context): Delete.
6028 (the_low_target): Adjust.
6029 * win32-i386-low.c (debug_registers_changed)
6030 (debug_registers_used): Delete.
6031 (update_debug_registers_callback): New function.
6032 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6033 needing to update their debug registers.
6034 (win32_get_current_dr): New function.
6035 (x86_dr_low_get_addr, x86_dr_low_get_control)
6036 (x86_dr_low_get_status): Fetch the debug register from the thread
6037 record's context.
6038 (i386_initial_stuff): Adjust.
6039 (i386_get_thread_context): Remove current_event parameter. Don't
6040 clear debug_registers_changed nor copy DR values to
6041 debug_reg_state.
6042 (i386_set_thread_context): Delete.
6043 (i386_prepare_to_resume): New function.
6044 (i386_thread_added): Mark the thread as needing to update irs
6045 debug registers.
6046 (the_low_target): Remove i386_set_thread_context and install
6047 i386_prepare_to_resume.
6048 * win32-low.c (win32_get_thread_context): Adjust.
6049 (win32_set_thread_context): Use SetThreadContext
6050 directly.
6051 (win32_prepare_to_resume): New function.
6052 (win32_require_context): New function, factored out from ...
6053 (thread_rec): ... this.
6054 (continue_one_thread): Call win32_prepare_to_resume on each thread
6055 we're about to continue.
6056 (win32_resume): Call win32_prepare_to_resume on the event thread.
6057 * win32-low.h (struct win32_thread_info)
6058 <debug_registers_changed>: New field.
6059 (struct win32_target_ops): Change prototype of set_thread_context,
6060 delete set_thread_context and add prepare_to_resume.
6061 (win32_require_context): New declaration.
6062
a442d071
GB
60632014-10-08 Gary Benson <gbenson@redhat.com>
6064
6065 * server.h: Do not include common-exceptions.h.
6066
6f1947e8
GB
60672014-10-08 Gary Benson <gbenson@redhat.com>
6068
6069 * server.h: Do not include cleanups.h.
6070
63b434a4
JH
60712014-09-30 James Hogan <james.hogan@imgtec.com>
6072
6073 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6074 mips64-dsp-linux.c.
6075
c4d9ceb6
YQ
60762014-09-23 Yao Qi <yao@codesourcery.com>
6077
6078 * linux-low.c (lp_status_maybe_breakpoint): New function.
6079 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6080 (count_events_callback): Likewise.
6081 (select_event_lwp_callback): Likewise.
6082 (cancel_breakpoints_callback): Likewise.
6083
89a5711c
DB
60842014-09-19 Don Breazeal <donb@codesourcery.com>
6085
6086 * linux-low.c (handle_extended_wait): Call
6087 linux_ptrace_get_extended_event.
6088 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6089 linux_is_extended_waitstatus.
6090
bffc0964
JB
60912014-09-16 Joel Brobecker <brobecker@adacore.com>
6092
6093 * Makefile.in (CPPFLAGS): Define.
6094 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6095 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6096
0bfdf32f
GB
60972014-09-16 Gary Benson <gbenson@redhat.com>
6098
6099 * inferiors.h (current_inferior): Renamed as...
6100 (current_thread): New variable. All uses updated.
6101 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6102 (maybe_move_out_of_jump_pad): Likewise.
6103 (cancel_breakpoint): Likewise.
6104 (linux_low_filter_event): Likewise.
6105 (wait_for_sigstop): Likewise.
6106 (linux_resume_one_lwp): Likewise.
6107 (need_step_over_p): Likewise.
6108 (start_step_over): Likewise.
6109 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6110 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6111 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6112 and save_inferior as saved_thread.
6113 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6114 saved_thread.
6115 (regcache_invalidate_thread): Likewise.
6116 * remote-utils.c (prepare_resume_reply): Likewise.
6117 * thread-db.c (thread_db_get_tls_address): Likewise.
6118 (disable_thread_event_reporting): Likewise.
6119 (remove_thread_event_breakpoints): Likewise.
6120 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6121 as saved_thread.
6122 * target.h (set_desired_inferior): Renamed as...
6123 (set_desired_thread): New declaration. All uses updated.
6124 * server.c (myresume): Updated comment to reference thread instead
6125 of inferior.
6126 (handle_serial_event): Likewise.
6127 (handle_target_event): Likewise.
6128
361c8ade
GB
61292014-09-12 Tom Tromey <tromey@redhat.com>
6130 Gary Benson <gbenson@redhat.com>
6131
6132 * regcache.h: Include common-regcache.h.
6133 (regcache_read_pc): Don't declare.
6134 * regcache.c (get_thread_regcache_for_ptid): New function.
6135
bd9269f7
GB
61362014-09-11 Tom Tromey <tromey@redhat.com>
6137 Gary Benson <gbenson@redhat.com>
6138
6139 * symbol.c: New file.
6140 * Makefile.in (SFILES): Add symbol.c.
6141 (OBS): Add symbol.o.
6142
f8c1d06b
GB
61432014-09-11 Gary Benson <gbenson@redhat.com>
6144
6145 * target.c (target_stop_ptid, target_continue_ptid): New
6146 functions.
6147
721ec300
GB
61482014-09-11 Tom Tromey <tromey@redhat.com>
6149 Gary Benson <gbenson@redhat.com>
6150
6151 * target.h: Include target/target.h.
6152 * target.c (target_read_memory, target_read_uint32)
6153 (target_write_memory): New functions.
6154
c5e92cca
GB
61552014-09-11 Gary Benson <gbenson@redhat.com>
6156
6157 * server.h (debug_hw_points): Don't declare.
6158 * server.c (debug_hw_points): Don't define. Replace all uses
6159 with show_debug_regs.
6160 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6161 all uses with show_debug_regs.
6162
2e4bb98a
EBM
61632014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6164
6165 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6166 endianness into account.
6167 (ppc_supply_ptrace_register): Likewise.
6168
ac740bc7
JH
61692014-09-03 James Hogan <james.hogan@imgtec.com>
6170
6171 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6172 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6173
97ea6506
GB
61742014-09-03 Gary Benson <gbenson@redhat.com>
6175
6176 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6177 ALL_DEBUG_ADDRESS_REGISTERS.
6178
df7e5265
GB
61792014-09-02 Gary Benson <gbenson@redhat.com>
6180
6181 * i386-low.h: Renamed as...
6182 * x86-low.h: New file. All type, function and variable name
6183 prefixes changed from "i386_" to "x86_". All references updated.
6184 * i386-low.c: Renamed as...
6185 * x86-low.c: New file. All type, function and variable name
6186 prefixes changed from "i386_" to "x86_". All references updated.
6187
ed859da7
GB
61882014-09-02 Gary Benson <gbenson@redhat.com>
6189
6190 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6191 (x86_linux_new_thread): Likewise.
6192
860789c7
GB
61932014-08-29 Gary Benson <gbenson@redhat.com>
6194
6195 * server.h (setjmp.h): Do not include.
6196 (toplevel): Do not declare.
6197 (common-exceptions.h): Include.
6198 (cleanups.h): Likewise.
6199 * server.c (toplevel): Do not define.
6200 (exit_code): New static global.
6201 (detach_or_kill_for_exit_cleanup): New function.
6202 (main): New function. Original main renamed to...
6203 (captured_main): New function.
6204 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6205
ff55e1b5
GB
62062014-08-29 Gary Benson <gbenson@redhat.com>
6207
6208 * Makefile.in (SFILES): Add common/common-exceptions.c.
6209 (OBS): Add common-exceptions.o.
6210 (common-exceptions.o): New rule.
6211 * utils.c (prepare_to_throw_exception): New function.
6212
e9bcb658
GB
62132014-08-29 Gary Benson <gbenson@redhat.com>
6214
6215 * config.in: Regenerate.
6216 * configure: Likewise.
6217
e3180625
GB
62182014-08-29 Gary Benson <gbenson@redhat.com>
6219
6220 * Makefile.in (SFILES): Add common/cleanups.c.
6221 (OBS): cleanups.o.
6222 (cleanups.o): New rule.
6223
e3d6ba5d
GB
62242014-08-29 Gary Benson <gbenson@redhat.com>
6225
6226 * utils.c (internal_vwarning): New function.
6227
7096e886
GB
62282014-08-28 Gary Benson <gbenson@redhat.com>
6229
6230 * utils.h (fatal): Remove declaration.
6231 * utils.c (fatal): Remove function.
6232
14ce3192
GB
62332014-08-28 Gary Benson <gbenson@redhat.com>
6234
6235 * tracepoint.c (gdb_agent_init): Replace fatal with
6236 perror_with_name.
6237 (initialize_tracepoint): Likewise.
6238
50278d59
GB
62392014-08-28 Gary Benson <gbenson@redhat.com>
6240
6241 * remote-utils.c (remote_prepare): Replace fatal with error.
6242
aa96c426
GB
62432014-08-28 Gary Benson <gbenson@redhat.com>
6244
6245 * linux-low.c (linux_async): Replace fatal with warning.
6246 Tidy up and return.
6247 (linux_start_non_stop): Return -1 if linux_async failed.
6248
f7160e97
GB
62492014-08-28 Gary Benson <gbenson@redhat.com>
6250
6251 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6252 gdb_assert.
6253 (i386_dr_low_get_addr): Remove vague comment.
6254 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6255 gdb_assert.
6256
38e08fca
GB
62572014-08-28 Gary Benson <gbenson@redhat.com>
6258
6259 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6260 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6261 internal_error.
6262 (linux_resume_one_lwp): Likewise.
6263 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6264 gdb_assert.
6265 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6266 with internal_error.
6267 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6268 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6269 (find_register_by_name): Replace fatal with internal_error.
6270 (find_regno): Likewise.
6271 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6272 * thread-db.c (thread_db_create_event): Likewise.
6273 (thread_db_load_search): Likewise.
6274 (try_thread_db_load_1): Likewise.
6275 * tracepoint.c (get_jump_space_head): Replace fatal with
6276 internal_error.
6277 (claim_trampoline_space): Likewise.
6278 (have_fast_tracepoint_trampoline_buffer): Likewise.
6279 (cmd_qtstart): Likewise.
6280 (stop_tracing): Likewise.
6281 (fast_tracepoint_collecting): Likewise.
6282 (target_malloc): Likewise.
6283 (download_tracepoint): Likewise.
6284 (download_trace_state_variables): Replace check with gdb_assert.
6285 (upload_fast_traceframes): Replace fatal with internal_error.
6286
34abf635
GB
62872014-08-19 Tom Tromey <tromey@redhat.com>
6288 Gary Benson <gbenson@redhat.com>
6289
6290 * Makefile.in (SFILES): Add common/common-debug.c.
6291 (OBS): Add common-debug.o.
6292 (common-debug.o): New rule.
6293 * debug.h (debug_printf): Don't declare.
6294 * debug.c (debug_printf): Renamed and rewritten as...
6295 (debug_vprintf): New function.
6296
f6e94d78
GB
62972014-08-19 Gary Benson <gbenson@redhat.com>
6298
6299 * utils.h: Do not include print-utils.h.
6300
9239eeab
GB
63012014-08-19 Tom Tromey <tromey@redhat.com>
6302 Gary Benson <gbenson@redhat.com>
6303
6304 * server.h: Add static assertion.
6305 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6306
ef87c8bb
GB
63072014-08-19 Tom Tromey <tromey@redhat.com>
6308 Gary Benson <gbenson@redhat.com>
6309
6310 * Makefile.in (SFILES): Add common/errors.c.
6311 (OBS): Add errors.o.
6312 (IPA_OBS): Add errors-ipa.o.
6313 (errors.o): New rule.
6314 (errors-ipa.o): Likewise.
6315 * utils.h (perror_with_name, error, warning): Don't declare.
6316 * utils.c (warning): Renamed and rewritten as...
6317 (vwarning): New function.
6318 (error): Renamed and rewritten as...
6319 (verror): New function.
6320 (internal_error): Renamed and rewritten as...
6321 (internal_verror): New function.
6322
bb974a24
GB
63232014-08-07 Gary Benson <gbenson@redhat.com>
6324
6325 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6326 * configure: Regenerate.
6327 * config.in: Likewise.
6328 * server.h: Do not include errno.h.
6329 * event-loop.c: Likewise.
6330 * hostio-errno.c: Likewise.
6331 * linux-low.c: Likewise.
6332 * remote-utils.c: Likewise.
6333 * spu-low.c: Likewise.
6334 * utils.c: Likewise.
6335 * gdbreplay.c: Unconditionally include errno.h.
6336
6d3d12eb
GB
63372014-08-07 Gary Benson <gbenson@redhat.com>
6338
6339 * server.h: Do not include string.h.
6340 * event-loop.c: Likewise.
6341 * linux-low.c: Likewise.
6342 * regcache.c: Likewise.
6343 * remote-utils.c: Likewise.
6344 * spu-low.c: Likewise.
6345 * utils.c: Likewise.
6346
dccbb609
GB
63472014-08-07 Gary Benson <gbenson@redhat.com>
6348
6349 * server.h: Do not include gdb_assert.h.
6350
e76df0d0
GB
63512014-08-07 Gary Benson <gbenson@redhat.com>
6352
6353 * server.h: Do not include common-utils.h.
6354
4cb9c816
GB
63552014-08-07 Gary Benson <gbenson@redhat.com>
6356
6357 * server.h: Do not include ptid.h.
6358 * notif.h: Likewise.
6359
3995eeee
GB
63602014-08-07 Gary Benson <gbenson@redhat.com>
6361
6362 * server.h: Do not include gdb_locale.h.
6363
cb9f1a9b
GB
63642014-08-07 Gary Benson <gbenson@redhat.com>
6365
6366 * server.h: Do not include gdb/signals.h.
6367 * win32-low.c: Likewise.
6368
a5fceff8
GB
63692014-08-07 Gary Benson <gbenson@redhat.com>
6370
6371 * server.h: Do not include pathmax.h.
6372
b9391142
GB
63732014-08-07 Gary Benson <gbenson@redhat.com>
6374
6375 * server.h: Do not include libiberty.h.
6376 * linux-bfin-low.c: Likewise.
6377
0e443c87
GB
63782014-08-07 Gary Benson <gbenson@redhat.com>
6379
6380 * server.h: Do not include ansidecl.h.
6381
8ebb3f56
GB
63822014-08-07 Gary Benson <gbenson@redhat.com>
6383
6384 * linux-x86-low.c: Do not include stddef.h.
6385 * lynx-ppc-low.c: Likewise.
6386 * tracepoint.c: Likewise.
6387
8980bdf6
GB
63882014-08-07 Gary Benson <gbenson@redhat.com>
6389
6390 * server.h: Do not include stdarg.h.
6391 * nto-low.c: Likewise.
6392
d7096f71
GB
63932014-08-07 Gary Benson <gbenson@redhat.com>
6394
6395 * server.h: Do not include stdlib.h.
6396 * inferiors.c: Likewise.
6397 * linux-low.c: Likewise.
6398 * regcache.c: Likewise.
6399 * spu-low.c: Likewise.
6400 * tracepoint.c: Likewise.
6401 * utils.c: Likewise.
6402
d02f550d
GB
64032014-08-07 Gary Benson <gbenson@redhat.com>
6404
6405 * server.h: Do not include stdio.h.
6406 * linux-low.c: Likewise.
6407 * remote-utils.c: Likewise.
6408 * spu-low.c: Likewise.
6409 * utils.c: Likewise.
6410 * wincecompat.c: Likewise.
6411
87f6c4e3
GB
64122014-08-06 Gary Benson <gbenson@redhat.com>
6413
6414 * regcache.c (init_register_cache): Move conditionals inside if.
6415
7089dca4
GB
64162014-08-06 Gary Benson <gbenson@redhat.com>
6417
6418 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6419
462f517e
GB
64202014-07-31 Gary Benson <gbenson@redhat.com>
6421
6422 * ax.h: Do not include server.h.
6423 * gdbthread.h: Likewise.
6424 * lynx-low.h: Likewise.
6425 * notif.h: Likewise.
6426
976411d6
GB
64272014-07-30 Gary Benson <gbenson@redhat.com>
6428
6429 * server.h: Include common-defs.h.
6430 Do not include config.h or build-gnulib-gdbserver/config.h.
6431
d41f6d8e
GB
64322014-07-30 Gary Benson <gbenson@redhat.com>
6433
6434 * hostio-errno.c: Move server.h to top of includes list.
6435 * inferiors.c: Likewise.
6436 * linux-x86-low.c: Likewise.
6437 * notif.c: Include server.h.
6438
314c6a35
TT
64392014-07-24 Tom Tromey <tromey@redhat.com>
6440 Gary Benson <gbenson@redhat.com>
6441
6442 * server.h (CORE_ADDR): Now unsigned.
6443
69ff6be5
PA
64442014-07-16 Pedro Alves <palves@redhat.com>
6445
6446 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6447
ce9e3fe7
PA
64482014-07-15 Pedro Alves <palves@redhat.com>
6449
6450 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6451 copy.
6452
e76126e8
PA
64532014-07-11 Pedro Alves <palves@redhat.com>
6454
6455 * linux-low.c (kill_wait_lwp): New function, based on
6456 kill_one_lwp_callback, but use my_waitpid directly.
6457 (kill_one_lwp_callback, linux_kill): Use it.
6458
8e9db26e
PA
64592014-06-23 Pedro Alves <palves@redhat.com>
6460
6461 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6462 before setting DR0..DR3.
6463
698b3e08
GB
64642014-06-20 Gary Benson <gbenson@redhat.com>
6465
6466 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6467 * configure: Regenerated.
6468 * config.in: Likewise.
6469
125f8a3d
GB
64702014-06-20 Gary Benson <gbenson@redhat.com>
6471
6472 * Makefile.in (SFILES): Update locations for files moved
6473 from common to nat.
6474 (object file files): Reordered.
6475
42995dbd
GB
64762014-06-20 Gary Benson <gbenson@redhat.com>
6477
6478 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6479 (i386_dr_low_set_addr): Likewise.
6480 (i386_dr_low_get_addr): Likewise.
6481 (i386_dr_low_can_set_control): Likewise.
6482 (i386_dr_low_set_control): Likewise.
6483 (i386_dr_low_get_control): Likewise.
6484 (i386_dr_low_get_status): Likewise.
6485 (i386_get_debug_register_length): Likewise.
6486 * linux-x86-low.c (i386_dr_low_set_addr):
6487 Changed signature. Made static.
6488 (i386_dr_low_get_addr): Likewise.
6489 (i386_dr_low_set_control): Likewise.
6490 (i386_dr_low_get_control): Likewise.
6491 (i386_dr_low_get_status): Likewise.
6492 (i386_dr_low): New global variable.
6493 * win32-i386-low.c (i386_dr_low_set_addr):
6494 Changed signature. Made static.
6495 (i386_dr_low_get_addr): Likewise.
6496 (i386_dr_low_set_control): Likewise.
6497 (i386_dr_low_get_control): Likewise.
6498 (i386_dr_low_get_status): Likewise.
6499 (i386_dr_low): New global variable.
6500
e1d2394b
MS
65012014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6502
6503 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6504 * Makefile.in (AR, AR_FLAGS): Define.
6505 * configure: Regenerate.
6506
3a8ee006
GB
65072014-06-19 Gary Benson <gbenson@redhat.com>
6508
6509 * Makefile.in (i386-dregs.o): New rule.
6510 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6511 * i386-low.c (target.h): Remove include.
6512 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6513 (DR_CONTROL_SHIFT): Likewise.
6514 (DR_CONTROL_SIZE): Likewise.
6515 (DR_RW_EXECUTE): Likewise.
6516 (DR_RW_WRITE): Likewise.
6517 (DR_RW_READ): Likewise.
6518 (DR_RW_IORW): Likewise.
6519 (DR_LEN_1): Likewise.
6520 (DR_LEN_2): Likewise.
6521 (DR_LEN_4): Likewise.
6522 (DR_LEN_8): Likewise.
6523 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6524 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6525 (DR_ENABLE_SIZE): Likewise.
6526 (DR_LOCAL_SLOWDOWN): Likewise.
6527 (DR_GLOBAL_SLOWDOWN): Likewise.
6528 (DR_CONTROL_RESERVED): Likewise.
6529 (I386_DR_CONTROL_MASK): Likewise.
6530 (I386_DR_VACANT): Likewise.
6531 (I386_DR_LOCAL_ENABLE): Likewise.
6532 (I386_DR_GLOBAL_ENABLE): Likewise.
6533 (I386_DR_DISABLE): Likewise.
6534 (I386_DR_SET_RW_LEN): Likewise.
6535 (I386_DR_GET_RW_LEN): Likewise.
6536 (I386_DR_WATCH_HIT): Likewise.
6537 (i386_wp_op_t): Likewise.
6538 (i386_show_dr): Likewise.
6539 (i386_length_and_rw_bits): Likewise.
6540 (i386_insert_aligned_watchpoint): Likewise.
6541 (i386_remove_aligned_watchpoint): Likewise.
6542 (i386_handle_nonaligned_watchpoint): Likewise.
6543 i386_update_inferior_debug_regs(): Likewise.
6544 (i386_dr_insert_watchpoint): Likewise.
6545 (i386_dr_remove_watchpoint): Likewise.
6546 (i386_dr_region_ok_for_watchpoint): Likewise.
6547 (i386_dr_stopped_data_address): Likewise.
6548 (i386_dr_stopped_by_watchpoint): Likewise.
6549
8f26655c
GB
65502014-06-19 Gary Benson <gbenson@redhat.com>
6551
6552 * i386-low.c (i386_dr_show): Renamed to
6553 i386_show_dr and made static. All uses updated.
6554 (i386_dr_length_and_rw_bits): Renamed to
6555 i386_length_and_rw_bits and made static.
6556 All uses updated.
6557 (i386_dr_insert_aligned_watchpoint): Renamed to
6558 i386_insert_aligned_watchpoint and made static.
6559 All uses updated.
6560 (i386_dr_remove_aligned_watchpoint): Renamed to
6561 i386_remove_aligned_watchpoint and made static.
6562 All uses updated.
6563 (i386_dr_update_inferior_debug_regs): Renamed to
6564 i386_update_inferior_debug_regs and made static.
6565 All uses updated.
6566
b9228891
GB
65672014-06-18 Gary Benson <gbenson@redhat.com>
6568
5171def3
GB
6569 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6570 (i386_dr_low_can_set_control): Likewise.
6571 (i386_get_debug_register_length): Likewise.
6572 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6573 (i386_dr_low_can_set_control): Likewise.
6574 (i386_get_debug_register_length): Likewise.
6575
65762014-06-17 Gary Benson <gbenson@redhat.com>
6577
b9228891
GB
6578 * i386-low.h (i386-dregs.h): New include.
6579 (DR_FIRSTADDR): Now in i386-dregs.h.
6580 (DR_LASTADDR): Likewise.
6581 (DR_NADDR): Likewise.
6582 (DR_STATUS): Likewise.
6583 (DR_CONTROL): Likewise.
6584 (i386_debug_reg_state): Likewise.
6585 (i386_dr_insert_watchpoint): Likewise.
6586 (i386_dr_remove_watchpoint): Likewise.
6587 (i386_dr_region_ok_for_watchpoint): Likewise.
6588 (i386_dr_stopped_data_address): Likewise.
6589 (i386_dr_stopped_by_watchpoint): Likewise.
6590 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6591
4be83cc2
GB
65922014-06-18 Gary Benson <gbenson@redhat.com>
6593
6594 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6595 i386_dr_insert_watchpoint.
6596 (i386_low_remove_watchpoint): Renamed to
6597 i386_dr_remove_watchpoint.
6598 (i386_low_region_ok_for_watchpoint): Renamed to
6599 i386_dr_region_ok_for_watchpoint.
6600 (i386_low_stopped_data_address): Renamed to
6601 i386_dr_stopped_data_address.
6602 (i386_low_stopped_by_watchpoint): Renamed to
6603 i386_dr_stopped_by_watchpoint.
6604 * i386-low.c (i386_show_dr): Renamed to
6605 i386_dr_show and made nonstatic. All uses updated.
6606 (i386_length_and_rw_bits): Renamed to
6607 i386_dr_length_and_rw_bits and made nonstatic.
6608 All uses updated.
6609 (i386_insert_aligned_watchpoint): Renamed to
6610 i386_dr_insert_aligned_watchpoint and made nonstatic.
6611 All uses updated.
6612 (i386_remove_aligned_watchpoint): Renamed to
6613 i386_dr_remove_aligned_watchpoint and made nonstatic.
6614 All uses updated.
6615 (i386_update_inferior_debug_regs): Renamed to
6616 i386_dr_update_inferior_debug_regs and made nonstatic.
6617 All uses updated.
6618 (i386_low_insert_watchpoint): Renamed to
6619 i386_dr_insert_watchpoint. All uses updated.
6620 (i386_low_remove_watchpoint): Renamed to
6621 i386_dr_remove_watchpoint. All uses updated.
6622 (i386_low_region_ok_for_watchpoint): Renamed to
6623 i386_dr_region_ok_for_watchpoint. All uses updated.
6624 (i386_low_stopped_data_address): Renamed to
6625 i386_dr_stopped_data_address. All uses updated.
6626 (i386_low_stopped_by_watchpoint): Renamed to
6627 i386_dr_stopped_by_watchpoint. All uses updated.
6628
131aa0d4
GB
66292014-06-18 Gary Benson <gbenson@redhat.com>
6630
6631 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6632 (i386_dr_low_can_set_control): Likewise.
6633 (i386_insert_aligned_watchpoint): New check.
6634
d9305f7f
GB
66352014-06-18 Gary Benson <gbenson@redhat.com>
6636
6637 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6638 Renamed to state.
6639
e927c9fc
GB
66402014-06-18 Gary Benson <gbenson@redhat.com>
6641
6642 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6643 instead of fatal and error.
6644 (i386_handle_nonaligned_watchpoint): Likewise.
6645
1b6d4134
GB
66462014-06-18 Gary Benson <gbenson@redhat.com>
6647
6648 * i386-low.c (i386_get_debug_register_length): New macro.
6649 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6650 (i386_show_dr): Use debug_printf instead of fprintf. Use
6651 phex to format values.
6652
6e62758f
GB
66532014-06-18 Gary Benson <gbenson@redhat.com>
6654
6655 * i386-low.h: Comment changes.
6656 * i386-low.c: Likewise.
6657
fc6e2f03
GB
66582014-06-18 Gary Benson <gbenson@redhat.com>
6659
6660 * i386-low.c: Whitespace changes.
6661
f9d1eeed
TT
66622014-06-12 Tom Tromey <tromey@redhat.com>
6663
6664 * utils.c (freeargv): Remove.
6665
0b04e523
TT
66662014-06-12 Tom Tromey <tromey@redhat.com>
6667
6668 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6669 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6670 (parse_debug_format_options): Likewise.
6671 (gdbserver_usage): Likewise.
6672 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6673 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6674 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6675 against libiberty.
6676 ($(LIBGNU)): Depend on libiberty.
6677 (all-lib): Recurse into all subdirs.
6678 (install-only): Invoke "install" target in subdirs.
6679 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6680 targets.
6681 * configure: Rebuild.
6682 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6683 for vasprintf, vsnprintf, or gettimeofday.
6684 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6685 srv_tgtobj.
6686
270c9937
JB
66872014-06-05 Joel Brobecker <brobecker@adacore.com>
6688
6689 * development.sh: Delete.
6690 * Makefile.in (config.status): Adjust dependency on development.sh.
6691 * configure.ac: Adjust development.sh source call.
6692 * configure: Regenerate.
6693
0a261ed8
PA
66942014-06-02 Pedro Alves <palves@redhat.com>
6695
6696 * ax.c (gdb_free_agent_expr): New function.
6697 * ax.h (gdb_free_agent_expr): New declaration.
6698 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6699 list.
6700 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6701 static.
6702 (clear_breakpoint_conditions_and_commands): New function.
6703 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6704 (clear_breakpoint_conditions_and_commands): New declaration.
6705
e9dae05e
RR
67062014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6707
6708 * linux-aarch64-low.c (asm/ptrace.h): Include.
6709
5876f503
JK
67102014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6711
6712 Fix TLS access for -static -pthread.
6713 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6714 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6715 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6716
802e8e6d
PA
67172014-05-20 Pedro Alves <palves@redhat.com>
6718
6719 * linux-aarch64-low.c (aarch64_insert_point)
6720 (aarch64_remove_point): No longer check whether the type is
6721 supported here. Adjust to new interface.
6722 (the_low_target): Install aarch64_supports_z_point_type as
6723 supports_z_point_type method.
6724 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6725 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6726 instead of a Z packet char. Adjust.
6727 (arm_supports_z_point_type): New function.
6728 (arm_insert_point, arm_remove_point): Adjust to new interface.
6729 (the_low_target): Install arm_supports_z_point_type.
6730 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6731 (cris_insert_point, cris_remove_point): Adjust to new interface.
6732 Don't check whether the type is supported here.
6733 (the_low_target): Install cris_supports_z_point_type.
6734 * linux-low.c (linux_supports_z_point_type): New function.
6735 (linux_insert_point, linux_remove_point): Adjust to new interface.
6736 * linux-low.h (struct linux_target_ops) <insert_point,
6737 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6738 raw_breakpoint pointer parameter.
6739 <supports_z_point_type>: New method.
6740 * linux-mips-low.c (mips_supports_z_point_type): New function.
6741 (mips_insert_point, mips_remove_point): Adjust to new interface.
6742 Use mips_supports_z_point_type.
6743 (the_low_target): Install mips_supports_z_point_type.
6744 * linux-ppc-low.c (the_low_target): Install NULL as
6745 supports_z_point_type method.
6746 * linux-s390-low.c (the_low_target): Install NULL as
6747 supports_z_point_type method.
6748 * linux-sparc-low.c (the_low_target): Install NULL as
6749 supports_z_point_type method.
6750 * linux-x86-low.c (x86_supports_z_point_type): New function.
6751 (x86_insert_point): Adjust to new insert_point interface. Use
6752 insert_memory_breakpoint. Adjust to new
6753 i386_low_insert_watchpoint interface.
6754 (x86_remove_point): Adjust to remove_point interface. Use
6755 remove_memory_breakpoint. Adjust to new
6756 i386_low_remove_watchpoint interface.
6757 (the_low_target): Install x86_supports_z_point_type.
6758 * lynx-low.c (lynx_target_ops): Install NULL as
6759 supports_z_point_type callback.
6760 * nto-low.c (nto_supports_z_point_type): New.
6761 (nto_insert_point, nto_remove_point): Adjust to new interface.
6762 (nto_target_ops): Install nto_supports_z_point_type.
6763 * mem-break.c: Adjust intro comment.
6764 (struct raw_breakpoint) <raw_type, size>: New fields.
6765 <inserted>: Update comment.
6766 <shlib_disabled>: Delete field.
6767 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6768 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6769 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6770 (raw_bkpt_type_to_target_hw_bp_type): New function.
6771 (find_enabled_raw_code_breakpoint_at): New function.
6772 (find_raw_breakpoint_at): New type and size parameters. Use them.
6773 (insert_memory_breakpoint): New function, based off
6774 set_raw_breakpoint_at.
6775 (remove_memory_breakpoint): New function.
6776 (set_raw_breakpoint_at): Reimplement.
6777 (set_breakpoint): New, based on set_breakpoint_at.
6778 (set_breakpoint_at): Reimplement.
6779 (delete_raw_breakpoint): Go through the_target->remove_point
6780 instead of assuming memory breakpoints.
6781 (find_gdb_breakpoint_at): Delete.
6782 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6783 (find_gdb_breakpoint): New function.
6784 (set_gdb_breakpoint_at): Delete.
6785 (z_type_supported): New function.
6786 (set_gdb_breakpoint_1): New function, loosely based off
6787 set_gdb_breakpoint_at.
6788 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6789 (delete_gdb_breakpoint_at): Delete.
6790 (delete_gdb_breakpoint_1): New function, loosely based off
6791 delete_gdb_breakpoint_at.
6792 (delete_gdb_breakpoint): New function.
6793 (clear_gdb_breakpoint_conditions): Rename to ...
6794 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6795 breakpoint.
6796 (add_condition_to_breakpoint): Make static.
6797 (add_breakpoint_condition): Take a struct breakpoint pointer
6798 instead of an address. Adjust.
6799 (gdb_condition_true_at_breakpoint): Rename to ...
6800 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6801 z_type parameter.
6802 (gdb_condition_true_at_breakpoint): Reimplement.
6803 (add_breakpoint_commands): Take a struct breakpoint pointer
6804 instead of an address. Adjust.
6805 (gdb_no_commands_at_breakpoint): Rename to ...
6806 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6807 parameter. Return true if no breakpoint was found. Change debug
6808 output.
6809 (gdb_no_commands_at_breakpoint): Reimplement.
6810 (run_breakpoint_commands): Rename to ...
6811 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6812 and change return type to boolean.
6813 (run_breakpoint_commands): New function.
6814 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6815 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6816 breakpoint. Go through the_target->remove_point instead of
6817 assuming memory breakpoint.
6818 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6819 software and hardware breakpoints.
6820 (reinsert_raw_breakpoint): Go through the_target->insert_point
6821 instead of assuming memory breakpoint.
6822 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6823 software and hardware breakpoints.
6824 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6825 Check both software and hardware breakpoints.
6826 (validate_inserted_breakpoint): Assert the breakpoint is a
6827 software breakpoint. Set the inserted flag to -1 instead of
6828 setting shlib_disabled.
6829 (delete_disabled_breakpoints): Adjust.
6830 (validate_breakpoints): Only validate software breakpoints.
6831 Adjust to inserted flag change.
6832 (check_mem_read, check_mem_write): Skip breakpoint types other
6833 than software breakpoints. Adjust to inserted flag change.
6834 * mem-break.h (enum raw_bkpt_type): New enum.
6835 (raw_breakpoint, struct process_info): Forward declare.
6836 (Z_packet_to_target_hw_bp_type): Delete declaration.
6837 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6838 (set_gdb_breakpoint, delete_gdb_breakpoint)
6839 (clear_breakpoint_conditions): New declarations.
6840 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6841 (breakpoint_inserted_here): Update comment.
6842 (add_breakpoint_condition, add_breakpoint_commands): Replace
6843 address parameter with a breakpoint pointer parameter.
6844 (gdb_breakpoint_here): Update comment.
6845 (delete_gdb_breakpoint_at): Delete.
6846 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6847 * server.c (process_point_options): Take a struct breakpoint
6848 pointer instead of an address. Adjust.
6849 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6850 delete_gdb_breakpoint.
6851 * spu-low.c (spu_target_ops): Install NULL as
6852 supports_z_point_type method.
6853 * target.h: Include mem-break.h.
6854 (struct target_ops) <prepare_to_access_memory>: Update comment.
6855 <supports_z_point_type>: New field.
6856 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6857 instead of a char. Also take a raw breakpoint pointer.
6858 * win32-arm-low.c (the_low_target): Install NULL as
6859 supports_z_point_type.
6860 * win32-i386-low.c (i386_supports_z_point_type): New function.
6861 (i386_insert_point, i386_remove_point): Adjust to new interface.
6862 (the_low_target): Install i386_supports_z_point_type.
6863 * win32-low.c (win32_supports_z_point_type): New function.
6864 (win32_insert_point, win32_remove_point): Adjust to new interface.
6865 (win32_target_ops): Install win32_supports_z_point_type.
6866 * win32-low.h (struct win32_target_ops):
6867 <supports_z_point_type>: New method.
6868 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6869 instead of a char. Also take a raw breakpoint pointer.
6870
932539e3
PA
68712014-05-20 Pedro Alves <palves@redhat.com>
6872
6873 * mem-break.h: Include break-common.h.
6874 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6875 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6876 (Z_packet_to_target_hw_bp_type): New declaration.
6877 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6878 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6879 (Z_PACKET_ACCESS_WP): Delete macros.
6880 (Z_packet_to_hw_type): Delete function.
6881 * i386-low.h: Don't include break-common.h here.
6882 (Z_packet_to_hw_type): Delete declaration.
6883 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6884 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6885 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6886 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6887 * linux-aarch64-low.c: Don't include break-common.h here.
6888 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6889 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6890 (Z_packet_to_target_hw_bp_type): Delete function.
6891 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6892 function.
6893 (mips_insert_point, mips_remove_point): Use
6894 Z_packet_to_target_hw_bp_type.
6895
4ff0d3d8
PA
68962014-05-20 Pedro Alves <palves@redhat.com>
6897
6898 * linux-aarch64-low.c: Include break-common.h.
6899 (enum target_point_type): Delete.
6900 (Z_packet_to_point_type): Rename to ...
6901 (Z_packet_to_target_hw_bp_type): ... this, and return a
6902 target_hw_bp_type instead.
6903 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6904 instead of an enum target_point_type.
6905 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6906 breakpoint type.
6907 (aarch64_dr_state_insert_one_point)
6908 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6909 (aarch64_handle_aligned_watchpoint)
6910 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6911 Take an enum target_hw_bp_type instead of an enum
6912 target_point_type.
6913 (aarch64_supports_z_point_type): New function.
6914 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6915 use Z_packet_to_target_hw_bp_type.
6916
786dc519
JB
69172014-05-20 Joel Brobecker <brobecker@adacore.com>
6918
6919 * configure.ac: Only use -Werror by default when DEVELOPMENT
6920 is true.
6921 * configure: Regenerate.
6922
9e0aa64f
JK
69232014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6924
6925 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6926 * linux-x86-low.c (X86_64_USER_REGS): New.
6927 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6928
2b577b92
YQ
69292014-04-28 Yao Qi <yao@codesourcery.com>
6930
6931 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6932 name.
6933
94611da2
PA
69342014-04-25 Pedro Alves <palves@redhat.com>
6935
6936 PR server/16255
6937 * linux-low.c (linux_attach_fail_reason_string): New function.
6938 (linux_attach_lwp): Delete.
6939 (linux_attach_lwp_1): Rename to ...
6940 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6941 argument. Remove "initial" parameter. Return int instead of
6942 void. Don't error or warn here.
6943 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6944 failure to attach to the tgid. Call warning when failing to
6945 attach to an lwp.
6946 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6947 argument. Remove "initial" parameter. Return int instead of
6948 void. Don't error or warn here.
6949 (linux_attach_fail_reason_string): New declaration.
6950 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6951 interface change. Use linux_attach_fail_reason_string.
6952
01f9f808
MS
69532014-04-24 Michael Sturm <michael.sturm@mintel.com>
6954 Walfred Tedeschi <walfred.tedeschi@intel.com>
6955
6956 * Makefile.in: Added rules to handle new files
6957 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6958 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6959 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6960 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6961 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6962 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6963 x32-avx512-linux.o.
6964 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6965 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6966 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6967 i386/x32-avx512.xml.
6968 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6969 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6970 i386/x32-avx512-linux.xml.
6971 * i387-fp.c (num_avx512_k_registers): New constant for number
6972 of K registers.
6973 (num_avx512_zmmh_low_registers): New constant for number of
6974 lower ZMM registers (0-15).
6975 (num_avx512_zmmh_high_registers): New constant for number of
6976 higher ZMM registers (16-31).
6977 (num_avx512_ymmh_registers): New contant for number of higher
6978 YMM registers (ymm16-31 added by avx521 on x86_64).
6979 (num_avx512_xmm_registers): New constant for number of higher
6980 XMM registers (xmm16-31 added by AVX512 on x86_64).
6981 (struct i387_xsave): Add space for AVX512 registers.
6982 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6983 Add code to handle AVX512 registers.
6984 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6985 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6986 prototypei from generated file.
6987 (tdesc_amd64_avx512_linux): Likewise.
6988 (init_registers_x32_avx512_linux): Likewise.
6989 (tdesc_x32_avx512_linux): Likewise.
6990 (init_registers_i386_avx512_linux): Likewise.
6991 (tdesc_i386_avx512_linux): Likewise.
6992 (x86_64_regmap): Add AVX512 registers.
6993 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6994 mask.
6995 (initialize_low_arch): Add code to initialize AVX512 registers.
6996
51aa91f9
PA
69972014-04-23 Pedro Alves <palves@redhat.com>
6998
6999 * mem-break.c (find_gdb_breakpoint_at): Make static.
7000 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7001
a4165e94
PA
70022014-04-23 Pedro Alves <palves@redhat.com>
7003
7004 * i386-low.c: Don't include break-common.h here.
7005 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7006 prototype to take target_hw_bp_type as argument instead of a Z
7007 packet char.
7008 * i386-low.h: Include break-common.h here.
7009 (Z_packet_to_hw_type): Declare.
7010 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7011 prototypes.
7012 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7013 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7014 (x86_remove_point): Convert the packet number to a
7015 target_hw_bp_type before calling i386_low_remove_watchpoint.
7016 * win32-i386-low.c (i386_insert_point): Convert the packet number
7017 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7018 (i386_remove_point): Convert the packet number to a
7019 target_hw_bp_type before calling i386_low_remove_watchpoint.
7020
b8acf843
PA
70212014-04-23 Pedro Alves <palves@redhat.com>
7022
7023 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7024
d708bcd1
PA
70252014-04-10 Pedro Alves <palves@redhat.com>
7026
7027 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7028 Check if the condition or command is NULL before checking if the
7029 breakpoint is known. On success, return true.
7030 * mem-break.h (add_breakpoint_condition): Document return.
7031 (add_breakpoint_commands): Add describing comment.
7032 * server.c (skip_to_semicolon): New function.
7033 (process_point_options): Use it.
7034
2eec7d5b
PA
70352014-04-09 Pedro Alves <palves@redhat.com>
7036
7037 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7038 to lwpid_of.
7039
fa96cb38
PA
70402014-02-27 Pedro Alves <palves@redhat.com>
7041
7042 PR 12702
7043 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7044 macros.
7045 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7046 output.
7047 (last_thread_of_process_p): Take a PID argument instead of a
7048 thread pointer.
7049 (linux_wait_for_lwp): Delete.
7050 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7051 functions.
7052 (linux_low_filter_event): New function, party factored out from
7053 linux_wait_for_event.
7054 (linux_wait_for_event): Rename to ...
7055 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7056 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7057 sigsuspend. Check for zombie leaders.
7058 (linux_wait_for_event): Reimplement as wrapper around
7059 linux_wait_for_event_filtered.
7060 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7061 a normal or signal exit is seen, it's the whole process exiting.
7062 (wait_for_sigstop): No longer a for_each_inferior callback.
7063 Rewrite on top of linux_wait_for_event_filtered.
7064 (stop_all_lwps): Call wait_for_sigstop directly.
7065 * server.c (resume, handle_target_event): Handle
7066 TARGET_WAITKIND_NO_RESUMED.
7067
d763de10
JB
70682014-02-26 Joel Brobecker <brobecker@adacore.com>
7069
7070 * win32-low.c (psapi_get_dll_name,
7071 * win32_CreateToolhelp32Snapshot): Delete.
7072 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7073 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7074 Delete.
7075 (handle_load_dll): Add function description.
7076 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7077
850a0f76
JB
70782014-02-26 Joel Brobecker <brobecker@adacore.com>
7079
7080 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7081 Add comment.
7082 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7083 base address when calling win32_add_one_solib.
7084 (handle_load_dll): Delete local variable load_addr.
7085 Remove 0x1000 offset applied to DLL base address when calling
7086 win32_add_one_solib.
7087 (handle_unload_dll): Add comment.
7088
f25b3fc3
JB
70892014-02-26 Joel Brobecker <brobecker@adacore.com>
7090
7091 * win32-low.c (win32_add_all_dlls): Renames
7092 win32_ensure_ntdll_loaded. Rewrite function documentation.
7093 Adjust implementation to always load all DLLs.
7094 Add 0x1000 offset to DLL base address when calling
7095 win32_add_one_solib.
7096 (child_initialization_done): New static global.
7097 (do_initial_child_stuff): Set child_initialization_done to
7098 zero during child initialization, and 1 after. Replace call
7099 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7100 Add comment.
7101 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7102 (handle_unload_dll): Add function documentation.
7103 (get_child_debug_event): Ignore load and unload DLL events
7104 during child initialization.
7105
d86d4aaf
DE
71062014-02-20 Doug Evans <dje@google.com>
7107
3bc32da3 7108 Remove global all_lwps.
d86d4aaf
DE
7109 * inferiors.h (ptid_of): Move here from linux-low.h.
7110 (pid_of, lwpid_of): Ditto.
7111 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7112 parameter is a struct thread_info * now.
7113 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7114 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7115 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7116 directly.
7117 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7118 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7119 * linux-arm-low.c (update_registers_callback): Update, "entry"
7120 parameter is a struct thread_info * now.
7121 Fetch lwpid from current_inferior directly.
7122 (arm_insert_point): Pass &all_threads to find_inferior instead of
7123 &all_lwps.
7124 (arm_remove_point): Ditto.
7125 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7126 (arm_prepare_to_resume): Fetch pid from thread.
7127 (arm_read_description): Fetch lwpid from current_inferior directly.
7128 * linux-low.c (all_lwps): Delete.
7129 (delete_lwp): Delete call to remove_inferior.
7130 (handle_extended_wait): Fetch lwpid from thread.
7131 (add_lwp): Don't set lwp->entry.id. Remove call to
7132 add_inferior_to_list.
7133 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7134 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7135 (kill_one_lwp_callback): Ditto.
7136 (linux_kill): Don't dereference NULL pointer.
7137 Fetch ptid,lwpid from thread.
7138 (get_detach_signal): Fetch ptid from thread.
7139 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7140 Simplify call to regcache_invalidate_thread.
7141 (delete_lwp_callback): Update, "entry" parameter is a
7142 struct thread_info * now. Fetch pid from thread.
7143 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7144 (status_pending_p_callback): Update, "entry" parameter is a
7145 struct thread_info * now. Fetch ptid from thread.
7146 (find_lwp_pid): Update, "entry" parameter is a
7147 struct thread_info * now.
7148 (linux_wait_for_lwp): Fetch pid from thread.
7149 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7150 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7151 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7152 (dequeue_one_deferred_signal): Ditto.
7153 (cancel_breakpoint): Fetch ptid from current_inferior.
7154 (linux_wait_for_event): Pass &all_threads to find_inferior,
7155 not &all_lwps. Fetch ptid, lwpid from thread.
7156 (count_events_callback): Update, "entry" parameter is a
7157 struct thread_info * now.
7158 (select_singlestep_lwp_callback): Ditto.
7159 (select_event_lwp_callback): Ditto.
7160 (cancel_breakpoints_callback): Ditto.
7161 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7162 not &all_lwps.
7163 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7164 (unsuspend_one_lwp): Update, "entry" parameter is a
7165 struct thread_info * now.
7166 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7167 not &all_lwps.
7168 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7169 Fetch lwpid from thread, not lwp.
7170 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7171 Pass &all_threads to find_inferior, not &all_lwps.
7172 (send_sigstop): Fetch lwpid from thread, not lwp.
7173 (send_sigstop_callback): Update, "entry" parameter is a
7174 struct thread_info * now.
7175 (suspend_and_send_sigstop_callback): Ditto.
7176 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7177 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7178 struct thread_info * now.
7179 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7180 from thread, lwp.
7181 (lwp_running): Update, "entry" parameter is a
7182 struct thread_info * now.
7183 (stop_all_lwps): Fetch ptid from thread.
7184 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7185 (linux_resume_one_lwp): Fetch lwpid from thread.
7186 (linux_set_resume_request): Update, "entry" parameter is a
7187 struct thread_info * now. Fetch pid, lwpid from thread.
7188 (resume_status_pending_p): Update, "entry" parameter is a
7189 struct thread_info * now.
7190 (need_step_over_p): Ditto. Fetch lwpid from thread.
7191 (start_step_over): Fetch lwpid from thread.
7192 (linux_resume_one_thread): Update, "entry" parameter is a
7193 struct thread_info * now. Fetch lwpid from thread.
7194 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7195 (proceed_one_lwp): Update, "entry" parameter is a
7196 struct thread_info * now. Fetch lwpid from thread.
7197 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7198 struct thread_info * now.
7199 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7200 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7201 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7202 directly.
7203 (regsets_store_inferior_registers): Ditto.
7204 (fetch_register, store_register): Ditto.
7205 (linux_read_memory, linux_write_memory): Ditto.
7206 (linux_request_interrupt): Ditto.
7207 (linux_read_auxv): Ditto.
7208 (linux_xfer_siginfo): Ditto.
7209 (linux_qxfer_spu): Ditto.
7210 (linux_qxfer_libraries_svr4): Ditto.
7211 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7212 moved to inferiors.h.
7213 (get_lwp): Delete.
7214 (get_thread_lwp): Update.
7215 (struct lwp_info): Delete member "entry". Simplify comment for
7216 member "thread".
7217 (all_lwps): Delete.
7218 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7219 current_inferior directly.
7220 (update_watch_registers_callback): Update, "entry" parameter is a
7221 struct thread_info * now. Fetch pid from thread.
7222 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7223 (mips_insert_point): Fetch lwpid from current_inferior.
7224 Pass &all_threads to find_inferior, not &all_lwps.
7225 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7226 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7227 directly.
7228 (mips_stopped_data_address): Ditto.
7229 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7230 directly.
7231 * linux-tile-low.c (tile_arch_setup): Ditto.
7232 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7233 (update_debug_registers_callback): Update, "entry" parameter is a
7234 struct thread_info * now. Fetch pid from thread.
7235 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7236 Pass &all_threads to find_inferior, not &all_lwps.
7237 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7238 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7239 Pass &all_threads to find_inferior, not &all_lwps.
7240 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7241 (i386_dr_low_get_status): Ditto.
7242 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7243 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7244 (x86_linux_read_description): Ditto.
7245 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7246
3b8361aa
DE
72472014-02-20 Doug Evans <dje@google.com>
7248
7249 * inferiors.c (get_first_inferior): Fix buglet.
7250
f7667f0d
DE
72512014-02-19 Doug Evans <dje@google.com>
7252
7253 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7254 * inferiors.c (add_thread): Change result type to struct thread_info *.
7255 All callers updated.
7256 (add_lwp): Call add_thread here instead of in callers.
7257 All callers updated.
7258 * linux-low.h (get_lwp_thread): Rewrite.
7259 (struct lwp_info): New member "thread".
7260
b3312d80
DE
72612014-02-19 Doug Evans <dje@google.com>
7262
7263 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7264 All callers updated.
7265
ecc6f45c
DE
72662014-02-19 Doug Evans <dje@google.com>
7267
7268 * inferiors.c (add_thread): Fix whitespace.
7269
649ebbca
DE
72702014-02-19 Doug Evans <dje@google.com>
7271
7272 * dll.c (clear_dlls): Replace accessing list implemention details
7273 with API function.
7274 * gdbthread.h (get_first_thread): Declare.
7275 * inferiors.c (for_each_inferior_with_data): New function.
7276 (get_first_thread): New function.
7277 (find_thread_ptid): Simplify.
7278 (get_first_inferior): New function.
7279 (clear_list): Delete.
7280 (one_inferior_p): New function.
7281 (clear_inferior_list): New function.
7282 (clear_inferiors): Update.
7283 * inferiors.h (for_each_inferior_with_data): Declare.
7284 (clear_inferior_list): Declare.
7285 (one_inferior_p): Declare.
7286 (get_first_inferior): Declare.
7287 * linux-low.c (linux_wait_for_event): Replace accessing list
7288 implemention details with API function.
7289 * server.c (target_running): Ditto.
7290 (accumulate_file_name_length): New function.
7291 (emit_dll_description): New function.
7292 (handle_qxfer_libraries): Replace accessing list implemention
7293 details with API function.
7294 (handle_qxfer_threads_worker): New function.
7295 (handle_qxfer_threads_proper): Replace accessing list implemention
7296 details with API function.
7297 (handle_query): Ditto.
7298 (visit_actioned_threads_callback_ftype): New typedef.
7299 (visit_actioned_threads_data): New struct.
7300 (visit_actioned_threads): Rewrite to be find_inferior callback.
7301 (resume): Call find_inferior.
7302 (handle_status): Replace accessing list implemention
7303 details with API function.
7304 (process_serial_event): Replace accessing list implemention details
7305 with API function.
7306 * target.c (set_desired_inferior): Replace accessing list implemention
7307 details with API function.
7308 * tracepoint.c (same_process_p): New function.
7309 (gdb_agent_about_to_close): Replace accessing list implemention
7310 details with API function.
7311 * win32-low.c (child_delete_thread): Replace accessing list
7312 implemention details with API function.
7313 (match_dll_by_basename): New function.
7314 (dll_is_loaded_by_basename): New function.
7315 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7316 details call to dll_is_loaded_by_basename.
7317
80894984
DE
73182014-02-19 Doug Evans <dje@google.com>
7319
7320 * dll.h (struct dll_info): Add comment.
7321 * gdbthread.h (struct thread_info): Add comment.
7322 (current_ptid): Simplify.
7323 * inferiors.c (add_process): Update.
7324 (remove_process): Update.
7325 * inferiors.h (struct process_info): Rename member "head" to "entry".
7326 * linux-low.c (delete_lwp): Update.
7327 (add_lwp): Update.
7328 (last_thread_of_process_p): Update.
7329 (kill_one_lwp_callback, linux_kill): Update.
7330 (status_pending_p_callback): Update.
7331 (wait_for_sigstop): Update. Simplify read of ptid.
7332 (start_step_over): Update.
7333 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7334 (get_lwp_thread): Update.
7335 (struct lwp_info): Rename member "head" to "entry".
7336 * regcache.h (inferior_list_entry): Delete.
7337 * server.c (kill_inferior_callback): Update.
7338 (detach_or_kill_inferior_callback): Update.
7339 (print_started_pid): Update.
7340 (print_attached_pid): Update.
7341 (process_serial_event): Simplify read of ptid.
7342 * thread-db.c (thread_db_create_event): Update.
7343 (thread_db_get_tls_address): Update.
7344 * win32-low.c (current_inferior_ptid): Simplify.
7345
46917d26
TT
73462014-02-19 Tom Tromey <tromey@redhat.com>
7347
7348 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7349 argument.
7350 (target_supports_btrace): Update.
7351
0759a81e
YQ
73522014-02-14 Yao Qi <yao@codesourcery.com>
7353
7354 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7355 (rsp-low-ipa.o): New target.
7356
a7191e8b
TT
73572014-02-12 Tom Tromey <tromey@redhat.com>
7358
7359 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7360 convert_ascii_to_int.
7361 * regcache.c (registers_to_string): Likewise.
7362 * remote-utils.c (decode_M_packet): Likewise.
7363 * server.c (process_serial_event): Likewise.
7364
ff0e980e
TT
73652014-02-12 Tom Tromey <tromey@redhat.com>
7366
7367 * server.c (handle_query, handle_v_run): Use hex2bin, not
7368 unhexify.
7369 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7370
e9371aff
TT
73712014-02-12 Tom Tromey <tromey@redhat.com>
7372
7373 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7374 convert_int_to_ascii.
7375 * regcache.c (registers_to_string, collect_register_as_string):
7376 Likewise.
7377 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7378 Likewise.
7379 * server.c (process_serial_event): Likewise.
7380 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7381 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7382
971dc0b8
TT
73832014-02-12 Tom Tromey <tromey@redhat.com>
7384
7385 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7386 bin2hex, not hexify.
7387 * tracepoint.c (cmd_qtstatus): Likewise.
7388
0a822afb
TT
73892014-02-12 Tom Tromey <tromey@redhat.com>
7390
7391 * remote-utils.c (monitor_output): Pass explicit length to
7392 hexify.
7393
9c3d6531
TT
73942014-02-12 Tom Tromey <tromey@redhat.com>
7395
7396 * tracepoint.c: Include rsp-low.h.
7397 * server.c: Include rsp-low.h.
7398 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7399 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7400 declare.
7401 * remote-utils.c: Include rsp-low.h.
7402 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7403 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7404 (convert_int_to_ascii, convert_ascii_to_int): Move to
7405 common/rsp-low.c.
7406 * regcache.c: Include rsp-low.h.
7407 * ax.c: Include rsp-low.h.
7408 * Makefile.in (SFILES): Add common/rsp-low.c.
7409 (OBS): Add rsp-low.o.
7410 (rsp-low.o): New target.
7411
01fd3ea5
TT
74122014-02-12 Tom Tromey <tromey@redhat.com>
7413
7414 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7415 Include print-utils.h.
7416 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7417 (plongest, thirty_two, phex_nz): Remove.
7418 * Makefile.in (SFILES): Add common/print-utils.c.
7419 (OBS): Add print-utils.o.
7420 (print-utils-ipa.o): New target.
7421 (print-utils.o): New target.
7422 (IPA_OBJS): Add print-utils-ipa.o.
7423
e99dc820
TT
74242014-02-06 Tom Tromey <tromey@redhat.com>
7425
7426 * Makefile.in (SFILES): Fix indentation.
7427
ee1e2d4f
DE
74282014-02-05 Doug Evans <dje@google.com>
7429
7430 * linux-low.c (linux_wait_for_event): Improve comment.
7431 (linux_wait_1): Keep current_inferior in sync with event_child.
7432
f5a02773
DE
74332014-01-22 Doug Evans <dje@google.com>
7434
7435 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7436
87ce2a04
DE
74372014-01-22 Doug Evans <dje@google.com>
7438
7439 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7440 * configure: Regenerate.
7441 * config.in: Regenerate.
7442 * Makefile.in (SFILES): Add debug.c.
7443 (OBS): Add debug.o.
7444 * debug.c: New file.
7445 * debug.h: New file.
7446 * linux-aarch64-low.c (*): Update all debugging printfs to use
7447 debug_printf instead of fprintf.
7448 * linux-arm-low.c (*): Ditto.
7449 * linux-cris-low.c (*): Ditto.
7450 * linux-crisv32-low.c (*): Ditto.
7451 * linux-m32r-low.c (*): Ditto.
7452 * linux-sparc-low.c (*): Ditto.
7453 * linux-x86.c (*): Ditto.
7454 * linux-low.c (*): Ditto.
7455 (linux_wait_1): Add calls to debug_enter, debug_exit.
7456 (linux_wait): Remove redundant debugging printf.
7457 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7458 (linux_resume, unstop_all_lwps): Ditto.
7459 * mem-break.c (*): Update all debugging printfs to use
7460 debug_printf instead of fprintf.
7461 * remote-utils.c (*): Ditto.
7462 * thread-db.c (*): Ditto.
7463 * server.c #include <ctype.h>, "gdb_vecs.h".
7464 (debug_threads): Moved to debug.c.
7465 (*): Update all debugging printfs to use debug_printf instead of
7466 fprintf.
7467 (start_inferior): Replace call to fflush with call to debug_flush.
7468 (monitor_show_help): Mention set debug-format.
7469 (parse_debug_format_options): New function.
7470 (handle_monitor_command): Handle "monitor set debug-format".
7471 (gdbserver_usage): Mention --debug-format.
7472 (main): Parse --debug-format.
7473 * server.h (debug_threads): Declaration moved to debug.h.
7474 #include "debug.h".
7475 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7476 trace_debug_1 that uses debug_printf.
7477 (tracepoint_look_up_symbols): Update all debugging printfs to use
7478 debug_printf instead of fprintf.
7479
e671835b
BS
74802014-01-20 Baruch Siach <baruch@tkos.co.il>
7481
7482 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7483 sys/ptrace.h.
7484
b5737fa9
PA
74852014-01-17 Pedro Alves <palves@redhat.com>
7486
ea38d2a9 7487 PR build/16445
c7faa97a
PA
7488 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7489 defined after including gdb_proc_service.h.
b5737fa9 7490
40ed484e
DE
74912014-01-16 Doug Evans <dje@google.com>
7492
7493 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7494 (match_dll): Use it.
7495
969c39fb
MM
74962014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7497
7498 * target.h (target_ops) <read_btrace>: Change parameters and
7499 return type to allow error reporting.
7500 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7501 trace reading errors on.
7502 * linux-low.c (linux_low_read_btrace): Pass trace reading
7503 errors on.
7504 (linux_low_disable_btrace): New.
7505
ab7f45ba
DE
75062014-01-15 Doug Evans <dje@google.com>
7507
7508 * inferiors.c (thread_id_to_gdb_id): Delete.
7509 * inferiors.h (thread_id_to_gdb_id): Delete.
7510
66af0f44
EZ
75112014-01-13 Eli Zaretskii <eliz@gnu.org>
7512
7513 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7514 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7515 versions.
7516
9939e131
PA
75172014-01-08 Pedro Alves <palves@redhat.com>
7518
7519 * server.c (handle_status): Don't discard previous queued stop
7520 replies or thread's pending status here.
7521 (main) <disconnection>: Do it here instead.
7522
b7ea362b
PA
75232014-01-08 Pedro Alves <palves@redhat.com>
7524
7525 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7526 * server.c (visit_actioned_threads, handle_pending_status): New
7527 function.
7528 (handle_v_cont): Factor out parts to ...
7529 (resume): ... this new function. If in all-stop, and a thread
7530 being resumed has a pending status, report it without actually
7531 resuming.
7532 (myresume): Adjust to use the new 'resume' function.
7533 (clear_pending_status_callback, set_pending_status_callback)
7534 (find_status_pending_thread_callback): New functions.
7535 (handle_status): Handle the case of multiple threads having
7536 interesting statuses to report. Report threads' real last signal
7537 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7538 with an interesting thread to report the status for, instead of
7539 always reporting the status of the first thread.
7540
28498c42
JB
75412014-01-01 Joel Brobecker <brobecker@adacore.com>
7542
7543 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7544 * gdbreplay.c (gdbreplay_version): Likewise.
7545
f45c82da
YZ
75462013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7547
7548 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7549 iov.iov_len with the real length in use.
7550
379a5e2d
JB
75512013-12-13 Joel Brobecker <brobecker@adacore.com>
7552
7553 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7554 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7555 for all targets that use win32-low.c.
7556 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7557 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7558
4210d83e
PA
75592013-12-13 Pedro Alves <palves@redhat.com>
7560
7561 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7562 if equal to TARGET_WAITKIND_LOADED.
7563 * win32-low.c (cached_status): New static global.
7564 (win32_wait): Add declaration.
7565 (do_initial_child_stuff): Flush all initial pending debug events
7566 up to the initial breakpoint.
7567 (win32_wait): If CACHED_STATUS was set, return that instead
7568 of doing a real wait. Remove the code resuming the execution
7569 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7570 during the initial phase. Also remove the code changing
7571 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7572 TARGET_WAITKIND_STOPPED.
7573
e7f0d979
YQ
75742013-12-11 Yao Qi <yao@codesourcery.com>
7575
7576 * notif.c (handle_notif_ack): Return 0 if no notification
7577 matches.
7578
ebcf782c
DE
75792013-11-20 Doug Evans <dje@google.com>
7580
7581 * linux-low.c (linux_set_resume_request): Fix comment.
7582
20ad9378
DE
75832013-11-20 Doug Evans <dje@google.com>
7584
7585 * linux-low.c (resume_status_pending_p): Tweak comment.
7586
a196ebeb
WT
75872013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7588
7589 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7590 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7591 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7592 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7593 (srv_amd64_regobj): Add amd64-mpx.o.
7594 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7595 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7596 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7597 * i387-fp.c (num_pl_bnd_register) Added constant.
7598 (num_pl_bnd_cfg_registers) Added constant.
7599 (struct i387_xsave) Added reserved area and MPX fields.
7600 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7601 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7602 function.
7603 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7604 (init_registers_amd64_mpx_linux): Declare new function.
7605 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7606 (x86_64_regmap): Add MPX registers.
7607 (x86_linux_read_description): Add MPX case.
7608 (initialize_low_arch): Initialize MPX targets.
7609
0080a2f6
TT
76102013-11-18 Tom Tromey <tromey@redhat.com>
7611
7612 * configure: Rebuild.
7613 * configure.ac: Don't check for stdlib.h.
7614 * gdbreplay.c: Unconditionally include stdlib.h.
7615
2978b111
TT
76162013-11-18 Tom Tromey <tromey@redhat.com>
7617
7618 * config.in: Rebuild.
7619 * configure: Rebuild.
7620 * configure.ac: Don't use AC_HEADER_DIRENT.
7621
a3d08894
TT
76222013-11-18 Tom Tromey <tromey@redhat.com>
7623
7624 * server.h: Don't check HAVE_STRING_H.
7625 * gdbreplay.c: Don't check HAVE_STRING_H.
7626 * configure: Rebuild.
7627
0a5dd17d
TT
76282013-11-18 Tom Tromey <tromey@redhat.com>
7629
7630 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7631 LIBGNU.
7632
1bd2f0ba
TT
76332013-11-08 Tom Tromey <tromey@redhat.com>
7634
7635 * configure, config.in: Rebuild.
7636 * configure.ac: Remove unused configury.
7637
3266f10b
TT
76382013-11-08 Tom Tromey <tromey@redhat.com>
7639
7640 * acinclude.m4: Include common.m4, codeset.m4.
7641 * configure, config.in: Rebuild.
7642 * configure.ac: Use GDB_AC_COMMON.
7643
6682d959
AA
76442013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7645
7646 * linux-s390-low.c (HWCAP_S390_TE): New define.
7647 (s390_arch_setup): Consider the TE field in the HWCAP for
7648 determining 'have_regset_tdb'.
7649
fd0a4d76
SDJ
76502013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7651
7652 PR gdb/16014
7653 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7654 call to sizeof.
7655
1a3d890b
PA
76562013-10-02 Pedro Alves <palves@redhat.com>
7657
7658 * server.c (process_serial_event): Don't output "GDBserver
7659 exiting" if GDB is connected through stdio.
7660 * target.c (mywait): Likewise, be silent if GDB is connected
7661 through stdio.
7662
97ad4581
JB
76632013-10-01 Joel Brobecker <brobecker@adacore.com>
7664
7665 * lynx-low.c (lynx_add_threads_after_attach): New function.
7666 (lynx_attach): Remove call to add_thread. Add call to
7667 lynx_add_threads_after_attach instead.
7668
5b4e221c
MF
76692013-09-28 Mike Frysinger <vapier@gentoo.org>
7670
7671 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7672 * config.in, configure: Regenerated.
7673
ee47b2f8
YQ
76742013-09-18 Yao Qi <yao@codesourcery.com>
7675
7676 PR server/15959
7677 * server.c (start_inferior): Clear 'resume_info'.
7678
d6707650 76792013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7680
d6707650
JW
7681 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7682 for each register.
7683
9243dd0e 76842013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7685
9243dd0e
JW
7686 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7687 linux-tile-low.o to srv_tgtobj.
7688
c623a6ef
WN
76892013-09-16 Will Newton <will.newton@linaro.org>
7690
7691 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7692 out regs.
7693
fb71d39e
PA
76942013-09-06 Pedro Alves <palves@redhat.com>
7695
7696 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7697 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7698 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7699 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7700 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7701 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7702
8e7e9910
PA
77032013-09-06 Pedro Alves <palves@redhat.com>
7704
7705 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7706 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7707
7c3a12ca
PA
77082013-09-06 Pedro Alves <palves@redhat.com>
7709
7710 * linux-amd64-ipa.c: Include tracepoint.h.
7711 * linux-i386-ipa.c: Include tracepoint.h.
7712
8eb3d7b6
RW
77132013-09-06 Ricard Wanderlof <ricardw@axis.com>
7714
7715 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7716 (ps_get_thread_area): New function.
7717
eddddb9d
RW
77182013-09-06 Ricard Wanderlof <ricardw@axis.com>
7719
7720 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7721 (initialize_low_arch): Call init_registers_crisv32 rather than
7722 init_register_crisv32.
7723
533b0600
PA
77242013-09-05 Pedro Alves <palves@redhat.com>
7725
7726 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7727 to ...
7728 * hostio.h: ... this new file.
7729 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7730 win32-low.c: Include hostio.h.
7731
0ce3d3b5
PA
77322013-09-05 Pedro Alves <palves@redhat.com>
7733
7734 * server.h (gdb_client_data, handler_func, callback_handler_func)
7735 (delete_file_handler, add_file_handler, append_callback_event)
7736 (delete_callback_event, start_event_loop, initialize_event_loop):
7737 Move to event-loop.h and include it.
7738 * event-loop.h: New file.
7739
799cdc37
PA
77402013-09-05 Pedro Alves <palves@redhat.com>
7741
7742 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7743 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7744 (loaded_dll, unloaded_dll): Move to ...
7745 * dll.h: ... this new file.
7746 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7747
6a6bbd9d
PA
77482013-09-05 Pedro Alves <palves@redhat.com>
7749
7750 * server.h (current_process, get_thread_process, all_processes)
7751 (add_inferior_to_list, for_each_inferior, current_inferior)
7752 (remove_inferior, add_process, remove_process, find_process_pid)
7753 (have_started_inferiors_p, have_attached_inferiors_p)
7754 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7755 (clear_inferiors, find_inferior, find_inferior_id)
7756 (inferior_target_data, set_inferior_target_data)
7757 (inferior_regcache_data, set_inferior_regcache_data): Move to
7758 inferiors.h, and include it.
7759 * inferiors.h: New file.
7760
f699aaba
PA
77612013-09-05 Pedro Alves <palves@redhat.com>
7762
7763 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7764 Move ...
72f4393d 7765 * ax.h: ... here.
f699aaba 7766
c144c7a0
PA
77672013-09-05 Pedro Alves <palves@redhat.com>
7768
7769 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7770 tracepoint.h.
7771 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7772 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7773 (handle_tracepoint_general_set, handle_tracepoint_query)
7774 (tracepoint_finished_step, tracepoint_was_hit)
7775 (release_while_stepping_state_list, current_traceframe)
7776 (in_readonly_region, traceframe_read_mem)
7777 (fetch_traceframe_registers, traceframe_read_sdata)
7778 (traceframe_read_info, struct fast_tpoint_collect_status)
7779 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7780 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7781 (supply_fast_tracepoint_registers)
7782 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7783 (ipa_tdesc, claim_trampoline_space)
7784 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7785 (agent_mem_read, agent_get_trace_state_variable_value)
7786 (agent_set_trace_state_variable_value, agent_tsv_read)
7787 (agent_mem_read_string, get_raw_reg_func_addr)
7788 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7789 * tracepoint.h: ... this new file.
7790
ff42e6ab
PA
77912013-09-05 Pedro Alves <palves@redhat.com>
7792
7793 * server.h (perror_with_name, error, fatal, warning, paddress)
7794 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7795 include it.
7796 * utils.h: New file.
7797
541af0f4
PA
77982013-09-05 Pedro Alves <palves@redhat.com>
7799
7800 * server.h (remote_debug, noack_mode, transport_is_reliable)
7801 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7802 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7803 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7804 (write_enn, initialize_async_io, enable_async_io)
7805 (disable_async_io, check_remote_input_interrupt_request)
7806 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7807 (dead_thread_notify, prepare_resume_reply)
7808 (decode_address_to_semicolon, decode_address, decode_m_packet)
7809 (decode_M_packet, decode_X_packet, decode_xfer_write)
7810 (decode_search_memory_packet, unhexify, hexify)
7811 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7812 (look_up_one_symbol, relocate_instruction)
7813 (monitor_output): Move to remote-utils.h, and include it.
7814 * remote-utils.h: New file.
7815
eebdf26b
PA
78162013-09-05 Pedro Alves <palves@redhat.com>
7817
7818 * server.h (_): Delete.
7819
3aafd2ff
PA
78202013-09-02 Pedro Alves <palves@redhat.com>
7821
7822 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7823 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7824 allocated.
7825 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7826
cee83bcb
PM
78272013-09-02 Pierre Muller <muller@sourceware.org>
7828
7829 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7830 or WriteProcessMemory complete successfully and handle
7831 ERROR_PARTIAL_COPY error.
7832
9a13b2fa
PA
78332013-09-02 Pedro Alves <palves@redhat.com>
7834
7835 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7836 error instead of EIO.
7837
602e3198
JK
78382013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7839
7840 PR server/15604
7841 * linux-low.c: Include filestuff.h.
7842 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7843 * lynx-low.c: Include filestuff.h.
7844 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7845 * server.c: Include filestuff.h.
7846 (main): Call notice_open_fds.
7847 * spu-low.c: Include filestuff.h.
7848 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7849
96d7229d
LM
78502013-08-22 Luis Machado <lgustavo@codesourcery.com>
7851
7852 * Makefile.in: Explain why ../target and ../nat are not
7853 listed as include file search paths.
7854 (linux-waitpid.o): New object file rule.
7855 * configure.srv (srv_native_linux_obj): New variable.
7856 Replace all occurrences of linux native object files with
7857 $srv_native_linux_obj.
7858 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7859 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7860 (linux_enable_event_reporting): Remove declaration.
7861 (my_waitpid): Moved to common/linux-waitpid.c.
7862 (linux_wait_for_event): Pass ptid when calling
7863 linux_enable_event_reporting.
7864 (linux_supports_tracefork_flag): Remove.
7865 (linux_enable_event_reporting): Likewise.
7866 (linux_tracefork_grandchild): Remove.
7867 (STACK_SIZE): Moved to common/linux-ptrace.c.
7868 (linux_tracefork_child): Remove.
7869 (linux_test_for_tracefork): Remove.
7870 (linux_look_up_symbols): Call linux_supports_traceclone.
7871 (initialize_low): Remove call to linux_test_for_tracefork.
7872 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7873 common/linux-ptrace.h.
7874 (PTRACE_TYPE_ARG4): Likewise.
7875 Include linux-ptrace.h.
7876
32940073
PA
78772013-08-21 Pedro Alves <palves@redhat.com>
7878
7879 * config.in: Renegerate.
7880
33b60d58 78812013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7882
33b60d58
LM
7883 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7884 (SFILES): Remove $(srcdir)/common/target-common.c and
7885 add $(srcdir)/target/waitstatus.c.
7886 (OBS): Remove target-common.o and add waitstatus.o.
7887 (server_h): Remove $(srcdir)/../common/target-common.h and
7888 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7889 and $(srcdir)/../target/waitstatus.h.
7890 (target-common.o): Remove.
7891 (waitstatus.o): New target object file.
7892 * target.h: Do not include target-common.h and
7893 include target/resume.h, target/wait.h and
7894 target/waitstatus.h.
7895
b8e1b30e
LM
78962013-08-13 Luis Machado <lgustavo@codesourcery.com>
7897
7898 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7899 to PTRACE_TYPE_ARG3.
7900 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7901 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7902 PTRACE_TYPE_ARG4.
7903 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7904 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7905
7a60ad40
YQ
79062013-07-27 Jie Zhang <jie@codesourcery.com>
7907 Daniel Jacobowitz <dan@codesourcery.com>
7908 Yao Qi <yao@codesourcery.com>
7909
7910 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7911 (mips-linux-watch.o): New rule.
7912 (mips_linux_watch_h): New variable.
7913 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7914 srv_tgtobj.
7915 * linux-mips-low.c: Include mips-linux-watch.h.
7916 (struct arch_process_info, struct arch_lwp_info): New.
7917 (update_watch_registers_callback): New function.
7918 (mips_linux_new_process, mips_linux_new_thread) New functions.
7919 (mips_linux_prepare_to_resume, mips_insert_point): New
7920 functions.
7921 (mips_remove_point, mips_stopped_by_watchpoint): New
7922 functions.
7923 (rsp_bp_type_to_target_hw_bp_type): New function.
7924 (mips_stopped_data_address): New function.
7925 (the_low_target): Add watchpoint support functions.
7926
de6f69ad
YQ
79272013-07-27 Yao Qi <yao@codesourcery.com>
7928
7929 * i386-low.c: Include break-common.h.
7930 (enum target_hw_bp_type): Remove.
7931
3360c0bf
LM
79322013-07-24 Luis Machado <lgustavo@codesourcery.com>
7933
7934 * Makefile.in (SFILES): /common/target-common.c.
7935 (OBS): Add target-common.o.
7936 (server_h): Add $(srcdir)/../common/target-common.h.
7937 (target-common.o): New target.
7938 * server.c (queue_stop_reply_callback): Free
7939 status string after use.
7940 * target.c (target_waitstatus_to_string): Remove.
7941 * target.h: Include target-common.h.
7942 (resume_kind): Likewise.
7943 (target_waitkind): Likewise.
7944 (target_waitstatus): Likewise.
7945 (TARGET_WNOHANG): Likewise.
7946
bd885420
YQ
79472013-07-04 Yao Qi <yao@codesourcery.com>
7948
7949 * Makefile.in (host_alias): Use @host_noncanonical@.
7950 (target_alias): Use @target_noncanonical@.
7951 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7952 ACX_NONCANONICAL_HOST.
7953 * configure: Regenerated.
7954
7955 Revert:
7956 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7957
7958 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7959 * configure: Rebuild.
7960 * Makefile.in (version_host, version_target): Get from configure.
7961 (version.c): Use $(version_host) and $(version_target).
7962
17ef446e
PA
79632013-07-03 Pedro Alves <palves@redhat.com>
7964
7965 * Makefile.in (config.status): Depend on development.sh.
7966 * acinclude.m4: Include libmcheck.m4.
7967 * configure: Regenerate.
7968
7a9a7487
MG
79692013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7970
7971 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7972 attribute inside the parentheses.
7973 (winapi_DebugSetProcessKillOnExit): Ditto.
7974 (winapi_DebugBreakProcess): Ditto.
7975 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7976
49b64de6
MG
79772013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7978
7979 * notif.h (notif_event): Add a dummy member to avoid compiler
7980 errors.
7981
d5749ee7
PA
79822013-07-01 Pedro Alves <palves@redhat.com>
7983
7984 * hostio.c (HOSTIO_PATH_MAX): Define.
7985 (require_filename, handle_open, handle_unlink, handle_readlink):
7986 Use it.
7987
d8d2a3ee
PA
79882013-07-01 Pedro Alves <palves@redhat.com>
7989
7990 * server.h: Include "pathmax.h".
7991 * linux-low.c: Don't include sys/param.h.
7992 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7993 MAXPATHLEN.
7994 * win32-low.c: Don't include sys/param.h.
7995 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7996
bc7dea8d
PA
79972013-07-01 Pedro Alves <palves@redhat.com>
7998
7999 * event-loop.c: Don't check HAVE_UNISTD_H before including
8000 <unistd.h>.
8001 * gdbreplay.c: Likewise.
8002 * remote-utils.c: Likewise.
8003 * server.c: Likewise.
8004 * configure.ac: Don't check for unistd.h.
8005 * configure: Regenerate.
8006
d6c2da54
TT
80072013-06-28 Tom Tromey <tromey@redhat.com>
8008
8009 * Makefile.in (version.c): Use version.in, not
8010 common/version.in.
8011
257b6bec
MG
80122013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8013
8014 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8015 * configure: Rebuild.
8016 * Makefile.in (version_host, version_target): Get from configure.
8017 (version.c): Use $(version_host) and $(version_target).
8018
86ebe149
DK
80192013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8020
8021 Fix trace-status to output user name without trailing colon.
8022 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8023
f30aa5af
DK
80242013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8025
8026 Fix trace-status to output proper start-time and stop-time.
8027 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8028 output start time and stop time in hex as gdb expects.
8029
28a93511
YQ
80302013-06-26 Pedro Alves <pedro@codesourcery.com>
8031
8032 * tracepoint.c (build_traceframe_info_xml): Output trace state
8033 variables present in the trace buffer.
8034
01208463
TT
80352013-06-24 Tom Tromey <tromey@redhat.com>
8036
8037 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8038 create-version.sh.
8039 (version.o): Remove.
8040 * gdbreplay.c: Include version.h.
8041 (version, host_name): Don't declare.
8042 * server.h: Include version.h.
8043 (version, host_name): Don't declare.
8044
760256f9
PA
80452013-06-12 Pedro Alves <palves@redhat.com>
8046
8047 * linux-x86-low.c (linux_is_elf64): Delete global.
8048 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8049 with local linux_pid_exe_is_elf_64_file use.
8050
030031ee
PA
80512013-06-11 Pedro Alves <palves@redhat.com>
8052
8053 * linux-low.c (regset_disabled, disable_regset): New functions.
8054 (regsets_fetch_inferior_registers)
8055 (regsets_store_inferior_registers): Use them.
8056 (initialize_regsets_info); Don't allocate the disabled_regsets
8057 array here.
8058 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8059 comment.
8060
5da6eb0a
PA
80612013-06-11 Pedro Alves <palves@redhat.com>
8062
8063 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8064 xmalloc.
8065
7e5aaa09
PA
80662013-06-11 Pedro Alves <palves@redhat.com>
8067
8068 * linux-x86-low.c (initialize_low_arch): Call
8069 init_registers_x32_avx_linux.
8070
d878444c
JK
80712013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8072
8073 Fix compatibility with Android Bionic.
8074 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8075 it is not empty.
8076
3aee8918
PA
80772013-06-07 Pedro Alves <palves@redhat.com>
8078
5f2b57b5 8079 PR server/14823
3aee8918
PA
8080 * Makefile.in (OBS): Add tdesc.o.
8081 (IPA_OBJS): Add tdesc-ipa.o.
8082 (tdesc-ipa.o): New rule.
8083 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8084 interface.
8085 * linux-low.c (new_inferior): Delete.
8086 (disabled_regsets, num_regsets): Delete.
8087 (linux_add_process): Adjust to set the new per-process
8088 new_inferior flag.
8089 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8090 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8091 was a stop. When calling arch_setup, switch the current inferior
8092 to the thread that got an event.
8093 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8094 (regsets_fetch_inferior_registers)
8095 (regsets_store_inferior_registers): New regsets_info parameter.
8096 Adjust to use it.
8097 (linux_register_in_regsets): New regs_info parameter. Adjust to
8098 use it.
8099 (register_addr, fetch_register, store_register): New usrregs_info
8100 parameter. Adjust to use it.
8101 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8102 parameter regs_info. Adjust to use it.
8103 (linux_fetch_registers): Get the current inferior's regs_info, and
8104 adjust to use it.
8105 (linux_store_registers): Ditto.
8106 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8107 (initialize_low): Don't initialize the target_regsets here. Call
8108 initialize_low_arch.
8109 * linux-low.h (target_regsets): Delete declaration.
8110 (struct regsets_info): New.
8111 (struct usrregs_info): New.
8112 (struct regs_info): New.
8113 (struct process_info_private) <new_inferior>: New field.
8114 (struct linux_target_ops): Delete the num_regs, regmap, and
8115 regset_bitmap fields. New field regs_info.
8116 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8117 * i387-fp.c (num_xmm_registers): Delete.
8118 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8119 calls to new interface.
8120 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8121 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8122 Infer the number of xmm registers from the regcache's target
8123 description.
8124 * i387-fp.h (num_xmm_registers): Delete.
8125 * inferiors.c (add_thread): Don't install the thread's regcache
8126 here.
8127 * proc-service.c (gregset_info): Fetch the current inferior's
8128 regs_info. Adjust to use it.
8129 * regcache.c: Include tdesc.h.
8130 (register_bytes, reg_defs, num_registers)
8131 (gdbserver_expedite_regs): Delete.
8132 (get_thread_regcache): If the thread doesn't have a regcache yet,
8133 create one, instead of aborting gdbserver.
8134 (regcache_invalidate_one): Rename to ...
8135 (regcache_invalidate_thread): ... this.
8136 (regcache_invalidate_one): New.
8137 (regcache_invalidate): Only invalidate registers of the current
8138 process.
8139 (init_register_cache): Add target_desc parameter, and use it.
8140 (new_register_cache): Ditto. Assert the target description has a
8141 non zero registers_size.
8142 (regcache_cpy): Add assertions. Adjust.
8143 (realloc_register_cache, set_register_cache): Delete.
8144 (registers_to_string, registers_from_string): Adjust.
8145 (find_register_by_name, find_regno, find_register_by_number)
8146 (register_cache_size): Add target_desc parameter, and use it.
8147 (free_register_cache_thread, free_register_cache_thread_one)
8148 (regcache_release, register_cache_size): New.
8149 (register_size): Add target_desc parameter, and use it.
8150 (register_data, supply_register, supply_register_zeroed)
8151 (supply_regblock, supply_register_by_name, collect_register)
8152 (collect_register_as_string, collect_register_by_name): Adjust.
8153 * regcache.h (struct target_desc): Forward declare.
8154 (struct regcache) <tdesc>: New field.
8155 (init_register_cache, new_register_cache): Add target_desc
8156 parameter.
8157 (regcache_invalidate_thread): Declare.
8158 (regcache_invalidate_one): Delete declaration.
8159 (regcache_release): Declare.
8160 (find_register_by_number, register_cache_size, register_size)
8161 (find_regno): Add target_desc parameter.
8162 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8163 declarations.
8164 * remote-utils.c: Include tdesc.h.
8165 (outreg, prepare_resume_reply): Adjust.
8166 * server.c: Include tdesc.h.
8167 (gdbserver_xmltarget): Delete declaration.
8168 (get_features_xml, process_serial_event): Adjust.
8169 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8170 declare.
8171 (struct process_info) <tdesc>: New field.
8172 (ipa_tdesc): Declare.
8173 * tdesc.c: New file.
8174 * tdesc.h: New file.
8175 * tracepoint.c: Include tdesc.h.
8176 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8177 (get_context_regcache): Adjust to pass ipa_tdesc down.
8178 (do_action_at_tracepoint): Adjust to get the register cache size
8179 from the context regcache's description.
8180 (traceframe_walk_blocks): Adjust to get the register cache size
8181 from the current trace frame's description.
8182 (traceframe_get_pc): Adjust to get current trace frame's
8183 description and pass it down.
8184 (gdb_collect): Adjust to get the register cache size from the
8185 IPA's description.
8186 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8187 (gdbserver_xmltarget): Delete.
8188 (initialize_low_tracepoint): Set the ipa's target description.
8189 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8190 (initialize_low_tracepoint): Set the ipa's target description.
8191 * linux-x86-low.c: Include tdesc.h.
8192 [__x86_64__] (is_64bit_tdesc): New.
8193 (ps_get_thread_area, x86_get_thread_area): Use it.
8194 (i386_cannot_store_register): Rename to ...
8195 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8196 (i386_cannot_fetch_register): Rename to ...
8197 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8198 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8199 to new interface.
8200 (target_regsets): Rename to ...
8201 (x86_regsets): ... this.
8202 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8203 interface.
8204 (x86_siginfo_fixup): Use is_64bit_tdesc.
8205 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8206 (tdesc_x32_avx_linux, tdesc_x32_linux)
8207 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8208 Declare.
8209 (x86_linux_update_xmltarget): Delete.
8210 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8211 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8212 (AMD64_LINUX_USER64_CS): New.
8213 (x86_linux_read_description): New, based on
8214 x86_linux_update_xmltarget.
8215 (same_process_callback): New.
8216 (x86_arch_setup_process_callback): New.
8217 (x86_linux_update_xmltarget): New.
8218 (x86_regsets_info): New.
8219 (amd64_linux_regs_info): New.
8220 (i386_linux_usrregs_info): New.
8221 (i386_linux_regs_info): New.
8222 (x86_linux_regs_info): New.
8223 (x86_arch_setup): Reimplement.
8224 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8225 (x86_emit_ops): Ditto.
8226 (the_low_target): Adjust. Install x86_linux_regs_info,
8227 x86_cannot_fetch_register, and x86_cannot_store_register.
8228 (initialize_low_arch): New.
8229 * linux-ia64-low.c (tdesc_ia64): Declare.
8230 (ia64_fetch_register): Adjust.
8231 (ia64_usrregs_info, regs_info): New globals.
8232 (ia64_regs_info): New function.
8233 (the_low_target): Adjust.
8234 (initialize_low_arch): New function.
8235 * linux-sparc-low.c (tdesc_sparc64): Declare.
8236 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8237 Adjust.
8238 (sparc_arch_setup): New function.
8239 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8240 (the_low_target): Adjust.
8241 (initialize_low_arch): New function.
8242 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8243 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8244 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8245 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8246 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8247 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8248 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8249 (tdesc_powerpc_isa205_vsx64l): Declare.
8250 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8251 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8252 (ppc_set_pc, ppc_get_hwcap): Adjust.
8253 (ppc_usrregs_info): Forward declare.
8254 (!__powerpc64__) ppc_regmap_adjusted: New global.
8255 (ppc_arch_setup): Adjust to the current process'es target
8256 description.
8257 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8258 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8259 (ppc_store_evrregset): Adjust.
8260 (target_regsets): Rename to ...
8261 (ppc_regsets): ... this, and make static.
8262 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8263 (ppc_regs_info): New function.
8264 (the_low_target): Adjust.
8265 (initialize_low_arch): New function.
8266 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8267 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8268 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8269 (tdesc_s390x_linux64v2): Declare.
8270 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8271 (s390_fill_gregset, s390_store_last_break): Adjust.
8272 (target_regsets): Rename to ...
8273 (s390_regsets): ... this, and make static.
8274 (s390_get_pc, s390_set_pc): Adjust.
8275 (s390_get_hwcap): New target_desc parameter, and use it.
8276 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8277 (s390_arch_setup): Adjust to set the current process'es target
8278 description. Don't adjust the regmap.
8279 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8280 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8281 (regs_info_3264): New globals.
8282 (s390_regs_info): New function.
8283 (the_low_target): Adjust.
8284 (initialize_low_arch): New function.
8285 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8286 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8287 [__mips64] (init_registers_mips_linux)
8288 (init_registers_mips_dsp_linux): Delete defines.
8289 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8290 (have_dsp): New global.
8291 (mips_read_description): New, based on mips_arch_setup.
8292 (mips_arch_setup): Reimplement.
8293 (get_usrregs_info): New function.
8294 (mips_cannot_fetch_register, mips_cannot_store_register)
8295 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8296 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8297 (target_regsets): Rename to ...
8298 (mips_regsets): ... this, and make static.
8299 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8300 (dsp_regs_info, regs_info): New globals.
8301 (mips_regs_info): New function.
8302 (the_low_target): Adjust.
8303 (initialize_low_arch): New function.
8304 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8305 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8306 Declare.
8307 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8308 (arm_read_description): New, with bits factored from
8309 arm_arch_setup.
8310 (arm_arch_setup): Reimplement.
8311 (target_regsets): Rename to ...
8312 (arm_regsets): ... this, and make static.
8313 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8314 (arm_regs_info): New function.
8315 (the_low_target): Adjust.
8316 (initialize_low_arch): New function.
8317 * linux-m68k-low.c (tdesc_m68k): Declare.
8318 (target_regsets): Rename to ...
8319 (m68k_regsets): ... this, and make static.
8320 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8321 (m68k_regs_info): New function.
8322 (m68k_arch_setup): New function.
8323 (the_low_target): Adjust.
8324 (initialize_low_arch): New function.
8325 * linux-sh-low.c (tdesc_sharch): Declare.
8326 (target_regsets): Rename to ...
8327 (sh_regsets): ... this, and make static.
8328 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8329 (sh_regs_info, sh_arch_setup): New functions.
8330 (the_low_target): Adjust.
8331 (initialize_low_arch): New function.
8332 * linux-bfin-low.c (tdesc_bfin): Declare.
8333 (bfin_arch_setup): New function.
8334 (bfin_usrregs_info, regs_info): New globals.
8335 (bfin_regs_info): New function.
8336 (the_low_target): Adjust.
8337 (initialize_low_arch): New function.
8338 * linux-cris-low.c (tdesc_cris): Declare.
8339 (cris_arch_setup): New function.
8340 (cris_usrregs_info, regs_info): New globals.
8341 (cris_regs_info): New function.
8342 (the_low_target): Adjust.
8343 (initialize_low_arch): New function.
8344 * linux-cris-low.c (tdesc_crisv32): Declare.
8345 (cris_arch_setup): New function.
8346 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8347 (cris_regs_info): New function.
8348 (the_low_target): Adjust.
8349 (initialize_low_arch): New function.
8350 * linux-m32r-low.c (tdesc_m32r): Declare.
8351 (m32r_arch_setup): New function.
8352 (m32r_usrregs_info, regs_info): New globals.
8353 (m32r_regs_info): Adjust.
8354 (initialize_low_arch): New function.
8355 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8356 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8357 (tic6x_usrregs_info): Forward declare.
8358 (tic6x_read_description): New function, based on ...
8359 (tic6x_arch_setup): ... this. Reimplement.
8360 (target_regsets): Rename to ...
8361 (tic6x_regsets): ... this, and make static.
8362 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8363 (tic6x_regs_info): New function.
8364 (the_low_target): Adjust.
8365 (initialize_low_arch): New function.
8366 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8367 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8368 (target_regsets): Rename to ...
8369 (xtensa_regsets): ... this, and make static.
8370 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8371 globals.
8372 (xtensa_arch_setup, xtensa_regs_info): New functions.
8373 (the_low_target): Adjust.
8374 (initialize_low_arch): New function.
8375 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8376 (nios2_arch_setup): Set the current process'es tdesc.
8377 (target_regsets): Rename to ...
8378 (nios2_regsets): ... this.
8379 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8380 (nios2_regs_info): New function.
8381 (the_low_target): Adjust.
8382 (initialize_low_arch): New function.
a261b8f5
PA
8383 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8384 (aarch64_arch_setup): Set the current process'es tdesc.
8385 (target_regsets): Rename to ...
8386 (aarch64_regsets): ... this.
8387 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8388 (aarch64_regs_info): New function.
8389 (the_low_target): Adjust.
8390 (initialize_low_arch): New function.
3aee8918
PA
8391 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8392 globals.
8393 (target_regsets): Rename to ...
8394 (tile_regsets): ... this.
8395 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8396 (tile_regs_info): New function.
8397 (tile_arch_setup): Set the current process'es tdesc.
8398 (the_low_target): Adjust.
8399 (initialize_low_arch): New function.
8400 * spu-low.c (tdesc_spu): Declare.
8401 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8402 * win32-arm-low.c (tdesc_arm): Declare.
8403 (arm_arch_setup): New function.
8404 (the_low_target): Install arm_arch_setup instead of
8405 init_registers_arm.
8406 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8407 (init_windows_x86): Rename to ...
8408 (i386_arch_setup): ... this. Set `win32_tdesc'.
8409 (the_low_target): Adjust.
8410 * win32-low.c (win32_tdesc): New global.
8411 (child_add_thread): Don't create the thread cache here.
8412 (do_initial_child_stuff): Set the new process'es tdesc.
8413 * win32-low.h (struct target_desc): Forward declare.
8414 (win32_tdesc): Declare.
8415 * lynx-i386-low.c (tdesc_i386): Declare global.
8416 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8417 * lynx-low.c (lynx_tdesc): New global.
8418 (lynx_add_process): Set the new process'es tdesc.
8419 * lynx-low.h (struct target_desc): Forward declare.
8420 (lynx_tdesc): Declare global.
8421 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8422 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8423 * nto-low.c (nto_tdesc): New global.
8424 (do_attach): Set the new process'es tdesc.
8425 * nto-low.h (struct target_desc): Forward declare.
8426 (nto_tdesc): Declare.
8427 * nto-x86-low.c (tdesc_i386): Declare.
8428 (nto_x86_arch_setup): Set `nto_tdesc'.
8429
b1fbec62
GB
84302013-06-04 Gary Benson <gbenson@redhat.com>
8431
8432 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8433 to qSupported response when appropriate.
8434 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8435 with nonzero-length annex.
8436 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8437 arguments supplied in annex.
8438
d1ec4ce7
DE
84392013-05-31 Doug Evans <dje@google.com>
8440
ac44adcb 8441 PR server/15594
d1ec4ce7
DE
8442 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8443 64 bits in 64-cross-32 environment.
8444
9b25f2d3
PA
84452013-05-28 Pedro Alves <palves@redhat.com>
8446
8447 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8448 (aarch64-without-fpu.c): Delete rule.
8449 * configure.srv (aarch64*-*-linux*): Remove references to
8450 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8451 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8452 declaration.
8453
6740dc9c
PA
84542013-05-24 Pedro Alves <palves@redhat.com>
8455
8456 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8457 instead of strchr/decode_address. Error if the range isn't split
8458 with a ','. Don't assume there's be a ':' in the action.
8459
c2d6af84
PA
84602013-05-23 Yao Qi <yao@codesourcery.com>
8461 Pedro Alves <palves@redhat.com>
8462
8463 * linux-low.c (lwp_in_step_range): New function.
8464 (linux_wait_1): If the thread was range stepping and stopped
8465 outside the stepping range, report the stop to GDB. Otherwise,
8466 continue stepping. Add range stepping debug output.
8467 (linux_set_resume_request): Copy the step range from the resume
8468 request to the lwp.
8469 (linux_supports_range_stepping): New.
8470 (linux_target_ops) <supports_range_stepping>: Set to
8471 linux_supports_range_stepping.
8472 * linux-low.h (struct linux_target_ops)
8473 <supports_range_stepping>: New field.
8474 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8475 * linux-x86-low.c (x86_supports_range_stepping): New.
8476 (the_low_target) <supports_range_stepping>: Set to
8477 x86_supports_range_stepping.
8478 * server.c (handle_v_cont): Handle 'r' action.
8479 (handle_v_requests): Append ";r" if the target supports range
8480 stepping.
8481 * target.h (struct thread_resume) <step_range_start,
8482 step_range_end>: New fields.
8483 (struct target_ops) <supports_range_stepping>:
8484 New field.
8485 (target_supports_range_stepping): New macro.
8486
58794e1a
JB
84872013-05-17 Joel Brobecker <brobecker@adacore.com>
8488
8489 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8490 confusion in comment.
8491
d631c5a7
JB
84922013-05-17 Joel Brobecker <brobecker@adacore.com>
8493
8494 * lynx-low.c (struct process_info_private): New type.
8495 (lynx_add_process): New function.
8496 (lynx_create_inferior, lynx_attach): Replace calls to
8497 add_process by calls to lynx_add_process.
8498 (lynx_resume): If PTID is null, then try using
8499 current_process()->private->last_wait_event_ptid.
8500 Add comments.
8501 (lynx_clear_inferiors): Delete. The contents of that function
8502 has been inlined in lynx_mourn;
8503 (lynx_wait_1): Save the ptid in the process's private data.
8504 (lynx_mourn): Free the process' private data. Replace call
8505 to lynx_clear_inferiors by call to clear_inferiors.
8506
96f7a20f
YQ
85072013-05-17 Yao Qi <yao@codesourcery.com>
8508
8509 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8510 the right place.
8511
db0dfaa0
LM
85122013-05-16 Luis Machado <lgustavo@codesourcery.com>
8513
8514 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8515 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8516 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8517 PT_TEXT_END_ADDR guards. Update comments.
8518 (linux_target_op) <read_offsets>: Conditionally define to
8519 linux_read_offsets if the target is UCLIBC and if it defines
8520 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8521
68f5f838
SL
85222013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8523 Andrew Jenner <andrew@codesourcery.com>
8524
8525 * Makefile.in (SFILES): Add linux-nios2-low.c.
8526 (clean): Add action to delete nios2-linux.c.
8527 (nios2-linux.c): New rule.
8528 * configure.srv: Add nios2*-*-linux*.
8529 * linux-nios2-low.c: New.
8530
1ebff1fd
HAQ
85312013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8532
8533 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8534
f6150862
HZ
85352013-04-25 Hui Zhu <hui@codesourcery.com>
8536
8537 PR gdb/15186
f6150862
HZ
8538 * ax.c (ax_printf): Add fflush.
8539
614c279d
TT
85402013-04-22 Tom Tromey <tromey@redhat.com>
8541
8542 * Makefile.in (SFILES): Add filestuff.c.
8543 (OBS): Add filestuff.o.
8544 (filestuff.o): New target.
8545 * config.in, configure: Rebuild.
8546 * configure.ac: Check for fdwalk, pipe2.
8547
7d4e5717
PA
85482013-04-17 Pedro Alves <palves@redhat.com>
8549
8550 * configure.ac (USE_THREAD_DB): Delete variable.
8551 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8552 Don't AC_SUBST USE_THREAD_DB.
8553 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8554 * config.in, configure: Regenerate.
8555
d5c93e41
PA
85562013-04-16 Pedro Alves <palves@redhat.com>
8557
8558 * linux-low.h (struct lwp_info) <thread_known>: Move under
8559 the USE_THREAD_DB #ifdef.
8560
04f5fe89
PA
85612013-04-16 Pedro Alves <palves@redhat.com>
8562
8563 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8564 (linux-low.o): Delete rule.
8565 * linux-low.h: Always include "gdb_thread_db.h" instead of
8566 conditionally including thread_db.h.
8567 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8568 HAVE_THREAD_DB_H.
8569
480b27bf
JK
85702013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8571
8572 * Makefile.in (install-only): Fix make install regression.
8573
43662968
JK
85742013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8575
8576 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8577 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8578 installation.
8579 * gdbserver.1: Remove.
8580
3e74e146
PA
85812013-03-22 Pedro Alves <palves@redhat.com>
8582
8583 * linux-low.c (handle_extended_wait): Don't call
8584 linux_enable_event_reporting.
8585
a8347a2a
TT
85862013-03-15 Tony Theodore <tonyt@logyst.com>
8587
8588 PR build/9098:
8589 * Makefile.in (SHELL): Use @SHELL@.
8590
eeb56fa7
SDJ
85912013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8592
8593 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8594 compiler warning.
8595
4fa7e2ff
JB
85962013-03-13 Joel Brobecker <brobecker@adacore.com>
8597
8598 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8599 Remove extraneous NULL element.
8600
8ddb1965
YQ
86012013-03-13 Yao Qi <yao@codesourcery.com>
8602
8603 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8604 'V' block in trace frame.
8605
9accd112
MM
86062013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8607
8608 * target.h (struct target_ops): Add btrace ops.
8609 (target_supports_btrace): New macro.
8610 (target_enable_btrace): New macro.
8611 (target_disable_btrace): New macro.
8612 (target_read_btrace): New macro.
8613 * gdbthread.h (struct thread_info): Add btrace field.
8614 * server.c: Include btrace-common.h.
8615 (handle_btrace_general_set): New function.
8616 (handle_btrace_enable): New function.
8617 (handle_btrace_disable): New function.
8618 (handle_general_set): Call handle_btrace_general_set.
8619 (handle_qxfer_btrace): New function.
8620 (struct qxfer qxfer_packets[]): Add btrace entry.
8621 * inferiors.c (remove_thread): Disable btrace.
8622 * linux-low: Include linux-btrace.h.
8623 (linux_low_enable_btrace): New function.
8624 (linux_low_read_btrace): New function.
8625 (linux_target_ops): Add btrace ops.
8626 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8627 Add srv_linux_btrace=yes.
8628 (x86_64-*-linux*): Add linux-btrace.o.
8629 Add srv_linux_btrace=yes.
8630 * configure.ac: Define HAVE_LINUX_BTRACE.
8631 * config.in: Regenerated.
8632 * configure: Regenerated.
8633
5cc22e4c
MM
86342013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8635
8636 * server.c (handle_qxfer): Preserve error message if -3 is
8637 returned.
8638 (qxfer): Document the -3 return value.
8639
7c97f91e
MM
86402013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8641
8642 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8643 (linux_btrace_h): New variable.
8644 (linux-btrace.o): New rule.
8645
be9a119c 86462013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8647 Hafiz Abid Qadeer <abidh@codesourcery.com>
8648
8649 * tracepoint.c (trace_buffer_size): New global.
8650 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8651 (init_trace_buffer): Change to one-argument function. Allocate
8652 trace buffer memory.
8653 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8654 handle QTBuffer:size packet.
8655 (cmd_bigqtbuffer_size): New function.
8656 (initialize_tracepoint): Call init_trace_buffer with
8657 DEFAULT_TRACE_BUFFER_SIZE.
8658 * server.c (handle_query): Add QTBuffer:size in the
8659 supported packets.
8660
e64f7499
YQ
86612013-03-07 Yao Qi <yao@codesourcery.com>
8662
8663 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8664 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8665 of -1.
8666 (cmd_qtsp): Adjust condition. Do post increment.
8667 Set cur_action and cur_step_action back to 0.
8668
f0ae6fc3
PA
86692013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8670
8671 PR server/15236
8672 * linux-low.c (linux_write_memory): Return early success if LEN is
8673 zero.
8674
b5b0b0af
CV
86752013-03-05 Corinna Vinschen <vinschen@redhat.de>
8676
334ad4a8 8677 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8678
589bc927
TT
86792013-02-28 Tom Tromey <tromey@redhat.com>
8680
8681 * configure.ac: Invoke AC_SYS_LARGEFILE.
8682 * configure, config.in: Rebuild.
8683
dfe07582
CV
86842013-02-28 Corinna Vinschen <vinschen@redhat.com>
8685
8686 * win32-low.c: Throughout, fix format strings and casts of
8687 printf-like functions to avoid type related warnings on all
8688 platforms.
8689 (get_child_debug_event): Print dwDebugEventCode as hex since
8690 that's how it's usually documented.
8691
736cd585
YQ
86922013-02-28 Yao Qi <yao@codesourcery.com>
8693
8694 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8695 pulongest.
8696
e1f58301
JW
86972013-02-27 Jiong Wang <jiwang@tilera.com>
8698
8699 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8700 (reg-tilegx32.c): New rule.
8701 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8702 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8703 different register info initializer according to elf class.
8704 (init_registers_tilgx32): New function. The tilegx32 register info
8705 initializer.
8706 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8707 (tile_store_gregset): Likewise.
8708
d171ca78
YQ
87092013-02-27 Yao Qi <yao@codesourcery.com>
8710
8711 * server.c (process_point_options): Print debug message when
8712 debug_threads is true.
8713
282bbdf3
YQ
87142013-02-26 Yao Qi <yao@codesourcery.com>
8715
8716 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8717
aca22551
PA
87182013-02-19 Pedro Alves <palves@redhat.com>
8719 Kai Tietz <ktietz@redhat.com>
8720
8721 PR gdb/15161
8722
8723 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8724 instead of strtoul to extract address from packet.
8725 (process_serial_event) <'z'>: Likewise.
8726
4f3cee1c
YQ
87272013-02-18 Yao Qi <yao@codesourcery.com>
8728
8729 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8730
8e1d55a3
PA
87312013-02-14 Pedro Alves <palves@redhat.com>
8732
8733 Plug memory leak.
8734
8735 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8736 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8737
458820da
PA
87382013-02-14 Pedro Alves <palves@redhat.com>
8739
8740 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8741
baea0dae
PA
87422013-02-14 Pedro Alves <palves@redhat.com>
8743
8744 * tracepoint.c (save_string): Delete.
8745 (add_tracepoint_action): Use savestring instead of save_string.
8746
0b1afbb3
PA
87472013-02-12 Pedro Alves <palves@redhat.com>
8748
8749 * linux-xtensa-low.c: Ditto.
8750 * xtensa-xtregs.c: Ditto.
8751
8a4ac37e
PA
87522013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8753
8754 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8755 thread_db.
8756
148de6bb
MS
87572013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8758
8759 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8760 aarch64_num_wp_regs and aarch64_num_bp_regs to
8761 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8762
55fac6e0
MS
87632013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8764
8765 * linux-aarch64-low.c (ps_get_thread_area): Replace
8766 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8767
176eb98c
MS
87682013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8769 Marcus Shawcroft <marcus.shawcroft@arm.com>
8770 Nigel Stephens <nigel.stephens@arm.com>
8771 Yufeng Zhang <yufeng.zhang@arm.com>
8772
8773 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8774 (aarch64.c, aarch64-without-fpu.c): New targets.
8775 * configure.srv (aarch64*-*-linux*): New.
8776 * linux-aarch64-low.c: New file.
8777
56f7af9c
MS
87782013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8779
43aaf8b6 8780 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8781 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8782 (dequeue_one_deferred_signal, linux_resume_one_thread)
8783 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8784 (linux_tracefork_grandchild, linux_test_for_tracefork)
8785 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8786 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8787 where the argument is 0.
8788
60f662b0
YQ
87892013-01-25 Yao Qi <yao@codesourcery.com>
8790
8791 * event-loop.c: Include "queue.h".
8792 (gdb_event_p): New typedef.
8793 (struct gdb_event) <next_event>: Remove.
8794 (event_queue): Change to QUEUE(gdb_event_p).
8795 (async_queue_event): Remove.
8796 (gdb_event_xfree): New.
8797 (initialize_event_loop): New.
8798 (process_event): Use API from QUEUE.
8799 (wait_for_event): Likewise.
8800 * server.c (main): Call initialize_event_loop.
8801 * server.h (initialize_event_loop): Declare.
8802
5ae4861a
YQ
88032013-01-18 Yao Qi <yao@codesourcery.com>
8804
8805 * ax.h (struct eval_agent_expr_context): New.
8806 (gdb_eval_agent_expr): Update declaration.
8807 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8808 TFRAME. Add new argument CTX.
8809 * server.h (struct eval_agent_expr_context): Declare.
8810 (agent_mem_read, agent_tsv_read): Update declaration.
8811 (agent_mem_read_string): Likewise.
8812 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8813 (add_traceframe_block): Add new argument TPOINT.
8814 Increase TPOINT->traceframe_usage.
8815 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8816 eval_tracepoint_agent_expr.
8817 (condition_true_at_tracepoint): Likewise.
8818 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8819 (agent_mem_read_string, agent_tsv_read): Likewise.
8820
85e00e85
YQ
88212013-01-16 Yao Qi <yao@codesourcery.com>
8822
8823 * linux-low.c (linux_resume_one_lwp): Don't check
8824 'lwp->bp_reinsert != 0'.
8825
4039cf45
JB
88262013-01-07 Joel Brobecker <brobecker@adacore.com>
8827 Pedro Alves <palves@redhat.com>
8828
8829 * lynx-low.c (ptrace_request_to_str): Define a temporary
8830 macro and use it to simplify this function's implementation.
8831
9044dee2
JB
88322013-01-07 Joel Brobecker <brobecker@adacore.com>
8833
8834 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8835 sets errno.
8836
e6352c8f
JB
88372013-01-07 Joel Brobecker <brobecker@adacore.com>
8838
8839 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8840
50681a27
JB
88412013-01-07 Joel Brobecker <brobecker@adacore.com>
8842
8843 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8844
3f6e77ef
JB
88452013-01-07 Joel Brobecker <brobecker@adacore.com>
8846
8847 * lynx-low.c (lynx_resume): Use the resume_info parameter
8848 to determine the ptid for the lynx_ptrace call, unless
8849 it is equal to minus_one_ptid, in which case we use the
8850 ptid of the current_inferior.
8851 (lynx_wait_1): After having received a thread create/exit
8852 event, resume the inferior's execution using the signaling
8853 thread's ptid, rather than the old ptid.
8854
7fda33ae
JB
88552013-01-07 Joel Brobecker <brobecker@adacore.com>
8856
8857 * lynx-low.c (lynx_resume): Delete variable ret.
8858
b9786c74
JB
88592013-01-01 Joel Brobecker <brobecker@adacore.com>
8860
8861 * gdbreplay.c (gdbreplay_version): Update copyright year.
8862 * server.c (gdbserver_version): Likewise.
8863
8b93d60f
JB
88642012-12-17 Joel Brobecker <brobecker@adacore.com>
8865
8866 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8867 new thread.
8868
037335a7
JB
88692012-12-17 Joel Brobecker <brobecker@adacore.com>
8870
8871 * lynx-low.c (ptrace_request_to_str): Add handling for
8872 PTRACE_GETTRACESIG.
8873
52d4cbd8
JB
88742012-12-17 Joel Brobecker <brobecker@adacore.com>
8875
8876 * lynx-low.c (lynx_attach): Delete variable new_process.
8877
ab8f6ca9
JB
88782012-12-17 Joel Brobecker <brobecker@adacore.com>
8879
8880 * lynx-low.c (lynx_create_inferior): Delete variable
8881 new_process.
8882
78cbc024
JB
88832012-12-17 Joel Brobecker <brobecker@adacore.com>
8884
8885 * lynx-low.c (ptrace_request_to_str): Do not handle
8886 PTRACE_GETTHREADLIST if this macro does not exist.
8887
14a00470
YQ
88882012-12-15 Yao Qi <yao@codesourcery.com>
8889
8890 * Makefile.in (OBS): Add notif.o.
8891 * notif.c, notif.h: New.
8892 * server.c: Include "notif.h".
8893 (struct vstop_notif) <next>: Remove.
8894 <base>: New field.
8895 (queue_stop_reply): Update.
8896 (push_event, send_next_stop_reply): Remove.
8897 (discard_queued_stop_replies): Update.
8898 (notif_stop): New variable.
8899 (handle_v_stopped): Remove.
8900 (handle_v_requests): Don't call handle_v_stopped. Call
8901 handle_ack_notif instead.
8902 (queue_stop_reply_callback): Call notif_event_enque instead
8903 of queue_stop_reply.
8904 (handle_status): Don't call send_next_stop_reply, call
8905 notif_write_event instead.
8906 (kill_inferior_callback): Likewise.
8907 (detach_or_kill_inferior_callback): Likewise.
8908 (main): Call initialize_notif.
8909 (process_serial_event): Call QUEUE_is_empty.
8910 (handle_target_event): Call notif_push instead of push event.
8911 * server.h (push_event): Remove declaration.
8912
61c125b9
TT
89132012-12-10 Tom Tromey <tromey@redhat.com>
8914
8915 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8916 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8917 macros.
8918 (.c.o): Rewrite.
8919 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8920 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8921 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8922 (amd64-linux-ipa.o, ax.o): Rewrite.
8923 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8924 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8925 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8926 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8927 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8928 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8929 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8930 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8931 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8932 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8933 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8934 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8935 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8936 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8937 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8938 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8939 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8940 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8941 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8942 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8943 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8944 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8945 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8946 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8947 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8948 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8949 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8950 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8951 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8952 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8953 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8954 (reg-tilegx.o): Remove.
8955 (all_object_files): New macro.
8956 Include .deps files.
8957 * aclocal.m4, configure: Rebuild.
8958 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8959 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8960 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8961
e90e9ad9
TT
89622012-12-05 Tom Tromey <tromey@redhat.com>
8963
8964 PR gdb/14917:
8965 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8966
02d403bf 89672012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8968
8969 * configure.ac: Check for linux/perf_event.h.
8970 * config.in: Regenerated.
8971 * configure: Regenerated.
8972
0270a750
PA
89732012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8974
8975 * hostio.c (handle_readlink): Decrease buffer size
8976 parameter passed to readlink by one byte.
8977
8c29b58e
YQ
89782012-11-26 Yao Qi <yao@codesourcery.com>
8979
8980 * configure.ac (build_warnings): Append '-Wempty-body'.
8981 * configure: Regenerated.
8982 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8983 body.
8984
8bdce1ff
PM
89852012-11-15 Pierre Muller <muller@sourceware.org>
8986
8987 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8988 * config.in: Regenerate.
8989 * configure: Regenerate.
8990 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8991 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8992 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8993 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8994 header.
8995 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8996 instead of <sys/wait.h> header.
8997 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8998
02d403bf 89992012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
9000
9001 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9002 (various make rules): Remove -DGDBSERVER
9003
fbd5db48
YQ
90042012-11-09 Yao Qi <yao@codesourcery.com>
9005
9006 * spu-low.c (current_ptid): Move it to ..
9007 * gdbthread.h: ... here. New.
9008 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9009 * server.c (myresume, process_serial_event): Likewise.
9010 * thread-db.c (thread_db_find_new_threads): Likewise.
9011 * tracepoint.c (run_inferior_command): Likewise.
9012
b3dc46ff
AB
90132012-10-01 Andrew Burgess <aburgess@broadcom.com>
9014
9015 * server.c (handle_search_memory_1): Include access length in
9016 warning message.
9017
07c04788
HPN
90182012-09-05 Michael Brandt <michael.brandt@axis.com>
9019
9020 * linux-crisv32-low.c: Fix compile errors.
9021
918d227b
YQ
90222012-09-04 Yao Qi <yao@codesourcery.com>
9023
9024 * tracepoint.c (cmd_qtsv): Adjust debug message.
9025 Don't check CUR_TPOINT.
9026
18c1b81a
YQ
90272012-08-28 Yao Qi <yao@codesourcery.com>
9028
9029 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9030 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9031 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9032 Remove declarations of xmalloc, xreallloc, xstrdup and
9033 freeargv.
9034 * Makefile.in (libiberty_h): New.
9035 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9036 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9037
dc82f37b
YQ
90382012-08-23 Yao Qi <yao@codesourcery.com>
9039
9040 * server.h: Remove declaration of 'xsnprintf'.
9041
406b1477
KS
90422012-08-22 Keith Seitz <keiths@redhat.com>
9043
9044 * server.h: Include build-gnulib-gbserver/config.h.
9045 * gdbreplay.c: Likewise.
9046
e6712ff1
DE
90472012-08-08 Doug Evans <dje@google.com>
9048
9049 * Makefile.in (SFILES): Add gdb_vecs.c.
9050 (OBS): Add gdb_vecs.o.
9051 (gdb_vecs_h, host_defs_h): New variables.
9052 (thread-db.o): Add $(gdb_vecs_h) dependency.
9053 (gdb_vecs.o): New rule.
9054 * thread-db.c: #include "gdb_vecs.h".
9055 (thread_db_load_search): Use a vector to iterate over path elements.
9056 Handle text appearing after "$pdir".
9057
9058 * configure.ac: Add check for strstr.
9059 * config.in: Regenerate.
9060 * configure: Regenerate.
9061
7c3270ae
UW
90622012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9063
9064 * hostio.c (handle_pread): If pread fails, fall back to attempting
9065 lseek/read.
9066 (handle_pwrite): Likewise for pwrite.
9067
b62e2b27
UW
90682012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9069
9070 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9071 between unsupported TYPE and unimplementable ADDR/LEN combination.
9072 (arm_insert_point): Act on new return value.
9073
78a99e91
PA
90742012-07-31 Pedro Alves <palves@redhat.com>
9075
9076 * server.c (process_point_options): Only skip tokens if we find
9077 one that is unrecognized. Don't treat 'X' specially while
9078 skipping unrecognized tokens.
9079
fcf303ab
UW
90802012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9081
9082 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9083 to 4-byte-align HW breakpoint addresses for Thumb.
9084
7255706c
YQ
90852012-07-27 Yao Qi <yao@codesourcery.com>
9086
9087 PR remote/14161.
9088
9089 * server.h: Declare gdb_agent_about_to_close.
9090 * target.c (kill_inferior): Include "agent.h".
9091 New. Send command 'kill'.
9092 * target.h (kill_inferior): Removed macro.
9093 * tracepoint.c (gdb_agent_about_to_close): New.
9094 (gdb_agent_helper_thread): Handle command 'close'.
9095 Wait endlessly until the inferior stops.
9096 Install gdb_agent_remove_socket to atexit hook.
9097 (agent_socket_name): New static variable.
9098 (gdb_agent_socket_init): Replace local variable 'name' with
9099 'agent_socket_name'.
9100 (gdb_agent_remove_socket): New.
9101
5a3f286f
YQ
91022012-07-27 Yao Qi <yao@codesourcery.com>
9103
9104 * server.c (process_point_options): Stop at 'X' when parsing.
9105
961bd387
ME
91062012-07-19 Michael Eager <eager@eagercon.com>
9107
a261b8f5 9108 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
9109 to hw_execute.
9110 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9111 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9112 hardware breakpoint.
9113
aa7c7447
JK
91142012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9115
9116 * gdbserver/linux-low.c (initialize_low): Call
9117 linux_ptrace_init_warnings.
9118
7f216e7c
DE
91192012-07-02 Doug Evans <dje@google.com>
9120
9121 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9122 pointer to int.
9123
d3ce09f5
SS
91242012-07-02 Stan Shebs <stan@codesourcery.com>
9125
9126 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9127 (ax.o): Add it to build rule.
9128 (ax-ipa.o): Ditto.
9129 (OBS): Add format.o.
9130 (IPA_OBS): Add format.o.
9131 * server.c (handle_query): Claim support for breakpoint commands.
9132 (process_point_options): Add command case.
9133 (process_serial_event): Leave running if there are printfs in
9134 effect.
9135 * mem-break.h (any_persistent_commands): Declare.
9136 (add_breakpoint_commands): Declare.
9137 (gdb_no_commands_at_breakpoint): Declare.
9138 (run_breakpoint_commands): Declare.
9139 * mem-break.c (struct point_command_list): New struct.
9140 (struct breakpoint): New field command_list.
9141 (any_persistent_commands): New function.
9142 (add_commands_to_breakpoint): New function.
9143 (add_breakpoint_commands): New function.
9144 (gdb_no_commands_at_breakpoint): New function.
9145 (run_breakpoint_commands): New function.
9146 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9147 locally.
9148 * ax.c: Include format.h.
9149 (ax_printf): New function.
9150 (gdb_eval_agent_expr): Add printf opcode.
9151
2f8f6aed
YQ
91522012-06-13 Yao Qi <yao@codesourcery.com>
9153
9154 * server.c (start_inferior): Remove duplicated writes to fields
9155 'last_resume_kind' and 'last_status' of 'current_inferior'.
9156
0c9070b3
YQ
91572012-06-12 Yao Qi <yao@codesourcery.com>
9158 Pedro Alves <palves@redhat.com>
9159
9160 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9161 comment.
9162 * server.c (handle_v_cont): Extend comment.
9163
c52daf70
YQ
91642012-06-11 Yao Qi <yao@codesourcery.com>
9165
9166 * linux-low.c (linux_attach): Add 'static'.
9167
d38bbb0a
YQ
91682012-06-06 Yao Qi <yao@codesourcery.com>
9169
9170 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9171
89dc0afd
JK
91722012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9173
9174 Fix gcc -flto compilation warning.
9175 * server.c (main): Make variable multi_mode and attach volatile.
9176
75f62ce7
TJB
91772012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9178
9179 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9180 if the platform doesn't know about it.
9181
65f479b6
PA
91822012-05-30 Jeff Kenton <jkenton@tilera.com>
9183
9184 * Makefile.in (SFILES): Add linux-tile-low.c.
9185 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9186 * configure.srv: Handle tilegx-*-linux*.
9187 * linux-tile-low.c: New file.
9188
0c5bf5a9
JK
91892012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9190
9191 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9192
a493e3e2
PA
91932012-05-24 Pedro Alves <palves@redhat.com>
9194
9195 PR gdb/7205
9196
43aaf8b6 9197 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 9198
2ea28649
PA
91992012-05-24 Pedro Alves <palves@redhat.com>
9200
9201 PR gdb/7205
9202
9203 Replace target_signal with gdb_signal throughout.
9204
8d409d16
MR
92052012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9206
9207 * linux-low.c (linux_store_registers): Avoid the copying sequence
9208 when no data has been retrieved by ptrace.
9209
23512c01
MGD
92102012-05-22 Will Deacon <will.deacon@arm.com>
9211
9212 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9213 Include asm/ptrace.h.
9214 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9215 already defined.
9216
4934b29e
MR
92172012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9218
9219 * linux-low.c (linux_store_registers): Don't re-retrieve data
9220 with ptrace that has already been obtained from /proc. Always
9221 copy any data retrieved with ptrace to the buffer supplied.
9222
bde24c0a
PA
92232012-05-11 Yao Qi <yao@codesourcery.com>
9224 Pedro Alves <palves@redhat.com>
9225
9226 * linux-low.c (enum stopping_threads_kind): New.
9227 (stopping_threads): Change type to `enum stopping_threads_kind'.
9228 (handle_extended_wait): If stopping and suspending threads, leave
9229 the new_lwp suspended too.
9230 (linux_wait_for_event): Adjust.
9231 (stop_all_lwps): Set `stopping_threads' to
9232 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9233 whether we're suspending threads or just stopping them. Assert no
9234 recursion happens.
9235
623b6bdf
YQ
92362012-04-29 Yao Qi <yao@codesourcery.com>
9237
9238 * server.h: Move some code to ...
9239 * gdbthread.h: ... here. New.
9240 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9241 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9242 (nto-low.o, win32-low.o): Likewise.
9243 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9244 * regcache.c, remote-utils.c, server.c: Likewise.
9245 * target.c, tracepoint.c, win32-low.c: Likewise.
9246
f15f9948
TJB
92472012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9248
9249 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9250 (PTRACE_ARG4_TYPE): Likewise.
9251 (PTRACE_XFER_TYPE): Likewise.
9252 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9253 ptrace to PTRACE_ARG3_TYPE.
9254 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9255 (PTRACE_ARG4_TYPE): Likewise.
9256 (PTRACE_XFER_TYPE): Likewise.
9257 (linux_detach_one_lwp): Cast fourth argument of
9258 ptrace to long then PTRACE_ARG4_TYPE.
9259 (regsets_fetch_inferior_registers): Cast third argument of
9260 ptrace to long then PTRACE_ARG3_TYPE.
9261 (regsets_store_inferior_registers): Likewise.
9262
38ea300a
PA
92632012-04-20 Pedro Alves <palves@redhat.com>
9264
9265 * configure: Regenerate.
9266
c971b7fa
PA
92672012-04-19 Pedro Alves <palves@redhat.com>
9268
43aaf8b6 9269 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 9270 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
9271 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9272 (all, install-only, uninstall, clean-info, all-lib, clean): No
9273 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9274 (maintainer-clean realclean distclean): Use subdir_do.
9275 (subdir_do): New.
9276 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 9277 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
9278 * acinclude.m4: Include acx_configure_dir.m4.
9279 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9280 calls. Call AC_PROG_RANLIB. Configure gnulib using
9281 ACX_CONFIGURE_DIR.
9282 (GNULIB): New.
9283 (GNULIB_STDINT_H): Adjust.
9284 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9285 * gdbreplay.c: Include build-gnulib/config.h.
9286 * server.h: Likewise.
9287 * aclocal.m4: Regenerate.
9288 * config.in: Regenerate.
9289 * configure: Regenerate.
c971b7fa 9290
809277f8
PA
92912012-04-19 Pedro Alves <palves@redhat.com>
9292
9293 * Makefile.in (LIBGNU, INCGNU): Adjust.
9294 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9295 (all, install-only, uninstall, clean-info, all-lib, clean)
9296 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9297 * configure.ac: Adjust AC_OUTPUT output.
9298 * aclocal.m4: Regenerate.
9299 * configure: Regenerate.
9300
fd9bb8b8
PA
93012012-04-19 Pedro Alves <palves@redhat.com>
9302
9303 * Makefile.in (generated_files): New.
9304 (server_h): Remove the explicit dependency on config.h, and depend
9305 on $generated_files.
9306
1c298c66
PA
93072012-04-19 Pedro Alves <palves@redhat.com>
9308
9309 * Makefile.in (INCGNU): Add -Ignulib.
9310
57c4b50b
PA
93112012-04-19 Pedro Alves <palves@redhat.com>
9312
9313 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9314 (INCGNU): ... this, and spell out -I here.
9315 (GNULIB_LIB): Rename to ...
9316 (LIBGNU): ... this.
9317 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9318
1030e047
PA
93192012-04-19 Pedro Alves <palves@redhat.com>
9320
9321 * config.in: Regenerate.
9322
447d4319
PA
93232012-04-19 Pedro Alves <palves@redhat.com>
9324
9325 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9326 * server.h (memmem): Remove declaration.
9327 * config.in: Regenerate.
9328 * configure: Regenerate.
9329
aad9eab9
YQ
93302012-04-19 Yao Qi <yao@codesourcery.com>
9331
9332 * Makefile.in (SFILES): Add common/vec.c.
9333 (OBS): Add vec.o.
9334 (vec.o): New rule.
9335
3e10640f
YQ
93362012-04-19 Yao Qi <yao@codesourcery.com>
9337
9338 * remote-utils.c (prepare_resume_reply): Replace with macro
9339 target_core_of_thread.
9340 * server.c (handle_qxfer_threads_proper): Likewise.
9341 * target.h (traget_core_of_thread): New macro.
9342
71622373
PA
93432012-04-18 Pedro Alves <palves@redhat.com>
9344
9345 * aclocal.m4: Regenerate.
9346 * configure: Regenerate.
9347
80d26939
YQ
93482012-04-16 Yao Qi <yao@codesourcery.com>
9349
9350 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9351 duplicated on address.
9352
42476b70
YQ
93532012-04-16 Yao Qi <yao@codesourcery.com>
9354
9355 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9356 (struct tracepoint_action_ops) <send>: New field.
9357 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9358 (agent_expr_send, x_tracepoint_action_send): New.
9359 (l_tracepoint_action_send): New.
9360 (cmd_qtdp): Download and install tracepoint
9361 according to `use_agent'.
9362 (run_inferior_command): Add one more parameter `len'.
9363 Update callers.
9364 (tracepoint_send_agent): New.
9365 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9366
7bc83639
YQ
93672012-04-16 Yao Qi <yao@codesourcery.com>
9368
9369 * tracepoint.c (download_tracepoints): Moved to ...
9370 (cmd_qtstart): ... here.
9371
5f18041e
YQ
93722012-04-14 Yao Qi <yao@codesourcery.com>
9373
9374 * tracepoint.c: Include inttypes.h.
9375 (struct collect_memory_action): Use sized types.
9376 (struct tracepoint): Likewise.
9377 (cmd_qtdp, stop_tracing): Update print specifiers.
9378 (cmd_qtp, response_tracepoint): Likewise.
9379 (collect_data_at_tracepoint): Likewise.
9380 (collect_data_at_step): Likewise.
9381
55a8c076
YQ
93822012-04-14 Yao Qi <yao@codesourcery.com>
9383
9384 Import gnulib module inttypes.
9385 * aclocal.m4, config.in, configure: Regenerated.
9386
dc750257
YQ
93872012-04-14 Yao Qi <yao@codesourcery.com>
9388
9389 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9390 Makefile and config.status at last.
9391
0ab5faf9
YQ
93922012-04-13 Yao Qi <yao@codesourcery.com>
9393
9394 * tracepoint.c: Include stdint.h unconditionally.
9395
18f5fd81
TJB
93962012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9397
9398 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9399 on BFD_HAVE_SYS_PROCFS_TYPE.
9400 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9401 * configure: Regenerate.
9402 * config.in: Likewise.
9403
4d47af5c
L
94042012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9405
9406 * Makefile.in (clean): Also remove x32.c x32-linux.c
9407 x32-avx.c x32-avx-linux.c.
9408 (x32.o): New target.
9409 (x32.c): Likewise.
9410 (x32-linux.o): Likewise.
9411 (x32-linux.c): Likewise.
9412 (x32-avx.o): Likewise.
9413 (x32-avx.c): Likewise.
9414 (x32-avx-linux.o): Likewise.
9415 (x32-avx-linux.c): Likewise.
9416
9417 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9418 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9419 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9420 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9421 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9422 i386/x32-avx-linux.xml.
9423
9424 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9425 (init_registers_x32_avx_linux): Likwise.
9426 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9427 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9428
ecedbe58
PA
94292012-04-13 Pedro Alves <palves@redhat.com>
9430
9431 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9432 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9433 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9434 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9435 the sub-make.
9436
c92b5177
L
94372012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9438
9439 * linux-x86-low.c (compat_x32_clock_t): New.
9440 (compat_x32_siginfo_t): Likewise.
9441 (compat_x32_siginfo_from_siginfo): Likewise.
9442 (siginfo_from_compat_x32_siginfo): Likewise.
9443 (linux_is_elf64): Likewise.
9444 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9445 and siginfo_from_compat_x32_siginfo for x32.
9446 (x86_arch_setup): Set linux_is_elf64.
9447
214d508e
L
94482012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9449
9450 PR gdb/13969
9451 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9452 e_machine field.
9453 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9454 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9455 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9456 compatible with process.
9457
c9a1864a
YQ
94582012-04-12 Yao Qi <yao@codesourcery.com>
9459
9460 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9461 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9462 (install-only, install-info, clean): Handle sub dir gnulib.
9463 (all-lib, am--refresh): New targets.
9464 (memmem.o): Remove target.
9465 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9466 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9467 (AC_REPLACE_FUNCS): Remove memmem.
9468 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9469 (AC_OUTPUT): Generate Makefile in gnulib/.
9470 * aclocal.m4, config.in, configure: Regenerated.
9471
367ba2c2
MR
94722012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9473
9474 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9475
9d236627
PA
94762012-04-05 Pedro Alves <palves@redhat.com>
9477
9478 -Werror=strict-aliasing
9479
9480 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9481 pointer.
9482
111217b3
PA
94832012-04-04 Pedro Alves <palves@redhat.com>
9484
9485 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9486 (sparc_store_gregset_from_stack, sparc_store_gregset)
9487 (sparc_breakpoint_at): Fix formatting.
9488
8365dcf5
TJB
94892012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9490
9491 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9492 are available.
9493 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9494 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9495 * config.in: Regenerate.
9496 * configure: Likewise.
9497
689cc2ae
PA
94982012-03-29 Pedro Alves <palves@redhat.com>
9499
9500 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9501 Correct ptrace arguments.
9502
c14dfd32
PA
95032012-03-28 Pedro Alves <palves@redhat.com>
9504
9505 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9506 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9507 (IA64_FR1_REGNUM): New defines.
9508 (ia64_fetch_register): New.
9509 (the_low_target): Install it.
9510 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9511 field.
9512 * linux-low.c (linux_fetch_registers): Try the
9513 the_low_target.fetch_register hook first.
9514
9515 * linux-arm-low.c (the_low_target): Adjust.
9516 * linux-bfin-low.c (the_low_target): Adjust.
9517 * linux-cris-low.c (the_low_target): Adjust.
9518 * linux-crisv32-low.c (the_low_target): Adjust.
9519 * linux-m32r-low.c (the_low_target): Adjust.
9520 * linux-m68k-low.c (the_low_target): Adjust.
9521 * linux-mips-low.c (the_low_target): Adjust.
9522 * linux-ppc-low.c (the_low_target): Adjust.
9523 * linux-s390-low.c (the_low_target): Adjust.
9524 * linux-sh-low.c (the_low_target): Adjust.
9525 * linux-sparc-low.c (the_low_target): Adjust.
9526 * linux-tic6x-low.c (the_low_target): Adjust.
9527 * linux-x86-low.c (the_low_target): Adjust.
9528 * linux-xtensa-low.c (the_low_target): Adjust.
9529
63c88e13
PA
95302012-03-26 Pedro Alves <palves@redhat.com>
9531
9532 * server.c (handle_qxfer_libraries): Don't bail early if
9533 the_target->qxfer_libraries_svr4 is not NULL.
9534
fb723180
PA
95352012-03-26 Pedro Alves <palves@redhat.com>
9536
9537 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9538
0afae3cf
PA
95392012-03-23 Pedro Alves <palves@redhat.com>
9540
9541 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9542 "library-list-svr4" element's start tag when the the DSO list is
9543 empty.
9544
485f1ee4
PA
95452012-03-23 Pedro Alves <palves@redhat.com>
9546
9547 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9548 a variable whose type size is the same as the inferior's pointer
9549 size.
9550
a5362b9a
TS
95512012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9552
9553 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9554 struct siginfo.
9555 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9556 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9557 * linux-low.h: Include <signal.h>.
9558 (struct siginfo): Remove forward declaration.
9559 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9560 struct siginfo.
9561
d226c142
MF
95622012-03-21 Mike Frysinger <vapier@gentoo.org>
9563
9564 * .gitignore: Ignore more files.
9565
122f36ef
PA
95662012-03-19 Pedro Alves <palves@redhat.com>
9567 Jan Kratochvil <jan.kratochvil@redhat.com>
9568
9569 * server.c (cont_thread, general_thread): Add describing comments.
9570 (start_inferior): Clear `cont_thread'.
9571 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9572 of a process.
9573
fc3e5175
YQ
95742012-03-15 Yao Qi <yao@codesourcery.com>
9575
9576 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9577 handling to ...
9578 (cmd_qtdp): ... here.
9579
8d0d92cd
YQ
95802012-03-15 Yao Qi <yao@codesourcery.com>
9581
9582 * tracepoint.c (struct tracepoint_action_ops): New.
9583 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9584 (m_tracepoint_action_download): New.
9585 (r_tracepoint_action_download): New.
9586 (x_tracepoint_action_download): New.
9587 (l_tracepoint_action_download): New.
9588 (add_tracepoint_action): Install `action->ops' according type.
9589 (download_tracepoint_1): Move code `download' function pointer
9590 of various tracepoint_action_ops.
9591
87b0bb13
JK
95922012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9593
9594 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9595 linux_ptrace_attach_warnings.
9596
5f572dec
JK
95972012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9598
9599 * Makefile.in (linux-ptrace.o): New.
9600 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9601 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9602 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9603 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9604 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9605 of these targets.
9606 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9607
f4647387
YQ
96082012-03-08 Yao Qi <yao@codesourcery.com>
9609 Pedro Alves <palves@redhat.com>
9610
9611 Fix PR server/13392.
9612 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9613 offset of JMP insn.
9614 * tracepoint.c (remove_tracepoint): New.
9615 (cmd_qtdp): Call remove_tracepoint when failed to install.
9616
9b224c5e
PA
96172012-03-07 Pedro Alves <palves@redhat.com>
9618
9619 * linux-low.c (get_detach_signal): New.
9620 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9621 Pass on pending signals to PTRACE_DETACH. Check the result of the
9622 ptrace call.
9623 * server.c (program_signals, program_signals_p): New.
9624 (handle_general_set): Handle QProgramSignals.
9625 * server.h (program_signals, program_signals_p): Declare.
9626
e237a7e2
JK
96272012-03-05 Pedro Alves <palves@redhat.com>
9628 Jan Kratochvil <jan.kratochvil@redhat.com>
9629
9630 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9631 New comment why.
9632
5808517f
YQ
96332012-03-03 Yao Qi <yao@codesourcery.com>
9634
9635 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9636 agent_look_up_symbols.
9637
58b4daa5
YQ
96382012-03-03 Yao Qi <yao@codesourcery.com>
9639
9640 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9641 (linux-x86-low.o): Likewise.
9642 * server.h: Remove in_process_agent_loaded.
9643 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9644 common/agent.c.
9645 Update callers.
9646
8ffcbaaf
YQ
96472012-03-03 Yao Qi <yao@codesourcery.com>
9648
9649 * tracepoint.c (gdb_agent_capability): New global.
9650 (in_process_agent_loaded_ust): Renamed to
9651 `in_process_agent_supports_ust'.
9652 Update callers.
9653 (in_process_agent_supports_ust): Call agent_capability_check.
9654 (clear_installed_tracepoints): Assert that agent supports
9655 agent.
9656
d1feda86
YQ
96572012-03-03 Yao Qi <yao@codesourcery.com>
9658
9659 * linux-low.c (linux_supports_agent): New.
9660 (linux_target_ops): Initialize field `supports_agent' with
9661 linux_supports_agent.
9662 * target.h (struct target_ops) <supports_agent>: New.
9663 (target_supports_agent): New macro.
9664 * server.c (handle_general_set): Handle packet 'QAgent'.
9665 (handle_query): Send `QAgent+'.
9666 * Makefile.in (server.o): Depends on agent.h.
9667
2fa291ac
YQ
96682012-03-03 Yao Qi <yao@codesourcery.com>
9669
9670 * Makefile.in (OBS): Add agent.o.
9671 Add new rule for agent.o.
9672 Track dependence of tracepoint.c on agent.h.
9673 * tracepoint.c (run_inferior_command_1):
9674 (run_inferior_command): Call agent_run_command.
9675 (gdb_ust_connect_sync_socket): Deleted. Move it to
9676 common/agent.c.
9677 (resume_thread, stop_thread): Likewise.
9678 (gdb_ust_socket_init): Renamed to ...
9679 (gdb_agent_socket_init): ... New.
9680 (gdb_ust_thread): Renamed to ...
9681 (gdb_agent_helper_thread): ... New.
9682 (gdb_ust_init): Move some code to ...
9683 (gdb_agent_init): ... here. New.
9684 [HAVE_UST]: Call gdb_ust_init.
9685 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9686 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9687 * config.in, configure: Regenerated.
9688
05044653
PA
96892012-03-02 Pedro Alves <palves@redhat.com>
9690
9691 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9692 * linux-low.c (struct simple_pid_list): New.
9693 (stopped_pids): New a struct simple_pid_list pointer.
9694 (add_to_pid_list, pull_pid_from_list): New.
9695 (handle_extended_wait): Don't assume the first signal new children
9696 report is SIGSTOP. Adjust call to pull_pid_from_list.
9697 (linux_wait_for_lwp): Adjust.
9698
8d00225b
YQ
96992012-03-02 Yao Qi <yao@codesourcery.com>
9700
9701 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9702 debug log.
9703
19560ba5
YQ
97042012-03-02 Yao Qi <yao@codesourcery.com>
9705
9706 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9707 `stop_pc' and `tpoint'. Update caller.
9708
1faeff08
MR
97092012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9710
9711 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9712 * linux-low.c (use_linux_regsets): New macro.
9713 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9714 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9715 (linux_register_in_regsets): New function.
9716 (usr_fetch_inferior_registers): Skip registers covered by
9717 regsets.
9718 (usr_store_inferior_registers): Likewise.
9719 (usr_fetch_inferior_registers): New macro.
9720 (usr_store_inferior_registers): Likewise.
9721 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9722 (linux_store_registers): Likewise.
9723 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9724 prototype.
9725 (init_registers_mips64_dsp_linux): Likewise.
9726 (init_registers_mips_linux): New macro.
9727 (init_registers_mips_dsp_linux): Likewise.
9728 (mips_dsp_num_regs): Likewise.
9729 (DSP_BASE, DSP_CONTROL): New fallback macros.
9730 (mips_base_regs): New macro.
9731 (mips_regmap): Use it. Fix the size.
9732 (mips_dsp_regmap): New variable.
9733 (mips_dsp_regset_bitmap): Likewise.
9734 (mips_arch_setup): New function.
9735 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9736 than mips_regmap.
9737 (mips_cannot_store_register): Likewise.
9738 (the_low_target): Update .arch_setup, .num_regs and .regmap
9739 initializers. Add .regset_bitmap initializer.
9740 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9741 initializer.
9742 * linux-bfin-low.c (the_low_target): Likewise.
9743 * linux-cris-low.c (the_low_target): Likewise.
9744 * linux-crisv32-low.c (the_low_target): Likewise.
9745 * linux-ia64-low.c (the_low_target): Likewise.
9746 * linux-m32r-low.c (the_low_target): Likewise.
9747 * linux-m68k-low.c (the_low_target): Likewise.
9748 * linux-ppc-low.c (the_low_target): Likewise.
9749 * linux-s390-low.c (the_low_target): Likewise.
9750 * linux-sh-low.c (the_low_target): Likewise.
9751 * linux-sparc-low.c (the_low_target): Likewise.
9752 * linux-tic6x-low.c (the_low_target): Likewise.
9753 * linux-x86-low.c (the_low_target): Likewise.
9754 * linux-xtensa-low.c (the_low_target): Likewise.
9755 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9756 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9757 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9758 srv_xmlfiles.
9759 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9760 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9761
c03e6ccc
YQ
97622012-02-29 Yao Qi <yao@codesourcery.com>
9763 Pedro Alves <palves@redhat.com>
9764
9765 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9766 `step_over_finished' is true.
9767
644cebc9
PA
97682012-02-27 Pedro Alves <palves@redhat.com>
9769
9770 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9771 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9772
c14d7ab2
PA
97732012-02-27 Pedro Alves <palves@redhat.com>
9774
9775 PR server/9684
9776 * linux-low.c (pid_is_stopped): New.
9777 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9778
412c89dd
LM
97792012-02-25 Luis Machado <lgustavo@codesourcery.com>
9780
9781 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9782 of conditions.
9783
b745defe
MR
97842012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9785
9786 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9787
9f3a5c85
LM
97882012-02-24 Luis Machado <lgustavo@codesourcery>
9789
9790 * server.c (handle_query): Advertise support for target-side
9791 breakpoint condition evaluation.
9792 (process_point_options): New function.
9793 (process_serial_event): When inserting a breakpoint, check for
9794 a target-side condition that should be evaluated.
9795
9796 * mem-break.c: Include regcache.h and ax.h.
9797 (point_cond_list_t): New data structure.
9798 (breakpoint) <cond_list>: New field.
9799 (find_gdb_breakpoint_at): Make non-static.
9800 (delete_gdb_breakpoint_at): Clear any target-side
9801 conditions.
9802 (clear_gdb_breakpoint_conditions): New function.
9803 (add_condition_to_breakpoint): Likewise.
9804 (add_breakpoint_condition): Likewise.
9805 (gdb_condition_true_at_breakpoint): Likewise.
9806 (gdb_breakpoint_here): Return result directly instead
9807 of going through a local variable.
9808
9809 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9810 (clear_gdb_breakpoint_conditions): Likewise.
9811 (add_breakpoint_condition): Likewise.
9812 (gdb_condition_true_at_breakpoint): Likewise.
9813
9814 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9815 (need_step_over_p): Take target-side breakpoint condition into
9816 consideration.
9817
5e1dc496
LM
98182012-02-24 Luis Machado <lgustavo@codesourcery>
9819
9820 * server.h: Include tracepoint.h.
9821 (agent_mem_read, agent_get_trace_state_variable_value,
9822 agent_set_trace_state_variable_value,
9823 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9824 get_set_tsv_func_addr): New prototypes.
9825
9826 * ax.h: New include file.
9827 * ax.c: New source file.
9828
9829 * tracepoint.c: Include ax.h.
9830 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9831 agent_expr, eval_result_type): Move to ax.h.
9832 (parse_agent_expr): Rename to ...
9833 (gdb_parse_agent_expr): ... this, make it non-static and move
9834 to ax.h.
9835 (unparse_agent_expr) Rename to ...
9836 (gdb_unparse_agent_expr): ... this, make it non-static and move
9837 to ax.h.
9838 (eval_agent_expr): Rename to ...
9839 (eval_tracepoint_agent_expr): ... this.
9840 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9841 forward declarations.
9842 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9843 (agent_get_trace_state_variable_value): New function.
9844 (agent_set_trace_state_variable_value): New function.
9845 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9846 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9847 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9848 (condition_true_at_tracepoint): Likewise.
9849 (parse_agent_expr): Rename to ...
9850 (gdb_parse_agent_expr): ... this and move to ax.c.
9851 (unparse_agent_expr): Rename to ...
9852 (gdb_unparse_agent_expr): ... this and move to ax.c.
9853 (gdb_agent_op_name): Move to ax.c.
9854 (eval_agent_expr): Rename to ...
9855 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9856 and move to ax.c.
9857 (eval_tracepoint_agent_expr): New function.
9858 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9859 non-static.
5e1dc496
LM
9860 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9861 ax.c.
9862 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9863 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9864 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9865 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9866 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9867 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9868 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9869 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9870 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9871 (compile_bytecodes): Remove forward declaration.
9872 (is_goto_target): Move to ax.c.
9873 (compile_bytecodes): Move to ax.c and call
9874 agent_get_trace_state_variable_value (...) and
9875 agent_set_trace_state_variable_value (...).
9876
9877 * Makefile.in: Update ax.c and IPA dependencies.
9878
277e4e52
PA
98792012-02-24 Pedro Alves <palves@redhat.com>
9880
9881 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9882 (cmd_bigqtbuffer_circular): ... this. Only handle
9883 'QTBuffer:circular:'.
9884 (handle_tracepoint_general_set): Adjust.
9885
bf4c19f7
YQ
98862012-02-16 Yao Qi <yao@codesourcery.com>
9887
9888 * inferiors.c: Move code to ...
9889 * dll.c: .... here. New.
9890 * server.h: Declare clear_dlls.
9891 * Makefile.in (SFILES): Add dll.c.
9892 (OBS): Add dll.o
9893 (dll.o): New rule.
9894
d73f2619
YQ
98952012-02-11 Yao Qi <yao@codesourcery.com>
9896
9897 * server.c: (handle_monitor_command): Add a new parameter
9898 `own_buf'.
9899 (handle_query): Update caller.
9900
f8255c2a
JB
99012012-02-09 Joel Brobecker <brobecker@adacore.com>
9902
9903 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9904 * configure, config.in: Regenerate.
9905 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9906 is not defined.
9907
da84f473
PA
99082012-02-02 Pedro Alves <palves@redhat.com>
9909
9910 Try SIGKILL first, then PTRACE_KILL.
9911 * linux-low.c (linux_kill_one_lwp): New.
9912 (linux_kill_one_lwp): Rename to ...
9913 (kill_one_lwp_callback): ... this. Use the new
9914 linux_kill_one_lwp.
9915
e886a173
PA
99162012-02-02 Pedro Alves <palves@redhat.com>
9917
9918 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9919 inferior.
9920
be07f1a2
PA
99212012-01-27 Pedro Alves <palves@redhat.com>
9922
9923 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9924 (elf_64_file_p): Make static.
9925 (linux_pid_exe_is_elf_64_file): New.
9926 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9927 Delete declarations.
9928 (linux_pid_exe_is_elf_64_file): Declare.
9929 * linux-x86-low.c (x86_arch_setup): Use
9930 linux_pid_exe_is_elf_64_file.
9931
d8301ad1
JK
99322012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9933
9934 * linux-low.c (linux_wait_for_event_1): Rename to ...
9935 (linux_wait_for_event): ... here and merge it with former
9936 linux_wait_for_event - new variable wait_ptid, use it.
9937 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9938
01b17894
PA
99392012-01-23 Pedro Alves <palves@redhat.com>
9940
9941 * server.c (main): Avoid yet another case of infinite loop while
9942 detaching/killing after a longjmp.
9943
e825046f
JK
99442012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9945
9946 Code cleanup.
9947 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9948
b9e7b9c3
UW
99492012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9950
9951 * hostio.c (handle_readlink): New function.
9952 (handle_vFile): Call it to handle "vFile:readlink" packets.
9953
901f9912
UW
99542012-01-20 Pedro Alves <palves@redhat.com>
9955 Ulrich Weigand <ulrich.weigand@linaro.org>
9956
9957 * server.c (handle_v_requests): Only support vAttach and vRun to
9958 start multiple processes when in extended protocol mode.
9959
fc1ab1a0
PA
99602012-01-17 Pedro Alves <palves@redhat.com>
9961
9962 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9963 memalign plus mprotect to allocate the scratch buffer.
9964
7d5d4e98
PA
99652012-01-13 Pedro Alves <palves@redhat.com>
9966
9967 * server.c (attach_inferior): Clear `cont_thread'.
9968
f128d5e9
PA
99692012-01-13 Pedro Alves <palves@redhat.com>
9970
9971 * server.c (main): Avoid infinite loop while detaching/killing
9972 after a longjmp.
9973
06db92f0
DE
99742012-01-09 Doug Evans <dje@google.com>
9975
9976 * server.c (start_inferior): Set last_ptid in --wrapper case.
9977
32d92999
YQ
99782012-01-06 Yao Qi <yao@codesourcery.com>
9979
9980 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9981 defined.
9982 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9983
5e0a92a9
YQ
99842012-01-04 Yao Qi <yao@codesourcery.com>
9985
9986 * tracepoint.c (cmd_qtdp): Print debug message
9987 for static tracepoint.
9988
ae639e8c
YQ
99892012-01-04 Yao Qi <yao@codesourcery.com>
9990
9991 * tracepoint.c (trace_vdebug): Differentiate debug message
9992 between gdbserver and IPA.
9993
f72429c5
YQ
99942012-01-03 Yao Qi <yao@codesourcery.com>
9995
9996 * tracepoint.c (tracepoint_was_hit): Don't collect for
9997 static tracepoint.
9998
12c3e59c
JB
99992012-01-02 Joel Brobecker <brobecker@adacore.com>
10000
10001 * terminal.h: Reformat copyright header.
10002
67827812
JB
100032012-01-02 Joel Brobecker <brobecker@adacore.com>
10004
10005 * server.c (gdbserver_version): Update copyright year.
10006 * gdbreplay.c (gdbreplay_version): Likewise.
10007
3e52c33d
JK
100082011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10009
10010 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10011
10012 Revert:
10013 2011-12-18 Hui Zhu <teawater@gmail.com>
10014 * linux-low.c (linux_create_inferior): Save return value to ret.
10015
66f1260e
HZ
100162011-12-18 Hui Zhu <teawater@gmail.com>
10017
10018 * linux-low.c (linux_create_inferior): Save return value to ret.
10019
e77616d7
DE
100202011-12-16 Doug Evans <dje@google.com>
10021
e7b06c57
DE
10022 * linux-low.c (linux_create_inferior): If stdio connection,
10023 redirect stdin from /dev/null, stdout to stderr.
10024 * remote-utils.c (remote_is_stdio): New static global.
10025 (remote_connection_is_stdio): New function.
10026 (remote_prepare): Handle stdio connection.
10027 (remote_open): Ditto.
10028 (remote_close): Don't close stdin for stdio connections.
10029 (read_prim,write_prim): New functions. Replace all calls to
10030 read/write to these.
10031 * server.c (main): Watch for "-" argument. Move call to
10032 remote_prepare before start_inferior.
10033 * server.h (STDIO_CONNECTION_NAME): New macro.
10034 (remote_connection_is_stdio): Declare.
10035
e77616d7
DE
10036 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10037 in debugging output.
10038
82067193
YQ
100392011-12-15 Yao Qi <yao@codesourcery.com>
10040
10041 * tracepoint.c: Include sys/syscall.h.
10042 (gdb_ust_thread): Remove preprocessor conditional.
10043
82bfbe7e
PA
100442011-12-14 Pedro Alves <pedro@codesourcery.com>
10045
10046 * linux-low.c (linux_detach_one_lwp): Call
10047 the_low_target.prepare_to_resume before detaching.
10048
712c6575
YQ
100492011-12-14 Yao Qi <yao@codesourcery.com>
10050
10051 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10052 of write.
10053
d54d1edf
YQ
100542011-12-14 Yao Qi <yao@codesourcery.com>
10055
10056 * i386-low.c (i386_low_stopped_data_address): Initialize local
10057 variable `control'.
10058
6210a125
PA
100592011-12-13 Pedro Alves <pedro@codesourcery.com>
10060
10061 PR remote/13492
10062
10063 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10064 DR_CONTROL unless necessary. Extend comments.
10065 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10066 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10067
2ece8244
YQ
100682011-12-13 Yao Qi <yao@codesourcery.com>
10069
10070 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10071 macros.
10072 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10073
784867a5
JK
100742011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10075
10076 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10077 Print new debug message for such case.
10078
6bf36717
JK
100792011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10080
10081 Fix overlapping memcpy.
10082 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10083 the read_inferior_memory transfer.
10084 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10085 write_inferior_memory transfer.
10086 (set_fast_tracepoint_jump): New variable buf. Use it for the
10087 read_inferior_memory and write_inferior_memory transfers.
10088 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10089 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10090 Use it for the write_inferior_memory transfer.
10091 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10092 buffers.
10093
50275556
MR
100942011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10095
10096 * linux-low.c (fetch_register, store_register): Make code
10097 consistent, fix formatting.
10098
7325beb4
MR
100992011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10100
10101 * linux-low.c (usr_store_inferior_registers): Factor out code
10102 to handle individual registers into...
10103 (store_register): ... this new function.
10104
c642a434
UW
101052011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10106
10107 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10108 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10109 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10110 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10111 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10112 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10113 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10114 (srv_xmlfiles): Add new XML files.
10115
10116 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10117 and <sys/uio.h>.
10118 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10119 (init_registers_s390_linux32v1): Add prototype.
10120 (init_registers_s390_linux32v2): Likewise.
10121 (init_registers_s390_linux64v1): Likewise.
10122 (init_registers_s390_linux64v2): Likewise.
10123 (init_registers_s390x_linux64v1): Likewise.
10124 (init_registers_s390x_linux64v2): Likewise.
10125 (s390_num_regs): Increment to 52.
10126 (s390_regmap): Add orig_r2 register.
10127 (s390_num_regs_3264): Increment to 68.
10128 (s390_regmap_3264): Add orig_r2 register.
10129 (s390_collect_ptrace_register): Handle orig_r2 register.
10130 (s390_supply_ptrace_register): Likewise.
10131 (s390_fill_last_break): New function.
10132 (s390_store_last_break): Likewise.
10133 (s390_fill_system_call): New function.
10134 (s390_store_system_call): Likewise.
10135 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10136 register sets.
10137 (s390_check_regset): New function.
10138 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10139 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10140 Update target_regsets for available register sets.
10141
2268b414
JK
101422011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10143 Jan Kratochvil <jan.kratochvil@redhat.com>
10144
10145 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10146 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10147 New.
10148 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10149 * linux-low.h (struct process_info_private): New member r_debug.
10150 * server.c (handle_qxfer_libraries): Call
10151 the_target->qxfer_libraries_svr4.
10152 (handle_qxfer_libraries_svr4): New function.
10153 (qxfer_packets): New entry "libraries-svr4".
10154 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10155 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10156 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10157 PACKET_qXfer_libraries_svr4.
10158
d6db1fab
UW
101592011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10160
10161 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10162 PSW address/mask between 8-byte and 16-byte formats.
10163 (s390_supply_ptrace_register): Likewise.
10164 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10165 basic addressing mode bit.
10166
242f5f1c
SS
101672011-11-24 Stan Shebs <stan@codesourcery.com>
10168
10169 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10170
f196051f
SS
101712011-11-17 Stan Shebs <stan@codesourcery.com>
10172
10173 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10174 (tracing_start_time): New global.
10175 (tracing_stop_time): New global.
10176 (tracing_user_name): New global.
10177 (tracing_notes): New global.
10178 (tracing_stop_note): New global.
10179 (cmd_qtstart): Set traceframe_usage, start_time.
10180 (stop_tracing): Set stop_time.
10181 (cmd_qtstatus): Report additional status.
10182 (cmd_qtp): New function.
10183 (handle_tracepoint_query): Call it.
10184 (cmd_qtnotes): New function.
10185 (handle_tracepoint_general_set): Call it.
10186 (get_timestamp): Rename from tsv_get_timestamp.
10187
405f8e94
SS
101882011-11-14 Stan Shebs <stan@codesourcery.com>
10189 Kwok Cheung Yeung <kcy@codesourcery.com>
10190
10191 * linux-x86-low.c (small_jump_insn): New.
10192 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10193 trampoline and error message, build a trampoline and issue a small
10194 jump instruction to it.
10195 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10196 trampoline and error message.
10197 (x86_get_min_fast_tracepoint_insn_len): New.
10198 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10199 * linux-low.h (struct linux_target_ops): Add arguments to
10200 install_fast_tracepoint_jump_pad operation, add new operation.
10201 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10202 arguments.
10203 (linux_get_min_fast_tracepoint_insn_len): New function.
10204 (linux_target_op): Add new operation.
10205 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10206 (gdb_trampoline_buffer_end): Ditto.
10207 (gdb_trampoline_buffer_error): Ditto.
10208 (struct ipa_sym_addresses): Add fields for new IPA variables.
10209 (symbol_list): Add entries for new IPA variables.
10210 (struct tracepoint): Add fields to hold the address range of the
10211 trampoline used by the tracepoint.
10212 (trampoline_buffer_head): New static variable.
10213 (trampoline_buffer_tail): Ditto.
10214 (claim_trampoline_space): New function.
10215 (have_fast_tracepoint_trampoline_buffer): New function.
10216 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10217 structure.
10218 (install_fast_tracepoint): Ditto, also add error buffer argument.
10219 (cmd_qtminftpilen): New function.
10220 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10221 (fast_tracepoint_from_trampoline_address): New function.
10222 (fast_tracepoint_collecting): Handle trampoline as part of jump
10223 pad space.
10224 (set_trampoline_buffer_space): New function.
10225 (initialize_tracepoint): Initialize new IPA variables.
10226 * target.h (struct target_ops): Add arguments to
10227 install_fast_tracepoint_jump_pad operation, add new
10228 get_min_fast_tracepoint_insn_len operation.
10229 (target_get_min_fast_tracepoint_insn_len): New.
10230 (install_fast_tracepoint_jump_pad): Add arguments.
10231 * server.h (IPA_BUFSIZ): Define.
10232 * linux-i386-ipa.c: Include extra header files.
10233 (initialize_fast_tracepoint_trampoline_buffer): New function.
10234 (initialize_low_tracepoint): Call it.
10235 * server.h (set_trampoline_buffer_space): Declare.
10236 (claim_trampoline_space): Ditto.
10237 (have_fast_tracepoint_trampoline_buffer): Ditto.
10238
1e4d1764
YQ
102392011-11-14 Yao Qi <yao@codesourcery.com>
10240
10241 * server.c (handle_query): Handle InstallInTrace for qSupported.
10242 * tracepoint.c (add_tracepoint): Sort list.
10243 (install_tracepoint, download_tracepoint): New.
10244 (cmd_qtdp): Call them to install and download tracepoints.
10245 (sort_tracepoints): Removed.
10246 (cmd_qtstart): Update.
10247
5c73ff4e
YQ
102482011-11-14 Yao Qi <yao@codesourcery.com>
10249
10250 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10251 * mem-break.h: Declare.
10252 * tracepoint.c (cmd_qtstart): Move some code to ...
10253 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10254 New.
10255 (download_tracepoints): Move some code to ...
10256 (download_tracepoint_1): ... here. New.
10257
86a30030
YQ
102582011-11-08 Yao Qi <yao@codesourcery.com>
10259
10260 * remote-utils.c (relocate_instruction): A comment fix.
10261
8d26e50c
JB
102622011-11-07 Joel Brobecker <brobecker@adacore.com>
10263
10264 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10265 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10266 dr_status_mirror and dr_control_mirror from debug_reg_state.
10267 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10268 (i386_initial_stuff): Remove use of deleted globals.
10269 (i386_get_thread_context, i386_set_thread_context,
10270 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10271 from debug_reg_state.
10272
a59306a3
YQ
102732011-11-05 Yao Qi <yao@codesourcery.com>
10274
10275 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10276 address as TPOINT's.
10277
3065dfb6
SS
102782011-11-02 Stan Shebs <stan@codesourcery.com>
10279
10280 * tracepoint.c (agent_mem_read_string): New function.
10281 (eval_agent_expr): Call it for tracenz.
10282 * server.c (handle_query): Report support for tracenz.
10283
fd0d8c7c
YQ
102842011-11-02 Yao Qi <yao@codesourcery.com>
10285
10286 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10287
609086b1
YQ
102882011-11-02 Yao Qi <yao@codesourcery.com>
10289
10290 * target.h: Fix a typo in comment.
10291
b9fd1791
PA
102922011-10-31 Pedro Alves <pedro@codesourcery.com>
10293
10294 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10295 clobber the breakpoints' shadows with fast tracepoint jumps.
10296 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10297 * target.c (write_inferior_memory): Also pass MYADDR down to
10298 check_mem_write.
10299
03583c20
UW
103002011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10301
10302 * configure.ac: Check support for personality routine.
10303 * configure: Regenerate.
10304 * config.in: Likewise.
10305 * linux-low.c: Include <sys/personality.h>.
10306 Define ADDR_NO_RANDOMIZE if necessary.
10307 (linux_create_inferior): Disable address space randomization when
10308 forking inferior, if requested.
10309 (linux_supports_disable_randomization): New function.
10310 (linux_target_ops): Install it.
10311 * server.h (disable_randomization): Declare.
10312 * server.c (disable_randomization): New global variable.
10313 (handle_general_set): Handle QDisableRandomization.
10314 (handle_query): Likewise for qSupported.
10315 (main): Support --disable-randomization and --no-disable-randomization
10316 command line arguments.
10317 * target.h (struct target_ops): Add supports_disable_randomization.
10318 (target_supports_disable_randomization): New macro.
10319
723b724b
MF
103202011-09-29 Mike Frysinger <vapier@gentoo.org>
10321
10322 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10323 ifdef check.
10324 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10325 [!PT_GETDSBT] (target_loadmap): New definition.
10326 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10327 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10328 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10329 and PT_GETDSBT to LINUX_LOADMAP.
10330 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10331 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10332
55329a5c 103332011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
10334
10335 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10336 (arm_linux_hwbp_cap): New static variable.
10337 (arm_linux_get_hwbp_cap): Replace by ...
10338 (arm_linux_init_hwbp_cap): ... this new function.
10339 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10340 (arm_linux_get_hw_watchpoint_count): Likewise.
10341 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10342 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10343 (arm_prepare_to_resume): Use perror_with_name instead of error.
10344
55329a5c 103452011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
10346
10347 * linux-arm-low.c: Include <signal.h>.
10348 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10349 (struct arm_linux_hwbp_cap): New data type.
10350 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10351 (struct arm_linux_hw_breakpoint): New data type.
10352 (MAX_BPTS, MAX_WPTS): Define.
10353 (struct arch_process_info, struct arch_lwp_info): New data types.
10354 (arm_linux_get_hwbp_cap): New function.
10355 (arm_linux_get_hw_breakpoint_count): Likewise.
10356 (arm_linux_get_hw_watchpoint_count): Likewise.
10357 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10358 (arm_hwbp_control_initialize): Likewise.
10359 (arm_hwbp_control_is_enabled): Likewise.
10360 (arm_hwbp_control_is_initialized): Likewise.
10361 (arm_hwbp_control_disable): Likewise.
10362 (arm_linux_hw_breakpoint_equal): Likewise.
10363 (arm_linux_hw_point_initialize): Likewise.
10364 (struct update_registers_data): New data structure.
10365 (update_registers_callback: New function.
10366 (arm_insert_point): Likewise.
10367 (arm_remove_point): Likewise.
10368 (arm_stopped_by_watchpoint): Likewise.
10369 (arm_stopped_data_address): Likewise.
10370 (arm_new_process): Likewise.
10371 (arm_new_thread): Likewise.
10372 (arm_prepare_to_resume): Likewise.
10373 (the_low_target): Register arm_insert_point, arm_remove_point,
10374 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10375 arm_new_thread, and arm_prepare_to_resume.
10376
6b9801d4
SS
103772011-09-15 Stan Shebs <stan@codesourcery.com>
10378
10379 * server.h (struct emit_ops): Add compare-goto fields.
10380 * tracepoint.c (gdb_agent_op_sizes): New table.
10381 (emit_eq_goto): New function.
10382 (emit_ne_goto): New function.
10383 (emit_lt_goto): New function.
10384 (emit_le_goto): New function.
10385 (emit_gt_goto): New function.
10386 (emit_ge_goto): New function.
10387 (is_goto_target): New function.
10388 (compile_bytecodes): Recognize special cases of compare-goto
10389 combinations and call specialized emitters for them.
10390 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10391 (amd64_emit_ne_goto): New function.
10392 (amd64_emit_lt_goto): New function.
10393 (amd64_emit_le_goto): New function.
10394 (amd64_emit_gt_goto): New function.
10395 (amd64_emit_ge_goto): New function.
10396 (amd64_emit_ops): Add the new functions.
10397 (i386_emit_eq_goto): New function.
10398 (i386_emit_ne_goto): New function.
10399 (i386_emit_lt_goto): New function.
10400 (i386_emit_le_goto): New function.
10401 (i386_emit_gt_goto): New function.
10402 (i386_emit_ge_goto): New function.
10403 (i386_emit_ops): Add the new functions.
10404
bf15cbda
SS
104052011-09-08 Stan Shebs <stan@codesourcery.com>
10406
10407 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10408 (i386_emit_epilogue): Restore %ebx.
10409
943ca1dd
JZ
104102011-08-31 Jie Zhang <jzhang918@gmail.com>
10411
10412 * server.c (step_thread): Remove definition.
10413 (process_serial_event): Don't handle Hs.
10414 * server.h (step_thread): Remove declaration.
10415 * target.c (set_desired_inferior): Remove use of step_thread.
10416
e3deef73
LM
104172011-08-24 Luis Machado <lgustavo@codesourcery.com>
10418
10419 * linux-low.c: Include linux-procfs.h.
10420 (linux_attach_lwp_1): Update comments.
10421 (linux_attach): Scan for existing threads when attaching to a
10422 process that is the tgid.
10423 * Makefile.in: Update dependencies.
10424
13da1c97
LM
104252011-08-24 Luis Machado <lgustavo@codesourcery.com>
10426
10427 * configure.srv: Add linux-procfs.o dependencies.
10428
881127c9
YQ
104292011-08-14 Yao Qi <yao@codesourcery.com>
10430
10431 * target.h (struct target_ops): Fix indent.
10432 * win32-low.c (win32_target_ops): Fix comment.
10433
58dbd541
YQ
104342011-08-14 Andrew Jenner <andrew@codesourcery.com>
10435 Yao Qi <yao@codesourcery.com>
10436
10437 * Makefile.in (clean): Remove tic6x-*.c files.
10438 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10439 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10440 (tic6x-c64xp-linux.c): Likewise.
10441 * configure.srv: Add support for tic6x-*-uclinux.
10442 * linux-tic6x-low.c: New.
10443 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10444
78d85199
YQ
104452011-08-14 Andrew Stubbs <ams@codesourcery.com>
10446 Yao Qi <yao@codesourcery.com>
10447
10448 * target.h (struct target_ops): Add read_loadmap.
10449 * linux-low.c (struct target_loadseg): New type.
10450 (struct target_loadmap): New type.
10451 (linux_read_loadmap): New function.
10452 (linux_target_ops): Add linux_read_loadmap.
10453 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
10454 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10455 to NULL.
78d85199 10456
a959a88d
EZ
104572011-08-05 Eli Zaretskii <eliz@gnu.org>
10458
10459 * win32-low.c: Include <stdint.h>.
10460
1ced966e
PA
104612011-07-22 Pedro Alves <pedro@codesourcery.com>
10462
10463 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10464 to the inferior here.
10465 (i386_remove_aligned_watchpoint): Ditto.
10466 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10467 fit part of the watchpoint in the debug registers.
10468 (i386_update_inferior_debug_regs): New.
10469 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10470 registers, and only update the inferior on success.
10471 (i386_low_remove_watchpoint): Ditto.
10472
d26e3629
KY
104732011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10474
10475 * linux-low.c (compare_ints, unique, list_threads, show_process,
10476 linux_core_of_thread): Delete.
10477 (linux_target_ops): Change linux_core_of_thread to
10478 linux_common_core_of_thread.
10479 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10480 * utils.c (malloc_failure): Change type of argument.
10481 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10482 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10483 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10484 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10485 (IPA_OBJS): Add common-utils-ipa.o.
10486 (ptid_h, linux_osdata_h): New macros.
10487 (server_h): Add common/common-utils.h, common/xml-utils.h,
10488 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10489 common/ptid.h.
10490 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10491 ptid.o, buffer.o): New rules.
10492 (linux-low.o): Add common/linux-osdata.h as a dependency.
10493 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10494 * configure.ac: Add AC_HEADER_DIRENT check.
10495 * config.in: Regenerate.
10496 * configure: Regenerate.
10497 * remote-utils.c (xml_escape_text): Delete.
10498 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10499 buffer_xml_printf): Move to common/buffer.c.
10500 * server.c (main): Remove call to initialize_inferiors.
10501 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10502 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10503 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10504 internal_error, gdb_assert, gdb_assert_fail): Delete.
10505 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10506 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10507 common/buffer.h.
10508 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10509 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10510 initialize_inferiors): Delete.
10511
2275a1a7
PA
105122011-07-20 Pedro Alves <pedro@codesourcery.com>
10513
10514 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10515 symbol error.
10516
0a5b1e09
PA
105172011-05-31 Pedro Alves <pedro@codesourcery.com>
10518
10519 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10520 assertion.
10521 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10522
6938fd34
YQ
105232011-05-26 Yao Qi <yao@codesourcery.com>
10524
10525 * Makefile.in (thread-db.o): Track dependence to
10526 common/gdb_thread_db.h.
10527 * thread-db.c: include gdb_thread_db.h from right place.
10528
b481f9e0
TT
105292011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10530
10531 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10532 __FILE__ and __LINE__ to internal_error.
10533
98a5dd13
DE
105342011-05-13 Doug Evans <dje@google.com>
10535
10536 * thread-db.c (try_thread_db_load_from_sdir): New function.
10537 (try_thread_db_load_from_dir): New function.
10538 (thread_db_load_search): Handle $sdir, ignore $pdir.
10539 Remove trying of system directories if search of
10540 libthread-db-search-path fails, that is now done via $sdir.
10541
d248b706
KY
105422011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10543
10544 * server.c (handle_query): Add EnableDisableTracepoints to the list
10545 of supported features.
43aaf8b6 10546 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10547 tracepoints.
43aaf8b6
PA
10548 (cmd_qtenable_disable): New.
10549 (cmd_qtstart): Install tracepoints even if disabled.
10550 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10551 receiving a QTEnable or QTDisable packet.
10552 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10553 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10554 tracepoints.
10555 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10556
84e578fb
DE
105572011-05-10 Doug Evans <dje@google.com>
10558
10559 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10560
71f55dd8
DE
105612011-05-04 Doug Evans <dje@google.com>
10562
10563 * linux-low.c (linux_join): Skip process lookup.
10564 * spu-low.c (spu_join): Ditto.
10565 * server.c (join_inferiors_callback): Delete.
10566 (process_serial_event): For 'D' packet (detach) call join_inferior
10567 directly.
10568
4d393d60
JM
105692011-05-04 Joseph Myers <joseph@codesourcery.com>
10570
10571 * README: Don't mention xscale*-*-linux*.
10572 * configure.srv (xscale*-*-linux*): Don't handle target.
10573
b00ad6ff
NF
105742011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10575
10576 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10577 casting pointers.
10578 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10579 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10580 (i386_emit_void_call_2): Likewise.
10581
af96c192
YQ
105822011-04-26 Yao Qi <yao@codesourcery.com>
10583
43aaf8b6
PA
10584 * linux-low.c: Move common macros to linux-ptrace.h.
10585 Include linux-ptrace.h.
af96c192
YQ
10586 * Makefile.in (linux_ptrace_h): New.
10587 (linux-low.o): Depends on linux-ptrace.h.
10588
03f2bd59
JK
105892011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10590
10591 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10592 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10593 (remote_prepare): New function with most of the TCP code from ...
10594 (remote_open): ... here. Detect PORT here unconditionally. Move also
10595 setting transport_is_reliable.
10596 * server.c (run_once): New variable.
10597 (gdbserver_usage): Document it.
10598 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10599 the first run if RUN_ONCE.
10600 * server.h (run_once, remote_prepare): New declarations.
10601
7a9dd1b2
TT
106022011-04-19 Tom Tromey <tromey@redhat.com>
10603
10604 * win32-low.c (handle_load_dll): Remove duplicate "the".
10605
81239425
PM
106062011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10607
10608 Remove support for old Cygwin 1.5 versions.
10609 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10610 function to avoid warning.
10611 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10612 warning.
10613
9e0627f1
PM
106142011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10615
10616 * gdbserver/server.h (Macro _): Define it if not available.
10617
588eebee
MS
106182011-03-14 Michael Snyder <msnyder@vmware.com>
10619
348af9f7 10620 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10621
43f70d4c
JB
106222011-03-10 Joel Brobecker <brobecker@adacore.com>
10623
10624 * Makefile.in (maintainer-clean realclean distclean): Remove
10625 "make ... subdir_do" command.
10626
348af9f7
MS
106272011-03-10 Michael Snyder <msnyder@vmware.com>
10628
10629 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10630
10631 * server.c (handle_v_run): Free alloced buffer on early return.
10632
e637a4f5
YQ
106332011-03-09 Yao Qi <yao@codesourcery.com>
10634
10635 Revert:
10636 2011-03-04 Yao Qi <yao@codesourcery.com>
10637
10638 * Makefile.in: Remove GNU make feature --directory.
10639
10640 2011-03-05 Yao Qi <yao@codesourcery.com>
10641
10642 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10643 (subdir_do): New make target. Copied from gdb/Makefile.
10644 (maintainer-clean, realclean, distclean, clean): Call corresponding
10645 make targets in common/Makefile.
10646
10647 2011-02-11 Yao Qi <yao@codesourcery.com>
10648
10649 * configure.ac: Call AC_PROG_RANLIB.
10650 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10651 * configure: Regenerate.
10652
e6edda56
JK
106532011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10654
10655 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10656
e5141119
JB
106572011-03-06 Yao Qi <yao@codesourcery.com>
10658
10659 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10660
64794aa4
JB
106612011-03-05 Yao Qi <yao@codesourcery.com>
10662
10663 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10664 (subdir_do): New make target. Copied from gdb/Makefile.
10665 (maintainer-clean, realclean, distclean, clean): Call corresponding
10666 make targets in common/Makefile.
10667
7a762829
YQ
106682011-03-04 Yao Qi <yao@codesourcery.com>
10669
10670 * Makefile.in: Remove GNU make feature --directory.
10671
348af9f7
MS
106722011-03-04 Michael Snyder <msnyder@vmware.com>
10673
10674 * server.c (queue_stop_reply): Call xmalloc not malloc.
10675
106762011-03-02 Michael Snyder <msnyder@vmware.com>
10677
10678 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10679
9f72fee2
MS
106802011-02-28 Michael Snyder <msnyder@vmware.com>
10681
588eebee
MS
10682 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10683 (cmd_qtframe): Ditto.
10684 (cmd_qtbuffer): Ditto.
10685 (cmd_bigqtbuffer): Ditto.
10686
9f72fee2
MS
10687 * utils.c (decimal2str): Initialize 'width' to nine, then
10688 don't mess with it.
10689
8040bd49
UW
106902011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10691
10692 * hostio.c (require_data): Free *data, not data.
10693
7e52cbd0
JK
106942011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10695
10696 * hostio.c (require_data): Use free, not xfree.
10697
9130f83e
MS
106982011-02-27 Michael Snyder <msnyder@vmware.com>
10699
4b812f4e
MS
10700 * server.c (handle_query): Discard unused value.
10701
9130f83e
MS
10702 * hostio.c (require_data): Free malloc memory before returning
10703 error.
10704
69d37113
MS
107052011-02-26 Michael Snyder <msnyder@vmware.com>
10706
10707 * linux-low.c (list_threads): Call closedir for dirent.
10708
35f5825a
MS
107092011-02-27 Michael Snyder <msnyder@vmware.com>
10710
2a589cef
MS
10711 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10712 a case statement falls through.
10713
0adea5f7
MS
10714 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10715
35f5825a
MS
10716 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10717 in comparison.
10718
238f1c74
MS
107192011-02-26 Michael Snyder <msnyder@vmware.com>
10720
10721 * utils.c (decimal2str): Eliminate dead code and dead param.
10722 (pulongest): Drop dead param from call to decimal2str.
10723 (plongest): Ditto.
10724
633ff500
JB
107252011-02-24 Joel Brobecker <brobecker@adacore.com>
10726
10727 Revert the following patch (not approved yet):
10728 2011-02-21 Hui Zhu <teawater@gmail.com>
10729 * tracepoint.c (tp_printf): New function.
10730 (eval_agent_expr): Handle gdb_agent_op_printf.
10731
f9c6ff72
HZ
107322011-02-21 Hui Zhu <teawater@gmail.com>
10733
10734 * tracepoint.c (tp_printf): New function.
10735 (eval_agent_expr): Handle gdb_agent_op_printf.
10736
94d5e490
TT
107372011-02-18 Tom Tromey <tromey@redhat.com>
10738
10739 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10740 (tracepoint.o): Likewise.
10741 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10742 (gdb_agent_op_names): Likewise.
10743
c7f96d2b
TT
107442011-02-18 Tom Tromey <tromey@redhat.com>
10745
10746 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10747 gdb_agent_op_rot>: New constants.
10748 (gdb_agent_op_names): Add pick and roll.
10749 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10750 cases.
10751
0feedb2c
JK
107522011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10753
10754 * aclocal.m4: Regenerated with aclocal-1.11.1.
10755
b3b9301e
PA
107562011-02-14 Pedro Alves <pedro@codesourcery.com>
10757
10758 * server.c (handle_qxfer_traceframe_info): New.
10759 (qxfer_packets): Register "traceframe-info".
10760 (handle_query): Report support for qXfer:traceframe-info:read+.
10761 * tracepoint.c (match_blocktype): New.
10762 (traceframe_find_block_type): Rename to ...
10763 (traceframe_walk_blocks): ... this. Add callback filter argument,
10764 and use it.
10765 (traceframe_find_block_type): New, reimplemented on top of
10766 traceframe_walk_blocks.
10767 (build_traceframe_info_xml): New.
10768 (traceframe_read_info): New.
10769 * server.h (traceframe_read_info): Declare.
10770
4f3e6fb7
YQ
107712011-02-11 Yao Qi <yao@codesourcery.com>
10772
10773 * configure.ac: Call AC_PROG_RANLIB.
10774 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10775 * configure: Regenerate.
10776
764880b7
PA
107772011-02-07 Pedro Alves <pedro@codesourcery.com>
10778
10779 * server.c (gdb_read_memory): Change return semantics to allow
10780 partial transfers.
10781 (handle_search_memory_1): Adjust.
10782 (process_serial_event) <'m' packet>: Handle partial transfers.
10783 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10784
1c79eb8a
PA
107852011-01-28 Pedro Alves <pedro@codesourcery.com>
10786
10787 * regcache.c (init_register_cache): Initialize
10788 regcache->register_status.
10789 (free_register_cache): Release regcache->register_status.
10790 (regcache_cpy): Copy register_status.
10791 (registers_to_string): Print 'x's for unavailable registers.
10792 (supply_register): Mark the register's status valid or
10793 unavailable, depending on whether a buffer was passed in or not.
10794 (supply_register_zeroed): New.
10795 (supply_regblock): Mark the registers' status valid or
10796 unavailable, depending on whether a buffer was passed in or not.
10797 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10798 (struct regcache): New `register_status' field.
10799 (supply_register_zeroed): Declare.
10800 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10801 supply_register_zeroed, rather than passing a NULL buffer to
10802 supply_register.
10803 * tracepoint.c (fetch_traceframe_registers): Update comment.
10804
85724a0e
PA
108052011-01-28 Pedro Alves <pedro@codesourcery.com>
10806
10807 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10808 buffer explicit.
10809
d08aafef
PA
108102011-01-25 Pedro Alves <pedro@codesourcery.com>
10811
10812 * server.h (decode_xfer_write): Change prototype.
10813 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10814 and don't extract the annex here.
10815 * server.c (decode_xfer_read): Remove `annex' parameter,
10816 and don't extract the annex here.
10817 (decode_xfer): New.
10818 (struct qxfer): New.
10819 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10820 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10821 (handle_qxfer_statictrace): New functions, abstracted out from
10822 handle_query, and made to use the struct qxfer interface.
10823 (handle_threads_qxfer_proper): Rename to ...
10824 (handle_qxfer_threads_proper): ... this.
10825 (handle_threads_qxfer): Rename to ...
10826 (handle_qxfer_threads): ... this. Adjust.
10827 (qxfer_packets): New array.
10828 (handle_qxfer): New function.
10829 (handle_query): Use handle_qxfer.
10830
493e2a69
MS
108312011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10832
10833 * gdbreplay.c: Shorten lines of >= 80 columns.
10834 * linux-low.c: Ditto.
10835 * linux-ppc-low.c: Ditto.
10836 * linux-s390-low.c: Ditto.
10837 * linux-sparc-low.c: Ditto.
10838 * linux-x86-low.c: Ditto.
10839 * linux-xtensa-low.c: Ditto.
10840 * mem-break.c: Ditto.
10841 * nto-low.c: Ditto.
10842 * regcache.h: Ditto.
10843 * remote-utils.c: Ditto.
10844 * server.c: Ditto.
10845 * server.h: Ditto.
10846 * thread-db.c: Ditto.
10847 * tracepoint.c: Ditto.
10848 * utils.c: Ditto.
10849 * win32-low.h: Ditto.
10850
44944448
JB
108512011-01-05 Joel Brobecker <brobecker@adacore.com>
10852
10853 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10854 update.
10855
71ce852c
JB
108562011-01-01 Joel Brobecker <brobecker@adacore.com>
10857
10858 * server.c (gdbserver_version): Update copyright year in version
10859 output.
10860 * gdbreplay.c (gdbreplay_version): Ditto.
10861
eb826dc6
MF
108622010-12-29 Jie Zhang <jie.zhang@analog.com>
10863
10864 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10865 * linux-bfin-low.c: New file.
10866 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10867 PT_DATA_ADDR for BFIN targets.
10868 * Makefile.in (SFILES): Add linux-bfin-low.c.
10869 (clean): Remove reg-bfin.c.
10870 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10871 * README: Mention supported Blackfin targets.
10872
39ab222a
MF
108732010-12-23 Mike Frysinger <vapier@gentoo.org>
10874
10875 * .gitignore: New file.
10876
a1f2ce7d
MF
108772010-11-16 Mike Frysinger <vapier@gentoo.org>
10878
10879 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10880
f474844c
JZ
108812010-10-22 Jie Zhang <jie@codesourcery.com>
10882
10883 * Makefile.in: Add FLAGS_TO_PASS variable.
10884 (install): Remove dependency of install-only and recursively
10885 invoke make for install-only.
10886
f1048712
DE
108872010-10-04 Doug Evans <dje@google.com>
10888
10889 * Makefile.in (uninstall): Use $(DESTDIR).
10890
b53a1623
PA
108912010-09-24 Pedro Alves <pedro@codesourcery.com>
10892
e6ee044d
PA
10893 PR gdb/11842
10894
b53a1623
PA
10895 * linux-x86-low.c (compat_siginfo_from_siginfo)
10896 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10897 si_code is < 0. Check for si_code == SI_TIMER before checking for
10898 si_code < 0.
10899
fa1bd1e4
JB
109002010-09-13 Joel Brobecker <brobecker@adacore.com>
10901
10902 * lynx-i386-low.c: New file.
10903 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10904
47fac8f8
JB
109052010-09-13 Joel Brobecker <brobecker@adacore.com>
10906
10907 * lynx-low.c (ptrace_request_to_str): Remove handling for
10908 request values that have been removed in LynxOS 5.x.
10909
1adfc54d
JB
109102010-09-13 Joel Brobecker <brobecker@adacore.com>
10911
10912 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10913 <ptrace.h>
10914
c2a66c29
NS
109152010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10916
10917 * configure.ac: Add --enable-inprocess-agent option.
10918 * configure: Rebuilt.
10919
32fcada3
YQ
109202010-09-06 Yao Qi <yao@codesourcery.com>
10921
10922 * linux-low.c (linux_kill): Remove unused variable.
10923 (linux_stabilize_threads): Likewise.
10924 * server.c (start_inferior): Likewise.
10925 (queue_stop_reply_callback): Likewise.
10926 * tracepoint.c (do_action_at_tracepoint): Likewise.
10927
0cccb683
YQ
109282010-09-06 Yao Qi <yao@codesourcery.com>
10929
10930 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10931 on return.
10932
423ec54c
JK
109332010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10934
10935 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10936
12ac6819
PA
109372010-09-06 Pedro Alves <pedro@codesourcery.com>
10938
10939 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10940 "$(IPA_DEPFILES)".
10941
8ed54b31
JB
109422010-09-01 Joel Brobecker <brobecker@adacore.com>
10943
10944 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10945 gdbserver/lynx-ppc-low.c: New files.
10946 * Makefile.in (lynx_low_h): New variable.
10947 (lynx-low.o, lynx-ppc-low.o): New rules.
10948 * configure.ac: On LynxOS, link with -lnetinet.
10949 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10950 * configure: regenerate.
10951
bb0116a4
JB
109522010-09-01 Joel Brobecker <brobecker@adacore.com>
10953
10954 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10955 * configure.ac: Add check for vasprintf and vsnprintf.
10956 * configure, config.in: Regenerate.
10957 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10958
a778ab81 109592010-09-01 Joel Brobecker <brobecker@adacore.com>
10960
10961 * gdbreplay.c: Move include of alloca.h up, next to include of
10962 malloc.h.
10963 * server.h: Add include of malloc.h.
10964 * mem-break.c: Remove include of malloc.h.
10965 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10966
8b034a19 109672010-09-01 Joel Brobecker <brobecker@adacore.com>
10968
10969 * Makefile.in (memmem.o): Build with -Wno-error.
10970
109712010-09-01 Joel Brobecker <brobecker@adacore.com>
10972
10973 * utils.c (xsnprintf): Make non-static.
10974 * server.h: Add xsnprintf declaration.
10975 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10976 replace calls to snprintf by calls to xsnprintf throughout.
10977
109782010-09-01 Joel Brobecker <brobecker@adacore.com>
10979
10980 * configure.ac: Add configure check for alloca.
10981 * configure, config.in: Regenerate.
10982 * server.h: Include alloca.h if it exists.
10983 * gdbreplay.c: Include alloca.h if it exists.
10984
1a981360
PA
109852010-08-28 Pedro Alves <pedro@codesourcery.com>
10986
10987 * linux-low.c (__SIGRTMIN): Define if not already defined.
10988 (linux_create_inferior): Check for __ANDROID__ rather than
10989 __SIGRTMIN.
10990 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10991 are already deferred.
10992 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10993 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10994 stopped and already has a pending signal to report.
10995 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10996 a pending signal to report or is moving out of a jump pad.
10997 (linux_init_signals): Check for __ANDROID__ rather than
10998 __SIGRTMIN.
10999
b4d51a55
PA
110002010-08-28 Pedro Alves <pedro@codesourcery.com>
11001
11002 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11003 debug_threads check. Avoid a linear search when not doing debug
11004 output.
11005
ec48365d
PA
110062010-08-27 Pedro Alves <pedro@codesourcery.com>
11007
11008 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11009 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11010 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11011 (process_event): Change local fd's type to gdb_fildes_t.
11012 (create_file_handler): Adjust prototype.
11013 (delete_file_handler): Adjust prototype.
11014 (handle_file_event): Adjust prototype. Use pfildes.
11015 (create_file_event): Adjsut prototype.
11016 * remote-utils.c (remote_desc, listen_desc): Change type to
11017 gdb_fildes_t.
11018 * server.h: New gdb_fildes_t typedef.
11019 [USE_WIN32API]: Include winsock2.h.
11020 (delete_file_handler, add_file_handler): Adjust prototypes.
11021 (pfildes): Declare.
11022 * utils.c (pfildes): New.
11023
854d88f0
PA
110242010-08-27 Pedro Alves <pedro@codesourcery.com>
11025
11026 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11027 * configure: Regenerate.
11028
0146f85b
PA
110292010-08-27 Pedro Alves <pedro@codesourcery.com>
11030
11031 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11032 (linux_done_accessing_memory): ... this.
11033 (linux_target_ops): Adjust.
11034 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11035 * nto-low.c (nto_target_ops): Adjust comment.
11036 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11037 * spu-low.c (spu_target_ops): Adjust comment.
11038 * target.h (target_ops): Rename unprepare_to_access_memory field
11039 to done_accessing_memory.
11040 (unprepare_to_access_memory): Rename to ...
11041 (done_accessing_memory): ... this.
11042
90d74c30
PA
110432010-08-26 Pedro Alves <pedro@codesourcery.com>
11044
11045 * linux-low.c (linux_prepare_to_access_memory): New.
11046 (linux_unprepare_to_access_memory): New.
11047 (linux_target_ops): Install them.
11048 * server.c (read_memory): Rename to ...
11049 (gdb_read_memory): ... this. Use
11050 prepare_to_access_memory/prepare_to_access_memory.
11051 (write_memory): Rename to ...
11052 (gdb_write_memory): ... this. Use
11053 prepare_to_access_memory/prepare_to_access_memory.
11054 (handle_search_memory_1): Adjust.
11055 (process_serial_event): Adjust.
11056 * target.h (struct target_ops): New fields
11057 prepare_to_access_memory and unprepare_to_access_memory.
11058 (prepare_to_access_memory, unprepare_to_access_memory): New.
11059 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11060 prepare_to_access_memory/prepare_to_access_memory.
11061 * nto-low.c (nto_target_ops): Adjust.
11062 * spu-low.c (spu_target_ops): Adjust.
11063 * win32-low.c (win32_target_ops): Adjust.
11064
fd467969
PA
110652010-08-26 Pedro Alves <pedro@codesourcery.com>
11066
11067 * Makefile.in (WARN_CFLAGS): Get it from configure.
11068 (WERROR_CFLAGS): New.
11069 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11070 * configure.ac: Introduce --enable-werror, which adds -Werror to
11071 the compiler command line. Enabled by default. Disable with
11072 --disable-werror. Add -Wdeclaration-after-statement
11073 Wpointer-arith and -Wformat-nonliteral to warning flags.
11074 * configure: Regenerate.
11075
331e2f5f
PA
110762010-08-26 Pedro Alves <pedro@codesourcery.com>
11077
11078 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11079
e581f2b4
PA
110802010-08-26 Pedro Alves <pedro@codesourcery.com>
11081
11082 * gdbreplay.c (remote_error): New.
11083 (gdbchar): New.
11084 (expect): Use gdbchar. Check for error reading from GDB.
11085 Clarify sync error output.
11086 (play): Check for errors writing to GDB.
11087 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11088 * remote-utils.c (getpkt): Check for errors writing to the remote
11089 descriptor.
11090
3c11dd79
PA
110912010-08-25 Pedro Alves <pedro@codesourcery.com>
11092
11093 * linux-low.c (linux_wait_1): Move non-debugging code out of
11094 `debug_threads' control.
11095
d20a8ad9
PA
110962010-08-25 Pedro Alves <pedro@codesourcery.com>
11097
11098 * linux-low.c (linux_wait_1): Don't set last_status here.
11099 * server.c (push_event, queue_stop_reply_callback): Assert we're
11100 not pushing a TARGET_WAITKIND_IGNORE event.
11101 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11102 (myresume, handle_target_event): Set the thread's last_resume_kind
11103 and last_status from the target returned status.
11104
964e4306
PA
111052010-08-25 Pedro Alves <pedro@codesourcery.com>
11106
11107 PR threads/10729
11108
11109 * linux-x86-low.c (update_debug_registers_callback): New.
11110 (i386_dr_low_set_addr): Use it.
11111 (i386_dr_low_get_addr): New.
11112 (i386_dr_low_set_control): Use update_debug_registers_callback.
11113 (i386_dr_low_get_control): New.
11114 (i386_dr_low_get_status): Adjust.
11115 * linux-low.c (linux_stop_lwp): New.
11116 * linux-low.h (linux_stop_lwp): Declare.
11117
11118 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11119 argument instead of a i386_debug_reg_state.
11120 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11121 a i386_debug_reg_state.
11122 (i386_insert_aligned_watchpoint): Adjust.
11123 (i386_remove_aligned_watchpoint): Adjust.
11124 (i386_low_stopped_data_address): Read the debug registers from the
11125 inferior instead of from the mirrors.
11126 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11127 (i386_dr_low_get_addr): Declare.
11128 (i386_dr_low_get_control): Declare.
11129 (i386_dr_low_get_status): Change prototype.
11130
11131 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11132 (i386_dr_low_get_addr): New.
11133 (i386_dr_low_get_control): New.
11134 (i386_dr_low_get_status): Adjust prototype. Return
11135 dr_status_mirror.
11136 (i386_initial_stuff): Clear dr_status_mirror and
11137 dr_control_mirror.
11138 (i386_get_thread_context): Adjust.
11139 (i386_set_thread_context): Adjust.
11140 (i386_thread_added): Adjust.
11141
5f21a75b
PA
111422010-08-24 Pedro Alves <pedro@codesourcery.com>
11143
11144 * linux-low.h (linux_thread_area): Delete declaration.
11145
3e4c1235
TS
111462010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11147
11148 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11149 after its termination.
11150
1971b033
PA
111512010-08-09 Pedro Alves <pedro@codesourcery.com>
11152
11153 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11154 (gdb_wants_all_stopped): Delete.
11155 (linux_wait_1): Don't call them.
11156 * server.c (handle_v_cont): Tag all threads as want-stopped.
11157 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11158 stopped as "client-wants-stopped".
11159
310444ac
PA
111602010-07-31 Pedro Alves <pedro@codesourcery.com>
11161
11162 * Makefile.in (signals_h): New.
11163 (server_h): Depend on it.
11164 (server.o): Don't depend on $(signals_def).
11165 (signals.o): Depend on $(signals_def).
11166
a19cae16
JK
111672010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11168
11169 * Makefile.in (signals_def): New.
11170 (server_h): Append include/gdb/signals.h and signals_def.
11171 (server.o): Append signals_def.
11172
30d50328
JK
111732010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11174
11175 * server.c (handle_target_event): Use target_signal_to_host for
11176 resume_info.sig initialization.
11177 * target.h (struct thread_resume) <sig>: New comment.
11178
5c3216e2
OS
111792010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11180
c6f46ca0
OS
11181 * server.c (handle_query): strcpy() the returned string from paddress()
11182 instead of sprintf().
5c3216e2
OS
11183 * utils.c (paddress): Return phex_nz().
11184
6bd31874
JB
111852010-07-07 Joel Brobecker <brobecker@adacore.com>
11186
11187 * server.c (handle_v_cont): Call mourn_inferior if process
11188 just exited.
11189 (myresume): Likewise.
11190
0fb4aa4b
PA
111912010-07-01 Pedro Alves <pedro@codesourcery.com>
11192
11193 Static tracepoints, and integration with UST.
11194
11195 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11196 * mem-break.c (uninsert_all_breakpoints)
11197 (reinsert_all_breakpoints): New.
11198 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11199 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11200 (gdb_agent_ust_loaded, helper_thread_id)
11201 (gdb_agent_helper_thread_id): New macros.
11202 (struct ipa_sym_addresses): Add addr_ust_loaded,
11203 addr_helper_thread_id, addr_cmd_buf.
11204 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11205 (in_process_agent_loaded_ust): New.
11206 (write_e_ust_not_loaded): New.
11207 (maybe_write_ipa_ust_not_loaded): New.
11208 (struct collect_static_trace_data_action): New.
11209 (enum tracepoint_type) <static_tracepoint>: New.
11210 (struct tracepoint) <handle>: Mention static tracepoints.
11211 (struct static_tracepoint_ctx): New.
11212 (CMD_BUF_SIZE): New.
11213 (add_tracepoint_action): Handle static tracepoint actions.
11214 (unprobe_marker_at): New.
11215 (clear_installed_tracepoints): Handle static tracepoints.
11216 (cmd_qtdp): Handle static tracepoints.
11217 (probe_marker_at): New.
11218 (cmd_qtstart): Handle static tracepoints.
11219 (response_tracepoint): Handle static tracepoints.
11220 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11221 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11222 (get_context_regcache): Handle static tracepoints.
11223 (do_action_at_tracepoint): Handle static tracepoint actions.
11224 (traceframe_find_block_type): Handle static trace data blocks.
11225 (traceframe_read_sdata): New.
11226 (download_tracepoints): Download static tracepoint actions.
11227 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11228 (GDB_PROBE_NAME): New.
11229 (ust_ops): New.
11230 (GET_UST_SYM): New.
11231 (USTF): New.
11232 (dlsym_ust): New.
11233 (ust_marker_to_static_tracepoint): New.
11234 (gdb_probe): New.
11235 (collect_ust_data_at_tracepoint): New.
11236 (gdb_ust_probe): New.
11237 (UNIX_PATH_MAX, SOCK_DIR): New.
11238 (gdb_ust_connect_sync_socket): New.
11239 (resume_thread, stop_thread): New.
11240 (run_inferior_command): New.
11241 (init_named_socket): New.
11242 (gdb_ust_socket_init): New.
11243 (cstr_to_hexstr): New.
11244 (next_st): New.
11245 (first_marker, next_marker): New.
11246 (response_ust_marker): New.
11247 (cmd_qtfstm, cmd_qtsstm): New.
11248 (unprobe_marker_at, probe_marker_at): New.
11249 (cmd_qtstmat, gdb_ust_thread): New.
11250 (gdb_ust_init): New.
11251 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11252 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11253 (ST_REGENTRY): New.
11254 (x86_64_st_collect_regmap): New.
11255 (X86_64_NUM_ST_COLLECT_GREGS): New.
11256 (AMD64_RIP_REGNUM): New.
11257 (supply_static_tracepoint_registers): New.
11258 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11259 (ST_REGENTRY): New.
11260 (i386_st_collect_regmap): New.
11261 (i386_NUM_ST_COLLECT_GREGS): New.
11262 (supply_static_tracepoint_registers): New.
11263 * server.c (handle_query): Handle qXfer:statictrace:read.
11264 <qSupported>: Report support for StaticTracepoints, and
11265 qXfer:statictrace:read features.
11266 * server.h (traceframe_read_sdata)
11267 (supply_static_tracepoint_registers): Declare.
11268 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11269 (unpack_varlen_hex): Include in IPA build.
11270 * Makefile.in (ustlibs, ustinc): New.
11271 (IPA_OBJS): Add remote-utils-ipa.o.
11272 ($(IPA_LIB)): Link -ldl and -lpthread.
11273 (UST_CFLAGS): New.
11274 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11275 * config.in, configure: Regenerate.
11276
9e4344e5
PA
112772010-06-20 Ian Lance Taylor <iant@google.com>
11278 Pedro Alves <pedro@codesourcery.com>
11279
11280 * linux-x86-low.c (always_true): Delete.
11281 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11282 trying to fool the compiler with always_true.
11283
c6beb2cb
PA
112842010-06-20 Pedro Alves <pedro@codesourcery.com>
11285
11286 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11287 conditions in gdbserver.
11288
d2ed6730
UW
112892010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11290
11291 * spu-low.c (spu_read_memory): Wrap around local store limit.
11292 (spu_write_memory): Likewise.
11293
4e29fb54
PA
112942010-06-15 Pedro Alves <pedro@codesourcery.com>
11295
11296 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11297 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11298 LONGEST uses.
11299 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11300 uses.
11301 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11302 uses with LONGEST uses.
11303
6a271cae
PA
113042010-06-14 Stan Shebs <stan@codesourcery.com>
11305 Pedro Alves <pedro@codesourcery.com>
11306
11307 Bytecode compiler.
11308
11309 * linux-x86-low.c: Include limits.h.
11310 (add_insns): New.
11311 (always_true): New.
11312 (EMIT_ASM): New.
11313 (EMIT_ASM32): New.
11314 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11315 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11316 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11317 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11318 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11319 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11320 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11321 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11322 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11323 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11324 (amd64_emit_void_call_2): New.
11325 (amd64_emit_ops): New.
11326 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11327 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11328 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11329 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11330 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11331 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11332 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11333 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11334 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11335 (i386_emit_stack_adjust, i386_emit_int_call_1)
11336 (i386_emit_void_call_2): New.
11337 (i386_emit_ops): New.
11338 (x86_emit_ops): New.
11339 (the_low_target): Install x86_emit_ops.
11340 * server.h (struct emit_ops): New.
11341 (get_raw_reg_func_addr): Declare.
11342 (current_insn_ptr, emit_error): Declare.
11343 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11344 (set_trace_state_variable_value): New defines.
11345 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11346 addr_get_trace_state_variable_value and
11347 addr_set_trace_state_variable_value.
11348 (symbol_list): New fields for get_raw_reg,
11349 get_trace_state_variable_value and set_trace_state_variable_value.
11350 (condfn): New typedef.
11351 (struct tracepoint): New field `compiled_cond'.
11352 (do_action_at_tracepoint): Clear compiled_cond.
11353 (get_trace_state_variable_value, set_trace_state_variable_value):
11354 Export in the IPA.
11355 (condition_true_at_tracepoint): If there's a compiled condition,
11356 run that.
11357 (current_insn_ptr, emit_error): New globals.
11358 (struct bytecode_address): New.
11359 (get_raw_reg_func_addr): New.
11360 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11361 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11362 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11363 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11364 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11365 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11366 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11367 (compile_tracepoint_condition, compile_bytecodes): New.
11368 * target.h (emit_ops): Forward declare.
11369 (struct target_ops): New field emit_ops.
11370 (target_emit_ops): New.
11371 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11372 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11373 * linux-low.c (linux_emit_ops): New.
11374 (linux_target_ops): Install it.
11375 * linux-low.h (struct linux_target_ops): New field emit_ops.
11376
92b72907
UW
113772010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11378
11379 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11380 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11381
fa593d66
PA
113822010-06-01 Pedro Alves <pedro@codesourcery.com>
11383 Stan Shebs <stan@codesourcery.com>
11384
11385 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11386 (all): Depend on $(extra_libraries).
11387 (install-only): Install the IPA.
11388 (IPA_OBJS, IPA_LIB): New.
11389 (clean): Remove the IPA lib.
11390 (IPAGENT_CFLAGS): New.
11391 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11392 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11393 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11394 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11395 * configure.ac: Check for atomic builtins support in the compiler.
11396 (IPA_DEPFILES, extra_libraries): Define.
11397 * configure.srv (ipa_obj): Add description.
11398 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11399 (i[34567]86-*-linux*): Set ipa_obj.
11400 (x86_64-*-linux*): Set ipa_obj.
11401 * linux-low.c (stabilizing_threads): New.
11402 (supports_fast_tracepoints): New.
11403 (linux_detach): Stabilize threads before detaching.
11404 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11405 the lwp is either not stabilizing, or is moving out of a jump pad.
11406 (linux_fast_tracepoint_collecting): New.
11407 (maybe_move_out_of_jump_pad): New.
11408 (enqueue_one_deferred_signal): New.
11409 (dequeue_one_deferred_signal): New.
11410 (linux_wait_for_event_1): If moving out of a jump pad, defer
11411 pending signals to later.
11412 (linux_stabilize_threads): New.
11413 (linux_wait_1): Check if threads need moving out of jump pads, and
11414 do it if so.
11415 (stuck_in_jump_pad_callback): New.
11416 (move_out_of_jump_pad_callback): New.
11417 (lwp_running): New.
11418 (linux_resume_one_lwp): Handle moving out of jump pads.
11419 (linux_set_resume_request): Dequeue deferred signals.
11420 (need_step_over_p): Also step over fast tracepoint jumps.
11421 (start_step_over): Also uninsert fast tracepoint jumps.
11422 (finish_step_over): Also reinsert fast tracepoint jumps.
11423 (linux_install_fast_tracepoint_jump): New.
11424 (linux_target_ops): Install linux_stabilize_threads and
11425 linux_install_fast_tracepoint_jump_pad.
11426 * linux-low.h (linux_target_ops) <get_thread_area,
11427 install_fast_tracepoint_jump_pad>: New fields.
11428 (struct lwp_info) <collecting_fast_tracepoint,
11429 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11430 (linux_get_thread_area): Declare.
11431 * linux-x86-low.c (jump_insn): New.
11432 (x86_get_thread_area): New.
11433 (append_insns): New.
11434 (push_opcode): New.
11435 (amd64_install_fast_tracepoint_jump_pad): New.
11436 (i386_install_fast_tracepoint_jump_pad): New.
11437 (x86_install_fast_tracepoint_jump_pad): New.
11438 (the_low_target): Install x86_get_thread_area and
11439 x86_install_fast_tracepoint_jump_pad.
11440 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11441 (struct fast_tracepoint_jump): New.
11442 (fast_tracepoint_jump_insn): New.
11443 (fast_tracepoint_jump_shadow): New.
11444 (find_fast_tracepoint_jump_at): New.
11445 (fast_tracepoint_jump_here): New.
11446 (delete_fast_tracepoint_jump): New.
11447 (set_fast_tracepoint_jump): New.
11448 (uninsert_fast_tracepoint_jumps_at): New.
11449 (reinsert_fast_tracepoint_jumps_at): New.
11450 (set_breakpoint_at): Use write_inferior_memory.
11451 (uninsert_raw_breakpoint): Use write_inferior_memory.
11452 (check_mem_read): Mask out fast tracepoint jumps.
11453 (check_mem_write): Mask out fast tracepoint jumps.
11454 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11455 (set_fast_tracepoint_jump): Declare.
11456 (delete_fast_tracepoint_jump)
11457 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11458 (reinsert_fast_tracepoint_jumps_at): Declare.
11459 * regcache.c: Don't compile many functions when building the
11460 in-process agent library.
11461 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11462 the register buffer in the heap.
11463 (free_register_cache): If the register buffer isn't owned by the
11464 regcache, don't free it.
11465 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11466 pre-existing register caches.
11467 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11468 type.
11469 (convert_ascii_to_int): : Constify `from' parameter type.
11470 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11471 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11472 the needed buffer in-place.
11473 (relocate_instruction): New.
11474 * server.c (handle_query) <qSymbols>: If the target supports
11475 tracepoints, give it a chance of looking up symbols. Report
11476 support for fast tracepoints.
11477 (handle_status): Stabilize threads.
11478 (process_serial_event): Adjust.
11479 * server.h (struct fast_tracepoint_jump): Forward declare.
11480 (struct process_info) <fast_tracepoint_jumps>: New field.
11481 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11482 (decode_X_packet, decode_M_packet): Adjust.
11483 (relocate_instruction): Declare.
11484 (in_process_agent_loaded): Declare.
11485 (tracepoint_look_up_symbols): Declare.
11486 (struct fast_tpoint_collect_status): Declare.
11487 (fast_tracepoint_collecting): Declare.
11488 (force_unlock_trace_buffer): Declare.
11489 (handle_tracepoint_bkpts): Declare.
11490 (initialize_low_tracepoint)
11491 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11492 * target.h (struct target_ops) <stabilize_threads,
11493 install_fast_tracepoint_jump_pad>: New fields.
11494 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11495 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11496 [HAVE_STDINT_H]: Include stdint.h.
11497 (trace_debug_1): Rename to ...
11498 (trace_vdebug): ... this.
11499 (trace_debug): Rename to ...
11500 (trace_debug_1): ... this. Add `level' parameter.
11501 (trace_debug): New.
11502 (ATTR_USED, ATTR_NOINLINE): New.
11503 (IP_AGENT_EXPORT): New.
11504 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11505 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11506 (about_to_request_buffer_space, trace_buffer_is_full)
11507 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11508 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11509 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11510 (traceframe_write_count, traceframes_created)
11511 (trace_state_variables)
11512 New renaming defines.
11513 (struct ipa_sym_addresses): New.
11514 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11515 (symbol_list): New.
11516 (ipa_sym_addrs): New.
11517 (all_tracepoint_symbols_looked_up): New.
11518 (in_process_agent_loaded): New.
11519 (write_e_ipa_not_loaded): New.
11520 (maybe_write_ipa_not_loaded): New.
11521 (tracepoint_look_up_symbols): New.
11522 (debug_threads) [IN_PROCESS_AGENT]: New.
11523 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11524 (UNKNOWN_SIDE_EFFECTS): New.
11525 (stop_tracing): New.
11526 (flush_trace_buffer): New.
11527 (stop_tracing_bkpt): New.
11528 (flush_trace_buffer_bkpt): New.
11529 (read_inferior_integer): New.
11530 (read_inferior_uinteger): New.
11531 (read_inferior_data_pointer): New.
11532 (write_inferior_data_pointer): New.
11533 (write_inferior_integer): New.
11534 (write_inferior_uinteger): New.
11535 (struct collect_static_trace_data_action): Delete.
11536 (enum tracepoint_type): New.
11537 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11538 <actions_str, step_actions, step_actions_str>: Only include in
11539 GDBserver.
fa593d66
PA
11540 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11541 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11542 (tracepoints): Use IP_AGENT_EXPORT.
11543 (last_tracepoint): Don't include in the IPA.
11544 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11545 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11546 (alloced_trace_state_variables): New.
11547 (trace_state_variables): Use IP_AGENT_EXPORT.
11548 (traceframe_t): Delete unused variable.
11549 (circular_trace_buffer): Don't include in the IPA.
11550 (trace_buffer_start): Delete.
11551 (struct trace_buffer_control): New.
11552 (trace_buffer_free): Delete.
11553 (struct ipa_trace_buffer_control): New.
11554 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11555 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11556 New.
11557 (trace_buffer_ctrl): New.
11558 (TRACE_BUFFER_CTRL_CURR): New.
11559 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11560 Reimplement as macros.
11561 (trace_buffer_wrap): Delete.
11562 (traceframe_write_count, traceframe_read_count)
11563 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11564 (struct tracepoint_hit_ctx) <type>: New field.
11565 (struct fast_tracepoint_ctx): New.
11566 (memory_barrier): New.
11567 (cmpxchg): New.
11568 (record_tracepoint_error): Update atomically in the IPA.
11569 (clear_inferior_trace_buffer): New.
11570 (about_to_request_buffer_space): New.
11571 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11572 updating the same buffer.
11573 (add_tracepoint): Default the tracepoint's type to trap
11574 tracepoint, and orig_size to -1.
11575 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11576 internal variables.
11577 (create_trace_state_variable): New parameter `gdb'. Handle it.
11578 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11579 (cmd_qtdp): Handle fast tracepoints.
11580 (cmd_qtdv): Adjust.
11581 (max_jump_pad_size): New.
11582 (gdb_jump_pad_head): New.
11583 (get_jump_space_head): New.
11584 (claim_jump_space): New.
11585 (sort_tracepoints): New.
11586 (MAX_JUMP_SIZE): New.
11587 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11588 IPA.
11589 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11590 support. Upload fast traceframes, and delete internal IPA
11591 breakpoints.
11592 (stop_tracing_handler): New.
11593 (flush_trace_buffer_handler): New.
11594 (cmd_qtstop): Upload fast tracepoints.
11595 (response_tracepoint): Handle fast tracepoints.
11596 (tracepoint_finished_step): Upload fast traceframes. Set the
11597 tracepoint hit context's tracepoint type.
11598 (handle_tracepoint_bkpts): New.
11599 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11600 type. Add comment about fast tracepoints.
11601 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11602 non-existing action_str field.
11603 (get_context_regcache): Handle fast tracepoints.
11604 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11605 to the regcache.
11606 (fast_tracepoint_from_jump_pad_address): New.
11607 (fast_tracepoint_from_ipa_tpoint_address): New.
11608 (collecting_t): New.
11609 (force_unlock_trace_buffer): New.
11610 (fast_tracepoint_collecting): New.
11611 (collecting): New.
11612 (gdb_collect): New.
11613 (write_inferior_data_ptr): New.
11614 (target_tp_heap): New.
11615 (target_malloc): New.
11616 (download_agent_expr): New.
11617 (UALIGN): New.
11618 (download_tracepoints): New.
11619 (download_trace_state_variables): New.
11620 (upload_fast_traceframes): New.
11621 (IPA_FIRST_TRACEFRAME): New.
11622 (IPA_NEXT_TRACEFRAME_1): New.
11623 (IPA_NEXT_TRACEFRAME): New.
11624 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11625 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11626 (gdb_jump_pad_buffer_end): New.
11627 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11628 (initialize_tracepoint): Adjust.
11629 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11630 buffer. Initialize the low module.
11631 * utils.c (PREFIX, TOOLNAME): New.
11632 (malloc_failure): Use PREFIX.
11633 (error): In the IPA, an error causes an exit.
11634 (fatal, warning): Use PREFIX.
11635 (internal_error): Use TOOLNAME.
11636 (NUMCELLS): Increase to 10.
11637 * configure, config.in: Regenerate.
11638
d149dd1d
PA
116392010-06-01 Pedro Alves <pedro@codesourcery.com>
11640
11641 * server.c (handle_query) <qSupported>: Do two passes over the
11642 qSupported string to avoid nesting strtok.
11643
f6528abd
JK
116442010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11645
11646 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11647 (CDEPS): New.
11648 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11649 -Wl,--dynamic-list.
11650 * configure: Regenerate.
11651 * proc-service.list: New.
11652
ca2a87a0
JK
116532010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11654
11655 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11656 New comment.
11657
363a6e9f
OS
116582010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11659
11660 * gdbreplay.c (remote_open): Check error return from socket() call by
11661 its equality to -1 not by it being negative.
11662 * remote-utils.c (remote_open): Likewise.
11663
d23b6cb1
PA
116642010-05-23 Pedro Alves <pedro@codesourcery.com>
11665
11666 * config.h: Regenerate.
11667
28d3cf85
MK
116682010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11669
11670 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11671 doesn't provide PTRACE_GET_THREAD_AREA.
11672
fea36a59
MK
116732010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11674
11675 * linux-m68k-low.c: Include <asm/ptrace.h>
11676 (ps_get_thread_area): Implement.
11677
24b066ba
DE
116782010-05-03 Doug Evans <dje@google.com>
11679
11680 * event-loop.c (struct callback_event): New struct.
11681 (callback_list): New global.
11682 (append_callback_event, delete_callback_event): New functions.
11683 (process_callback): New function.
11684 (start_event_loop): Call it.
11685 * remote-utils.c (NOT_SCHEDULED): Define.
11686 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11687 moved out of readchar.
11688 (readchar): Rewrite. Call reschedule before returning.
11689 (reset_readchar): New function.
11690 (remote_close): Call it.
11691 (process_remaining, reschedule): New functions.
11692 * server.h (callback_handler_func): New typedef.
11693 (append_callback_event, delete_callback_event): Declare.
11694
9836d6ea
PA
116952010-05-03 Pedro Alves <pedro@codesourcery.com>
11696
11697 * proc-service.c (ps_pglobal_lookup): Use
11698 thread_db_look_up_one_symbol.
11699 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11700 parameter. Use it instead of all_symbols_looked_up.
11701 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11702 field.
11703 (all_symbols_looked_up): Don't declare.
11704 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11705 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11706 field.
11707 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11708 Set all_symbols_looked_up here.
11709 (thread_db_look_up_one_symbol): New.
11710 (thread_db_get_tls_address): Adjust.
11711 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11712 thread_db object on the heap, and tentatively set it in the
11713 process structure.
11714 (thread_db_init): Don't set all_symbols_looked_up here.
11715 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11716
7984d532
PA
117172010-05-03 Pedro Alves <pedro@codesourcery.com>
11718
11719 * linux-low.c (linux_kill, linux_detach): Adjust.
11720 (status_pending_p_callback): Remove redundant statement. Check
11721 for !TARGET_WAITIKIND_IGNORE, instead of
11722 TARGET_WAITKIND_STOPPED.
11723 (handle_tracepoints): Make sure LWP is locked. Adjust.
11724 (linux_wait_for_event_1): Adjust.
11725 (linux_cancel_breakpoints): New.
11726 (unsuspend_one_lwp): New.
11727 (unsuspend_all_lwps): New.
11728 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11729 (send_sigstop_callback): Change return type to int, add new
11730 `except' parameter and handle it.
11731 (suspend_and_send_sigstop_callback): New.
11732 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11733 pass them down. If SUSPEND, also increment the lwp's suspend
11734 count.
11735 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11736 (need_step_over_p): Don't consider suspended LWPs.
11737 (start_step_over): Adjust.
11738 (proceed_one_lwp): Change return type to int, add new `except'
11739 parameter and handle it.
11740 (unsuspend_and_proceed_one_lwp): New.
11741 (proceed_all_lwps): Use find_inferior instead of
11742 for_each_inferior.
11743 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11744 also decrement the suspend count of LWPs. Pass `except' down,
11745 instead of hacking its suspend count.
11746 (linux_pause_all): Add `freeze' parameter. Adjust.
11747 (linux_unpause_all): New.
11748 (linux_target_ops): Install linux_unpause_all.
11749 * server.c (handle_status): Adjust.
11750 * target.h (struct target_ops): New fields `unpause_all' and
11751 `cancel_breakpoints'. Add new parameter to `pause_all'.
11752 (pause_all): Add new `freeze' parameter.
11753 (unpause_all): New.
11754 (cancel_breakpoints): New.
11755 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11756 cancel breakpoints.
11757 (cmd_qtstart): Pause threads.
11758 (stop_tracing): Pause threads, and cancel breakpoints.
11759 * win32-low.c (win32_target_ops): Adjust.
11760
e471f25b
PA
117612010-05-03 Pedro Alves <pedro@codesourcery.com>
11762
11763 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11764 the inferior right away from here...
11765 (linux_wait_1): ... to here, and adjust to check the thread's
11766 last_resume_kind instead of the lwp's step or stop_expected flags.
11767
1915ef4f
PA
117682010-05-02 Pedro Alves <pedro@codesourcery.com>
11769
11770 * README: Use consistent `GDB' and `GDBserver' spellings.
11771
f9e39928
PA
117722010-05-02 Pedro Alves <pedro@codesourcery.com>
11773
11774 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11775 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11776 (linux_detach_one_lwp): Assume the lwp is stopped.
11777 (any_thread_of): Delete.
11778 (linux_detach): Stop all lwps here. Don't blindly delete all
11779 breakpoints.
11780 (delete_lwp_callback): New.
11781 (linux_mourn): Delete all lwps of the process that is gone.
11782 (linux_wait_1): Don't delete the last lwp of the process here.
11783 * mem-break.h (mark_breakpoints_out): Declare.
11784 * mem-break.c (mark_breakpoints_out): New.
11785 (free_all_breakpoints): Use it.
11786 * server.c (handle_target_event): If the process is gone, mark
11787 breakpoints out.
11788 * thread-db.c (struct thread_db) <create_bp>: New field.
11789 (thread_db_enable_reporting): Fix prototype. Store a thread event
11790 breakpoint reference in the thread_db struct.
11791 (thread_db_load_search): Clear the thread_db object.
11792 (try_thread_db_load_1): Ditto.
11793 (switch_to_process): New.
11794 (disable_thread_event_reporting): Use it.
11795 (remove_thread_event_breakpoints): New.
11796 (thread_db_detach, thread_db_mourn): Use it.
11797
1e7fc18c
PA
117982010-05-01 Pedro Alves <pedro@codesourcery.com>
11799
11800 * linux-low.c (linux_enable_event_reporting): New.
11801 (linux_wait_for_event_1, handle_extended_wait): Use it.
11802
02fc4de7
PA
118032010-04-30 Pedro Alves <pedro@codesourcery.com>
11804
11805 * linux-low.c (linux_kill_one_lwp, linux_kill)
11806 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11807 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11808 SIGSTOP even if the LWP is stopped.
11809 (send_sigstop_callback): New.
11810 (stop_all_lwps): Use send_sigstop_callback instead.
11811 (linux_resume_one_thread): Adjust.
11812 (proceed_one_lwp): Still proceed an LWP that the client has
11813 requested to stop, if we haven't reported it as stopped yet. Make
11814 sure that LWPs the client want stopped, have a pending SIGSTOP.
11815
bc3b5632
DE
118162010-04-26 Doug Evans <dje@google.com>
11817
ae1ada35
DE
11818 * server.c (handle_general_set): Make static.
11819
bc3b5632
DE
11820 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11821 Print received char after testing for error/eof instead of before.
11822 (input_interrupt): Tweak comment.
11823
65730243
DE
118242010-04-23 Doug Evans <dje@google.com>
11825
11826 * server.c (start_inferior): Print inferior argv if --debug.
11827
a8ae7dc0
AR
118282010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11829
11830 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11831 * nto-x86-low.c: Include server.h
11832
1c07cc19
PM
118332010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11834
11835 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11836 be consistent with other sources of this directory.
11837 (init_registers_amd64): Correct name of source file of this function
11838 in the comment.
11839
e0a61e09
PM
118402010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11841
11842 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11843 64-bit executables.
11844
54709339
PM
118452010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11846
11847 * win32-i386-low.c: Add 64-bit support.
11848 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11849 (init_registers_amd64): Declare.
11850 (mappings): Add 64-bit version of array.
11851 (init_windows_x86): New function.
11852 (the_low_target): Change init_arch field to init_windows_x86.
11853
e8f0053d
PM
118542010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11855
11856 * win32-low.c: Adapt to support also 64-bit architecture.
11857 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11858 (get_image_name): Use SIZE_T type for local variable `done'.
11859 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11860 (toolhelp_get_dll_name): Idem.
11861 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11862 Use uintptr_t typecast to avoid warning.
11863 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11864 (handle_exception): Use phex_nz to avoid warning.
11865 (win32_wait): Remove unused local variable `process'.
11866
c481e77e
PM
118672010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11868
11869 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11870 `amd64-avx.o'.
11871
12ea4b69
PM
118722010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11873
11874 * configure.ac: Use `ws2_32' library for srv_mingw.
11875 * configure: Regenerate.
11876 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11877 * remote-utils.c: Likewise.
11878
f6d1620c
L
118792010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11880
11881 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11882 if __x86_64__ is defined.
11883
8e642873
PM
118842010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11885
11886 * configure: Regenerate.
11887
711e434b
PM
118882010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11889
11890 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11891 * target.h (target_ops): New get_tib_address field.
11892 * win32-low.h (win32_thread_info): Add thread_local_base field.
11893 * win32-low.c (child_add_thread): Add tlb argument.
11894 Set thread_local_base field to TLB.
11895 (get_child_debug_event): Adapt to child_add_thread change.
11896 (win32_get_tib_address): New function.
11897 (win32_target_ops): Set get_tib_address field to
11898 win32_get_tib_address.
11899 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11900
505106cd
PA
119012010-04-12 Pedro Alves <pedro@codesourcery.com>
11902
505106cd
PA
11903 * linux-low.c (linux_mourn): Also remove the process.
11904 * server.c (handle_target_event): Don't remove the process here.
11905 * nto-low.c (nto_mourn): New.
11906 (nto_target_ops): Install it.
11907 * spu-low.c (spu_mourn): New.
11908 (spu_target_ops): Install it.
11909 * win32-low.c (win32_mourn): New.
11910 (win32_target_ops): Install it.
11911
e8470a06
PA
119122010-04-12 Pedro Alves <pedro@codesourcery.com>
11913
11914 * server.h (buffer_xml_printf): Remove redundant `;'.
11915
45ba0d02
PA
119162010-04-12 Pedro Alves <pedro@codesourcery.com>
11917
11918 * regcache.c (set_register_cache): Invalidate regcaches before
11919 changing the register cache layout.
11920 (regcache_invalidate_one): Allow a NULL regcache.
11921 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11922 regcaches before changing the register cache layout or the target
11923 regsets.
11924
59e04013
L
119252010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11926
11927 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11928 variable warning on Linux/x86-64.
11929
8336d594
PA
119302010-04-11 Pedro Alves <pedro@codesourcery.com>
11931
11932 GDBserver disconnected tracing support.
11933
11934 * linux-low.c (linux_remove_process): Delete.
11935 (add_lwp): Don't set last_resume_kind here.
11936 (linux_kill): Use `mourn'.
11937 (linux_detach): Use `thread_db_detach', and `mourn'.
11938 (linux_mourn): New.
11939 (linux_attach_lwp_1): Adjust comment.
11940 (linux_attach): last_resume_kind moved the thread_info; adjust.
11941 (status_pending_p_callback): Adjust.
11942 (linux_wait_for_event_1): Adjust.
11943 (count_events_callback, select_singlestep_lwp_callback)
11944 (select_event_lwp_callback, cancel_breakpoints_callback)
11945 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11946 (proceed_one_lwp): Adjust.
11947 (linux_async): Add debug output.
11948 (linux_thread_stopped): New.
11949 (linux_pause_all): New.
11950 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11951 linux_pause_all.
11952 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11953 (thread_db_free): Delete declaration.
11954 (thread_db_detach, thread_db_mourn): Declare.
11955 * thread-db.c (thread_db_init): Use thread_db_mourn.
11956 (thread_db_free): Delete, split in two.
11957 (disable_thread_event_reporting): New.
11958 (thread_db_detach): New.
11959 (thread_db_mourn): New.
11960
11961 * server.h (struct thread_info) <last_resume_kind>: New field.
11962 <attached>: Add comment.
11963 <gdb_detached>: New field.
11964 (handler_func): Change return type to int.
11965 (handle_serial_event, handle_target_event): Ditto.
11966 (gdb_connected): Declare.
11967 (tracing): Delete.
11968 (disconnected_tracing): Declare.
11969 (stop_tracing): Declare.
11970
11971 * server.c (handle_query) <qSupported>: Report support for
11972 disconnected tracing.
11973 (queue_stop_reply_callback): Account for running threads.
11974 (gdb_wants_thread_stopped): New.
11975 (gdb_wants_all_threads_stopped): New.
11976 (gdb_reattached_process): New.
11977 (handle_status): Clear the `gdb_detached' flag of all processes.
11978 In all-stop, stop all threads.
11979 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11980 (process_serial_event): If the remote connection breaks, or if an
11981 exit was forced with "monitor exit", force an event loop exit.
11982 Handle disconnected tracing on detach.
11983 (handle_serial_event): Adjust.
11984 (handle_target_event): If GDB isn't connected, forward events back
11985 to the inferior, unless the last process exited, in which case,
11986 exit gdbserver. Adjust interface.
11987
11988 * remote-utils.c (remote_open): Don't block in accept. Instead
11989 register an event loop source on the listen socket file
11990 descriptor. Refactor bits into ...
11991 (listen_desc): ... this new global.
11992 (gdb_connected): ... this new function.
11993 (enable_async_notification): ... this new function.
11994 (handle_accept_event): ... this new function.
11995 (remote_close): Clear remote_desc.
11996
11997 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11998
11999 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12000 New fields.
12001 (mourn_inferior): Define.
12002 (target_process_qsupported): Avoid the dangling else problem.
12003 (thread_stopped): Define.
12004 (pause_all): Define.
12005 (target_waitstatus_to_string): Declare.
12006 * target.c (target_waitstatus_to_string): New.
12007
12008 * tracepoint.c (tracing): Make extern.
12009 (disconnected_tracing): New.
12010 (stop_tracing): Make extern. Handle tracing stops due to GDB
12011 disconnecting.
12012 (cmd_qtdisconnected): New.
12013 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12014 (handle_tracepoint_general_set): Handle QTDisconnected.
12015
12016 * event-loop.c (event_handler_func): Change return type to int.
12017 (process_event): Bail out if the event handler wants the event
12018 loop to stop.
12019 (handle_file_event): Ditto.
12020 (start_event_loop): Bail out if the event handler wants the event
12021 loop to stop.
12022
12023 * nto-low.c (nto_target_ops): Adjust.
12024 * spu-low.c (spu_wait): Don't remove the process here.
12025 (spu_target_ops): Adjust.
12026 * win32-low.c (win32_wait): Don't remove the process here.
12027 (win32_target_ops): Adjust.
12028
5d267c4c
PA
120292010-04-11 Pedro Alves <pedro@codesourcery.com>
12030
12031 * regcache.c (realloc_register_cache): Invalidate inferior's
12032 regcache before recreating it.
12033
623ccd72
PA
120342010-04-09 Pedro Alves <pedro@codesourcery.com>
12035
12036 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12037
219f2f23
PA
120382010-04-09 Stan Shebs <stan@codesourcery.com>
12039 Pedro Alves <pedro@codesourcery.com>
12040
12041 * server.h (LONGEST): New.
12042 (struct thread_info) <while_stepping>: New field.
12043 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12044 Declare.
12045 (initialize_tracepoint, handle_tracepoint_general_set)
12046 (handle_tracepoint_query, tracepoint_finished_step)
12047 (tracepoint_was_hit, release_while_stepping_state_list):
12048 (current_traceframe): Declare.
12049 * server.c (handle_general_set): Handle tracepoint packets.
12050 (read_memory): New.
12051 (write_memory): New.
12052 (handle_search_memory_1): Use read_memory.
12053 (handle_query): Report support for conditional tracepoints, trace
12054 state variables, and tracepoint sources. Handle tracepoint
12055 queries.
12056 (main): Initialize the tracepoints module.
12057 (process_serial_event): Handle traceframe reads/writes.
12058
12059 * linux-low.c (handle_tracepoints): New.
12060 (linux_wait_1): Call it.
12061 (linux_resume_one_lwp): Handle while-stepping.
12062 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12063 (linux_target_ops): Install them.
12064 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12065 New field.
12066 * linux-x86-low.c (x86_supports_tracepoints): New.
12067 (the_low_target). Install it.
12068
12069 * mem-break.h (delete_breakpoint): Declare.
12070 * mem-break.c (delete_breakpoint): Make external.
12071
12072 * target.h (struct target_ops): Add `supports_tracepoints',
12073 `read_pc', and `write_pc' fields.
12074 (target_supports_tracepoints): Define.
12075 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12076 (phex_nz): New.
12077
12078 * regcache.h (struct regcache) <registers_owned>: New field.
12079 (init_register_cache, regcache_cpy): Declare.
12080 (regcache_read_pc, regcache_write_pc): Declare.
12081 (register_cache_size): Declare.
12082 (supply_regblock): Declare.
12083 * regcache.c (init_register_cache): New.
12084 (new_register_cache): Use it.
12085 (regcache_cpy): New.
12086 (register_cache_size): New.
12087 (supply_regblock): New.
12088 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 12089
219f2f23
PA
12090 * tracepoint.c: New.
12091
12092 * Makefile.in (OBS): Add tracepoint.o.
12093 (tracepoint.o): New rule.
12094
3a13a53b
L
120952010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12096
12097 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12098 (i386-mmx.o): New.
12099 (i386-mmx.c): Likewise.
12100 (i386-mmx-linux.o): Likewise.
12101 (i386-mmx-linux.c): Likewise.
12102
12103 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12104 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12105 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12106 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12107
12108 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12109 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12110 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12111
1570b33e
L
121122010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12113
12114 * Makefile.in (clean): Updated.
12115 (i386-avx.o): New.
12116 (i386-avx.c): Likewise.
12117 (i386-avx-linux.o): Likewise.
12118 (i386-avx-linux.c): Likewise.
12119 (amd64-avx.o): Likewise.
12120 (amd64-avx.c): Likewise.
12121 (amd64-avx-linux.o): Likewise.
12122 (amd64-avx-linux.c): Likewise.
12123
12124 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12125 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12126 (srv_amd64_regobj): Add amd64-avx.o.
12127 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12128 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12129 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12130 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12131 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12132 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12133 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12134
12135 * i387-fp.c: Include "i386-xstate.h".
12136 (i387_xsave): New.
12137 (i387_cache_to_xsave): Likewise.
12138 (i387_xsave_to_cache): Likewise.
12139 (x86_xcr0): Likewise.
12140
12141 * i387-fp.h (i387_cache_to_xsave): Likewise.
12142 (i387_xsave_to_cache): Likewise.
12143 (x86_xcr0): Likewise.
12144
12145 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12146 * linux-crisv32-low.c (target_regsets): Likewise.
12147 * linux-m68k-low.c (target_regsets): Likewise.
12148 * linux-mips-low.c (target_regsets): Likewise.
12149 * linux-ppc-low.c (target_regsets): Likewise.
12150 * linux-s390-low.c (target_regsets): Likewise.
12151 * linux-sh-low.c (target_regsets): Likewise.
12152 * linux-sparc-low.c (target_regsets): Likewise.
12153 * linux-xtensa-low.c (target_regsets): Likewise.
12154
12155 * linux-low.c: Include <sys/uio.h>.
12156 (regsets_fetch_inferior_registers): Support nt_type.
12157 (regsets_store_inferior_registers): Likewise.
12158 (linux_process_qsupported): New.
12159 (linux_target_ops): Add linux_process_qsupported.
12160
12161 * linux-low.h (regset_info): Add nt_type.
12162 (linux_target_ops): Add process_qsupported.
12163
12164 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12165 and <sys/uio.h>.
12166 (init_registers_i386_avx_linux): New.
12167 (init_registers_amd64_avx_linux): Likewise.
12168 (xmltarget_i386_linux_no_xml): Likewise.
12169 (xmltarget_amd64_linux_no_xml): Likewise.
12170 (PTRACE_GETREGSET): Likewise.
12171 (PTRACE_SETREGSET): Likewise.
12172 (x86_fill_xstateregset): Likewise.
12173 (x86_store_xstateregset): Likewise.
12174 (use_xml): Likewise.
12175 (x86_linux_update_xmltarget): Likewise.
12176 (x86_linux_process_qsupported): Likewise.
12177 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12178 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12179 init_registers_i386_linux here. Call
12180 x86_linux_update_xmltarget.
12181 (the_low_target): Add x86_linux_process_qsupported.
12182
12183 * server.c (handle_query): Call target_process_qsupported.
12184
12185 * target.h (target_ops): Add process_qsupported.
12186 (target_process_qsupported): New.
12187
fc7238bb
PA
121882010-04-03 Pedro Alves <pedro@codesourcery.com>
12189
12190 * inferiors.c (add_thread): Set last_status kind to
12191 TARGET_WAITKIND_IGNORE.
12192 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12193 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12194 (linux_wait_1): Move `thread' local definition to block that uses
12195 it. Don't NULL initialize `event_child'.
12196 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12197 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12198 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12199
bdabb078
PA
122002010-04-01 Pedro Alves <pedro@codesourcery.com>
12201
12202 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12203 an extended waitstatus, or by a watchpoint.
12204 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12205 thread was stepping or has been stopped by a watchpoint.
12206
d3bbe7a0
PA
122072010-04-01 Pedro Alves <pedro@codesourcery.com>
12208
12209 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12210 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12211 of another, then delete the previous, and validate all
12212 breakpoints.
12213 (validate_inserted_breakpoint): New.
12214 (delete_disabled_breakpoints): New.
12215 (validate_breakpoints): New.
12216 (check_mem_read): Validate breakpoints before trusting their
12217 shadow. Delete disabled breakpoints.
12218 (check_mem_write): Validate breakpoints before trusting they
12219 should be inserted. Delete disabled breakpoints.
12220 * mem-break.h (validate_breakpoints):
12221 * server.c (handle_query): Validate breakpoints when we see a
12222 qSymbol query.
12223
8b07ae33
PA
122242010-04-01 Pedro Alves <pedro@codesourcery.com>
12225
12226 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12227 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12228 if we could tell there's a GDB breakpoint at stop_pc.
12229 (need_step_over_p): Don't do a step over if we find a GDB
12230 breakpoint at the resume PC.
12231
12232 * mem-break.c (struct raw_breakpoint): New.
12233 (enum bkpt_type): New type `gdb_breakpoint'.
12234 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12235 fields. New field `raw'.
12236 (find_raw_breakpoint_at): New.
12237 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12238 breakpoint instead.
12239 (set_breakpoint_at): Adjust.
12240 (delete_raw_breakpoint): New.
12241 (release_breakpoint): New.
12242 (delete_breakpoint): Rename to...
12243 (delete_breakpoint_1): ... this. Add proc parameter. Use
12244 release_breakpoint. Return ENOENT.
12245 (delete_breakpoint): Reimplement.
12246 (find_breakpoint_at): Delete.
12247 (find_gdb_breakpoint_at): New.
12248 (delete_breakpoint_at): Delete.
12249 (set_gdb_breakpoint_at): New.
12250 (delete_gdb_breakpoint_at): New.
12251 (gdb_breakpoint_here): New.
12252 (set_reinsert_breakpoint): Use release_breakpoint.
12253 (uninsert_breakpoint): Rename to ...
12254 (uninsert_raw_breakpoint): ... this.
12255 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12256 (reinsert_raw_breakpoint): Change parameter type to
12257 raw_breakpoint.
12258 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12259 instead.
12260 (check_breakpoints): Adjust. Use release_breakpoint.
12261 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12262 (breakpoint_inserted_here): Ditto.
12263 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12264 Don't trust the breakpoint's shadow if it is not inserted.
12265 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12266 (delete_all_breakpoints): Adjust.
12267 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12268 use delete_breakpoint_1.
12269
12270 * mem-break.h (breakpoints_supported): Delete declaration.
12271 (set_gdb_breakpoint_at): Declare.
12272 (gdb_breakpoint_here): Declare.
12273 (delete_breakpoint_at): Delete.
12274 (delete_gdb_breakpoint_at): Declare.
12275
12276 * server.h (struct raw_breakpoint): Forward declare.
12277 (struct process_info): New field `raw_breakpoints'.
12278
12279 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12280 breakpoints.
12281
6bf5e0ba
PA
122822010-03-24 Pedro Alves <pedro@codesourcery.com>
12283
12284 * linux-low.c (status_pending_p_callback): Fix comment.
12285 (linux_wait_for_event_1): Move most of the internal breakpoint
12286 handling from here...
12287 (linux_wait_1): ... to here.
12288 (count_events_callback): New.
12289 (select_singlestep_lwp_callback): New.
12290 (select_event_lwp_callback): New.
12291 (cancel_breakpoints_callback): New.
12292 (select_event_lwp): New.
12293 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12294 priority to all LWPs that have had events that should be reported
12295 to the client. Cancel breakpoints when about to reporting the
12296 event to the client, not while stopping lwps. No longer cancel
12297 finished single-steps here.
12298 (cancel_finished_single_step): Delete.
12299 (cancel_finished_single_steps): Delete.
12300
414a389f
PA
123012010-03-24 Pedro Alves <pedro@codesourcery.com>
12302
12303 * mem-break.c (enum bkpt_type): New.
12304 (struct breakpoint): New field `type'.
12305 (set_breakpoint_at): Change return type to struct breakpoint
12306 pointer. Set type to `other_breakpoint' by default.
12307 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12308 in the breakpoint list.
12309 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12310 (reinsert_breakpoint): Rename to ...
12311 (reinsert_raw_breakpoint): ... this.
12312 (reinsert_breakpoints_at): Adjust.
12313 * mem-break.h (struct breakpoint): Declare.
12314 (set_breakpoint_at): Change return type to struct breakpoint
12315 pointer.
12316
2280c721
PA
123172010-03-24 Pedro Alves <pedro@codesourcery.com>
12318
12319 * server.c (handle_query): Assign, not compare.
12320
d50171e4
PA
123212010-03-24 Pedro Alves <pedro@codesourcery.com>
12322
12323 Teach linux gdbserver to step-over-breakpoints.
12324
12325 * linux-low.c (can_hardware_single_step): New.
12326 (supports_breakpoints): New.
12327 (handle_extended_wait): If stopping threads, read the stop pc of
12328 the new cloned LWP.
12329 (get_pc): New.
12330 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12331 low target doesn't support retrieving the PC.
12332 (add_lwp): Set last_resume_kind to resume_continue.
12333 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12334 (linux_attach): Don't clear stop_expected. Set the lwp's
12335 last_resume_kind to resume_stop.
12336 (linux_detach_one_lwp): Don't check for removed breakpoints.
12337 (check_removed_breakpoint): Delete.
12338 (status_pending_p): Rename to ...
12339 (status_pending_p_callback): ... this. Don't check for removed
12340 breakpoints. Don't consider threads that are stopped from GDB's
12341 perspective.
12342 (linux_wait_for_lwp): Always read the stop_pc here.
12343 (cancel_breakpoint): New.
12344 (step_over_bkpt): New global.
12345 (linux_wait_for_event_1): Implement stepping over breakpoints.
12346 (gdb_wants_lwp_stopped): New.
12347 (gdb_wants_all_stopped): New.
12348 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12349 single-step traps here. Store the thread's last reported target
12350 wait status.
12351 (send_sigstop): Don't clear stop_expected. Always set it,
12352 instead.
12353 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12354 (cancel_finished_single_step): New.
12355 (cancel_finished_single_steps): New.
12356 (wait_for_sigstop): Don't cancel finished single-step traps here.
12357 (linux_resume_one_lwp): Don't check for removed breakpoints.
12358 Don't set `step' on non-hardware step archs.
12359 (linux_set_resume_request): Ignore resume_stop requests if already
12360 stopping or stopped. Set the lwp's last_resume_kind.
12361 (resume_status_pending_p): Don't check for removed breakpoints.
12362 (need_step_over_p): New.
12363 (start_step_over): New.
12364 (finish_step_over): New.
12365 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12366 requests. Clear the thread's last reported target waitstatus.
12367 Don't use the `suspended' flag. Don't consider pending breakpoints.
12368 (linux_resume): Start a step-over if necessary.
12369 (proceed_one_lwp): New.
12370 (proceed_all_lwps): New.
12371 (unstop_all_lwps): New.
12372 * linux-low.h (struct lwp_info): Rewrite comment for the
12373 `suspended' flag. Add the `stop_pc' field. Delete the
12374 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12375 Add `'last_resume_kind' and `need_step_over' fields.
12376 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12377 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12378 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12379 (set_raw_breakpoint_at): New.
12380 (set_breakpoint_at): Rewrite to use it.
12381 (reinsert_breakpoint_handler): Delete.
12382 (set_reinsert_breakpoint): New.
12383 (reinsert_breakpoint_by_bp): Delete.
12384 (delete_reinsert_breakpoints): New.
12385 (uninsert_breakpoint): Rewrite.
12386 (uninsert_breakpoints_at): New.
12387 (reinsert_breakpoint): Rewrite.
12388 (reinsert_breakpoints_at): New.
12389 (check_breakpoints): Rewrite.
12390 (breakpoint_here): New.
12391 (breakpoint_inserted_here): New.
12392 (check_mem_read): Adjust.
12393 * mem-break.h (breakpoints_supported, breakpoint_here)
12394 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12395 (reinsert_breakpoint_by_bp): Delete declaration.
12396 (delete_reinsert_breakpoints): Declare.
12397 (reinsert_breakpoint): Delete declaration.
12398 (reinsert_breakpoints_at): Declare.
12399 (uninsert_breakpoint): Delete declaration.
12400 (uninsert_breakpoints_at): Declare.
12401 (check_breakpoints): Adjust prototype.
12402 * server.h: Adjust include order.
12403 (struct thread_info): Declare here. Add a `last_status' field.
12404
30ba68cb
MS
124052010-03-23 Michael Snyder <msnyder@vmware.com>
12406
12407 * server.c (crc32): New function.
12408 (handle_query): Add handling for 'qCRC:' request.
12409
b9a881c2
PA
124102010-03-23 Pedro Alves <pedro@codesourcery.com>
12411
12412 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12413 lwp had been stopped by a watchpoint.
12414
e92d13d5
PA
124152010-03-16 Pedro Alves <pedro@codesourcery.com>
12416
12417 * server.h (internal_error): Declare.
12418 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12419 * utils.c (internal_error): New function.
12420
64daa791
AS
124212010-03-15 Andreas Schwab <schwab@redhat.com>
12422
12423 * configure.srv: Fix typo setting srv_regobj.
12424
f52cd8cd
PA
124252010-03-15 Pedro Alves <pedro@codesourcery.com>
12426
12427 * linux-low.c (fetch_register): Avoid passing a non string literal
12428 format to `error'.
12429 (usr_store_inferior_registers): Ditto.
12430
93ae6fdc
PA
124312010-03-14 Pedro Alves <pedro@codesourcery.com>
12432
12433 * linux-low.c (linux_write_memory): Bail out early if peeking
12434 memory failed.
12435
c3adc08c
PA
124362010-03-14 Pedro Alves <pedro@codesourcery.com>
12437
12438 * linux-low.h (struct lwp_info): New fields
12439 `stopped_by_watchpoint' and `stopped_data_address'.
12440 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12441 here, and cache them in the lwp object.
12442 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12443 directly.
12444 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12445 field.
12446 (linux_stopped_by_watchpoint): Rewrite.
12447 (linux_stopped_data_address): Rewrite.
12448
bce522a2
PA
124492010-03-06 Simo Melenius <simo.melenius@iki.fi>
12450
12451 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12452 switching the current inferior, not before.
12453
90884b2b
L
124542010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12455
12456 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12457 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12458 i386-linux.c and amd64-linux.c.
12459 (reg-i386.o): Removed.
12460 (reg-i386.c): Likewise.
12461 (reg-i386-linux.o): Likewise.
12462 (reg-i386-linux.c): Likewise.
12463 (reg-x86-64.o): Likewise.
12464 (reg-x86-64.c): Likewise.
12465 (reg-x86-64-linux.o): Likewise.
12466 (reg-x86-64-linux.c): Likewise.
12467 (i386.o): New.
12468 (i386.c): Likewise.
12469 (i386-linux.o): Likewise.
12470 (i386-linux.c): Likewise.
12471 (amd64.o): Likewise.
12472 (amd64.c): Likewise.
12473 (amd64-linux.o): Likewise.
12474 (amd64-linux.c): Likewise.
12475
12476 * configure.srv (srv_i386_regobj): New.
12477 (srv_i386_linux_regobj): Likewise.
12478 (srv_amd64_regobj): Likewise.
12479 (srv_amd64_linux_regobj): Likewise.
12480 (srv_i386_32bit_xmlfiles): Likewise.
12481 (srv_i386_64bit_xmlfiles): Likewise.
12482 (srv_i386_xmlfiles): Likewise.
12483 (srv_amd64_xmlfiles): Likewise.
12484 (srv_i386_linux_xmlfiles): Likewise.
12485 (srv_amd64_linux_xmlfiles): Likewise.
12486 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12487 srv_xmlfiles to $srv_i386_xmlfiles.
12488 (i[34567]86-*-mingw32ce*): Likewise.
12489 (i[34567]86-*-mingw*): Likewise.
12490 (i[34567]86-*-nto*): Likewise.
12491 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12492 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12493 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12494 (x86_64-*-linux*): Likewise.
12495
12496 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12497 (init_registers_amd64_linux): New.
12498 (x86_arch_setup): Replace init_registers_x86_64_linux with
12499 init_registers_amd64_linux.
12500
193f13e6
MK
125012010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12502
12503 * configure.ac: Check for libdl. If it is not available link against
12504 static libthread_db.
12505 * configure: Regenerate.
12506
85d721b8
PA
125072010-02-22 Pedro Alves <pedro@codesourcery.com>
12508
12509 PR9605
12510
12511 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12512 handing a read watchpoint.
12513 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12514
6076632b
DE
125152010-02-12 Doug Evans <dje@google.com>
12516
12517 * linux-low.c (linux_supports_tracefork_flag): Document.
12518 (linux_look_up_symbols): Add comment.
12519
3327ccf7
L
125202010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12521
12522 * regcache.c (supply_register): Clear regcache if buf is NULL.
12523
0718675c 125242010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 12525 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
12526
12527 * inferiors.c (find_inferior): Add function documentation.
12528 (unloaded_dll): Handle the case where the unloaded dll has not
12529 been previously registered in the dll list.
12530
177321bd
DJ
125312010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12532
12533 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12534 (thumb2_breakpoint): New.
12535 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12536
2b009048
DJ
125372010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12538
12539 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12540 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12541 breakpoints.
12542
3be029c7
PA
125432010-01-21 Pedro Alves <pedro@codesourcery.com>
12544
12545 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12546
18f5de3b
JK
125472010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12548
12549 * linux-s390-low.c (s390_collect_ptrace_register)
12550 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12551
3743bb4f
DE
125522010-01-21 Doug Evans <dje@google.com>
12553
14ce3065
DE
12554 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12555 (PTRACE_ARG4_TYPE): New macro.
12556 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12557 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12558 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12559 (usr_store_inferior_registers): Ditto.
12560 (linux_read_memory, linux_write_memory): Ditto.
12561 (linux_test_for_tracefork): Ditto.
12562
3743bb4f
DE
12563 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12564 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12565
8b315be5
PA
125662010-01-21 Pedro Alves <pedro@codesourcery.com>
12567
12568 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12569 target.
12570
85492558
PA
125712010-01-21 Pedro Alves <pedro@codesourcery.com>
12572
12573 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12574 prototype to take a regcache. Adjust.
12575
442ea881
PA
125762010-01-20 Pedro Alves <pedro@codesourcery.com>
12577
12578 * regcache.h (struct thread_info): Forward declare.
12579 (struct regcache): New.
12580 (new_register_cache): Adjust prototype.
12581 (get_thread_regcache): Declare.
12582 (free_register_cache): Adjust prototype.
12583 (registers_to_string, registers_from_string): Ditto.
12584 (supply_register, supply_register_by_name, collect_register)
12585 (collect_register_as_string, collect_register_by_name): Ditto.
12586 * regcache.c (struct inferior_regcache_data): Delete.
12587 (get_regcache): Rename to ...
12588 (get_thread_regcache): ... this. Adjust. Switch inferior before
12589 fetching registers.
12590 (regcache_invalidate_one): Adjust.
12591 (regcache_invalidate): Fix prototype.
12592 (new_register_cache): Return the new register cache.
12593 (free_register_cache): Change prototype.
12594 (realloc_register_cache): Adjust.
12595 (registers_to_string): Change prototype to take a regcache. Adjust.
12596 (registers_from_string): Ditto.
12597 (register_data): Ditto.
12598 (supply_register): Ditto.
12599 (supply_register_by_name): Ditto.
12600 (collect_register): Ditto.
12601 (collect_register_as_string): Ditto.
12602 (collect_register_by_name): Ditto.
12603 * server.c (process_serial_event): Adjust.
12604 * linux-low.h (regset_fill_func, regset_store_func): Change
12605 prototype.
12606 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12607 Change prototype.
12608 * linux-low.c (get_stop_pc): Adjust.
12609 (check_removed_breakpoint): Adjust.
12610 (linux_wait_for_event): Adjust.
12611 (linux_resume_one_lwp): Adjust.
12612 (fetch_register): Add regcache parameter. Adjust.
12613 (usr_store_inferior_registers): Ditto.
12614 (regsets_fetch_inferior_registers): Ditto.
12615 (regsets_store_inferior_registers): Ditto.
12616 (linux_fetch_registers, linux_store_registers): Ditto.
12617 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12618 regcache. Adjust.
43aaf8b6
PA
12619 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12620 Ditto.
442ea881
PA
12621 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12622 prototype to take a regcache.
12623 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12624 * remote-utils.c (convert_ascii_to_int, outreg)
12625 (prepare_resume_reply): Change prototype to take a regcache.
12626 Adjust.
12627 * target.h (struct target_ops) <fetch_registers, store_registers>:
12628 Change prototype to take a regcache.
12629 (fetch_inferior_registers, store_inferior_registers): Change
12630 prototype to take a regcache. Adjust.
12631 * proc-service.c (ps_lgetregs): Adjust.
12632 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12633 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12634 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12635 take a regcache. Adjust.
12636 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12637 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12638 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12639 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12640 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12641 (cris_cannot_fetch_register):
12642 (cris_breakpoint_at): Change prototype to take a regcache.
12643 Adjust.
12644 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12645 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12646 to take a regcache. Adjust.
12647 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12648 Adjust.
12649 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12650 take a regcache. Adjust.
12651 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12652 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12653 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12654 * linux-mips-low.c (mips_get_pc):
12655 (mips_set_pc): Change prototype to take a regcache. Adjust.
12656 (mips_reinsert_addr): Adjust.
12657 (mips_collect_register): Change prototype to take a regcache.
12658 Adjust.
12659 (mips_supply_register):
12660 (mips_collect_register_32bit, mips_supply_register_32bit)
12661 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12662 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12663 * linux-ppc-low.c (ppc_supply_ptrace_register)
12664 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12665 (parse_spufs_run): Adjust.
12666 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12667 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12668 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12669 take a regcache. Adjust.
12670 * linux-s390-low.c (s390_collect_ptrace_register)
12671 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12672 (s390_set_pc): Change prototype to take a regcache. Adjust.
12673 (s390_arch_setup): Adjust.
12674 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12675 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12676 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12677 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12678 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12679 regcache. Adjust.
12680 (sparc_breakpoint_at): Adjust.
12681 * linux-xtensa-low.c (xtensa_fill_gregset):
12682 (xtensa_store_gregset):
12683 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12684 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12685 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12686 prototype to take a regcache. Adjust.
12687 * win32-arm-low.c (arm_fetch_inferior_register)
12688 (arm_store_inferior_register): Change prototype to take a
12689 regcache. Adjust.
12690 * win32-i386-low.c (i386_fetch_inferior_register)
12691 (i386_store_inferior_register): Change prototype to take a
12692 regcache. Adjust.
12693 * win32-low.c (child_fetch_inferior_registers)
12694 (child_store_inferior_registers): Change prototype to take a
12695 regcache. Adjust.
12696 (win32_wait): Adjust.
12697 (win32_fetch_inferior_registers): Change prototype to take a
12698 regcache. Adjust.
12699 (win32_store_inferior_registers): Adjust.
12700 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12701 store_inferior_register>: Change prototype to take a regcache.
12702
60c3d7b0
DE
127032010-01-20 Doug Evans <dje@google.com>
12704
12705 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12706 #ifdef.
12707 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12708 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12709
dc146f7c
VP
127102010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12711
12712 * linux-low.c (linux_core_of_thread): New.
12713 (compare_ints, show_process, list_threads): New.
12714 (linux_qxfer_osdata): Report threads and cores.
12715 (linux_target_op): Register linux_core_of_thread.
12716 * remote-utils.c (prepare_resume_reply): Report the core.
12717 (buffer_xml_printf): Support %d specifier.
12718 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12719 New.
12720 (handle_query): Handle qXfer:threads. Announce availability
12721 thereof.
12722 * target.h (struct target_ops): New field core_of_thread.
12723
7803799a
UW
127242010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12725
12726 * Makefile.in (clean): Remove new generated files.
12727 (reg-s390.o, reg-s390.c): Remove rules.
12728 (reg-s390x.o, reg-s390x.c): Likewise.
12729 (s390-linux32.o, s390-linux32.c): Add rules.
12730 (s390-linux64.o, s390-linux64.c): Likewise.
12731 (s390x-linux64.o, s390x-linux64.c): Likewise.
12732 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12733 * linux-s390-low.c: Include <elf.h>.
12734 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12735 (init_registers_s390): Remove prototype.
12736 (init_registers_s390x): Likewise.
12737 (init_registers_s390_linux32): Add prototype.
12738 (init_registers_s390_linux64): Likewise.
12739 (init_registers_s390x_linux64): Likewise.
12740 (s390_num_regs_3264): New define.
12741 (s390_regmap_3264): New global variable.
12742 (s390_cannot_fetch_register): Remove obsolete check.
12743 (s390_cannot_store_register): Likewise.
12744 (s390_collect_ptrace_register): Handle upper/lower register halves.
12745 (s390_supply_ptrace_register): Likewise.
12746 (s390_fill_gregset): Update to register number changes.
12747 (s390_get_hwcap): New routine.
12748 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12749 Install appropriate regmap and register set.
12750
6e7ffa39
JB
127512010-01-01 Joel Brobecker <brobecker@adacore.com>
12752
12753 * server.c (gdbserver_version): Update copyright year to 2010.
12754 * gdbreplay.c (gdbreplay_version): Likewise.
12755
957f3f49
DE
127562009-12-28 Doug Evans <dje@google.com>
12757
12758 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12759 elf/external.h. Include <elf.h> instead but only if necessary.
12760
ca5c370d
PA
127612009-12-28 Pedro Alves <pedro@codesourcery.com>
12762
12763 * linux-low.c (linux_remove_process): Remove `detaching'
12764 parameter. Don't release/detach from thread_db here.
12765 (linux_kill): Release/detach from thread_db here, ...
12766 (linux_detach): ... and here, before actually detaching.
12767 (linux_wait_1): ... and here, when a process exits.
12768 * thread-db.c (any_thread_of): New.
12769 (thread_db_free): Switch the current inferior to a thread of the
12770 passed in process.
12771
4ee62156
DE
127722009-12-21 Doug Evans <dje@google.com>
12773
d90e6a88
DE
12774 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12775
c5f62d5f
DE
12776 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12777 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12778 warning ifndef __NR_tkill. Move setting of errno there too.
12779 Delete unnecessary resetting of errno after syscall.
12780 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12781
10e86dd7
DE
12782 * configure.ac: Check for dladdr.
12783 * config.in: Regenerate.
12784 * configure: Regenerate.
12785 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12786 (try_thread_db_load): Update.
12787
4ee62156
DE
12788 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12789
00f515da
DE
127902009-12-18 Doug Evans <dje@google.com>
12791
e9464885
DE
12792 * event-loop.c: Include unistd.h if it exists.
12793
07d4f67e
DE
12794 * linux-low.c (my_waitpid): Move definition away from being in
12795 between linux_tracefork_child/linux_test_for_tracefork.
12796
00f515da
DE
12797 * gdb_proc_service.h (psaddr_t): Fix type.
12798 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12799 signature to match glibc.
12800
1de1badb
DE
128012009-12-16 Doug Evans <dje@google.com>
12802
12803 * linux-low.c (linux_read_memory): Fix argument to read.
12804
aeeb81d1
PA
128052009-11-26 Pedro Alves <pedro@codesourcery.com>
12806
12807 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12808 events, don't leave current_inferior pointing at null.
12809
10357975
PA
128102009-11-26 Pedro Alves <pedro@codesourcery.com>
12811
12812 * win32-low.c (LOG): Delete.
12813 (OUTMSG): Output to stderr.
12814 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12815 on compile time LOG macro.
12816 (win32_wait): Fix debug output.
12817
cf6e3471
PA
128182009-11-26 Pedro Alves <pedro@codesourcery.com>
12819
12820 * win32-low.c (win32_add_one_solib): If the dll name is
12821 "ntdll.dll", prepend the system directory to the dll path.
12822
0c85e18e
MK
128232009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12824
12825 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12826
9ac544ce 128272009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12828 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12829
12830 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12831 * configure.ac: Check for __mcoldfire__ and set
12832 gdb_cv_m68k_is_coldfire.
12833 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12834 reg-cf.o and reg-m68k.o.
12835 * configure: Regenerated.
12836
fd7dd3e6
PA
128372009-11-16 Pedro Alves <pedro@codesourcery.com>
12838
12839 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12840 Pass it to thread_db_free.
12841 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12842 proper `detaching' argument to linux_remove_process.
12843 * linux-low.h (thread_db_free): Add `detaching' parameter.
12844 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12845 to thread_db_free.
12846 (thread_db_free): Add `detaching' parameter. Only
12847 call td_ta_clear_event if detaching from process.
12848
75aa492e
MK
128492009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12850
12851 * thread-db.c (thread_db_free): Fix typo.
12852
21e1bee4
PP
128532009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12854
12855 PR gdb/10838
12856 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12857
8838b45e
NS
128582009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12859
12860 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12861 with an i686 compiler.
12862 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12863 needed.
12864 * configure: Rebuilt.
12865
8a35fb51
SL
128662009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12867
12868 PR gdb/10783
12869
12870 * server.c (handle_search_memory_1): Correct read_addr initialization
12871 in loop for searching subsequent chunks.
12872
96f15937
PP
128732009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12874
12875 * configure.ac: New --with-libthread-db option.
12876 * thread-db.c: Allow direct dependence on libthread_db.
12877 (thread_db_free): Adjust.
12878 * config.in: Regenerate.
12879 * configure: Likewise.
889bf7c5 12880
5f7d1694
PP
128812009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12882
12883 PR gdb/10757
12884 * thread-db.c (attach_thread): New function.
12885 (maybe_attach_thread): Return success/failure.
12886 (find_new_threads_callback): Adjust.
889bf7c5
PA
12887 (thread_db_find_new_threads): Loop until no new threads.
12888
88e3b899
PA
128892009-10-13 Pedro Alves <pedro@codesourcery.com>
12890
12891 * proc-service.c (ps_lgetregs): Formatting.
12892
cdbfd419
PP
128932009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12894
12895 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12896 * configure.ac: Adjust.
12897 * linux-low.h (struct process_info_private): Move members to struct
12898 thread_db.
12899 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12900 * linux-low.c (linux_remove_process): Adjust.
12901 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12902 * server.c (handle_query): Move code ...
12903 (handle_monitor_command): ... here. New function.
12904 * target.h (struct target_ops): New member.
12905 * thread-db.c (struct thread_db): New.
12906 (libthread_db_search_path): New variable.
12907 (thread_db_create_event, thread_db_enable_reporting)
12908 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12909 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12910 (try_thread_db_load_1, dladdr_to_soname): New functions.
12911 (try_thread_db_load, thread_db_load_search): New functions.
12912 (thread_db_init): Search for libthread_db.
12913 (thread_db_free): New function.
12914 (thread_db_handle_monitor_command): Likewise.
12915 * config.in: Regenerate.
12916 * configure: Regenerate.
889bf7c5 12917
4168d2d6
UW
129182009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12919
12920 * spu-low.c (spu_kill): Wait for inferior to terminate.
12921 Call clear_inferiors.
12922 (spu_detach): Call clear_inferiors.
12923
81ecdfbb
RW
129242009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12925
12926 * aclocal.m4: Regenerate.
12927 * config.in: Likewise.
12928 * configure: Likewise.
12929
0b9ff2c0
UW
129302009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12931
12932 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12933 (parse_spufs_run): New function.
12934 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12935 (ppc_breakpoint_at): Handle SPU breakpoints.
12936
efcbbd14
UW
129372009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12938
12939 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12940 (SPUFS_MAGIC): Define.
12941 (spu_enumerate_spu_ids): New function.
12942 (linux_qxfer_spu): New function.
12943 (linux_target_ops): Install linux_qxfer_spu.
12944
f4d9bade
UW
129452009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12946
12947 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12948 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12949 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12950 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12951 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12952 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12953 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12954 (init_registers_powerpc_cell32l): Add prototype.
12955 (init_registers_powerpc_cell64l): Likewise.
12956 (ppc_arch_setup): Detect Cell/B.E. architecture.
12957
96e946ca
RW
129582009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12959
12960 * Makefile.in (datarootdir): New variable.
12961
58d6951d
DJ
129622009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12963
12964 * linux-low.c (linux_write_memory): Update debugging output.
12965 * Makefile.in (clean): Add new descriptions.
12966 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12967 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12968 * configure.srv: Add new files for arm*-*-linux*.
12969 * linux-arm-low.c: Add new declarations.
12970 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12971 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12972 (HWCAP_VFPv3D16): New.
12973 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12974 instead of __IWMMXT__.
12975 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12976 (arm_arch_setup): New.
12977 (target_regsets): Remove #ifdef. Add VFP regset.
12978 (the_low_target): Use arm_arch_setup.
12979
12b42a12
DJ
129802009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12981
12982 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12983 the main thread again.
12984
ac8c974e
AR
129852009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12986
12987 Adding Neutrino gdbserver.
12988 * configure: Regenerated.
12989 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12990 * configure.srv (i[34567]86-*-nto*): New target.
12991 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12992 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12993 (nto_comctrl) [__QNX__]: New function.
12994 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12995
4424e0c3 129962009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12997
12998 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12999 srv_tgtobj.
13000
912cf4ba
PA
130012009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13002 Pedro Alves <pedro@codesourcery.com>
13003
13004 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13005 don't support CONTEXT_EXTENDED_REGISTERS.
13006 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13007 (the_low_target): Install them.
13008 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13009 failing with ERROR_PIPE_NOT_CONNECTED.
13010
aa5ca48f
DE
130112009-06-30 Doug Evans <dje@google.com>
13012 Pierre Muller <muller@ics.u-strasbg.fr>
13013
13014 Add h/w watchpoint support to x86-linux, win32-i386.
13015 * Makefile.in (SFILES): Add i386-low.c
13016 (i386_low_h): Define.
13017 (i386-low.o): Add dependencies.
13018 (linux-x86-low.o): Add i386-low.h dependency.
13019 (win32-i386-low.o): Ditto.
13020 * i386-low.c: New file.
13021 * i386-low.h: New file.
13022 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13023 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13024 * linux-low.c (linux_add_process): Initialize arch_private.
13025 (linux_remove_process): Free arch_private.
13026 (add_lwp): Initialize arch_private.
13027 (delete_lwp): Free arch_private.
13028 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13029 provided.
13030 * linux-low.h (process_info_private): New member arch_private.
13031 (lwp_info): New member arch_private.
13032 (linux_target_ops): New members new_process, new_thread,
13033 prepare_to_resume.
13034 (ptid_of): New macro.
13035 * linux-x86-low.c: Include stddef.h, i386-low.h.
13036 (arch_process_info): New struct.
13037 (arch_lwp_info): New struct.
13038 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13039 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13040 (i386_dr_low_get_status): New function.
13041 (x86_insert_point, x86_remove_point): New functions.
13042 (x86_stopped_by_watchpoint): New function.
13043 (x86_stopped_data_address): New function.
13044 (x86_linux_new_process, x86_linux_new_thread): New functions.
13045 (x86_linux_prepare_to_resume): New function.
13046 (the_low_target): Add entries for insert_point, remove_point,
13047 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13048 prepare_to_resume.
13049 * server.c (debug_hw_points): New global.
13050 (monitor_show_help): Document set debug-hw-points.
13051 (handle_query): Process "set debug-hw-points".
13052 * server.h (debug_hw_points): Declare.
13053 (paddress): Declare.
13054 * utils.c (NUMCELLS, CELLSIZE): New macros.
13055 (get_sell, xsnprintf, paddress): New functions.
13056 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13057 remove_point, stopped_by_watchpoint, stopped_data_address.
13058 * win32-i386-low.c: Include i386-low.h.
13059 (debug_reg_state): Replaces dr.
13060 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13061 (i386_dr_low_get_status): New function.
13062 (i386_insert_point, i386_remove_point): New functions.
13063 (i386_stopped_by_watchpoint): New function.
13064 (i386_stopped_data_address): New function.
13065 (i386_initial_stuff): Update.
13066 (get_thread_context,set_thread_context,i386_thread_added): Update.
13067 (the_low_target): Add entries for insert_point,
13068 remove_point, stopped_by_watchpoint, stopped_data_address.
13069 * win32-low.c (win32_insert_watchpoint): New function.
13070 (win32_remove_watchpoint): New function.
13071 (win32_stopped_by_watchpoint): New function.
13072 (win32_stopped_data_address): New function.
13073 (win32_target_ops): Add entries for insert_watchpoint,
13074 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13075 * win32-low.h (win32_target_ops): New members insert_point,
13076 remove_point, stopped_by_watchpoint, stopped_data_address.
13077
d993e290
PA
130782009-06-25 Pedro Alves <pedro@codesourcery.com>
13079
13080 * server.c (process_serial_event): Re-return unsupported, not
13081 error, if the type isn't recognized. Re-allow supporting only
13082 insert or remove packets. Also call require_running for
13083 breakpoints. Add missing break statement to default case. Tidy.
13084 * target.h (struct target_ops): Rename insert_watchpoint to
13085 insert_point, and remove_watchpoint to remove_point.
13086
13087 * linux-low.h (struct linux_target_ops): Likewise.
13088 * linux-low.c (linux_insert_watchpoint): Rename to ...
13089 (linux_insert_point): ... this. Adjust.
13090 (linux_remove_watchpoint): Rename to ...
13091 (linux_remove_point): ... this. Adjust.
13092 (linux_target_ops): Adjust.
13093 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13094 (cris_insert_point): ... this.
13095 (cris_remove_watchpoint): Rename to ...
13096 (cris_remove_point): ... this.
13097 (the_low_target): Adjust.
13098
0f54c268
PM
130992009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13100
13101 * server.c (handle_v_kill): Pass signal_pid to
13102 kill_inferior if multi_process is zero.
13103
c6314022
AR
131042009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13105
13106 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13107 * target.h (target_ops): Comment for *_watchpoint to make it clear
13108 the functions can get types '0' and '1'.
13109
4463ce24
AR
131102009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13111
13112 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13113 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13114 * regcache.c (get_regcache): Likewise.
13115 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13116 * win32-low.c (child_fetch_inferior_registers): Remove check for
13117 regno 0.
13118
cf8fd78b
PA
131192009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13120 Pedro Alves <pedro@codesourcery.com>
13121
13122 * target.h (struct target_ops) <supports_multi_process>: New
13123 callback.
13124 (target_supports_multi_process): New.
13125 * server.c (handle_query): Even if GDB reports support, only
13126 enable multi-process if the target also supports it. Report
13127 multi-process support only if the target backend supports it.
13128 * linux-low.c (linux_supports_multi_process): New function.
13129 (linux_target_ops): Install it as target_supports_multi_process
13130 callback.
13131
47c0c975
DE
131322009-05-24 Doug Evans <dje@google.com>
13133
e09875d4
DE
13134 Global renaming of find_thread_pid to find_thread_ptid.
13135 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13136 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13137 All callers updated.
13138
e27d73f6
DE
13139 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13140 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13141 directly.
13142
47c0c975
DE
13143 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13144 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13145 (linux_resume_one_lwp): Ditto.
13146
2acc282a
DE
131472009-05-23 Doug Evans <dje@google.com>
13148
13149 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13150 from struct inferior_list_entry * to struct lwp_info *.
13151 All callers updated.
13152
9f1036c1
DE
131532009-05-13 Doug Evans <dje@google.com>
13154
13155 * linux-x86-low.c: Don't include assert.h.
13156 (x86_siginfo_fixup): Use fatal, not assert.
13157 (x86_arch_setup): Fix comment.
13158
d0722149
DE
131592009-05-12 Doug Evans <dje@google.com>
13160
13161 Biarch support for i386/amd64 gdbserver.
13162 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13163 Add linux-x86-low.c.
13164 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13165 (linux-x86-low.o): Add.
13166 * linux-x86-64-low.c: Delete.
13167 * linux-i386-low.c: Delete.
13168 * linux-x86-low.c: New file.
13169 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13170 linux-x86-low.o.
13171 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13172 linux-x86-low.o.
13173 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13174 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13175 (linux_child_pid_to_exec_file): New function.
13176 (elf_64_header_p, elf_64_file_p): New functions.
13177 (siginfo_fixup): New function.
13178 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13179 give target a chance to convert layout.
13180 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13181 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13182
fdeb2a12
DE
131832009-05-07 Doug Evans <dje@google.com>
13184
13185 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13186 (regsets_store_inferior_registers): Ditto.
13187
a6dbe5df
PA
131882009-05-06 Pedro Alves <pedro@codesourcery.com>
13189
13190 PR server/10048
13191
13192 * linux-low.c (must_set_ptrace_flags): Delete.
13193 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13194 of the global.
13195 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13196 `lwp->must_set_ptrace_flags' instead.
ba42693b 13197 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
13198 (linux_wait_1): ... not here.
13199
5091eb23
DE
132002009-04-30 Doug Evans <dje@google.com>
13201
9f767825
DE
13202 * inferiors.c (started_inferior_callback): New function.
13203 (attached_inferior_callback): New function.
13204 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13205 * server.c (print_started_pid, print_attached_pid): New functions.
13206 (detach_or_kill_for_exit): New function.
13207 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13208 * server.h (have_started_inferiors_p): Declare.
13209 (have_attached_inferiors_p): Declare.
13210
5091eb23
DE
13211 * inferiors.c (remove_process): Fix memory leak, free process.
13212 * linux-low.c (linux_remove_process): New function.
13213 (linux_kill): Call it instead of remove_process.
13214 (linux_detach, linux_wait_1): Ditto.
13215
155c8968
PA
132162009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13217
13218 * configure.srv: Add x86 Windows CE target.
13219
7fe519cb
UW
132202009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13221
13222 * inferiors.c (get_thread_process): Make global.
13223 * server.h (get_thread_process): Add prototype.
13224 * thread-db.c (find_one_thread): Use get_thread_process
13225 instead of current_process.
13226 (thread_db_get_tls_address): Do not crash if called when
13227 thread layer is not yet initialized.
13228
5472f405
UW
132292009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13230
13231 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13232 * spu-low.c (current_tid): Rename to ...
13233 (current_ptid): ... this.
13234 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13235 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13236 ptid_get_lwp (current_ptid) instead of current_tid.
13237 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13238 instead of current_tid. Use find_process_pid to verify pid
13239 argument is valid. Pass proper argument to remove_process.
13240 (spu_thread_alive): Compare current_ptid instead of current_tid.
13241 (spu_resume): Likewise.
13242
55ac2b99
PA
132432009-04-02 Pedro Alves <pedro@codesourcery.com>
13244
13245 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13246 variable.
13247
95954743
PA
132482009-04-01 Pedro Alves <pedro@codesourcery.com>
13249
13250 Implement the multiprocess extensions, and add linux multiprocess
13251 support.
13252
13253 * server.h (ULONGEST): Declare.
13254 (struct ptid, ptid_t): New.
13255 (minus_one_ptid, null_ptid): Declare.
13256 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13257 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13258 (struct inferior_list_entry): Change `id' type from unsigned from
13259 to ptid_t.
13260 (struct sym_cache, struct breakpoint, struct
13261 process_info_private): Forward declare.
13262 (struct process_info): Declare.
13263 (current_process): Declare.
13264 (all_processes): Declare.
13265 (initialize_inferiors): Declare.
13266 (add_thread): Adjust to use ptid_t.
13267 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13268 (add_process, remove_process, find_thread_pid): Declare.
13269 (find_inferior_id): Adjust to use ptid_t.
13270 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13271 (multi_process): Declare.
13272 (push_event): Adjust to use ptid_t.
13273 (read_ptid, write_ptid): Declare.
13274 (prepare_resume_reply): Adjust to use ptid_t.
13275 (clear_symbol_cache): Declare.
13276 * inferiors.c (all_processes): New.
13277 (null_ptid, minus_one_ptid): New.
13278 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13279 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13280 (add_thread): Change unsigned long to ptid. Remove gdb_id
13281 parameter. Adjust.
13282 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13283 (gdb_id_to_thread): Rename to ...
13284 (find_thread_pid): ... this. Change unsigned long to ptid.
13285 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13286 (loaded_dll, pull_pid_from_list): Adjust.
13287 (add_process, remove_process, find_process_pid)
13288 (get_thread_process, current_process, initialize_inferiors): New.
13289 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13290 (struct target_waitstatus) <related_pid>: Ditto.
13291 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13292 return type to int.
13293 (struct target_ops) <join>: Add `pid' argument.
13294 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13295 (struct target_ops) <wait>: Add `ptid' field. Change return type
13296 to ptid.
13297 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13298 (mywait): Add `ptid' argument. Change return type to ptid_t.
13299 (target_pid_to_str): Declare.
13300 * target.c (set_desired_inferior): Adjust to use ptids.
13301 (mywait): Add new `ptid' argument. Adjust.
13302 (target_pid_to_str): New.
13303 * mem-break.h (free_all_breakpoints): Declare.
13304 * mem-break.c (breakpoints): Delelete.
13305 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13306 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13307 to use per-process breakpoint list.
13308 (free_all_breakpoints): New.
13309 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13310 (symbol_cache, all_symbols_looked_up): Delete.
13311 (hexchars): New.
13312 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13313 read_ptid): New.
13314 (prepare_resume_reply): Change ptid argument's type from unsigned
13315 long to ptid_t. Adjust. Implement W;process and X;process.
13316 (free_sym_cache, clear_symbol_cache): New.
13317 (look_up_one_symbol): Adjust to per-process symbol cache. *
13318 * server.c (cont_thread, general_thread, step_thread): Change type
13319 to ptid_t.
13320 (attached): Delete.
13321 (multi_process): New.
13322 (last_ptid): Change type to ptid_t.
13323 (struct vstop_notif) <ptid>: Change type to ptid_t.
13324 (queue_stop_reply, push_event): Change `ptid' argument's type to
13325 ptid_t.
13326 (discard_queued_stop_replies): Add `pid' argument.
13327 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13328 changes. Don't reference the `attached' global.
13329 (attach_inferior): Adjust to mywait interface changes.
13330 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13331 features. Handle and report "multiprocess+". Handle
13332 "qAttached:PID".
13333 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13334 changes.
13335 (handle_v_kill): New.
13336 (handle_v_stopped): Adjust to use target_pid_to_str.
13337 (handle_v_requests): Allow multiple attaches and runs when
13338 multiprocess extensions are in effect. Handle "vKill".
13339 (myresume): Adjust to use ptids.
13340 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13341 (handle_status): Adjust to discard_queued_stop_replies interface
13342 change.
13343 (first_thread_of, kill_inferior_callback)
13344 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13345 (main): Call initialize_inferiors. Adjust to use ptids, killing
13346 and detaching from all inferiors. Handle multiprocess packet
13347 variants.
13348 * linux-low.h: Include gdb_proc_service.h.
13349 (struct process_info_private): New.
13350 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13351 <lwpid_of>: Use ptid_get_lwp.
13352 (get_lwp_thread): Adjust.
13353 (struct lwp_info): Add `dead' member.
13354 (find_lwp_pid): Declare.
13355 * linux-low.c (thread_db_active): Delete.
13356 (new_inferior): Adjust comment.
13357 (inferior_pid): Delete.
13358 (linux_add_process): New.
13359 (handle_extended_wait): Adjust.
13360 (add_lwp): Change unsigned long to ptid.
13361 (linux_create_inferior): Add process to processes table. Adjust
13362 to use ptids. Don't set new_inferior here.
13363 (linux_attach_lwp): Rename to ...
13364 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13365 it. Adjust to use ptids.
13366 (linux_attach_lwp): New.
13367 (linux_attach): Add process to processes table. Don't set
13368 new_inferior here.
13369 (struct counter): New.
13370 (second_thread_of_pid_p, last_thread_of_process_p): New.
13371 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13372 multiple processes.
13373 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13374 processes. Remove process from process table.
13375 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13376 to multiple processes.
13377 (any_thread_of): New.
13378 (linux_detach): Add `pid' argument, and handle it. Remove process
13379 from processes table.
13380 (linux_join): Add `pid' argument. Handle it.
13381 (linux_thread_alive): Change unsighed long argument to ptid_t.
13382 Consider dead lwps as not being alive.
13383 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13384 threads we're not interested in.
13385 (same_lwp, find_lwp_pid): New.
13386 (linux_wait_for_lwp): Change `pid' argument's type from int to
13387 ptid_t. Adjust.
13388 (linux_wait_for_event): Rename to ...
13389 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13390 from int to ptid_t. Adjust.
13391 (linux_wait_for_event): New.
13392 (linux_wait_1): Add `ptid' argument. Change return type to
13393 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13394 that exit from the process table.
13395 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13396 Adjust.
13397 (mark_lwp_dead): New.
13398 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13399 stopping all threads, mark its main lwp as dead.
13400 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13401 ptids.
13402 (fetch_register, usr_store_inferior_registers)
13403 (regsets_fetch_inferior_registers)
13404 (regsets_store_inferior_registers, linux_read_memory)
13405 (linux_write_memory): Inline `inferior_pid'.
13406 (linux_look_up_symbols): Adjust to use per-process
13407 `thread_db_active'.
13408 (linux_request_interrupt): Adjust to use ptids.
13409 (linux_read_auxv): Inline `inferior_pid'.
13410 (initialize_low): Don't reference thread_db_active.
13411 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13412 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13413 (ps_getpid): Return the pid of the current inferior.
13414 * thread-db.c (proc_handle, thread_agent): Delete.
13415 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13416 per-process data.
13417 (find_one_thread): Change argument type to ptid_t. Adjust to
13418 per-process data.
13419 (maybe_attach_thread): Adjust to per-process data and ptids.
13420 (thread_db_find_new_threads): Ditto.
13421 (thread_db_init): Ditto.
13422 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13423 processes table. Adjust to use ptids.
13424 (spu_kill, spu_detach): Adjust interface. Remove process from
13425 processes table.
13426 (spu_join, spu_thread_alive): Adjust interface.
13427 (spu_wait): Adjust interface. Remove process from processes
13428 table. Adjust to use ptids.
13429 * win32-low.c (current_inferior_tid): Delete.
13430 (current_inferior_ptid): New.
13431 (debug_event_ptid): New.
13432 (thread_rec): Take a ptid. Adjust.
13433 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13434 (child_delete_thread): Ditto.
13435 (do_initial_child_stuff): Add `attached' argument. Add process to
13436 processes table.
13437 (child_fetch_inferior_registers, child_store_inferior_registers):
13438 Adjust.
13439 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13440 (win32_attach): Pass 1 to do_initial_child_stuff.
13441 (win32_kill): Adjust interface. Remove process from processes
13442 table.
13443 (win32_detach): Ditto.
13444 (win32_join): Adjust interface.
13445 (win32_thread_alive): Take a ptid.
13446 (win32_resume): Adjust to use ptids.
13447 (get_child_debug_event): Ditto.
13448 (win32_wait): Adjust interface. Remove exiting process from
13449 processes table.
13450
bd99dc85
PA
134512009-04-01 Pedro Alves <pedro@codesourcery.com>
13452
13453 Non-stop mode support.
13454
13455 * server.h (non_stop): Declare.
13456 (gdb_client_data, handler_func): Declare.
13457 (delete_file_handler, add_file_handler, start_event_loop):
13458 Declare.
13459 (handle_serial_event, handle_target_event, push_event)
13460 (putpkt_notif): Declare.
13461 * target.h (enum resume_kind): New.
13462 (struct thread_resume): Replace `step' field by `kind' field.
13463 (TARGET_WNOHANG): Define.
13464 (struct target_ops) <wait>: Add `options' argument.
13465 <supports_non_stop, async, start_non_stop>: New fields.
13466 (target_supports_non_stop, target_async): New.
13467 (start_non_stop): Declare.
13468 (mywait): Add `options' argument.
13469 * target.c (mywait): Add `options' argument. Print child exit
13470 notifications here.
13471 (start_non_stop): New.
13472 * server.c (non_stop, own_buf, mem_buf): New globals.
13473 (struct vstop_notif): New.
13474 (notif_queue): New global.
13475 (queue_stop_reply, push_event, discard_queued_stop_replies)
13476 (send_next_stop_reply): New.
13477 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13478 interface changes.
13479 (attach_inferior): In non-stop mode, don't wait for the target
13480 here.
13481 (handle_general_set): Handle QNonStop.
13482 (handle_query): When handling qC, return the current general
13483 thread, instead of the first thread of the list.
13484 (handle_query): If the backend supports non-stop mode, include
13485 QNonStop+ in the qSupported query response.
13486 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13487 and non-stop mode.
13488 (handle_v_attach, handle_v_run): Handle non-stop mode.
13489 (handle_v_stopped): New.
13490 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13491 (myresume): Adjust to use resume_kind. Handle non-stop.
13492 (queue_stop_reply_callback): New.
13493 (handle_status): Handle non-stop mode.
13494 (main): Clear non_stop flag on reconnection. Use the event-loop.
13495 Refactor serial protocol handling from here ...
13496 (process_serial_event): ... to this new function. When GDB
13497 selects any thread, select one here. In non-stop mode, wait until
13498 GDB acks all pending events before exiting.
13499 (handle_serial_event, handle_target_event): New.
13500 * remote-utils.c (remote_open): Install remote_desc in the event
13501 loop.
13502 (remote_close): Remove remote_desc from the event loop.
13503 (putpkt_binary): Rename to...
13504 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13505 (putpkt_binary): New as wrapper around putpkt_binary_1.
13506 (putpkt_notif): New.
13507 (prepare_resume_reply): In non-stop mode, don't change the
13508 general_thread.
13509 * event-loop.c: New.
13510 * Makefile.in (OBJ): Add event-loop.o.
13511 (event-loop.o): New rule.
13512
13513 * linux-low.h (pid_of): Moved here.
13514 (lwpid_of): New.
13515 (get_lwp_thread): Use lwpid_of.
13516 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13517 * linux-low.c (pid_of): Delete.
13518 (inferior_pid): Use lwpid_of.
13519 (linux_event_pipe): New.
13520 (target_is_async_p): New.
13521 (delete_lwp): New.
13522 (handle_extended_wait): Use lwpid_of.
13523 (add_lwp): Don't set lwpid field.
13524 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13525 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13526 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13527 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13528 first. Adjust to linux_wait_for_event interface changes. Use
13529 lwpid_of.
13530 (linux_detach): Don't delete the main lwp here.
13531 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13532 (status_pending_p): Don't consider explicitly suspended lwps.
13533 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13534 pointer. Add OPTIONS argument. Change return type to int. Use
13535 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13536 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13537 pointer. Add status pointer argument. Return a pid instead of a
13538 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13539 changes. In non-stop mode, don't switch to a random thread.
13540 (linux_wait): Rename to...
13541 (linux_wait_1): ... this. Add target_options argument, and handle
13542 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13543 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13544 clean exit and signal exit code. Don't stop all threads in
13545 non-stop mode. In all-stop mode, only stop all threads when
13546 reporting a stop to GDB. Handle explicit thread stop requests.
13547 (async_file_flush, async_file_mark): New.
13548 (linux_wait): New.
13549 (send_sigstop): Use lwpid_of.
13550 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13551 interface changes. In non-stop mode, don't switch to a random
13552 thread.
13553 (linux_resume_one_lwp): Use lwpid_of.
13554 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13555 (linux_resume_one_thread): ... this. Handle resume_stop. In
13556 non-stop mode, don't look for pending flag in all threads.
13557 (resume_status_pending_p): Don't consider explicitly suspended
13558 threads.
13559 (my_waitpid): Reimplement. Emulate __WALL.
13560 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13561 Use lwpid_of.
13562 (sigchld_handler, linux_supports_non_stop, linux_async)
13563 (linux_start_non_stop): New.
13564 (linux_target_ops): Register linux_supports_non_stop, linux_async
13565 and linux_start_non_stop.
13566 (initialize_low): Install SIGCHLD handler.
13567 * thread-db.c (thread_db_create_event, find_one_thread)
13568 (thread_db_get_tls_address): Use lwpid_of.
13569 * win32-low.c (win32_detach): Adjust to use resume_kind.
13570 (win32_wait): Add `options' argument.
13571 * spu-low.c (spu_resume): Adjust to use resume_kind.
13572 (spu_wait): Add `options' argument.
13573
5b1c542e
PA
135742009-04-01 Pedro Alves <pedro@codesourcery.com>
13575
13576 Decouple target code from remote protocol.
13577
13578 * target.h (enum target_waitkind): New.
13579 (struct target_waitstatus): New.
13580 (struct target_ops) <wait>: Return an unsigned long. Take a
13581 target_waitstatus pointer instead of a char pointer.
13582 (mywait): Likewise.
13583 * target.c (mywait): Change prototype to return an unsigned long.
13584 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13585 * server.h (thread_from_wait, old_thread_from_wait): Delete
13586 declarations.
13587 (prepare_resume_reply): Change prototype to take a
13588 target_waitstatus.
13589 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13590 (last_status, last_ptid): New.
13591 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13592 pid instead of a signal.
13593 (attach_inferior): Remove "status" and "signal" parameters.
13594 Adjust.
13595 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13596 not as an address.
13597 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13598 (handle_v_requests, myresume): Remove "status" and "signal"
13599 parameters. Adjust.
13600 (handle_status): New.
13601 (main): Delete local `status'. Adjust.
13602 * remote-utils.c: Include target.h.
13603 (prepare_resume_reply): Change prototype to take a
13604 target_waitstatus. Adjust.
13605
13606 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13607 interface.
13608 * spu-low.c (spu_wait): Adjust.
13609 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13610 Delete.
13611 (win32_wait): Adjust.
13612
2bd7c093
PA
136132009-04-01 Pedro Alves <pedro@codesourcery.com>
13614
13615 * target.h (struct thread_resume): Delete leave_stopped member.
13616 (struct target_ops): Add a `n' argument to the `resume' callback.
13617 * server.c (start_inferior): Adjust.
13618 (handle_v_cont, myresume): Adjust.
13619 * linux-low.c (check_removed_breakpoint): Adjust to resume
13620 interface change, and to removed leave_stopped field.
13621 (resume_ptr): Delete.
13622 (struct thread_resume_array): New.
13623 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13624 resume interface change.
13625 (linux_continue_one_thread, linux_queue_one_thread)
13626 (resume_status_pending_p): Check if the resume field is NULL
13627 instead of checking the leave_stopped member.
13628 (linux_resume): Adjust to the target resume interface change.
13629 * spu-low.c (spu_resume): Adjust to the target resume interface
13630 change.
13631 * win32-low.c (win32_detach, win32_resume): Ditto.
13632
c35fafde
PA
136332009-04-01 Pedro Alves <pedro@codesourcery.com>
13634
13635 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13636 flag.
13637 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13638 pending.
13639 (linux_continue_one_thread): Only preserve the stepping flag if
13640 there's a pending breakpoint.
13641
0a59d50b
PA
136422009-03-31 Pedro Alves <pedro@codesourcery.com>
13643
13644 * server.c (main): After the inferior having exited, call
13645 remote_close before exiting gdbserver.
13646
f04c6d38
TJB
136472009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13648
13649 Fix size of FPSCR in Power 7 processors.
13650 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13651 (PPC_FEATURE_HAS_DFP): New #define.
13652 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13653 size of the FPSCR.
13654
78e5cee6
PA
136552009-03-23 Pedro Alves <pedro@codesourcery.com>
13656
13657 * server.c (handle_query) Whitespace and formatting.
13658
1b3f6016
PA
136592009-03-22 Pedro Alves <pedro@codesourcery.com>
13660
13661 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13662 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13663 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13664 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13665 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13666 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13667 Makefile.in, configure.ac: Fix whitespace throughout.
13668 * configure: Regenerate.
13669
a07b2135
PA
136702009-03-22 Pedro Alves <pedro@codesourcery.com>
13671
13672 * inferiors.c (find_inferior): Make it safe for the callback
13673 function to delete the currently iterated inferior.
13674
67cc2626
PA
136752009-03-22 Pedro Alves <pedro@codesourcery.com>
13676
13677 * Makefile.in (linuw_low_h): Move higher.
13678 (thread-db.o): Depend on $(linux_low_h).
13679
54a0b537
PA
136802009-03-17 Pedro Alves <pedro@codesourcery.com>
13681
13682 Rename "process" to "lwp" throughout.
13683
13684 * linux-low.c (all_processes): Rename to...
13685 (all_lwps): ... this.
13686 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13687 (add_process): Rename to ...
13688 (add_lwp): ... this. Adjust.
13689 (linux_create_inferior): Adjust.
13690 (linux_attach_lwp): Adjust.
13691 (linux_attach): Adjust.
13692 (linux_kill_one_process): Rename to ...
13693 (linux_kill_one_lwp): ... this. Adjust.
13694 (linux_kill): Adjust.
13695 (linux_detach_one_process): Rename to ...
13696 (linux_detach_one_lwp): ... this. Adjust.
13697 (linux_detach): Adjust.
13698 (check_removed_breakpoint): Adjust.
13699 (status_pending_p): Adjust.
13700 (linux_wait_for_process): Rename to ...
13701 (linux_wait_for_lwp): ... this. Adjust.
13702 (linux_wait_for_event): Adjust.
13703 (send_sigstop): Adjust.
13704 (wait_for_sigstop): Adjust.
13705 (stop_all_processes): Rename to ...
13706 (stop_all_lwps): ... this.
13707 (linux_resume_one_process): Rename to ...
13708 (linux_resume_one_lwp): ... this. Adjust.
13709 (linux_set_resume_request, linux_continue_one_thread)
13710 (linux_queue_one_thread, resume_status_pending_p)
13711 (usr_store_inferior_registers, regsets_store_inferior_registers)
13712 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13713 Adjust.
13714 * linux-low.h (get_process): Rename to ...
13715 (get_lwp): ... this. Adjust.
13716 (get_thread_process): Rename to ...
13717 (get_thread_lwp): ... this. Adjust.
13718 (get_process_thread): Rename to ...
13719 (get_lwp_thread): ... this. Adjust.
13720 (struct process_info): Rename to ...
13721 (struct lwp_info): ... this.
13722 (all_processes): Rename to ...
13723 (all_lwps): ... this.
13724 * proc-service.c (ps_lgetregs): Adjust.
13725 * thread-db.c (thread_db_create_event, find_one_thread)
13726 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13727
0b16c5cf
PA
137282009-03-14 Pedro Alves <pedro@codesourcery.com>
13729
13730 * server.c (handle_query): Handle "qAttached".
13731
32de4b9d
NS
137322009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13733
13734 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13735 GPLv3, update license URL.
13736
2aecd87f
DE
137372009-03-01 Doug Evans <dje@google.com>
13738
93efd302 13739 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13740 (server_h): Add gdb_signals.h.
13741 (signals.o): Update.
13742 * server.h (target_signal_from_host,target_signal_to_host_p)
13743 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13744
86b1f9c5
PM
137452009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13746
13747 * remote-utils.c (getpkt): Also generate remote-debug
13748 information if noack_mode is set.
13749
4aa995e1
PA
137502009-02-06 Pedro Alves <pedro@codesourcery.com>
13751
13752 * server.c (handle_query): Report qXfer:siginfo:read and
13753 qXfer:siginfo:write as supported and handle them.
13754 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13755 * linux-low.c (linux_xfer_siginfo): New.
13756 (linux_target_ops): Set it.
13757
62709adf
PA
137582009-01-26 Pedro Alves <pedro@codesourcery.com>
13759
13760 * server.c (gdbserver_usage): Mention --remote-debug.
13761 (main): Accept '--remote-debug' switch.
13762
aef93bd7
DE
137632009-01-18 Doug Evans <dje@google.com>
13764
13765 * regcache.c (new_register_cache): No need to check result of xcalloc.
13766 * server.c (handle_search_memory): Back out calls to xmalloc,
13767 result is checked and error is returned to user upon failure.
13768 (handle_query): Ditto. Add more checks for result of malloc.
13769 (handle_v_cont): Check result of malloc, report error back to
13770 user upon failure.
13771 (handle_v_run): Ditto. Call freeargv.
13772 * server.h (freeargv): Declare.
13773 * utils.c (freeargv): New fn.
13774
54363045
DE
137752009-01-15 Doug Evans <dje@google.com>
13776
f626972c
DE
13777 * gdbreplay.c (perror_with_name): Make arg const char *.
13778 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13779 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13780 * utils.c (perror_with_name): Make arg const char *.
54363045 13781
18aae699
PA
137822009-01-14 Pedro Alves <pedro@codesourcery.com>
13783
13784 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13785 when handling a EXIT_PROCESS_DEBUG_EVENT.
13786
ff703abe
JB
137872009-01-06 Joel Brobecker <brobecker@adacore.com>
13788
13789 * gdbreplay.c (gdbreplay_version): Update copyright year.
13790 * server.c (gdbserver_version): Likewise.
13791
f21cc1a2 137922009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13793
13794 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13795 (handle_extended_wait): Improve comment.
0e21c1ec 13796
bca929d3
DE
137972008-12-13 Doug Evans <dje@google.com>
13798
13799 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13800 * server.h (ATTR_MALLOC): New macro.
13801 (xmalloc,xcalloc,xstrdup): Declare.
13802 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13803 * inferiors.c: Ditto.
13804 * linux-low.c: Ditto.
13805 * mem-break.c: Ditto.
13806 * regcache.c: Ditto.
13807 * remote-utils.c: Ditto.
13808 * server.c: Ditto.
13809 * target.c: Ditto.
13810 * win32-low.c: Ditto.
13811
97438e3f
DE
138122008-12-12 Doug Evans <dje@google.com>
13813
896c7fbb
DE
13814 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13815 in debugging printf.
13816
97438e3f
DE
13817 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13818
e3b886f8
DE
138192008-12-09 Doug Evans <dje@google.com>
13820
13821 * linux-low.h (struct process_info): Delete member tid, unused.
13822 * thread-db.c (find_one_thread): Update.
13823 (maybe_attach_thread): Update.
13824
07e059b5
VP
138252008-12-02 Pedro Alves <pedro@codesourcery.com>
13826
889bf7c5
PA
13827 * target.h (struct target_ops): Add qxfer_osdata member.
13828 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13829 and dirent.h.
13830 (linux_qxfer_osdata): New functions.
13831 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13832 callback.
13833 * server.c (handle_query): Handle "qXfer:osdata:read:".
13834 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13835 (buffer_xml_printf): New functions.
13836 * server.h (struct buffer): New.
13837 (buffer_grow_str, buffer_grow_str0): New macros.
13838 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13839 (buffer_xml_printf): Declare.
07e059b5 13840
4cab47ab
DE
138412008-11-24 Doug Evans <dje@google.com>
13842
13843 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13844
f142445f
DJ
138452008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13846
13847 * server.c (handle_v_run): Always use the supplied argument list.
13848
d0107bb6 138492008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13850
d0107bb6
BW
13851 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13852 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13853
2c4ad781
TJB
138542008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13855
13856 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13857 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13858 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13859 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13860 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13861 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13862 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13863 XML target descriptions.
13864 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13865 when inferior is running on an ISA 2.05 or later processor. Add
13866 special case to return offset for full 64-bit slot of FPSCR when
13867 in 32-bits.
13868
dfb64f85
DJ
138692008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13870
13871 * Makefile.in (SFILES, clean): Added sparc64 files.
13872 (reg-sparc64.o, reg-sparc64.c): New.
13873 * configure.srv (sparc*-*-linux*): New configuration.
13874 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13875 syscall arguments for SPARC.
13876 (regsets_store_inferior_registers): Likewise.
13877 * linux-sparc-low.c: New file.
13878
66b6e1dd
DE
138792008-10-21 Doug Evans <dje@google.com>
13880
13881 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13882 (READLINE_DIR,READLINE_DEP): Delete.
13883 (INTERNAL_CFLAGS): Update.
13884 (LINTFLAGS): Update.
13885
9b710a42
PA
138862008-10-10 Pedro Alves <pedro@codesourcery.com>
13887
13888 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13889 whole argv from the last run, not just argv[0].
13890
5822d809
PA
138912008-09-08 Pedro Alves <pedro@codesourcery.com>
13892
13893 * regcache.c (new_register_cache): Return NULL if the register
13894 cache size isn't known yet.
13895 (free_register_cache): Avoid dereferencing a NULL regcache.
13896
74aac56f
DJ
138972008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13898
13899 * configure.srv: Merge MIPS and MIPS64.
13900
400b20f5
MR
139012008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13902
13903 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13904
677c5bb1
LM
139052008-08-18 Luis Machado <luisgpm@br.ibm.com>
13906
13907 * Makefile.in: Add required vsx dependencies.
13908
13909 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13910 Declare init_registers_powerpc_vsx32l.
13911 Declare init_registers_powerpc_vsx64l.
13912 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13913 (ppc_arch_setup): Check for VSX in hwcap.
13914 (ppc_fill_vsxregset): New function.
13915 (ppc_store_vsxregset): New function.
13916 Add new VSX entry in regset_info target_regsets.
13917
13918 * configure.srv: Add new VSX dependencies.
13919
a6f3e723
SL
139202008-08-12 Pedro Alves <pedro@codesourcery.com>
13921
13922 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13923 (remote_open): Set or clear transport_is_reliable.
13924 (putpkt_binary): Don't expect acks in noack mode.
13925 (getpkt): Don't send ack/nac in noack mode.
13926 * server.c (handle_general_set): Handle QStartNoAckMode.
13927 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13928 qSupported.
13929 (main): Reset noack_mode on every connection.
13930 * server.h (noack_mode): Declare.
13931
a417dc56
RW
139322008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13933
13934 * Makefile.in (GDBREPLAY_OBS): New variable.
13935 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13936
3221518c
UW
139372008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13938 Daniel Jacobowitz <dan@codesourcery.com>
13939
13940 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13941 (usr_store_inferior_registers): Likewise.
13942 (regsets_store_inferior_registers): Likewise.
13943
ec56be1b
PA
139442008-07-31 Rolf Jansen <rj@surtec.com>
13945 Pedro Alves <pedro@codesourcery.com>
13946
13947 * configure.ac: Check for memmem declaration.
13948 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13949 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13950 (disable_packet_qfThreadInfo): Unconditionally compile.
13951 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13952 * configure, config.in: Regenerate.
13953
2fe5e3ff
DE
139542008-07-28 Doug Kwan <dougkwan@google.com>
13955
13956 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13957 (linux_write_memory): Remove declaration of errno.
13958
836acd6d
UW
139592008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13960
13961 * linux-low.c (handle_extended_wait): Do not use "status"
13962 variable uninitialized.
13963
aeba519e
PA
139642008-07-07 Pedro Alves <pedro@codesourcery.com>
13965
13966 * server.c (handle_v_attach): Inhibit reporting dll changes.
13967
db42f210
PA
139682008-06-27 Pedro Alves <pedro@codesourcery.com>
13969
13970 * remote-utils.c (prepare_resume_reply): If requested, don't
13971 output "thread:TID" in the T stop reply.
13972
13973 * server.c (disable_packet_vCont, disable_packet_Tthread)
13974 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13975 (handle_query): If requested, disable support for qC, qfThreadInfo
13976 and qsThreadInfo.
13977 (handle_v_requests): If requested, disable support for vCont.
13978 (gdbserver_show_disableable): New.
13979 (main): Handle --disable-packet and --disable-packet=LIST.
13980
13981 * server.h (disable_packet_vCont, disable_packet_Tthread)
13982 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13983
8e4c5421
CD
139842008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13985
13986 * server.c (gdbserver_usage): Mention --version.
13987
6e23a804
DJ
139882008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13989
13990 * Makefile.in (gdbreplay.o): New rule.
13991
90aa6a40
JM
139922008-06-06 Joseph Myers <joseph@codesourcery.com>
13993
13994 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13995 message, not gdbserver.
13996
c16158bc 139972008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13998 Nathan Sidwell <nathan@codesourcery.com>
13999 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
14000
14001 * acinclude.m4: Include ../../config/acx.m4.
14002 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14003 * configure, config.in: Regenerate.
14004 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14005 * server.c (gdbserver_version): Print PKGVERSION.
14006 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14007 (main): Adjust gdbserver_usage calls.
14008 * gdbreplay.c (version, host_name): Add declarations.
14009 (gdbreplay_version, gdbreplay_usage): New.
14010 (main): Accept --version and --help options.
14011
aeb75bf5
DJ
140122008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14013
14014 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14015 (arm_breakpoint_at): Handle Thumb.
14016 (the_low_target): Add comment.
14017
76b233dd
UW
140182008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14019
14020 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14021
08388c79
DE
140222008-05-09 Doug Evans <dje@google.com>
14023
a3c83fae
DE
14024 * server.h (decode_search_memory_packet): Declare.
14025 * remote-utils.c (decode_search_memory_packet): New fn.
14026 * server.c (handle_search_memory_1): New fn.
08388c79
DE
14027 (handle_search_memory): New fn.
14028 (handle_query): Process qSearch:memory packets.
14029
bb9c3d36
UW
140302008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14031
14032 * regcache.c (registers_length): Remove.
14033 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14034 full register packet.
14035 * regcache.h (registers_length): Remove prototype.
14036 * server.h (PBUFSIZ): Define to 16384.
14037
7284e1be
UW
140382008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14039
14040 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14041 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14042 powerpc-64l.o, and powerpc-altivec64l.o.
14043 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14044 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14045 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14046 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14047 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14048 to srv_xmlfiles.
14049
14050 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14051 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14052 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14053 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14054 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14055 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14056 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14057 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14058 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14059 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14060 (clean): Update.
14061
14062 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14063 (init_registers_powerpc_32l): ... this new prototype.
14064 (init_registers_powerpc_32): Remove, replace by ...
14065 (init_registers_powerpc_altivec32l): ... this new prototype.
14066 (init_registers_powerpc_e500): Remove, replace by ...
14067 (init_registers_powerpc_e500l): ... this new prototype.
14068 (init_registers_ppc64): Remove, replace by ...
14069 (init_registers_powerpc_64l): ... this new prototype.
14070 (init_registers_powerpc_64): Remove, replace by ...
14071 (init_registers_powerpc_altivec64l): ... this new prototype.
14072 (ppc_num_regs): Set to 73.
14073 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14074 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14075 (ppc_cannot_store_register): Handle orig_r3 and trap.
14076 (ppc_arch_setup): Update init_registers_... calls.
14077 (ppc_fill_gregset): Handle orig_r3 and trap.
14078
14079 * inferiors.c (clear_inferiors): Reset current_inferior.
14080
fdc59709
PB
140812008-04-23 Paolo Bonzini <bonzini@gnu.org>
14082
889bf7c5
PA
14083 * acinclude.m4: Add override.m4.
14084 * configure: Regenerate.
fdc59709 14085
c9b2f845
UW
140862008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14087
14088 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14089 initial call to init_register_ppc64.
14090
550512b8
UW
140912008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14092
43aaf8b6
PA
14093 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14094 single powerpc*-*-linux* case.
550512b8
UW
14095 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14096
b6430ec3
UW
140972008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14098
14099 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 14100 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
14101 from reg_xmlfiles.
14102 * linux-ppc-low.c: Include <elf.h>.
14103 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14104 (ppc_hwcap): New global variable.
14105 (ppc_regmap): Remove __SPE__ #ifdef sections.
14106 (ppc_regmap_e500): New global variable.
14107 (ppc_cannot_store_register): Update __SPE__ special case.
14108 (ppc_get_hwcap): New function.
14109 (ppc_arch_setup): Use it to determine whether inferior supports
14110 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14111 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14112 Do not access registers if target does not support AltiVec.
14113 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14114 Do not access registers if target does not support SPE.
14115 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14116
52fa2412
UW
141172008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14118
14119 * linux-low.c (disabled_regsets, num_regsets): New.
14120 (use_regsets_p): Delete.
14121 (linux_wait_for_process): Clear disabled_regsets.
14122 (regsets_fetch_inferior_registers): Check and set it.
14123 (regsets_store_inferior_registers): Likewise.
14124 (linux_fetch_registers, linux_store_registers): Do not use
14125 use_regsets_p.
14126 (initialize_low): Allocate disabled_regsets.
14127
e28b3332
DJ
141282008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14129
14130 * Makefile.in (LIBOBJS): New.
14131 (OBS): Use LIBOBJS.
14132 (memmem.o): New rule.
14133 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14134 * configure: Regenerated.
14135
4536995d
UW
141362008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14137
14138 * server.c (handle_query): Never return "unsupported" for
14139 qXfer:features:read queries.
14140
221c031f
UW
141412008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14142
14143 * server.c (get_features_xml): Fix inverted condition.
14144 (handle_query): Always support qXfer:feature:read.
14145
ccd213ac
DJ
141462008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14147
14148 * server.c (wrapper_argv): New.
14149 (start_inferior): Handle wrapper_argv. If set, expect an extra
14150 trap.
14151 (gdbserver_usage): Document --wrapper.
14152 (main): Parse --wrapper.
14153
6fe305f7
UW
141542008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14155
14156 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14157 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14158 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14159 (ppc_set_pc): Likewise.
14160 (ppc_arch_setup): New function.
14161 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14162 of collect_register.
889bf7c5 14163 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 14164
5b0a002e
UW
141652008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14166
14167 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14168 instead of linux-ppc64-low.o.
14169 * linux-ppc64-low.c: Remove file.
14170 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14171 (linux-ppc64-low.o): Remove rule.
14172
14173 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14174 (init_registers_powerpc_64): Likewise.
14175 (ppc_regmap): Conditionally define depending on __powerpc64__.
14176 (ppc_cannot_store_register): Do not special-case "fpscr" when
14177 compiled on __powerpc64__.
14178 (ppc_collect_ptrace_register): New function.
14179 (ppc_supply_ptrace_register): New function.
14180 (ppc_breakpoint): Change type to "unsigned int".
14181 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14182 (the_low_target): Conditionally provide initializers for the
889bf7c5 14183 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
14184 collect_ptrace_register and supply_ptrace_register members.
14185
9b4b61c8
UW
141862008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14187
14188 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14189 * server.c (gdbserver_xmltarget): Define.
14190 (get_features_xml): Use it to replace "target.xml" and arch_string.
14191
14192 * configure.srv: Remove srv_xmltarget. Add XML files that were
14193 mentioned there to srv_xmlfiles instead. Remove conditional tests
14194 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14195 srv_xmlfiles and srv_regobj to include all possible choices.
14196 * configure.ac (srv_xmltarget): Remove.
14197 (srv_xmlfiles): Do not add "target.xml".
14198 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14199 checks for supplementary target information.
14200 * configure: Regenerate.
14201 * Makefile.in (XML_TARGET): Remove.
14202 (target.xml): Remove rule.
14203 (clean): Do not clean up target.xml.
14204 (.PRECIOUS): Do not mention target.xml.
14205
14206 * target.h (struct target_ops): Remove arch_string member.
14207 * linux-low.c (linux_arch_string): Remove.
14208 (linux_target_ops): Remove arch_string initializer.
14209 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14210 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14211 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14212 * spu-low.c (spu_arch_string): Remove.
14213 (spu_target_ops): Remove arch_string initializer.
14214 * win32-low.c (win32_arch_string): Remove.
14215 (win32_target_ops): Remove arch_string initializer.
14216 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14217 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14218 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14219
ee1a7ae4
UW
142202008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14221
14222 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14223 by collect_ptrace_register and supply_ptrace_register hooks.
14224 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14225 instead of checking for the_low_target.left_pad_xfer.
14226 (usr_store_inferior_registers): Use collect_ptrace_register callback
14227 instead of checking for the_low_target.left_pad_xfer.
14228
14229 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14230 (s390_supply_ptrace_register): Likewise.
14231 (s390_fill_gregset): Call s390_collect_ptrace_register.
14232 (the_low_target): Update.
14233
14234 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14235 (ppc_supply_ptrace_register): Likewise.
14236 (the_low_target): Update.
14237
14238 * linux-i386-low.c (the_low_target): Update.
14239 * linux-x86-64-low.c (the_low_target): Update.
14240
d61ddec4
UW
142412008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14242
14243 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14244 reg-s390.o and reg-s390x.o.
14245
14246 * linux-low.c (new_inferior): New global variable.
14247 (linux_create_inferior, linux_attach): Set it.
14248 (linux_wait_for_process): Call the_low_target.arch_setup after the
14249 target has stopped for the first time.
14250 (initialize_low): Do not call the_low_target.arch_setup.
14251
14252 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14253 (s390_set_pc): Likewise.
14254 (s390_arch_setup): New function.
14255 (the_low_target): Use s390_arch_setup as arch_setup routine.
14256
14257 * regcache.c (realloc_register_cache): New function.
14258 (set_register_cache): Call it for each existing regcache.
14259
d05b4ac3
UW
142602008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14261
14262 * server.h (init_registers): Remove prototype.
14263
14264 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14265 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14266 instead of init_registers ().
14267 * linux-arm-low.c (init_registers_arm): Add prototype.
14268 (init_registers_arm_with_iwmmxt): Likewise.
14269 (the_low_target): Add initializer for arch_setup field.
14270 * linux-cris-low.c (init_registers_cris): Add prototype.
14271 (the_low_target): Add initializer for arch_setup field.
14272 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14273 (the_low_target): Add initializer for arch_setup field.
14274 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14275 (the_low_target): Add initializer for arch_setup field.
14276 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14277 (the_low_target): Add initializer for arch_setup field.
14278 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14279 (the_low_target): Add initializer for arch_setup field.
14280 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14281 (the_low_target): Add initializer for arch_setup field.
14282 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14283 (init_registers_mips64_linux): Likewise.
14284 (the_low_target): Add initializer for arch_setup field.
14285 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14286 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14287 (the_low_target): Add initializer for arch_setup field.
14288 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14289 (init_registers_powerpc_64): Likewise.
14290 (the_low_target): Add initializer for arch_setup field.
14291 * linux-s390-low.c (init_registers_s390): Add prototype.
14292 (init_registers_s390x): Likewise.
14293 (the_low_target): Add initializer for arch_setup field.
14294 * linux-sh-low.c (init_registers_sh): Add prototype.
14295 (the_low_target): Add initializer for arch_setup field.
14296 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14297 (the_low_target): Add initializer for arch_setup field.
14298 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14299 (the_low_target): Add initializer for arch_setup field.
14300
14301 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14302 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14303 instead of init_registers ().
14304 * win32-arm-low.c (init_registers_arm): Add prototype.
14305 (the_low_target): Add initializer for arch_setup field.
14306 * win32-i386-low.c (init_registers_i386): Add prototype.
14307 (the_low_target): Add initializer for arch_setup field.
14308
14309 * spu-low.c (init_registers_spu): Add prototype.
14310 (initialize_low): Call initialie_registers_spu () instead of
14311 initialize_registers ().
14312
fd96d250
PA
143132008-02-19 Pedro Alves <pedro@codesourcery.com>
14314
14315 * server.c (handle_v_requests): When handling the vRun and vAttach
14316 packets, if already debugging a process, don't kill it. Return an
14317 error instead.
14318
d41b6bb4
DJ
143192008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14320
14321 * server.c (handle_query): Correct length check.
14322
5ac588cf
PA
143232008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14324
14325 * win32-low.c (do_initial_child_stuff): Add process handle
14326 parameter. Set current_process_handle and current_process_id from the
14327 parameters. Clear globals.
14328 (win32_create_inferior): Don't set current_process_handle and
14329 current_process_id here. Instead pass them on the call to
14330 do_initial_child_stuff.
14331 (win32_attach): Likewise.
14332 (win32_clear_inferiors): New.
14333 (win32_kill): Don't close the current process handle or the
14334 current thread handle here. Instead call win32_clear_inferiors.
14335 (win32_detach): Don't open a new handle to the process. Call
14336 win32_clear_inferiors.
14337 (win32_join): Don't rely on current_process_handle; open a new
14338 handle using the process id.
14339 (win32_wait): Call win32_clear_inferiors when the inferior process
14340 has exited.
14341
ecd7ecbc
DJ
143422008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14343
14344 * server.c (monitor_show_help): Add "exit".
14345
1525d545
MG
143462008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14347
ecd7ecbc 14348 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
14349 (clean): Add reg-xtensa.c.
14350 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
14351 * configure.srv (xtensa*-*-linux*) New target.
14352 * linux-xtensa-low.c: New.
14353 * xtensa-xtregs.c: New.
1525d545 14354
59a016f0
PA
143552008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14356
14357 * hostio.c: Don't include errno.h.
14358 (errno_to_fileio_errno): Move to hostio-errno.
14359 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14360 error number outputting to the target->hostio_last_error callback.
14361 (hostio_packet_error): Use FILEIO_EINVAL directly.
14362 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14363 calls to hostio_error.
14364 * hostio-errno.c: New.
14365 * server.h (hostio_last_error_from_errno): Declare.
14366 * target.h (target_ops): Add hostio_last_error member.
14367 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14368 as hostio_last_error handler.
889bf7c5 14369 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
14370 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14371 (wince_hostio_last_error): New functions.
14372 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14373 as hostio_last_error handler.
14374 (win32_target_ops) [!_WIN32_WCE]: Register
14375 hostio_last_error_from_errno as hostio_last_error handler.
14376 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14377 (hostio-errno.o): New rule.
14378 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14379 * configure.srv (srv_hostio_err_objs): New variable. Default to
14380 hostio-errno.o.
14381 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14382 * configure: Regenerate.
14383
2d717e4f
DJ
143842008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14385
14386 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14387 (linux_kill, linux_detach): Clean up the process list.
14388 * remote-utils.c (remote_open): Improve port number parsing.
14389 (putpkt_binary, input_interrupt): Only send interrupts if the target
14390 is running.
14391 * server.c (extended_protocol): Make static.
14392 (attached): Define earlier.
14393 (exit_requested, response_needed, program_argv): New variables.
14394 (target_running): New.
14395 (start_inferior): Clear attached here.
14396 (attach_inferior): Set attached here.
14397 (require_running): Define.
14398 (handle_query): Use require_running and target_running. Implement
14399 "monitor exit".
14400 (handle_v_attach, handle_v_run): New.
14401 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14402 (gdbserver_usage): Update.
14403 (main): Redo argument parsing. Handle --debug and --multi. Handle
14404 --attach along with other options or after the port. Save
14405 program_argv. Support no initial program. Resynchronize
14406 communication with GDB after an error. Handle "monitor exit".
14407 Use require_running and target_running. Always allow the extended
14408 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14409 restart in extended mode.
14410 * README: Refer to the GDB manual. Update --attach usage.
14411
7407e2de
AS
144122007-12-20 Andreas Schwab <schwab@suse.de>
14413
14414 * linux-low.c (STACK_SIZE): Define.
14415 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14416 (linux_test_for_tracefork): Likewise.
14417
b65d95c5
DJ
144182007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14419
14420 * linux-low.c (linux_wait_for_event): Update messages. Do not
14421 reinsert auto-delete breakpoints.
14422 * mem-break.c (struct breakpoint): Change return type of handler to
14423 int.
14424 (set_breakpoint_at): Update handler type.
14425 (reinsert_breakpoint_handler): Return 1 instead of calling
14426 delete_breakpoint.
14427 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14428 setting a new one.
14429 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14430 * mem-break.h (set_breakpoint_at): Update handler type.
14431 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14432 * win32-low.c (auto_delete_breakpoint): New.
14433 (get_child_debug_event): Use it.
14434
4e799345
DJ
144352007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14436
14437 * configure.ac: Check for pread and pwrite.
14438 * hostio.c (handle_pread): Fall back to lseek and read.
14439 (handle_pwrite): Fall back to lseek and write.
14440 * config.in, configure: Regenerated.
14441
27524b67
DJ
144422007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14443
14444 * server.c (myresume): Add own_buf argument.
14445 (main): Update calls.
14446
a20d5e98
DJ
144472007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14448
14449 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14450 * remote-utils.c (remote_open): Do not call disable_async_io.
14451 (block_async_io): Delete.
14452 (unblock_async_io): Make static.
14453 (initialize_async_io): New.
14454 * server.c (handle_v_cont): Handle async I/O here.
14455 (myresume): Likewise. Move other common resume tasks here...
14456 (main): ... from here. Call initialize_async_io. Disable async
14457 I/O before the main loop.
14458 * server.h (initialize_async_io): Declare.
14459 (block_async_io, unblock_async_io): Delete prototypes.
14460 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14461
b79d787e
DJ
144622007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14463
14464 * remote-utils.c (readchar): Allow binary data in received messages.
14465
d97903b2
PA
144662007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14467
14468 * win32-low.c (attaching): New global.
14469 (win32_create_inferior): Clear the `attaching' global.
14470 (win32_attach): Set the `attaching' global.
14471 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14472 attaching. Only set a breakpoint at the entry point if not
14473 attaching.
14474
311de423
PA
144752007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14476
14477 * server.c (main): Don't report dll events on the initial
14478 connection on attaches.
14479
6c2d16d2
PA
144802007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14481
14482 * server.c (main): Relax numerical bases supported for the pid of
14483 the --attach command line argument.
14484
5ca906e6
PA
144852007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14486
14487 * win32-low.c (win32_attach): Call OpenProcess before
14488 DebugActiveProcess, not after. Add last error output to error
14489 call.
14490
9c6c8194
PA
144912007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14492
14493 * win32-low.c (win32_get_thread_context)
14494 (win32_set_thread_context): New functions.
14495 (thread_rec): Use win32_get_thread_context.
14496 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14497 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14498 field.
14499
4d5d1aaa
PA
145002007-12-03 Leo Zayas
14501 Pedro Alves <pedro_alves@portugalmail.pt>
14502
14503 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14504 global variables.
14505 (child_add_thread): Minor cleanup.
14506 (child_continue): Resume artificially suspended threads before
14507 calling ContinueDebugEvent.
14508 (suspend_one_thread): New.
14509 (fake_breakpoint_event): New.
14510 (get_child_debug_event): Change return type to int. Check here if
14511 gdb sent an interrupt request. If a soft interrupt was requested,
14512 fake a breakpoint event. Return 0 if there is no event to handle,
14513 and 1 otherwise.
14514 (win32_wait): Don't check here if gdb sent an interrupt request.
14515 Ensure there is a valid event to handle.
14516 (win32_request_interrupt): Add soft interruption method as last
14517 resort.
14518
c436e841
PA
145192007-12-03 Leo Zayas
14520 Pedro Alves <pedro_alves@portugalmail.pt>
14521
14522 * win32-low.h (win32_thread_info): Add descriptions to the
14523 structure members. Replace `suspend_count' counter by a
14524 `suspended' flag.
14525 * win32-low.c (thread_rec): Update condition of when to get the
14526 context from the inferior. Rely on ContextFlags being set if it
14527 has already been retrieved. Only suspend the inferior thread if
14528 we haven't already. Warn if that fails.
14529 (continue_one_thread): s/suspend_count/suspended/. Only call
14530 ResumeThread once. Warn if that fails.
14531
e7b5fa67
PA
145322007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14533
14534 * win32-low.c (win32_wait): Don't read from the inferior when it
14535 has already exited.
14536
a385171d
PA
145372007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14538
14539 * Makefile.in (win32_low_h): New variable.
14540 (win32-low.o): Add dependency on $(win32_low_h).
14541 (win32-arm-low.o, win32-i386-low.o): New rules.
14542
f80c84b3
DJ
145432007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14544
14545 * hostio.c: Correct copyright year.
14546
a6b151f1
DJ
145472007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14548
14549 * Makefile.in (OBS): Add hostio.o.
14550 (hostio.o): New rule.
14551 * server.h (handle_vFile): Declare.
14552 * hostio.c: New file.
14553 * server.c (handle_v_requests): Take packet_len and new_packet_len
14554 for binary packets. Call handle_vFile.
14555 (main): Update call to handle_v_requests.
14556
f9387fc3
DJ
145572007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14558
14559 * linux-low.c: Include <sched.h>.
14560
51c2684e
DJ
145612007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14562
14563 * linux-low.c (linux_tracefork_grandchild): New.
14564 (linux_tracefork_child): Use clone.
14565 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14566
75f83163
JB
145672007-10-31 Joel Brobecker <brobecker@adacore.com>
14568
14569 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14570
da5898ce
DJ
145712007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14572
14573 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14574
24a09b5f
DJ
145752007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14576
14577 * inferiors.c (change_inferior_id): Delete.
14578 (add_pid_to_list, pull_pid_from_list): New.
14579 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14580 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14581 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14582 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14583 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14584 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14585 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14586 (using_threads): Always set to 1.
14587 (handle_extended_wait): New.
14588 (add_process): Do not set TID.
14589 (linux_create_inferior): Set must_set_ptrace_flags.
14590 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14591 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14592 (linux_thread_alive): Rename TID argument to LWPID.
14593 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14594 (linux_wait_for_event): Do not use TID or check using_threads. Update
14595 call to dead_thread_notify. Call handle_extended_wait.
14596 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14597 (send_sigstop): Delete sigstop_sent.
14598 (wait_for_sigstop): Avoid TID.
14599 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14600 (linux_test_for_tracefork): New.
14601 (linux_lookup_signals): Use thread_db_active and
14602 linux_supports_tracefork_flag.
14603 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14604 * linux-low.h (get_process_thread): Avoid TID.
14605 (struct process_ifo): Move thread_known and tid to the end. Remove
14606 sigstop_sent.
14607 (linux_attach_lwp, thread_db_init): Update prototypes.
14608 * server.h (change_inferior_id): Delete prototype.
14609 (add_pid_to_list, pull_pid_from_list): New prototypes.
14610 * thread-db.c (thread_db_use_events): New.
14611 (find_first_thread): Rename to...
14612 (find_one_thread): ...this. Update callers and messages. Do not
14613 call fatal. Check thread_db_use_events. Do not call
14614 change_inferior_id or new_thread_notify.
14615 (maybe_attach_thread): Update. Do not call new_thread_notify.
14616 (thread_db_init): Set thread_db_use_events. Check use_events.
14617 * utils.c (fatal, warning): Correct message prefix.
14618
30ed0a8f
DJ
146192007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14620
14621 * Makefile.in (clean): Remove new files.
14622 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14623 (powerpc-64.o, powerpc-64.c): New rules.
14624 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14625 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14626 with SPE.
14627 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14628 SPE targets.
14629 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14630 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14631 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14632 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14633 (target_regsets): Add AltiVec and SPE register sets.
14634 * configure.ac: Check for AltiVec and SPE.
14635 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14636 (ppc_fill_vrregset, ppc_store_vrregset): New.
14637 (target_regsets): Add AltiVec register set.
14638 * configure: Regenerated.
14639
fd462a61
DJ
146402007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14641
14642 * linux-low.c (O_LARGEFILE): Define.
14643 (linux_read_memory): Use /proc/PID/mem.
14644 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14645 * configure, config.in: Regenerated.
14646
69f223ed
DJ
146472007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14648
14649 * linux-low.c (linux_wait_for_event): Do not pass signals while
14650 single-stepping.
14651
aec18585
PA
146522007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14653
14654 * win32-low.c (create_process): New.
14655 (win32_create_inferior): Use create_process instead of
14656 CreateProcess. If create_process failed retry appending an ".exe"
14657 suffix. Store the GetLastError result immediatelly after
14658 create_process calls and use it on the call to error.
14659
34d86ddd
PA
146602007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14661
14662 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14663
5a0e3bd0
JB
146642007-08-23 Joel Brobecker <brobecker@adacore.com>
14665
14666 * configure.ac: Switch license to GPLv3.
14667
f88c79e6
MS
146682007-08-01 Michael Snyder <msnyder@access-company.com>
14669
14670 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14671
6b3d9b83
PA
146722007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14673
14674 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14675 typedef.
14676 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14677 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14678 CloseToolhelp32Snapshot.
14679 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14680 CloseToolhelp32Snapshot.
14681
c588c53c
MS
146822007-07-27 Michael Snyder <michael.snyder@access-company.com>
14683
14684 * server.c (main): Check for inferior exit before main loop.
14685
aa0403d9
PA
146862007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14687
14688 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14689 instead of on tmp_desc.
14690
255e7678
DJ
146912007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14692 Daniel Jacobowitz <dan@codesourcery.com>
14693
14694 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14695 (add_thread): Minor cleanups.
14696 (clear_inferiors): Move lower in the file. Clear the DLL
14697 list.
14698 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14699 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14700 (xml_escape_text): New.
14701 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14702 for qSupported.
14703 (handle_v_cont): Report errors.
14704 (gdbserver_version): Update.
14705 (main): Correct size of own_buf. Do not report initial DLL events.
14706 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14707 (unloaded_dll, xml_escape_text): New.
14708 * win32-low.c (enum target_waitkind): Update comments.
14709 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14710 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14711 (win32_EnumProcessModules, win32_GetModuleInformation)
14712 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14713 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14714 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14715 (win32_Module32First, win32_Module32Next, load_toolhelp)
14716 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14717 (get_child_debug_event): Handle DLL events.
14718 (win32_wait): Likewise.
14719
0d37add9
DJ
147202007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14721
14722 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14723 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14724
45e2715e
PA
147252007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14726
14727 * win32-low.c (handle_output_debug_string): Ignore event if not
14728 waiting.
14729
c5674cf1
PA
147302007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14731
14732 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14733
2bbe3cc1
DJ
147342007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14735
14736 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14737
ae13219e
DJ
147382007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14739
14740 * inferiors.c (change_inferior_id): Add comment.
14741 * linux-low.c (check_removed_breakpoint): Add an early
14742 prototype. Improve debug output.
14743 (linux_attach): Doc update.
14744 (linux_detach_one_process, linux_detach): Clean up before releasing
14745 each process.
14746 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14747 * linux-low.h (struct process_info): Doc improvement.
14748 * mem-break.c (delete_all_breakpoints): New.
14749 * mem-break.h (delete_all_breakpoints): New prototype.
14750 * thread-db.c (find_first_thread): New.
14751 (thread_db_create_event): Call it instead of
14752 thread_db_find_new_threads. Clean up unused variables.
14753 (maybe_attach_thread): Remove first thread handling.
14754 (thread_db_find_new_threads): Use find_first_thread.
14755 (thread_db_get_tls_address): Likewise.
14756
4105de34
DJ
147572007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14758
14759 * thread-db.c (thread_db_find_new_threads): Add prototype.
14760 (thread_db_create_event): Check for the main thread before adding
14761 a new thread.
14762 (maybe_attach_thread): Only enable event reporting if TID == 0.
14763 (thread_db_get_tls_address): Check for new threads.
14764
2b876972
DJ
147652007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14766
14767 * linux-low.c (linux_create_inferior): Try execv before execvp.
14768 * spu-low.c (spu_create_inferior): Likewise.
14769
7a245884
DJ
147702007-06-13 Mike Frysinger <vapier@gentoo.org>
14771
14772 * linux-low.c (linux_create_inferior): Change execv to execvp.
14773 * spu-low.c (spu_create_inferior): Likewies.
14774
117ce543
DJ
147752007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14776
14777 * Makefile.in (clean): Clean new files instead of deleted ones.
14778 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14779 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14780 rules.
14781 * configure.srv: Specify XML files and new regformats for MIPS and
14782 MIPS64 GNU/Linux.
14783 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14784 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14785 an entry for the restart register.
14786 (mips_cannot_fetch_register, mips_cannot_store_register)
14787 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14788 register names to match the XML descriptions.
14789 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14790 restart register instead of $0.
14791
0e7f50da
UW
147922007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14793 Markus Deuling <deuling@de.ibm.com>
14794
14795 * remote-utils.c (decode_xfer_write): New function.
14796 * server.h (decode_xfer_write): Add prototype.
14797 * server.c (handle_query): Add PACKET_LEN argument. Support
14798 qXfer:spu:read and qXfer:spu:write packets.
14799 (main): Pass packet_len to handle_query.
14800 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14801 * target.h (target_ops): Add qxfer_spu.
14802
374c1d38
UW
148032007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14804
14805 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14806 accessing non-seekable spufs files.
14807
bb63802a
UW
148082007-05-16 Markus Deuling <deuling@de.ibm.com>
14809
889bf7c5 14810 * server.c (handle_query): Add reply for qC packet.
bb63802a 14811
7390519e
PA
148122007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14813 Leo Zayas <lerele@champenstudios@com>
14814
14815 * server.h (check_remote_input_interrupt_request): New function.
14816 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14817 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14818 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14819 (check_remote_input_interrupt_request): New function.
14820 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14821 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14822 winapi_GenerateConsoleCtrlEvent): New typedefs.
14823 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14824 to 250 ms.
14825 (win32_wait): Check for remote interrupt request
14826 with check_remote_input_interrupt_request.
14827 (win32_request_interrupt): New function.
14828 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14829
34b34921
PA
148302007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14831
14832 * win32-low.c (debug_registers_changed,
14833 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14834 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14835 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14836 (thread_rec): Get context using the low target.
14837 (child_add_thread): Call thread_added on the low target,
14838 which does the same thing.
14839 (regptr): Delete.
14840 (do_initial_child_stuff): Remove debug registers references.
14841 Set context using the low target. Resume threads after
14842 setting the contexts.
14843 (child_continue): Remove dead variable. Remove debug
14844 registers references.
14845 (child_fetch_inferior_registers): Go through the low target.
14846 (do_child_store_inferior_registers): Remove.
14847 (child_store_inferior_registers): Go through the low target.
14848 (win32_resume): Remove debug registers references.
14849 Set context using the low target.
14850 (handle_exception): Change return type to void. Don't record
14851 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14852 first chance exception.
889bf7c5 14853 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14854 goto loop. Always return after waiting for debug event.
14855 (win32_wait): Convert to switch statement. Handle spurious
14856 events.
14857
14858 * win32-i386-low.c (debug_registers_changed,
14859 debug_registers_used): New.
14860 (initial_stuff): Rename to ...
14861 (i386_initial_stuff): ... this. Clear debug registers
14862 state variables.
14863 (store_debug_registers): Delete.
14864 (i386_get_thread_context): New.
14865 (load_debug_registers): Delete.
14866 (i386_set_thread_context): New.
14867 (i386_thread_added): New.
14868 (single_step): Rename to ...
14869 (i386_single_step): ... this.
14870 (do_fetch_inferior_registers): Rename to ...
14871 (i386_fetch_inferior_register): ... this.
14872 (i386_store_inferior_register): New.
14873 (the_low_target): Adapt to new interface.
14874
14875 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14876 (arm_get_thread_context): New.
14877 (arm_set_thread_context): New.
14878 (regptr): New.
14879 (do_fetch_inferior_registers): Rename to ...
14880 (arm_fetch_inferior_register): ... this.
14881 (arm_store_inferior_register): New.
14882 (arm_wince_breakpoint): Reimplement as unsigned long.
14883 (arm_wince_breakpoint_len): Define.
14884 (the_low_target): Adapt to new interface.
14885
14886 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14887 load_debug_registers. Add get_thread_context, set_thread_context,
14888 thread_added and store_inferior_register. Rename
14889 fetch_inferior_registers to fetch_inferior_register.
14890 (regptr): Remove declaration.
14891
dd6953e1
PA
148922007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14893
14894 * linux-low.c (linux_detach): Change return type to int. Return 0.
14895 * spu-low.c (spu_detach): Likewise.
14896
444d6139
PA
148972007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14898
14899 * target.h (target_ops): Change return type of detach to int.
14900 Add join.
14901 (join_inferior): New.
14902 * server.c (main): Don't skip detach support on mingw32.
14903 If the inferior doesn't support detaching return error.
14904 Call join_inferior instead of using waitpid.
14905 * linux-low.c (linux_join): New.
14906 (linux_target_op): Add linux_join.
14907 * spu-low.c (spu_join): New.
14908 (spu_target_ops): Add spu_join.
14909 * win32-low.c (win32_detach): Adapt to new interface.
14910 Reopen current_process_handle before detaching. Issue a child
14911 resume before detaching.
14912 (win32_join): New.
14913 (win32_target_op): Add win32_join.
14914
1d5315fe
PA
149152007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14916
14917 * win32-low.c (win32-attach): Fix return value.
14918 * target.h (target_ops): Describe ATTACH return values.
14919
bf914831
PA
149202007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14921
14922 * win32-low.c (GETPROCADDRESS): Define.
14923 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14924 (winapi_DebugSetProcessKillOnExit): Likewise.
14925 (win32_create_inferior): Force usage of ansi CreateProcessA.
14926 (win32_attach): Use GETPROCADDRESS.
14927 (win32_detach): Likewise.
14928
f72f3e60
PA
149292007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14930
14931 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14932
ed50f18f
PA
149332007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14934
14935 * win32-low.c: Commit leftover changes from 2007-03-29.
14936
0c2ead7e
DJ
149372007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14938
14939 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14940 fields short instead of int. Add explicit padding.
14941 (i387_cache_to_fsave): Remove unnecessary casts.
14942 (i387_fsave_to_cache): Doc fix.
14943 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14944
73725ff3
DJ
149452007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14946
14947 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14948 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14949
d99f33d8
PA
149502007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14951
14952 * configure.srv (arm*-*-mingw32ce*): Move near the other
14953 arm targets.
14954
68070c10
PA
149552007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14956
2482afc6 14957 * configure.ac: Add errno checking.
68070c10
PA
14958 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14959 sys/file.h and malloc.h.
14960 (AC_CHECK_DECLS): Add perror.
14961 (srv_mingwce): Handle.
2482afc6 14962 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14963 win32-i386-low.o to srv_tgtobj.
14964 (i[34567]86-*-mingw*): Likewise.
14965 (arm*-*-mingw32ce*): Add case.
14966 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14967 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14968 [__MINGW32CE__] (strerror): New function.
14969 [__MINGW32CE__] (errno): Define to GetLastError.
14970 [__MINGW32CE__] (COUNTOF): New macro.
14971 (remote_open): Remove extra close call.
14972 * mem-break.c (delete_breakpoint_at): New function.
14973 * mem-break.h (delete_breakpoint_at): Declare.
14974 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14975 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14976 [USE_WIN32API] (read, write): Add char* casts.
14977 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14978 * server.h: Include wincecompat.h on Windows CE.
14979 [HAVE_ERRNO_H]: Check.
14980 (perror): Declare if not declared.
14981 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14982 (perror_with_name): Remove errno declaration.
14983 * wincecompat.h: New.
14984 * wincecompat.c: New.
14985 * win32-low.h: New.
14986 * win32-arm-low.c: New.
14987 * win32-i386-low.c: New.
14988 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14989 (OUTMSG2): Make it safe.
14990 (_T): New macro.
14991 (COUNTOF): New macro.
14992 (NUM_REGS): Get it from the low target.
14993 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14994 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14995 (thread_rec): Let low target handle debug registers.
14996 (child_add_thread): Likewise.
14997 (child_init_thread_list): Likewise.
14998 (continue_one_thread): Likewise.
14999 (regptr): New.
15000 (do_child_fetch_inferior_registers): Move to ...
15001 * win32-i386-low.c: ... here, and rename to ...
15002 (do_fetch_inferior_registers): ... this.
889bf7c5 15003 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
15004 Go through the low target.
15005 (do_child_store_inferior_registers): Use regptr.
15006 (strwinerror): New function.
15007 (win32_create_inferior): Handle Windows CE.
15008 Use strwinerror instead of strerror on Windows error
15009 codes. Add program to the error output.
15010 Don't close the main thread handle on Windows CE.
15011 (win32_attach): Use coredll.dll on Windows CE.
15012 (win32_kill): Close current process and current
15013 thread handles.
15014 (win32_detach): Use coredll.dll on Windows CE.
15015 (win32_resume): Let low target handle debug registers, and
15016 step request.
15017 (handle_exception): Add/Remove initial breakpoint. Avoid
15018 non-existant WSTOPSIG on Windows CE.
15019 (win32_read_inferior_memory): Cast to remove warning.
15020 (win32_arch_string): Go through the low target.
15021 (initialize_low): Call set_breakpoint_data with the low
15022 target's breakpoint.
15023 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15024 FOP_REGNUM, mappings): Move to ...
15025 * win32-i386-low.c: ... here.
15026 * win32-low.c (win32_thread_info): Move to ...
15027 * win32-low.h: ... here.
15028 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15029 win32-arm-low.c and wincecompat.c.
15030 (all:): Add $EXEEXT.
15031 (install-only:): Likewise.
15032 (gdbserver:): Likewise.
15033 (gdbreplay:): Likewise.
15034 * config.in: Regenerate.
15035 * configure: Regenerate.
15036
41093d81
PA
150372007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15038
15039 * win32-low.c: Rename typedef thread_info to
15040 win32_thread_info throughout.
15041
544afa54
PA
150422007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15043
15044 * win32-i386-low.c: Rename to ...
15045 * win32-low.c: ... this.
15046 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15047 * Makefile.in: Likewise.
15048
bce7165d
PA
150492007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15050
15051 * remote-utils.c (monitor_output): Constify msg parameter.
15052 * server.h (monitor_output): Likewise.
15053 * win32-i386-low.c (handle_output_debug_string): New.
15054 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15055 handle_output_debug_string.
15056 (get_child_debug_event): Likewise.
15057
506c7aa0
DJ
150582007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15059
15060 * server.c (main): Correct strtoul check.
15061
42c81e2a
DJ
150622007-03-27 Jon Ringle <jon@ringle.org>
15063
15064 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15065
9453113a
DJ
150662007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15067
15068 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15069
64a69107
DJ
150702007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15071
15072 * terminal.h: Check HAVE_SGTTY_H.
15073
150742007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
15075
15076 * remote-utils.c (remote_open): Print out the assigned port number.
15077
c74d0ad8
DJ
150782007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15079
15080 * remote-utils.c (monitor_output): New function.
15081 * server.c (debug_threads): Define here.
15082 (monitor_show_help): New function.
15083 (handle_query): Handle qRcmd.
15084 (main): Do not handle 'd' packet.
15085 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15086 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15087 of debug_threads.
15088
de7c3b4a
PA
150892007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15090
15091 * Makefile.in (EXEEXT): New.
15092 (clean): Use $(EXEEXT).
15093
ef57601b
PA
150942007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15095
15096 * target.h (target_ops): Rename send_signal to request_interrupt,
15097 and remove enum target_signal parameter.
15098 * linux-low.c (linux_request_interrupt): Rename from
15099 linux_send_signal, and always send SIGINT.
15100 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15101 and always send SIGINT.
15102 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15103 of send_signal.
15104 (input_interrupt): Likewise.
15105
820f2bda
PA
151062007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15107
15108 * server.c (get_features_xml): Check if target implemented
15109 arch_string.
15110 * win32-i386-low.c (win32_arch_string): New.
15111 (win32_target_ops): Add win32_arch_string as arch_string member.
15112
ab39bf24
UW
151132007-02-22 Markus Deuling <deuling@de.ibm.com>
15114
15115 * spu-low.c (spu_arch_string): New.
15116 (spu_target_ops): Add spu_arch_string.
15117
61ff6e04
DJ
151182007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15119
15120 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15121 * configure.ac: Do not check for terminal.h.
15122 * configure, config.in: Regenerated.
15123
fb1e4ffc
DJ
151242007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15125
15126 * Makefile.in (OBS): Add $(XML_BUILTIN).
15127 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15128 (clean): Update.
15129 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15130 (arm-with-iwmmxt.c): New.
15131 * config.in, configure: Regenerate.
15132 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15133 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15134 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15135 (arm*-*-linux*): Add iWMMXt and regset support.
15136 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15137 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15138 (arm_store_wmmxregset, target_regsets): New.
15139 * server.c (get_features_xml): Take annex argument. Check builtin
15140 XML documents.
15141 (handle_query): Handle multiple annexes.
15142
0f48aa01
DJ
151432007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15144
15145 * remote-utils.c [USE_WIN32API] (read, write): Define.
15146 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15147 write.
15148
23181151
DJ
151492007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15150
15151 * linux-i386-low.c (the_low_target): Set arch_string.
15152 * linux-x86-64-low.c (the_low_target): Likewise.
15153 * linux-low.c (linux_arch_string): New.
15154 (linux_target_ops): Add it.
15155 * linux-low.h (struct linux_target_ops): Add arch_string.
15156 * server.c (write_qxfer_response): Use const void * for DATA.
15157 (get_features_xml): New.
15158 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15159 * target.h (struct target_ops): Add arch_string method.
15160
9d606399
DJ
151612007-01-03 Denis Pilat <denis.pilat@st.com>
15162 Daniel Jacobowitz <dan@codesourcery.com>
15163
15164 * linux-low.c (linux_kill): Handle being called with no threads.
15165 * win32-i386-low.c (win32_kill): Likewise.
15166 (get_child_debug_event): Clear current_process_handle.
15167
151682006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
15169 Daniel Jacobowitz <dan@codesourcery.com>
15170
15171 * remote-utils.c (remote_open): Check the type of specified
15172 serial port devices before opening them.
15173 * server.c (main): Kill the inferior if an error occurs during
15174 the first remote_open.
15175
a5e13d24
DJ
151762006-12-05 Markus Deuling <deuling@de.ibm.com>
15177
15178 * README: Update supported targets.
15179
186947f7
DJ
151802006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15181
15182 * Makefile.in (clean): Remove reg-mips64.c.
15183 (reg-mips64.c, reg-mips64.o): New rules.
15184 * configure.srv: Handle mips64. Include regset support for mips.
15185 * linux-mips-low.c (union mips_register): New.
15186 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15187 (mips_breakpoint, mips_breakpoint_at): Use int.
15188 (mips_collect_register, mips_supply_register)
15189 (mips_collect_register_32bit, mips_supply_register_32bit)
15190 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15191 (mips_store_fpregset, target_regsets): New.
15192 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15193
a13e2c95
UW
151942006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15195
15196 * configure.srv: Add target "spu*-*-*".
15197 * Makefile.in (clean): Remove reg-spu.c.
15198 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15199 * spu-low.c: New file.
15200
cb7283db
DJ
152012006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15202
15203 * configure.ac: Correct td_thr_tls_get_addr test.
15204 * configure: Regenerated.
15205
89be2091
DJ
152062006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15207
15208 * linux-low.c (linux_wait_for_event): Reformat. Use the
15209 pass_signals array.
15210 * remote-utils.c (decode_address_to_semicolon): New.
15211 * server.c (pass_signals, handle_general_set): New.
15212 (handle_query): Mention QPassSignals for qSupported.
15213 (main): Call handle_general_set.
15214 * server.h (pass_signals, decode_address_to_semicolon): New.
15215
000ef4f0
DJ
152162006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15217
15218 * server.c (handle_query): Correct error handling for read_auxv.
15219
b7149293
UW
152202005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15221
15222 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15223 and srv_linux_thread_db to yes.
15224 * linux-s390-low.c (s390_fill_gregset): New function.
15225 (target_regsets): Define data structure.
15226
dae5f5cf
DJ
152272006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15228
15229 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15230 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15231 * config.in, configure: Regenerated.
15232 * inferiors.c (gdb_id_to_thread): New function.
15233 (gdb_id_to_thread_id): Use it.
15234 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15235 * linux-low.h (struct process_info): Add th member.
15236 (thread_db_get_tls_address): New prototype.
15237 * remote-utils.c (decode_address): Make non-static.
15238 * server.c (handle_query): Handle qGetTLSAddr.
15239 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15240 * target.h (struct target_ops): Add get_tls_address.
15241 * thread-db.c (maybe_attach_thread): Save the thread handle.
15242 (thread_db_get_tls_address): New.
15243
32ca6d61
DJ
152442006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15245
15246 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15247 (linux_resume_one_process): Take a siginfo_t *. Update all
15248 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15249 (struct pending_signals): Add a siginfo_t.
15250 (linux_wait_for_process): Always set last_status.
15251 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15252 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15253 * linux-low.h (struct process_info): Add last_status.
15254
5ffff7c1
DJ
152552006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15256
15257 * remote-utils.c (try_rle): New function.
15258 (putpkt_binary): Use it.
15259
8695c747
DJ
152602006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15261
15262 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15263 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15264 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15265 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15266 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15267 point registers.
15268
290fadea
RS
152692006-08-08 Richard Sandiford <richard@codesourcery.com>
15270
15271 * server.c (terminal_fd): New variable.
15272 (old_foreground_pgrp): Likewise.
15273 (restore_old_foreground_pgrp): New function.
15274 (start_inferior): Record the terminal file descriptor in terminal_fd
15275 and its original foreground group in old_foreground_pgrp. Register
15276 restore_old_foreground_pgrp with atexit().
15277
9f2e1e63
DJ
152782006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15279
15280 * server.c (handle_query): Correct qPart to qXfer.
15281
b80864fb
DJ
152822006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15283
15284 * configure.ac: Check for more headers which are missing on
15285 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15286 * configure.srv: Add Cygwin and mingw32.
15287 * remote-utils.c: Don't include headers unconditionally which
15288 are missing on mingw32. Include <winsock.h> for mingw32.
15289 (remote_open): Adjust for mingw32 support. Flush
15290 standard error after writing to it.
15291 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15292 (unblock_async_io, enable_async_io, disable_async_io)
15293 (readchar, getpkt): Update for Winsock support.
15294 (prepare_resume_reply): Expect a protocol signal number.
15295 * server.c: Disable <sys/wait.h> on mingw32.
15296 (start_inferior): Adjust for mingw32 support. Flush
15297 standard error after writing to it.
15298 (attach_inferior): Likewise. Use protocol signal
15299 numbers.
15300 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15301 and names.
15302 * win32-i386-low.c: New file.
15303 * Makefile.in (XM_CLIBS): Set.
15304 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15305 (win32-i386-low.o): New dependency rule.
15306 * linux-low.c (linux_wait): Use target signal numbers.
15307 * target.h (struct target_ops): Doc fix.
15308 * server.h (target_signal_to_name): New prototype.
15309 * gdbreplay.c: Don't include headers unconditionally which
15310 are missing on mingw32. Include <winsock.h> for mingw32.
15311 (remote_close, remote_open): Adjust for Winsock support.
15312 * configure, config.in: Regenerated.
15313
0876f84a
DJ
153142006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15315
15316 * server.c (decode_xfer_read, write_qxfer_response): New.
15317 (handle_query): Take a packet length argument. Handle
15318 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15319 the qSupported response.
15320 (main): Update call to handle_query.
15321
01f9e8fa
DJ
153222006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15323
15324 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15325 (putpkt_binary): Renamed from putpkt and adjusted for binary
15326 data.
15327 (putpkt): New wrapper for putpkt_binary.
15328 (readchar): Don't mask off the high bit.
15329 (decode_X_packet): New function.
15330 * server.c (main): Call putpkt_binary if a handler sets the packet
15331 length. Save the length of the incoming packet. Handle 'X'.
15332 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15333
be2a5f71
DJ
153342006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15335
15336 * server.c (handle_query): Handle qSupported.
15337
ea025f5f
DJ
153382006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15339
15340 * remote-utils.c (all_symbols_looked_up): New variable.
15341 (look_up_one_symbol): Check it.
15342 * server.h (look_up_one_symbol): New declaration.
15343 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15344
9308fc88
DJ
153452006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15346
15347 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 15348 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
15349 (PTRACE_GET_THREAD_AREA): Define.
15350 (ps_get_thread_area): New function.
15351
52fb6437
NS
153522006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15353
15354 * configure.srv (m68k*-*-uclinux*): New target.
15355 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15356 (linux_resume_one_process): Remove extraneous cast.
15357 (linux_read_offsets): New.
15358 (linux_target_op): Add linux_read_offsets on mmuless systems.
15359 * server.c (handle_query): Add qOffsets logic.
15360 * target.h (struct target_ops): Add read_offsets.
15361
21b0f40c
DJ
153622006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15363
15364 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15365 (PTRACE_GET_THREAD_AREA): Define.
15366 (ps_get_thread_area): New function.
15367 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15368 (linux-x86-64-low.o): Update.
15369
0050a760
DJ
153702006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15371
15372 * configure.ac: Remove checks for prfpregset_t.
15373 * gdb_proc_service.h: New file.
15374 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15375 new "gdb_proc_service.h".
15376 * proc-service.c: Likewise.
15377 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15378 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15379 * Makefile.in (gdb_proc_service_h): Updated.
15380 * configure, config.in: Regenerated.
15381
b92a518e
DJ
153822006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15383
15384 * remote-utils.c (prepare_resume_reply): Move declaration
15385 of gdb_id_from_wait to the top of the block.
15386
545587ee
DJ
153872006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15388
15389 * linux-low.c (regsets_store_inferior_registers): Read the regset
15390 from the target before filling it.
15391
9db87ebd
DJ
153922006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15393
15394 * server.c (attach_inferior): Return SIGTRAP for a successful
15395 attach.
15396
dd24457d
DJ
153972006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15398
15399 * Makefile.in (OBS): Add version.o.
15400 (STAGESTUFF): Delete.
15401 (version.o): Add dependencies.
15402 (version.c): Replace rule.
15403 (clean): Remove version.c.
15404 * server.c (gdbserver_version): New.
15405 (gdbserver_usage): Use printf.
15406 (main): Handle --version and --help.
15407 * server.h (version, host_name): Add declarations.
15408
6f0f660e
EZ
154092005-12-23 Eli Zaretskii <eliz@gnu.org>
15410
889bf7c5
PA
15411 * linux-arm-low.c:
15412 * linux-arm-low.c:
15413 * inferiors.c:
15414 * i387-fp.h:
15415 * i387-fp.c:
15416 * gdbreplay.c:
15417 * regcache.c:
15418 * proc-service.c:
15419 * mem-break.h:
15420 * mem-break.c:
15421 * linux-x86-64-low.c:
15422 * linux-sh-low.c:
15423 * linux-s390-low.c:
15424 * linux-ppc64-low.c:
15425 * linux-ppc-low.c:
15426 * linux-mips-low.c:
15427 * linux-m68k-low.c:
15428 * linux-m32r-low.c:
15429 * linux-low.h:
15430 * linux-low.c:
15431 * linux-ia64-low.c:
15432 * linux-i386-low.c:
15433 * linux-crisv32-low.c:
15434 * thread-db.c:
15435 * terminal.h:
15436 * target.h:
15437 * target.c:
15438 * server.h:
15439 * server.c:
15440 * remote-utils.c:
15441 * regcache.h:
15442 * utils.c:
15443 * Makefile.in:
15444 * configure.ac:
6f0f660e
EZ
15445 * gdbserver.1: Add (C) after Copyright. Update the FSF
15446 address.
15447
9d1fb177
DJ
154482005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15449
15450 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15451 (arm_breakpoint_at): Recognize both breakpoints.
15452 (the_low_target): Use the correct breakpoint instruction.
15453
011a70c2
DJ
154542005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15455
15456 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15457 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15458 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15459 (the_low_target): Update.
15460
7fb85e41
AS
154612005-10-25 Andreas Schwab <schwab@suse.de>
15462
15463 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15464
15465 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15466 (ia64_num_regs): Reduce to 462.
15467
3db0444b
DJ
154682005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15469
15470 * acinclude.m4: Correct quoting.
15471 * aclocal.m4: Regenerated.
15472
15473 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15474 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15475 (thread_db_init): Call thread_db_err_str.
15476 * configure.ac: Check for TD_VERSION.
15477 * config.in, configure: Regenerated.
15478
bee0189a
DJ
154792005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15480
15481 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15482
e9d25b98
DJ
154832005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15484
15485 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15486 is not available. Define HAVE_PTRACE_GETREGS if it is.
15487 * config.in, configure: Regenerated.
15488 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15489 * linux-i386-low.c, linux-m68k-low.c: Update to use
15490 HAVE_PTRACE_GETREGS.
15491 * linux-low.c (regsets_fetch_inferior_registers)
15492 (regsets_store_inferior_registers): Only return 0 if we processed
15493 GENERAL_REGS.
15494 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15495 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15496
a06660f7
DJ
154972005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15498
15499 * inferiors.c (struct thread_info): Add gdb_id.
15500 (add_thread): Add gdb_id argument.
15501 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15502 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15503 calls to add_thread.
15504 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15505 * server.c (handle_query): Use thread_to_gdb_id.
15506 (handle_v_cont, main): Use gdb_id_to_thread_id.
15507 * server.h (add_thread): Update prototype.
15508 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15509 prototypes.
15510
5a1f5858
DJ
155112005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15512
15513 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15514 left-padded registers.
15515 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15516 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15517
e122f1f5
SE
155182005-07-01 Steve Ellcey <sje@cup.hp.com>
15519
15520 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15521 * configure: Regenerate.
15522 * config.in: Regenerate.
15523 * server.h (NEED_DECLARATION_STRERROR):
15524 Replace with !HAVE_DECL_STRERROR.
15525
d592fa2f
DJ
155262005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15527
15528 * linux-low.c (linux_wait, linux_send_signal): Don't test
15529 an unsigned long variable for > 0 if it could be MAX_ULONG.
15530 * server.c (myresume): Likewise.
15531 * target.c (set_desired_inferior): Likewise.
15532
ccbd4912
MK
155332005-06-13 Mark Kettenis <kettenis@gnu.org>
15534
15535 * configure.ac: Simplify and improve check for socklen_t.
15536 * configure, config.in: Regenerate.
15537
f450004a
DJ
155382005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15539
15540 * acconfig.h: Remove.
15541 * configure.ac: Add a test for socklen_t. Use three-argument
15542 AC_DEFINE throughout.
15543 * config.in: Regenerated using autoheader 2.59.
15544 * configure: Regenerated.
15545
15546 * gdbreplay.c (socklen_t): Provide a default.
15547 (remote_open): Use socklen_t.
15548 * remote-utils.c (socklen_t): Provide a default.
15549 (remote_open): Use socklen_t.
15550 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15551 unsigned char.
15552
15553 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15554 char for buffers.
15555 * linux-low.c (linux_read_memory, linux_write_memory)
15556 (linux_read_auxv): Likewise.
15557 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15558 (check_mem_write): Likewise.
15559 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15560 Likewise.
15561 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15562 (registers_from_string, register_data): Likewise.
15563 * server.c (handle_query, main): Likewise.
15564 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15565 (decode_M_packet): Likewise.
15566 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15567 * target.h (struct target_ops): Update read_memory, write_memory,
15568 and read_auxv.
15569 (read_inferior_memory, write_inferior_memory): Update.
15570 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15571 to unsigned char *.
15572 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15573 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15574 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15575 linux-s390-low.c, linux-sh-low.c: Update for changes in
15576 read_inferior_memory and the_low_target->breakpoint.
15577
eee84df1
DJ
155782005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15579
15580 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15581 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15582 * configure.srv: Add powerpc64-*-linux*.
15583 * linux-ppc64-low.c: New file.
15584
45b134e5
OF
155852005-05-23 Orjan Friberg <orjanf@axis.com>
15586
15587 * linux-cris-low.c: New file with support for CRIS.
15588 * linux-crisv32-low.c: Ditto for CRISv32.
15589 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15590 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15591 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15592 reg-crisv32.o, and reg-crisv32.c to make rules.
15593 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15594 recognized targets.
15595
48d93c75
UW
155962005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15597
15598 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15599 of sizeof (PTRACE_XFER_TYPE).
15600 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15601
e013ee27
OF
156022005-05-12 Orjan Friberg <orjanf@axis.com>
15603
889bf7c5 15604 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15605 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15606 pointers for hardware watchpoint support.
15607 * linux-low.h (struct linux_target_ops): Ditto.
15608 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15609 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15610 to linux_target_ops.
15611 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15612 reply packet.
15613 * server.c (main): Recognize 'Z' and 'z' packets.
15614
b0ded00b
UW
156152005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15616
15617 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15618 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15619 (the_low_target): Add new members.
15620
8643e2ad
DJ
156212005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15622
15623 * proc-service.c (ps_lgetregs): Search all_processes instead of
15624 all_threads.
15625
fc620387
DJ
156262005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15627
15628 * server.c (start_inferior): Change return type to int.
15629 (attach_inferior): Change sigptr to int *.
15630 (handle_v_cont, handle_v_requests): Change signal to int *.
15631 (main): Change signal to int.
15632
156332005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15634
15635 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15636 * configure.srv: Add m32r*-*-linux*.
15637 * linux-m32r-low.c: New file.
15638
e0e76420
DJ
156392005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15640
15641 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15642
a1928bad
DJ
156432005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15644
15645 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15646 Take unsigned long arguments for PIDs.
15647 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15648 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15649 (wait_for_sigstop, linux_resume_one_process)
15650 (regsets_fetch_inferior_registers, linux_send_signal)
15651 (linux_read_auxv): Likewise. Update the types of variables holding
15652 PIDs. Update format string specifiers.
15653 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15654 * remote-utils.c (prepare_resume_reply): Likewise.
15655 * server.c (cont_thread, general_thread, step_thread)
15656 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15657 unsigned long.
15658 (handle_query): Update format specifiers.
15659 (handle_v_cont, main): Use strtoul for thread IDs.
15660 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15661 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15662 (general_thread, step_thread, thread_from_wait)
15663 (old_thread_from_wait): Update.
15664 * target.h (struct thread_resume): Use unsigned long for THREAD.
15665 (struct target_ops): Use unsigned long for arguments to attach and
15666 thread_alive.
15667
dcdb98d2
DJ
156682005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15669
15670 * acinclude.m4: Include bfd/bfd.m4 directly.
15671 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15672 <agriffis@toolchain.org>.
15673 * aclocal.m4, configure: Regenerated.
15674
bec39cab
AC
156752005-01-07 Andrew Cagney <cagney@gnu.org>
15676
15677 * configure.ac: Rename configure.in, require autoconf 2.59.
15678 * configure: Re-generate.
15679
434c4c77
DJ
156802004-12-08 Daniel Jacobowitz <dan@debian.org>
15681
15682 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15683 LIBS when finished.
15684 * aclocal.m4: Regenerated.
15685 * configure: Regenerated.
15686
db1d3e1b
AS
156872004-11-21 Andreas Schwab <schwab@suse.de>
15688
15689 * linux-m68k-low.c (m68k_num_gregs): Define.
15690 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15691 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15692 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15693 (m68k_breakpoint_at): New. Add to the_low_target.
15694
15695 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15696 srv_linux_thread_db to yes.
15697
43360365
JB
156982004-10-20 Joel Brobecker <brobecker@gnat.com>
15699
15700 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15701 (ARCH_SET_FS): Likewise.
15702 (ARCH_GET_FS): Likewise.
15703 (ARCH_GET_GS): Likewise.
15704
fd500816
DJ
157052004-10-16 Daniel Jacobowitz <dan@debian.org>
15706
15707 * linux-i386-low.c (ps_get_thread_area): New.
15708 * linux-x86-64-low.c (ps_get_thread_area): New.
15709 * linux-low.c: Include <sys/syscall.h>.
15710 (linux_kill_one_process): Don't kill the first thread here.
15711 (linux_kill): Kill the first thread here.
15712 (kill_lwp): New function.
15713 (send_sigstop, linux_send_signal): Use it.
15714 * proc-service.c: Clean up #ifdefs.
15715 (fpregset_info): Delete.
15716 (ps_lgetregs): Update and enable implementation.
15717 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15718 implementations.
15719 * remote-utils.c (struct sym_cache, symbol_cache): New.
15720 (input_interrupt): Print a clearer message.
15721 (async_io_enabled): New variable.
15722 (enable_async_io, disable_async_io): Use it. Update comments.
15723 (look_up_one_symbol): Use the symbol cache.
15724 * thread-db.c (thread_db_look_up_symbols): New function.
15725 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15726
f6de3c42
DJ
157272004-10-16 Daniel Jacobowitz <dan@debian.org>
15728
15729 * configure.in: Test for -rdynamic.
15730 * configure: Regenerated.
15731 * Makefile (INTERNAL_LDFLAGS): New.
15732 (gdbserver, gdbreplay): Use it.
15733
2c0fc042
AC
157342004-09-02 Andrew Cagney <cagney@gnu.org>
15735
15736 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15737
075b3282
DJ
157382004-03-23 Daniel Jacobowitz <drow@mvista.com>
15739
15740 * linux-low.c (linux_wait): Clear all_processes list also.
15741
fa6a77dc
DJ
157422004-03-12 Daniel Jacobowitz <drow@mvista.com>
15743
15744 * linux-low.c: Include <errno.h>. Remove extern declaration of
15745 errno.
15746
6d782a97
DJ
157472004-03-12 Daniel Jacobowitz <drow@mvista.com>
15748
15749 * gdbreplay.c, server.h, utils.c: Update copyright years.
15750
3a7fb99b
DJ
157512004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15752
15753 * server.c (main): Print child status or termination signal from
15754 variable 'signal', not 'sig'.
15755
c3e735a6
DJ
157562004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15757
15758 * linux-low.c (linux_read_memory): Change return type to
15759 int. Check for and return error from ptrace().
15760 * target.c (read_inferior_memory): Change return type to int. Pass
15761 back return status from the_target->read_memory().
15762 * target.h (struct target_ops): Adapt *read_memory() prototype.
15763 Update comment.
15764 (read_inferior_memory): Adapt prototype.
15765 * server.c (main): Return an error packet if
15766 read_inferior_memory() returns an error.
15767
a59d1c82
DJ
157682004-03-04 Daniel Jacobowitz <drow@mvista.com>
15769
15770 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15771 Unify with other clean targets.
15772
dc3f8883
DJ
157732004-02-29 Daniel Jacobowitz <drow@mvista.com>
15774
15775 * server.c (handle_v_cont): Call set_desired_inferior.
15776
89a208da
DJ
157772004-02-29 Daniel Jacobowitz <drow@mvista.com>
15778
15779 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15780
62ea82f5
DJ
157812004-02-29 Daniel Jacobowitz <drow@mvista.com>
15782
15783 * linux-low.c (linux_wait): Unblock async I/O.
15784 (linux_resume): Block and enable async I/O.
15785 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15786 * server.h (block_async_io, unblock_async_io): Add prototypes.
15787
6910d122
DJ
157882004-02-29 Daniel Jacobowitz <drow@mvista.com>
15789
15790 * remote-utils.c (remote_open): Print a status notice after
15791 opening a TCP port.
15792 * server.c (attach_inferior): Print a status notice after
15793 attaching.
15794
157952004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15796
15797 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15798
c89dc5d4
DJ
157992004-02-26 Daniel Jacobowitz <drow@mvista.com>
15800
15801 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15802 error packet.
15803 * server.c, target.h: Update copyright years.
15804
4b8dad4a
RM
158052004-02-25 Roland McGrath <roland@redhat.com>
15806
15807 * target.h (struct target_ops): New member `read_auxv'.
15808 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15809 * linux-low.c (linux_read_auxv): New function.
15810 (linux_target_ops): Initialize `read_auxv' member to that.
15811
d7446758
JB
158122004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15813
15814 Committed by Jim Blandy <jimb@redhat.com>.
15815
15816 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15817 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15818 instead of GPR_SIZE to distiguish s390 and s390x targets.
15819
5544ad89
DJ
158202004-01-31 Daniel Jacobowitz <drow@mvista.com>
15821
15822 * linux-low.c: Update copyright year.
15823 (check_removed_breakpoint): Clear pending_is_breakpoint.
15824 (linux_set_resume_request, linux_queue_one_thread)
15825 (resume_status_pending_p): New functions.
15826 (linux_continue_one_thread): Use process->resume.
15827 (linux_resume): Only resume threads if there are no pending events.
15828 * linux-low.h (struct process_info): Add resume request
15829 pointer.
15830
2a68b70e
DJ
158312004-01-30 Daniel Jacobowitz <drow@mvista.com>
15832
15833 * regcache.c (new_register_cache): Clear the allocated register
15834 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15835
64386c31
DJ
158362003-10-13 Daniel Jacobowitz <drow@mvista.com>
15837
15838 * linux-low.c (linux_resume): Take a struct thread_resume *
15839 argument.
15840 (linux_wait): Update call.
15841 (resume_ptr): New static variable.
15842 (linux_continue_one_thread): Renamed from
15843 linux_continue_one_process. Use resume_ptr.
15844 (linux_resume): Use linux_continue_one_thread.
15845 * server.c (handle_v_cont, handle_v_requests): New functions.
15846 (myresume): New function.
15847 (main): Handle 'v' case.
15848 * target.h (struct thread_resume): New type.
15849 (struct target_ops): Change argument of "resume" to struct
15850 thread_resume *.
15851 (myresume): Delete macro.
15852
c938e9b0
L
158532003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15854
15855 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15856 (uninstall): Support DESTDIR.
15857
7f313d07
BC
15858Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15859
15860 * configure.srv: Add xscale*linux copy of arm*linux entry.
15861
3b2fc2ea
DJ
158622003-07-24 Daniel Jacobowitz <drow@mvista.com>
15863
15864 * linux-arm-low.c (arm_reinsert_addr): New function.
15865 (the_low_target): Add arm_reinsert_addr.
15866
1c0a559e
MK
158672003-07-08 Mark Kettenis <kettenis@gnu.org>
15868
15869 * mem-break.c: Remove whitespace at end of file.
15870
43d5792c
DJ
158712003-06-28 Daniel Jacobowitz <drow@mvista.com>
15872
15873 * configure.in: Check whether we need to prototype strerror.
15874 * server.h: Optionally prototype strerror.
15875 * gdbreplay.c (perror_with_name): Use strerror.
15876 * linux-low.c (linux_attach_lwp): Use strerror.
15877 * utils.c (perror_with_name): Use strerror.
15878 * config.in, configure: Regenerated.
15879
c8a86edf
DJ
158802003-06-28 Daniel Jacobowitz <drow@mvista.com>
15881
15882 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15883 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15884
73d37363
DJ
158852003-06-20 Daniel Jacobowitz <drow@mvista.com>
15886
15887 * Makefile.in (SFILES): Update.
15888 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15889 low-sun3.c: Remove files.
15890
6ad8ae5c
DJ
158912003-06-17 Daniel Jacobowitz <drow@mvista.com>
15892
15893 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15894 (linux_detach_one_process, linux_detach): New functions.
15895 (linux_target_ops): Add linux_detach.
15896 * server.c (main): Handle 'D' packet.
15897 * target.h (struct target_ops): Add "detach" member.
15898 (detach_inferior): Define.
15899
1581182a
MK
159002003-06-13 Mark Kettenis <kettenis@gnu.org>
15901
15902 From Kelley Cook <kelleycook@wideopenwest.com>:
15903 * configure.srv: Accept i[34567]86 variants.
15904
e5379b03
DJ
159052003-06-05 Daniel Jacobowitz <drow@mvista.com>
15906
15907 * linux-low.c (linux_wait_for_event): Correct comment typos.
15908 (linux_resume_one_process): Call check_removed_breakpoint.
15909 (linux_send_signal): New function.
15910 (linux_target_ops): Add linux_send_signal.
15911 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15912 of kill.
15913 * target.h (struct target_ops): Add send_signal.
15914
2ff29de4
JB
159152003-05-29 Jim Blandy <jimb@redhat.com>
15916
15917 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15918 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15919 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15920 away part of the register's value.
15921
254787d4
DJ
159222003-03-26 Daniel Jacobowitz <drow@mvista.com>
15923
15924 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15925 (linux_wait_for_event, linux_init_signals): Likewise.
15926
94e10508
DJ
159272003-03-17 Daniel Jacobowitz <drow@mvista.com>
15928
15929 * configure.in: Check for stdlib.h.
15930 * configure: Regenerated.
15931 * config.in: Regenerated.
15932
4c0711e0
DJ
159332003-01-04 Andreas Schwab <schwab@suse.de>
15934
15935 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15936
ef66e766
AC
159372003-01-02 Andrew Cagney <ac131313@redhat.com>
15938
15939 * Makefile.in: Remove obsolete code.
15940
a1358604
DJ
159412002-11-20 Daniel Jacobowitz <drow@mvista.com>
15942
15943 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15944 defined(PT_FPR0_HI).
15945
23ce3b1c
DJ
159462002-11-17 Stuart Hughes <seh@zee2.com>
15947
15948 * linux-arm-low.c (arm_num_regs): Increase.
15949 (arm_regmap): Include status register.
15950
159512002-11-17 Daniel Jacobowitz <drow@mvista.com>
15952
15953 * linux-low.c (register_addr): Remove incorrect -1 check.
15954
a9fa9f7d
DJ
159552002-08-29 Daniel Jacobowitz <drow@mvista.com>
15956
15957 * linux-low.c (linux_create_inferior): Call setpgid. Return
15958 the new PID.
15959 (unstopped_p, linux_signal_pid): Remove.
15960 (linux_target_ops): Remove linux_signal_pid.
15961 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15962 global instead of target method.
15963 * target.h (struct target_ops): Remove signal_pid. Update comment
15964 for create_inferior.
15965 * server.c (signal_pid): New variable.
15966 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15967 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15968 (attach_inferior): Set signal_pid.
15969
17574093
DJ
159702002-08-23 Daniel Jacobowitz <drow@mvista.com>
15971
15972 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15973
159742002-08-20 Jim Blandy <jimb@redhat.com>
15975
15976 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15977 default for this.
15978
159792002-08-01 Andrew Cagney <cagney@redhat.com>
15980
15981 * Makefile.in: Make chill references obsolete.
15982
159832002-07-24 Kevin Buettner <kevinb@redhat.com>
15984
15985 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15986 * configure: Regenerate.
15987 * config.in: Regenerate.
15988
159892002-07-09 David O'Brien <obrien@FreeBSD.org>
15990
15991 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15992 (perror_with_name, remote_close, remote_open, expect, play): Static.
15993
159942002-07-04 Michal Ludvig <mludvig@suse.cz>
15995
4b8dad4a 15996 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15997 byte offsets instead of an array of indexes.
15998 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15999
160002002-06-13 Daniel Jacobowitz <drow@mvista.com>
16001
16002 * regcache.c: Add comment.
16003
160042002-06-11 Daniel Jacobowitz <drow@mvista.com>
16005
16006 * thread-db.c: New file.
16007 * proc-service.c: New file.
16008 * acinclude.m4: New file.
16009 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16010 proc-service.o, and thread-db.o.
16011 (linux-low.o): Add USE_THREAD_DB.
16012 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16013 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16014 * aclocal.m4: Regenerated.
16015 * config.in: Regenerated.
16016 * configure: Regenerated.
16017 * configure.in: Check for proc_service.h, sys/procfs.h,
16018 thread_db.h, and linux/elf.h headrs.
16019 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16020 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16021 Check for -lthread_db and thread support.
16022 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16023 PowerPC, and SuperH.
16024 * i387-fp.c: Constify arguments.
16025 * i387-fp.h: Likewise.
16026 * inferiors.c: (struct thread_info): Renamed from
16027 `struct inferior_info'. Remove PID member. Use generic inferior
16028 list header. All uses updated.
16029 (inferiors, signal_pid): Removed.
16030 (all_threads): New variable.
16031 (get_thread): Define.
16032 (add_inferior_to_list): New function.
16033 (for_each_inferior): New function.
16034 (change_inferior_id): New function.
16035 (add_inferior): Removed.
16036 (remove_inferior): New function.
16037 (add_thread): New function.
16038 (free_one_thread): New function.
16039 (remove_thread): New function.
16040 (clear_inferiors): Use for_each_inferior and free_one_thread.
16041 (find_inferior): New function.
16042 (find_inferior_id): New function.
16043 (inferior_target_data): Update argument type.
16044 (set_inferior_target_data): Likewise.
16045 (inferior_regcache_data): Likewise.
16046 (set_inferior_regcache_data): Likewise.
16047 * linux-low.c (linux_bp_reinsert): Remove.
16048 (all_processes, stopping_threads, using_thrads)
16049 (struct pending_signals, debug_threads, pid_of): New.
16050 (inferior_pid): Replace with macro.
16051 (struct inferior_linux_data): Remove.
16052 (get_stop_pc, add_process): New functions.
16053 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16054 Use add_process and add_thread.
16055 (linux_attach_lwp): New function, based on old linux_attach. Use
16056 add_process and add_thread. Set stop_expected for new threads.
16057 (linux_attach): New function.
16058 (linux_kill_one_process): New function.
16059 (linux_kill): Kill all LWPs.
16060 (linux_thread_alive): Use find_inferior_id.
16061 (check_removed_breakpoints, status_pending_p): New functions.
16062 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16063 Update. Use WNOHANG. Wait for cloned processes also. Update process
16064 struct for the found process.
16065 (linux_wait_for_event): New function.
16066 (linux_wait): Use it. Support LWPs.
16067 (send_sigstop, wait_for_sigstop, stop_all_processes)
16068 (linux_resume_one_process, linux_continue_one_process): New functions.
16069 (linux_resume): Support LWPs.
16070 (REGISTER_RAW_SIZE): Remove.
16071 (fetch_register): Use register_size instead. Call supply_register.
16072 (usr_store_inferior_registers): Likewise. Call collect_register.
16073 Fix recursive case.
16074 (regsets_fetch_inferior_registers): Improve error message.
16075 (regsets_store_inferior_registers): Add debugging.
16076 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16077 (unstopped_p, linux_signal_pid): New functions.
16078 (linux_target_ops): Add linux_signal_pid.
16079 (linux_init_signals): New function.
16080 (initialize_low): Call it. Initialize using_threads.
16081 * regcache.c (inferior_regcache_data): Add valid
16082 flag.
16083 (get_regcache): Fetch registers lazily. Add fetch argument
16084 and update all callers.
16085 (regcache_invalidate_one, regcache_invalidate): New
16086 functions.
16087 (new_register_cache): Renamed from create_register_cache.
16088 Return the new regcache.
16089 (free_register_cache): Change argument to a void *.
16090 (registers_to_string, registers_from_string): Call get_regcache
16091 with fetch flag set.
16092 (register_data): Make static. Pass fetch flag to get_regcache.
16093 (supply_register): Call get_regcache with fetch flag clear.
16094 (collect_register): Call get_regcache with fetch flag set.
16095 (collect_register_as_string): New function.
16096 * regcache.h: Update.
16097 * remote-utils.c (putpkt): Flush after debug output and use
16098 stderr.
16099 Handle input interrupts while waiting for an ACK.
16100 (input_interrupt): Use signal_pid method.
16101 (getpkt): Flush after debug output and use stderr.
16102 (outreg): Use collect_register_as_string.
16103 (new_thread_notify, dead_thread_notify): New functions.
16104 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16105 and general_thread.
16106 (look_up_one_symbol): Flush after debug output.
16107 * server.c (step_thread, server_waiting): New variables.
16108 (start_inferior): Don't use signal_pid. Update call to mywait.
16109 (attach_inferior): Update call to mywait.
16110 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16111 (main): Don't fetch/store registers explicitly. Use
16112 set_desired_inferior. Support proposed ``Hs'' packet. Update
16113 calls to mywait.
16114 * server.h: Update.
16115 (struct inferior_list, struct_inferior_list_entry): New.
16116 * target.c (set_desired_inferior): New.
16117 (write_inferior_memory): Constify.
16118 (mywait): New function.
16119 * target.h: Update.
16120 (struct target_ops): New signal_pid method.
16121 (mywait): Removed macro, added prototype.
16122
16123 * linux-low.h (regset_func): Removed.
16124 (regset_fill_func, regset_store_func): New.
16125 (enum regset_type): New.
16126 (struct regset_info): Add type field. Use new operation types.
16127 (struct linux_target_ops): stop_pc renamed to get_pc.
16128 Add decr_pc_after_break and breakpoint_at.
16129 (get_process, get_thread_proess, get_process_thread)
16130 (strut process_info, all_processes, linux_attach_lwp)
16131 (thread_db_init): New.
16132
16133 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16134 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16135 (the_low_target): Add new members.
16136 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16137 (i386_store_fpxregset): Constify.
16138 (target_regsets): Add new kind identifier.
16139 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16140 (i386_set_pc): Add debugging.
16141 (i386_breakpoint_at): New function.
16142 (the_low_target): Add new members.
16143 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16144 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16145 (mips_breakpoint_at): New.
16146 (the_low_target): Add new members.
16147 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16148 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16149 (the_low_target): Add new members.
16150 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16151 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16152 (the_low_target): Add new members.
16153 * linux-x86-64-low.c (target_regsets): Add new kind
16154 identifier.
16155
161562002-05-15 Daniel Jacobowitz <drow@mvista.com>
16157
16158 From Martin Pool <mbp@samba.org>:
16159 * server.c (gdbserver_usage): New function.
16160 (main): Call it.
16161
161622002-05-14 Daniel Jacobowitz <drow@mvista.com>
16163
16164 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16165 stop_at -> stop_pc.
16166
161672002-05-04 Andrew Cagney <ac131313@redhat.com>
16168
16169 * Makefile.in: Remove obsolete code.
16170
161712002-04-24 Michal Ludvig <mludvig@suse.cz>
16172
16173 * linux-low.c (regsets_fetch_inferior_registers),
16174 (regsets_store_inferior_registers): Removed cast to int from
16175 ptrace() calls.
16176 * regcache.h: Added declaration of struct inferior_info.
16177
161782002-04-20 Daniel Jacobowitz <drow@mvista.com>
16179
16180 * inferiors.c (struct inferior_info): Add regcache_data.
16181 (add_inferior): Call create_register_cache.
16182 (clear_inferiors): Call free_register_cache.
16183 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16184 * regcache.c (struct inferior_regcache_data): New.
16185 (registers): Remove.
16186 (get_regcache): New function.
16187 (create_register_cache, free_register_cache): New functions.
16188 (set_register_cache): Don't initialize the register cache here.
16189 (registers_to_string, registers_from_string, register_data): Call
16190 get_regcache.
16191 * regcache.h: Add prototypes.
16192 * server.h: Likewise.
16193
161942002-04-20 Daniel Jacobowitz <drow@mvista.com>
16195
16196 * mem-break.c: New file.
16197 * mem-break.h: New file.
16198 * Makefile.in: Add mem-break.o rule; update server.h
16199 dependencies.
16200 * inferiors.c (struct inferior_info): Add target_data
16201 member.
16202 (clear_inferiors): Free target_data member if set.
16203 (inferior_target_data, set_inferior_target_data): New functions.
16204 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16205 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16206 * linux-low.c (linux_bp_reinsert): New variable.
16207 (struct inferior_linux_data): New.
16208 (linux_create_inferior): Use set_inferior_target_data.
16209 (linux_attach): Likewise. Call add_inferior.
16210 (linux_wait_for_one_inferior): New function.
16211 (linux_wait): Call it.
16212 (linux_write_memory): Add const.
16213 (initialize_low): Call set_breakpoint_data.
16214 * linux-low.h (struct linux_target_ops): Add breakpoint
16215 handling members.
16216 * server.c (attach_inferior): Remove extra add_inferior
16217 call.
16218 * server.h: Include mem-break.h. Update inferior.c
16219 prototypes.
16220 * target.c (read_inferior_memory)
16221 (write_inferior_memory): New functions.
16222 * target.h (read_inferior_memory)
16223 (write_inferior_memory): Change macros to prototypes.
16224 (struct target_ops): Update comments. Add const to write_memory
16225 definition.
16226
162272002-04-11 Daniel Jacobowitz <drow@mvista.com>
16228
16229 * linux-low.c (usr_store_inferior_registers): Support
16230 registers which are allowed to fail to store.
16231 * linux-low.h (linux_target_ops): Likewise.
16232 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16233 (ppc_cannot_store_register): FPSCR may not be storable.
16234
162352002-04-09 Daniel Jacobowitz <drow@mvista.com>
16236
16237 * server.h: Include <string.h> if HAVE_STRING_H.
16238 * ChangeLog: Correct paths in last ChangeLog entry.
16239
162402002-04-09 Daniel Jacobowitz <drow@mvista.com>
16241
16242 * linux-low.h: Remove obsolete prototypes.
16243 (struct linux_target_ops): New.
16244 (extern the_low_target): New.
16245 * linux-low.c (num_regs, regmap): Remove declarations.
16246 (register_addr): Use the_low_target explicitly.
16247 (fetch_register): Likewise.
16248 (usr_fetch_inferior_registers): Likewise.
16249 (usr_store_inferior_registers): Likewise.
16250 * linux-arm-low.c (num_regs): Remove.
16251 (arm_num_regs): Define.
16252 (arm_regmap): Renamed from regmap, made static.
16253 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16254 made static.
16255 (arm_cannot_store_register): Renamed from cannot_store_register,
16256 made static.
16257 (the_low_target): New.
16258 * linux-i386-low.c (num_regs): Remove.
16259 (i386_num_regs): Define.
16260 (i386_regmap): Renamed from regmap, made static.
16261 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16262 made static.
16263 (i386_cannot_store_register): Renamed from cannot_store_register,
16264 made static.
16265 (the_low_target): New.
16266 * linux-ia64-low.c (num_regs): Remove.
16267 (ia64_num_regs): Define.
16268 (ia64_regmap): Renamed from regmap, made static.
16269 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16270 made static.
16271 (ia64_cannot_store_register): Renamed from cannot_store_register,
16272 made static.
16273 (the_low_target): New.
16274 * linux-m68k-low.c (num_regs): Remove.
16275 (m68k_num_regs): Define.
16276 (m68k_regmap): Renamed from regmap, made static.
16277 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16278 made static.
16279 (m68k_cannot_store_register): Renamed from cannot_store_register,
16280 made static.
16281 (the_low_target): New.
16282 * linux-mips-low.c (num_regs): Remove.
16283 (mips_num_regs): Define.
16284 (mips_regmap): Renamed from regmap, made static.
16285 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16286 made static.
16287 (mips_cannot_store_register): Renamed from cannot_store_register,
16288 made static.
16289 (the_low_target): New.
16290 * linux-ppc-low.c (num_regs): Remove.
16291 (ppc_num_regs): Define.
16292 (ppc_regmap): Renamed from regmap, made static.
16293 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16294 made static.
16295 (ppc_cannot_store_register): Renamed from cannot_store_register,
16296 made static.
16297 (the_low_target): New.
16298 * linux-s390-low.c (num_regs): Remove.
16299 (s390_num_regs): Define.
16300 (s390_regmap): Renamed from regmap, made static.
16301 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16302 made static.
16303 (s390_cannot_store_register): Renamed from cannot_store_register,
16304 made static.
16305 (the_low_target): New.
16306 * linux-sh-low.c (num_regs): Remove.
16307 (sh_num_regs): Define.
16308 (sh_regmap): Renamed from regmap, made static.
16309 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16310 made static.
16311 (sh_cannot_store_register): Renamed from cannot_store_register,
16312 made static.
16313 (the_low_target): New.
16314 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16315 (the_low_target): New.
16316
163172002-04-09 Daniel Jacobowitz <drow@mvista.com>
16318
16319 * Makefile.in: Add stamp-h target.
16320 * configure.in: Create stamp-h.
16321 * configure: Regenerated.
16322
163232002-04-09 Daniel Jacobowitz <drow@mvista.com>
16324
16325 * inferiors.c: New file.
16326 * target.c: New file.
16327 * target.h: New file.
16328 * Makefile.in: Add target.o and inferiors.o. Update
16329 dependencies.
16330 * linux-low.c (inferior_pid): New static variable,
16331 moved from server.c.
16332 (linux_create_inferior): Renamed from create_inferior.
16333 Call add_inferior. Return 0 on success instead of a PID.
16334 (linux_attach): Renamed from myattach.
16335 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16336 (linux_thread_alive): Renamed from mythread_alive.
16337 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16338 child dies.
16339 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16340 (regsets_store_inferior_registers): Correct error message.
16341 Add missing ``return 0''.
16342 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16343 (linux_store_registers): Renamed from store_inferior_registers.
16344 (linux_read_memory): Renamed from read_inferior_memory.
16345 (linux_write_memory): Renamed from write_inferior_memory.
16346 (linux_target_ops): New structure.
16347 (initialize_low): Call set_target_ops ().
16348 * remote-utils.c (unhexify): New function.
16349 (hexify): New function.
16350 (input_interrupt): Send signals to ``signal_pid''.
16351 * server.c (inferior_pid): Remove.
16352 (start_inferior): Update create_inferior call.
16353 (attach_inferior): Call add_inferior.
16354 (handle_query): New function.
16355 (main): Call handle_query for `q' packets.
16356 * server.h: Include "target.h". Remove obsolete prototypes.
16357 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16358
163592002-04-09 Daniel Jacobowitz <drow@mvista.com>
16360
16361 * Makefile.in: Add WARN_CFLAGS. Update configury
16362 dependencies.
16363 * configure.in: Check for <string.h>
16364 * configure: Regenerate.
16365 * config.in: Regenerate.
16366 * gdbreplay.c: Include needed system headers.
16367 (remote_open): Remove strchr prototype.
16368 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16369 * regcache.c (supply_register): Change buf argument to const void *.
16370 (supply_register_by_name): Likewise.
16371 (collect_register): Change buf argument to void *.
16372 (collect_register_by_name): Likewise.
16373 * regcache.h: Add missing prototypes.
16374 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16375 * server.c (handle_query): New function.
16376 (attached): New static variable, moved out of main.
16377 (main): Quiet longjmp clobber warnings.
16378 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16379 * utils.c (error): Remove NORETURN.
16380 (fatal): Likewise.
This page took 2.083566 seconds and 4 git commands to generate.