Commonise tdesc_reg and makes use of it in gdbserver tdesc
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
ea3e7d71
AH
12018-04-18 Alan Hayward <alan.hayward@arm.com>
2
3 * Makefile.in: Add common/tdesc.c
4 * tdesc.c (init_target_desc): init all reg_defs from register
5 vector.
6 (tdesc_create_reg): Create tdesc_reg.
7 * tdesc.h (tdesc_feature): Add register vector.
8
17d08cd4
SM
92018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
10
11 * tdesc.h (struct target_desc) <features>: Change type to
12 std::vector<std::string>.
13 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
14 changes.
15 (tdesc_get_features_xml): Likewise.
16 (tdesc_create_feature): Likewise.
17
5cd3e386
AH
182018-03-26 Alan Hayward <alan.hayward@arm.com>
19
20 * regcache.c (find_register_by_number): Return a ref.
21 (find_regno): Use references.
22 (register_size): Likewise.
23 (register_data): Likewise.
24 * tdesc.c (target_desc::~target_desc): Remove free calls.
25 (target_desc::operator==): Use std::vector compare.
26 (init_target_desc): Use reference.
27 (tdesc_create_reg): Use reg constructors.
28 * tdesc.h (struct target_desc): Replace pointer with object.
29
dff7492c
AH
302018-03-23 Alan Hayward <alan.hayward@arm.com>
31
32 * regcache.c (find_register_by_number): Make static.
33 (find_regno): Use find_register_by_number
34 * regcache.h (struct reg): Remove declaration.
35
d80e5242
AH
362018-03-23 Alan Hayward <alan.hayward@arm.com>
37
38 * tdesc.c (target_desc::~target_desc): Move to here.
39 (target_desc::operator==): Likewise.
40 * tdesc.h (target_desc::~target_desc): Move from here.
41 (target_desc::operator==): Likewise.
42
f69c5afb
AA
432018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
44
45 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
46
ce29f843
AA
472018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
48
49 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
50 S390_TDESC_GS.
51 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
52 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
53 and init_registers_s390_gs_linux64.
54
c49bd90b
AA
552018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
56
57 * linux-s390-low.c (s390_fill_gs): Remove function.
58 (s390_fill_gsbc): Remove function.
59 (s390_regsets): Set fill functions for the guarded storage regsets
60 to NULL.
61
7edb9bd3
AA
622018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
63
64 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
65 the word size. Add comment.
66 (s390_get_wordsize): New function.
67 (s390_arch_setup): No longer select a temporary tdesc to fetch the
68 pswm with it. Instead, use s390_get_wordsize to determine the
69 word size first and derive the correct tdesc from that directly.
70
39be3c7e
SM
712018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
72
73 * Makefile.in: Include silent-rules.mk.
74 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
75 (COMPILE): Add ECHO_CXX.
76 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
77 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
78 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
79 (version-generated.c): Add ECHO_GEN.
80 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
81 (IPAGENT_COMPILE): Add ECHO_CXX.
82 (%-generated.c): Add ECHO_REGDAT.
83
3ae9ce5d
TT
842018-03-14 Tom Tromey <tom@tromey.com>
85
86 PR cli/14977:
87 * ax.c (ax_printf): Special case for NULL.
88
e6a58aa8
SM
892018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
90
91 * linux-low.c (linux_qxfer_libraries_svr4): Use
92 xml_escape_text_append.
93
f6e8a41e
SM
942018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
95
96 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
97
b9671caf
SM
982018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
99
100 * server.c (handle_general_set): Remove unnecessary xstrdup.
101
e80aaf61
SM
1022018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
103
104 * server.c (parse_debug_format_options): Adjust to
105 delim_string_to_char_ptr_vec changes.
106 * thread-db.c (thread_db_load_search): Adjust to
107 dirnames_to_char_ptr_vec changes.
108
b1223e78
MM
1092018-03-01 Markus Metzger <markus.t.metzger@intel.com>
110
111 * target.h (target_enable_btrace, target_disable_btrace)
112 (target_read_btrace, target_read_btrace_conf): Turn macro into
113 inline function. Throw error if target method is not defined.
114 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
115 check for btrace target method. Be prepared to handle exceptions
116 from btrace target methods.
117
81561546
SDJ
1182018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
119
120 * server.c (captured_main): Change order of error message printed
121 when the current working directory cannot be found.
122
25e3c82c
SDJ
1232018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
124
125 * server.c: Include "filenames.h" and "pathstuff.h".
126 (program_name): Delete variable.
127 (program_path): New anonymous class.
128 (get_exec_wrapper): Use "program_path" instead of
129 "program_name".
130 (handle_v_run): Likewise.
131 (captured_main): Likewise.
132 (process_serial_event): Likewise.
133
b4987c95
SDJ
1342018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
135
136 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
137 (OBJS): Add "pathstuff.o".
138 * server.c (current_directory): New global variable.
139 (captured_main): Initialize "current_directory".
140
f46cd62a
AH
1412018-02-26 Alan Hayward <alan.hayward@arm.com>
142
143 * tdesc.c: Use common/tdesc.h.
144 * tdesc.h: Likewise.
145
a543c5ca
AH
1462018-02-20 Alan Hayward <alan.hayward@arm.com>
147 Simon Marchi <simon.marchi@ericsson.com>
148
149 * Makefile.in: Switch order of make rules.
150
b5884fa7
AH
1512018-02-19 Alan Hayward <alan.hayward@arm.com>
152
153 * Makefile.in: Add common directory in build.
154 * configure.ac: Add common reference.
155 * configure: Regenerate.
156
de6242d3
MM
1572018-02-09 Markus Metzger <markus.t.metzger@intel.com>
158
159 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
160 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
161 * spu-low.c (spu_target_ops): Likewise.
162 * win32-low.c (win32_target_ops): Likewise.
163 * server.c (supported_btrace_packets): Report packets unconditionally.
164 * target.h (target_ops) <supports_btrace>: Remove.
165 (target_supports_btrace): Remove.
166
9ee23a85
MM
1672018-02-09 Markus Metzger <markus.t.metzger@intel.com>
168
169 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
170 (handle_btrace_disable): Change return type to void. Use exceptions
171 to report errors.
172 (handle_btrace_general_set): Catch exception and copy message to
173 return message.
174
8ce47547
TT
1752018-02-08 Tom Tromey <tom@tromey.com>
176
177 * linux-low.c (install_software_single_step_breakpoints): Use
178 make_scoped_restore.
179 * inferiors.c (make_cleanup_restore_current_thread): Remove.
180 (do_restore_current_thread_cleanup): Remove.
181 * gdbthread.h (make_cleanup_restore_current_thread): Don't
182 declare.
183
45dd3607
TT
1842018-02-08 Tom Tromey <tom@tromey.com>
185
186 * mem-break.c (set_raw_breakpoint_at): Use
187 gdb::unique_xmalloc_ptr.
188
e671cd59
PA
1892018-01-30 Pedro Alves <palves@redhat.com>
190
191 PR gdb/13211
192 * target.c (target_terminal::terminal_state): Rename to ...
193 (target_terminal::m_terminal_state): ... this.
194
a0aad537
JC
1952018-01-19 James Clarke <jrtc27@jrtc27.com>
196
197 * linux-low.c (handle_extended_wait): Surround call to
198 thread_db_notice_clone with #ifdef USE_THREAD_DB.
199
4d9b86e1
SM
2002018-01-17 Simon Marchi <simon.marchi@ericsson.com>
201
202 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
203 linux_ptrace_attach_fail_reason_string now returning an
204 std::string.
205 (linux_attach): Likewise.
206 * thread-db.c (attach_thread): Likewise.
207
f517c180
EA
2082018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
209
210 PR gdb/21559
211 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
212 checking for fs_base/gs_base fields in struct user_regs_struct.
213 * configure: Regenerate.
214
9a70f35c
YQ
2152018-01-16 Yao Qi <yao.qi@linaro.org>
216
217 PR gdb/18749
218 * linux-low.c (fetch_register): Call supply_register instead of
219 error.
220
605fd3c6
YQ
2212018-01-08 Yao Qi <yao.qi@linaro.org>
222 Simon Marchi <simon.marchi@ericsson.com>
223
224 * Makefile.in (OBS): Remove selftest.o.
225 * configure.ac: Set srv_selftest_objs if $development is true.
226 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
227 * configure: Re-generated.
228 * server.c (captured_main): Wrap variable selftest_filter with
229 GDB_SELF_TEST.
230
2cc05030
SM
2312018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
232
233 * server.c (parse_debug_format_options): Return std::string.
234 (handle_monitor_command, captured_main): Adjust.
235
e379cee6
PA
2362018-01-05 Pedro Alves <palves@redhat.com>
237
238 PR gdb/18653
239 * server.c (captured_main): Pass quiet=false to
240 save_original_signals_state.
241
82e1e79a
JB
2422018-01-01 Joel Brobecker <brobecker@adacore.com>
243
244 * gdbreplay.c (gdbreplay_version): Update copyright year in
245 version message.
246 * server.c (gdbserver_version): Likewise.
247
8e481c3b
TT
2482017-12-08 Tom Tromey <tom@tromey.com>
249
250 * ax.c (ax_printf): Update.
251
a8806230
YQ
2522017-12-07 Yao Qi <yao.qi@linaro.org>
253
254 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
255 aarch64_linux_read_description.
256 * linux-amd64-ipa.c (idx2mask): New array.
257 (get_ipa_tdesc): Move idx2mask out.
258 (initialize_low_tracepoint): Initialize target descriptions.
259 * linux-i386-ipa.c (idx2mask): New array.
260 (get_ipa_tdesc): Move idx2mask out.
261 (initialize_low_tracepoint): Initialize target descriptions.
262
d4a0e8b5
SM
2632017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
264
265 * tdesc.c (struct tdesc_type): Change return type.
266 (tdesc_add_flag): Change parameter type.
267 (tdesc_add_bitfield): Likewise.
268 (tdesc_add_field): Likewise.
269 (tdesc_set_struct_size): Likewise.
270
798a7429
SM
2712017-12-05 Simon Marchi <simon.marchi@ericsson.com>
272
273 * regcache.c (registers_to_string): Remove unused variable.
274
c0e15c9b
SM
2752017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
276
277 * inferiors.c (for_each_inferior_with_data): Remove.
278 * inferiors.h (for_each_inferior_with_data): Remove.
279 * server.c (handle_qxfer_threads_worker): Change parameter type.
280 (handle_qxfer_threads_proper): Use for_each_thread.
281
f0045347
SM
2822017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
283
284 * inferiors.c (for_each_inferior): Remove.
285 (clear_inferiors): Use for_each_thread.
286 * inferiors.h (for_each_inferior): Remove.
287 * linux-low.c (linux_wait_for_event_filtered): Use
288 for_each_thread.
289 (linux_stabilize_threads): Likewise.
290 * regcache.c (regcache_release): Likewise.
291 * server.c (gdb_wants_all_threads_stopped): Likewise.
292 (clear_pending_status_callback): Remove.
293 (handle_status): Use for_each_thread.
294 (captured_main): Likewise.
295 * win32-low.c (child_init_thread_list): Likewise.
296 (win32_clear_inferiors): Likewise.
297 (fake_breakpoint_event): Likewise.
298
9521758b
SM
2992017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
300
301 * inferiors.h (find_inferior): Remove.
302 * inferiors.c (find_inferior): Remove.
303
8f86d7aa
SM
3042017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
305
306 * linux-low.c (resume_status_pending_p): Update comment.
307 (need_step_over_p): Update comment.
308
e2b44075
SM
3092017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
310
311 * linux-low.c (proceed_one_lwp): Return void, change parameter
312 type.
313 (unsuspend_and_proceed_one_lwp): Likewise.
314 (proceed_all_lwps): Use for_each_thread.
315 (unstop_all_lwps): Likewise.
316
c80825ff
SM
3172017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
318
319 * linux-low.c (linux_resume_one_thread): Return void, take
320 parameter directly.
321 (linux_resume): Use for_each_thread.
322
df3e4dbe
SM
3232017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
324
325 * linux-low.c (send_sigstop_callback): Return void, change
326 parameter type. Rename to...
327 (send_sigstop): ... this.
328 (suspend_and_send_sigstop_callback): Return void, change parameter
329 type. Rename to...
330 (suspend_and_send_sigstop): ... this.
331 (stop_all_lwps): Use for_each_thread.
332
5a6b0a41
SM
3332017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
334
335 * linux-low.c (lwp_running): Return bool, remove unused
336 argument.
337 (linux_stabilize_threads): Use find_thread.
338
39a64da5
SM
3392017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
340
341 * linux-low.c (select_singlestep_lwp_callback): Remove.
342 (count_events_callback): Remove.
343 (select_event_lwp_callback): Remove.
344 (select_event_lwp): Use find_thread/for_each_thread.
345
a1385b7b
SM
3462017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
347
348 * linux-low.c (not_stopped_callback): Return bool, take filter
349 argument directly.
350 (linux_wait_for_event_filtered): Use find_thread.
351 (linux_wait_1): Likewise.
352
454296a2
SM
3532017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
354
355 * linux-low.c (same_lwp): Remove.
356 (find_lwp_pid): Use find_thread.
357
6b2a85da
SM
3582017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
359
360 * linux-low.c (delete_lwp_callback): Remove.
361 (linux_mourn): Use for_each_thread.
362
798a38e8
SM
3632017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
364
365 * linux-low.c (linux_detach_lwp_callback): Return void, remove
366 args parameter, don't check for pid.
367 (linux_detach): Use for_each_thread.
368
e4eb0dec
SM
3692017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
370
371 * linux-low.c (struct counter): Remove.
372 (second_thread_of_pid_p): Remove.
373 (last_thread_of_process_p): Use find_thread.
374
83e1b6c1
SM
3752017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
376
377 * inferiors.c (find_inferior_in_random): Remove.
378 * inferiors.h (find_inferior_in_random): Remove.
379 * linux-low.c (status_pending_p_callback): Return bool, accept
380 parameter ptid directly.
381 (linux_wait_for_event_filtered): Use find_thread_in_random.
382 (linux_wait_1): Likewise.
383
8dc7b443
SM
3842017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
385
386 * inferiors.c (find_inferior_id): Remove.
387 (find_thread_ptid): Move implemention from find_inferior_id to
388 here.
389 * inferiors.h (find_inferior_id): Remove.
390 * server.c (handle_status): Use find_thread_ptid.
391 (process_serial_event): Likewise.
392 * thread-db.c (find_one_thread): Likewise.
393 (thread_db_thread_handle): Likewise.
394 * win32-low.c (thread_rec): Likewise.
395 (child_delete_thread): Likewise.
396 (win32_thread_alive): Likewise.
397 (get_child_debug_event): Likewise.
398
da25033c
SM
3992017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
400
401 * linux-mips-low.c (update_watch_registers_callback): Return
402 void, remove pid_p parameter, don't check for pid.
403 (mips_insert_point, mips_remove_point): Use for_each_thread.
404
c91bb56b
SM
4052017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
406
407 * lynx.low (lynx_delete_thread_callback): Remove.
408 (lynx_mourn): Use for_each_thread.
409
634a3254
SM
4102017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
411
412 * regcache.c (regcache_invalidate_one): Remove.
413 (regcache_invalidate_pid): use for_each_thread.
414
41272101
TT
4152017-11-26 Tom Tromey <tom@tromey.com>
416
417 * linux-low.c (linux_create_inferior): Update.
418
f5291a6f
UW
4192017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
420
421 * spu-low.c (spu_create_inferior): Fix typo in argument name.
422
6654d750
AH
4232017-11-24 Alan Hayward <alan.hayward@arm.com>
424
425 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
426 * linux-aarch64-low.c (initialize_low_arch): Call init func.
427 * linux-aarch64-tdesc-selftest.c: New file.
428 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
429
4302017-11-24 Alan Hayward <alan.hayward@arm.com>
431
432 * configure.srv: Add new file.
433 * linux-aarch64-low.c (initialize_low_arch): Call init func.
434 * linux-aarch64-tdesc-selftest.c: New file.
435 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
436
49bdb7ee
AH
4372017-11-24 Alan Hayward <alan.hayward@arm.com>
438
439 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
440 * linux-aarch64-low.c (initialize_low_arch): Remove init.
441 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
442
d6d7ce56
AH
4432017-11-24 Alan Hayward <alan.hayward@arm.com>
444
445 * configure.srv: Add new files.
446 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
447 aarch64_linux_read_description.
448 * linux-aarch64-low.c (aarch64_linux_read_description):
449 Merge with aarch64_arch_setup.
450 (aarch64_arch_setup): Call aarch64_linux_read_description.
451 * linux-aarch64-tdesc.c: New file.
452 * linux-aarch64-tdesc.h: New file.
453
506fe5f4
YQ
4542017-11-24 Yao Qi <yao.qi@linaro.org>
455
456 * configure.srv: Set $srv_regobj for tic6x-linux.
457 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
458 (tic6x_read_description): Move some code to tic6x_arch_setup.
459 (tic6x_tdesc_test): New function.
460 (initialize_low_arch): Call selftests::register_test.
461
29f9a567
YQ
4622017-11-22 Yao Qi <yao.qi@linaro.org>
463
464 * remote-utils.c (prepare_resume_reply): Use memcpy.
465
578290ec
SM
4662017-11-19 Simon Marchi <simon.marchi@ericsson.com>
467
468 * linux-low.c (kill_one_lwp_callback): Return void, take
469 argument directly, don't filter on pid.
470 (linux_kill): Use for_each_thread.
471
eca55aec
SM
4722017-11-19 Simon Marchi <simon.marchi@ericsson.com>
473
474 * linux-low.c (need_step_over_p): Return bool, remove dummy
475 argument.
476 (linux_resume, proceed_all_lwps): Use find_thread.
477
25c28b4d
SM
4782017-11-19 Simon Marchi <simon.marchi@ericsson.com>
479
480 * linux-low.c (resume_status_pending_p): Return bool, remove
481 flag_p argument.
482 (linux_resume): Use find_thread.
483
5fdda392
SM
4842017-11-19 Simon Marchi <simon.marchi@ericsson.com>
485
486 * linux-low.c (struct thread_resume_array): Remove.
487 (linux_set_resume_request): Return void, take arguments
488 directly.
489 (linux_resume): Use for_each_thread.
490
fcb056a5
SM
4912017-11-19 Simon Marchi <simon.marchi@ericsson.com>
492
493 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
494 return bool, remove data argument.
495 (linux_stabilize_threads): Use find_thread.
496
139720c5
SM
4972017-11-19 Simon Marchi <simon.marchi@ericsson.com>
498
499 * linux-low.c (unsuspend_one_lwp): Remove.
500 (unsuspend_all_lwps): Use for_each_thread, inline code from
501 unsuspend_one_lwp.
502
6d1e5673
SM
5032017-11-19 Simon Marchi <simon.marchi@ericsson.com>
504
505 * gdbthread.h (find_thread): Add overload with ptid_t filter.
506 * linux-low.c (struct iterate_over_lwps_args): Remove.
507 (iterate_over_lwps_filter): Remove.
508 (iterate_over_lwps): Use find_thread.
509
bbf550d5
SM
5102017-11-19 Simon Marchi <simon.marchi@ericsson.com>
511
512 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
513 (linux_handle_new_gdb_connection): Use for_each_thread, inline
514 code from reset_lwp_ptrace_options_callback.
515
00192f77
SM
5162017-11-19 Simon Marchi <simon.marchi@ericsson.com>
517
518 * linux-arm-low.c (struct update_registers_data): Remove.
519 (update_registers_callback): Return void, take arguments
520 directly, don't check thread's pid.
521 (arm_insert_point, arm_remove_point): Use for_each_thread.
522
2bee2b6c
SM
5232017-11-19 Simon Marchi <simon.marchi@ericsson.com>
524
525 * win32-low.c (continue_one_thread): Return void, take argument
526 directly.
527 (child_continue): Use for_each_thread.
528
0b360f19
SM
5292017-11-19 Simon Marchi <simon.marchi@ericsson.com>
530
531 * win32-i386-low.c (update_debug_registers_callback): Rename
532 to ...
533 (update_debug_registers): ... this, return void, remove pid_p arg.
534 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
535
f27866ba
SM
5362017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
537
538 * inferiors.h (struct process_info): Add constructor, initialize
539 fields..
540 <syscalls_to_catch>: Change type to std::vector<int>.
541 * inferiors.c (add_process): Allocate process_info with new.
542 (remove_process): Free process_info with delete.
543 * linux-low.c (handle_extended_wait): Adjust.
544 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
545 * server.c (handle_general_set): Adjust.
546
e849ea89
PA
5472017-11-16 Pedro Alves <palves@redhat.com>
548
549 * remote-utils.c (remote_close): Block SIGIO signals instead of
550 uninstalling the SIGIO handler.
551
1d0aa65c
AH
5522017-11-16 Alan Hayward <alan.hayward@arm.com>
553
554 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
555
3491a34c
YQ
5562017-11-16 Yao Qi <yao.qi@linaro.org>
557
558 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
559 (tic6x_store_gregset): Likewise.
560 (tic6x_usrregs_info): Move it up.
561
a602f924
AH
5622017-11-15 Alan Hayward <alan.hayward@arm.com>
563
564 * Makefile.in: Update arch rules.
565 * configure.srv: Explicitly mark arch/ files.
566
5616b6c3
AS
5672017-11-13 Andreas Schwab <schwab@suse.de>
568
569 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
570 function.
571 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
572
d1928160
PA
5732017-11-06 Pedro Alves <palves@redhat.com>
574
575 * config.in, configure: Regenerate.
576
bac608e7
SM
5772017-10-27 Simon Marchi <simon.marchi@ericsson.com>
578
579 * target.c (struct thread_search): Remove.
580 (thread_search_callback): Remove.
581 (prepare_to_access_memory): Use for_each_thread instead of
582 find_inferior. Inline code from thread_search_callback.
583
eaddb425
SM
5842017-10-27 Simon Marchi <simon.marchi@ericsson.com>
585
586 * server.c (struct visit_actioned_threads_data): Remove.
587 (visit_actioned_threads): Change prototype to take arguments
588 directly.
589 (resume): Use find_thread instead of find_inferior.
590
99078d34
SM
5912017-10-27 Simon Marchi <simon.marchi@ericsson.com>
592
593 * server.c (queue_stop_reply_callback): Change prototype, return
594 void.
595 (find_status_pending_thread_callback): Remove.
596 (handle_status): Replace find_inferior with find_thread and
597 for_each_thread.
598
cc628f3d
AH
5992017-10-25 Alan Hayward <alan.hayward@arm.com>
600
601 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
602 with REGNO.
603 (aarch64_store_gregset): Likewise.
604 (aarch64_fill_fpregset): Likewise.
605 (aarch64_store_fpregset): Likewise.
606
4d3bb80e
SM
6072017-10-21 Simon Marchi <simon.marchi@ericsson.com>
608
609 * gdbthread.h (find_thread, for_each_thread): New functions.
610 * inferiors.c (thread_of_pid): Remove.
611 (find_any_thread_of_pid): Use find_thread.
612 * linux-low.c (num_lwps): Use for_each_thread.
613
7a7cdfa0
YQ
6142017-10-17 Yao Qi <yao.qi@linaro.org>
615
616 * Makefile.in: Remove one rule.
617 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
618
e675d170
YQ
6192017-10-17 Yao Qi <yao.qi@linaro.org>
620
621 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
622 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
623
7eb4e0f9
YQ
6242017-10-17 Yao Qi <yao.qi@linaro.org>
625
626 * configure.srv: Rename arm.o with arch/arm.o.
627
60d6cfc9
YQ
6282017-10-17 Yao Qi <yao.qi@linaro.org>
629
630 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
631 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
632 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
633 (arch-i386.o, arch-amd64.o): Remove rules.
634 (arch/%.o): New rule.
635 Update POSTCOMPILE and COMPILE.pre.
636 * configure.ac: Invoke AC_CONFIG_COMMANDS.
637 * configure: Re-generated.
638 * configure.srv: Replace arch-i386.o with arch/i386.o.
639 Replace arch-amd64.o with arch/amd64.o.
640
5bfda255
YQ
6412017-10-16 Yao Qi <yao.qi@linaro.org>
642
643 * configure: Regenerated.
644
9c80ecd6
SM
6452017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
646
647 * inferiors.h: (struct inferior_list): Remove.
648 (struct inferior_list_entry); Remove.
649 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
650 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
651 get_first_inferior): Remove.
652 (for_each_inferior, for_each_inferior_with_data, find_inferior,
653 find_inferior_id, find_inferior_in_random): Change signature.
654 * inferiors.c (all_threads): Change type to
655 std::list<thread_info *>.
656 (get_thread): Remove macro.
657 (find_inferior, find_inferior_id): Change signature, implement
658 using find_thread.
659 (find_inferior_in_random): Change signature, implement using
660 find_thread_in_random.
661 (for_each_inferior, for_each_inferior_with_data): Change
662 signature, implement using for_each_thread.
663 (add_inferior_to_list, remove_inferior): Remove.
664 (add_thread, get_first_thread, thread_of_pid,
665 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
666 (get_first_inferior, one_inferior_p, clear_inferior_list):
667 Remove.
668 (clear_inferiors, get_thread_process): Update.
669 * gdbthread.h: Include <list>.
670 (struct thread_info) <entry>: Remove field.
671 <id>: New field.
672 (all_threads): Change type to std::list<thread_info *>.
673 (get_first_inferior): Add doc.
674 (find_thread, for_each_thread, find_thread_in_random): New
675 functions.
676 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
677 * linux-arm-low.c (update_registers_callback): Update.
678 * linux-low.c (second_thread_of_pid_p): Update.
679 (kill_one_lwp_callback, linux_detach_lwp_callback,
680 delete_lwp_callback, status_pending_p_callback, same_lwp,
681 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
682 iterate_over_lwps, not_stopped_callback,
683 resume_stopped_resumed_lwps, count_events_callback,
684 select_singlestep_lwp_callback, select_event_lwp_callback,
685 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
686 suspend_and_send_sigstop_callback, wait_for_sigstop,
687 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
688 lwp_running, linux_set_resume_request, resume_status_pending_p,
689 need_step_over_p, start_step_over, linux_resume_one_thread,
690 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
691 reset_lwp_ptrace_options_callback): Update.
692 * linux-mips-low.c (update_watch_registers_callback): Update.
693 * regcache.c (regcache_invalidate_one, regcache_invalidate):
694 Update.
695 (free_register_cache_thread_one): Remove.
696 (regcache_release): Update.
697 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
698 handle_qxfer_threads_worker): Update.
699 (handle_query): Update, use list iterator.
700 (visit_actioned_threads, handle_pending_status,
701 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
702 clear_pending_status_callback, set_pending_status_callback,
703 find_status_pending_thread_callback, handle_status,
704 process_serial_event): Update.
705 * target.c (thread_search_callback): Update.
706 * thread-db.c (thread_db_get_tls_address): Update.
707 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
708 Update.
709 * win32-i386-low.c (update_debug_registers_callback): Update.
710 * win32-low.c (delete_thread_info, child_delete_thread,
711 continue_one_thread, suspend_one_thread,
712 get_child_debug_event): Adjust.
713
9179355e
SM
7142017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
715
716 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
717 * inferiors.h: Include <list>.
718 (struct process_info) <entry>: Remove field.
719 <pid>: New field.
720 (pid_of): Change macro to function.
721 (ptid_of, lwpid_of): Remove macro.
722 (all_processes): Change type to std::list<process_info *>.
723 (ALL_PROCESSES): Remove macro.
724 (for_each_process, find_process): New function.
725 * inferiors.c (all_processes): Change type to
726 std::list<process_info *>.
727 (find_thread_process): Adjust.
728 (add_process): Likewise.
729 (remove_process): Likewise.
730 (find_process_pid): Likewise.
731 (get_first_process): Likewise.
732 (started_inferior_callback): Remove.
733 (have_started_inferiors_p): Adjust.
734 (attached_inferior_callback): Remove.
735 (have_attached_inferiors_p): Adjust.
736 * linux-low.c (check_zombie_leaders): Likewise.
737 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
738 (x86_linux_update_xmltarget): Adjust.
739 * server.c (handle_query): Likewise.
740 (gdb_reattached_process): Remove.
741 (handle_status): Adjust.
742 (kill_inferior_callback): Likewise.
743 (detach_or_kill_inferior): Remove.
744 (print_started_pid): Likewise.
745 (print_attached_pid): Likewise.
746 (detach_or_kill_for_exit): Update.
747 (process_serial_event): Likewise.
748 * linux-arm-low.c (arm_new_fork): Likewise.
749
c9cb8905
SM
7502017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
751
752 * dll.h: Include <list>.
753 (struct dll_info): Add constructor.
754 <entry>: Remove field.
755 (all_dlls): Change type to std::list<dll_info>.
756 * dll.c: Include <algorithm>.
757 (get_dll): Remove macro.
758 (all_dlls): Change type to std::list<dll_info *>.
759 (free_one_dll): Remove.
760 (match_dll): Likewise.
761 (loaded_dll): Adjust.
762 (unloaded_dll): Adjust to all_dlls type change, use
763 std::find_if. Inline code from match_dll.
764 (clear_dlls): Adjust to all_dlls type change.
765 * server.c (emit_dll_description): Remove.
766 (handle_qxfer_libraries): Adjust to all_dlls type change,
767 integrate emit_dll_description's functionality.
768
04ec7890
SM
7692017-10-12 Simon Marchi <simon.marchi@ericsson.com>
770
771 * linux-low.h (struct linux_target_ops) <delete_process>: New
772 field.
773 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
774 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
775 (struct linux_target_ops): Add delete_process callback.
776 * linux-arm-low.c (arm_delete_process): New.
777 (struct linux_target_ops): Add delete_process callback.
778 * linux-bfin-low.c (struct linux_target_ops): Likewise.
779 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
780 * linux-m32r-low.c (struct linux_target_ops): Likewise.
781 * linux-mips-low.c (mips_linux_delete_process): New.
782 (struct linux_target_ops): Add delete_process callback.
783 * linux-ppc-low.c (struct linux_target_ops): Likewise.
784 * linux-s390-low.c (struct linux_target_ops): Likewise.
785 * linux-sh-low.c (struct linux_target_ops): Likewise.
786 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
787 * linux-tile-low.c (struct linux_target_ops): Likewise.
788 * linux-x86-low.c (x86_linux_delete_process): New.
789 (struct linux_target_ops): Add delete_process callback.
790 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
791
466eecee
SM
7922017-10-12 Simon Marchi <simon.marchi@ericsson.com>
793
794 * linux-aarch64-low.c (the_low_target): Add thread delete
795 callback.
796 * linux-arm-low.c (arm_delete_thread): New function.
797 (the_low_target): Add thread delete callback.
798 * linux-bfin-low.c (the_low_target): Likewise.
799 * linux-crisv32-low.c (the_low_target): Likewise.
800 * linux-low.c (delete_lwp): Invoke delete_thread callback if
801 set.
802 * linux-low.h (struct linux_target_ops) <delete_thread>: New
803 field.
804 * linux-m32r-low.c (the_low_target): Add thread delete callback.
805 * linux-mips-low.c (mips_linux_delete_thread): New function.
806 (the_low_target): Add thread delete callback.
807 * linux-ppc-low.c (the_low_target): Likewise.
808 * linux-s390-low.c (the_low_target): Likewise.
809 * linux-sh-low.c (the_low_target): Likewise.
810 * linux-tic6x-low.c (the_low_target): Likewise.
811 * linux-tile-low.c (the_low_target): Likewise.
812 * linux-x86-low.c (the_low_target): Likewise.
813 * linux-xtensa-low.c (the_low_target): Likewise.
814
b79f7801
YZ
8152017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
816
817 * win32-low.c: Include "common-inferior.h".
818
bc3b087d
SDJ
8192017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
820
821 * inferiors.c (set_inferior_cwd): New function.
822 * server.c (handle_general_set): Handle QSetWorkingDir packet.
823 (handle_query): Inform that QSetWorkingDir is supported.
824 * win32-low.c (create_process): Pass the inferior's cwd to
825 CreateProcess.
826
d092c5a2
SDJ
8272017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
828
829 * inferiors.c (current_inferior_cwd): New global variable.
830 (get_inferior_cwd): New function.
831 * inferiors.h (struct process_info) <cwd>: New field.
832
7da0a886
SDJ
8332017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
834
835 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
836 (OBS): Add gdb_tilde_expand.o.
837
289a6840
SM
8382017-10-02 Simon Marchi <simon.marchi@ericsson.com>
839
840 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
841 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
842
256642e8
PA
8432017-09-29 Pedro Alves <palves@redhat.com>
844
845 * ax.c (gdb_parse_agent_expr): Constify.
846 * ax.h (gdb_parse_agent_expr): Constify.
847 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
848 Constify.
849 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
850 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
851 * remote-utils.h (read_ptid): Constify.
852 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
853 (process_point_options, process_serial_event): Constify.
854 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
855 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
856 (cmd_qtbuffer): Constify.
857
5b9ca4d4
PA
8582017-09-29 Pedro Alves <palves@redhat.com>
859
860 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
861 fails.
862
94c207e0
PA
8632017-09-29 Pedro Alves <palves@redhat.com>
864
865 * linux-low.c (handle_extended_wait): Pass parent thread instead
866 of process to thread_db_notice_clone.
867 * linux-low.h (thread_db_notice_clone): Replace parent process
868 parameter with parent thread parameter.
869 * thread-db.c (find_one_thread): Add comment.
870 (thread_db_notice_clone): Replace parent process parameter with
871 parent thread parameter. Temporarily switch to the parent thread.
872
75352e28
SDJ
8732017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
874
875 * gdbthread.h: Include "common-gdbthread.h".
876 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
877 "if" when validating the ptid.
878 * remote-utils.c: Include "gdbthread.h".
879 (prepare_resume_reply): Use "switch_to_thread".
880 * target.c (done_accessing_memory): Likewise.
881
ad339634
AA
8822017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
883
884 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
885 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
886 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
887 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
888 s390x-gs-linux64-ipa.o to ipa_obj.
889 * linux-s390-low.c (HWCAP_S390_GS): New define.
890 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
891 New functions.
892 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
893 (s390_arch_setup): Check for guarded-storage support and choose
894 appropriate tdesc.
895 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
896 init_registers_s390x_gs_linux64.
897 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
898 enum value.
899 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
900 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
901
cc4d742f
SM
9022017-09-22 Simon Marchi <simon.marchi@ericsson.com>
903
904 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
905
f6327dcb
KB
9062017-09-21 Kevin Buettner <kevinb@redhat.com>
907
908 * linux-low.h (struct lwp_info): Add new field, thread_handle.
909 (thread_db_thread_handle): Declare.
910 * linux-low.c (linux_target_ops): Initialize thread_handle.
911 * server.c (handle_qxfer_threads_worker): Add support for
912 "handle" attribute.
913 * target.h (struct target_ops): Add new function pointer,
914 thread_handle.
915 (target_thread_handle): Define.
916 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
917 field in lwp.
918 (thread_db_thread_handle): New function.
919
86299109
KB
9202017-09-21 Kevin Buettner <kevinb@redhat.com>
921
922 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
923 * linux-low.h (thread_db_notice_clone): Declare.
924 * thread-db.c (thread_db_notice_clone): New function.
925
f557a88a
PA
9262017-09-21 Pedro Alves <palves@redhat.com>
927
928 * server.c (gdb_read_memory, handle_status, process_serial_event)
929 (handle_serial_event, handle_target_event): Adjust to
930 set_desired_thread prototype change.
931 * target.c (set_desired_thread): Remove 'use_general' parameter
932 and adjust.
933 * target.h (set_desired_thread): Remove 'use_general' parameter.
934
223ffa71
TT
9352017-09-20 Tom Tromey <tom@tromey.com>
936
937 * target.c (target_terminal::terminal_state): Define.
938 (target_terminal::init): Rename from target_terminal_init.
939 (target_terminal::inferior): Rename from
940 target_terminal_inferior.
941 (target_terminal::ours): Rename from target_terminal_ours.
942 (target_terminal::ours_for_output, target_terminal::info): New.
943
04fd3ba9
SM
9442017-09-16 Simon Marchi <simon.marchi@ericsson.com>
945
946 * server.c (accumulate_file_name_length): Remove.
947 (emit_dll_description): Adjust to std::string change.
948 (handle_qxfer_libraries): Use std::string to hold document.
949
5e187554
SM
9502017-09-16 Simon Marchi <simon.marchi@ericsson.com>
951
952 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
953 return type of xml_escape_text.
954 * server.c (emit_dll_description): Likewise.
955
1526853e
SM
9562017-09-16 Simon Marchi <simon.marchi@ericsson.com>
957
958 * server.c (captured_main): Accept argument for --selftest.
959 Update run_tests call.
960 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
961 when registering selftests.
962
c4dfafab
SDJ
9632017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
964
965 * regcache.c (get_thread_regcache): Update code to use "std::vector"
966 instead of "VEC" for "target_desc.reg_defs".
967 (regcache_cpy): Likewise.
968 (registers_to_string): Likewise.
969 (registers_from_string): Likewise.
970 (find_regno): Likewise.
971 (supply_regblock): Likewise.
972 (regcache_raw_read_unsigned): Likewise.
973 * tdesc.c (init_target_desc): Likewise.
974 (tdesc_create_reg): Likewise.
975 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
976 (struct target_desc) <reg_defs>: Convert to "std::vector".
977 (target_desc): Do not initialize "reg_defs".
978 (~target_desc): Update code to use "std::vector" instead of "VEC"
979 for "target_desc.reg_defs".
980 (operator==): Likewise.
981
124aceb4
SM
9822017-09-15 Simon Marchi <simon.marchi@ericsson.com>
983
984 * inferiors.h (thread_to_gdb_id): Remove.
985 * inferiors.c (thread_to_gdb_id): Remove.
986 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
987 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
988 lynx_store_registers, lynx_read_memory, lynx_write_memory):
989 Likewise.
990 * nto-low.c (nto_fetch_registers, nto_store_registers,
991 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
992
96cde54f
SM
9932017-09-15 Simon Marchi <simon.marchi@ericsson.com>
994
995 * inferiors.h (gdb_id_to_thread_id): Remove.
996 * inferiors.c (gdb_id_to_thread_id): Remove.
997 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
998 removal. Move pid declaration closer to where it's used.
999
e8ca139e
SM
10002017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1001
1002 * server.c (handle_detach): New function.
1003 (process_serial_event): Move code out, call handle_detach.
1004
f8a4e119
SM
10052017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1006
1007 * server.c (require_running): Rename to ...
1008 (require_running_or_return): ... this ...
1009 (require_running_or_break): ... and this.
1010 (handle_query, process_serial_event): Adjust.
1011
0eb0a407
SM
10122017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1013
1014 * linux-low.c (linux_set_resume_request): Remove unused
1015 variables.
1016
785922a5
SM
10172017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1018
1019 * server.c (first_thread_of): Remove.
1020 (process_serial_event): Replace usage of first_thread_of with
1021 find_any_thread_of_pid.
1022 * tracepoint.c (same_process_p): Remove.
1023 (gdb_agent_about_to_close): Replace usage of same_process_p with
1024 find_any_thread_of_pid.
1025 * linux-x86-low.c (same_process_callback): Remove.
1026 (x86_arch_setup_process_callback): Replace usage of
1027 same_process_callback with find_any_thread_of_pid.
1028 * thread-db.c (any_thread_of): Remove.
1029 (switch_to_process): Replace usage of any_thread_of with
1030 find_any_thread_of_pid.
1031 * inferiors.c (thread_pid_matches_callback): Remove.
1032 (find_thread_process): Adjust to use find_any_thread_of_pid.
1033
a059f00c
SDJ
10342017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1035
1036 * regcache.c (get_thread_regcache): Guard calls to "memset"
1037 with "!VEC_empty".
1038
cc397f3a
SDJ
10392017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1040
1041 * linux-low.c (handle_extended_wait): Use
1042 "allocate_target_description" instead of "XNEW".
1043 * linux-x86-low.c (initialize_low_arch): Likewise.
1044
22916b07
YQ
10452017-09-05 Yao Qi <yao.qi@linaro.org>
1046
1047 * configure.srv (srv_i386_regobj): Remove.
1048 (srv_amd64_regobj): Remove.
1049 (srv_regobj): Set it to "" for x86 non-linux targets.
1050 * linux-x86-tdesc.c (i386_linux_read_description):
1051 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1052 (init_registers_i386): Remove the declaration.
1053 (tdesc_i386): Remove the declaration.
1054 (lynx_i386_arch_setup): Call i386_create_target_description.
1055 * nto-x86-low.c: Likewise.
1056 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1057 [!__x86_64__]: include arch/i386.h.
1058 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1059
38602d55
YQ
10602017-09-05 Yao Qi <yao.qi@linaro.org>
1061
1062 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1063 i386/amd64-XXX-linux from it.
1064
44b886ff
YQ
10652017-09-05 Yao Qi <yao.qi@linaro.org>
1066
1067 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1068 false.
1069 (ipa_amd64_linux_regobj): Remove.
1070 (ipa_x32_linux_regobj): Remove.
1071
b4570e4b
YQ
10722017-09-05 Yao Qi <yao.qi@linaro.org>
1073
1074 * Makefile.in (arch-amd64.o): New rule.
1075 * configure.srv: Append arch-amd64.o.
1076 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1077 (get_ipa_tdesc): Call amd64_linux_read_description.
1078 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1079 and init_registers_amd64_XXX.
1080 * linux-x86-low.c (x86_linux_read_description): Call
1081 amd64_linux_read_description.
1082 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1083 (initialize_low_arch): Don't call init_registers_x32_XXX and
1084 init_registers_amd64_XXX.
1085 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1086 and tdesc_amd64_XXX.
1087 [__x86_64__] (amd64_tdesc_test): New function.
1088 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1089 and init_registers_amd64_XXX.
1090 * linux-x86-tdesc.c: Include arch/amd64.h.
1091 (xcr0_to_tdesc_idx): New function.
1092 (i386_linux_read_description): New function.
1093 (amd64_get_ipa_tdesc_idx): New function.
1094 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1095 (amd64_get_ipa_tdesc): Declare.
1096
d1f28ea2
YQ
10972017-09-05 Yao Qi <yao.qi@linaro.org>
1098
1099 * configure.srv (srv_i386_linux_xmlfiles): Remove
1100 i386/i386-XXX-linux.xml from it.
1101
25a93583
YQ
11022017-09-05 Yao Qi <yao.qi@linaro.org>
1103
1104 * configure.srv: Set srv_i386_linux_regobj empty if $development
1105 is false.
1106 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1107 initialize_low_tdesc.
1108 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1109 with #if initialize_low_tdesc.
1110 * linux-x86-tdesc-selftest.c: New file.
1111 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1112
5f035c07
YQ
11132017-09-05 Yao Qi <yao.qi@linaro.org>
1114
1115 * Makefile.in (arch-i386.o): New rule.
1116 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1117 (x86_64-*-linux*): Likewise.
1118 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1119 include arch/i386.h.
1120 (i386_linux_read_description): Remove code and call
1121 i386_create_target_description.
1122 * tdesc.c (allocate_target_description): New function.
1123 * tdesc.h (set_tdesc_architecture): Remove declaration.
1124 (set_tdesc_osabi): Likewise.
1125
0abe8a89
YQ
11262017-09-05 Yao Qi <yao.qi@linaro.org>
1127
1128 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1129 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1130 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1131 .xmltarget.
1132 * server.c (get_features_xml): Call tdesc_get_features_xml.
1133 * tdesc.c (set_tdesc_architecture): New function.
1134 (set_tdesc_osabi): New function.
1135 (tdesc_get_features_xml): New function.
1136 (tdesc_create_feature): Add an argument.
1137 * tdesc.h (struct target_desc) <features>: New field.
1138 <arch, osabi>: New field.
1139 (~target_desc): xfree features, arch, and osabi.
1140 (target_desc::oerator==): Don't compare .xmltarget.
1141 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1142 (set_tdesc_osabi): Likewise.
1143 (tdesc_get_features_xml): Likewise.
1144
0a188386
YQ
11452017-09-05 Yao Qi <yao.qi@linaro.org>
1146
1147 * linux-x86-tdesc.c: Include selftest.h.
1148 (i386_tdesc_test): New function.
1149 (initialize_low_tdesc): Call selftests::register_test.
1150 * tdesc.h: Include regdef.h.
1151 (target_desc): Override operator == and !=.
1152
f49ff000
YQ
11532017-09-05 Yao Qi <yao.qi@linaro.org>
1154
1155 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1156 (ipa_obj): Likewise.
1157 * linux-i386-ipa.c: Include common/x86-xstate.h
1158 (get_ipa_tdesc): Call i386_linux_read_description.
1159 (initialize_low_tracepoint): Don't call init_registers_XXX
1160 functions, call initialize_low_tdesc instead.
1161 * linux-x86-low.c (x86_linux_read_description): Call
1162 i386_linux_read_description.
1163 (initialize_low_arch): Don't call init_registers_i386_XXX
1164 functions, call initialize_low_tdesc.
1165 * linux-x86-tdesc.c: New file.
1166 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1167 (i386_get_ipa_tdesc_idx): Declare.
1168 (i386_get_ipa_tdesc): Declare.
1169 (initialize_low_tdesc): Declare.
1170
2b68ef2f
YQ
11712017-09-05 Yao Qi <yao.qi@linaro.org>
1172
1173 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1174 instead of 0.
1175
f7000548
YQ
11762017-09-05 Yao Qi <yao.qi@linaro.org>
1177
1178 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1179 * regcache.c (get_thread_regcache): Use VEC_length.
1180 (init_register_cache): Likewise.
1181 (regcache_cpy): Likewise.
1182 (registers_to_string): Iterate reg_defs via VEC_iterate.
1183 (find_regno): Likewise.
1184 (find_register_by_number): Use VEC_index.
1185 (register_size): Call find_register_by_number.
1186 (register_data): Call find_register_by_number.
1187 (supply_regblock): Use VEC_length.
1188 (regcache_raw_read_unsigned): Likewise.
1189 * tdesc.c (init_target_desc): Iterate reg_defs via
1190 VEC_iterate.
1191 (default_description): Update initializer.
1192 (copy_target_description): Don't update field num_registers.
1193 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1194 <num_registers>: Remove.
1195
50a421ac
SM
11962017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1197
1198 * Makefile.in (.SECONDARY): Define target.
1199
23fdd69e
SM
12002017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1201
1202 * linux-low.c (linux_wait_1): Adjust.
1203 * server.c (queue_stop_reply_callback): Adjust.
1204
0a2dde4a
SDJ
12052017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1206
1207 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1208 QEnvironmentUnset and QEnvironmentReset packets.
1209 (handle_query): Inform remote that QEnvironmentHexEncoded,
1210 QEnvironmentUnset and QEnvironmentReset are supported.
1211
6afd337d
SM
12122017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1213
1214 * inferiors.h (inferior_target_data): Rename to ...
1215 (thread_target_data): ... this.
1216 (inferior_regcache_data): Rename to ...
1217 (thread_regcache_data): ... this.
1218 (set_inferior_regcache_data): Rename to ...
1219 (set_thread_regcache_data): ... this.
1220 * inferiors.c (inferior_target_data): Rename to ...
1221 (thread_target_data): ... this.
1222 (inferior_regcache_data): Rename to ...
1223 (thread_regcache_data): ... this.
1224 (set_inferior_regcache_data): Rename to ...
1225 (set_thread_regcache_data): ... this.
1226 (free_one_thread): Update.
1227 * linux-low.h (get_thread_lwp): Update.
1228 * regcache.c (get_thread_regcache): Update.
1229 (regcache_invalidate_thread): Update.
1230 (free_register_cache_thread): Update.
1231 * win32-i386-low.c (update_debug_registers_callback): Update.
1232 (win32_get_current_dr): Update.
1233 * win32-low.c (thread_rec): Update.
1234 (delete_thread_info): Update.
1235 (continue_one_thread): Update.
1236 (suspend_one_thread): Update.
1237
a160cc46
SM
12382017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1239
1240 * inferiors.c (set_inferior_target_data): Remove.
1241 * inferiors.h (set_inferior_target_data): Remove.
1242
6d580b63
YQ
12432017-08-18 Yao Qi <yao.qi@linaro.org>
1244
1245 * Makefile.in (OBS): Add selftest.o.
1246 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1247 * configure, config.in: Re-generated.
1248 * server.c: Include common/sefltest.h.
1249 (captured_main): Handle option --selftest.
1250
f5a29eb0
YQ
12512017-08-09 Yao Qi <yao.qi@linaro.org>
1252
1253 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1254 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1255 i386-avx-mpx.o and i386-mmx.o.
1256 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1257 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1258 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1259 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1260 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1261 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1262 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1263 i386/amd64-avx-mpx.xml.
1264
57757c2f
YQ
12652017-08-09 Yao Qi <yao.qi@linaro.org>
1266
1267 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1268 and x32-avx-avx512.o.
1269 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1270 i386/x32-avx-avx512.xml.
1271
229d26fc
SM
12722017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1273
1274 * tracepoint.h (enum class fast_tpoint_collect_result): New
1275 enumeration.
1276 (fast_tracepoint_collecting): Change return type to
1277 fast_tpoint_collect_result.
1278 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1279 * linux-low.h: Include tracepoint.h.
1280 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1281 fast_tpoint_collect_result.
1282 * linux-low.c (handle_tracepoints): Adjust.
1283 (linux_fast_tracepoint_collecting): Change return type to
1284 fast_tpoint_collect_result.
1285 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1286 linux_wait_1, stuck_in_jump_pad_callback,
1287 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1288 proceed_one_lwp): Adjust to type change.
1289
2e1e43e1
YQ
12902017-07-10 Yao Qi <yao.qi@linaro.org>
1291
1292 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1293
adc764e7
YQ
12942017-06-29 Yao Qi <yao.qi@linaro.org>
1295
1296 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1297 Remove.
1298 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1299
a206891a
SM
13002017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1301
1302 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1303
9a6c7d9c
SDJ
13042017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1305
1306 * linux-low.c (linux_create_inferior): Adjust code to access the
1307 environment information via 'gdb_environ' class.
1308 * lynx-low.c (lynx_create_inferior): Likewise.
1309 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1310 (get_environ): Return a pointer to 'our_environ'.
1311 (captured_main): Initialize 'our_environ'.
1312 * server.h (get_environ): Adjust prototype.
1313 * spu-low.c (spu_create_inferior): Adjust code to access the
1314 environment information via 'gdb_environ' class.
1315
ae3e2ccf
SM
13162017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1317
1318 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1319 usage of "register" keyword.
1320
3e019bdc
SM
13212017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1322
1323 * configure: Re-generate.
1324
8465943a
SM
13252017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1326
1327 * configure: Re-generate.
1328
cf0dd6f0
SM
13292017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1330
1331 * Makefile.in (COMPILE.pre): Add "-x c++".
1332
9845682b
SDJ
13332017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1334
1335 * fork-child.c: Conditionally include <signal.h>.
1336
aefd8b33
SDJ
13372017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1338
1339 * server.c (handle_general_set): Handle new packet
1340 "QStartupWithShell".
1341 (handle_query): Add "QStartupWithShell" to the list of supported
1342 packets.
1343 (gdbserver_usage): Add help text explaining the
1344 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1345 options.
1346 (captured_main): Recognize and act upon the presence of the new
1347 CLI options.
1348
2090129c
SDJ
13492017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1350 Pedro Alves <palves@redhat.com>
1351
1352 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1353 * configure: Regenerate.
1354 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1355 "fork-inferior.o".
1356 (i[34567]86-*-lynxos*): Likewise.
1357 (spu*-*-*): Likewise.
1358 * fork-child.c: New file.
1359 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1360 and "environ.h".
1361 (linux_ptrace_fun): New function.
1362 (linux_create_inferior): Adjust function prototype to reflect
1363 change on "target.h". Adjust function code to use
1364 "fork_inferior".
1365 (linux_request_interrupt): Delete "signal_pid".
1366 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1367 (lynx_ptrace_fun): New function.
1368 (lynx_create_inferior): Adjust function prototype to reflect
1369 change on "target.h". Adjust function code to use
1370 "fork_inferior".
1371 * nto-low.c (nto_create_inferior): Adjust function prototype and
1372 code to reflect change on "target.h". Update comments.
1373 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1374 "common-terminal.h" and "environ.h".
1375 (terminal_fd): Moved to fork-child.c.
1376 (old_foreground_pgrp): Likewise.
1377 (restore_old_foreground_pgrp): Likewise.
1378 (last_status): Make it global.
1379 (last_ptid): Likewise.
1380 (our_environ): New variable.
1381 (startup_with_shell): Likewise.
1382 (program_name): Likewise.
1383 (program_argv): Rename to...
1384 (program_args): ...this.
1385 (wrapper_argv): New variable.
1386 (start_inferior): Delete function.
1387 (get_exec_wrapper): New function.
1388 (get_exec_file): Likewise.
1389 (get_environ): Likewise.
1390 (prefork_hook): Likewise.
1391 (post_fork_inferior): Likewise.
1392 (postfork_hook): Likewise.
1393 (postfork_child_hook): Likewise.
1394 (handle_v_run): Update code to deal with arguments coming from the
1395 remote host. Update calls from "start_inferior" to
1396 "create_inferior".
1397 (captured_main): Likewise. Initialize environment variable. Call
1398 "have_job_control".
1399 * server.h (post_fork_inferior): New prototype.
1400 (get_environ): Likewise.
1401 (last_status): Declare.
1402 (last_ptid): Likewise.
1403 (signal_pid): Likewise.
1404 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1405 (spu_ptrace_fun): New function.
1406 (spu_create_inferior): Adjust function prototype to reflect change
1407 on "target.h". Adjust function code to use "fork_inferior".
1408 * target.c (target_terminal_init): New function.
1409 (target_terminal_inferior): Likewise.
1410 (target_terminal_ours): Likewise.
1411 * target.h: Include <vector>.
1412 (struct target_ops) <create_inferior>: Update prototype.
1413 (create_inferior): Update macro.
1414 * utils.c (gdb_flush_out_err): New function.
1415 * win32-low.c (win32_create_inferior): Adjust function prototype
1416 and code to reflect change on "target.h".
1417
043a4934
SDJ
14182017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1419
1420 * inferiors.c (switch_to_thread): New function.
1421
15652511
SDJ
14222017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1423
1424 * Makefile.in (SFILE): Add "common/job-control.c".
1425 (OBS): Add "job-control.o".
1426
21ea5acd
SDJ
14272017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1428
1429 * Makefile: Remove "@host_makefile_frag@".
1430
e13cb306
PA
14312017-05-05 Pedro Alves <palves@redhat.com>
1432
1433 * configure: Regenerate.
1434
c94fee56
SDJ
14352017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1436
1437 * configure: Regenerate.
1438
a0ff9e1a
SM
14392017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1440
1441 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1442 software_single_step change of return type to
1443 std::vector<CORE_ADDR>.
1444 * linux-low.c (install_software_single_step_breakpoints):
1445 Likewise.
1446 * linux-low.h (install_software_single_step_breakpoints):
1447 Likewise.
1448
be628ab8
SDJ
14492017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1450
1451 * remote-utils.c: Include "gdb_termios.h" instead of
1452 "terminal.h".
1453 * terminal.h: Delete file.
1454
7c5ded6a
SDJ
14552017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1456
1457 * server.c: Include <vector>.
1458 <program_argv, wrapper_argv>: Convert to std::vector.
1459 (start_inferior): Rewrite function to use C++.
1460 (handle_v_run): Likewise. Update code that calculates the argv
1461 based on the vRun packet; use C++.
1462 (captured_main): Likewise.
1463
436252de
SM
14642017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1465
1466 * server.c (handle_v_cont): Initialize thread_resume::thread
1467 with null_ptid.
1468
9bf2a700
PA
14692017-04-05 Pedro Alves <palves@redhat.com>
1470
1471 * configure: Regenerate.
1472
a121b7c1
PA
14732017-04-05 Pedro Alves <palves@redhat.com>
1474
1475 * gdbreplay.c (sync_error): Constify.
1476 * linux-x86-low.c (push_opcode): Constify.
1477
21c8a587
PA
14782017-04-05 Pedro Alves <palves@redhat.com>
1479
1480 * win32-low.c (get_child_debug_event)
1481 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1482 Report TARGET_WAITKIND_SPURIOUS instead.
1483
fb32b4f7
PA
14842017-04-05 Pedro Alves <palves@redhat.com>
1485
1486 * remote-utils.c (remote_prepare, remote_open): Constify.
1487 * remote-utils.h (remote_prepare, remote_open): Constify.
1488 * server.c (captured_main): Constify 'port' handling.
1489
65dd1e59
SM
14902017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1491
1492 * Makefile.in (clean): Clear .deps.
1493
8fa5b777
SM
14942017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1495
1496 * .gitignore: Remove generated files, replace with wildcard.
1497 * (clean): Replace removal of generated files with wildcard.
1498 (version.c): Replace with...
1499 (version-generated.c): ...this.
1500 (xml-builtin.c): Replace with...
1501 (xml-builtin-generated.c): ...this.
1502 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1503 (%.c: *regformats*): Replace with...
1504 (%-generated.c: *regformats*): ...this.
1505
a12e714b
MF
15062017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1507
1508 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1509 (xtensa_fill_gregset): Call collect_register_by_name for
1510 threadptr register.
1511 (xtensa_store_gregset): Call supply_register_by_name for
1512 threadptr register.
1513
1a09b50a
MF
15142017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1515
1516 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1517 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1518 (xtensa_store_gregset): Call supply_register for all registers in
1519 a0_regnum..a0_regnum + C0_NREGS range.
1520
1a01e7c6
SM
15212017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1522
1523 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1524 (ax-ipa.o: ax.c): Remove.
1525 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1526 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1527 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1528 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1529 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1530
36bc18a8
SM
15312017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1532
1533 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1534 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1535 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1536 (errors-ipa.o: ../common/errors.c): Remove.
1537 (format-ipa.o: ../common/format.c): Remove.
1538 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1539
a8ebe3d5
SM
15402017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1541
1542 * Makefile.in (%-ipa.o: %.c): New rule.
1543 (tracepoint-ipa.o: tracepoint.c): Remove.
1544 (utils-ipa.o: utils.c): Remove.
1545 (remote-utils-ipa.o: remote-utils.c): Remove.
1546 (regcache-ipa.o: regcache.c): Remove.
1547 (i386-linux-ipa.o: i386-linux.c): Remove.
1548 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1549 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1550 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1551 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1552 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1553 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1554 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1555 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1556 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1557 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1558 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1559 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1560 (aarch64-ipa.o: aarch64.c): Remove.
1561 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1562 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1563 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1564 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1565 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1566 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1567 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1568 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1569 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1570 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1571 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1572 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1573 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1574 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1575 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1576 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1577 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1578 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1579 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1580 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1581 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1582 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1583 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1584 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1585 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1586 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1587 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1588 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1589 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1590 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1591 (tdesc-ipa.o: tdesc.c): Remove.
1592 (x32-linux-ipa.o: x32-linux.c): Remove.
1593 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1594 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1595
50cfacb7
SM
15962017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1597
1598 * Makefile.in (%.o: ../arch/%.c): New rule.
1599 (arm.o: ../arch/arm.c): Remove.
1600 (arm-linux.o: ../arch/arm-linux.c): Remove.
1601 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1602 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1603
c5a22423
SM
16042017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1605
1606 * Makefile.in (%.o: ../nat/%.c): New rule.
1607 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1608 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1609 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1610 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1611 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1612 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1613 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1614 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1615 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1616 (linux-personality.o: ../nat/linux-personality.c): Remove.
1617 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1618 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1619 (x86-linux.o: ../nat/x86-linux.c): Remove.
1620 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1621 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1622
6bda016b
SM
16232017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1624
1625 * Makefile.in (%.o: ../common/%.c): New rule.
1626 (signals.o: ../common/signals.c): Remove.
1627 (print-utils.o: ../common/print-utils.c): Remove.
1628 (rsp-low.o: ../common/rsp-low.c): Remove.
1629 (common-utils.o: ../common/common-utils.c): Remove.
1630 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1631 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1632 (vec.o: ../common/vec.c): Remove.
1633 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1634 (xml-utils.o: ../common/xml-utils.c): Remove.
1635 (ptid.o: ../common/ptid.c): Remove.
1636 (buffer.o: ../common/buffer.c): Remove.
1637 (format.o: ../common/format.c): Remove.
1638 (filestuff.o: ../common/filestuff.c): Remove.
1639 (agent.o: ../common/agent.c): Remove.
1640 (errors.o: ../common/errors.c): Remove.
1641 (environ.o: ../common/environ.c): Remove.
1642 (common-debug.o: ../common/common-debug.c): Remove.
1643 (cleanups.o: ../common/cleanups.c): Remove.
1644 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1645 (fileio.o: ../common/fileio.c): Remove.
1646 (common-regcache.o: ../common/common-regcache.c): Remove.
1647 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1648 (new-op.o: ../common/new-op.c): Remove.
1649 (btrace-common.o: ../common/btrace-common.c): Remove.
1650
21122961
SM
16512017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1652
1653 * Makefile.in (%.o: ../target/%.c): New rule.
1654 (waitstatus.o: ../target/waitstatus.c): Remove.
1655
c362e621
SM
16562017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1657
1658 * Makefile.in
1659 (%.c: ../regformats/%.dat,
1660 (%.c: ../regformats/arm/%.dat,
1661 (%.c: ../regformats/i386/%.dat,
1662 (%.c: ../regformats/rs6000/%.dat): New rules.
1663 (aarch64.c): Remove.
1664 (reg-arm.c): Remove.
1665 (arm-with-iwmmxt.c): Remove.
1666 (arm-with-vfpv2.c): Remove.
1667 (arm-with-vfpv3.c): Remove.
1668 (arm-with-neon.c): Remove.
1669 (reg-bfin.c): Remove.
1670 (reg-cris.c): Remove.
1671 (reg-crisv32.c): Remove.
1672 (i386.c): Remove.
1673 (i386-linux.c): Remove.
1674 (i386-avx.c): Remove.
1675 (i386-avx-linux.c): Remove.
1676 (i386-avx-avx512.c): Remove.
1677 (i386-avx-avx512-linux.c): Remove.
1678 (i386-mpx.c): Remove.
1679 (i386-mpx-linux.c): Remove.
1680 (i386-avx-mpx-avx512-pku.c): Remove.
1681 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1682 (i386-avx-mpx.c): Remove.
1683 (i386-avx-mpx-linux.c): Remove.
1684 (i386-mmx.c): Remove.
1685 (i386-mmx-linux.c): Remove.
1686 (reg-ia64.c): Remove.
1687 (reg-m32r.c): Remove.
1688 (reg-m68k.c): Remove.
1689 (reg-cf.c): Remove.
1690 (mips-linux.c): Remove.
1691 (mips-dsp-linux.c): Remove.
1692 (mips64-linux.c): Remove.
1693 (mips64-dsp-linux.c): Remove.
1694 (nios2-linux.c): Remove.
1695 (powerpc-32.c): Remove.
1696 (powerpc-32l.c): Remove.
1697 (powerpc-altivec32l.c): Remove.
1698 (powerpc-cell32l.c): Remove.
1699 (powerpc-vsx32l.c): Remove.
1700 (powerpc-isa205-32l.c): Remove.
1701 (powerpc-isa205-altivec32l.c): Remove.
1702 (powerpc-isa205-vsx32l.c): Remove.
1703 (powerpc-e500l.c): Remove.
1704 (powerpc-64l.c): Remove.
1705 (powerpc-altivec64l.c): Remove.
1706 (powerpc-cell64l.c): Remove.
1707 (powerpc-vsx64l.c): Remove.
1708 (powerpc-isa205-64l.c): Remove.
1709 (powerpc-isa205-altivec64l.c): Remove.
1710 (powerpc-isa205-vsx64l.c): Remove.
1711 (s390-linux32.c): Remove.
1712 (s390-linux32v1.c): Remove.
1713 (s390-linux32v2.c): Remove.
1714 (s390-linux64.c): Remove.
1715 (s390-linux64v1.c): Remove.
1716 (s390-linux64v2.c): Remove.
1717 (s390-te-linux64.c): Remove.
1718 (s390-vx-linux64.c): Remove.
1719 (s390-tevx-linux64.c): Remove.
1720 (s390x-linux64.c): Remove.
1721 (s390x-linux64v1.c): Remove.
1722 (s390x-linux64v2.c): Remove.
1723 (s390x-te-linux64.c): Remove.
1724 (s390x-vx-linux64.c): Remove.
1725 (s390x-tevx-linux64.c): Remove.
1726 (tic6x-c64xp-linux.c): Remove.
1727 (tic6x-c64x-linux.c): Remove.
1728 (tic6x-c62x-linux.c): Remove.
1729 (reg-sh.c): Remove.
1730 (reg-sparc64.c): Remove.
1731 (reg-spu.c): Remove.
1732 (amd64.c): Remove.
1733 (amd64-linux.c): Remove.
1734 (amd64-avx.c): Remove.
1735 (amd64-avx-linux.c): Remove.
1736 (amd64-avx-avx512.c): Remove.
1737 (amd64-avx-avx512-linux.c): Remove.
1738 (amd64-mpx.c): Remove.
1739 (amd64-mpx-linux.c): Remove.
1740 (amd64-avx-mpx-avx512-pku.c): Remove.
1741 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1742 (amd64-avx-mpx.c): Remove.
1743 (amd64-avx-mpx-linux.c): Remove.
1744 (x32.c): Remove.
1745 (x32-linux.c): Remove.
1746 (x32-avx.c): Remove.
1747 (x32-avx-linux.c): Remove.
1748 (x32-avx-avx512.c): Remove.
1749 (x32-avx-avx512-linux.c): Remove.
1750 (reg-xtensa.c): Remove.
1751 (reg-tilegx.c): Remove.
1752 (reg-tilegx32.c): Remove.
1753
1672e0d9
SDJ
17542017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1755
1756 * Makefile.in (SFILES): Add "common/environ.c".
1757 (OBJS): Add "common/environ.h".
1758
239b6d10
WT
17592017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1760
1761 * configure.ac: Check if the fs_base and gs_base members of
1762 `struct user_regs_struct' exist.
1763 * config.in: Regenerated.
1764 * configure: Likewise.
1765
694b382c
AT
17662017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1767
1768 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1769 target_read_memory.
1770 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1771 (get_next_pcs_syscall_next_pc): Likewise.
1772
7dc53023
LM
17732016-12-23 Luis Machado <lgustavo@codesourcery.com>
1774
1775 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1776 * nto-x86-low.c: Likewise.
1777
ad02e4fe
SM
17782016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1779
1780 * Makefile.in: Include disable-implicit-rules.mk.
1781
dcb07cfa
PA
17822016-11-23 Pedro Alves <palves@redhat.com>
1783
1784 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1785 (debug_vprintf): Use std::chrono::steady_clock instead of
1786 gettimeofday. Use '.' instead of ':'.
1787 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1788 (get_timestamp): Use std::chrono::steady_clock instead of
1789 gettimeofday.
1790
8629c02c
SM
17912016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1792
1793 * Makefile.in: Fix whitespace formatting.
1794
b593ecca
SM
17952016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1796
1797 * Makefile.in (SFILES, OBS): Flatten list and order
1798 alphabetically.
1799
9986ba08
PA
18002016-11-23 Pedro Alves <palves@redhat.com>
1801
1802 * event-loop.c (handle_file_event): Use warning.
1803 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1804 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1805 Use warning.
1806
4eefa7bc
PA
18072016-11-23 Pedro Alves <palves@redhat.com>
1808
1809 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1810 output.
1811 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1812 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1813 debug_printf and debug_flush for debug output.
1814 * server.c (handle_general_set): Likewise.
1815 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1816 output.
1817
5443506e
SM
18182016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1819
1820 * Makefile.in (.c.o): Replace rule with ...
1821 (%.o: %.c): ... this one.
1822
3b165252
SM
18232016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1824
1825 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1826 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1827 make.
1828 * configure.ac: Remove checks for the make program.
1829 * configure: Re-generate.
1830
0bcda685
PA
18312016-10-28 Pedro Alves <palves@redhat.com>
1832
1833 * Makefile.in (CXX_DIALECT): Get from configure.
1834 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1835 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1836 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1837 * config.in: Regenerate.
1838 * configure: Regenerate.
1839
c3805894
YQ
18402016-10-27 Yao Qi <yao.qi@linaro.org>
1841
1842 * linux-low.c (linux_supports_range_stepping): Return true if
1843 can_software_single_step return true.
1844
89342618
YQ
18452016-10-27 Yao Qi <yao.qi@linaro.org>
1846
1847 * inferiors.c (find_inferior_in_random): New function.
1848 * inferiors.h (find_inferior_in_random): Declare.
1849 * linux-low.c (linux_wait_for_event_filtered): Call
1850 find_inferior_in_random instead of find_inferior.
1851
e3652c84
YQ
18522016-10-27 Yao Qi <yao.qi@linaro.org>
1853
1854 * linux-low.c (linux_wait_1): If single-step breakpoints are
1855 inserted, remove them.
1856
5a04c4cf
PA
18572016-10-26 Pedro Alves <palves@redhat.com>
1858
1859 * linux-low.c (handle_extended_wait): Link parent/child fork
1860 threads.
1861 (linux_wait_1): Unlink them.
1862 (linux_set_resume_request): Ignore resume requests for
1863 already-resumed and unhandled fork child threads.
1864 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1865 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1866 New functions.
1867 (handle_v_requests) <vCont>: Don't call require_running.
1868 * server.h (in_queued_stop_replies): New declaration.
1869
cb93dc7f
YQ
18702016-10-24 Yao Qi <yao.qi@linaro.org>
1871
1872 PR server/20733
1873 * linux-aarch64-low.c (append_insns): Cast the return value to
1874 'uint32_t *'.
1875
a1078bea
YQ
18762016-10-10 Yao Qi <yao.qi@linaro.org>
1877
1878 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1879
1fb77080
SDJ
18802016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1881
1882 * target.c (target_supports_multi_process): New function, moved
1883 from...
1884 * target.h (target_supports_multi_process): ... here. Remove
1885 macro.
1886
39b5a3b9
TT
18872016-10-05 Tom Tromey <tom@tromey.com>
1888
1889 PR remote/20655:
1890 * tracepoint.c (handle_tracepoint_bkpts): Check
1891 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1892
c1d0b70a
YQ
18932016-10-05 Yao Qi <yao.qi@linaro.org>
1894
1895 * configure.srv: Update the path of arm-*.xml files.
1896
0a69eedb
YQ
18972016-10-05 Terry Guo <terry.guo@arm.com>
1898 Yao Qi <yao.qi@linaro.org>
1899
1900 * Makefile.in: Adjust the path of rules.
1901 * configure.srv: Update the path of xml files.
1902 * regformats/arm-with-iwmmxt.dat: Regenerated.
1903 * regformats/arm-with-neon.dat: Likewise.
1904 * regformats/arm-with-vfpv2.dat: Likewise.
1905 * regformats/arm-with-vfpv3.dat Likewise.
1906
17e16485
YQ
19072016-09-30 Yao Qi <yao.qi@linaro.org>
1908
1909 PR gdbserver/20627
1910 * target.c (target_stop_and_wait): Don't call
1911 target_continue_no_signal, use resume_stop instead.
1912
edeeb602
YQ
19132016-09-26 Yao Qi <yao.qi@linaro.org>
1914
1915 * linux-low.c (linux_wait_1): Call debug_exit.
1916
503b1c39
PA
19172016-09-23 Pedro Alves <palves@redhat.com>
1918
1919 * Makefile.in (SFILES): Add common/new-op.c.
1920 (OBS): Add common/new-op.o.
1921 (new-op.o): New rule.
1922
74172ecf
SM
19232016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1924
1925 * .gitinore: Ignore more files.
1926
fc6cda2e
YQ
19272016-09-21 Yao Qi <yao.qi@linaro.org>
1928
1929 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1930 23.
1931
bc1e6c81
SDJ
19322016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1933
1934 * server.c (start_inferior): Call target_mourn_inferior instead of
1935 mourn_inferior; pass ptid_t argument to it.
1936 (resume): Likewise.
1937 (handle_target_event): Likewise.
1938 * target.c (target_mourn_inferior): New function.
1939 * target.h (mourn_inferior): Delete macro.
1940
0e00e962
AA
19412016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1942
1943 * linux-low.c (lwp_is_stepping): New function.
1944
1d8cb77d
CL
19452016-09-06 Carl Love <cel@us.ibm.com>
1946
1947 * server.c (start_inferior): Fixed comment, requested comment change
1948 didn't get updated correctly. Removed reference to ptrace () call as
1949 it is only true on Linux systems.
1950
7313bced
CL
19512016-09-06 Carl Love <cel@us.ibm.com>
1952
1953 * server.c (start_inferior): Do not call
1954 function target_post_create_inferior () if the
1955 inferior process has already exited.
1956
cf6de44d
PA
19572016-09-05 Pedro Alves <palves@redhat.com>
1958
1959 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1960 (COMPILE.pre, CC_LD): Use CXX directly.
1961 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1962 * acinclude.m4: Don't include build-with-cxx.m4.
1963 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1964 * configure: Regenerate.
1965
c1da6748
AT
19662016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1967
1968 PR gdb/19495
1969 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1970 call writing data to own_buf.
1971
f2b9e3df
SDJ
19722016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1973
1974 * target.c (mywait): Call target_wait instead of
1975 the_target->wait.
1976 (target_wait): New function.
1977
049a8570
SDJ
19782016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1979
1980 * server.c (start_inferior): New variable 'ptid'. Replace calls
1981 to the_target->resume by target_continue{,_no_signal}, depending
1982 on the case.
1983 * target.c (target_stop_and_wait): Call target_continue_no_signal
1984 instead of the_target->resume.
1985 (target_continue): New function.
1986
3aa5cfa0
AT
19872016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1988
1989 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1990
754653a7
AZ
19912016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1992
1993 PR server/20491
1994 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1995 ps_prochandle.
1996 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1997 * linux-arm-low.c (ps_get_thread_area): Likewise.
1998 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1999 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2000 * linux-mips-low.c (ps_get_thread_area): Likewise.
2001 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2002 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2003 * linux-x86-low.c (ps_get_thread_area): Likewise.
2004 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2005
ed036b40
PA
20062016-08-19 Pedro Alves <palves@redhat.com>
2007
2008 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2009
c8ef42ee
PA
20102016-08-19 Pedro Alves <palves@redhat.com>
2011
2012 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2013 comment. Use memcpy instead of casting through unsigned long.
2014
9c235a72
PA
20152016-08-19 Pedro Alves <palves@redhat.com>
2016
2017 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2018 allocating around 0x80000000.
2019
201506da
PA
20202016-08-19 Pedro Alves <palves@redhat.com>
2021
2022 PR gdb/20415
2023 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2024 (x32-avx512-linux-ipa.o): New rules.
2025 * configure.ac (x86_64-*-linux*): New x32 check.
2026 * configure.srv (ipa_x32_linux_regobj): New.
2027 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2028 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2029 descriptions.
2030 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2031 descriptions.
2032 * configure: Regenerate.
2033
f348d89a
PA
20342016-08-09 Pedro Alves <palves@redhat.com>
2035
2036 PR gdb/18653
2037 * Makefile.in (OBS): Add signals-state-save-restore.o.
2038 (signals-state-save-restore.o): New rule.
2039 * config.in: Regenerate.
2040 * configure: Regenerate.
2041 * linux-low.c: Include "signals-state-save-restore.h".
2042 (linux_create_inferior): Call
2043 restore_original_signals_state.
2044 * server.c: Include "dispositions-save-restore.h".
2045 (captured_main): Call save_original_signals_state.
2046
1baf5149
PA
20472016-08-05 Pedro Alves <palves@redhat.com>
2048
2049 * configure: Regenerate.
2050
fcd4a73d
YQ
20512016-08-04 Yao Qi <yao.qi@linaro.org>
2052
2053 * linux-low.c (regsets_fetch_inferior_registers): Check
2054 errno is ESRCH or not.
2055
979659d0
YQ
20562016-08-02 Yao Qi <yao.qi@linaro.org>
2057
2058 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2059 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2060 (thread_db_load_search): Update.
2061 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2062 td_ta_set_event and td_ta_event_getmsg.
2063
6598661d
PA
20642016-07-26 Pedro Alves <palves@redhat.com>
2065
2066 PR server/20414
2067 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2068 of unsigned long for 64-bit registers and use uint32_t instead of
2069 unsigned int for 32-bit registers.
2070
9cf12d57
PA
20712016-07-26 Pedro Alves <palves@redhat.com>
2072
2073 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2074 to 'ptrace'.
2075
305450ed
TT
20762016-07-21 Tom Tromey <tom@tromey.com>
2077
2078 * configure: Rebuild.
2079
2583da7c
YQ
20802016-07-21 Yao Qi <yao.qi@linaro.org>
2081
2082 * mem-break.c (find_gdb_breakpoint): Cast bp to
2083 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2084
21536b36
YQ
20852016-07-21 Yao Qi <yao.qi@linaro.org>
2086
2087 * server.c (handle_v_requests): Support s and S actions
2088 if target_supports_software_single_step return true.
2089
8901d193
YQ
20902016-07-21 Yao Qi <yao.qi@linaro.org>
2091
2092 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2093 is resume_step, call maybe_hw_step.
2094 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2095 and unstop them.
2096 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2097 breakpoints or not.
2098 (proceed_one_lwp): If resume request is resume_step, install
2099 reinsert breakpoints and call maybe_hw_step.
2100
0e9a339e
YQ
21012016-07-21 Yao Qi <yao.qi@linaro.org>
2102
2103 * linux-low.c (proceed_one_lwp): Declare.
2104 (linux_resume_one_thread): Remove local variable 'step'.
2105 Lift code enqueue signal. Call proceed_one_lwp instead of
2106 linux_resume_one_lwp.
2107
4281b351
YQ
21082016-07-21 Yao Qi <yao.qi@linaro.org>
2109
2110 * linux-low.c (linux_resume_one_thread): Call
2111 enqueue_pending_signal.
2112
984a2c04
YQ
21132016-07-21 Yao Qi <yao.qi@linaro.org>
2114
2115 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2116 * inferiors.c (do_restore_current_thread_cleanup): New function.
2117 (make_cleanup_restore_current_thread): Likewise.
2118 * linux-low.c (install_software_single_step_breakpoints): Call
2119 make_cleanup_restore_current_thread. Switch current_thread to
2120 thread.
2121
bec903c9
YQ
21222016-07-21 Yao Qi <yao.qi@linaro.org>
2123
2124 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2125 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2126 (clone_one_breakpoint): Likewise.
2127 (delete_reinsert_breakpoints): Change parameter to thread.
2128 Callers updated.
2129 (has_reinsert_breakpoints): Likewise.
2130 (uninsert_reinsert_breakpoints): Likewise.
2131 (reinsert_reinsert_breakpoints): Likewise.
2132 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2133 (delete_reinsert_breakpoints): Likewise.
2134 (reinsert_reinsert_breakpoints): Likewise.
2135 (uninsert_reinsert_breakpoints): Likewise.
2136 (has_reinsert_breakpoints): Likewise.
2137
63c40ec7
YQ
21382016-07-21 Yao Qi <yao.qi@linaro.org>
2139
2140 * inferiors.c (get_thread_process): Make parameter const.
2141 * inferiors.h (get_thread_process): Update declaration.
2142 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2143 Add new parameters child_thread and parent_thread. Callers
2144 updated.
2145 * mem-break.h (clone_all_breakpoints): Update declaration.
2146
9aa76cd0
YQ
21472016-07-21 Yao Qi <yao.qi@linaro.org>
2148
2149 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2150 <command_list, handler>: Remove.
2151 (struct gdb_breakpoint): New.
2152 (struct other_breakpoint): New.
2153 (struct reinsert_breakpoint): New.
2154 (is_gdb_breakpoint): New function.
2155 (any_persistent_commands): Update command_list if
2156 is_gdb_breakpoint returns true.
2157 (set_breakpoint): Create breakpoints according to their types.
2158 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2159 (set_gdb_breakpoint_1): Likewise.
2160 (set_gdb_breakpoint): Likewise.
2161 (clear_breakpoint_conditions): Change parameter type to
2162 'struct gdb_breakpoint *'.
2163 (clear_breakpoint_commands): Likewise.
2164 (clear_breakpoint_conditions_and_commands): Likewise.
2165 (add_condition_to_breakpoint): Likewise.
2166 (add_breakpoint_condition): Likewise.
2167 (add_commands_to_breakpoint): Likewise.
2168 (check_breakpoints): Check other_breakpoint.
2169 (clone_one_breakpoint): Clone breakpopint according to its type.
2170 * mem-break.h (struct gdb_breakpoint): Declare.
2171 (set_gdb_breakpoint): Update declaration.
2172 (clear_breakpoint_conditions_and_commands): Likewise.
2173 (add_breakpoint_condition): Likewise.
2174 (add_breakpoint_commands): Likewise.
2175 * server.c (process_point_options): Change parameter type to
2176 'struct gdb_breakpoint *'.
2177
811f8301
YQ
21782016-07-21 Yao Qi <yao.qi@linaro.org>
2179
2180 * mem-break.c (set_breakpoint_at): Rename it to ...
2181 (set_breakpoint_type_at): ... it.
2182 (set_breakpoint_at): Call set_breakpoint_type_at.
2183 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2184 * mem-break.h (set_breakpoint_at): Update comments.
2185
b1c51e36
CLT
21862016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2187
2188 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2189 to buf parameter.
2190 (nios2_store_gregset): Likewise.
2191
ced2dffb
PA
21922016-07-01 Pedro Alves <palves@redhat.com>
2193 Antoine Tremblay <antoine.tremblay@ericsson.com>
2194
2195 * linux-low.c: Change interface to take the target lwp_info
2196 pointer directly and return void. Handle detaching from a zombie
2197 thread.
2198 (linux_detach_lwp_callback): New function.
2199 (linux_detach): Detach from the leader thread after detaching from
2200 the clone threads.
2201
2ac09a5b
YQ
22022016-06-28 Yao Qi <yao.qi@linaro.org>
2203
2204 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2205 for variable new_offset.
2206 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2207 (aarch64_ftrace_insn_reloc_cb): Likewise.
2208 (aarch64_ftrace_insn_reloc_tb): Likewise.
2209 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2210 PRIx64 instead of PRIx32.
2211
79e7fd4f
YQ
22122016-06-28 Yao Qi <yao.qi@linaro.org>
2213
2214 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2215 (the_low_target): Install arm_get_syscall_trapinfo.
2216
061fc021
YQ
22172016-06-28 Yao Qi <yao.qi@linaro.org>
2218
2219 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2220 function.
2221 (the_low_target): Install aarch64_get_syscall_trapinfo.
2222
4cc32bec
YQ
22232016-06-28 Yao Qi <yao.qi@linaro.org>
2224
2225 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2226 Callers updated.
2227 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2228 Remove parameter sysno.
2229 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2230 sysret.
2231
782c1122
AA
22322016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2233
2234 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2235 (s390_emit_ne_goto): Likewise.
2236 (s390_emit_lt_goto): Likewise.
2237 (s390_emit_le_goto): Likewise.
2238 (s390_emit_gt_goto): Likewise.
2239 (s390_emit_ge_goto): Likewise.
2240 (s390x_emit_eq_goto): Likewise.
2241 (s390x_emit_ne_goto): Likewise.
2242 (s390x_emit_lt_goto): Likewise.
2243 (s390x_emit_le_goto): Likewise.
2244 (s390x_emit_gt_goto): Likewise.
2245 (s390x_emit_ge_goto): Likewise.
2246 (s390_emit_ops_impl): Mark variable static.
2247 (s390x_emit_ops): Likewise.
2248
2e7b624b
YQ
22492016-06-17 Yao Qi <yao.qi@linaro.org>
2250
2251 * linux-low.c (handle_extended_wait): Call
2252 uninsert_reinsert_breakpoints for the parent process. Remove
2253 reinsert breakpoints from the child process. Reinsert them to
2254 the parent process when vfork is done.
2255 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2256 (reinsert_reinsert_breakpoints): New function.
2257 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2258 (reinsert_reinsert_breakpoints): Declare.
2259
8a81c5d7
YQ
22602016-06-17 Yao Qi <yao.qi@linaro.org>
2261
2262 * linux-low.c (handle_extended_wait): If the parent is doing
2263 step-over, remove the reinsert breakpoints from the forked child.
2264
f50bf8e5
YQ
22652016-06-17 Yao Qi <yao.qi@linaro.org>
2266
2267 * linux-low.c (unsuspend_all_lwps): Declare.
2268 (linux_low_filter_event): If thread exited, call finish_step_over.
2269 If step-over is finished, unsuspend other threads.
2270
8376a3cb
YQ
22712016-06-17 Yao Qi <yao.qi@linaro.org>
2272
2273 * linux-low.c (linux_resume_one_lwp_throw): Assert
2274 has_reinsert_breakpoints returns false.
2275 * mem-break.c (delete_disabled_breakpoints): Assert
2276 bp type isn't reinsert_breakpoint.
2277
f79b145d
YQ
22782016-06-17 Yao Qi <yao.qi@linaro.org>
2279
2280 * linux-low.c (maybe_hw_step): New function.
2281 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2282 (finish_step_over): Switch current_thread to lwp temporarily,
2283 and assert has_reinsert_breakpoints returns true.
2284 (proceed_one_lwp): Call maybe_hw_step.
2285 * mem-break.c (has_reinsert_breakpoints): New function.
2286 * mem-break.h (has_reinsert_breakpoints): Declare.
2287
0ae534d2
JT
22882016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2289
2290 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2291
fcdad592
YQ
22922016-05-17 Yao Qi <yao.qi@linaro.org>
2293
2294 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2295 instead of find_inferior.
2296
9e784964
YQ
22972016-05-05 Yao Qi <yao.qi@linaro.org>
2298
2299 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2300 Initialize res to zero.
2301
cf2ebb6e
YQ
23022016-05-05 Yao Qi <yao.qi@linaro.org>
2303
2304 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2305 to uint32_t.
2306
c1aebf87
UW
23072016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2308
2309 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2310 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2311 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2312
35fd2deb 23132016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 2314 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
2315
2316 * tracepoint.c (write_inferior_int8): New function.
2317 (cmd_qtenable_disable): Write enable flag using
2318 write_inferior_int8.
2319
484b3c32
YQ
23202016-04-25 Yao Qi <yao.qi@linaro.org>
2321
2322 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2323 (need_step_over_p): Return zero if the LWP has pending signals
2324 can be delivered on software single step target.
2325
85ba7d86
YQ
23262016-04-25 Yao Qi <yao.qi@linaro.org>
2327
2328 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2329 return instead of error.
2330
3539aa13
YQ
23312016-04-22 Yao Qi <yao.qi@linaro.org>
2332
2333 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2334 to 23.
2335
5b061e98
YQ
23362016-04-22 Yao Qi <yao.qi@linaro.org>
2337
2338 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2339 signal when stepping over breakpoint with software single
2340 step.
2341
3451269c
PA
23422016-04-21 Pedro Alves <palves@redhat.com>
2343
2344 * linux-s390-low.c (s390_collect_ptrace_register)
2345 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2346 add casts.
2347 (s390_check_regset): Use void * instead of gdb_byte *.
2348
a2358508
PA
23492016-04-20 Pedro Alves <palves@redhat.com>
2350
2351 * configure: Renegerate.
2352
6885166d
YQ
23532016-04-20 Yao Qi <yao.qi@linaro.org>
2354
2355 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2356 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2357 number 16.
2358 (arm_store_gregset): Likewise.
2359
2b863f51
WT
23602016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2361
2362 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2363 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2364 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2365 (amd64-avx-mpx-linux.c): New rules.
2366 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2367 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2368 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2369 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2370 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2371 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2372 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2373 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2374 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2375 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2376 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2377 * linux-x86-low.c (x86_linux_read_description): Add case for
2378 X86_XSTATE_AVX_MPX_MASK.
2379 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2380 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2381 init_registers_i386_avx_mpx_linux.
2382 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2383 (initialize_low_tracepoint): Call
2384 init_registers_i386_avx_mpx_linux.
2385 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2386 (initialize_low_tracepoint): Call
2387 init_registers_amd64_avx_mpx_linux.
2388 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2389 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2390 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2391 declarations.
2392
9b30624b
PA
23932016-04-18 Pedro Alves <palves@redhat.com>
2394
2395 * configure: Regenerate.
2396
45e3745e
AT
23972016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2398
2399 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2400 (aarch64_emit_sub): Likewise.
2401
2afc13ff
PA
24022016-04-12 Pedro Alves <palves@redhat.com>
2403
2404 * utils.c (prepare_to_throw_exception): Delete.
2405
6e774b13
SM
24062016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2407
2408 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2409
4dca19f8
MK
24102016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2411
2412 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2413
d0a9981f
MK
24142016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2415
2416 * linux-aarch64-ipa.c: Add <elf.h> include.
2417 * linux-ppc-ipa.c: Add <elf.h> include.
2418 * linux-s390-ipa.c: Add <elf.h> include.
2419
252db07e
MK
24202016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2421
2422 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2423 (get_raw_reg_ptr): Likewise.
2424 (get_trace_state_variable_value_ptr): Likewise.
2425 (set_trace_state_variable_value_ptr): Likewise.
2426 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2427 char *.
2428
14e2b6d9
MK
24292016-03-31 Wei-cheng Wang <cole945@gmail.com>
2430 Marcin Kościelnicki <koriakin@0x04.net>
2431
2432 PR/17221
2433 * linux-ppc-low.c (emit_insns): New function.
2434 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2435 (ppc_emit_prologue): New function.
2436 (ppc_emit_epilogue): New function.
2437 (ppc_emit_add): New function.
2438 (ppc_emit_sub): New function.
2439 (ppc_emit_mul): New function.
2440 (ppc_emit_lsh): New function.
2441 (ppc_emit_rsh_signed): New function.
2442 (ppc_emit_rsh_unsigned): New function.
2443 (ppc_emit_ext): New function.
2444 (ppc_emit_zero_ext): New function.
2445 (ppc_emit_log_not): New function.
2446 (ppc_emit_bit_and): New function.
2447 (ppc_emit_bit_or): New function.
2448 (ppc_emit_bit_xor): New function.
2449 (ppc_emit_bit_not): New function.
2450 (ppc_emit_equal): New function.
2451 (ppc_emit_less_signed): New function.
2452 (ppc_emit_less_unsigned): New function.
2453 (ppc_emit_ref): New function.
2454 (ppc_emit_const): New function.
2455 (ppc_emit_reg): New function.
2456 (ppc_emit_pop): New function.
2457 (ppc_emit_stack_flush): New function.
2458 (ppc_emit_swap): New function.
2459 (ppc_emit_stack_adjust): New function.
2460 (ppc_emit_call): New function.
2461 (ppc_emit_int_call_1): New function.
2462 (ppc_emit_void_call_2): New function.
2463 (ppc_emit_if_goto): New function.
2464 (ppc_emit_goto): New function.
2465 (ppc_emit_eq_goto): New function.
2466 (ppc_emit_ne_goto): New function.
2467 (ppc_emit_lt_goto): New function.
2468 (ppc_emit_le_goto): New function.
2469 (ppc_emit_gt_goto): New function.
2470 (ppc_emit_ge_goto): New function.
2471 (ppc_write_goto_address): New function.
2472 (ppc_emit_ops_impl): New static variable.
2473 (ppc64v1_emit_prologue): New function.
2474 (ppc64v2_emit_prologue): New function.
2475 (ppc64_emit_epilogue): New function.
2476 (ppc64_emit_add): New function.
2477 (ppc64_emit_sub): New function.
2478 (ppc64_emit_mul): New function.
2479 (ppc64_emit_lsh): New function.
2480 (ppc64_emit_rsh_signed): New function.
2481 (ppc64_emit_rsh_unsigned): New function.
2482 (ppc64_emit_ext): New function.
2483 (ppc64_emit_zero_ext): New function.
2484 (ppc64_emit_log_not): New function.
2485 (ppc64_emit_bit_and): New function.
2486 (ppc64_emit_bit_or): New function.
2487 (ppc64_emit_bit_xor): New function.
2488 (ppc64_emit_bit_not): New function.
2489 (ppc64_emit_equal): New function.
2490 (ppc64_emit_less_signed): New function.
2491 (ppc64_emit_less_unsigned): New function.
2492 (ppc64_emit_ref): New function.
2493 (ppc64_emit_const): New function.
2494 (ppc64v1_emit_reg): New function.
2495 (ppc64v2_emit_reg): New function.
2496 (ppc64_emit_pop): New function.
2497 (ppc64_emit_stack_flush): New function.
2498 (ppc64_emit_swap): New function.
2499 (ppc64v1_emit_call): New function.
2500 (ppc64v2_emit_call): New function.
2501 (ppc64v1_emit_int_call_1): New function.
2502 (ppc64v2_emit_int_call_1): New function.
2503 (ppc64v1_emit_void_call_2): New function.
2504 (ppc64v2_emit_void_call_2): New function.
2505 (ppc64_emit_if_goto): New function.
2506 (ppc64_emit_eq_goto): New function.
2507 (ppc64_emit_ne_goto): New function.
2508 (ppc64_emit_lt_goto): New function.
2509 (ppc64_emit_le_goto): New function.
2510 (ppc64_emit_gt_goto): New function.
2511 (ppc64_emit_ge_goto): New function.
2512 (ppc64v1_emit_ops_impl): New static variable.
2513 (ppc64v2_emit_ops_impl): New static variable.
2514 (ppc_emit_ops): New function.
2515 (linux_low_target): Wire in ppc_emit_ops.
2516
a2174ba4
MK
25172016-03-31 Wei-cheng Wang <cole945@gmail.com>
2518 Marcin Kościelnicki <koriakin@0x04.net>
2519
2520 PR/17221
2521 * Makefile.in: Add powerpc-*-ipa.o
2522 * configure.srv: Add ipa_obj for powerpc*-linux.
2523 * linux-ppc-ipa.c: New file.
2524 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2525 includes.
2526 (PPC_FIELD): New macro.
2527 (PPC_SEXT): New macro.
2528 (PPC_OP6): New macro.
2529 (PPC_BO): New macro.
2530 (PPC_LI): New macro.
2531 (PPC_BD): New macro.
2532 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2533 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2534 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2535 (ppc_get_thread_area): New function.
2536 (is_elfv2_inferior): New function.
2537 (gen_ds_form): New function.
2538 (GEN_STD): New macro.
2539 (GEN_STDU): New macro.
2540 (GEN_LD): New macro.
2541 (GEN_LDU): New macro.
2542 (gen_d_form): New function.
2543 (GEN_ADDI): New macro.
2544 (GEN_ADDIS): New macro.
2545 (GEN_LI): New macro.
2546 (GEN_LIS): New macro.
2547 (GEN_ORI): New macro.
2548 (GEN_ORIS): New macro.
2549 (GEN_LWZ): New macro.
2550 (GEN_STW): New macro.
2551 (GEN_STWU): New macro.
2552 (gen_xfx_form): New function.
2553 (GEN_MFSPR): New macro.
2554 (GEN_MTSPR): New macro.
2555 (GEN_MFCR): New macro.
2556 (GEN_MTCR): New macro.
2557 (GEN_SYNC): New macro.
2558 (GEN_LWSYNC): New macro.
2559 (gen_x_form): New function.
2560 (GEN_OR): New macro.
2561 (GEN_MR): New macro.
2562 (GEN_LWARX): New macro.
2563 (GEN_STWCX): New macro.
2564 (GEN_CMPW): New macro.
2565 (gen_md_form): New function.
2566 (GEN_RLDICL): New macro.
2567 (GEN_RLDICR): New macro.
2568 (gen_i_form): New function.
2569 (GEN_B): New macro.
2570 (GEN_BL): New macro.
2571 (gen_b_form): New function.
2572 (GEN_BNE): New macro.
2573 (GEN_LOAD): New macro.
2574 (GEN_STORE): New macro.
2575 (gen_limm): New function.
2576 (gen_atomic_xchg): New function.
2577 (gen_call): New function.
2578 (ppc_relocate_instruction): New function.
2579 (ppc_install_fast_tracepoint_jump_pad): New function.
2580 (ppc_get_min_fast_tracepoint_insn_len): New function.
2581 (ppc_get_ipa_tdesc_idx): New function.
2582 (the_low_target): Wire in the new functions.
2583 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2584 tdescs.
2585 * linux-ppc-tdesc.h: New file.
2586
a13c4696
MK
25872016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2588
2589 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2590 (alloc_jump_pad_buffer): New function.
2591 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2592 (alloc_jump_pad_buffer): New function.
2593 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2594 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2595 (alloc_jump_pad_buffer): New function.
2596 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2597 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2598 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2599 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2600
1cda1512
MK
26012016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2602
2603 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2604 * linux-amd64-ipa.c: Likewise.
2605 * linux-i386-ipa.c: Likewise.
2606 * linux-s390-ipa.c: Likewise.
2607 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2608 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2609 set_trace_state_variable_value_ptr.
2610 (struct ipa_sym_addresses): Likewise.
2611 (symbol_list): Likewise.
2612 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2613 accessing gdb_collect directly.
2614 (gdb_collect_ptr_type): New typedef.
2615 (get_raw_reg_ptr_type): New typedef.
2616 (get_trace_state_variable_value_ptr_type): New typedef.
2617 (set_trace_state_variable_value_ptr_type): New typedef.
2618 (gdb_collect_ptr): New global.
2619 (get_raw_reg_ptr): New global.
2620 (get_trace_state_variable_value_ptr): New global.
2621 (set_trace_state_variable_value_ptr): New global.
2622 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2623 accessing get_raw_reg directly.
2624 (get_get_tsv_func_addr): Likewise for
2625 get_trace_state_variable_value_ptr.
2626 (get_set_tsv_func_addr): Likewise for
2627 set_trace_state_variable_value_ptr.
2628 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2629
72fb5488
SM
26302016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2631
2632 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2633
28170b88
MK
26342016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2635
2636 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2637 packets.
2638 (relocate_instruction): Remove own_buf.
2639 * server.c (own_buf): Make global.
2640 (handle_v_requests): Make global.
2641 * server.h (own_buf): New declaration.
2642 (handle_v_requests): New prototype.
2643
f39e8743
MK
26442016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2645
2646 PR 18377
2647 * linux-s390-low.c (add_insns): New function.
2648 (s390_emit_prologue): New function.
2649 (s390_emit_epilogue): New function.
2650 (s390_emit_add): New function.
2651 (s390_emit_sub): New function.
2652 (s390_emit_mul): New function.
2653 (s390_emit_lsh): New function.
2654 (s390_emit_rsh_signed): New function.
2655 (s390_emit_rsh_unsigned): New function.
2656 (s390_emit_ext): New function.
2657 (s390_emit_log_not): New function.
2658 (s390_emit_bit_and): New function.
2659 (s390_emit_bit_or): New function.
2660 (s390_emit_bit_xor): New function.
2661 (s390_emit_bit_not): New function.
2662 (s390_emit_equal): New function.
2663 (s390_emit_less_signed): New function.
2664 (s390_emit_less_unsigned): New function.
2665 (s390_emit_ref): New function.
2666 (s390_emit_if_goto): New function.
2667 (s390_emit_goto): New function.
2668 (s390_write_goto_address): New function.
2669 (s390_emit_litpool): New function.
2670 (s390_emit_const): New function.
2671 (s390_emit_call): New function.
2672 (s390_emit_reg): New function.
2673 (s390_emit_pop): New function.
2674 (s390_emit_stack_flush): New function.
2675 (s390_emit_zero_ext): New function.
2676 (s390_emit_swap): New function.
2677 (s390_emit_stack_adjust): New function.
2678 (s390_emit_set_r2): New function.
2679 (s390_emit_int_call_1): New function.
2680 (s390_emit_void_call_2): New function.
2681 (s390_emit_eq_goto): New function.
2682 (s390_emit_ne_goto): New function.
2683 (s390_emit_lt_goto): New function.
2684 (s390_emit_le_goto): New function.
2685 (s390_emit_gt_goto): New function.
2686 (s390_emit_ge_goto): New function.
2687 (s390x_emit_prologue): New function.
2688 (s390x_emit_epilogue): New function.
2689 (s390x_emit_add): New function.
2690 (s390x_emit_sub): New function.
2691 (s390x_emit_mul): New function.
2692 (s390x_emit_lsh): New function.
2693 (s390x_emit_rsh_signed): New function.
2694 (s390x_emit_rsh_unsigned): New function.
2695 (s390x_emit_ext): New function.
2696 (s390x_emit_log_not): New function.
2697 (s390x_emit_bit_and): New function.
2698 (s390x_emit_bit_or): New function.
2699 (s390x_emit_bit_xor): New function.
2700 (s390x_emit_bit_not): New function.
2701 (s390x_emit_equal): New function.
2702 (s390x_emit_less_signed): New function.
2703 (s390x_emit_less_unsigned): New function.
2704 (s390x_emit_ref): New function.
2705 (s390x_emit_if_goto): New function.
2706 (s390x_emit_const): New function.
2707 (s390x_emit_call): New function.
2708 (s390x_emit_reg): New function.
2709 (s390x_emit_pop): New function.
2710 (s390x_emit_stack_flush): New function.
2711 (s390x_emit_zero_ext): New function.
2712 (s390x_emit_swap): New function.
2713 (s390x_emit_stack_adjust): New function.
2714 (s390x_emit_int_call_1): New function.
2715 (s390x_emit_void_call_2): New function.
2716 (s390x_emit_eq_goto): New function.
2717 (s390x_emit_ne_goto): New function.
2718 (s390x_emit_lt_goto): New function.
2719 (s390x_emit_le_goto): New function.
2720 (s390x_emit_gt_goto): New function.
2721 (s390x_emit_ge_goto): New function.
2722 (s390_emit_ops): New function.
2723 (struct linux_target_ops): Fill in emit_ops hook.
2724
abd9baf9
MK
27252016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2726
2727 PR 18377
2728 * Makefile.in: Add s390 IPA files.
2729 * configure.srv: Build IPA for s390.
2730 * linux-s390-ipa.c: New file.
2731 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2732 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2733 (tdesc_s390_linux32): Likewise.
2734 (init_registers_s390_linux32v1): Likewise.
2735 (tdesc_s390_linux32v1): Likewise.
2736 (init_registers_s390_linux32v2): Likewise.
2737 (tdesc_s390_linux32v2): Likewise.
2738 (init_registers_s390_linux64): Likewise.
2739 (tdesc_s390_linux64): Likewise.
2740 (init_registers_s390_linux64v1): Likewise.
2741 (tdesc_s390_linux64v1): Likewise.
2742 (init_registers_s390_linux64v2): Likewise.
2743 (tdesc_s390_linux64v2): Likewise.
2744 (init_registers_s390_te_linux64): Likewise.
2745 (tdesc_s390_te_linux64): Likewise.
2746 (init_registers_s390_vx_linux64): Likewise.
2747 (tdesc_s390_vx_linux64): Likewise.
2748 (init_registers_s390_tevx_linux64): Likewise.
2749 (tdesc_s390_tevx_linux64): Likewise.
2750 (init_registers_s390x_linux64): Likewise.
2751 (tdesc_s390x_linux64): Likewise.
2752 (init_registers_s390x_linux64v1): Likewise.
2753 (tdesc_s390x_linux64v1): Likewise.
2754 (init_registers_s390x_linux64v2): Likewise.
2755 (tdesc_s390x_linux64v2): Likewise.
2756 (init_registers_s390x_te_linux64): Likewise.
2757 (tdesc_s390x_te_linux64): Likewise.
2758 (init_registers_s390x_vx_linux64): Likewise.
2759 (tdesc_s390x_vx_linux64): Likewise.
2760 (init_registers_s390x_tevx_linux64): Likewise.
2761 (tdesc_s390x_tevx_linux64): Likewise.
2762 (have_hwcap_s390_vx): New static variable.
2763 (s390_arch_setup): Fill have_hwcap_s390_vx.
2764 (s390_get_thread_area): New function.
2765 (s390_ft_entry_gpr_esa): New const.
2766 (s390_ft_entry_gpr_zarch): New const.
2767 (s390_ft_entry_misc): New const.
2768 (s390_ft_entry_fr): New const.
2769 (s390_ft_entry_vr): New const.
2770 (s390_ft_main_31): New const.
2771 (s390_ft_main_64): New const.
2772 (s390_ft_exit_fr): New const.
2773 (s390_ft_exit_vr): New const.
2774 (s390_ft_exit_misc): New const.
2775 (s390_ft_exit_gpr_esa): New const.
2776 (s390_ft_exit_gpr_zarch): New const.
2777 (append_insns): New function.
2778 (s390_relocate_instruction): New function.
2779 (s390_install_fast_tracepoint_jump_pad): New function.
2780 (s390_get_min_fast_tracepoint_insn_len): New function.
2781 (s390_get_ipa_tdesc_idx): New function.
2782 (struct linux_target_ops): Wire in the above functions.
2783 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2784 * linux-s390-tdesc.h: New file.
2785
a4105d04
MK
27862016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2787
2788 * linux-s390-low.c (s390_supports_tracepoints): New function.
2789 (struct linux_target_ops): Fill supports_tracepoints hook.
2790
35ac8b3e
YQ
27912016-03-18 Yao Qi <yao.qi@linaro.org>
2792
2793 * linux-low.c (lwp_signal_can_be_delivered): New function.
2794 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2795
94610ec4
YQ
27962016-03-18 Yao Qi <yao.qi@linaro.org>
2797
2798 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2799 0 if signal is enqueued. Remove 'signal' from one debugging
2800 message. Move one debugging message to some lines below.
2801 Remove code setting 'signal' to 0.
2802
80aea927
YQ
28032016-03-18 Yao Qi <yao.qi@linaro.org>
2804
2805 * linux-low.c (linux_low_filter_event): Remove redundant
2806 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2807
b04fd3be
MK
28082016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2809
2810 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2811 (struct linux_target_ops): Wire in the above.
2812
c40c8d4b
YQ
28132016-03-03 Yao Qi <yao.qi@linaro.org>
2814
2815 * linux-low.c: Update comments to start_step_over.
2816
0f8288ae
YQ
28172016-03-03 Yao Qi <yao.qi@linaro.org>
2818
2819 PR server/19736
2820 * linux-low.c (handle_extended_wait): Set child suspended
2821 if event_lwp->bp_reinsert isn't zero.
2822
fdbd04a8
YQ
28232016-03-02 Yao Qi <yao.qi@linaro.org>
2824
2825 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2826 enqueue_pending_signal.
2827
6896a8fa
MK
28282016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2829
2830 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2831 is actually loaded.
2832
ab503087
MK
28332016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2834
2835 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2836 (s390_regmap_3264) [!__s390x__]: New global.
2837 (s390_collect_ptrace_register): Skip map entries containing -1.
2838 (s390_supply_ptrace_register): Ditto.
2839 (s390_fill_gprs_high): New function.
2840 (s390_store_gprs_high): New function.
2841 (s390_regsets): Add NT_S390_HIGH_GPRS.
2842 (s390_get_hwcap): Enable on 31-bit.
2843 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2844 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2845 Detect NT_S390_HIGH_GPRS.
2846 (s390_usrregs_info_3264): Enable on 31-bit.
2847 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2848 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2849
ae91f625
MK
28502016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2851
2852 PR gdb/13808
2853 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2854 * configure.srv: Ditto.
2855 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2856 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2857 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2858 (init_registers_amd64_linux): Remove prototype.
2859 (tdesc_amd64_linux): Remove declaration.
2860 (get_ipa_tdesc): New function.
2861 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2862 initialize remaining tdescs.
2863 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2864 (init_registers_i386_linux): Remove prototype.
2865 (tdesc_i386_linux): Remove declaration.
2866 (get_ipa_tdesc): New function.
2867 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2868 initialize remaining tdescs.
2869 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2870 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2871 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2872 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2873 (x86_get_ipa_tdesc_idx): New function.
2874 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2875 * linux-x86-tdesc.h: New file.
2876 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2877 (target_get_ipa_tdesc_idx): New macro.
2878 * tracepoint.c (ipa_tdesc_idx): New macro.
2879 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2880 (symbol_list): Add ipa_tdesc_idx.
2881 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2882 (ipa_tdesc): Remove.
2883 (ipa_tdesc_idx): New variable.
2884 (get_context_regcache): Use get_ipa_tdesc.
2885 (gdb_collect): Ditto.
2886 (gdb_probe): Ditto.
2887 * tracepoint.h (get_ipa_tdesc): New prototype.
2888 (ipa_tdesc): Remove.
2889
e7ad2f14
PA
28902016-02-24 Pedro Alves <palves@redhat.com>
2891
2892 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2893 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2894 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2895 Factor out common code between the USE_SIGTRAP_SIGINFO and
2896 !USE_SIGTRAP_SIGINFO blocks.
2897 (linux_low_filter_event): Call save_stop_reason instead of
2898 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2899 Update comments.
2900 (linux_wait_1): Update comments.
2901
657f9cde
WW
29022016-02-24 Wei-cheng Wang <cole945@gmail.com>
2903
2904 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2905 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2906 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2907 ppc_insert_point, ppc_remove_point.
2908
b00b61e1
MK
29092016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2910
2911 * linux-s390-low.c (s390_supports_z_point_type): New function.
2912 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2913
553cb527
YQ
29142016-02-16 Yao Qi <yao.qi@linaro.org>
2915
2916 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2917 PC. Get pc from regcache_read_pc.
2918
a5652c21
YQ
29192016-02-12 Yao Qi <yao.qi@linaro.org>
2920
2921 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2922 or linux_get_pc_32bit.
2923 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2924
ed443b61
YQ
29252016-02-12 Yao Qi <yao.qi@linaro.org>
2926
2927 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2928 arm_linux_get_next_pcs_fixup.
2929
020ecd38
MK
29302016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2931
2932 * tracepoint.c (x_tracepoint_action_download): Change
2933 write_inferior_data_ptr to write_inferior_data_pointer.
2934 (cmd_qtstart): Likewise.
2935 (write_inferior_data_ptr): Remove.
2936 (download_agent_expr): Change write_inferior_data_ptr to
2937 write_inferior_data_pointer.
2938 (download_tracepoint_1): Likewise.
2939 (download_tracepoint): Likewise.
2940 (download_trace_state_variables): Likewise.
2941
7cae9051
WW
29422016-02-11 Wei-cheng Wang <cole945@gmail.com>
2943 Marcin Kościelnicki <koriakin@0x04.net>
2944
2945 * tracepoint.c (struct tracepoint_action_ops): Remove.
2946 (struct tracepoint_action): Remove ops.
2947 (m_tracepoint_action_download, r_tracepoint_action_download)
2948 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2949 size and offset accordingly.
2950 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2951 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2952 (tracepoint_action_send, tracepoint_action_download): New functions.
2953 Helpers for trace action handlers.
2954 (add_tracepoint_action): Remove setup actions ops.
2955 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2956
9f6a71b4
YQ
29572016-02-10 Yao Qi <yao.qi@linaro.org>
2958
2959 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2960
1e94266c
SM
29612016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2962
2963 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2964 to AC_OUTPUT.
2965 * configure: Regenerate.
2966
8adce034
SM
29672016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2968
2969 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2970 void * to gdb_byte *.
2971 * linux-low.c (siginfo_fixup): Likewise.
2972 (linux_xfer_siginfo): Likewise.
2973 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2974 Likewise.
2975 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2976
93813b37
WT
29772016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2978
2979 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2980 to srv_tgtobj.
2981 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2982 to srv_tgtobj.
2983 * linux-x86-low.c [__x86_64__]: Include
2984 "nat/amd64-linux-siginfo.h".
2985 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2986 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2987 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2988 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2989 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2990 (cpt_si_fd, si_timerid, si_overrun): Move from
2991 nat/amd64-linux-siginfo.c.
2992 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2993
8424cc97
SM
29942016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2995
2996 * server.c (skip_to_semicolon): Remove.
2997 (process_point_options): Use strchrnul instead of
2998 skip_to_semicolon.
2999
4d18591b
YQ
30002016-01-26 Yao Qi <yao.qi@linaro.org>
3001
3002 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3003 * linux-low.c (install_software_single_step_breakpoints): Don't
3004 call regcache_read_pc.
3005 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3006 argument pc.
3007
d8020970
YQ
30082016-01-26 Yao Qi <yao.qi@linaro.org>
3009
3010 * linux-low.c (install_software_single_step_breakpoints): Call
3011 regcache_read_pc instead of get_pc.
3012
8b207339
YQ
30132016-01-26 Yao Qi <yao.qi@linaro.org>
3014
3015 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3016 (unblock_async_io): Rename to ...
3017 (block_unblock_async_io): ... it. New function.
3018 (enable_async_io): Don't install SIGIO handler. Unblock it
3019 instead.
3020 (disable_async_io): Don't ignore SIGIO. Block it instead.
3021 (initialize_async_io): Install SIGIO handler. Don't call
3022 unblock_async_io.
3023
18879fef
YQ
30242016-01-26 Yao Qi <yao.qi@linaro.org>
3025
3026 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3027 first character is '\003', call *the_target->request_interrupt.
3028
a0f8e08a
YQ
30292016-01-25 Yao Qi <yao.qi@linaro.org>
3030
3031 * remote-utils.c (new_thread_notify): Remove.
3032 (dead_thread_notify): Likewise.
3033 * remote-utils.h (new_thread_notify): Remove declaration.
3034 (dead_thread_notify): Likewise.
3035
cc5fd9ab
MK
30362016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3037
3038 * gdb.trace/pending.exp: Fix expected message on continue.
3039
99e8eb11
MK
30402016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3041
3042 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3043 it works properly on big-endian machines where sizeof (CORE_ADDR)
3044 != sizeof (void *).
3045
a994041d
PA
30462016-01-21 Pedro Alves <palves@redhat.com>
3047
3048 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3049 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3050 * configure: Regenerate.
3051
f7a6a40d
YQ
30522016-01-21 Yao Qi <yao.qi@linaro.org>
3053
3054 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3055 is_thumb and set it according to CPSR saved on the stack.
3056 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3057 arm_sigreturn_next_pc.
3058
6f69e520
YQ
30592016-01-18 Yao Qi <yao.qi@linaro.org>
3060
3061 * linux-low.c (linux_set_pc_64bit): New function.
3062 (linux_get_pc_64bit): New function.
3063 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3064 Declare.
3065 * linux-sparc-low.c (debug_threads): Remove declaration.
3066 (sparc_get_pc): Remove.
3067 (the_low_target): Use linux_get_pc_64bit instead of
3068 sparc_get_pc.
3069 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3070 (the_low_target): Use linux_get_pc_64bit and
3071 linux_set_pc_64bit.
3072
276d4552
YQ
30732016-01-18 Yao Qi <yao.qi@linaro.org>
3074
3075 * linux-arm-low.c (debug_threads): Remove declaration.
3076 (arm_get_pc, arm_set_pc): Remove.
3077 (the_low_target): Use linux_get_pc_32bit and
3078 linux_set_pc_32bit.
3079 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3080 (the_low_target): Use linux_get_pc_32bit and
3081 linux_set_pc_32bit.
3082 * linux-cris-low.c (debug_threads): Remove declaration.
3083 (cris_get_pc, cris_set_pc,): Remove.
3084 (the_low_target): Use linux_get_pc_32bit and
3085 linux_set_pc_32bit.
3086 * linux-crisv32-low.c (debug_threads): Remove declaration.
3087 (cris_get_pc, cris_set_pc): Remove.
3088 (the_low_target): Use linux_get_pc_32bit and
3089 linux_set_pc_32bit.
3090 * linux-low.c: Include inttypes.h.
3091 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3092 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3093 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3094 (the_low_target): Use linux_get_pc_32bit and
3095 linux_set_pc_32bit.
3096 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3097 (the_low_target): Use linux_get_pc_32bit and
3098 linux_set_pc_32bit.
3099 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3100 (the_low_target): Use linux_get_pc_32bit and
3101 linux_set_pc_32bit.
3102 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3103 (the_low_target): Use linux_get_pc_32bit and
3104 linux_set_pc_32bit.
3105 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3106 (the_low_target): Use linux_get_pc_32bit and
3107 linux_set_pc_32bit.
3108
eb0edac8
GB
31092016-01-18 Gary Benson <gbenson@redhat.com>
3110
3111 * configure.ac (AC_FUNC_FORK): New check.
3112 * config.in: Regenerate.
3113 * configure: Likewise.
3114
1b451dda
YQ
31152016-01-14 Yao Qi <yao.qi@linaro.org>
3116
3117 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3118 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3119 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3120 arm_get_next_pcs_ctor.
3121
82075af2
JS
31222016-01-12 Josh Stone <jistone@redhat.com>
3123 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3124
3125 * inferiors.h: Include "gdb_vecs.h".
3126 (struct process_info): Add syscalls_to_catch.
3127 * inferiors.c (remove_process): Free syscalls_to_catch.
3128 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3129 syscall_return stops.
3130 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3131 * server.c (handle_general_set): Handle QCatchSyscalls.
3132 (handle_query): Report support for QCatchSyscalls.
3133 * target.h (struct target_ops): Add supports_catch_syscall.
3134 (target_supports_catch_syscall): New macro.
3135 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3136 (struct lwp_info): Add syscall_state.
3137 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3138 Maintain syscall_state and syscalls_to_catch across exec.
3139 (get_syscall_trapinfo): New function, proxy to the_low_target.
3140 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3141 (linux_low_filter_event): Toggle syscall_state entry/return for
3142 syscall traps, and set it ignored for all others.
3143 (gdb_catching_syscalls_p): New function.
3144 (gdb_catch_this_syscall_p): New function.
3145 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3146 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3147 (linux_supports_catch_syscall): New function.
3148 (linux_target_ops): Install it.
3149 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3150 (the_low_target): Install it.
3151
8f13a3ce
MF
31522016-01-12 Mike Frysinger <vapier@gentoo.org>
3153
3154 * acinclude.m4: Include new ../warning.m4 file.
3155 * configure: Regenerated.
3156 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3157
5b3da067
MF
31582016-01-12 Mike Frysinger <vapier@gentoo.org>
3159
3160 * ax.c (is_goto_target): Mark static.
3161 * linux-low.c (register_addr): Likewise.
3162 (linux_fetch_registers, linux_store_registers): Likewise.
3163 * mem-break.c (any_persistent_commands): Fix old prototype.
3164 (add_commands_to_breakpoint): Mark static.
3165 * regcache.c (find_register_by_name): Delete unused func.
3166 * remote-utils.c (hex_or_minus_one): Mark static.
3167 * server.c (monitor_show_help): Mark static.
3168 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3169 handle_v_requests): Likewise.
3170
bc504a31
PA
31712016-01-12 Pedro Alves <palves@redhat.com>
3172
3173 Remove use of the registered trademark symbol throughout.
3174
5a0dd67a
YQ
31752016-01-08 Yao Qi <yao.qi@linaro.org>
3176
3177 * remote-utils.c (getpkt): If c is '\003', call target hook
3178 request_interrupt.
3179
b2ca446f
YQ
31802016-01-06 Yao Qi <yao.qi@linaro.org>
3181
3182 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3183 linux-aarch32-low.c.
3184 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3185 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3186 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3187 (thumb2_breakpoint): Declare.
3188 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3189 linux-aarch32-low.h.
3190 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3191 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3192 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3193
edd88788
JB
31942016-01-01 Joel Brobecker <brobecker@adacore.com>
3195
3196 * gdbreplay.c (gdbreplay_version): Change copyright year in
3197 version message.
3198 * server.c (gdbserver_version): Likewise.
3199
65da7f14
PP
32002015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3201
3202 * server.c (crc32_table): Delete.
3203 (crc32): Use libiberty's xcrc32 function.
3204
4abd5ed2
JB
32052015-12-22 Joel Brobecker <brobecker@adacore.com>
3206
3207 * lynx-low.c (lynx_delete_thread_callback): New function.
3208 (lynx_mourn): Properly delete our process and all of its
3209 threads. Remove call to clear_inferiors.
3210
0e50fe5c
JB
32112015-12-22 Joel Brobecker <brobecker@adacore.com>
3212
3213 * target.c (thread_search_callback): Add check that
3214 the thread_stopped target callback is not NULL before
3215 calling it.
3216
35adc03f
YQ
32172015-12-21 Yao Qi <yao.qi@linaro.org>
3218
3219 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3220 arm breakpoint.
3221
bd2b2909
AT
32222015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3223
3224 * server.c (handle_query): Call target_supports_software_single_step.
3225
7fe5e27e
AT
32262015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3227
3228 * linux-low.c (single_step): New function.
3229 (linux_resume_one_lwp_throw): Call single_step.
3230 (start_step_over): Likewise.
3231
d9311bfa
AT
32322015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3233
3234 * Makefile.in (SFILES): Append arch/arm-linux.c,
3235 arch/arm-get-next-pcs.c.
3236 (arm-linux.o): New rule.
3237 (arm-get-next-pcs.o): New rule.
3238 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3239 arm-linux.o.
3240 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3241 to linux-aarch32-low.c.
3242 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3243 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3244 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3245 (thumb2_breakpoint_len): Likewise.
3246 (arm_is_thumb_mode): Make non-static.
3247 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3248 from linux-aarch32-low.c.
3249 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3250 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3251 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3252 (thumb2_breakpoint_len): Likewise.
3253 (arm_is_thumb_mode): New declaration.
3254 * linux-arm-low.c: Include arch/arm-linux.h
3255 aarch/arm-get-next-pcs.h, sys/syscall.h.
3256 (get_next_pcs_ops): New struct.
3257 (get_next_pcs_addr_bits_remove): New function.
3258 (get_next_pcs_is_thumb): New function.
3259 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3260 (arm_sigreturn_next_pc): Likewise.
3261 (get_next_pcs_syscall_next_pc): Likewise.
3262 (arm_gdbserver_get_next_pcs): Likewise.
3263 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3264 Initialize.
3265 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3266 * server.h: Include gdb_vecs.h.
3267
68ce2059
AT
32682015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3269
3270 * Makefile.in (SFILES): Append common/common-regcache.c.
3271 (OBS): Append common-regcache.o.
3272 (common-regcache.o): New rule.
3273 * regcache.c (init_register_cache): Initialize cache to
3274 REG_UNAVAILABLE.
3275 (regcache_raw_read_unsigned): New function.
3276 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3277 register_status enum.
3278
fa5308bd
AT
32792015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3280
3281 * linux-aarch64-low.c (the_low_targets): Rename
3282 breakpoint_reinsert_addr to get_next_pcs.
3283 * linux-arm-low.c (the_low_targets): Likewise.
3284 * linux-bfin-low.c (the_low_targets): Likewise.
3285 * linux-cris-low.c (the_low_targets): Likewise.
3286 * linux-crisv32-low.c (the_low_targets): Likewise.
3287 * linux-low.c (can_software_single_step): Likewise.
3288 (install_software_single_step_breakpoints): New function.
3289 (start_step_over): Use install_software_single_step_breakpoints.
3290 * linux-low.h: New CORE_ADDR vector.
3291 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3292 get_next_pcs.
3293 * linux-mips-low.c (the_low_targets): Likewise.
3294 * linux-nios2-low.c (the_low_targets): Likewise.
3295 * linux-sparc-low.c (the_low_targets): Likewise.
3296
4a6ed09b
PA
32972015-12-17 Pedro Alves <palves@redhat.com>
3298
3299 * linux-low.c (linux_kill_one_lwp): Remove references to
3300 LinuxThreads.
3301 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3302 to 'kill'.
3303 (linux_init_signals): Delete.
3304 (initialize_low): Adjust.
3305 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3306
7544db95
PA
33072015-12-16 Pedro Alves <palves@redhat.com>
3308
3309 * configure.ac (compiler warning flags): When testing a
3310 -Wno-foo option, check whether -Wfoo works instead.
3311 * configure: Regenerate.
3312
8020350c
DB
33132015-12-11 Don Breazeal <donb@codesourcery.com>
3314
3315 * server.c (process_serial_event): Don't exit from gdbserver
3316 in remote mode if there are still active inferiors.
3317
db91f502
YQ
33182015-12-11 Yao Qi <yao.qi@linaro.org>
3319
3320 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3321 arm_breakpoint_at if the process is 32-bit.
3322
b37a6290
YQ
33232015-12-11 Yao Qi <yao.qi@linaro.org>
3324
3325 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3326 arm breakpoint.
3327
17b1509a
YQ
33282015-12-07 Yao Qi <yao.qi@linaro.org>
3329
3330 * configure.srv: Append arm.o to srv_tgtobj for
3331 aarch64*-*-linux* target.
3332 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3333 from linux-arm-low.c.
3334 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3335 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3336 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3337 (thumb2_breakpoint_len): Likewise.
3338 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3339 (arm_breakpoint_kinds): Likewise.
3340 (arm_breakpoint_kind_from_pc): Likewise.
3341 (arm_sw_breakpoint_from_kind): Likewise.
3342 (arm_breakpoint_kind_from_current_state): Likewise.
3343 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3344 (arm_sw_breakpoint_from_kind): Declare.
3345 (arm_breakpoint_kind_from_current_state): Declare.
3346 (arm_breakpoint_at): Declare.
3347 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3348 arm_sw_breakpoint_from_kind if process is 32-bit.
3349 (aarch64_breakpoint_kind_from_pc): New function.
3350 (aarch64_breakpoint_kind_from_current_state): New function.
3351 (the_low_target): Initialize fields breakpoint_kind_from_pc
3352 and breakpoint_kind_from_current_state.
3353 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3354 linux-aarch32-low.c.
3355 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3356 (arm_breakpoint, arm_breakpoint_len): Likewise.
3357 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3358 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3359 (arm_is_thumb_mode): Likewise.
3360 (arm_breakpoint_at): Likewise.
3361 (arm_breakpoint_kind_from_pc): Likewise.
3362 (arm_sw_breakpoint_from_kind): Likewise.
3363 (arm_breakpoint_kind_from_current_state): Likewise.
3364
3365 Revert:
3366 2015-08-04 Yao Qi <yao.qi@linaro.org>
3367
3368 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3369 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3370 * server.c (extended_protocol): Remove "static".
3371 * server.h (extended_protocol): Declare it.
3372
ece66d65
JS
33732015-12-04 Josh Stone <jistone@redhat.com>
3374
3375 * target.h (struct target_ops) <arch_setup>: Rename to ...
3376 (struct target_ops) <post_create_inferior>: ... this.
3377 (target_arch_setup): Rename to ...
3378 (target_post_create_inferior): ... this, calling post_create_inferior.
3379 * server.c (start_inferior): Update target_arch_setup calls to
3380 target_post_create_inferior.
3381 * linux-low.c (linux_low_ptrace_options): Forward declare.
3382 (linux_arch_setup): Update its comment for general use.
3383 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3384 (struct linux_target_ops): Use linux_post_create_inferior.
3385 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3386 to post_create_inferior.
3387 * nto-low.c (struct nto_target_ops): Likewise.
3388 * spu-low.c (struct spu_target_ops): Likewise.
3389 * win32-low.c (struct win32_target_ops): Likewise.
3390
e58c48b4
AT
33912015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3392
3393 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3394
fbec8956
AT
33952015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3396
3397 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3398 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3399 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3400 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3401 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3402 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3403 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3404 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3405 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3406 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3407 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3408 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3409
9b4c5f87
AT
34102015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3411
3412 * linux-low.c (linux_look_up_symbols): Don't call
3413 linux_supports_traceclone.
3414 * linux-low.h (thread_db_init): Remove use_events argument.
3415 * thread-db.c (thread_db_use_event): Remove global variable.
3416 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3417 (struct thread_db) <td_create_bp>: Remove field.
3418 (thread_db_create_event): Remove function.
3419 (thread_db_enable_reporting): Likewise.
3420 (find_one_thread): Don't check for thread_db_use_events.
3421 (attach_thread): Likewise.
3422 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3423 (try_thread_db_load_1): Don't check for thread_db_use_events.
3424 (thread_db_init): Remove use_events argument and thread events
3425 handling.
3426 (remove_thread_event_breakpoints): Remove function.
3427 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3428
7d00775e
AT
34292015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3430
3431 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3432 New function.
3433 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3434 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3435 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3436 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3437 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3438 Initialize.
3439 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3440 New function.
3441 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3442 * linux-low.c (can_hardware_single_step): Use
3443 supports_hardware_single_step.
3444 (can_software_single_step): New function.
3445 (start_step_over): Call can_software_single_step.
3446 (linux_supports_hardware_single_step): New function.
3447 (struct target_ops) <supports_software_single_step>: Initialize.
3448 * linux-low.h (struct linux_target_ops)
3449 <supports_hardware_single_step>: Initialize.
3450 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3451 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3452 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3453 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3454 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3455 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3456 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3457 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3458 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3459 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3460 Initialize.
3461 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3462 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3463 Initialize.
3464 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3465 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3466 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3467 New function.
3468 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3469 * target.h (struct target_ops): <supports_software_single_step>:
3470 New field.
3471 (target_supports_software_single_step): New macro.
3472
2d97cd35
AT
34732015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3474
3475 * linux-low.c (linux_wait_1): Fix pc advance condition.
3476 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3477 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3478
769ef81f
AT
34792015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3480
3481 * linux-arm-low.c (arm_is_thumb_mode): New function.
3482 (arm_breakpoint_at): Use arm_is_thumb_mode.
3483 (arm_breakpoint_kind_from_current_state): New function.
3484 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3485 Initialize.
3486 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3487 (linux_breakpoint_kind_from_current_state): New function.
3488 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3489 * linux-low.h (struct linux_target_ops)
3490 <breakpoint_kind_from_current_state>: New field.
3491 * target.h (struct target_ops): Likewise.
3492 (target_breakpoint_kind_from_current_state): New macro.
3493
1bebeeca
PA
34942015-11-30 Pedro Alves <palves@redhat.com>
3495
3496 * linux-low.c (linux_resume): Wake up the event loop before
3497 returning.
3498
a67a9fae
PA
34992015-11-30 Pedro Alves <palves@redhat.com>
3500
3501 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3502 check.
3503 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3504 to -1.
3505 * target.c (struct thread_search): New structure.
3506 (thread_search_callback): New function.
3507 (prev_general_thread): New global.
3508 (prepare_to_access_memory, done_accessing_memory): New functions.
3509 * target.h (prepare_to_access_memory, done_accessing_memory):
3510 Replace macros with function declarations.
3511
f2faf941
PA
35122015-11-30 Pedro Alves <palves@redhat.com>
3513
3514 PR 14618
3515 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3516 report TARGET_WAITKIND_NO_RESUMED.
3517 * remote-utils.c (prepare_resume_reply): Handle
3518 TARGET_WAITKIND_NO_RESUMED.
3519 * server.c (report_no_resumed): New global.
3520 (handle_query) <qSupported>: Handle "no-resumed+". Report
3521 "no-resumed+" support.
3522 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3523 return error if the client doesn't support no-resumed events.
3524 (push_stop_notification): New function.
3525 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3526 events if the client supports them.
3527
a681f9c9
PA
35282015-11-30 Pedro Alves <palves@redhat.com>
3529
3530 * linux-low.c (thread_still_has_status_pending_p): Don't check
3531 vCont;t here.
3532 (lwp_resumed): New function.
3533 (status_pending_p_callback): Return early if the LWP is not
3534 supposed to be resumed.
3535
65706a29
PA
35362015-11-30 Pedro Alves <palves@redhat.com>
3537
3538 * linux-low.c (handle_extended_wait): Assert that the LWP's
3539 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3540 thread create events, leave the new child's status pending.
3541 (linux_low_filter_event): If GDB wants to hear about thread exit
3542 events, leave the LWP marked dead and don't delete it.
3543 (linux_wait_for_event_filtered): Don't check for thread exit.
3544 (filter_exit_event): New function.
3545 (linux_wait_1): Use it, when returning an exit event.
3546 (linux_resume_one_lwp_throw): Assert that the LWP's
3547 waitstatus is TARGET_WAITKIND_IGNORE.
3548 * remote-utils.c (prepare_resume_reply): Handle
3549 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3550 * server.c (report_thread_events): New global.
3551 (handle_general_set): Handle QThreadEvents.
3552 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3553 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3554 TARGET_WAITKIND_THREAD_EXITED.
3555 * server.h (report_thread_events): Declare.
3556
56cf4bed
PA
35572015-11-30 Pedro Alves <palves@redhat.com>
3558
3559 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3560 the thread's last_resume_kind was resume_stop.
3561
500c1d85
PA
35622015-11-30 Pedro Alves <palves@redhat.com>
3563
3564 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3565 before returning.
3566
de979965
PA
35672015-11-30 Pedro Alves <palves@redhat.com>
3568
3569 * server.c (handle_v_requests): Handle vCtrlC.
3570
34c65914
PA
35712015-11-30 Pedro Alves <palves@redhat.com>
3572
3573 * gdbthread.h (find_any_thread_of_pid): Declare.
3574 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3575 functions.
3576 * server.c (handle_query): If current_thread is NULL, look for
3577 another thread of the selected process.
3578
79efa585 35792015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3580 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3581
3582 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3583 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3584 name in reply.
3585 * target.h (struct target_ops) <thread_name>: New field.
3586 (target_thread_name): New macro.
3587
80d82c19
JB
35882015-11-23 Joel Brobecker <brobecker@adacore.com>
3589
3590 * regcache.h (regcache_invalidate_pid): Add declaration.
3591 * regcache.c (regcache_invalidate_pid): New function, extracted
3592 from regcache_invalidate.
3593 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3594 Add trivial documentation comment.
3595 * lynx-low.c: Use regcache_invalidate_pid instead of
3596 regcache_invalidate.
3597
64da5dd5
JB
35982015-11-23 Joel Brobecker <brobecker@adacore.com>
3599
3600 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3601 and Elf64_auxv_t if the target is Android.
3602
37ce4055
DE
36032015-11-22 Doug Evans <xdje42@gmail.com>
3604
3605 * target.h: #include <sys/types.h>.
3606
06e03fff
PA
36072015-11-19 Pedro Alves <palves@redhat.com>
3608
3609 * linux-low.c (linux_process_qsupported): Change prototype.
3610 Adjust.
3611 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3612 Change prototype.
3613 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3614 and adjust to loop over all features.
3615 * server.c (handle_query) <qSupported>: Adjust to call
3616 target_process_qsupported once, passing it a vector of unprocessed
3617 features.
3618 * target.h (struct target_ops) <process_qsupported>: Change
3619 prototype.
3620 (target_process_qsupported): Adjust.
3621
9a084706
PA
36222015-11-19 Pedro Alves <palves@redhat.com>
3623
3624 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3625 mode.
3626 * configure: Regenerate.
3627
dad44a1f
PA
36282015-11-19 Pedro Alves <palves@redhat.com>
3629
3630 * configure: Regenerate.
3631
231c0592
YQ
36322015-11-19 Yao Qi <yao.qi@linaro.org>
3633
3634 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3635 type to uint32_t.
3636
6c1c9a8b
YQ
36372015-11-19 Yao Qi <yao.qi@linaro.org>
3638
3639 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3640 (struct aarch64_operand): Move enum out.
3641
9caa3311
YQ
36422015-11-19 Yao Qi <yao.qi@linaro.org>
3643
3644 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3645 struct user_fpsimd_state *.
3646 (aarch64_store_fpregset): Likewise.
3647
6a69a054
YQ
36482015-11-19 Yao Qi <yao.qi@linaro.org>
3649
3650 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3651 struct user_pt_regs *.
3652 (aarch64_store_gregset): Likewise.
3653
1798301e
PA
36542015-11-18 Pedro Alves <palves@redhat.com>
3655
3656 * Makefile.in (all_object_files): Add $IPA_OBJS.
3657
ce7715e2
PA
36582015-11-17 Pedro Alves <palves@redhat.com>
3659
3660 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3661 GDB_SIGNAL_0 and gdb_signal_to_string.
3662
c0879059
PA
36632015-11-17 Pedro Alves <palves@redhat.com>
3664
3665 * win32-low.c (handle_output_debug_string): Remove parameter.
3666 (win32_kill): Remove our_status local and adjust call to
3667 handle_output_debug_string.
3668 (get_child_debug_event): Adjust call to
3669 handle_output_debug_string.
3670
1996e237
SM
36712015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3672
3673 * linux-mips-low.c (mips_fill_gregset): Add cast.
3674 (mips_store_gregset): Likewise.
3675 (mips_fill_fpregset): Likewise.
3676 (mips_store_fpregset): Likewise.
3677
cbec665b
SM
36782015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3679
3680 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3681 priv.
3682
eb3e3c67
SM
36832015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3684
3685 * linux-mips-low.c (mips_linux_new_thread): Change type of
3686 watch_type to enum target_hw_bp_type.
3687
171de4b8
SM
36882015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3689
3690 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3691 Change return type to arm_hwbp_type.
3692
04248ead
SM
36932015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3694
3695 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3696 (arm_store_gregset): Likewise.
3697 * linux-arm-low.c (arm_get_hwcap): Likewise.
3698 (arm_read_description): Likewise.
3699
04b3479c
SM
37002015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3701
3702 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3703
2bc84e8a
SM
37042015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3705
3706 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3707 (ppc_fill_vsxregset): Likewise.
3708 (ppc_store_vsxregset): Likewise.
3709 (ppc_fill_vrregset): Likewise.
3710 (ppc_store_vrregset): Likewise.
3711 (ppc_fill_evrregset): Likewise.
3712 (ppc_store_evrregset): Likewise.
3713
e6c5bb05
SM
37142015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3715
3716 * linux-ppc-low.c (ppc_usrregs_info): Remove
3717 forward-declaration.
3718 (ppc_arch_setup): Move lower in file.
3719
7ea45d72
SM
37202015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3721
3722 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3723 (ps_pdwrite): Likewise.
3724
69291610
HW
37252015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3726
3727 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3728 to after assert checks.
3729
b42945fd
SM
37302015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3731
3732 * proc-service.c (ps_pdread): Add/adjust casts.
3733 (ps_pdwrite): Add/adjust casts.
3734
d6f85c84
SM
37352015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3736
3737 * server.c (handle_search_memory_1): Cast return value of
3738 memmem.
3739
f98cd059
SM
37402015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3741
3742 * server.c (write_qxfer_response): Change type of data to
3743 gdb_byte *.
3744
d2412fa5
PA
37452015-10-29 Pedro Alves <palves@redhat.com>
3746
3747 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3748
c17414a2
PA
37492015-10-29 Pedro Alves <palves@redhat.com>
3750
3751 * tracepoint.c (clear_installed_tracepoints): Add casts.
3752
e053fbc4
PA
37532015-10-29 Pedro Alves <palves@redhat.com>
3754
3755 * server.c (handle_v_cont, process_serial_event): Add enum
3756 gdb_signal casts to signal parsing code.
3757
add67df8
PA
37582015-10-29 Pedro Alves <palves@redhat.com>
3759
3760 * linux-low.h (NULL_REGSET): Define.
3761 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3762 * linux-arm-low.c (arm_regsets): Likewise.
3763 * linux-crisv32-low.c (cris_regsets): Likewise.
3764 * linux-m68k-low.c (m68k_regsets): Likewise.
3765 * linux-mips-low.c (mips_regsets): Likewise.
3766 * linux-nios2-low.c (nios2_regsets): Likewise.
3767 * linux-ppc-low.c (ppc_regsets): Likewise.
3768 * linux-s390-low.c (s390_regsets): Likewise.
3769 * linux-sh-low.c (sh_regsets): Likewise.
3770 * linux-sparc-low.c (sparc_regsets): Likewise.
3771 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3772 * linux-tile-low.c (tile_regsets): Likewise.
3773 * linux-x86-low.c (x86_regsets): Likewise.
3774 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3775
50bc912a
PA
37762015-10-29 Pedro Alves <palves@redhat.com>
3777
3778 * linux-low.h (NULL_REGSET): Define.
3779 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3780 * linux-arm-low.c (arm_regsets): Likewise.
3781 * linux-crisv32-low.c (cris_regsets): Likewise.
3782 * linux-m68k-low.c (m68k_regsets): Likewise.
3783 * linux-mips-low.c (mips_regsets): Likewise.
3784 * linux-nios2-low.c (nios2_regsets): Likewise.
3785 * linux-ppc-low.c (ppc_regsets): Likewise.
3786 * linux-s390-low.c (s390_regsets): Likewise.
3787 * linux-sh-low.c (sh_regsets): Likewise.
3788 * linux-sparc-low.c (sparc_regsets): Likewise.
3789 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3790 * linux-tile-low.c (tile_regsets): Likewise.
3791 * linux-x86-low.c (x86_regsets): Likewise.
3792 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3793
682b2546
DE
37942015-10-26 Doug Evans <dje@google.com>
3795
3796 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3797
963843d4
DE
37982015-10-26 Doug Evans <dje@google.com>
3799
3800 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3801
d41401ac
DE
38022015-10-26 Doug Evans <dje@google.com>
3803
3804 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3805 for debug_printf.
3806 (attach_thread, find_new_threads_callback): Ditto.
3807
3db28855
AT
38082015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3809
3810 * mem-break.h (set_breakpoint_data): Remove.
3811
fb78e89c
AT
38122015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3813
3814 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3815 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3816 (initialize_low): Remove set_breakpoint_data call.
3817 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3818 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3819 (initialize_low): Remove set_breakpoint_data call.
3820 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3821 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3822 (initialize_low): Remove set_breakpoint_data call.
3823
2e6ee069
AT
38242015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3825
3826 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3827 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3828 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3829 * target.h (target_breakpoint_kind_from_pc): New macro.
3830
1652a986
AT
38312015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3832
3833 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3834 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3835 the default breakpoint kind.
3836
abeead09
AT
38372015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3838
3839 * linux-arm-low.c (arm_supports_z_point_type): Add software
3840 breakpoint support.
3841
b0b4b501
AT
38422015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3843
3844 * linux-arm-low.c: Refactor breakpoint definitions.
3845 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3846 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3847
8689682c
AT
38482015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3849
3850 * Makefile.in: Add arm.c/o.
3851 * configure.srv: Likewise.
3852 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3853 (arm_breakpoint_kind_from_pc): New function.
3854 (arm_sw_breakpoint_from_kind): Return proper kind.
3855 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3856
27165294
AT
38572015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3858
3859 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3860 removal.
3861 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3862 (struct raw_breakpoint) <size>: Remove.
3863 (struct raw_breakpoint) <kind>: Add.
3864 (bp_size): New function.
3865 (bp_opcode): Likewise.
3866 (find_raw_breakpoint_at): Adjust for kind.
3867 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3868 (remove_memory_breakpoint): Adjust for kind call bp_size.
3869 (set_raw_breakpoint_at): Adjust for kind.
3870 (set_breakpoint): Likewise.
3871 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3872 (delete_raw_breakpoint): Adjust for kind.
3873 (delete_breakpoint): Likewise.
3874 (find_gdb_breakpoint): Likewise.
3875 (set_gdb_breakpoint_1): Likewise.
3876 (set_gdb_breakpoint): Likewise.
3877 (delete_gdb_breakpoint_1): Likewise.
3878 (delete_gdb_breakpoint): Likewise.
3879 (uninsert_raw_breakpoint): Likewise.
3880 (reinsert_raw_breakpoint): Likewise.
3881 (set_breakpoint_data): Remove.
3882 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3883 (check_mem_read): Adjust for kind call bp_size.
3884 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3885 (clone_one_breakpoint): Adjust for kind.
3886 * mem-break.h (set_gdb_breakpoint): Likewise.
3887 (delete_gdb_breakpoint): Likewise.
3888 * server.c (process_serial_event): Likewise.
3889
dd373349
AT
38902015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3891
3892 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3893 (struct linux_target_ops) <breakpoint>: Remove.
3894 (struct linux_target_ops) <breakpoint_len>: Remove.
3895 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3896 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3897 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3898 (arm_sw_breakpoint_from_kind): New function.
3899 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3900 (struct linux_target_ops) <breakpoint>: Remove.
3901 (struct linux_target_ops) <breakpoint_len>: Remove.
3902 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3903 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3904 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3905 (struct linux_target_ops) <breakpoint>: Remove.
3906 (struct linux_target_ops) <breakpoint_len>: Remove.
3907 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3908 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3909 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3910 (struct linux_target_ops) <breakpoint>: Remove.
3911 (struct linux_target_ops) <breakpoint_len>: Remove.
3912 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3913 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3914 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3915 and sw_breakpoint_from_kind to increment the pc.
3916 (linux_breakpoint_kind_from_pc): New function.
3917 (linux_sw_breakpoint_from_kind): New function.
3918 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3919 (initialize_low): Call breakpoint_kind_from_pc and
3920 sw_breakpoint_from_kind to replace breakpoint_data/len.
3921 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3922 New field.
3923 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3924 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3925 (struct linux_target_ops) <breakpoint>: Remove.
3926 (struct linux_target_ops) <breakpoint_len>: Remove.
3927 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3928 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3929 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3930 (struct linux_target_ops) <breakpoint>: Remove.
3931 (struct linux_target_ops) <breakpoint_len>: Remove.
3932 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3933 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3934 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3935 (struct linux_target_ops) <breakpoint>: Remove.
3936 (struct linux_target_ops) <breakpoint_len>: Remove.
3937 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3938 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3939 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3940 (struct linux_target_ops) <breakpoint>: Remove.
3941 (struct linux_target_ops) <breakpoint_len>: Remove.
3942 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3943 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3944 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3945 (struct linux_target_ops) <breakpoint>: Remove.
3946 (struct linux_target_ops) <breakpoint_len>: Remove.
3947 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3948 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3949 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3950 (struct linux_target_ops) <breakpoint>: Remove.
3951 (struct linux_target_ops) <breakpoint_len>: Remove.
3952 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3953 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3954 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3955 (struct linux_target_ops) <breakpoint>: Remove.
3956 (struct linux_target_ops) <breakpoint_len>: Remove.
3957 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3958 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3959 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3960 (struct linux_target_ops) <breakpoint>: Remove.
3961 (struct linux_target_ops) <breakpoint_len>: Remove.
3962 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3963 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3964 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3965 (struct linux_target_ops) <breakpoint>: Remove.
3966 (struct linux_target_ops) <breakpoint_len>: Remove.
3967 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3968 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3969 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3970 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3971 (struct linux_target_ops) <breakpoint>: Remove.
3972 (struct linux_target_ops) <breakpoint_len>: Remove.
3973 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3974 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3975 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3976 (struct linux_target_ops) <breakpoint>: Remove.
3977 (struct linux_target_ops) <breakpoint_len>: Remove.
3978 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3979 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3980
4cd98a19
AT
39812015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3982
3983 * linux-cris-low.c (cris_get_pc): Remove void arg.
3984
774ee6d2
AR
39852015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3986
3987 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3988 variable name.
3989
833dcd29
AR
39902015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3991
3992 * inferiors.c (thread_pid_matches_callback): New function.
3993 (find_thread_process): New function.
3994 (remove_thread): Reset current_thread.
3995 (remove_process): Assert threads have been removed first.
3996
8d689ee5
YQ
39972015-10-15 Yao Qi <yao.qi@linaro.org>
3998
3999 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4000 if it is 3.
4001 (aarch64_remove_point): Likewise.
4002 * regcache.c (regcache_register_size): New function.
4003
1c2e1515
YQ
40042015-10-12 Yao Qi <yao.qi@linaro.org>
4005
4006 * linux-aarch64-low.c: Update all callers as emit_load_store
4007 is renamed to aarch64_emit_load_store.
4008
e1c587c3
YQ
40092015-10-12 Yao Qi <yao.qi@linaro.org>
4010
4011 * linux-aarch64-low.c: Update all callers of function renaming
4012 from emit_insn to aarch64_emit_insn.
4013
b6542f81
YQ
40142015-10-12 Yao Qi <yao.qi@linaro.org>
4015
4016 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4017 arch/aarch64-insn.h.
4018 (struct aarch64_memory_operand): Likewise.
4019 (ENCODE): Likewise.
4020 (emit_insn): Move to arch/aarch64-insn.c.
4021 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4022 (emit_load_store): Move to arch/aarch64-insn.c.
4023 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4024 (can_encode_int32): Remove.
4025
246994ce
YQ
40262015-10-12 Yao Qi <yao.qi@linaro.org>
4027
4028 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4029 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4030 (aarch64_relocate_instruction): Likewise.
4031 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4032 (struct aarch64_insn_visitor): Likewise.
4033
0badd99f
YQ
40342015-10-12 Yao Qi <yao.qi@linaro.org>
4035
4036 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4037 (struct aarch64_insn_visitor): New.
4038 (struct aarch64_insn_relocation_data): New.
4039 (aarch64_ftrace_insn_reloc_b): New function.
4040 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4041 (aarch64_ftrace_insn_reloc_cb): Likewise.
4042 (aarch64_ftrace_insn_reloc_tb): Likewise.
4043 (aarch64_ftrace_insn_reloc_adr): Likewise.
4044 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4045 (aarch64_ftrace_insn_reloc_others): Likewise.
4046 (visitor): New.
4047 (aarch64_relocate_instruction): Use visitor.
4048
dfaffe9d
YQ
40492015-10-12 Yao Qi <yao.qi@linaro.org>
4050
4051 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4052 int. Add argument buf.
4053 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4054 aarch64_relocate_instruction.
4055
70b439f0
YQ
40562015-10-12 Yao Qi <yao.qi@linaro.org>
4057
4058 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4059 argument insn. Remove local variable insn. Don't call
4060 target_read_uint32.
4061 (aarch64_install_fast_tracepoint_jump_pad): Call
4062 target_read_uint32.
4063
7781c06f
YQ
40642015-09-30 Yao Qi <yao.qi@linaro.org>
4065
4066 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4067 (emit_load_store_pair): Likewise.
4068
9a3c8263
SM
40692015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4070
4071 * dll.c (match_dll): Add cast(s).
4072 (unloaded_dll): Likewise.
4073 * linux-low.c (second_thread_of_pid_p): Likewise.
4074 (delete_lwp_callback): Likewise.
4075 (count_events_callback): Likewise.
4076 (select_event_lwp_callback): Likewise.
4077 (linux_set_resume_request): Likewise.
4078 * server.c (accumulate_file_name_length): Likewise.
4079 (emit_dll_description): Likewise.
4080 (handle_qxfer_threads_worker): Likewise.
4081 (visit_actioned_threads): Likewise.
4082 * thread-db.c (any_thread_of): Likewise.
4083 * tracepoint.c (same_process_p): Likewise.
4084 (match_blocktype): Likewise.
4085 (build_traceframe_info_xml): Likewise.
4086
224c3ddb
SM
40872015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4088
4089 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4090 assignment.
4091 (gdb_unparse_agent_expr): Likewise.
4092 * hostio.c (require_data): Likewise.
4093 (handle_pread): Likewise.
4094 * linux-low.c (disable_regset): Likewise.
4095 (fetch_register): Likewise.
4096 (store_register): Likewise.
4097 (get_dynamic): Likewise.
4098 (linux_qxfer_libraries_svr4): Likewise.
4099 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4100 (set_fast_tracepoint_jump): Likewise.
4101 (uninsert_fast_tracepoint_jumps_at): Likewise.
4102 (reinsert_fast_tracepoint_jumps_at): Likewise.
4103 (validate_inserted_breakpoint): Likewise.
4104 (clone_agent_expr): Likewise.
4105 * regcache.c (init_register_cache): Likewise.
4106 * remote-utils.c (putpkt_binary_1): Likewise.
4107 (decode_M_packet): Likewise.
4108 (decode_X_packet): Likewise.
4109 (look_up_one_symbol): Likewise.
4110 (relocate_instruction): Likewise.
4111 (monitor_output): Likewise.
4112 * server.c (handle_search_memory): Likewise.
4113 (handle_qxfer_exec_file): Likewise.
4114 (handle_qxfer_libraries): Likewise.
4115 (handle_qxfer): Likewise.
4116 (handle_query): Likewise.
4117 (handle_v_cont): Likewise.
4118 (handle_v_run): Likewise.
4119 (captured_main): Likewise.
4120 * target.c (write_inferior_memory): Likewise.
4121 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4122 * tracepoint.c (init_trace_buffer): Likewise.
4123 (add_tracepoint_action): Likewise.
4124 (add_traceframe): Likewise.
4125 (add_traceframe_block): Likewise.
4126 (cmd_qtdpsrc): Likewise.
4127 (cmd_qtdv): Likewise.
4128 (cmd_qtstatus): Likewise.
4129 (response_source): Likewise.
4130 (response_tsv): Likewise.
4131 (cmd_qtnotes): Likewise.
4132 (gdb_collect): Likewise.
4133 (initialize_tracepoint): Likewise.
4134
afbe19f8
PL
41352015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4136
4137 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4138 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4139 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4140 <NOP>: New.
4141 (enum aarch64_condition_codes): New enum.
4142 (w0): New static global.
4143 (fp): Likewise.
4144 (lr): Likewise.
4145 (struct aarch64_memory_operand) <type>: New
4146 MEMORY_OPERAND_POSTINDEX type.
4147 (postindex_memory_operand): New helper function.
4148 (emit_ret): New function.
4149 (emit_load_store_pair): New function, factored out of emit_stp
4150 with support for MEMORY_OPERAND_POSTINDEX.
4151 (emit_stp): Rewrite using emit_load_store_pair.
4152 (emit_ldp): New function.
4153 (emit_load_store): Likewise.
4154 (emit_ldr): Mention post-index instruction in comment.
4155 (emit_ldrh): New function.
4156 (emit_ldrb): New function.
4157 (emit_ldrsw): Mention post-index instruction in comment.
4158 (emit_str): Likewise.
4159 (emit_subs): New function.
4160 (emit_cmp): Likewise.
4161 (emit_and): Likewise.
4162 (emit_orr): Likewise.
4163 (emit_orn): Likewise.
4164 (emit_eor): Likewise.
4165 (emit_mvn): Likewise.
4166 (emit_lslv): Likewise.
4167 (emit_lsrv): Likewise.
4168 (emit_asrv): Likewise.
4169 (emit_mul): Likewise.
4170 (emit_sbfm): Likewise.
4171 (emit_sbfx): Likewise.
4172 (emit_ubfm): Likewise.
4173 (emit_ubfx): Likewise.
4174 (emit_csinc): Likewise.
4175 (emit_cset): Likewise.
4176 (emit_nop): Likewise.
4177 (emit_ops_insns): New helper function.
4178 (emit_pop): Likewise.
4179 (emit_push): Likewise.
4180 (aarch64_emit_prologue): New function.
4181 (aarch64_emit_epilogue): Likewise.
4182 (aarch64_emit_add): Likewise.
4183 (aarch64_emit_sub): Likewise.
4184 (aarch64_emit_mul): Likewise.
4185 (aarch64_emit_lsh): Likewise.
4186 (aarch64_emit_rsh_signed): Likewise.
4187 (aarch64_emit_rsh_unsigned): Likewise.
4188 (aarch64_emit_ext): Likewise.
4189 (aarch64_emit_log_not): Likewise.
4190 (aarch64_emit_bit_and): Likewise.
4191 (aarch64_emit_bit_or): Likewise.
4192 (aarch64_emit_bit_xor): Likewise.
4193 (aarch64_emit_bit_not): Likewise.
4194 (aarch64_emit_equal): Likewise.
4195 (aarch64_emit_less_signed): Likewise.
4196 (aarch64_emit_less_unsigned): Likewise.
4197 (aarch64_emit_ref): Likewise.
4198 (aarch64_emit_if_goto): Likewise.
4199 (aarch64_emit_goto): Likewise.
4200 (aarch64_write_goto_address): Likewise.
4201 (aarch64_emit_const): Likewise.
4202 (aarch64_emit_call): Likewise.
4203 (aarch64_emit_reg): Likewise.
4204 (aarch64_emit_pop): Likewise.
4205 (aarch64_emit_stack_flush): Likewise.
4206 (aarch64_emit_zero_ext): Likewise.
4207 (aarch64_emit_swap): Likewise.
4208 (aarch64_emit_stack_adjust): Likewise.
4209 (aarch64_emit_int_call_1): Likewise.
4210 (aarch64_emit_void_call_2): Likewise.
4211 (aarch64_emit_eq_goto): Likewise.
4212 (aarch64_emit_ne_goto): Likewise.
4213 (aarch64_emit_lt_goto): Likewise.
4214 (aarch64_emit_le_goto): Likewise.
4215 (aarch64_emit_gt_goto): Likewise.
4216 (aarch64_emit_ge_got): Likewise.
4217 (aarch64_emit_ops_impl): New static global variable.
4218 (aarch64_emit_ops): New target function, return
4219 &aarch64_emit_ops_impl.
4220 (struct linux_target_ops): Install it.
4221
bb903df0
PL
42222015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4223
4224 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4225 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4226 aarch64-ipa.o.
4227 * linux-aarch64-ipa.c: New file.
4228 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4229 and endian.h.
4230 (aarch64_get_thread_area): New target method.
4231 (extract_signed_bitfield): New helper function.
4232 (aarch64_decode_ldr_literal): New function.
4233 (enum aarch64_opcodes): New enum.
4234 (struct aarch64_register): New struct.
4235 (struct aarch64_operand): New struct.
4236 (x0): New static global.
4237 (x1): Likewise.
4238 (x2): Likewise.
4239 (x3): Likewise.
4240 (x4): Likewise.
4241 (w2): Likewise.
4242 (ip0): Likewise.
4243 (sp): Likewise.
4244 (xzr): Likewise.
4245 (aarch64_register): New helper function.
4246 (register_operand): Likewise.
4247 (immediate_operand): Likewise.
4248 (struct aarch64_memory_operand): New struct.
4249 (offset_memory_operand): New helper function.
4250 (preindex_memory_operand): Likewise.
4251 (enum aarch64_system_control_registers): New enum.
4252 (ENCODE): New macro.
4253 (emit_insn): New helper function.
4254 (emit_b): New function.
4255 (emit_bcond): Likewise.
4256 (emit_cb): Likewise.
4257 (emit_tb): Likewise.
4258 (emit_blr): Likewise.
4259 (emit_stp): Likewise.
4260 (emit_ldp_q_offset): Likewise.
4261 (emit_stp_q_offset): Likewise.
4262 (emit_load_store): Likewise.
4263 (emit_ldr): Likewise.
4264 (emit_ldrsw): Likewise.
4265 (emit_str): Likewise.
4266 (emit_ldaxr): Likewise.
4267 (emit_stxr): Likewise.
4268 (emit_stlr): Likewise.
4269 (emit_data_processing_reg): Likewise.
4270 (emit_data_processing): Likewise.
4271 (emit_add): Likewise.
4272 (emit_sub): Likewise.
4273 (emit_mov): Likewise.
4274 (emit_movk): Likewise.
4275 (emit_mov_addr): Likewise.
4276 (emit_mrs): Likewise.
4277 (emit_msr): Likewise.
4278 (emit_sevl): Likewise.
4279 (emit_wfe): Likewise.
4280 (append_insns): Likewise.
4281 (can_encode_int32_in): New helper function.
4282 (aarch64_relocate_instruction): New function.
4283 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4284 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4285 (struct linux_target_ops): Install aarch64_get_thread_area,
4286 aarch64_install_fast_tracepoint_jump_pad and
4287 aarch64_get_min_fast_tracepoint_insn_len.
4288
787749ea
PL
42892015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4290
4291 * Makefile.in (aarch64-insn.o): New rule.
4292 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4293
9812b2e6
YQ
42942015-09-21 Yao Qi <yao.qi@linaro.org>
4295
4296 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4297
18fe412b
YQ
42982015-09-21 Yao Qi <yao.qi@linaro.org>
4299
4300 * tracepoint.c (max_jump_pad_size): Remove.
4301
a0cc84cd
YQ
43022015-09-18 Yao Qi <yao.qi@linaro.org>
4303
4304 * linux-aarch64-low.c: Don't include sys/uio.h.
4305 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4306
d78908cf
WW
43072015-09-16 Wei-cheng Wang <cole945@gmail.com>
4308
4309 * tracepoint.c (eval_result_type): Change prototype.
4310 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4311
d57e0d50
PA
43122015-09-15 Pedro Alves <palves@redhat.com>
4313
4314 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4315 Check whether to report exec events instead of checking whether
4316 multiprocess is enabled.
4317
5a676acc
PA
43182015-09-15 Pedro Alves <palves@redhat.com>
4319
4320 PR remote/18965
4321 * remote-utils.c (prepare_resume_reply): Merge
4322 TARGET_WAITKIND_VFORK_DONE switch case with the
4323 TARGET_WAITKIND_FORKED case.
4324
7c5d0fad
YQ
43252015-09-15 Yao Qi <yao.qi@linaro.org>
4326
4327 * server.c (handle_query): Check string comparison using
4328 "else if" instead of "if".
4329
750ce8d1
YQ
43302015-09-15 Yao Qi <yao.qi@linaro.org>
4331
4332 * server.c (vCont_supported): New global variable.
4333 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4334 matches. Append ";vContSupported+" to own_buf.
4335 (handle_v_requests): Append ";s;S" to own_buf if target supports
4336 hardware single step or vCont_supported is false.
4337 (capture_main): Set vCont_supported to zero.
4338
70b90b91
YQ
43392015-09-15 Yao Qi <yao.qi@linaro.org>
4340
4341 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4342 it to ...
4343 (linux_supports_hardware_single_step): ... New function.
4344 (linux_target_ops): Update.
4345 * lynx-low.c (lynx_target_ops): Set field
4346 supports_hardware_single_step to target_can_do_hardware_single_step.
4347 * nto-low.c (nto_target_ops): Likewise.
4348 * spu-low.c (spu_target_ops): Likewise.
4349 * win32-low.c (win32_target_ops): Likewise.
4350 * target.c (target_can_do_hardware_single_step): New function.
4351 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4352 Remove. <supports_hardware_single_step>: New field.
4353 (target_supports_conditional_breakpoints): Remove.
4354 (target_supports_hardware_single_step): New macro.
4355 (target_can_do_hardware_single_step): Declare.
4356 * server.c (handle_query): Use target_supports_hardware_single_step
4357 instead of target_supports_conditional_breakpoints.
4358
ade90bde
YQ
43592015-09-15 Yao Qi <yao.qi@linaro.org>
4360
4361 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4362 function.
4363 (struct linux_target_ops the_low_target): Install
4364 aarch64_linux_siginfo_fixup.
4365
94585166
DB
43662015-09-11 Don Breazeal <donb@codesourcery.com>
4367 Luis Machado <lgustavo@codesourcery.com>
4368
4369 * linux-low.c (linux_mourn): Static declaration.
4370 (linux_arch_setup): Move in front of
4371 handle_extended_wait.
4372 (linux_arch_setup_thread): New function.
4373 (handle_extended_wait): Handle exec events. Call
4374 linux_arch_setup_thread. Make event_lwp argument a
4375 pointer-to-a-pointer.
4376 (check_zombie_leaders): Do not check stopped threads.
4377 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4378 (linux_low_filter_event): Add lwp and thread for exec'ing
4379 non-leader thread if leader thread has been deleted.
4380 Refactor code into linux_arch_setup_thread and call it.
4381 Pass child lwp pointer by reference to handle_extended_wait.
4382 (linux_wait_for_event_filtered): Update comment.
4383 (linux_wait_1): Prevent clobbering exec event status.
4384 (linux_supports_exec_events): New function.
4385 (linux_target_ops) <supports_exec_events>: Initialize new member.
4386 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4387 new member.
4388 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4389 * server.c (report_exec_events): New global variable.
4390 (handle_query): Handle qSupported query for exec-events feature.
4391 (captured_main): Initialize report_exec_events.
4392 * server.h (report_exec_events): Declare new global variable.
4393 * target.h (struct target_ops) <supports_exec_events>: New
4394 member.
4395 (target_supports_exec_events): New macro.
4396 * win32-low.c (win32_target_ops) <supports_exec_events>:
4397 Initialize new member.
4398
0568462b
MM
43992015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4400
4401 * linux-low.c (linux_low_enable_btrace): Remove.
4402 (linux_target_ops): Replace linux_low_enable_btrace with
4403 linux_enable_btrace.
4404
39edd165
YQ
44052015-09-03 Yao Qi <yao.qi@linaro.org>
4406
4407 * linux-aarch64-low.c (aarch64_insert_point): Call
4408 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4409 returns true.
4410
1db33b5a
UW
44112015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4412
4413 * linux-low.c (check_stopped_by_breakpoint): Use
4414 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4415
ab290430
PA
44162015-08-27 Pedro Alves <palves@redhat.com>
4417
4418 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4419
8d749320
SM
44202015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4421
6711b7f8
SM
4422 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4423 the XNEW-family equivalent.
8d749320
SM
4424 (compile_bytecodes): Likewise.
4425 * dll.c (loaded_dll): Likewise.
4426 * event-loop.c (append_callback_event): Likewise.
4427 (create_file_handler): Likewise.
4428 (create_file_event): Likewise.
4429 * hostio.c (handle_open): Likewise.
4430 * inferiors.c (add_thread): Likewise.
4431 (add_process): Likewise.
4432 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4433 * linux-arm-low.c (arm_new_process): Likewise.
4434 (arm_new_thread): Likewise.
4435 * linux-low.c (add_to_pid_list): Likewise.
4436 (linux_add_process): Likewise.
4437 (handle_extended_wait): Likewise.
4438 (add_lwp): Likewise.
4439 (enqueue_one_deferred_signal): Likewise.
4440 (enqueue_pending_signal): Likewise.
4441 (linux_resume_one_lwp_throw): Likewise.
4442 (linux_resume_one_thread): Likewise.
4443 (linux_read_memory): Likewise.
4444 (linux_write_memory): Likewise.
4445 * linux-mips-low.c (mips_linux_new_process): Likewise.
4446 (mips_linux_new_thread): Likewise.
4447 (mips_add_watchpoint): Likewise.
4448 * linux-x86-low.c (initialize_low_arch): Likewise.
4449 * lynx-low.c (lynx_add_process): Likewise.
4450 * mem-break.c (set_raw_breakpoint_at): Likewise.
4451 (set_breakpoint): Likewise.
4452 (add_condition_to_breakpoint): Likewise.
4453 (add_commands_to_breakpoint): Likewise.
4454 (clone_agent_expr): Likewise.
4455 (clone_one_breakpoint): Likewise.
4456 * regcache.c (new_register_cache): Likewise.
4457 * remote-utils.c (look_up_one_symbol): Likewise.
4458 * server.c (queue_stop_reply): Likewise.
4459 (start_inferior): Likewise.
4460 (queue_stop_reply_callback): Likewise.
4461 (handle_target_event): Likewise.
4462 * spu-low.c (fetch_ppc_memory): Likewise.
4463 (store_ppc_memory): Likewise.
4464 * target.c (set_target_ops): Likewise.
4465 * thread-db.c (thread_db_load_search): Likewise.
4466 (try_thread_db_load_1): Likewise.
4467 * tracepoint.c (add_tracepoint): Likewise.
4468 (add_tracepoint_action): Likewise.
4469 (create_trace_state_variable): Likewise.
4470 (cmd_qtdpsrc): Likewise.
4471 (cmd_qtro): Likewise.
4472 (add_while_stepping_state): Likewise.
4473 * win32-low.c (child_add_thread): Likewise.
4474 (get_image_name): Likewise.
4475
ed8b7b42
YQ
44762015-08-25 Yao Qi <yao.qi@linaro.org>
4477
4478 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4479
db3cb7cb
YQ
44802015-08-25 Yao Qi <yao.qi@linaro.org>
4481
4482 * Makefile.in (aarch64-linux.o): New rule.
4483 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4484 srv_tgtobj.
4485 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4486 (aarch64_init_debug_reg_state): Make it extern.
4487 (aarch64_linux_prepare_to_resume): Remove.
4488
f6011a1c
YQ
44892015-08-25 Yao Qi <yao.qi@linaro.org>
4490
4491 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4492 lwp_arch_private_info and ptid_of_lwp.
4493
88e2cf7e
YQ
44942015-08-25 Yao Qi <yao.qi@linaro.org>
4495
4496 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4497 Find proc_info by find_process_pid. All callers updated.
4498
5e35436e
YQ
44992015-08-25 Yao Qi <yao.qi@linaro.org>
4500
4501 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4502 Remove.
4503 (debug_reg_change_callback): Remove.
4504 (aarch64_notify_debug_reg_change): Remove.
4505
4a8a7965
YQ
45062015-08-25 Yao Qi <yao.qi@linaro.org>
4507
4508 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4509 Call current_lwp_ptid.
4510
32a271ee
YQ
45112015-08-25 Yao Qi <yao.qi@linaro.org>
4512
4513 * linux-aarch64-low.c (debug_reg_change_callback): Use
4514 debug_printf.
4515
0d51c8d7
YQ
45162015-08-25 Yao Qi <yao.qi@linaro.org>
4517
4518 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4519
31a43dd5
YQ
45202015-08-25 Yao Qi <yao.qi@linaro.org>
4521
4522 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4523
8ee52567
YQ
45242015-08-25 Yao Qi <yao.qi@linaro.org>
4525
4526 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4527 the code.
4528
ff3f0f45
YQ
45292015-08-25 Yao Qi <yao.qi@linaro.org>
4530
4531 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4532 Remove.
4533 (debug_reg_change_callback): Remove argument entry and add argument
4534 lwp. Remove local variable thread. Don't print thread id in the
4535 debugging output. Don't check whether pid of thread equals to pid.
4536 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4537 iterate_over_lwps instead find_inferior.
4538
3d40fbb5
PA
45392015-08-24 Pedro Alves <palves@redhat.com>
4540
4541 * inferiors.c (get_first_process): New function.
4542 * inferiors.h (get_first_process): New declaration.
4543 * remote-utils.c (read_ptid): Default to the first process in the
4544 list, instead of to the current thread's process.
4545
438e1e42
PA
45462015-08-24 Pedro Alves <palves@redhat.com>
4547
4548 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4549 * event-loop.c: Likewise.
4550 * remote-utils.c: Likewise.
4551 * tracepoint.c: Likewise.
4552
a8c6d4fc
PA
45532015-08-24 Pedro Alves <palves@redhat.com>
4554
4555 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4556 ptid_get_lwp.
4557
99b0bb12
PA
45582015-08-21 Pedro Alves <palves@redhat.com>
4559
4560 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4561 instead of literal 1.
4562
f8904751
PA
45632015-08-21 Pedro Alves <palves@redhat.com>
4564
4565 * tdesc.c (default_description): Explicitly zero-initialize.
4566
465a859e
PA
45672015-08-21 Pedro Alves <palves@redhat.com>
4568
4569 PR gdb/18749
4570 * inferiors.c (remove_thread): Discard any pending stop reply for
4571 this thread.
4572 * server.c (remove_all_on_match_pid): Rename to ...
4573 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4574 instead of a pid.
4575 (discard_queued_stop_replies): Change parameter to a ptid. Now
4576 extern.
4577 (handle_v_kill, kill_inferior_callback, captured_main)
4578 (process_serial_event): Adjust.
4579 * server.h (discard_queued_stop_replies): Declare.
4580
f0db101d
PA
45812015-08-21 Pedro Alves <palves@redhat.com>
4582
4583 * linux-low.c (wait_for_sigstop): Always switch to no thread
4584 selected if the previously current thread dies.
4585 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4586 process instead of the current thread's.
4587 * remote-utils.c (input_interrupt): Don't check if there's no
4588 current thread.
4589 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4590 current thread to the general thread fails, error out.
4591 (handle_qxfer_auxv, handle_qxfer_libraries)
4592 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4593 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4594 (handle_query): Check if there's a thread selected instead of
4595 checking whether there's any thread in the thread list.
4596 (handle_qxfer_threads, handle_qxfer_btrace)
4597 (handle_qxfer_btrace_conf): Don't error out early if there's no
4598 thread in the thread list.
4599 (handle_v_cont, myresume): Don't set the current thread to the
4600 continue thread.
4601 (process_serial_event) <Hg handling>: Also set thread_id if the
4602 previous general thread is still alive.
4603 (process_serial_event) <g/G handling>: If setting the current
4604 thread to the general thread fails, error out.
4605 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4606 thread's lwp instead of the current thread's.
4607 * target.c (set_desired_thread): If the desired thread was not
4608 found, leave the current thread pointing to NULL. Return an int
4609 (boolean) indicating success.
4610 * target.h (set_desired_thread): Change return type to int.
4611
40045d91
MF
46122015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4613
4614 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4615 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4616 #includes.
4617 (ps_get_thread_area): New function.
4618
45face3b
GB
46192015-08-19 Gary Benson <gbenson@redhat.com>
4620
4621 * hostio.c (handle_pread): Do not attempt to read more data
4622 than hostio_reply_with_data can fit in a packet.
4623
16d5f642
JB
46242015-08-18 Joel Brobecker <brobecker@adacore.com>
4625
4626 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4627
a738da3a
MF
46282015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4629
4630 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4631
33ebda9d
PA
46322015-08-06 Pedro Alves <palves@redhat.com>
4633
4634 * tracepoint.c (expr_eval_result): Now an int.
4635
a44892be
PA
46362015-08-06 Pedro Alves <palves@redhat.com>
4637
4638 * gdbthread.h (struct regcache): Forward declare.
4639 (struct thread_info) <regcache_data>: Now a struct regcache
4640 pointer.
4641 * inferiors.c (inferior_regcache_data)
4642 (set_inferior_regcache_data): Now work with struct regcache
4643 pointers.
4644 * inferiors.h (struct regcache): Forward declare.
4645 (inferior_regcache_data, set_inferior_regcache_data): Now work
4646 with struct regcache pointers.
4647 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4648 (free_register_cache_thread): Remove struct regcache pointer
4649 casts.
4650
608a1e46
PA
46512015-08-06 Pedro Alves <palves@redhat.com>
4652
4653 * server.c (captured_main): On error, print the exception message
4654 to stderr, and if run_once is set, throw a quit.
4655
f0ce0d3a
PA
46562015-08-06 Pedro Alves <palves@redhat.com>
4657
4658 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4659 the current thread.
4660
bf47e248
PA
46612015-08-06 Pedro Alves <palves@redhat.com>
4662
4663 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4664 reading beyond the passed in buffer length.
4665
b6b9ffcc
PL
46662015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4667
4668 * tracepoint.c (symbol_list) <required>: Remove.
4669
863d01bd
PA
46702015-08-06 Pedro Alves <palves@redhat.com>
4671
4672 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4673 count if stopping and suspending threads.
4674 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4675 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4676 (linux_detach): Complete an ongoing step-over.
4677 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4678 throughout.
4679 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4680 (linux_wait_1): If passing a signal to the inferior after
4681 finishing a step-over, unsuspend and re-resume all lwps. If we
4682 see a single-step event but the thread should be continuing, don't
4683 pass the trap to gdb.
4684 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4685 internal_error instead of gdb_assert.
4686 (enqueue_pending_signal): New function.
4687 (check_ptrace_stopped_lwp_gone): Add debug output.
4688 (start_step_over): Use internal_error instead of gdb_assert.
4689 (complete_ongoing_step_over): New function.
4690 (linux_resume_one_thread): Don't resume a suspended thread.
4691 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4692 it stepping.
4693
00db26fa
PA
46942015-08-06 Pedro Alves <palves@redhat.com>
4695
4696 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4697 (linux_thread_alive): Use lwp_is_marked_dead.
4698 (extended_event_reported): Delete.
4699 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4700 instead of extended_event_reported.
4701 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4702 as well.
4703 (lwp_is_marked_dead): New function.
4704 (lwp_running): Use lwp_is_marked_dead.
4705 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4706 comment.
4707
ad071a30
PA
47082015-08-06 Pedro Alves <palves@redhat.com>
4709
4710 * linux-low.c (linux_wait_1): Move fork event output out of the
4711 !report_to_gdb check. Pass event_child->waitstatus to
4712 target_waitstatus_to_string instead of ourstatus.
4713
524b57e6
YQ
47142015-08-04 Yao Qi <yao.qi@linaro.org>
4715
4716 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4717 if current_thread is 32 bit.
4718
6085d6f6
YQ
47192015-08-04 Yao Qi <yao.qi@linaro.org>
4720
4721 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4722 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4723 * server.c (extended_protocol): Remove "static".
4724 * server.h (extended_protocol): Declare it.
4725
8a7e4587
YQ
47262015-08-04 Yao Qi <yao.qi@linaro.org>
4727
4728 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4729 both aarch64 and aarch32.
4730 (aarch64_set_pc): Likewise.
4731
3b53ae99
YQ
47322015-08-04 Yao Qi <yao.qi@linaro.org>
4733
4734 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4735 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4736 arm-with-neon.xml to srv_xmlfiles.
4737 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4738 (is_64bit_tdesc): New function.
4739 (aarch64_linux_read_description): New function.
4740 (aarch64_arch_setup): Call aarch64_linux_read_description.
4741 (regs_info): Rename to regs_info_aarch64.
4742 (aarch64_regs_info): Return right regs_info.
4743 (initialize_low_arch): Call initialize_low_arch_aarch32.
4744
bd9e6534
YQ
47452015-08-04 Yao Qi <yao.qi@linaro.org>
4746
4747 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4748 * linux-aarch32-low.c: New file.
4749 * linux-aarch32-low.h: New file.
4750 * linux-arm-low.c (arm_fill_gregset): Move it to
4751 linux-aarch32-low.c.
4752 (arm_store_gregset): Likewise.
4753 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4754 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4755 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4756 (regs_info): Rename to regs_info_arm.
4757 (arm_regs_info): Return regs_info_aarch32 if
4758 have_ptrace_getregset is 1 and target description is
4759 arm_with_neon or arm_with_vfpv3.
4760 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4761 Call initialize_low_arch_aarch32 instead.
4762
ded48a5e
YQ
47632015-08-04 Yao Qi <yao.qi@linaro.org>
4764
4765 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4766 * linux-low.c: ... here.
4767 * linux-low.h (have_ptrace_getregset): Declare it.
4768
96e9210f
PA
47692015-08-04 Pedro Alves <palves@redhat.com>
4770
4771 * thread-db.c (struct thread_db): Use new typedefs.
4772 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4773 CHK calls.
4774 (disable_thread_event_reporting): Cast result of dlsym to
4775 destination function pointer type.
4776 (thread_db_mourn): Use td_ta_delete_ftype.
4777
af60a1ef
SL
47782015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4779
4780 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4781 arch variant.
4782 (CDX_BREAKPOINT): Define for R2.
4783 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4784 (the_low_target): Add comments.
4785
e8b41681
YQ
47862015-07-30 Yao Qi <yao.qi@linaro.org>
4787
4788 * linux-arm-low.c (arm_hwcap): Remove it.
4789 (arm_read_description): New local variable arm_hwcap. Don't
4790 set arm_hwcap to zero.
4791
89abb039
YQ
47922015-07-30 Yao Qi <yao.qi@linaro.org>
4793
4794 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4795 Use regcache->tdesc instead.
4796 (arm_store_wmmxregset): Likewise.
4797 (arm_fill_vfpregset): Likewise.
4798 (arm_store_vfpregset): Likewise.
4799
deca266c
YQ
48002015-07-30 Yao Qi <yao.qi@linaro.org>
4801
4802 * linux-arm-low.c: Include arch/arm.h.
4803 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4804 (arm_store_gregset): Likewise.
4805
aa58a496
SM
48062015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4807
4808 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4809 ptrace's 4th parameter.
4810
50904b25
YQ
48112015-07-27 Yao Qi <yao.qi@linaro.org>
4812
4813 * configure.srv (case aarch64*-*-linux*): Don't set
4814 srv_linux_usrregs.
4815
5826e159
PA
48162015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4817
4818 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4819 sys/ptrace.h.
4820 * linux-arm-low.c: Likewise.
4821 * linux-cris-low.c: Likewise.
4822 * linux-crisv32-low.c: Likewise.
4823 * linux-low.c: Likewise.
4824 * linux-m68k-low.c: Likewise.
4825 * linux-mips-low.c: Likewise.
4826 * linux-nios2-low.c: Likewise.
4827 * linux-s390-low.c: Likewise.
4828 * linux-sparc-low.c: Likewise.
4829 * linux-tic6x-low.c: Likewise.
4830 * linux-tile-low.c: Likewise.
4831 * linux-x86-low.c: Likewise.
4832
54019719
PA
48332015-07-24 Pedro Alves <palves@redhat.com>
4834
4835 * config.in: Regenerate.
4836 * configure: Regenerate.
4837
eb7aa561
PA
48382015-07-24 Pedro Alves <palves@redhat.com>
4839
4840 * acinclude.m4: Include ../ptrace.m4.
4841 * configure.ac: Call GDB_AC_PTRACE.
4842 * config.in, configure: Regenerate.
4843
55d7b841
YQ
48442015-07-24 Yao Qi <yao.qi@linaro.org>
4845
4846 * linux-low.c (linux_create_inferior): Remove setting to
4847 proc->priv->new_inferior.
4848 (linux_attach): Likewise.
4849 (linux_low_filter_event): Likewise.
4850 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4851
c06cbd92
YQ
48522015-07-24 Yao Qi <yao.qi@linaro.org>
4853
4854 * linux-low.c (linux_arch_setup): New function.
4855 (linux_low_filter_event): If proc->tdesc is NULL and
4856 proc->attached is true, call the_low_target.arch_setup.
4857 Otherwise, keep status pending, and return.
4858 (linux_resume_one_lwp_throw): Don't call get_pc if
4859 thread->while_stepping isn't NULL. Don't call
4860 get_thread_regcache if proc->tdesc is NULL.
4861 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4862 (linux_target_ops): Install arch_setup.
4863 * server.c (start_inferior): Call the_target->arch_setup.
4864 * target.h (struct target_ops) <arch_setup>: New field.
4865 (target_arch_setup): New marco.
4866 * lynx-low.c (lynx_target_ops): Update.
4867 * nto-low.c (nto_target_ops): Update.
4868 * spu-low.c (spu_target_ops): Update.
4869 * win32-low.c (win32_target_ops): Update.
4870
5ae3ebba
YQ
48712015-07-24 Yao Qi <yao.qi@linaro.org>
4872
4873 * linux-low.c (linux_add_process): Don't set
4874 proc->priv->new_inferior.
4875 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4876 (linux_attach): Likewise.
4877
eb97750b
YQ
48782015-07-24 Yao Qi <yao.qi@linaro.org>
4879
4880 * server.c (start_inferior): Code refactor.
4881
51aee833
YQ
48822015-07-24 Yao Qi <yao.qi@linaro.org>
4883
4884 * server.c (process_serial_event): Set general_thread.
4885
af1b22f3
YQ
48862015-07-21 Yao Qi <yao.qi@linaro.org>
4887
4888 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4889 aarch64_linux_get_debug_reg_capacity.
4890
554717a3
YQ
48912015-07-17 Yao Qi <yao.qi@linaro.org>
4892
4893 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4894 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4895 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4896 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4897 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4898 (AARCH64_HWP_ALIGNMENT): Likewise.
4899 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4900 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4901 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4902 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4903 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4904 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4905 (struct aarch64_debug_reg_state): Likewise.
4906 (struct arch_lwp_info): Likewise.
4907 (aarch64_align_watchpoint): Likewise.
4908 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4909 (aarch64_watchpoint_length): Likewise.
4910 (aarch64_point_encode_ctrl_reg): Likewise
4911 (aarch64_point_is_aligned): Likewise.
4912 (aarch64_align_watchpoint): Likewise.
4913 (aarch64_linux_set_debug_regs):
4914 (aarch64_dr_state_insert_one_point): Likewise.
4915 (aarch64_dr_state_remove_one_point): Likewise.
4916 (aarch64_handle_breakpoint): Likewise.
4917 (aarch64_handle_aligned_watchpoint): Likewise.
4918 (aarch64_handle_unaligned_watchpoint): Likewise.
4919 (aarch64_handle_watchpoint): Likewise.
4920
c67ca4de
YQ
49212015-07-17 Yao Qi <yao.qi@linaro.org>
4922
4923 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4924 and don't aarch64_get_debug_reg_state. All callers update.
4925 (aarch64_handle_aligned_watchpoint): Likewise.
4926 (aarch64_handle_unaligned_watchpoint): Likewise.
4927 (aarch64_handle_watchpoint): Likewise.
4928 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4929 (aarch64_remove_point): Likewise.
4930
25abf979
YQ
49312015-07-17 Yao Qi <yao.qi@linaro.org>
4932
4933 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4934 debug_printf.
4935 (aarch64_handle_unaligned_watchpoint): Likewise.
4936
db1ff28b
JK
49372015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4938
4939 Revert the previous 3 commits:
4940 Move gdb_regex* to common/
4941 Move linux_find_memory_regions_full & co.
4942 gdbserver build-id attribute generator
4943
700ca40f
JK
49442015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4945 Jan Kratochvil <jan.kratochvil@redhat.com>
4946
4947 gdbserver build-id attribute generator.
4948 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4949 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4950 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4951 (find_phdr): New.
4952 (get_dynamic): Use find_pdhr to traverse program headers.
4953 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4954 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4955 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4956 (get_hex_build_id): New.
4957 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4958 to reply XML document.
4959
9904185c
JK
49602015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4961 Jan Kratochvil <jan.kratochvil@redhat.com>
4962
4963 * target.c: Include target/target-utils.h and fcntl.h.
4964 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4965 (target_fileio_read_stralloc): New functions.
4966
6e5b4429
JK
49672015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4968
4969 * Makefile.in (OBS): Add gdb_regex.o.
4970 (gdb_regex.o): New.
4971 * config.in: Rebuilt.
4972 * configure: Rebuilt.
4973
ddc98fbf
JK
49742015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4975 Jan Kratochvil <jan.kratochvil@redhat.com>
4976
4977 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4978 * Makefile.in (OBS): Add target-utils.o.
4979 (linux-maps.o, target-utils.o): New.
4980 * configure.srv (srv_linux_obj): Add linux-maps.o.
4981
e57bb7a0
PL
49822015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4983
4984 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4985 function, return 1.
4986 (the_low_target): Install it.
4987
586b02a9
PA
49882015-07-14 Pedro Alves <palves@redhat.com>
4989
4990 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4991 Instead, ignore ECHILD, and throw an error for other errnos.
4992
58c1b36c
PA
49932015-07-10 Pedro Alves <palves@redhat.com>
4994
4995 * event-loop.c (struct callback_event) <data>: Change type to
4996 gdb_client_data instance instead of gdb_client_data pointer.
4997 (append_callback_event): Adjust.
4998
421530db
PL
49992015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5000
5001 * linux-aarch64-low.c: Add comments for each linux_target_ops
5002 method. Remove comments already covered in target_ops and
5003 linux_target_ops definitions.
5004 (the_low_target): Add comments for each unimplemented method.
5005
c2d65f38
YQ
50062015-07-09 Yao Qi <yao.qi@linaro.org>
5007
5008 * linux-aarch64-low.c (aarch64_regmap): Remove.
5009 (aarch64_usrregs_info): Remove.
5010 (regs_info): Set field usrregs to NULL.
5011
b20a6524
MM
50122015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5013
5014 * linux-low.c: Include "rsp-low.h"
5015 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5016 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5017 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5018 (handle_btrace_enable_pt): New.
5019 (handle_btrace_general_set): Support "pt".
5020 (handle_btrace_conf_general_set): Support "pt:size".
5021
96c97461
PL
50222015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5023
5024 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5025 Z_PACKET_SW_BP.
5026
37d66942
PL
50272015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5028
5029 * linux-aarch64-low.c: Remove comment about endianness.
5030 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5031 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5032 memcmp.
5033
dc06243f
GB
50342015-06-24 Gary Benson <gbenson@redhat.com>
5035
5036 * linux-i386-ipa.c (stdint.h): Do not include.
5037 * lynx-i386-low.c (stdint.h): Likewise.
5038 * lynx-ppc-low.c (stdint.h): Likewise.
5039 * mem-break.c (stdint.h): Likewise.
5040 * thread-db.c (stdint.h): Likewise.
5041 * tracepoint.c (stdint.h): Likewise.
5042 * win32-low.c (stdint.h): Likewise.
5043
124e13d9
SM
50442015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5045
5046 * server.c (write_qxfer_response): Update call to
5047 remote_escape_output.
5048
909c2cda
JK
50492015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5050 Jan Kratochvil <jan.kratochvil@redhat.com>
5051
5052 Merge multiple hex conversions.
5053 * gdbreplay.c (tohex): Rename to 'fromhex'.
5054 (logchar): Use fromhex.
5055
24c05f46
JK
50562015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5057
5058 * server.c (handle_qxfer_libraries): Set `version' attribute for
5059 <library-list>.
5060
14d2069a
GB
50612015-06-10 Gary Benson <gbenson@redhat.com>
5062
5063 * target.h (struct target_ops) <multifs_open>: New field.
5064 <multifs_unlink>: Likewise.
5065 <multifs_readlink>: Likewise.
5066 * linux-low.c (nat/linux-namespaces.h): New include.
5067 (linux_target_ops): Initialize the_target->multifs_open,
5068 the_target->multifs_unlink and the_target->multifs_readlink.
5069 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5070 * hostio.c (hostio_fs_pid): New static variable.
5071 (hostio_handle_new_gdb_connection): New function.
5072 (handle_setfs): Likewise.
5073 (handle_open): Use the_target->multifs_open as appropriate.
5074 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5075 (handle_readlink): Use the_target->multifs_readlink as
5076 appropriate.
5077 (handle_vFile): Handle vFile:setfs packets.
5078 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5079 after target_handle_new_gdb_connection.
5080
4b8b5e72
GB
50812015-06-10 Gary Benson <gbenson@redhat.com>
5082
5083 * configure.ac (AC_CHECK_FUNCS): Add setns.
5084 * config.in: Regenerate.
5085 * configure: Likewise.
5086 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5087 (linux-namespaces.o): New rule.
5088 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5089
3ac2e371
GB
50902015-06-09 Gary Benson <gbenson@redhat.com>
5091
5092 * hostio.c (handle_open): Process mode argument with
5093 fileio_to_host_mode.
5094
ca9b78ce
YQ
50952015-06-01 Yao Qi <yao.qi@linaro.org>
5096
5097 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5098 * linux-x86-low.c: Likewise.
5099
bfacd19d
DB
51002015-05-28 Don Breazeal <donb@codesourcery.com>
5101
5102 * linux-low.c (handle_extended_wait): Initialize
5103 thread_info.last_resume_kind for new fork children.
5104
452003ef
PA
51052015-05-15 Pedro Alves <palves@redhat.com>
5106
5107 * target.h (target_handle_new_gdb_connection): Rewrite using if
5108 wrapped in do/while.
5109
1041a03c
JB
51102015-05-14 Joel Brobecker <brobecker@adacore.com>
5111
5112 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5113 * configure, config.in: Regenerate.
5114 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5115 Declare typedef.
5116
c269dbdb
DB
51172015-05-12 Don Breazeal <donb@codesourcery.com>
5118
5119 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5120 PTRACE_EVENT_VFORK_DONE.
5121 (linux_low_ptrace_options, extended_event_reported): Add vfork
5122 events.
5123 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5124 and "vforkdone" for RSP 'T' Stop Reply Packet.
5125 * server.h (report_vfork_events): Declare
5126 global variable.
5127
3a8a0396
DB
51282015-05-12 Don Breazeal <donb@codesourcery.com>
5129
5130 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5131 (the_low_target) <new_fork>: Initialize new member.
5132 * linux-arm-low.c (arm_new_fork): New function.
5133 (the_low_target) <new_fork>: Initialize new member.
5134 * linux-low.c (handle_extended_wait): Call new target function
5135 new_fork.
5136 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5137 * linux-mips-low.c (mips_add_watchpoint): New function
5138 extracted from mips_insert_point.
5139 (the_low_target) <new_fork>: Initialize new member.
5140 (mips_linux_new_fork): New function.
5141 (mips_insert_point): Call mips_add_watchpoint.
5142 * linux-x86-low.c (x86_linux_new_fork): New function.
5143 (the_low_target) <new_fork>: Initialize new member.
5144
de0d863e
DB
51452015-05-12 Don Breazeal <donb@codesourcery.com>
5146
5147 * linux-low.c (handle_extended_wait): Implement return value,
5148 rename argument 'event_child' to 'event_lwp', handle
5149 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5150 (linux_low_ptrace_options): New function.
5151 (linux_low_filter_event): Call linux_low_ptrace_options,
5152 use different argument fo linux_enable_event_reporting,
5153 use return value from handle_extended_wait.
5154 (extended_event_reported): New function.
5155 (linux_wait_1): Call extended_event_reported and set
5156 status to report fork events.
5157 (linux_write_memory): Add pid to debug message.
5158 (reset_lwp_ptrace_options_callback): New function.
5159 (linux_handle_new_gdb_connection): New function.
5160 (linux_target_ops): Initialize new structure member.
5161 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5162 * lynx-low.c: Initialize new structure member.
5163 * remote-utils.c (prepare_resume_reply): Implement stop reason
5164 "fork" for "T" stop message.
5165 * server.c (handle_query): Call handle_new_gdb_connection.
5166 * server.h (report_fork_events): Declare global flag.
5167 * target.h (struct target_ops) <handle_new_gdb_connection>:
5168 New member.
5169 (target_handle_new_gdb_connection): New macro.
5170 * win32-low.c: Initialize new structure member.
5171
ddcbc397
DB
51722015-05-12 Don Breazeal <donb@codesourcery.com>
5173
5174 * mem-break.c (APPEND_TO_LIST): Define macro.
5175 (clone_agent_expr): New function.
5176 (clone_one_breakpoint): New function.
5177 (clone_all_breakpoints): New function.
5178 * mem-break.h: Declare new functions.
5179
89245bc0
DB
51802015-05-12 Don Breazeal <donb@codesourcery.com>
5181
5182 * linux-low.c (linux_supports_fork_events): New function.
5183 (linux_supports_vfork_events): New function.
5184 (linux_target_ops): Initialize new structure members.
5185 (initialize_low): Call linux_check_ptrace_features.
5186 * lynx-low.c (lynx_target_ops): Initialize new structure
5187 members.
5188 * server.c (report_fork_events, report_vfork_events):
5189 New global flags.
5190 (handle_query): Add new features to qSupported packet and
5191 response.
5192 (captured_main): Initialize new global variables.
5193 * target.h (struct target_ops) <supports_fork_events>:
5194 New member.
5195 <supports_vfork_events>: New member.
5196 (target_supports_fork_events): New macro.
5197 (target_supports_vfork_events): New macro.
5198 * win32-low.c (win32_target_ops): Initialize new structure
5199 members.
5200
835205d0
GB
52012015-05-12 Gary Benson <gbenson@redhat.com>
5202
5203 * server.c (handle_qxfer_exec_file): Use current process
5204 if annex is empty.
5205
21e94bd9
SL
52062015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5207
5208 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5209 Remove HAVE_PTRACE_GETREGS conditionals.
5210 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5211 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5212
45614f15
YQ
52132015-05-08 Yao Qi <yao.qi@linaro.org>
5214
5215 * linux-low.c (linux_supports_conditional_breakpoints): New
5216 function.
5217 (linux_target_ops): Install new target method.
5218 * lynx-low.c (lynx_target_ops): Install NULL hook for
5219 supports_conditional_breakpoints.
5220 * nto-low.c (nto_target_ops): Likewise.
5221 * spu-low.c (spu_target_ops): Likewise.
5222 * win32-low.c (win32_target_ops): Likewise.
5223 * server.c (handle_query): Check
5224 target_supports_conditional_breakpoints.
5225 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5226 New field.
5227 (target_supports_conditional_breakpoints): New macro.
5228
80ad801e
PA
52292015-05-06 Pedro Alves <palves@redhat.com>
5230
5231 PR server/18081
5232 * server.c (start_inferior): If the process exits, mourn it.
5233
819843c7
GB
52342015-04-21 Gary Benson <gbenson@redhat.com>
5235
5236 * hostio.c (fileio_open_flags_to_host): Factored out to
5237 fileio_to_host_openflags in common/fileio.c. Single use
5238 updated.
5239
a2d5a9d7
MF
52402015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5241
5242 * linux-xtensa-low.c (xtensa_fill_gregset)
5243 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5244 XCHAL_HAVE_LOOP.
5245
deb44829
MF
52462015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5247
5248 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5249 (regs_info): Replace usrregs pointer with NULL.
5250
e57f1de3
GB
52512015-04-17 Gary Benson <gbenson@redhat.com>
5252
5253 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5254 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5255 * server.c (handle_qxfer_exec_file): New function.
5256 (qxfer_packets): Add exec-file entry.
5257 (handle_query): Report qXfer:exec-file:read as supported packet.
5258
62828379
RN
52592015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5260
5261 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5262
b88bb450
GB
52632015-04-09 Gary Benson <gbenson@redhat.com>
5264
5265 * hostio-errno.c (errno_to_fileio_error): Remove function.
5266 Update caller to use remote_fileio_to_fio_error.
5267
c8f4bfdd
YQ
52682015-04-09 Yao Qi <yao.qi@linaro.org>
5269
5270 * linux-low.c (linux_insert_point): Call
5271 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5272 (linux_remove_point): Call remove_memory_breakpoint if type is
5273 raw_bkpt_type_sw.
5274 * linux-x86-low.c (x86_insert_point): Don't call
5275 insert_memory_breakpoint.
5276 (x86_remove_point): Don't call remove_memory_breakpoint.
5277
41f98f02
PA
52782015-04-01 Pedro Alves <palves@redhat.com>
5279 Cleber Rosa <crosa@redhat.com>
5280
5281 * server.c (gdbserver_usage): Reorganize and extend the usage
5282 message.
5283
2bf6fb9d
PA
52842015-03-24 Pedro Alves <palves@redhat.com>
5285
5286 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5287 output. Also dump TRAP_TRACE.
5288 (linux_low_filter_event): In debug output, distinguish a
5289 resume_stop SIGSTOP from a delayed SIGSTOP.
5290
369f6daa
GB
52912015-03-24 Gary Benson <gbenson@redhat.com>
5292
5293 * linux-x86-low.c (x86_linux_new_thread): Moved to
5294 nat/x86-linux.c.
5295 (x86_linux_prepare_to_resume): Likewise.
5296
8e5d4070
GB
52972015-03-24 Gary Benson <gbenson@redhat.com>
5298
5299 * Makefile.in (x86-linux-dregs.o): New rule.
5300 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5301 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5302 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5303 (x86_linux_dr_get): Likewise.
5304 (x86_linux_dr_set): Likewise.
5305 (update_debug_registers_callback): Likewise.
5306 (x86_linux_dr_set_addr): Likewise.
5307 (x86_linux_dr_get_addr): Likewise.
5308 (x86_linux_dr_set_control): Likewise.
5309 (x86_linux_dr_get_control): Likewise.
5310 (x86_linux_dr_get_status): Likewise.
5311 (x86_linux_update_debug_registers): Likewise.
5312
2b95d440
GB
53132015-03-24 Gary Benson <gbenson@redhat.com>
5314
5315 * linux-x86-low.c (x86_linux_update_debug_registers):
5316 New function, factored out from...
5317 (x86_linux_prepare_to_resume): ...this.
5318
14b0bc68
GB
53192015-03-24 Gary Benson <gbenson@redhat.com>
5320
5321 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5322 (x86_linux_dr_set): Likewise.
5323 (update_debug_registers_callback): Likewise.
5324 (x86_linux_dr_set_addr): Likewise.
5325 (x86_linux_dr_get_addr): Likewise.
5326 (x86_linux_dr_set_control): Likewise.
5327 (x86_linux_dr_get_control): Likewise.
5328 (x86_linux_dr_get_status): Likewise.
5329 (x86_linux_prepare_to_resume): Likewise.
5330
5dfe6ca8
GB
53312015-03-24 Gary Benson <gbenson@redhat.com>
5332
5333 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5334 Use perror_with_name. Pass string through gettext.
5335 (x86_linux_dr_set): Likewise.
5336
d33472ad
GB
53372015-03-24 Gary Benson <gbenson@redhat.com>
5338
5339 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5340 (x86_linux_dr_set_addr): ...this.
5341 (x86_dr_low_get_addr): Rename to...
5342 (x86_linux_dr_get_addr): ...this.
5343 (x86_dr_low_set_control): Rename to...
5344 (x86_linux_dr_set_control): ...this.
5345 (x86_dr_low_get_control): Rename to...
5346 (x86_linux_dr_get_control): ...this.
5347 (x86_dr_low_get_status): Rename to...
5348 (x86_linux_dr_get_status): ...this.
5349 (x86_dr_low): Update with new function names.
5350
4b134ca1
GB
53512015-03-24 Gary Benson <gbenson@redhat.com>
5352
5353 * Makefile.in (x86-linux.o): New rule.
5354 * configure.srv: Add x86-linux.o to relevant targets.
5355 * linux-low.c (lwp_set_arch_private_info): New function.
5356 (lwp_arch_private_info): Likewise.
5357 * linux-x86-low.c: Include nat/x86-linux.h.
5358 (arch_lwp_info): Removed structure.
5359 (update_debug_registers_callback):
5360 Use lwp_set_debug_registers_changed.
5361 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5362 and lwp_set_debug_registers_changed.
5363 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5364
34c703da
GB
53652015-03-24 Gary Benson <gbenson@redhat.com>
5366
5367 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5368 * linux-arm-low.c (arm_new_thread): Likewise.
5369 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5370 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5371 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5372 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5373
cff068da
GB
53742015-03-24 Gary Benson <gbenson@redhat.com>
5375
5376 * linux-low.c (ptid_of_lwp): New function.
5377 (lwp_is_stopped): Likewise.
5378 (lwp_stop_reason): Likewise.
5379 * linux-x86-low.c (update_debug_registers_callback):
5380 Use lwp_is_stopped.
5381 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5382 lwp_stop_reason.
5383
b2f7c7e8
GB
53842015-03-24 Gary Benson <gbenson@redhat.com>
5385
5386 * linux-low.h (linux_stop_lwp): Remove declaration.
5387
6d4ee8c6
GB
53882015-03-24 Gary Benson <gbenson@redhat.com>
5389
5390 * linux-low.h: Include nat/linux-nat.h.
5391 * linux-low.c (iterate_over_lwps_args): New structure.
5392 (iterate_over_lwps_filter): New function.
5393 (iterate_over_lwps): Likewise.
5394 * linux-x86-low.c (update_debug_registers_callback):
5395 Update signature to what iterate_over_lwps expects.
5396 Remove PID check that iterate_over_lwps now performs.
5397 (x86_dr_low_set_addr): Use iterate_over_lwps.
5398 (x86_dr_low_set_control): Likewise.
5399
70a0bb6b
GB
54002015-03-24 Gary Benson <gbenson@redhat.com>
5401
5402 * linux-x86-low.c (x86_debug_reg_state): New function.
5403 (x86_linux_prepare_to_resume): Use the above.
5404
7b669087
GB
54052015-03-24 Gary Benson <gbenson@redhat.com>
5406
5407 * linux-low.c (current_lwp_ptid): New function.
5408 * linux-x86-low.c: Include nat/linux-nat.h.
5409 (x86_dr_low_get_addr): Use current_lwp_ptid.
5410 (x86_dr_low_get_control): Likewise.
5411 (x86_dr_low_get_status): Likewise.
5412
eef49a3d
PA
54132015-03-20 Pedro Alves <palves@redhat.com>
5414
5415 * tracepoint.c (cmd_qtstatus): Make "str" const.
5416
b2333d22
PA
54172015-03-20 Pedro Alves <palves@redhat.com>
5418
5419 * server.c (handle_general_set): Make "req_str" const.
5420
23f238d3
PA
54212015-03-19 Pedro Alves <palves@redhat.com>
5422
5423 * linux-low.c (linux_resume_one_lwp): Rename to ...
5424 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5425 instead call perror_with_name.
5426 (check_ptrace_stopped_lwp_gone): New function.
5427 (linux_resume_one_lwp): Reimplement as wrapper around
5428 linux_resume_one_lwp_throw that swallows errors if the LWP is
5429 gone.
5430
91baf43f
PA
54312015-03-19 Pedro Alves <palves@redhat.com>
5432
5433 * linux-low.c (count_events_callback, select_event_lwp_callback):
5434 No longer check whether the thread has resume_stop as last resume
5435 kind.
5436
8bf3b159
PA
54372015-03-19 Pedro Alves <palves@redhat.com>
5438
5439 * linux-low.c (count_events_callback, select_event_lwp_callback):
5440 Use the lwp's status_pending_p field, not the thread's.
5441
b90fc188
PA
54422015-03-19 Pedro Alves <palves@redhat.com>
5443
5444 * linux-low.c (select_event_lwp_callback): Update comments to
5445 no longer mention SIGTRAP.
5446
464b0089
GB
54472015-03-18 Gary Benson <gbenson@redhat.com>
5448
5449 * server.c (handle_query): Do not report vFile:fstat as supported.
5450
aa9e327f
GB
54512015-03-11 Gary Benson <gbenson@redhat.com>
5452
5453 * hostio.c (sys/types.h): New include.
5454 (sys/stat.h): Likewise.
5455 (common-remote-fileio.h): Likewise.
5456 (handle_fstat): New function.
5457 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 5458
791c0056
GB
54592015-03-11 Gary Benson <gbenson@redhat.com>
5460
5461 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5462 struct stat.st_blocks and struct stat.st_blksize.
5463 * configure: Regenerate.
5464 * config.in: Likewise.
5465 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5466 (OBS): Add common-remote-fileio.o.
5467 (common-remote-fileio.o): New rule.
5468
9a9df970
PA
54692015-03-09 Pedro Alves <palves@redhat.com>
5470
5471 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5472 'struct sockaddr' pointer in 'accept' call.
5473
9eb1356e
PA
54742015-03-09 Pedro Alves <palves@redhat.com>
5475
5476 Revert:
5477 2015-03-07 Pedro Alves <palves@redhat.com>
5478 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5479 or <winsock2.h> here. Instead include "gdb_socket.h".
5480 (remote_open): Use union gdb_sockaddr_u.
5481 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5482 or <winsock2.h> here. Instead include "gdb_socket.h".
5483 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5484 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5485 or <sys/un.h>.
5486 (init_named_socket, gdb_agent_helper_thread): Use union
5487 gdb_sockaddr_u.
5488
aac331e4
PA
54892015-03-07 Pedro Alves <palves@redhat.com>
5490
5491 * configure.ac (build_warnings): Move
5492 -Wdeclaration-after-statement to the C-specific set.
5493 * configure: Regenerate.
5494
366c75fc
PA
54952015-03-07 Pedro Alves <palves@redhat.com>
5496
5497 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5498 or <winsock2.h> here. Instead include "gdb_socket.h".
5499 (remote_open): Use union gdb_sockaddr_u.
5500 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5501 or <winsock2.h> here. Instead include "gdb_socket.h".
5502 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5503 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5504 or <sys/un.h>.
5505 (init_named_socket, gdb_agent_helper_thread): Use union
5506 gdb_sockaddr_u.
5507
492d29ea
PA
55082015-03-07 Pedro Alves <palves@redhat.com>
5509
5510 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5511 instead.
5512
60a191ed
YQ
55132015-03-06 Yao Qi <yao.qi@linaro.org>
5514
5515 * linux-aarch64-low.c (aarch64_insert_point): Use
5516 show_debug_regs as a boolean.
5517 (aarch64_remove_point): Likewise.
5518
f5771b1d
PA
55192015-03-05 Pedro Alves <palves@redhat.com>
5520
5521 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5522 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5523 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5524 * nto-low.c (nto_target_ops): Likewise.
5525 * spu-low.c (spu_target_ops): Likewise.
5526 * win32-low.c (win32_target_ops): Likewise.
5527
3e572f71
PA
55282015-03-04 Pedro Alves <palves@redhat.com>
5529
72f4393d 5530 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
5531 Decide whether a breakpoint triggered based on the SIGTRAP's
5532 siginfo.si_code.
72f4393d
L
5533 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5534 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
5535 (linux_low_filter_event): Check for breakpoints before checking
5536 watchpoints.
5537 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5538 siginfo.si_code.
72f4393d
L
5539 (linux_stopped_by_sw_breakpoint)
5540 (linux_supports_stopped_by_sw_breakpoint)
5541 (linux_stopped_by_hw_breakpoint)
5542 (linux_supports_stopped_by_hw_breakpoint): New functions.
5543 (linux_target_ops): Install new target methods.
3e572f71 5544
1ec68e26
PA
55452015-03-04 Pedro Alves <palves@redhat.com>
5546
5547 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5548 * server.c (swbreak_feature, hwbreak_feature): New globals.
5549 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5550 (captured_main): Clear swbreak_feature and hwbreak_feature.
5551 * server.h (swbreak_feature, hwbreak_feature): Declare.
5552 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5553 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5554 supports_stopped_by_hw_breakpoint>: New fields.
5555 (target_supports_stopped_by_sw_breakpoint)
5556 (target_stopped_by_sw_breakpoint)
5557 (target_supports_stopped_by_hw_breakpoint)
5558 (target_stopped_by_hw_breakpoint): Declare.
5559
15c66dd6
PA
55602015-03-04 Pedro Alves <palves@redhat.com>
5561
5562 enum lwp_stop_reason -> enum target_stop_reason
5563 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5564 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5565 (linux_wait_1, stuck_in_jump_pad_callback)
5566 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5567 (linux_stopped_by_watchpoint):
5568 * linux-low.h (enum lwp_stop_reason): Delete.
5569 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5570 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5571
98fc70d6
YQ
55722015-03-04 Yao Qi <yao.qi@linaro.org>
5573
5574 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5575
dd2ac174
GB
55762015-03-03 Gary Benson <gbenson@redhat.com>
5577
5578 * hostio.c (handle_vFile): Fix prefix lengths.
5579
d68e53f4
MM
55802015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5581
5582 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5583 ptr_bits.
5584
bf2d68ab
AA
55852015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5586
5587 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5588 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5589 (clean): Add "rm -f" for above C files.
5590 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5591 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5592 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5593 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5594 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5595 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5596 (init_registers_s390x_vx_linux64)
5597 (init_registers_s390x_tevx_linux64)
5598 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5599 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5600 declarations.
5601 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5602 (s390_store_vxrs_high): New functions.
5603 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5604 NT_S390_VXRS_HIGH.
5605 (s390_arch_setup): Add logic for selecting one of the new target
5606 descriptions. Activate the new vector regsets if applicable.
5607 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5608 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5609 and init_registers_s390x_tevx_linux64.
5610
c966a859
PA
56112015-03-01 Pedro Alves <palves@redhat.com>
5612
5613 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5614 parameter.
5615
4180215b
PA
56162015-02-27 Pedro Alves <palves@redhat.com>
5617
5618 * linux-x86-low.c (u_debugreg_offset): New function.
5619 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5620
749bab01
PA
56212015-02-27 Pedro Alves <palves@redhat.com>
5622
5623 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5624 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5625 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5626 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5627 (ps_lsetfpregs, ps_getpid)
5628 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5629 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5630 (ps_lsetxregs, ps_plog): Declare.
5631
3c14e5a3
PA
56322015-02-27 Pedro Alves <palves@redhat.com>
5633
5634 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5635 IP_AGENT_EXPORT_FUNC.
5636 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5637 IP_AGENT_EXPORT_FUNC.
5638 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5639 (IP_AGENT_EXPORT): Delete.
5640 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5641 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5642 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5643 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5644 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5645 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5646 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5647 (traceframe_read_count, traceframe_write_count)
5648 (traceframes_created, trace_state_variables, get_raw_reg)
5649 (get_trace_state_variable_value, set_trace_state_variable_value)
5650 (ust_loaded, helper_thread_id, cmd_buf): Use
5651 IPA_SYM_EXPORTED_NAME.
5652 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5653 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5654 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5655 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5656 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5657 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5658 EXTERN_C_PUSH/EXTERN_C_POP.
5659 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5660 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5661 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5662 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5663 (traceframe_write_count, traceframe_read_count)
5664 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5665 (about_to_request_buffer_space, get_trace_state_variable_value)
5666 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5667 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5668 EXTERN_C_PUSH/EXTERN_C_POP.
5669 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5670 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5671 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5672 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5673 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5674 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5675 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5676 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5677 Define.
5678 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5679 (IP_AGENT_EXPORT_VAR_DECL): Define.
5680 (tracing): Declare.
5681 (gdb_agent_get_raw_reg): Declare.
5682
fe978cb0
PA
56832015-02-27 Tom Tromey <tromey@redhat.com>
5684 Pedro Alves <palves@redhat.com>
5685
5686 Rename symbols whose names are reserved C++ keywords throughout.
5687
3bc3d82a
PA
56882015-02-27 Pedro Alves <palves@redhat.com>
5689
5690 * Makefile.in (COMPILER): New, get it from autoconf.
5691 (CXX): Get from autoconf instead.
5692 (COMPILE.pre): Use COMPILER.
5693 (CC-LD): Rename to ...
5694 (CC_LD): ... this. Use COMPILER.
5695 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5696 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5697 * acinclude.m4: Include build-with-cxx.m4.
5698 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5699 Disable -Werror by default if building in C++ mode.
5700 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5701 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5702 the C++ compiler. Save/restore CXXFLAGS too.
5703 * configure: Regenerate.
5704
07697489
PA
57052015-02-27 Pedro Alves <palves@redhat.com>
5706
5707 * acinclude.m4: Include libiberty.m4.
5708 * configure.ac: Call libiberty_INIT.
5709 * config.in, configure: Regenerate.
5710
9beb7c4e
PA
57112015-02-26 Pedro Alves <palves@redhat.com>
5712
5713 * linux-low.c (linux_wait_1): When incrementing the PC past a
5714 program breakpoint always use the_low_target.breakpoint_len as
5715 increment, rather than the maximum between that and
5716 the_low_target.decr_pc_after_break.
5717
8090aef2
PA
57182015-02-23 Pedro Alves <palves@redhat.com>
5719
5720 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5721 thread was doing a step-over; always adjust the PC if
5722 we stepped over a permanent breakpoint.
5723 (linux_wait_1): If we stepped over breakpoint that was on top of a
5724 permanent breakpoint, manually advance the PC past it.
5725
bc9540e8
PA
57262015-02-23 Pedro Alves <palves@redhat.com>
5727
5728 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5729 modes.
5730 (x86_fill_gregset, x86_store_gregset): Use it when handling
5731 $orig_eax.
5732
2db9a427
PA
57332015-02-20 Pedro Alves <palves@redhat.com>
5734
5735 * thread-db.c: Include "nat/linux-procfs.h".
5736 (thread_db_init): Skip listing new threads if the kernel supports
5737 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5738
afa8d396
PA
57392015-02-20 Pedro Alves <palves@redhat.com>
5740
5741 * linux-low.c (status_pending_p_callback): Use ptid_match.
5742
c9587f88
AT
57432015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5744
5745 PR breakpoints/16812
5746 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5747 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5748 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5749
b05ec7a5
AT
57502015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5751
5752 PR breakpoints/15956
5753 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5754
d33501a5
MM
57552015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5756
5757 * linux-low.c (linux_low_btrace_conf): Print size.
5758 * server.c (handle_btrace_conf_general_set): New.
5759 (hanle_general_set): Call handle_btrace_conf_general_set.
5760 (handle_query): Report Qbtrace-conf:bts:size as supported.
5761
f4abbc16
MM
57622015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5763
5764 * linux-low.c (linux_low_enable_btrace): Update parameters.
5765 (linux_low_btrace_conf): New.
5766 (linux_target_ops)<to_btrace_conf>: Initialize.
5767 * server.c (current_btrace_conf): New.
5768 (handle_btrace_enable): Rename to ...
5769 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5770 to target_enable_btrace. Update comment. Update users.
5771 (handle_qxfer_btrace_conf): New.
5772 (qxfer_packets): Add btrace-conf entry.
5773 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5774 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5775 (target_ops)<read_btrace_conf>: New.
5776 (target_enable_btrace): Update parameters.
5777 (target_read_btrace_conf): New.
5778
043c3577
MM
57792015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5780
5781 * server.c (handle_btrace_general_set): Remove call to
5782 target_supports_btrace.
5783 (supported_btrace_packets): New.
5784 (handle_query): Call supported_btrace_packets.
5785 * target.h: include btrace-common.h.
5786 (btrace_target_info): Removed.
5787 (supports_btrace, target_supports_btrace): Update parameters.
5788
734b0e4b
MM
57892015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5790
5791 * Makefile.in (SFILES): Add common/btrace-common.c.
5792 (OBS): Add common/btrace-common.o.
5793 (btrace-common.o): Add build rules.
5794 * linux-low: Include btrace-common.h.
5795 (linux_low_read_btrace): Use struct btrace_data. Call
5796 btrace_data_init and btrace_data_fini.
5797
d6c146e9
PA
57982015-02-06 Pedro Alves <palves@redhat.com>
5799
5800 * thread-db.c (find_new_threads_callback): Add debug output.
5801
20ba1ce6
PA
58022015-02-04 Pedro Alves <palves@redhat.com>
5803
5804 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5805 (resume_stopped_resumed_lwps): New function.
5806 (linux_wait_for_event_filtered): Use it.
5807
8cc73a39
SDJ
58082015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5809
5810 * Makefile.in (SFILES): Add linux-personality.c.
5811 (linux-personality.o): New rule.
5812 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5813 list of objects to be built.
5814 * linux-low.c: Include nat/linux-personality.h.
5815 (linux_create_inferior): Remove code to disable address space
5816 randomization (moved to ../nat/linux-personality.c). Create
5817 cleanup to disable address space randomization.
5818
fb23d554
SDJ
58192015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5820
5821 * Makefile.in (posix-strerror.o): New rule.
5822 (mingw-strerror.o): Likewise.
5823 * configure: Regenerated.
5824 * configure.ac: Source file ../common/common.host. Initialize new
5825 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5826
cdf43629
YQ
58272015-01-14 Yao Qi <yao@codesourcery.com>
5828
5829 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5830 (ppc-linux.o): New rule.
5831 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5832 * configure.ac: AC_CHECK_FUNCS(getauxval).
5833 * config.in: Re-generated.
5834 * configure: Re-generated.
5835 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5836 ppc64_64bit_inferior_p
5837
514c5338
YQ
58382015-01-14 Yao Qi <yao@codesourcery.com>
5839
5840 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5841 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5842 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5843 (PT_ORIG_R3, PT_TRAP): Likewise.
5844 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5845 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5846 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5847
3368c1e5
JB
58482015-01-10 Joel Brobecker <brobecker@adacore.com>
5849
5850 * i387-fp.c (i387_cache_to_xsave): In look over
5851 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5852 zmmh_low_space field by use of zmmh_high_space.
5853
582511be
PA
58542015-01-09 Pedro Alves <palves@redhat.com>
5855
5856 * linux-low.c (step_over_bkpt): Move higher up in the file.
5857 (handle_extended_wait): Don't store the stop_pc here.
5858 (get_stop_pc): Adjust comments and rename to ...
5859 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5860 stopped for a software breakpoint or hardware breakpoint.
5861 (thread_still_has_status_pending_p): New function.
5862 (status_pending_p_callback): Use
5863 thread_still_has_status_pending_p. If the event is no longer
5864 interesting, resume the LWP.
5865 (handle_tracepoints): Add assert.
5866 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5867 (wstatus_maybe_breakpoint): New function.
5868 (cancel_breakpoint): Delete function.
5869 (check_stopped_by_watchpoint): New function, factored out from
5870 linux_low_filter_event.
5871 (lp_status_maybe_breakpoint): Delete function.
5872 (linux_low_filter_event): Remove filter_ptid argument.
5873 Leave thread group exits pending here. Store the LWP's stop PC.
5874 Always leave events pending.
5875 (linux_wait_for_event_filtered): Pull all events out of the
5876 kernel, and leave them all pending.
5877 (count_events_callback, select_event_lwp_callback): Consider all
5878 events.
5879 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5880 (select_event_lwp): Only give preference to the stepping LWP in
5881 all-stop mode. Adjust comments.
5882 (ignore_event): New function.
5883 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5884 references to cancel_breakpoints. Adjust to renames. Also give
5885 equal priority to all LWPs that have had events in non-stop mode.
5886 If reporting a software breakpoint event, unadjust the LWP's PC.
5887 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5888 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5889 Adjust.
5890 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5891 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5892 (linux_stopped_by_watchpoint): Adjust.
5893 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5894 * linux-low.h (enum lwp_stop_reason): New.
5895 (struct lwp_info) <stop_pc>: Adjust comment.
5896 <stopped_by_watchpoint>: Delete field.
5897 <stop_reason>: New field.
5898 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5899 * mem-break.c (software_breakpoint_inserted_here)
5900 (hardware_breakpoint_inserted_here): New function.
5901 * mem-break.h (software_breakpoint_inserted_here)
5902 (hardware_breakpoint_inserted_here): Declare.
5903 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5904 (cancel_breakpoints): Delete.
5905 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5906 (upload_fast_traceframes): Remove references to
5907 cancel_breakpoints.
5908
a33e3959
PA
59092015-01-09 Pedro Alves <palves@redhat.com>
5910
5911 * thread-db.c (find_new_threads_callback): Ignore thread if the
5912 kernel thread ID is -1.
5913
8784d563
PA
59142015-01-09 Pedro Alves <palves@redhat.com>
5915
5916 * linux-low.c (linux_attach_fail_reason_string): Move to
5917 nat/linux-ptrace.c, and rename.
5918 (linux_attach_lwp): Update comment.
5919 (attach_proc_task_lwp_callback): New function.
5920 (linux_attach): Adjust to rename and use
5921 linux_proc_attach_tgid_threads.
5922 (linux_attach_fail_reason_string): Delete declaration.
5923
76f2b779
JB
59242015-01-01 Joel Brobecker <brobecker@adacore.com>
5925
5926 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5927 * server.c (gdbserver_version): Likewise.
5928
fafcc06a
SDJ
59292014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5930
5931 * remote-utils.c: Include ctype.h.
5932 (input_interrupt): Explicitly handle the case when the char
5933 received is the NUL byte. Improve the printing of non-ASCII
5934 characters.
5935
beed38b8
JB
59362014-12-16 Joel Brobecker <brobecker@adacore.com>
5937
5938 * linux-low.c (linux_low_filter_event): Update call to
5939 linux_enable_event_reporting following the addition of
5940 a new parameter to that function.
5941
bf330350
CU
59422014-12-16 Catalin Udma <catalin.udma@freescale.com>
5943
5944 PR server/17457
5945 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5946 (AARCH64_FPCR_REGNO): Likewise.
5947 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5948 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5949 (aarch64_store_fpregset): Likewise.
5950
5227d625
JB
59512014-12-15 Joel Brobecker <brobecker@adacore.com>
5952
5953 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5954 Remove FIXME comment about assumption about N.
5955
f93b65a0
JB
59562014-12-13 Joel Brobecker <brobecker@adacore.com>
5957
5958 * configure.ac: If large-file support is disabled in GDBserver,
5959 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5960 * configure: Regenerate.
5961
e5a9158d
AA
59622014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5963
5964 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5965 warning upon ENODATA from ptrace.
5966 * linux-s390-low.c (s390_store_tdb): New.
5967 (s390_regsets): Add regset for NT_S390_TDB.
5968
feea5f36
AA
59692014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5970
5971 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5972 without a fill_function.
5973 * linux-s390-low.c (s390_fill_last_break): Remove.
5974 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5975 (s390_arch_setup): Use regset's size instead of fill_function for
5976 loop end condition.
5977
098dbe61
AA
59782014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5979
5980 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5981 the regset's store function when ptrace returned an error.
5982 * regcache.c (get_thread_regcache): Invalidate register cache
5983 before fetching inferior's registers.
5984
28eef672
AA
59852014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5986
5987 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5988 while-loop as for-loop.
5989 (regsets_store_inferior_registers): Likewise.
5990
bdca27a2
YQ
59912014-11-28 Yao Qi <yao@codesourcery.com>
5992
5993 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5994 * config.in, configure: Re-generate.
5995 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5996 is defined.
5997
9c232dda
YQ
59982014-11-21 Yao Qi <yao@codesourcery.com>
5999
6000 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6001 (AC_CHECK_HEADERS): Remove malloc.h.
6002 * configure: Re-generated.
6003 * config.in: Re-generated.
6004 * server.h: Don't include alloca.h and malloc.h.
6005 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6006 Don't include malloc.h.
6007
43968415
JB
60082014-11-17 Joel Brobecker <brobecker@adacore.com>
6009
6010 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6011 corresponding ERRNO check in same block.
6012
40e91bc7
PA
60132014-11-12 Pedro Alves <palves@redhat.com>
6014
6015 * server.c (cont_thread): Update comment.
6016 (start_inferior, attach_inferior): No longer clear cont_thread.
6017 (handle_v_cont): No longer set cont_thread.
6018 (captured_main): Clear cont_thread each time a GDB connects.
6019
c2c118cf
PA
60202014-11-12 Pedro Alves <palves@redhat.com>
6021
6022 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6023 thread, and don't resume all threads if the Hc thread has exited.
6024
78708b7c
PA
60252014-11-12 Pedro Alves <palves@redhat.com>
6026
6027 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6028 the process group instead of to a specific LWP.
6029
a2abc7de
PA
60302014-10-15 Pedro Alves <palves@redhat.com>
6031
6032 PR server/17487
6033 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6034 parameter.
6035 (arm_set_thread_context): Delete.
6036 (the_low_target): Adjust.
6037 * win32-i386-low.c (debug_registers_changed)
6038 (debug_registers_used): Delete.
6039 (update_debug_registers_callback): New function.
6040 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6041 needing to update their debug registers.
6042 (win32_get_current_dr): New function.
6043 (x86_dr_low_get_addr, x86_dr_low_get_control)
6044 (x86_dr_low_get_status): Fetch the debug register from the thread
6045 record's context.
6046 (i386_initial_stuff): Adjust.
6047 (i386_get_thread_context): Remove current_event parameter. Don't
6048 clear debug_registers_changed nor copy DR values to
6049 debug_reg_state.
6050 (i386_set_thread_context): Delete.
6051 (i386_prepare_to_resume): New function.
6052 (i386_thread_added): Mark the thread as needing to update irs
6053 debug registers.
6054 (the_low_target): Remove i386_set_thread_context and install
6055 i386_prepare_to_resume.
6056 * win32-low.c (win32_get_thread_context): Adjust.
6057 (win32_set_thread_context): Use SetThreadContext
6058 directly.
6059 (win32_prepare_to_resume): New function.
6060 (win32_require_context): New function, factored out from ...
6061 (thread_rec): ... this.
6062 (continue_one_thread): Call win32_prepare_to_resume on each thread
6063 we're about to continue.
6064 (win32_resume): Call win32_prepare_to_resume on the event thread.
6065 * win32-low.h (struct win32_thread_info)
6066 <debug_registers_changed>: New field.
6067 (struct win32_target_ops): Change prototype of set_thread_context,
6068 delete set_thread_context and add prepare_to_resume.
6069 (win32_require_context): New declaration.
6070
a442d071
GB
60712014-10-08 Gary Benson <gbenson@redhat.com>
6072
6073 * server.h: Do not include common-exceptions.h.
6074
6f1947e8
GB
60752014-10-08 Gary Benson <gbenson@redhat.com>
6076
6077 * server.h: Do not include cleanups.h.
6078
63b434a4
JH
60792014-09-30 James Hogan <james.hogan@imgtec.com>
6080
6081 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6082 mips64-dsp-linux.c.
6083
c4d9ceb6
YQ
60842014-09-23 Yao Qi <yao@codesourcery.com>
6085
6086 * linux-low.c (lp_status_maybe_breakpoint): New function.
6087 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6088 (count_events_callback): Likewise.
6089 (select_event_lwp_callback): Likewise.
6090 (cancel_breakpoints_callback): Likewise.
6091
89a5711c
DB
60922014-09-19 Don Breazeal <donb@codesourcery.com>
6093
6094 * linux-low.c (handle_extended_wait): Call
6095 linux_ptrace_get_extended_event.
6096 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6097 linux_is_extended_waitstatus.
6098
bffc0964
JB
60992014-09-16 Joel Brobecker <brobecker@adacore.com>
6100
6101 * Makefile.in (CPPFLAGS): Define.
6102 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6103 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6104
0bfdf32f
GB
61052014-09-16 Gary Benson <gbenson@redhat.com>
6106
6107 * inferiors.h (current_inferior): Renamed as...
6108 (current_thread): New variable. All uses updated.
6109 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6110 (maybe_move_out_of_jump_pad): Likewise.
6111 (cancel_breakpoint): Likewise.
6112 (linux_low_filter_event): Likewise.
6113 (wait_for_sigstop): Likewise.
6114 (linux_resume_one_lwp): Likewise.
6115 (need_step_over_p): Likewise.
6116 (start_step_over): Likewise.
6117 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6118 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6119 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6120 and save_inferior as saved_thread.
6121 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6122 saved_thread.
6123 (regcache_invalidate_thread): Likewise.
6124 * remote-utils.c (prepare_resume_reply): Likewise.
6125 * thread-db.c (thread_db_get_tls_address): Likewise.
6126 (disable_thread_event_reporting): Likewise.
6127 (remove_thread_event_breakpoints): Likewise.
6128 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6129 as saved_thread.
6130 * target.h (set_desired_inferior): Renamed as...
6131 (set_desired_thread): New declaration. All uses updated.
6132 * server.c (myresume): Updated comment to reference thread instead
6133 of inferior.
6134 (handle_serial_event): Likewise.
6135 (handle_target_event): Likewise.
6136
361c8ade
GB
61372014-09-12 Tom Tromey <tromey@redhat.com>
6138 Gary Benson <gbenson@redhat.com>
6139
6140 * regcache.h: Include common-regcache.h.
6141 (regcache_read_pc): Don't declare.
6142 * regcache.c (get_thread_regcache_for_ptid): New function.
6143
bd9269f7
GB
61442014-09-11 Tom Tromey <tromey@redhat.com>
6145 Gary Benson <gbenson@redhat.com>
6146
6147 * symbol.c: New file.
6148 * Makefile.in (SFILES): Add symbol.c.
6149 (OBS): Add symbol.o.
6150
f8c1d06b
GB
61512014-09-11 Gary Benson <gbenson@redhat.com>
6152
6153 * target.c (target_stop_ptid, target_continue_ptid): New
6154 functions.
6155
721ec300
GB
61562014-09-11 Tom Tromey <tromey@redhat.com>
6157 Gary Benson <gbenson@redhat.com>
6158
6159 * target.h: Include target/target.h.
6160 * target.c (target_read_memory, target_read_uint32)
6161 (target_write_memory): New functions.
6162
c5e92cca
GB
61632014-09-11 Gary Benson <gbenson@redhat.com>
6164
6165 * server.h (debug_hw_points): Don't declare.
6166 * server.c (debug_hw_points): Don't define. Replace all uses
6167 with show_debug_regs.
6168 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6169 all uses with show_debug_regs.
6170
2e4bb98a
EBM
61712014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6172
6173 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6174 endianness into account.
6175 (ppc_supply_ptrace_register): Likewise.
6176
ac740bc7
JH
61772014-09-03 James Hogan <james.hogan@imgtec.com>
6178
6179 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6180 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6181
97ea6506
GB
61822014-09-03 Gary Benson <gbenson@redhat.com>
6183
6184 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6185 ALL_DEBUG_ADDRESS_REGISTERS.
6186
df7e5265
GB
61872014-09-02 Gary Benson <gbenson@redhat.com>
6188
6189 * i386-low.h: Renamed as...
6190 * x86-low.h: New file. All type, function and variable name
6191 prefixes changed from "i386_" to "x86_". All references updated.
6192 * i386-low.c: Renamed as...
6193 * x86-low.c: New file. All type, function and variable name
6194 prefixes changed from "i386_" to "x86_". All references updated.
6195
ed859da7
GB
61962014-09-02 Gary Benson <gbenson@redhat.com>
6197
6198 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6199 (x86_linux_new_thread): Likewise.
6200
860789c7
GB
62012014-08-29 Gary Benson <gbenson@redhat.com>
6202
6203 * server.h (setjmp.h): Do not include.
6204 (toplevel): Do not declare.
6205 (common-exceptions.h): Include.
6206 (cleanups.h): Likewise.
6207 * server.c (toplevel): Do not define.
6208 (exit_code): New static global.
6209 (detach_or_kill_for_exit_cleanup): New function.
6210 (main): New function. Original main renamed to...
6211 (captured_main): New function.
6212 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6213
ff55e1b5
GB
62142014-08-29 Gary Benson <gbenson@redhat.com>
6215
6216 * Makefile.in (SFILES): Add common/common-exceptions.c.
6217 (OBS): Add common-exceptions.o.
6218 (common-exceptions.o): New rule.
6219 * utils.c (prepare_to_throw_exception): New function.
6220
e9bcb658
GB
62212014-08-29 Gary Benson <gbenson@redhat.com>
6222
6223 * config.in: Regenerate.
6224 * configure: Likewise.
6225
e3180625
GB
62262014-08-29 Gary Benson <gbenson@redhat.com>
6227
6228 * Makefile.in (SFILES): Add common/cleanups.c.
6229 (OBS): cleanups.o.
6230 (cleanups.o): New rule.
6231
e3d6ba5d
GB
62322014-08-29 Gary Benson <gbenson@redhat.com>
6233
6234 * utils.c (internal_vwarning): New function.
6235
7096e886
GB
62362014-08-28 Gary Benson <gbenson@redhat.com>
6237
6238 * utils.h (fatal): Remove declaration.
6239 * utils.c (fatal): Remove function.
6240
14ce3192
GB
62412014-08-28 Gary Benson <gbenson@redhat.com>
6242
6243 * tracepoint.c (gdb_agent_init): Replace fatal with
6244 perror_with_name.
6245 (initialize_tracepoint): Likewise.
6246
50278d59
GB
62472014-08-28 Gary Benson <gbenson@redhat.com>
6248
6249 * remote-utils.c (remote_prepare): Replace fatal with error.
6250
aa96c426
GB
62512014-08-28 Gary Benson <gbenson@redhat.com>
6252
6253 * linux-low.c (linux_async): Replace fatal with warning.
6254 Tidy up and return.
6255 (linux_start_non_stop): Return -1 if linux_async failed.
6256
f7160e97
GB
62572014-08-28 Gary Benson <gbenson@redhat.com>
6258
6259 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6260 gdb_assert.
6261 (i386_dr_low_get_addr): Remove vague comment.
6262 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6263 gdb_assert.
6264
38e08fca
GB
62652014-08-28 Gary Benson <gbenson@redhat.com>
6266
6267 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6268 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6269 internal_error.
6270 (linux_resume_one_lwp): Likewise.
6271 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6272 gdb_assert.
6273 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6274 with internal_error.
6275 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6276 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6277 (find_register_by_name): Replace fatal with internal_error.
6278 (find_regno): Likewise.
6279 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6280 * thread-db.c (thread_db_create_event): Likewise.
6281 (thread_db_load_search): Likewise.
6282 (try_thread_db_load_1): Likewise.
6283 * tracepoint.c (get_jump_space_head): Replace fatal with
6284 internal_error.
6285 (claim_trampoline_space): Likewise.
6286 (have_fast_tracepoint_trampoline_buffer): Likewise.
6287 (cmd_qtstart): Likewise.
6288 (stop_tracing): Likewise.
6289 (fast_tracepoint_collecting): Likewise.
6290 (target_malloc): Likewise.
6291 (download_tracepoint): Likewise.
6292 (download_trace_state_variables): Replace check with gdb_assert.
6293 (upload_fast_traceframes): Replace fatal with internal_error.
6294
34abf635
GB
62952014-08-19 Tom Tromey <tromey@redhat.com>
6296 Gary Benson <gbenson@redhat.com>
6297
6298 * Makefile.in (SFILES): Add common/common-debug.c.
6299 (OBS): Add common-debug.o.
6300 (common-debug.o): New rule.
6301 * debug.h (debug_printf): Don't declare.
6302 * debug.c (debug_printf): Renamed and rewritten as...
6303 (debug_vprintf): New function.
6304
f6e94d78
GB
63052014-08-19 Gary Benson <gbenson@redhat.com>
6306
6307 * utils.h: Do not include print-utils.h.
6308
9239eeab
GB
63092014-08-19 Tom Tromey <tromey@redhat.com>
6310 Gary Benson <gbenson@redhat.com>
6311
6312 * server.h: Add static assertion.
6313 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6314
ef87c8bb
GB
63152014-08-19 Tom Tromey <tromey@redhat.com>
6316 Gary Benson <gbenson@redhat.com>
6317
6318 * Makefile.in (SFILES): Add common/errors.c.
6319 (OBS): Add errors.o.
6320 (IPA_OBS): Add errors-ipa.o.
6321 (errors.o): New rule.
6322 (errors-ipa.o): Likewise.
6323 * utils.h (perror_with_name, error, warning): Don't declare.
6324 * utils.c (warning): Renamed and rewritten as...
6325 (vwarning): New function.
6326 (error): Renamed and rewritten as...
6327 (verror): New function.
6328 (internal_error): Renamed and rewritten as...
6329 (internal_verror): New function.
6330
bb974a24
GB
63312014-08-07 Gary Benson <gbenson@redhat.com>
6332
6333 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6334 * configure: Regenerate.
6335 * config.in: Likewise.
6336 * server.h: Do not include errno.h.
6337 * event-loop.c: Likewise.
6338 * hostio-errno.c: Likewise.
6339 * linux-low.c: Likewise.
6340 * remote-utils.c: Likewise.
6341 * spu-low.c: Likewise.
6342 * utils.c: Likewise.
6343 * gdbreplay.c: Unconditionally include errno.h.
6344
6d3d12eb
GB
63452014-08-07 Gary Benson <gbenson@redhat.com>
6346
6347 * server.h: Do not include string.h.
6348 * event-loop.c: Likewise.
6349 * linux-low.c: Likewise.
6350 * regcache.c: Likewise.
6351 * remote-utils.c: Likewise.
6352 * spu-low.c: Likewise.
6353 * utils.c: Likewise.
6354
dccbb609
GB
63552014-08-07 Gary Benson <gbenson@redhat.com>
6356
6357 * server.h: Do not include gdb_assert.h.
6358
e76df0d0
GB
63592014-08-07 Gary Benson <gbenson@redhat.com>
6360
6361 * server.h: Do not include common-utils.h.
6362
4cb9c816
GB
63632014-08-07 Gary Benson <gbenson@redhat.com>
6364
6365 * server.h: Do not include ptid.h.
6366 * notif.h: Likewise.
6367
3995eeee
GB
63682014-08-07 Gary Benson <gbenson@redhat.com>
6369
6370 * server.h: Do not include gdb_locale.h.
6371
cb9f1a9b
GB
63722014-08-07 Gary Benson <gbenson@redhat.com>
6373
6374 * server.h: Do not include gdb/signals.h.
6375 * win32-low.c: Likewise.
6376
a5fceff8
GB
63772014-08-07 Gary Benson <gbenson@redhat.com>
6378
6379 * server.h: Do not include pathmax.h.
6380
b9391142
GB
63812014-08-07 Gary Benson <gbenson@redhat.com>
6382
6383 * server.h: Do not include libiberty.h.
6384 * linux-bfin-low.c: Likewise.
6385
0e443c87
GB
63862014-08-07 Gary Benson <gbenson@redhat.com>
6387
6388 * server.h: Do not include ansidecl.h.
6389
8ebb3f56
GB
63902014-08-07 Gary Benson <gbenson@redhat.com>
6391
6392 * linux-x86-low.c: Do not include stddef.h.
6393 * lynx-ppc-low.c: Likewise.
6394 * tracepoint.c: Likewise.
6395
8980bdf6
GB
63962014-08-07 Gary Benson <gbenson@redhat.com>
6397
6398 * server.h: Do not include stdarg.h.
6399 * nto-low.c: Likewise.
6400
d7096f71
GB
64012014-08-07 Gary Benson <gbenson@redhat.com>
6402
6403 * server.h: Do not include stdlib.h.
6404 * inferiors.c: Likewise.
6405 * linux-low.c: Likewise.
6406 * regcache.c: Likewise.
6407 * spu-low.c: Likewise.
6408 * tracepoint.c: Likewise.
6409 * utils.c: Likewise.
6410
d02f550d
GB
64112014-08-07 Gary Benson <gbenson@redhat.com>
6412
6413 * server.h: Do not include stdio.h.
6414 * linux-low.c: Likewise.
6415 * remote-utils.c: Likewise.
6416 * spu-low.c: Likewise.
6417 * utils.c: Likewise.
6418 * wincecompat.c: Likewise.
6419
87f6c4e3
GB
64202014-08-06 Gary Benson <gbenson@redhat.com>
6421
6422 * regcache.c (init_register_cache): Move conditionals inside if.
6423
7089dca4
GB
64242014-08-06 Gary Benson <gbenson@redhat.com>
6425
6426 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6427
462f517e
GB
64282014-07-31 Gary Benson <gbenson@redhat.com>
6429
6430 * ax.h: Do not include server.h.
6431 * gdbthread.h: Likewise.
6432 * lynx-low.h: Likewise.
6433 * notif.h: Likewise.
6434
976411d6
GB
64352014-07-30 Gary Benson <gbenson@redhat.com>
6436
6437 * server.h: Include common-defs.h.
6438 Do not include config.h or build-gnulib-gdbserver/config.h.
6439
d41f6d8e
GB
64402014-07-30 Gary Benson <gbenson@redhat.com>
6441
6442 * hostio-errno.c: Move server.h to top of includes list.
6443 * inferiors.c: Likewise.
6444 * linux-x86-low.c: Likewise.
6445 * notif.c: Include server.h.
6446
314c6a35
TT
64472014-07-24 Tom Tromey <tromey@redhat.com>
6448 Gary Benson <gbenson@redhat.com>
6449
6450 * server.h (CORE_ADDR): Now unsigned.
6451
69ff6be5
PA
64522014-07-16 Pedro Alves <palves@redhat.com>
6453
6454 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6455
ce9e3fe7
PA
64562014-07-15 Pedro Alves <palves@redhat.com>
6457
6458 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6459 copy.
6460
e76126e8
PA
64612014-07-11 Pedro Alves <palves@redhat.com>
6462
6463 * linux-low.c (kill_wait_lwp): New function, based on
6464 kill_one_lwp_callback, but use my_waitpid directly.
6465 (kill_one_lwp_callback, linux_kill): Use it.
6466
8e9db26e
PA
64672014-06-23 Pedro Alves <palves@redhat.com>
6468
6469 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6470 before setting DR0..DR3.
6471
698b3e08
GB
64722014-06-20 Gary Benson <gbenson@redhat.com>
6473
6474 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6475 * configure: Regenerated.
6476 * config.in: Likewise.
6477
125f8a3d
GB
64782014-06-20 Gary Benson <gbenson@redhat.com>
6479
6480 * Makefile.in (SFILES): Update locations for files moved
6481 from common to nat.
6482 (object file files): Reordered.
6483
42995dbd
GB
64842014-06-20 Gary Benson <gbenson@redhat.com>
6485
6486 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6487 (i386_dr_low_set_addr): Likewise.
6488 (i386_dr_low_get_addr): Likewise.
6489 (i386_dr_low_can_set_control): Likewise.
6490 (i386_dr_low_set_control): Likewise.
6491 (i386_dr_low_get_control): Likewise.
6492 (i386_dr_low_get_status): Likewise.
6493 (i386_get_debug_register_length): Likewise.
6494 * linux-x86-low.c (i386_dr_low_set_addr):
6495 Changed signature. Made static.
6496 (i386_dr_low_get_addr): Likewise.
6497 (i386_dr_low_set_control): Likewise.
6498 (i386_dr_low_get_control): Likewise.
6499 (i386_dr_low_get_status): Likewise.
6500 (i386_dr_low): New global variable.
6501 * win32-i386-low.c (i386_dr_low_set_addr):
6502 Changed signature. Made static.
6503 (i386_dr_low_get_addr): Likewise.
6504 (i386_dr_low_set_control): Likewise.
6505 (i386_dr_low_get_control): Likewise.
6506 (i386_dr_low_get_status): Likewise.
6507 (i386_dr_low): New global variable.
6508
e1d2394b
MS
65092014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6510
6511 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6512 * Makefile.in (AR, AR_FLAGS): Define.
6513 * configure: Regenerate.
6514
3a8ee006
GB
65152014-06-19 Gary Benson <gbenson@redhat.com>
6516
6517 * Makefile.in (i386-dregs.o): New rule.
6518 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6519 * i386-low.c (target.h): Remove include.
6520 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6521 (DR_CONTROL_SHIFT): Likewise.
6522 (DR_CONTROL_SIZE): Likewise.
6523 (DR_RW_EXECUTE): Likewise.
6524 (DR_RW_WRITE): Likewise.
6525 (DR_RW_READ): Likewise.
6526 (DR_RW_IORW): Likewise.
6527 (DR_LEN_1): Likewise.
6528 (DR_LEN_2): Likewise.
6529 (DR_LEN_4): Likewise.
6530 (DR_LEN_8): Likewise.
6531 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6532 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6533 (DR_ENABLE_SIZE): Likewise.
6534 (DR_LOCAL_SLOWDOWN): Likewise.
6535 (DR_GLOBAL_SLOWDOWN): Likewise.
6536 (DR_CONTROL_RESERVED): Likewise.
6537 (I386_DR_CONTROL_MASK): Likewise.
6538 (I386_DR_VACANT): Likewise.
6539 (I386_DR_LOCAL_ENABLE): Likewise.
6540 (I386_DR_GLOBAL_ENABLE): Likewise.
6541 (I386_DR_DISABLE): Likewise.
6542 (I386_DR_SET_RW_LEN): Likewise.
6543 (I386_DR_GET_RW_LEN): Likewise.
6544 (I386_DR_WATCH_HIT): Likewise.
6545 (i386_wp_op_t): Likewise.
6546 (i386_show_dr): Likewise.
6547 (i386_length_and_rw_bits): Likewise.
6548 (i386_insert_aligned_watchpoint): Likewise.
6549 (i386_remove_aligned_watchpoint): Likewise.
6550 (i386_handle_nonaligned_watchpoint): Likewise.
6551 i386_update_inferior_debug_regs(): Likewise.
6552 (i386_dr_insert_watchpoint): Likewise.
6553 (i386_dr_remove_watchpoint): Likewise.
6554 (i386_dr_region_ok_for_watchpoint): Likewise.
6555 (i386_dr_stopped_data_address): Likewise.
6556 (i386_dr_stopped_by_watchpoint): Likewise.
6557
8f26655c
GB
65582014-06-19 Gary Benson <gbenson@redhat.com>
6559
6560 * i386-low.c (i386_dr_show): Renamed to
6561 i386_show_dr and made static. All uses updated.
6562 (i386_dr_length_and_rw_bits): Renamed to
6563 i386_length_and_rw_bits and made static.
6564 All uses updated.
6565 (i386_dr_insert_aligned_watchpoint): Renamed to
6566 i386_insert_aligned_watchpoint and made static.
6567 All uses updated.
6568 (i386_dr_remove_aligned_watchpoint): Renamed to
6569 i386_remove_aligned_watchpoint and made static.
6570 All uses updated.
6571 (i386_dr_update_inferior_debug_regs): Renamed to
6572 i386_update_inferior_debug_regs and made static.
6573 All uses updated.
6574
b9228891
GB
65752014-06-18 Gary Benson <gbenson@redhat.com>
6576
5171def3
GB
6577 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6578 (i386_dr_low_can_set_control): Likewise.
6579 (i386_get_debug_register_length): Likewise.
6580 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6581 (i386_dr_low_can_set_control): Likewise.
6582 (i386_get_debug_register_length): Likewise.
6583
65842014-06-17 Gary Benson <gbenson@redhat.com>
6585
b9228891
GB
6586 * i386-low.h (i386-dregs.h): New include.
6587 (DR_FIRSTADDR): Now in i386-dregs.h.
6588 (DR_LASTADDR): Likewise.
6589 (DR_NADDR): Likewise.
6590 (DR_STATUS): Likewise.
6591 (DR_CONTROL): Likewise.
6592 (i386_debug_reg_state): Likewise.
6593 (i386_dr_insert_watchpoint): Likewise.
6594 (i386_dr_remove_watchpoint): Likewise.
6595 (i386_dr_region_ok_for_watchpoint): Likewise.
6596 (i386_dr_stopped_data_address): Likewise.
6597 (i386_dr_stopped_by_watchpoint): Likewise.
6598 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6599
4be83cc2
GB
66002014-06-18 Gary Benson <gbenson@redhat.com>
6601
6602 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6603 i386_dr_insert_watchpoint.
6604 (i386_low_remove_watchpoint): Renamed to
6605 i386_dr_remove_watchpoint.
6606 (i386_low_region_ok_for_watchpoint): Renamed to
6607 i386_dr_region_ok_for_watchpoint.
6608 (i386_low_stopped_data_address): Renamed to
6609 i386_dr_stopped_data_address.
6610 (i386_low_stopped_by_watchpoint): Renamed to
6611 i386_dr_stopped_by_watchpoint.
6612 * i386-low.c (i386_show_dr): Renamed to
6613 i386_dr_show and made nonstatic. All uses updated.
6614 (i386_length_and_rw_bits): Renamed to
6615 i386_dr_length_and_rw_bits and made nonstatic.
6616 All uses updated.
6617 (i386_insert_aligned_watchpoint): Renamed to
6618 i386_dr_insert_aligned_watchpoint and made nonstatic.
6619 All uses updated.
6620 (i386_remove_aligned_watchpoint): Renamed to
6621 i386_dr_remove_aligned_watchpoint and made nonstatic.
6622 All uses updated.
6623 (i386_update_inferior_debug_regs): Renamed to
6624 i386_dr_update_inferior_debug_regs and made nonstatic.
6625 All uses updated.
6626 (i386_low_insert_watchpoint): Renamed to
6627 i386_dr_insert_watchpoint. All uses updated.
6628 (i386_low_remove_watchpoint): Renamed to
6629 i386_dr_remove_watchpoint. All uses updated.
6630 (i386_low_region_ok_for_watchpoint): Renamed to
6631 i386_dr_region_ok_for_watchpoint. All uses updated.
6632 (i386_low_stopped_data_address): Renamed to
6633 i386_dr_stopped_data_address. All uses updated.
6634 (i386_low_stopped_by_watchpoint): Renamed to
6635 i386_dr_stopped_by_watchpoint. All uses updated.
6636
131aa0d4
GB
66372014-06-18 Gary Benson <gbenson@redhat.com>
6638
6639 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6640 (i386_dr_low_can_set_control): Likewise.
6641 (i386_insert_aligned_watchpoint): New check.
6642
d9305f7f
GB
66432014-06-18 Gary Benson <gbenson@redhat.com>
6644
6645 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6646 Renamed to state.
6647
e927c9fc
GB
66482014-06-18 Gary Benson <gbenson@redhat.com>
6649
6650 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6651 instead of fatal and error.
6652 (i386_handle_nonaligned_watchpoint): Likewise.
6653
1b6d4134
GB
66542014-06-18 Gary Benson <gbenson@redhat.com>
6655
6656 * i386-low.c (i386_get_debug_register_length): New macro.
6657 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6658 (i386_show_dr): Use debug_printf instead of fprintf. Use
6659 phex to format values.
6660
6e62758f
GB
66612014-06-18 Gary Benson <gbenson@redhat.com>
6662
6663 * i386-low.h: Comment changes.
6664 * i386-low.c: Likewise.
6665
fc6e2f03
GB
66662014-06-18 Gary Benson <gbenson@redhat.com>
6667
6668 * i386-low.c: Whitespace changes.
6669
f9d1eeed
TT
66702014-06-12 Tom Tromey <tromey@redhat.com>
6671
6672 * utils.c (freeargv): Remove.
6673
0b04e523
TT
66742014-06-12 Tom Tromey <tromey@redhat.com>
6675
6676 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6677 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6678 (parse_debug_format_options): Likewise.
6679 (gdbserver_usage): Likewise.
6680 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6681 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6682 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6683 against libiberty.
6684 ($(LIBGNU)): Depend on libiberty.
6685 (all-lib): Recurse into all subdirs.
6686 (install-only): Invoke "install" target in subdirs.
6687 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6688 targets.
6689 * configure: Rebuild.
6690 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6691 for vasprintf, vsnprintf, or gettimeofday.
6692 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6693 srv_tgtobj.
6694
270c9937
JB
66952014-06-05 Joel Brobecker <brobecker@adacore.com>
6696
6697 * development.sh: Delete.
6698 * Makefile.in (config.status): Adjust dependency on development.sh.
6699 * configure.ac: Adjust development.sh source call.
6700 * configure: Regenerate.
6701
0a261ed8
PA
67022014-06-02 Pedro Alves <palves@redhat.com>
6703
6704 * ax.c (gdb_free_agent_expr): New function.
6705 * ax.h (gdb_free_agent_expr): New declaration.
6706 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6707 list.
6708 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6709 static.
6710 (clear_breakpoint_conditions_and_commands): New function.
6711 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6712 (clear_breakpoint_conditions_and_commands): New declaration.
6713
e9dae05e
RR
67142014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6715
6716 * linux-aarch64-low.c (asm/ptrace.h): Include.
6717
5876f503
JK
67182014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6719
6720 Fix TLS access for -static -pthread.
6721 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6722 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6723 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6724
802e8e6d
PA
67252014-05-20 Pedro Alves <palves@redhat.com>
6726
6727 * linux-aarch64-low.c (aarch64_insert_point)
6728 (aarch64_remove_point): No longer check whether the type is
6729 supported here. Adjust to new interface.
6730 (the_low_target): Install aarch64_supports_z_point_type as
6731 supports_z_point_type method.
6732 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6733 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6734 instead of a Z packet char. Adjust.
6735 (arm_supports_z_point_type): New function.
6736 (arm_insert_point, arm_remove_point): Adjust to new interface.
6737 (the_low_target): Install arm_supports_z_point_type.
6738 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6739 (cris_insert_point, cris_remove_point): Adjust to new interface.
6740 Don't check whether the type is supported here.
6741 (the_low_target): Install cris_supports_z_point_type.
6742 * linux-low.c (linux_supports_z_point_type): New function.
6743 (linux_insert_point, linux_remove_point): Adjust to new interface.
6744 * linux-low.h (struct linux_target_ops) <insert_point,
6745 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6746 raw_breakpoint pointer parameter.
6747 <supports_z_point_type>: New method.
6748 * linux-mips-low.c (mips_supports_z_point_type): New function.
6749 (mips_insert_point, mips_remove_point): Adjust to new interface.
6750 Use mips_supports_z_point_type.
6751 (the_low_target): Install mips_supports_z_point_type.
6752 * linux-ppc-low.c (the_low_target): Install NULL as
6753 supports_z_point_type method.
6754 * linux-s390-low.c (the_low_target): Install NULL as
6755 supports_z_point_type method.
6756 * linux-sparc-low.c (the_low_target): Install NULL as
6757 supports_z_point_type method.
6758 * linux-x86-low.c (x86_supports_z_point_type): New function.
6759 (x86_insert_point): Adjust to new insert_point interface. Use
6760 insert_memory_breakpoint. Adjust to new
6761 i386_low_insert_watchpoint interface.
6762 (x86_remove_point): Adjust to remove_point interface. Use
6763 remove_memory_breakpoint. Adjust to new
6764 i386_low_remove_watchpoint interface.
6765 (the_low_target): Install x86_supports_z_point_type.
6766 * lynx-low.c (lynx_target_ops): Install NULL as
6767 supports_z_point_type callback.
6768 * nto-low.c (nto_supports_z_point_type): New.
6769 (nto_insert_point, nto_remove_point): Adjust to new interface.
6770 (nto_target_ops): Install nto_supports_z_point_type.
6771 * mem-break.c: Adjust intro comment.
6772 (struct raw_breakpoint) <raw_type, size>: New fields.
6773 <inserted>: Update comment.
6774 <shlib_disabled>: Delete field.
6775 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6776 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6777 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6778 (raw_bkpt_type_to_target_hw_bp_type): New function.
6779 (find_enabled_raw_code_breakpoint_at): New function.
6780 (find_raw_breakpoint_at): New type and size parameters. Use them.
6781 (insert_memory_breakpoint): New function, based off
6782 set_raw_breakpoint_at.
6783 (remove_memory_breakpoint): New function.
6784 (set_raw_breakpoint_at): Reimplement.
6785 (set_breakpoint): New, based on set_breakpoint_at.
6786 (set_breakpoint_at): Reimplement.
6787 (delete_raw_breakpoint): Go through the_target->remove_point
6788 instead of assuming memory breakpoints.
6789 (find_gdb_breakpoint_at): Delete.
6790 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6791 (find_gdb_breakpoint): New function.
6792 (set_gdb_breakpoint_at): Delete.
6793 (z_type_supported): New function.
6794 (set_gdb_breakpoint_1): New function, loosely based off
6795 set_gdb_breakpoint_at.
6796 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6797 (delete_gdb_breakpoint_at): Delete.
6798 (delete_gdb_breakpoint_1): New function, loosely based off
6799 delete_gdb_breakpoint_at.
6800 (delete_gdb_breakpoint): New function.
6801 (clear_gdb_breakpoint_conditions): Rename to ...
6802 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6803 breakpoint.
6804 (add_condition_to_breakpoint): Make static.
6805 (add_breakpoint_condition): Take a struct breakpoint pointer
6806 instead of an address. Adjust.
6807 (gdb_condition_true_at_breakpoint): Rename to ...
6808 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6809 z_type parameter.
6810 (gdb_condition_true_at_breakpoint): Reimplement.
6811 (add_breakpoint_commands): Take a struct breakpoint pointer
6812 instead of an address. Adjust.
6813 (gdb_no_commands_at_breakpoint): Rename to ...
6814 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6815 parameter. Return true if no breakpoint was found. Change debug
6816 output.
6817 (gdb_no_commands_at_breakpoint): Reimplement.
6818 (run_breakpoint_commands): Rename to ...
6819 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6820 and change return type to boolean.
6821 (run_breakpoint_commands): New function.
6822 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6823 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6824 breakpoint. Go through the_target->remove_point instead of
6825 assuming memory breakpoint.
6826 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6827 software and hardware breakpoints.
6828 (reinsert_raw_breakpoint): Go through the_target->insert_point
6829 instead of assuming memory breakpoint.
6830 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6831 software and hardware breakpoints.
6832 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6833 Check both software and hardware breakpoints.
6834 (validate_inserted_breakpoint): Assert the breakpoint is a
6835 software breakpoint. Set the inserted flag to -1 instead of
6836 setting shlib_disabled.
6837 (delete_disabled_breakpoints): Adjust.
6838 (validate_breakpoints): Only validate software breakpoints.
6839 Adjust to inserted flag change.
6840 (check_mem_read, check_mem_write): Skip breakpoint types other
6841 than software breakpoints. Adjust to inserted flag change.
6842 * mem-break.h (enum raw_bkpt_type): New enum.
6843 (raw_breakpoint, struct process_info): Forward declare.
6844 (Z_packet_to_target_hw_bp_type): Delete declaration.
6845 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6846 (set_gdb_breakpoint, delete_gdb_breakpoint)
6847 (clear_breakpoint_conditions): New declarations.
6848 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6849 (breakpoint_inserted_here): Update comment.
6850 (add_breakpoint_condition, add_breakpoint_commands): Replace
6851 address parameter with a breakpoint pointer parameter.
6852 (gdb_breakpoint_here): Update comment.
6853 (delete_gdb_breakpoint_at): Delete.
6854 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6855 * server.c (process_point_options): Take a struct breakpoint
6856 pointer instead of an address. Adjust.
6857 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6858 delete_gdb_breakpoint.
6859 * spu-low.c (spu_target_ops): Install NULL as
6860 supports_z_point_type method.
6861 * target.h: Include mem-break.h.
6862 (struct target_ops) <prepare_to_access_memory>: Update comment.
6863 <supports_z_point_type>: New field.
6864 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6865 instead of a char. Also take a raw breakpoint pointer.
6866 * win32-arm-low.c (the_low_target): Install NULL as
6867 supports_z_point_type.
6868 * win32-i386-low.c (i386_supports_z_point_type): New function.
6869 (i386_insert_point, i386_remove_point): Adjust to new interface.
6870 (the_low_target): Install i386_supports_z_point_type.
6871 * win32-low.c (win32_supports_z_point_type): New function.
6872 (win32_insert_point, win32_remove_point): Adjust to new interface.
6873 (win32_target_ops): Install win32_supports_z_point_type.
6874 * win32-low.h (struct win32_target_ops):
6875 <supports_z_point_type>: New method.
6876 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6877 instead of a char. Also take a raw breakpoint pointer.
6878
932539e3
PA
68792014-05-20 Pedro Alves <palves@redhat.com>
6880
6881 * mem-break.h: Include break-common.h.
6882 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6883 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6884 (Z_packet_to_target_hw_bp_type): New declaration.
6885 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6886 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6887 (Z_PACKET_ACCESS_WP): Delete macros.
6888 (Z_packet_to_hw_type): Delete function.
6889 * i386-low.h: Don't include break-common.h here.
6890 (Z_packet_to_hw_type): Delete declaration.
6891 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6892 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6893 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6894 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6895 * linux-aarch64-low.c: Don't include break-common.h here.
6896 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6897 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6898 (Z_packet_to_target_hw_bp_type): Delete function.
6899 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6900 function.
6901 (mips_insert_point, mips_remove_point): Use
6902 Z_packet_to_target_hw_bp_type.
6903
4ff0d3d8
PA
69042014-05-20 Pedro Alves <palves@redhat.com>
6905
6906 * linux-aarch64-low.c: Include break-common.h.
6907 (enum target_point_type): Delete.
6908 (Z_packet_to_point_type): Rename to ...
6909 (Z_packet_to_target_hw_bp_type): ... this, and return a
6910 target_hw_bp_type instead.
6911 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6912 instead of an enum target_point_type.
6913 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6914 breakpoint type.
6915 (aarch64_dr_state_insert_one_point)
6916 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6917 (aarch64_handle_aligned_watchpoint)
6918 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6919 Take an enum target_hw_bp_type instead of an enum
6920 target_point_type.
6921 (aarch64_supports_z_point_type): New function.
6922 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6923 use Z_packet_to_target_hw_bp_type.
6924
786dc519
JB
69252014-05-20 Joel Brobecker <brobecker@adacore.com>
6926
6927 * configure.ac: Only use -Werror by default when DEVELOPMENT
6928 is true.
6929 * configure: Regenerate.
6930
9e0aa64f
JK
69312014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6932
6933 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6934 * linux-x86-low.c (X86_64_USER_REGS): New.
6935 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6936
2b577b92
YQ
69372014-04-28 Yao Qi <yao@codesourcery.com>
6938
6939 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6940 name.
6941
94611da2
PA
69422014-04-25 Pedro Alves <palves@redhat.com>
6943
6944 PR server/16255
6945 * linux-low.c (linux_attach_fail_reason_string): New function.
6946 (linux_attach_lwp): Delete.
6947 (linux_attach_lwp_1): Rename to ...
6948 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6949 argument. Remove "initial" parameter. Return int instead of
6950 void. Don't error or warn here.
6951 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6952 failure to attach to the tgid. Call warning when failing to
6953 attach to an lwp.
6954 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6955 argument. Remove "initial" parameter. Return int instead of
6956 void. Don't error or warn here.
6957 (linux_attach_fail_reason_string): New declaration.
6958 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6959 interface change. Use linux_attach_fail_reason_string.
6960
01f9f808
MS
69612014-04-24 Michael Sturm <michael.sturm@mintel.com>
6962 Walfred Tedeschi <walfred.tedeschi@intel.com>
6963
6964 * Makefile.in: Added rules to handle new files
6965 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6966 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6967 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6968 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6969 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6970 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6971 x32-avx512-linux.o.
6972 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6973 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6974 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6975 i386/x32-avx512.xml.
6976 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6977 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6978 i386/x32-avx512-linux.xml.
6979 * i387-fp.c (num_avx512_k_registers): New constant for number
6980 of K registers.
6981 (num_avx512_zmmh_low_registers): New constant for number of
6982 lower ZMM registers (0-15).
6983 (num_avx512_zmmh_high_registers): New constant for number of
6984 higher ZMM registers (16-31).
6985 (num_avx512_ymmh_registers): New contant for number of higher
6986 YMM registers (ymm16-31 added by avx521 on x86_64).
6987 (num_avx512_xmm_registers): New constant for number of higher
6988 XMM registers (xmm16-31 added by AVX512 on x86_64).
6989 (struct i387_xsave): Add space for AVX512 registers.
6990 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6991 Add code to handle AVX512 registers.
6992 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6993 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6994 prototypei from generated file.
6995 (tdesc_amd64_avx512_linux): Likewise.
6996 (init_registers_x32_avx512_linux): Likewise.
6997 (tdesc_x32_avx512_linux): Likewise.
6998 (init_registers_i386_avx512_linux): Likewise.
6999 (tdesc_i386_avx512_linux): Likewise.
7000 (x86_64_regmap): Add AVX512 registers.
7001 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7002 mask.
7003 (initialize_low_arch): Add code to initialize AVX512 registers.
7004
51aa91f9
PA
70052014-04-23 Pedro Alves <palves@redhat.com>
7006
7007 * mem-break.c (find_gdb_breakpoint_at): Make static.
7008 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7009
a4165e94
PA
70102014-04-23 Pedro Alves <palves@redhat.com>
7011
7012 * i386-low.c: Don't include break-common.h here.
7013 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7014 prototype to take target_hw_bp_type as argument instead of a Z
7015 packet char.
7016 * i386-low.h: Include break-common.h here.
7017 (Z_packet_to_hw_type): Declare.
7018 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7019 prototypes.
7020 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7021 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7022 (x86_remove_point): Convert the packet number to a
7023 target_hw_bp_type before calling i386_low_remove_watchpoint.
7024 * win32-i386-low.c (i386_insert_point): Convert the packet number
7025 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7026 (i386_remove_point): Convert the packet number to a
7027 target_hw_bp_type before calling i386_low_remove_watchpoint.
7028
b8acf843
PA
70292014-04-23 Pedro Alves <palves@redhat.com>
7030
7031 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7032
d708bcd1
PA
70332014-04-10 Pedro Alves <palves@redhat.com>
7034
7035 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7036 Check if the condition or command is NULL before checking if the
7037 breakpoint is known. On success, return true.
7038 * mem-break.h (add_breakpoint_condition): Document return.
7039 (add_breakpoint_commands): Add describing comment.
7040 * server.c (skip_to_semicolon): New function.
7041 (process_point_options): Use it.
7042
2eec7d5b
PA
70432014-04-09 Pedro Alves <palves@redhat.com>
7044
7045 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7046 to lwpid_of.
7047
fa96cb38
PA
70482014-02-27 Pedro Alves <palves@redhat.com>
7049
7050 PR 12702
7051 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7052 macros.
7053 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7054 output.
7055 (last_thread_of_process_p): Take a PID argument instead of a
7056 thread pointer.
7057 (linux_wait_for_lwp): Delete.
7058 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7059 functions.
7060 (linux_low_filter_event): New function, party factored out from
7061 linux_wait_for_event.
7062 (linux_wait_for_event): Rename to ...
7063 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7064 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7065 sigsuspend. Check for zombie leaders.
7066 (linux_wait_for_event): Reimplement as wrapper around
7067 linux_wait_for_event_filtered.
7068 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7069 a normal or signal exit is seen, it's the whole process exiting.
7070 (wait_for_sigstop): No longer a for_each_inferior callback.
7071 Rewrite on top of linux_wait_for_event_filtered.
7072 (stop_all_lwps): Call wait_for_sigstop directly.
7073 * server.c (resume, handle_target_event): Handle
7074 TARGET_WAITKIND_NO_RESUMED.
7075
d763de10
JB
70762014-02-26 Joel Brobecker <brobecker@adacore.com>
7077
7078 * win32-low.c (psapi_get_dll_name,
7079 * win32_CreateToolhelp32Snapshot): Delete.
7080 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7081 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7082 Delete.
7083 (handle_load_dll): Add function description.
7084 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7085
850a0f76
JB
70862014-02-26 Joel Brobecker <brobecker@adacore.com>
7087
7088 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7089 Add comment.
7090 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7091 base address when calling win32_add_one_solib.
7092 (handle_load_dll): Delete local variable load_addr.
7093 Remove 0x1000 offset applied to DLL base address when calling
7094 win32_add_one_solib.
7095 (handle_unload_dll): Add comment.
7096
f25b3fc3
JB
70972014-02-26 Joel Brobecker <brobecker@adacore.com>
7098
7099 * win32-low.c (win32_add_all_dlls): Renames
7100 win32_ensure_ntdll_loaded. Rewrite function documentation.
7101 Adjust implementation to always load all DLLs.
7102 Add 0x1000 offset to DLL base address when calling
7103 win32_add_one_solib.
7104 (child_initialization_done): New static global.
7105 (do_initial_child_stuff): Set child_initialization_done to
7106 zero during child initialization, and 1 after. Replace call
7107 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7108 Add comment.
7109 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7110 (handle_unload_dll): Add function documentation.
7111 (get_child_debug_event): Ignore load and unload DLL events
7112 during child initialization.
7113
d86d4aaf
DE
71142014-02-20 Doug Evans <dje@google.com>
7115
3bc32da3 7116 Remove global all_lwps.
d86d4aaf
DE
7117 * inferiors.h (ptid_of): Move here from linux-low.h.
7118 (pid_of, lwpid_of): Ditto.
7119 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7120 parameter is a struct thread_info * now.
7121 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7122 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7123 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7124 directly.
7125 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7126 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7127 * linux-arm-low.c (update_registers_callback): Update, "entry"
7128 parameter is a struct thread_info * now.
7129 Fetch lwpid from current_inferior directly.
7130 (arm_insert_point): Pass &all_threads to find_inferior instead of
7131 &all_lwps.
7132 (arm_remove_point): Ditto.
7133 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7134 (arm_prepare_to_resume): Fetch pid from thread.
7135 (arm_read_description): Fetch lwpid from current_inferior directly.
7136 * linux-low.c (all_lwps): Delete.
7137 (delete_lwp): Delete call to remove_inferior.
7138 (handle_extended_wait): Fetch lwpid from thread.
7139 (add_lwp): Don't set lwp->entry.id. Remove call to
7140 add_inferior_to_list.
7141 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7142 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7143 (kill_one_lwp_callback): Ditto.
7144 (linux_kill): Don't dereference NULL pointer.
7145 Fetch ptid,lwpid from thread.
7146 (get_detach_signal): Fetch ptid from thread.
7147 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7148 Simplify call to regcache_invalidate_thread.
7149 (delete_lwp_callback): Update, "entry" parameter is a
7150 struct thread_info * now. Fetch pid from thread.
7151 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7152 (status_pending_p_callback): Update, "entry" parameter is a
7153 struct thread_info * now. Fetch ptid from thread.
7154 (find_lwp_pid): Update, "entry" parameter is a
7155 struct thread_info * now.
7156 (linux_wait_for_lwp): Fetch pid from thread.
7157 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7158 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7159 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7160 (dequeue_one_deferred_signal): Ditto.
7161 (cancel_breakpoint): Fetch ptid from current_inferior.
7162 (linux_wait_for_event): Pass &all_threads to find_inferior,
7163 not &all_lwps. Fetch ptid, lwpid from thread.
7164 (count_events_callback): Update, "entry" parameter is a
7165 struct thread_info * now.
7166 (select_singlestep_lwp_callback): Ditto.
7167 (select_event_lwp_callback): Ditto.
7168 (cancel_breakpoints_callback): Ditto.
7169 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7170 not &all_lwps.
7171 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7172 (unsuspend_one_lwp): Update, "entry" parameter is a
7173 struct thread_info * now.
7174 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7175 not &all_lwps.
7176 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7177 Fetch lwpid from thread, not lwp.
7178 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7179 Pass &all_threads to find_inferior, not &all_lwps.
7180 (send_sigstop): Fetch lwpid from thread, not lwp.
7181 (send_sigstop_callback): Update, "entry" parameter is a
7182 struct thread_info * now.
7183 (suspend_and_send_sigstop_callback): Ditto.
7184 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7185 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7186 struct thread_info * now.
7187 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7188 from thread, lwp.
7189 (lwp_running): Update, "entry" parameter is a
7190 struct thread_info * now.
7191 (stop_all_lwps): Fetch ptid from thread.
7192 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7193 (linux_resume_one_lwp): Fetch lwpid from thread.
7194 (linux_set_resume_request): Update, "entry" parameter is a
7195 struct thread_info * now. Fetch pid, lwpid from thread.
7196 (resume_status_pending_p): Update, "entry" parameter is a
7197 struct thread_info * now.
7198 (need_step_over_p): Ditto. Fetch lwpid from thread.
7199 (start_step_over): Fetch lwpid from thread.
7200 (linux_resume_one_thread): Update, "entry" parameter is a
7201 struct thread_info * now. Fetch lwpid from thread.
7202 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7203 (proceed_one_lwp): Update, "entry" parameter is a
7204 struct thread_info * now. Fetch lwpid from thread.
7205 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7206 struct thread_info * now.
7207 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7208 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7209 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7210 directly.
7211 (regsets_store_inferior_registers): Ditto.
7212 (fetch_register, store_register): Ditto.
7213 (linux_read_memory, linux_write_memory): Ditto.
7214 (linux_request_interrupt): Ditto.
7215 (linux_read_auxv): Ditto.
7216 (linux_xfer_siginfo): Ditto.
7217 (linux_qxfer_spu): Ditto.
7218 (linux_qxfer_libraries_svr4): Ditto.
7219 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7220 moved to inferiors.h.
7221 (get_lwp): Delete.
7222 (get_thread_lwp): Update.
7223 (struct lwp_info): Delete member "entry". Simplify comment for
7224 member "thread".
7225 (all_lwps): Delete.
7226 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7227 current_inferior directly.
7228 (update_watch_registers_callback): Update, "entry" parameter is a
7229 struct thread_info * now. Fetch pid from thread.
7230 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7231 (mips_insert_point): Fetch lwpid from current_inferior.
7232 Pass &all_threads to find_inferior, not &all_lwps.
7233 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7234 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7235 directly.
7236 (mips_stopped_data_address): Ditto.
7237 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7238 directly.
7239 * linux-tile-low.c (tile_arch_setup): Ditto.
7240 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7241 (update_debug_registers_callback): Update, "entry" parameter is a
7242 struct thread_info * now. Fetch pid from thread.
7243 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7244 Pass &all_threads to find_inferior, not &all_lwps.
7245 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7246 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7247 Pass &all_threads to find_inferior, not &all_lwps.
7248 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7249 (i386_dr_low_get_status): Ditto.
7250 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7251 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7252 (x86_linux_read_description): Ditto.
7253 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7254
3b8361aa
DE
72552014-02-20 Doug Evans <dje@google.com>
7256
7257 * inferiors.c (get_first_inferior): Fix buglet.
7258
f7667f0d
DE
72592014-02-19 Doug Evans <dje@google.com>
7260
7261 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7262 * inferiors.c (add_thread): Change result type to struct thread_info *.
7263 All callers updated.
7264 (add_lwp): Call add_thread here instead of in callers.
7265 All callers updated.
7266 * linux-low.h (get_lwp_thread): Rewrite.
7267 (struct lwp_info): New member "thread".
7268
b3312d80
DE
72692014-02-19 Doug Evans <dje@google.com>
7270
7271 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7272 All callers updated.
7273
ecc6f45c
DE
72742014-02-19 Doug Evans <dje@google.com>
7275
7276 * inferiors.c (add_thread): Fix whitespace.
7277
649ebbca
DE
72782014-02-19 Doug Evans <dje@google.com>
7279
7280 * dll.c (clear_dlls): Replace accessing list implemention details
7281 with API function.
7282 * gdbthread.h (get_first_thread): Declare.
7283 * inferiors.c (for_each_inferior_with_data): New function.
7284 (get_first_thread): New function.
7285 (find_thread_ptid): Simplify.
7286 (get_first_inferior): New function.
7287 (clear_list): Delete.
7288 (one_inferior_p): New function.
7289 (clear_inferior_list): New function.
7290 (clear_inferiors): Update.
7291 * inferiors.h (for_each_inferior_with_data): Declare.
7292 (clear_inferior_list): Declare.
7293 (one_inferior_p): Declare.
7294 (get_first_inferior): Declare.
7295 * linux-low.c (linux_wait_for_event): Replace accessing list
7296 implemention details with API function.
7297 * server.c (target_running): Ditto.
7298 (accumulate_file_name_length): New function.
7299 (emit_dll_description): New function.
7300 (handle_qxfer_libraries): Replace accessing list implemention
7301 details with API function.
7302 (handle_qxfer_threads_worker): New function.
7303 (handle_qxfer_threads_proper): Replace accessing list implemention
7304 details with API function.
7305 (handle_query): Ditto.
7306 (visit_actioned_threads_callback_ftype): New typedef.
7307 (visit_actioned_threads_data): New struct.
7308 (visit_actioned_threads): Rewrite to be find_inferior callback.
7309 (resume): Call find_inferior.
7310 (handle_status): Replace accessing list implemention
7311 details with API function.
7312 (process_serial_event): Replace accessing list implemention details
7313 with API function.
7314 * target.c (set_desired_inferior): Replace accessing list implemention
7315 details with API function.
7316 * tracepoint.c (same_process_p): New function.
7317 (gdb_agent_about_to_close): Replace accessing list implemention
7318 details with API function.
7319 * win32-low.c (child_delete_thread): Replace accessing list
7320 implemention details with API function.
7321 (match_dll_by_basename): New function.
7322 (dll_is_loaded_by_basename): New function.
7323 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7324 details call to dll_is_loaded_by_basename.
7325
80894984
DE
73262014-02-19 Doug Evans <dje@google.com>
7327
7328 * dll.h (struct dll_info): Add comment.
7329 * gdbthread.h (struct thread_info): Add comment.
7330 (current_ptid): Simplify.
7331 * inferiors.c (add_process): Update.
7332 (remove_process): Update.
7333 * inferiors.h (struct process_info): Rename member "head" to "entry".
7334 * linux-low.c (delete_lwp): Update.
7335 (add_lwp): Update.
7336 (last_thread_of_process_p): Update.
7337 (kill_one_lwp_callback, linux_kill): Update.
7338 (status_pending_p_callback): Update.
7339 (wait_for_sigstop): Update. Simplify read of ptid.
7340 (start_step_over): Update.
7341 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7342 (get_lwp_thread): Update.
7343 (struct lwp_info): Rename member "head" to "entry".
7344 * regcache.h (inferior_list_entry): Delete.
7345 * server.c (kill_inferior_callback): Update.
7346 (detach_or_kill_inferior_callback): Update.
7347 (print_started_pid): Update.
7348 (print_attached_pid): Update.
7349 (process_serial_event): Simplify read of ptid.
7350 * thread-db.c (thread_db_create_event): Update.
7351 (thread_db_get_tls_address): Update.
7352 * win32-low.c (current_inferior_ptid): Simplify.
7353
46917d26
TT
73542014-02-19 Tom Tromey <tromey@redhat.com>
7355
7356 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7357 argument.
7358 (target_supports_btrace): Update.
7359
0759a81e
YQ
73602014-02-14 Yao Qi <yao@codesourcery.com>
7361
7362 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7363 (rsp-low-ipa.o): New target.
7364
a7191e8b
TT
73652014-02-12 Tom Tromey <tromey@redhat.com>
7366
7367 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7368 convert_ascii_to_int.
7369 * regcache.c (registers_to_string): Likewise.
7370 * remote-utils.c (decode_M_packet): Likewise.
7371 * server.c (process_serial_event): Likewise.
7372
ff0e980e
TT
73732014-02-12 Tom Tromey <tromey@redhat.com>
7374
7375 * server.c (handle_query, handle_v_run): Use hex2bin, not
7376 unhexify.
7377 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7378
e9371aff
TT
73792014-02-12 Tom Tromey <tromey@redhat.com>
7380
7381 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7382 convert_int_to_ascii.
7383 * regcache.c (registers_to_string, collect_register_as_string):
7384 Likewise.
7385 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7386 Likewise.
7387 * server.c (process_serial_event): Likewise.
7388 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7389 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7390
971dc0b8
TT
73912014-02-12 Tom Tromey <tromey@redhat.com>
7392
7393 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7394 bin2hex, not hexify.
7395 * tracepoint.c (cmd_qtstatus): Likewise.
7396
0a822afb
TT
73972014-02-12 Tom Tromey <tromey@redhat.com>
7398
7399 * remote-utils.c (monitor_output): Pass explicit length to
7400 hexify.
7401
9c3d6531
TT
74022014-02-12 Tom Tromey <tromey@redhat.com>
7403
7404 * tracepoint.c: Include rsp-low.h.
7405 * server.c: Include rsp-low.h.
7406 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7407 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7408 declare.
7409 * remote-utils.c: Include rsp-low.h.
7410 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7411 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7412 (convert_int_to_ascii, convert_ascii_to_int): Move to
7413 common/rsp-low.c.
7414 * regcache.c: Include rsp-low.h.
7415 * ax.c: Include rsp-low.h.
7416 * Makefile.in (SFILES): Add common/rsp-low.c.
7417 (OBS): Add rsp-low.o.
7418 (rsp-low.o): New target.
7419
01fd3ea5
TT
74202014-02-12 Tom Tromey <tromey@redhat.com>
7421
7422 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7423 Include print-utils.h.
7424 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7425 (plongest, thirty_two, phex_nz): Remove.
7426 * Makefile.in (SFILES): Add common/print-utils.c.
7427 (OBS): Add print-utils.o.
7428 (print-utils-ipa.o): New target.
7429 (print-utils.o): New target.
7430 (IPA_OBJS): Add print-utils-ipa.o.
7431
e99dc820
TT
74322014-02-06 Tom Tromey <tromey@redhat.com>
7433
7434 * Makefile.in (SFILES): Fix indentation.
7435
ee1e2d4f
DE
74362014-02-05 Doug Evans <dje@google.com>
7437
7438 * linux-low.c (linux_wait_for_event): Improve comment.
7439 (linux_wait_1): Keep current_inferior in sync with event_child.
7440
f5a02773
DE
74412014-01-22 Doug Evans <dje@google.com>
7442
7443 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7444
87ce2a04
DE
74452014-01-22 Doug Evans <dje@google.com>
7446
7447 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7448 * configure: Regenerate.
7449 * config.in: Regenerate.
7450 * Makefile.in (SFILES): Add debug.c.
7451 (OBS): Add debug.o.
7452 * debug.c: New file.
7453 * debug.h: New file.
7454 * linux-aarch64-low.c (*): Update all debugging printfs to use
7455 debug_printf instead of fprintf.
7456 * linux-arm-low.c (*): Ditto.
7457 * linux-cris-low.c (*): Ditto.
7458 * linux-crisv32-low.c (*): Ditto.
7459 * linux-m32r-low.c (*): Ditto.
7460 * linux-sparc-low.c (*): Ditto.
7461 * linux-x86.c (*): Ditto.
7462 * linux-low.c (*): Ditto.
7463 (linux_wait_1): Add calls to debug_enter, debug_exit.
7464 (linux_wait): Remove redundant debugging printf.
7465 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7466 (linux_resume, unstop_all_lwps): Ditto.
7467 * mem-break.c (*): Update all debugging printfs to use
7468 debug_printf instead of fprintf.
7469 * remote-utils.c (*): Ditto.
7470 * thread-db.c (*): Ditto.
7471 * server.c #include <ctype.h>, "gdb_vecs.h".
7472 (debug_threads): Moved to debug.c.
7473 (*): Update all debugging printfs to use debug_printf instead of
7474 fprintf.
7475 (start_inferior): Replace call to fflush with call to debug_flush.
7476 (monitor_show_help): Mention set debug-format.
7477 (parse_debug_format_options): New function.
7478 (handle_monitor_command): Handle "monitor set debug-format".
7479 (gdbserver_usage): Mention --debug-format.
7480 (main): Parse --debug-format.
7481 * server.h (debug_threads): Declaration moved to debug.h.
7482 #include "debug.h".
7483 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7484 trace_debug_1 that uses debug_printf.
7485 (tracepoint_look_up_symbols): Update all debugging printfs to use
7486 debug_printf instead of fprintf.
7487
e671835b
BS
74882014-01-20 Baruch Siach <baruch@tkos.co.il>
7489
7490 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7491 sys/ptrace.h.
7492
b5737fa9
PA
74932014-01-17 Pedro Alves <palves@redhat.com>
7494
ea38d2a9 7495 PR build/16445
c7faa97a
PA
7496 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7497 defined after including gdb_proc_service.h.
b5737fa9 7498
40ed484e
DE
74992014-01-16 Doug Evans <dje@google.com>
7500
7501 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7502 (match_dll): Use it.
7503
969c39fb
MM
75042014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7505
7506 * target.h (target_ops) <read_btrace>: Change parameters and
7507 return type to allow error reporting.
7508 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7509 trace reading errors on.
7510 * linux-low.c (linux_low_read_btrace): Pass trace reading
7511 errors on.
7512 (linux_low_disable_btrace): New.
7513
ab7f45ba
DE
75142014-01-15 Doug Evans <dje@google.com>
7515
7516 * inferiors.c (thread_id_to_gdb_id): Delete.
7517 * inferiors.h (thread_id_to_gdb_id): Delete.
7518
66af0f44
EZ
75192014-01-13 Eli Zaretskii <eliz@gnu.org>
7520
7521 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7522 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7523 versions.
7524
9939e131
PA
75252014-01-08 Pedro Alves <palves@redhat.com>
7526
7527 * server.c (handle_status): Don't discard previous queued stop
7528 replies or thread's pending status here.
7529 (main) <disconnection>: Do it here instead.
7530
b7ea362b
PA
75312014-01-08 Pedro Alves <palves@redhat.com>
7532
7533 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7534 * server.c (visit_actioned_threads, handle_pending_status): New
7535 function.
7536 (handle_v_cont): Factor out parts to ...
7537 (resume): ... this new function. If in all-stop, and a thread
7538 being resumed has a pending status, report it without actually
7539 resuming.
7540 (myresume): Adjust to use the new 'resume' function.
7541 (clear_pending_status_callback, set_pending_status_callback)
7542 (find_status_pending_thread_callback): New functions.
7543 (handle_status): Handle the case of multiple threads having
7544 interesting statuses to report. Report threads' real last signal
7545 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7546 with an interesting thread to report the status for, instead of
7547 always reporting the status of the first thread.
7548
28498c42
JB
75492014-01-01 Joel Brobecker <brobecker@adacore.com>
7550
7551 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7552 * gdbreplay.c (gdbreplay_version): Likewise.
7553
f45c82da
YZ
75542013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7555
7556 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7557 iov.iov_len with the real length in use.
7558
379a5e2d
JB
75592013-12-13 Joel Brobecker <brobecker@adacore.com>
7560
7561 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7562 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7563 for all targets that use win32-low.c.
7564 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7565 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7566
4210d83e
PA
75672013-12-13 Pedro Alves <palves@redhat.com>
7568
7569 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7570 if equal to TARGET_WAITKIND_LOADED.
7571 * win32-low.c (cached_status): New static global.
7572 (win32_wait): Add declaration.
7573 (do_initial_child_stuff): Flush all initial pending debug events
7574 up to the initial breakpoint.
7575 (win32_wait): If CACHED_STATUS was set, return that instead
7576 of doing a real wait. Remove the code resuming the execution
7577 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7578 during the initial phase. Also remove the code changing
7579 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7580 TARGET_WAITKIND_STOPPED.
7581
e7f0d979
YQ
75822013-12-11 Yao Qi <yao@codesourcery.com>
7583
7584 * notif.c (handle_notif_ack): Return 0 if no notification
7585 matches.
7586
ebcf782c
DE
75872013-11-20 Doug Evans <dje@google.com>
7588
7589 * linux-low.c (linux_set_resume_request): Fix comment.
7590
20ad9378
DE
75912013-11-20 Doug Evans <dje@google.com>
7592
7593 * linux-low.c (resume_status_pending_p): Tweak comment.
7594
a196ebeb
WT
75952013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7596
7597 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7598 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7599 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7600 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7601 (srv_amd64_regobj): Add amd64-mpx.o.
7602 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7603 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7604 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7605 * i387-fp.c (num_pl_bnd_register) Added constant.
7606 (num_pl_bnd_cfg_registers) Added constant.
7607 (struct i387_xsave) Added reserved area and MPX fields.
7608 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7609 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7610 function.
7611 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7612 (init_registers_amd64_mpx_linux): Declare new function.
7613 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7614 (x86_64_regmap): Add MPX registers.
7615 (x86_linux_read_description): Add MPX case.
7616 (initialize_low_arch): Initialize MPX targets.
7617
0080a2f6
TT
76182013-11-18 Tom Tromey <tromey@redhat.com>
7619
7620 * configure: Rebuild.
7621 * configure.ac: Don't check for stdlib.h.
7622 * gdbreplay.c: Unconditionally include stdlib.h.
7623
2978b111
TT
76242013-11-18 Tom Tromey <tromey@redhat.com>
7625
7626 * config.in: Rebuild.
7627 * configure: Rebuild.
7628 * configure.ac: Don't use AC_HEADER_DIRENT.
7629
a3d08894
TT
76302013-11-18 Tom Tromey <tromey@redhat.com>
7631
7632 * server.h: Don't check HAVE_STRING_H.
7633 * gdbreplay.c: Don't check HAVE_STRING_H.
7634 * configure: Rebuild.
7635
0a5dd17d
TT
76362013-11-18 Tom Tromey <tromey@redhat.com>
7637
7638 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7639 LIBGNU.
7640
1bd2f0ba
TT
76412013-11-08 Tom Tromey <tromey@redhat.com>
7642
7643 * configure, config.in: Rebuild.
7644 * configure.ac: Remove unused configury.
7645
3266f10b
TT
76462013-11-08 Tom Tromey <tromey@redhat.com>
7647
7648 * acinclude.m4: Include common.m4, codeset.m4.
7649 * configure, config.in: Rebuild.
7650 * configure.ac: Use GDB_AC_COMMON.
7651
6682d959
AA
76522013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7653
7654 * linux-s390-low.c (HWCAP_S390_TE): New define.
7655 (s390_arch_setup): Consider the TE field in the HWCAP for
7656 determining 'have_regset_tdb'.
7657
fd0a4d76
SDJ
76582013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7659
7660 PR gdb/16014
7661 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7662 call to sizeof.
7663
1a3d890b
PA
76642013-10-02 Pedro Alves <palves@redhat.com>
7665
7666 * server.c (process_serial_event): Don't output "GDBserver
7667 exiting" if GDB is connected through stdio.
7668 * target.c (mywait): Likewise, be silent if GDB is connected
7669 through stdio.
7670
97ad4581
JB
76712013-10-01 Joel Brobecker <brobecker@adacore.com>
7672
7673 * lynx-low.c (lynx_add_threads_after_attach): New function.
7674 (lynx_attach): Remove call to add_thread. Add call to
7675 lynx_add_threads_after_attach instead.
7676
5b4e221c
MF
76772013-09-28 Mike Frysinger <vapier@gentoo.org>
7678
7679 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7680 * config.in, configure: Regenerated.
7681
ee47b2f8
YQ
76822013-09-18 Yao Qi <yao@codesourcery.com>
7683
7684 PR server/15959
7685 * server.c (start_inferior): Clear 'resume_info'.
7686
d6707650 76872013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7688
d6707650
JW
7689 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7690 for each register.
7691
9243dd0e 76922013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7693
9243dd0e
JW
7694 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7695 linux-tile-low.o to srv_tgtobj.
7696
c623a6ef
WN
76972013-09-16 Will Newton <will.newton@linaro.org>
7698
7699 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7700 out regs.
7701
fb71d39e
PA
77022013-09-06 Pedro Alves <palves@redhat.com>
7703
7704 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7705 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7706 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7707 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7708 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7709 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7710
8e7e9910
PA
77112013-09-06 Pedro Alves <palves@redhat.com>
7712
7713 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7714 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7715
7c3a12ca
PA
77162013-09-06 Pedro Alves <palves@redhat.com>
7717
7718 * linux-amd64-ipa.c: Include tracepoint.h.
7719 * linux-i386-ipa.c: Include tracepoint.h.
7720
8eb3d7b6
RW
77212013-09-06 Ricard Wanderlof <ricardw@axis.com>
7722
7723 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7724 (ps_get_thread_area): New function.
7725
eddddb9d
RW
77262013-09-06 Ricard Wanderlof <ricardw@axis.com>
7727
7728 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7729 (initialize_low_arch): Call init_registers_crisv32 rather than
7730 init_register_crisv32.
7731
533b0600
PA
77322013-09-05 Pedro Alves <palves@redhat.com>
7733
7734 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7735 to ...
7736 * hostio.h: ... this new file.
7737 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7738 win32-low.c: Include hostio.h.
7739
0ce3d3b5
PA
77402013-09-05 Pedro Alves <palves@redhat.com>
7741
7742 * server.h (gdb_client_data, handler_func, callback_handler_func)
7743 (delete_file_handler, add_file_handler, append_callback_event)
7744 (delete_callback_event, start_event_loop, initialize_event_loop):
7745 Move to event-loop.h and include it.
7746 * event-loop.h: New file.
7747
799cdc37
PA
77482013-09-05 Pedro Alves <palves@redhat.com>
7749
7750 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7751 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7752 (loaded_dll, unloaded_dll): Move to ...
7753 * dll.h: ... this new file.
7754 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7755
6a6bbd9d
PA
77562013-09-05 Pedro Alves <palves@redhat.com>
7757
7758 * server.h (current_process, get_thread_process, all_processes)
7759 (add_inferior_to_list, for_each_inferior, current_inferior)
7760 (remove_inferior, add_process, remove_process, find_process_pid)
7761 (have_started_inferiors_p, have_attached_inferiors_p)
7762 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7763 (clear_inferiors, find_inferior, find_inferior_id)
7764 (inferior_target_data, set_inferior_target_data)
7765 (inferior_regcache_data, set_inferior_regcache_data): Move to
7766 inferiors.h, and include it.
7767 * inferiors.h: New file.
7768
f699aaba
PA
77692013-09-05 Pedro Alves <palves@redhat.com>
7770
7771 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7772 Move ...
72f4393d 7773 * ax.h: ... here.
f699aaba 7774
c144c7a0
PA
77752013-09-05 Pedro Alves <palves@redhat.com>
7776
7777 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7778 tracepoint.h.
7779 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7780 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7781 (handle_tracepoint_general_set, handle_tracepoint_query)
7782 (tracepoint_finished_step, tracepoint_was_hit)
7783 (release_while_stepping_state_list, current_traceframe)
7784 (in_readonly_region, traceframe_read_mem)
7785 (fetch_traceframe_registers, traceframe_read_sdata)
7786 (traceframe_read_info, struct fast_tpoint_collect_status)
7787 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7788 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7789 (supply_fast_tracepoint_registers)
7790 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7791 (ipa_tdesc, claim_trampoline_space)
7792 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7793 (agent_mem_read, agent_get_trace_state_variable_value)
7794 (agent_set_trace_state_variable_value, agent_tsv_read)
7795 (agent_mem_read_string, get_raw_reg_func_addr)
7796 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7797 * tracepoint.h: ... this new file.
7798
ff42e6ab
PA
77992013-09-05 Pedro Alves <palves@redhat.com>
7800
7801 * server.h (perror_with_name, error, fatal, warning, paddress)
7802 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7803 include it.
7804 * utils.h: New file.
7805
541af0f4
PA
78062013-09-05 Pedro Alves <palves@redhat.com>
7807
7808 * server.h (remote_debug, noack_mode, transport_is_reliable)
7809 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7810 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7811 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7812 (write_enn, initialize_async_io, enable_async_io)
7813 (disable_async_io, check_remote_input_interrupt_request)
7814 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7815 (dead_thread_notify, prepare_resume_reply)
7816 (decode_address_to_semicolon, decode_address, decode_m_packet)
7817 (decode_M_packet, decode_X_packet, decode_xfer_write)
7818 (decode_search_memory_packet, unhexify, hexify)
7819 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7820 (look_up_one_symbol, relocate_instruction)
7821 (monitor_output): Move to remote-utils.h, and include it.
7822 * remote-utils.h: New file.
7823
eebdf26b
PA
78242013-09-05 Pedro Alves <palves@redhat.com>
7825
7826 * server.h (_): Delete.
7827
3aafd2ff
PA
78282013-09-02 Pedro Alves <palves@redhat.com>
7829
7830 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7831 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7832 allocated.
7833 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7834
cee83bcb
PM
78352013-09-02 Pierre Muller <muller@sourceware.org>
7836
7837 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7838 or WriteProcessMemory complete successfully and handle
7839 ERROR_PARTIAL_COPY error.
7840
9a13b2fa
PA
78412013-09-02 Pedro Alves <palves@redhat.com>
7842
7843 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7844 error instead of EIO.
7845
602e3198
JK
78462013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7847
7848 PR server/15604
7849 * linux-low.c: Include filestuff.h.
7850 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7851 * lynx-low.c: Include filestuff.h.
7852 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7853 * server.c: Include filestuff.h.
7854 (main): Call notice_open_fds.
7855 * spu-low.c: Include filestuff.h.
7856 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7857
96d7229d
LM
78582013-08-22 Luis Machado <lgustavo@codesourcery.com>
7859
7860 * Makefile.in: Explain why ../target and ../nat are not
7861 listed as include file search paths.
7862 (linux-waitpid.o): New object file rule.
7863 * configure.srv (srv_native_linux_obj): New variable.
7864 Replace all occurrences of linux native object files with
7865 $srv_native_linux_obj.
7866 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7867 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7868 (linux_enable_event_reporting): Remove declaration.
7869 (my_waitpid): Moved to common/linux-waitpid.c.
7870 (linux_wait_for_event): Pass ptid when calling
7871 linux_enable_event_reporting.
7872 (linux_supports_tracefork_flag): Remove.
7873 (linux_enable_event_reporting): Likewise.
7874 (linux_tracefork_grandchild): Remove.
7875 (STACK_SIZE): Moved to common/linux-ptrace.c.
7876 (linux_tracefork_child): Remove.
7877 (linux_test_for_tracefork): Remove.
7878 (linux_look_up_symbols): Call linux_supports_traceclone.
7879 (initialize_low): Remove call to linux_test_for_tracefork.
7880 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7881 common/linux-ptrace.h.
7882 (PTRACE_TYPE_ARG4): Likewise.
7883 Include linux-ptrace.h.
7884
32940073
PA
78852013-08-21 Pedro Alves <palves@redhat.com>
7886
7887 * config.in: Renegerate.
7888
33b60d58 78892013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7890
33b60d58
LM
7891 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7892 (SFILES): Remove $(srcdir)/common/target-common.c and
7893 add $(srcdir)/target/waitstatus.c.
7894 (OBS): Remove target-common.o and add waitstatus.o.
7895 (server_h): Remove $(srcdir)/../common/target-common.h and
7896 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7897 and $(srcdir)/../target/waitstatus.h.
7898 (target-common.o): Remove.
7899 (waitstatus.o): New target object file.
7900 * target.h: Do not include target-common.h and
7901 include target/resume.h, target/wait.h and
7902 target/waitstatus.h.
7903
b8e1b30e
LM
79042013-08-13 Luis Machado <lgustavo@codesourcery.com>
7905
7906 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7907 to PTRACE_TYPE_ARG3.
7908 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7909 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7910 PTRACE_TYPE_ARG4.
7911 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7912 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7913
7a60ad40
YQ
79142013-07-27 Jie Zhang <jie@codesourcery.com>
7915 Daniel Jacobowitz <dan@codesourcery.com>
7916 Yao Qi <yao@codesourcery.com>
7917
7918 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7919 (mips-linux-watch.o): New rule.
7920 (mips_linux_watch_h): New variable.
7921 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7922 srv_tgtobj.
7923 * linux-mips-low.c: Include mips-linux-watch.h.
7924 (struct arch_process_info, struct arch_lwp_info): New.
7925 (update_watch_registers_callback): New function.
7926 (mips_linux_new_process, mips_linux_new_thread) New functions.
7927 (mips_linux_prepare_to_resume, mips_insert_point): New
7928 functions.
7929 (mips_remove_point, mips_stopped_by_watchpoint): New
7930 functions.
7931 (rsp_bp_type_to_target_hw_bp_type): New function.
7932 (mips_stopped_data_address): New function.
7933 (the_low_target): Add watchpoint support functions.
7934
de6f69ad
YQ
79352013-07-27 Yao Qi <yao@codesourcery.com>
7936
7937 * i386-low.c: Include break-common.h.
7938 (enum target_hw_bp_type): Remove.
7939
3360c0bf
LM
79402013-07-24 Luis Machado <lgustavo@codesourcery.com>
7941
7942 * Makefile.in (SFILES): /common/target-common.c.
7943 (OBS): Add target-common.o.
7944 (server_h): Add $(srcdir)/../common/target-common.h.
7945 (target-common.o): New target.
7946 * server.c (queue_stop_reply_callback): Free
7947 status string after use.
7948 * target.c (target_waitstatus_to_string): Remove.
7949 * target.h: Include target-common.h.
7950 (resume_kind): Likewise.
7951 (target_waitkind): Likewise.
7952 (target_waitstatus): Likewise.
7953 (TARGET_WNOHANG): Likewise.
7954
bd885420
YQ
79552013-07-04 Yao Qi <yao@codesourcery.com>
7956
7957 * Makefile.in (host_alias): Use @host_noncanonical@.
7958 (target_alias): Use @target_noncanonical@.
7959 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7960 ACX_NONCANONICAL_HOST.
7961 * configure: Regenerated.
7962
7963 Revert:
7964 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7965
7966 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7967 * configure: Rebuild.
7968 * Makefile.in (version_host, version_target): Get from configure.
7969 (version.c): Use $(version_host) and $(version_target).
7970
17ef446e
PA
79712013-07-03 Pedro Alves <palves@redhat.com>
7972
7973 * Makefile.in (config.status): Depend on development.sh.
7974 * acinclude.m4: Include libmcheck.m4.
7975 * configure: Regenerate.
7976
7a9a7487
MG
79772013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7978
7979 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7980 attribute inside the parentheses.
7981 (winapi_DebugSetProcessKillOnExit): Ditto.
7982 (winapi_DebugBreakProcess): Ditto.
7983 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7984
49b64de6
MG
79852013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7986
7987 * notif.h (notif_event): Add a dummy member to avoid compiler
7988 errors.
7989
d5749ee7
PA
79902013-07-01 Pedro Alves <palves@redhat.com>
7991
7992 * hostio.c (HOSTIO_PATH_MAX): Define.
7993 (require_filename, handle_open, handle_unlink, handle_readlink):
7994 Use it.
7995
d8d2a3ee
PA
79962013-07-01 Pedro Alves <palves@redhat.com>
7997
7998 * server.h: Include "pathmax.h".
7999 * linux-low.c: Don't include sys/param.h.
8000 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8001 MAXPATHLEN.
8002 * win32-low.c: Don't include sys/param.h.
8003 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8004
bc7dea8d
PA
80052013-07-01 Pedro Alves <palves@redhat.com>
8006
8007 * event-loop.c: Don't check HAVE_UNISTD_H before including
8008 <unistd.h>.
8009 * gdbreplay.c: Likewise.
8010 * remote-utils.c: Likewise.
8011 * server.c: Likewise.
8012 * configure.ac: Don't check for unistd.h.
8013 * configure: Regenerate.
8014
d6c2da54
TT
80152013-06-28 Tom Tromey <tromey@redhat.com>
8016
8017 * Makefile.in (version.c): Use version.in, not
8018 common/version.in.
8019
257b6bec
MG
80202013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8021
8022 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8023 * configure: Rebuild.
8024 * Makefile.in (version_host, version_target): Get from configure.
8025 (version.c): Use $(version_host) and $(version_target).
8026
86ebe149
DK
80272013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8028
8029 Fix trace-status to output user name without trailing colon.
8030 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8031
f30aa5af
DK
80322013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8033
8034 Fix trace-status to output proper start-time and stop-time.
8035 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8036 output start time and stop time in hex as gdb expects.
8037
28a93511
YQ
80382013-06-26 Pedro Alves <pedro@codesourcery.com>
8039
8040 * tracepoint.c (build_traceframe_info_xml): Output trace state
8041 variables present in the trace buffer.
8042
01208463
TT
80432013-06-24 Tom Tromey <tromey@redhat.com>
8044
8045 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8046 create-version.sh.
8047 (version.o): Remove.
8048 * gdbreplay.c: Include version.h.
8049 (version, host_name): Don't declare.
8050 * server.h: Include version.h.
8051 (version, host_name): Don't declare.
8052
760256f9
PA
80532013-06-12 Pedro Alves <palves@redhat.com>
8054
8055 * linux-x86-low.c (linux_is_elf64): Delete global.
8056 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8057 with local linux_pid_exe_is_elf_64_file use.
8058
030031ee
PA
80592013-06-11 Pedro Alves <palves@redhat.com>
8060
8061 * linux-low.c (regset_disabled, disable_regset): New functions.
8062 (regsets_fetch_inferior_registers)
8063 (regsets_store_inferior_registers): Use them.
8064 (initialize_regsets_info); Don't allocate the disabled_regsets
8065 array here.
8066 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8067 comment.
8068
5da6eb0a
PA
80692013-06-11 Pedro Alves <palves@redhat.com>
8070
8071 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8072 xmalloc.
8073
7e5aaa09
PA
80742013-06-11 Pedro Alves <palves@redhat.com>
8075
8076 * linux-x86-low.c (initialize_low_arch): Call
8077 init_registers_x32_avx_linux.
8078
d878444c
JK
80792013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8080
8081 Fix compatibility with Android Bionic.
8082 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8083 it is not empty.
8084
3aee8918
PA
80852013-06-07 Pedro Alves <palves@redhat.com>
8086
5f2b57b5 8087 PR server/14823
3aee8918
PA
8088 * Makefile.in (OBS): Add tdesc.o.
8089 (IPA_OBJS): Add tdesc-ipa.o.
8090 (tdesc-ipa.o): New rule.
8091 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8092 interface.
8093 * linux-low.c (new_inferior): Delete.
8094 (disabled_regsets, num_regsets): Delete.
8095 (linux_add_process): Adjust to set the new per-process
8096 new_inferior flag.
8097 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8098 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8099 was a stop. When calling arch_setup, switch the current inferior
8100 to the thread that got an event.
8101 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8102 (regsets_fetch_inferior_registers)
8103 (regsets_store_inferior_registers): New regsets_info parameter.
8104 Adjust to use it.
8105 (linux_register_in_regsets): New regs_info parameter. Adjust to
8106 use it.
8107 (register_addr, fetch_register, store_register): New usrregs_info
8108 parameter. Adjust to use it.
8109 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8110 parameter regs_info. Adjust to use it.
8111 (linux_fetch_registers): Get the current inferior's regs_info, and
8112 adjust to use it.
8113 (linux_store_registers): Ditto.
8114 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8115 (initialize_low): Don't initialize the target_regsets here. Call
8116 initialize_low_arch.
8117 * linux-low.h (target_regsets): Delete declaration.
8118 (struct regsets_info): New.
8119 (struct usrregs_info): New.
8120 (struct regs_info): New.
8121 (struct process_info_private) <new_inferior>: New field.
8122 (struct linux_target_ops): Delete the num_regs, regmap, and
8123 regset_bitmap fields. New field regs_info.
8124 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8125 * i387-fp.c (num_xmm_registers): Delete.
8126 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8127 calls to new interface.
8128 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8129 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8130 Infer the number of xmm registers from the regcache's target
8131 description.
8132 * i387-fp.h (num_xmm_registers): Delete.
8133 * inferiors.c (add_thread): Don't install the thread's regcache
8134 here.
8135 * proc-service.c (gregset_info): Fetch the current inferior's
8136 regs_info. Adjust to use it.
8137 * regcache.c: Include tdesc.h.
8138 (register_bytes, reg_defs, num_registers)
8139 (gdbserver_expedite_regs): Delete.
8140 (get_thread_regcache): If the thread doesn't have a regcache yet,
8141 create one, instead of aborting gdbserver.
8142 (regcache_invalidate_one): Rename to ...
8143 (regcache_invalidate_thread): ... this.
8144 (regcache_invalidate_one): New.
8145 (regcache_invalidate): Only invalidate registers of the current
8146 process.
8147 (init_register_cache): Add target_desc parameter, and use it.
8148 (new_register_cache): Ditto. Assert the target description has a
8149 non zero registers_size.
8150 (regcache_cpy): Add assertions. Adjust.
8151 (realloc_register_cache, set_register_cache): Delete.
8152 (registers_to_string, registers_from_string): Adjust.
8153 (find_register_by_name, find_regno, find_register_by_number)
8154 (register_cache_size): Add target_desc parameter, and use it.
8155 (free_register_cache_thread, free_register_cache_thread_one)
8156 (regcache_release, register_cache_size): New.
8157 (register_size): Add target_desc parameter, and use it.
8158 (register_data, supply_register, supply_register_zeroed)
8159 (supply_regblock, supply_register_by_name, collect_register)
8160 (collect_register_as_string, collect_register_by_name): Adjust.
8161 * regcache.h (struct target_desc): Forward declare.
8162 (struct regcache) <tdesc>: New field.
8163 (init_register_cache, new_register_cache): Add target_desc
8164 parameter.
8165 (regcache_invalidate_thread): Declare.
8166 (regcache_invalidate_one): Delete declaration.
8167 (regcache_release): Declare.
8168 (find_register_by_number, register_cache_size, register_size)
8169 (find_regno): Add target_desc parameter.
8170 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8171 declarations.
8172 * remote-utils.c: Include tdesc.h.
8173 (outreg, prepare_resume_reply): Adjust.
8174 * server.c: Include tdesc.h.
8175 (gdbserver_xmltarget): Delete declaration.
8176 (get_features_xml, process_serial_event): Adjust.
8177 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8178 declare.
8179 (struct process_info) <tdesc>: New field.
8180 (ipa_tdesc): Declare.
8181 * tdesc.c: New file.
8182 * tdesc.h: New file.
8183 * tracepoint.c: Include tdesc.h.
8184 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8185 (get_context_regcache): Adjust to pass ipa_tdesc down.
8186 (do_action_at_tracepoint): Adjust to get the register cache size
8187 from the context regcache's description.
8188 (traceframe_walk_blocks): Adjust to get the register cache size
8189 from the current trace frame's description.
8190 (traceframe_get_pc): Adjust to get current trace frame's
8191 description and pass it down.
8192 (gdb_collect): Adjust to get the register cache size from the
8193 IPA's description.
8194 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8195 (gdbserver_xmltarget): Delete.
8196 (initialize_low_tracepoint): Set the ipa's target description.
8197 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8198 (initialize_low_tracepoint): Set the ipa's target description.
8199 * linux-x86-low.c: Include tdesc.h.
8200 [__x86_64__] (is_64bit_tdesc): New.
8201 (ps_get_thread_area, x86_get_thread_area): Use it.
8202 (i386_cannot_store_register): Rename to ...
8203 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8204 (i386_cannot_fetch_register): Rename to ...
8205 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8206 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8207 to new interface.
8208 (target_regsets): Rename to ...
8209 (x86_regsets): ... this.
8210 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8211 interface.
8212 (x86_siginfo_fixup): Use is_64bit_tdesc.
8213 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8214 (tdesc_x32_avx_linux, tdesc_x32_linux)
8215 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8216 Declare.
8217 (x86_linux_update_xmltarget): Delete.
8218 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8219 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8220 (AMD64_LINUX_USER64_CS): New.
8221 (x86_linux_read_description): New, based on
8222 x86_linux_update_xmltarget.
8223 (same_process_callback): New.
8224 (x86_arch_setup_process_callback): New.
8225 (x86_linux_update_xmltarget): New.
8226 (x86_regsets_info): New.
8227 (amd64_linux_regs_info): New.
8228 (i386_linux_usrregs_info): New.
8229 (i386_linux_regs_info): New.
8230 (x86_linux_regs_info): New.
8231 (x86_arch_setup): Reimplement.
8232 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8233 (x86_emit_ops): Ditto.
8234 (the_low_target): Adjust. Install x86_linux_regs_info,
8235 x86_cannot_fetch_register, and x86_cannot_store_register.
8236 (initialize_low_arch): New.
8237 * linux-ia64-low.c (tdesc_ia64): Declare.
8238 (ia64_fetch_register): Adjust.
8239 (ia64_usrregs_info, regs_info): New globals.
8240 (ia64_regs_info): New function.
8241 (the_low_target): Adjust.
8242 (initialize_low_arch): New function.
8243 * linux-sparc-low.c (tdesc_sparc64): Declare.
8244 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8245 Adjust.
8246 (sparc_arch_setup): New function.
8247 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8248 (the_low_target): Adjust.
8249 (initialize_low_arch): New function.
8250 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8251 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8252 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8253 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8254 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8255 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8256 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8257 (tdesc_powerpc_isa205_vsx64l): Declare.
8258 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8259 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8260 (ppc_set_pc, ppc_get_hwcap): Adjust.
8261 (ppc_usrregs_info): Forward declare.
8262 (!__powerpc64__) ppc_regmap_adjusted: New global.
8263 (ppc_arch_setup): Adjust to the current process'es target
8264 description.
8265 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8266 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8267 (ppc_store_evrregset): Adjust.
8268 (target_regsets): Rename to ...
8269 (ppc_regsets): ... this, and make static.
8270 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8271 (ppc_regs_info): New function.
8272 (the_low_target): Adjust.
8273 (initialize_low_arch): New function.
8274 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8275 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8276 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8277 (tdesc_s390x_linux64v2): Declare.
8278 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8279 (s390_fill_gregset, s390_store_last_break): Adjust.
8280 (target_regsets): Rename to ...
8281 (s390_regsets): ... this, and make static.
8282 (s390_get_pc, s390_set_pc): Adjust.
8283 (s390_get_hwcap): New target_desc parameter, and use it.
8284 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8285 (s390_arch_setup): Adjust to set the current process'es target
8286 description. Don't adjust the regmap.
8287 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8288 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8289 (regs_info_3264): New globals.
8290 (s390_regs_info): New function.
8291 (the_low_target): Adjust.
8292 (initialize_low_arch): New function.
8293 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8294 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8295 [__mips64] (init_registers_mips_linux)
8296 (init_registers_mips_dsp_linux): Delete defines.
8297 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8298 (have_dsp): New global.
8299 (mips_read_description): New, based on mips_arch_setup.
8300 (mips_arch_setup): Reimplement.
8301 (get_usrregs_info): New function.
8302 (mips_cannot_fetch_register, mips_cannot_store_register)
8303 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8304 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8305 (target_regsets): Rename to ...
8306 (mips_regsets): ... this, and make static.
8307 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8308 (dsp_regs_info, regs_info): New globals.
8309 (mips_regs_info): New function.
8310 (the_low_target): Adjust.
8311 (initialize_low_arch): New function.
8312 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8313 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8314 Declare.
8315 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8316 (arm_read_description): New, with bits factored from
8317 arm_arch_setup.
8318 (arm_arch_setup): Reimplement.
8319 (target_regsets): Rename to ...
8320 (arm_regsets): ... this, and make static.
8321 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8322 (arm_regs_info): New function.
8323 (the_low_target): Adjust.
8324 (initialize_low_arch): New function.
8325 * linux-m68k-low.c (tdesc_m68k): Declare.
8326 (target_regsets): Rename to ...
8327 (m68k_regsets): ... this, and make static.
8328 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8329 (m68k_regs_info): New function.
8330 (m68k_arch_setup): New function.
8331 (the_low_target): Adjust.
8332 (initialize_low_arch): New function.
8333 * linux-sh-low.c (tdesc_sharch): Declare.
8334 (target_regsets): Rename to ...
8335 (sh_regsets): ... this, and make static.
8336 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8337 (sh_regs_info, sh_arch_setup): New functions.
8338 (the_low_target): Adjust.
8339 (initialize_low_arch): New function.
8340 * linux-bfin-low.c (tdesc_bfin): Declare.
8341 (bfin_arch_setup): New function.
8342 (bfin_usrregs_info, regs_info): New globals.
8343 (bfin_regs_info): New function.
8344 (the_low_target): Adjust.
8345 (initialize_low_arch): New function.
8346 * linux-cris-low.c (tdesc_cris): Declare.
8347 (cris_arch_setup): New function.
8348 (cris_usrregs_info, regs_info): New globals.
8349 (cris_regs_info): New function.
8350 (the_low_target): Adjust.
8351 (initialize_low_arch): New function.
8352 * linux-cris-low.c (tdesc_crisv32): Declare.
8353 (cris_arch_setup): New function.
8354 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8355 (cris_regs_info): New function.
8356 (the_low_target): Adjust.
8357 (initialize_low_arch): New function.
8358 * linux-m32r-low.c (tdesc_m32r): Declare.
8359 (m32r_arch_setup): New function.
8360 (m32r_usrregs_info, regs_info): New globals.
8361 (m32r_regs_info): Adjust.
8362 (initialize_low_arch): New function.
8363 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8364 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8365 (tic6x_usrregs_info): Forward declare.
8366 (tic6x_read_description): New function, based on ...
8367 (tic6x_arch_setup): ... this. Reimplement.
8368 (target_regsets): Rename to ...
8369 (tic6x_regsets): ... this, and make static.
8370 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8371 (tic6x_regs_info): New function.
8372 (the_low_target): Adjust.
8373 (initialize_low_arch): New function.
8374 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8375 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8376 (target_regsets): Rename to ...
8377 (xtensa_regsets): ... this, and make static.
8378 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8379 globals.
8380 (xtensa_arch_setup, xtensa_regs_info): New functions.
8381 (the_low_target): Adjust.
8382 (initialize_low_arch): New function.
8383 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8384 (nios2_arch_setup): Set the current process'es tdesc.
8385 (target_regsets): Rename to ...
8386 (nios2_regsets): ... this.
8387 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8388 (nios2_regs_info): New function.
8389 (the_low_target): Adjust.
8390 (initialize_low_arch): New function.
a261b8f5
PA
8391 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8392 (aarch64_arch_setup): Set the current process'es tdesc.
8393 (target_regsets): Rename to ...
8394 (aarch64_regsets): ... this.
8395 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8396 (aarch64_regs_info): New function.
8397 (the_low_target): Adjust.
8398 (initialize_low_arch): New function.
3aee8918
PA
8399 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8400 globals.
8401 (target_regsets): Rename to ...
8402 (tile_regsets): ... this.
8403 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8404 (tile_regs_info): New function.
8405 (tile_arch_setup): Set the current process'es tdesc.
8406 (the_low_target): Adjust.
8407 (initialize_low_arch): New function.
8408 * spu-low.c (tdesc_spu): Declare.
8409 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8410 * win32-arm-low.c (tdesc_arm): Declare.
8411 (arm_arch_setup): New function.
8412 (the_low_target): Install arm_arch_setup instead of
8413 init_registers_arm.
8414 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8415 (init_windows_x86): Rename to ...
8416 (i386_arch_setup): ... this. Set `win32_tdesc'.
8417 (the_low_target): Adjust.
8418 * win32-low.c (win32_tdesc): New global.
8419 (child_add_thread): Don't create the thread cache here.
8420 (do_initial_child_stuff): Set the new process'es tdesc.
8421 * win32-low.h (struct target_desc): Forward declare.
8422 (win32_tdesc): Declare.
8423 * lynx-i386-low.c (tdesc_i386): Declare global.
8424 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8425 * lynx-low.c (lynx_tdesc): New global.
8426 (lynx_add_process): Set the new process'es tdesc.
8427 * lynx-low.h (struct target_desc): Forward declare.
8428 (lynx_tdesc): Declare global.
8429 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8430 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8431 * nto-low.c (nto_tdesc): New global.
8432 (do_attach): Set the new process'es tdesc.
8433 * nto-low.h (struct target_desc): Forward declare.
8434 (nto_tdesc): Declare.
8435 * nto-x86-low.c (tdesc_i386): Declare.
8436 (nto_x86_arch_setup): Set `nto_tdesc'.
8437
b1fbec62
GB
84382013-06-04 Gary Benson <gbenson@redhat.com>
8439
8440 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8441 to qSupported response when appropriate.
8442 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8443 with nonzero-length annex.
8444 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8445 arguments supplied in annex.
8446
d1ec4ce7
DE
84472013-05-31 Doug Evans <dje@google.com>
8448
ac44adcb 8449 PR server/15594
d1ec4ce7
DE
8450 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8451 64 bits in 64-cross-32 environment.
8452
9b25f2d3
PA
84532013-05-28 Pedro Alves <palves@redhat.com>
8454
8455 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8456 (aarch64-without-fpu.c): Delete rule.
8457 * configure.srv (aarch64*-*-linux*): Remove references to
8458 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8459 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8460 declaration.
8461
6740dc9c
PA
84622013-05-24 Pedro Alves <palves@redhat.com>
8463
8464 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8465 instead of strchr/decode_address. Error if the range isn't split
8466 with a ','. Don't assume there's be a ':' in the action.
8467
c2d6af84
PA
84682013-05-23 Yao Qi <yao@codesourcery.com>
8469 Pedro Alves <palves@redhat.com>
8470
8471 * linux-low.c (lwp_in_step_range): New function.
8472 (linux_wait_1): If the thread was range stepping and stopped
8473 outside the stepping range, report the stop to GDB. Otherwise,
8474 continue stepping. Add range stepping debug output.
8475 (linux_set_resume_request): Copy the step range from the resume
8476 request to the lwp.
8477 (linux_supports_range_stepping): New.
8478 (linux_target_ops) <supports_range_stepping>: Set to
8479 linux_supports_range_stepping.
8480 * linux-low.h (struct linux_target_ops)
8481 <supports_range_stepping>: New field.
8482 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8483 * linux-x86-low.c (x86_supports_range_stepping): New.
8484 (the_low_target) <supports_range_stepping>: Set to
8485 x86_supports_range_stepping.
8486 * server.c (handle_v_cont): Handle 'r' action.
8487 (handle_v_requests): Append ";r" if the target supports range
8488 stepping.
8489 * target.h (struct thread_resume) <step_range_start,
8490 step_range_end>: New fields.
8491 (struct target_ops) <supports_range_stepping>:
8492 New field.
8493 (target_supports_range_stepping): New macro.
8494
58794e1a
JB
84952013-05-17 Joel Brobecker <brobecker@adacore.com>
8496
8497 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8498 confusion in comment.
8499
d631c5a7
JB
85002013-05-17 Joel Brobecker <brobecker@adacore.com>
8501
8502 * lynx-low.c (struct process_info_private): New type.
8503 (lynx_add_process): New function.
8504 (lynx_create_inferior, lynx_attach): Replace calls to
8505 add_process by calls to lynx_add_process.
8506 (lynx_resume): If PTID is null, then try using
8507 current_process()->private->last_wait_event_ptid.
8508 Add comments.
8509 (lynx_clear_inferiors): Delete. The contents of that function
8510 has been inlined in lynx_mourn;
8511 (lynx_wait_1): Save the ptid in the process's private data.
8512 (lynx_mourn): Free the process' private data. Replace call
8513 to lynx_clear_inferiors by call to clear_inferiors.
8514
96f7a20f
YQ
85152013-05-17 Yao Qi <yao@codesourcery.com>
8516
8517 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8518 the right place.
8519
db0dfaa0
LM
85202013-05-16 Luis Machado <lgustavo@codesourcery.com>
8521
8522 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8523 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8524 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8525 PT_TEXT_END_ADDR guards. Update comments.
8526 (linux_target_op) <read_offsets>: Conditionally define to
8527 linux_read_offsets if the target is UCLIBC and if it defines
8528 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8529
68f5f838
SL
85302013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8531 Andrew Jenner <andrew@codesourcery.com>
8532
8533 * Makefile.in (SFILES): Add linux-nios2-low.c.
8534 (clean): Add action to delete nios2-linux.c.
8535 (nios2-linux.c): New rule.
8536 * configure.srv: Add nios2*-*-linux*.
8537 * linux-nios2-low.c: New.
8538
1ebff1fd
HAQ
85392013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8540
8541 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8542
f6150862
HZ
85432013-04-25 Hui Zhu <hui@codesourcery.com>
8544
8545 PR gdb/15186
f6150862
HZ
8546 * ax.c (ax_printf): Add fflush.
8547
614c279d
TT
85482013-04-22 Tom Tromey <tromey@redhat.com>
8549
8550 * Makefile.in (SFILES): Add filestuff.c.
8551 (OBS): Add filestuff.o.
8552 (filestuff.o): New target.
8553 * config.in, configure: Rebuild.
8554 * configure.ac: Check for fdwalk, pipe2.
8555
7d4e5717
PA
85562013-04-17 Pedro Alves <palves@redhat.com>
8557
8558 * configure.ac (USE_THREAD_DB): Delete variable.
8559 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8560 Don't AC_SUBST USE_THREAD_DB.
8561 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8562 * config.in, configure: Regenerate.
8563
d5c93e41
PA
85642013-04-16 Pedro Alves <palves@redhat.com>
8565
8566 * linux-low.h (struct lwp_info) <thread_known>: Move under
8567 the USE_THREAD_DB #ifdef.
8568
04f5fe89
PA
85692013-04-16 Pedro Alves <palves@redhat.com>
8570
8571 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8572 (linux-low.o): Delete rule.
8573 * linux-low.h: Always include "gdb_thread_db.h" instead of
8574 conditionally including thread_db.h.
8575 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8576 HAVE_THREAD_DB_H.
8577
480b27bf
JK
85782013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8579
8580 * Makefile.in (install-only): Fix make install regression.
8581
43662968
JK
85822013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8583
8584 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8585 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8586 installation.
8587 * gdbserver.1: Remove.
8588
3e74e146
PA
85892013-03-22 Pedro Alves <palves@redhat.com>
8590
8591 * linux-low.c (handle_extended_wait): Don't call
8592 linux_enable_event_reporting.
8593
a8347a2a
TT
85942013-03-15 Tony Theodore <tonyt@logyst.com>
8595
8596 PR build/9098:
8597 * Makefile.in (SHELL): Use @SHELL@.
8598
eeb56fa7
SDJ
85992013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8600
8601 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8602 compiler warning.
8603
4fa7e2ff
JB
86042013-03-13 Joel Brobecker <brobecker@adacore.com>
8605
8606 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8607 Remove extraneous NULL element.
8608
8ddb1965
YQ
86092013-03-13 Yao Qi <yao@codesourcery.com>
8610
8611 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8612 'V' block in trace frame.
8613
9accd112
MM
86142013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8615
8616 * target.h (struct target_ops): Add btrace ops.
8617 (target_supports_btrace): New macro.
8618 (target_enable_btrace): New macro.
8619 (target_disable_btrace): New macro.
8620 (target_read_btrace): New macro.
8621 * gdbthread.h (struct thread_info): Add btrace field.
8622 * server.c: Include btrace-common.h.
8623 (handle_btrace_general_set): New function.
8624 (handle_btrace_enable): New function.
8625 (handle_btrace_disable): New function.
8626 (handle_general_set): Call handle_btrace_general_set.
8627 (handle_qxfer_btrace): New function.
8628 (struct qxfer qxfer_packets[]): Add btrace entry.
8629 * inferiors.c (remove_thread): Disable btrace.
8630 * linux-low: Include linux-btrace.h.
8631 (linux_low_enable_btrace): New function.
8632 (linux_low_read_btrace): New function.
8633 (linux_target_ops): Add btrace ops.
8634 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8635 Add srv_linux_btrace=yes.
8636 (x86_64-*-linux*): Add linux-btrace.o.
8637 Add srv_linux_btrace=yes.
8638 * configure.ac: Define HAVE_LINUX_BTRACE.
8639 * config.in: Regenerated.
8640 * configure: Regenerated.
8641
5cc22e4c
MM
86422013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8643
8644 * server.c (handle_qxfer): Preserve error message if -3 is
8645 returned.
8646 (qxfer): Document the -3 return value.
8647
7c97f91e
MM
86482013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8649
8650 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8651 (linux_btrace_h): New variable.
8652 (linux-btrace.o): New rule.
8653
be9a119c 86542013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8655 Hafiz Abid Qadeer <abidh@codesourcery.com>
8656
8657 * tracepoint.c (trace_buffer_size): New global.
8658 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8659 (init_trace_buffer): Change to one-argument function. Allocate
8660 trace buffer memory.
8661 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8662 handle QTBuffer:size packet.
8663 (cmd_bigqtbuffer_size): New function.
8664 (initialize_tracepoint): Call init_trace_buffer with
8665 DEFAULT_TRACE_BUFFER_SIZE.
8666 * server.c (handle_query): Add QTBuffer:size in the
8667 supported packets.
8668
e64f7499
YQ
86692013-03-07 Yao Qi <yao@codesourcery.com>
8670
8671 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8672 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8673 of -1.
8674 (cmd_qtsp): Adjust condition. Do post increment.
8675 Set cur_action and cur_step_action back to 0.
8676
f0ae6fc3
PA
86772013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8678
8679 PR server/15236
8680 * linux-low.c (linux_write_memory): Return early success if LEN is
8681 zero.
8682
b5b0b0af
CV
86832013-03-05 Corinna Vinschen <vinschen@redhat.de>
8684
334ad4a8 8685 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8686
589bc927
TT
86872013-02-28 Tom Tromey <tromey@redhat.com>
8688
8689 * configure.ac: Invoke AC_SYS_LARGEFILE.
8690 * configure, config.in: Rebuild.
8691
dfe07582
CV
86922013-02-28 Corinna Vinschen <vinschen@redhat.com>
8693
8694 * win32-low.c: Throughout, fix format strings and casts of
8695 printf-like functions to avoid type related warnings on all
8696 platforms.
8697 (get_child_debug_event): Print dwDebugEventCode as hex since
8698 that's how it's usually documented.
8699
736cd585
YQ
87002013-02-28 Yao Qi <yao@codesourcery.com>
8701
8702 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8703 pulongest.
8704
e1f58301
JW
87052013-02-27 Jiong Wang <jiwang@tilera.com>
8706
8707 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8708 (reg-tilegx32.c): New rule.
8709 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8710 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8711 different register info initializer according to elf class.
8712 (init_registers_tilgx32): New function. The tilegx32 register info
8713 initializer.
8714 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8715 (tile_store_gregset): Likewise.
8716
d171ca78
YQ
87172013-02-27 Yao Qi <yao@codesourcery.com>
8718
8719 * server.c (process_point_options): Print debug message when
8720 debug_threads is true.
8721
282bbdf3
YQ
87222013-02-26 Yao Qi <yao@codesourcery.com>
8723
8724 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8725
aca22551
PA
87262013-02-19 Pedro Alves <palves@redhat.com>
8727 Kai Tietz <ktietz@redhat.com>
8728
8729 PR gdb/15161
8730
8731 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8732 instead of strtoul to extract address from packet.
8733 (process_serial_event) <'z'>: Likewise.
8734
4f3cee1c
YQ
87352013-02-18 Yao Qi <yao@codesourcery.com>
8736
8737 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8738
8e1d55a3
PA
87392013-02-14 Pedro Alves <palves@redhat.com>
8740
8741 Plug memory leak.
8742
8743 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8744 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8745
458820da
PA
87462013-02-14 Pedro Alves <palves@redhat.com>
8747
8748 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8749
baea0dae
PA
87502013-02-14 Pedro Alves <palves@redhat.com>
8751
8752 * tracepoint.c (save_string): Delete.
8753 (add_tracepoint_action): Use savestring instead of save_string.
8754
0b1afbb3
PA
87552013-02-12 Pedro Alves <palves@redhat.com>
8756
8757 * linux-xtensa-low.c: Ditto.
8758 * xtensa-xtregs.c: Ditto.
8759
8a4ac37e
PA
87602013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8761
8762 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8763 thread_db.
8764
148de6bb
MS
87652013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8766
8767 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8768 aarch64_num_wp_regs and aarch64_num_bp_regs to
8769 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8770
55fac6e0
MS
87712013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8772
8773 * linux-aarch64-low.c (ps_get_thread_area): Replace
8774 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8775
176eb98c
MS
87762013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8777 Marcus Shawcroft <marcus.shawcroft@arm.com>
8778 Nigel Stephens <nigel.stephens@arm.com>
8779 Yufeng Zhang <yufeng.zhang@arm.com>
8780
8781 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8782 (aarch64.c, aarch64-without-fpu.c): New targets.
8783 * configure.srv (aarch64*-*-linux*): New.
8784 * linux-aarch64-low.c: New file.
8785
56f7af9c
MS
87862013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8787
43aaf8b6 8788 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8789 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8790 (dequeue_one_deferred_signal, linux_resume_one_thread)
8791 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8792 (linux_tracefork_grandchild, linux_test_for_tracefork)
8793 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8794 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8795 where the argument is 0.
8796
60f662b0
YQ
87972013-01-25 Yao Qi <yao@codesourcery.com>
8798
8799 * event-loop.c: Include "queue.h".
8800 (gdb_event_p): New typedef.
8801 (struct gdb_event) <next_event>: Remove.
8802 (event_queue): Change to QUEUE(gdb_event_p).
8803 (async_queue_event): Remove.
8804 (gdb_event_xfree): New.
8805 (initialize_event_loop): New.
8806 (process_event): Use API from QUEUE.
8807 (wait_for_event): Likewise.
8808 * server.c (main): Call initialize_event_loop.
8809 * server.h (initialize_event_loop): Declare.
8810
5ae4861a
YQ
88112013-01-18 Yao Qi <yao@codesourcery.com>
8812
8813 * ax.h (struct eval_agent_expr_context): New.
8814 (gdb_eval_agent_expr): Update declaration.
8815 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8816 TFRAME. Add new argument CTX.
8817 * server.h (struct eval_agent_expr_context): Declare.
8818 (agent_mem_read, agent_tsv_read): Update declaration.
8819 (agent_mem_read_string): Likewise.
8820 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8821 (add_traceframe_block): Add new argument TPOINT.
8822 Increase TPOINT->traceframe_usage.
8823 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8824 eval_tracepoint_agent_expr.
8825 (condition_true_at_tracepoint): Likewise.
8826 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8827 (agent_mem_read_string, agent_tsv_read): Likewise.
8828
85e00e85
YQ
88292013-01-16 Yao Qi <yao@codesourcery.com>
8830
8831 * linux-low.c (linux_resume_one_lwp): Don't check
8832 'lwp->bp_reinsert != 0'.
8833
4039cf45
JB
88342013-01-07 Joel Brobecker <brobecker@adacore.com>
8835 Pedro Alves <palves@redhat.com>
8836
8837 * lynx-low.c (ptrace_request_to_str): Define a temporary
8838 macro and use it to simplify this function's implementation.
8839
9044dee2
JB
88402013-01-07 Joel Brobecker <brobecker@adacore.com>
8841
8842 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8843 sets errno.
8844
e6352c8f
JB
88452013-01-07 Joel Brobecker <brobecker@adacore.com>
8846
8847 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8848
50681a27
JB
88492013-01-07 Joel Brobecker <brobecker@adacore.com>
8850
8851 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8852
3f6e77ef
JB
88532013-01-07 Joel Brobecker <brobecker@adacore.com>
8854
8855 * lynx-low.c (lynx_resume): Use the resume_info parameter
8856 to determine the ptid for the lynx_ptrace call, unless
8857 it is equal to minus_one_ptid, in which case we use the
8858 ptid of the current_inferior.
8859 (lynx_wait_1): After having received a thread create/exit
8860 event, resume the inferior's execution using the signaling
8861 thread's ptid, rather than the old ptid.
8862
7fda33ae
JB
88632013-01-07 Joel Brobecker <brobecker@adacore.com>
8864
8865 * lynx-low.c (lynx_resume): Delete variable ret.
8866
b9786c74
JB
88672013-01-01 Joel Brobecker <brobecker@adacore.com>
8868
8869 * gdbreplay.c (gdbreplay_version): Update copyright year.
8870 * server.c (gdbserver_version): Likewise.
8871
8b93d60f
JB
88722012-12-17 Joel Brobecker <brobecker@adacore.com>
8873
8874 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8875 new thread.
8876
037335a7
JB
88772012-12-17 Joel Brobecker <brobecker@adacore.com>
8878
8879 * lynx-low.c (ptrace_request_to_str): Add handling for
8880 PTRACE_GETTRACESIG.
8881
52d4cbd8
JB
88822012-12-17 Joel Brobecker <brobecker@adacore.com>
8883
8884 * lynx-low.c (lynx_attach): Delete variable new_process.
8885
ab8f6ca9
JB
88862012-12-17 Joel Brobecker <brobecker@adacore.com>
8887
8888 * lynx-low.c (lynx_create_inferior): Delete variable
8889 new_process.
8890
78cbc024
JB
88912012-12-17 Joel Brobecker <brobecker@adacore.com>
8892
8893 * lynx-low.c (ptrace_request_to_str): Do not handle
8894 PTRACE_GETTHREADLIST if this macro does not exist.
8895
14a00470
YQ
88962012-12-15 Yao Qi <yao@codesourcery.com>
8897
8898 * Makefile.in (OBS): Add notif.o.
8899 * notif.c, notif.h: New.
8900 * server.c: Include "notif.h".
8901 (struct vstop_notif) <next>: Remove.
8902 <base>: New field.
8903 (queue_stop_reply): Update.
8904 (push_event, send_next_stop_reply): Remove.
8905 (discard_queued_stop_replies): Update.
8906 (notif_stop): New variable.
8907 (handle_v_stopped): Remove.
8908 (handle_v_requests): Don't call handle_v_stopped. Call
8909 handle_ack_notif instead.
8910 (queue_stop_reply_callback): Call notif_event_enque instead
8911 of queue_stop_reply.
8912 (handle_status): Don't call send_next_stop_reply, call
8913 notif_write_event instead.
8914 (kill_inferior_callback): Likewise.
8915 (detach_or_kill_inferior_callback): Likewise.
8916 (main): Call initialize_notif.
8917 (process_serial_event): Call QUEUE_is_empty.
8918 (handle_target_event): Call notif_push instead of push event.
8919 * server.h (push_event): Remove declaration.
8920
61c125b9
TT
89212012-12-10 Tom Tromey <tromey@redhat.com>
8922
8923 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8924 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8925 macros.
8926 (.c.o): Rewrite.
8927 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8928 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8929 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8930 (amd64-linux-ipa.o, ax.o): Rewrite.
8931 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8932 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8933 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8934 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8935 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8936 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8937 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8938 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8939 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8940 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8941 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8942 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8943 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8944 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8945 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8946 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8947 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8948 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8949 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8950 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8951 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8952 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8953 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8954 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8955 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8956 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8957 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8958 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8959 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8960 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8961 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8962 (reg-tilegx.o): Remove.
8963 (all_object_files): New macro.
8964 Include .deps files.
8965 * aclocal.m4, configure: Rebuild.
8966 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8967 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8968 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8969
e90e9ad9
TT
89702012-12-05 Tom Tromey <tromey@redhat.com>
8971
8972 PR gdb/14917:
8973 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8974
02d403bf 89752012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8976
8977 * configure.ac: Check for linux/perf_event.h.
8978 * config.in: Regenerated.
8979 * configure: Regenerated.
8980
0270a750
PA
89812012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8982
8983 * hostio.c (handle_readlink): Decrease buffer size
8984 parameter passed to readlink by one byte.
8985
8c29b58e
YQ
89862012-11-26 Yao Qi <yao@codesourcery.com>
8987
8988 * configure.ac (build_warnings): Append '-Wempty-body'.
8989 * configure: Regenerated.
8990 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8991 body.
8992
8bdce1ff
PM
89932012-11-15 Pierre Muller <muller@sourceware.org>
8994
8995 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8996 * config.in: Regenerate.
8997 * configure: Regenerate.
8998 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8999 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9000 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9001 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9002 header.
9003 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9004 instead of <sys/wait.h> header.
9005 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9006
02d403bf 90072012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
9008
9009 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9010 (various make rules): Remove -DGDBSERVER
9011
fbd5db48
YQ
90122012-11-09 Yao Qi <yao@codesourcery.com>
9013
9014 * spu-low.c (current_ptid): Move it to ..
9015 * gdbthread.h: ... here. New.
9016 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9017 * server.c (myresume, process_serial_event): Likewise.
9018 * thread-db.c (thread_db_find_new_threads): Likewise.
9019 * tracepoint.c (run_inferior_command): Likewise.
9020
b3dc46ff
AB
90212012-10-01 Andrew Burgess <aburgess@broadcom.com>
9022
9023 * server.c (handle_search_memory_1): Include access length in
9024 warning message.
9025
07c04788
HPN
90262012-09-05 Michael Brandt <michael.brandt@axis.com>
9027
9028 * linux-crisv32-low.c: Fix compile errors.
9029
918d227b
YQ
90302012-09-04 Yao Qi <yao@codesourcery.com>
9031
9032 * tracepoint.c (cmd_qtsv): Adjust debug message.
9033 Don't check CUR_TPOINT.
9034
18c1b81a
YQ
90352012-08-28 Yao Qi <yao@codesourcery.com>
9036
9037 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9038 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9039 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9040 Remove declarations of xmalloc, xreallloc, xstrdup and
9041 freeargv.
9042 * Makefile.in (libiberty_h): New.
9043 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9044 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9045
dc82f37b
YQ
90462012-08-23 Yao Qi <yao@codesourcery.com>
9047
9048 * server.h: Remove declaration of 'xsnprintf'.
9049
406b1477
KS
90502012-08-22 Keith Seitz <keiths@redhat.com>
9051
9052 * server.h: Include build-gnulib-gbserver/config.h.
9053 * gdbreplay.c: Likewise.
9054
e6712ff1
DE
90552012-08-08 Doug Evans <dje@google.com>
9056
9057 * Makefile.in (SFILES): Add gdb_vecs.c.
9058 (OBS): Add gdb_vecs.o.
9059 (gdb_vecs_h, host_defs_h): New variables.
9060 (thread-db.o): Add $(gdb_vecs_h) dependency.
9061 (gdb_vecs.o): New rule.
9062 * thread-db.c: #include "gdb_vecs.h".
9063 (thread_db_load_search): Use a vector to iterate over path elements.
9064 Handle text appearing after "$pdir".
9065
9066 * configure.ac: Add check for strstr.
9067 * config.in: Regenerate.
9068 * configure: Regenerate.
9069
7c3270ae
UW
90702012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9071
9072 * hostio.c (handle_pread): If pread fails, fall back to attempting
9073 lseek/read.
9074 (handle_pwrite): Likewise for pwrite.
9075
b62e2b27
UW
90762012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9077
9078 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9079 between unsupported TYPE and unimplementable ADDR/LEN combination.
9080 (arm_insert_point): Act on new return value.
9081
78a99e91
PA
90822012-07-31 Pedro Alves <palves@redhat.com>
9083
9084 * server.c (process_point_options): Only skip tokens if we find
9085 one that is unrecognized. Don't treat 'X' specially while
9086 skipping unrecognized tokens.
9087
fcf303ab
UW
90882012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9089
9090 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9091 to 4-byte-align HW breakpoint addresses for Thumb.
9092
7255706c
YQ
90932012-07-27 Yao Qi <yao@codesourcery.com>
9094
9095 PR remote/14161.
9096
9097 * server.h: Declare gdb_agent_about_to_close.
9098 * target.c (kill_inferior): Include "agent.h".
9099 New. Send command 'kill'.
9100 * target.h (kill_inferior): Removed macro.
9101 * tracepoint.c (gdb_agent_about_to_close): New.
9102 (gdb_agent_helper_thread): Handle command 'close'.
9103 Wait endlessly until the inferior stops.
9104 Install gdb_agent_remove_socket to atexit hook.
9105 (agent_socket_name): New static variable.
9106 (gdb_agent_socket_init): Replace local variable 'name' with
9107 'agent_socket_name'.
9108 (gdb_agent_remove_socket): New.
9109
5a3f286f
YQ
91102012-07-27 Yao Qi <yao@codesourcery.com>
9111
9112 * server.c (process_point_options): Stop at 'X' when parsing.
9113
961bd387
ME
91142012-07-19 Michael Eager <eager@eagercon.com>
9115
a261b8f5 9116 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
9117 to hw_execute.
9118 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9119 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9120 hardware breakpoint.
9121
aa7c7447
JK
91222012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9123
9124 * gdbserver/linux-low.c (initialize_low): Call
9125 linux_ptrace_init_warnings.
9126
7f216e7c
DE
91272012-07-02 Doug Evans <dje@google.com>
9128
9129 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9130 pointer to int.
9131
d3ce09f5
SS
91322012-07-02 Stan Shebs <stan@codesourcery.com>
9133
9134 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9135 (ax.o): Add it to build rule.
9136 (ax-ipa.o): Ditto.
9137 (OBS): Add format.o.
9138 (IPA_OBS): Add format.o.
9139 * server.c (handle_query): Claim support for breakpoint commands.
9140 (process_point_options): Add command case.
9141 (process_serial_event): Leave running if there are printfs in
9142 effect.
9143 * mem-break.h (any_persistent_commands): Declare.
9144 (add_breakpoint_commands): Declare.
9145 (gdb_no_commands_at_breakpoint): Declare.
9146 (run_breakpoint_commands): Declare.
9147 * mem-break.c (struct point_command_list): New struct.
9148 (struct breakpoint): New field command_list.
9149 (any_persistent_commands): New function.
9150 (add_commands_to_breakpoint): New function.
9151 (add_breakpoint_commands): New function.
9152 (gdb_no_commands_at_breakpoint): New function.
9153 (run_breakpoint_commands): New function.
9154 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9155 locally.
9156 * ax.c: Include format.h.
9157 (ax_printf): New function.
9158 (gdb_eval_agent_expr): Add printf opcode.
9159
2f8f6aed
YQ
91602012-06-13 Yao Qi <yao@codesourcery.com>
9161
9162 * server.c (start_inferior): Remove duplicated writes to fields
9163 'last_resume_kind' and 'last_status' of 'current_inferior'.
9164
0c9070b3
YQ
91652012-06-12 Yao Qi <yao@codesourcery.com>
9166 Pedro Alves <palves@redhat.com>
9167
9168 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9169 comment.
9170 * server.c (handle_v_cont): Extend comment.
9171
c52daf70
YQ
91722012-06-11 Yao Qi <yao@codesourcery.com>
9173
9174 * linux-low.c (linux_attach): Add 'static'.
9175
d38bbb0a
YQ
91762012-06-06 Yao Qi <yao@codesourcery.com>
9177
9178 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9179
89dc0afd
JK
91802012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9181
9182 Fix gcc -flto compilation warning.
9183 * server.c (main): Make variable multi_mode and attach volatile.
9184
75f62ce7
TJB
91852012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9186
9187 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9188 if the platform doesn't know about it.
9189
65f479b6
PA
91902012-05-30 Jeff Kenton <jkenton@tilera.com>
9191
9192 * Makefile.in (SFILES): Add linux-tile-low.c.
9193 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9194 * configure.srv: Handle tilegx-*-linux*.
9195 * linux-tile-low.c: New file.
9196
0c5bf5a9
JK
91972012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9198
9199 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9200
a493e3e2
PA
92012012-05-24 Pedro Alves <palves@redhat.com>
9202
9203 PR gdb/7205
9204
43aaf8b6 9205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 9206
2ea28649
PA
92072012-05-24 Pedro Alves <palves@redhat.com>
9208
9209 PR gdb/7205
9210
9211 Replace target_signal with gdb_signal throughout.
9212
8d409d16
MR
92132012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9214
9215 * linux-low.c (linux_store_registers): Avoid the copying sequence
9216 when no data has been retrieved by ptrace.
9217
23512c01
MGD
92182012-05-22 Will Deacon <will.deacon@arm.com>
9219
9220 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9221 Include asm/ptrace.h.
9222 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9223 already defined.
9224
4934b29e
MR
92252012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9226
9227 * linux-low.c (linux_store_registers): Don't re-retrieve data
9228 with ptrace that has already been obtained from /proc. Always
9229 copy any data retrieved with ptrace to the buffer supplied.
9230
bde24c0a
PA
92312012-05-11 Yao Qi <yao@codesourcery.com>
9232 Pedro Alves <palves@redhat.com>
9233
9234 * linux-low.c (enum stopping_threads_kind): New.
9235 (stopping_threads): Change type to `enum stopping_threads_kind'.
9236 (handle_extended_wait): If stopping and suspending threads, leave
9237 the new_lwp suspended too.
9238 (linux_wait_for_event): Adjust.
9239 (stop_all_lwps): Set `stopping_threads' to
9240 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9241 whether we're suspending threads or just stopping them. Assert no
9242 recursion happens.
9243
623b6bdf
YQ
92442012-04-29 Yao Qi <yao@codesourcery.com>
9245
9246 * server.h: Move some code to ...
9247 * gdbthread.h: ... here. New.
9248 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9249 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9250 (nto-low.o, win32-low.o): Likewise.
9251 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9252 * regcache.c, remote-utils.c, server.c: Likewise.
9253 * target.c, tracepoint.c, win32-low.c: Likewise.
9254
f15f9948
TJB
92552012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9256
9257 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9258 (PTRACE_ARG4_TYPE): Likewise.
9259 (PTRACE_XFER_TYPE): Likewise.
9260 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9261 ptrace to PTRACE_ARG3_TYPE.
9262 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9263 (PTRACE_ARG4_TYPE): Likewise.
9264 (PTRACE_XFER_TYPE): Likewise.
9265 (linux_detach_one_lwp): Cast fourth argument of
9266 ptrace to long then PTRACE_ARG4_TYPE.
9267 (regsets_fetch_inferior_registers): Cast third argument of
9268 ptrace to long then PTRACE_ARG3_TYPE.
9269 (regsets_store_inferior_registers): Likewise.
9270
38ea300a
PA
92712012-04-20 Pedro Alves <palves@redhat.com>
9272
9273 * configure: Regenerate.
9274
c971b7fa
PA
92752012-04-19 Pedro Alves <palves@redhat.com>
9276
43aaf8b6 9277 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 9278 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
9279 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9280 (all, install-only, uninstall, clean-info, all-lib, clean): No
9281 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9282 (maintainer-clean realclean distclean): Use subdir_do.
9283 (subdir_do): New.
9284 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 9285 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
9286 * acinclude.m4: Include acx_configure_dir.m4.
9287 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9288 calls. Call AC_PROG_RANLIB. Configure gnulib using
9289 ACX_CONFIGURE_DIR.
9290 (GNULIB): New.
9291 (GNULIB_STDINT_H): Adjust.
9292 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9293 * gdbreplay.c: Include build-gnulib/config.h.
9294 * server.h: Likewise.
9295 * aclocal.m4: Regenerate.
9296 * config.in: Regenerate.
9297 * configure: Regenerate.
c971b7fa 9298
809277f8
PA
92992012-04-19 Pedro Alves <palves@redhat.com>
9300
9301 * Makefile.in (LIBGNU, INCGNU): Adjust.
9302 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9303 (all, install-only, uninstall, clean-info, all-lib, clean)
9304 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9305 * configure.ac: Adjust AC_OUTPUT output.
9306 * aclocal.m4: Regenerate.
9307 * configure: Regenerate.
9308
fd9bb8b8
PA
93092012-04-19 Pedro Alves <palves@redhat.com>
9310
9311 * Makefile.in (generated_files): New.
9312 (server_h): Remove the explicit dependency on config.h, and depend
9313 on $generated_files.
9314
1c298c66
PA
93152012-04-19 Pedro Alves <palves@redhat.com>
9316
9317 * Makefile.in (INCGNU): Add -Ignulib.
9318
57c4b50b
PA
93192012-04-19 Pedro Alves <palves@redhat.com>
9320
9321 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9322 (INCGNU): ... this, and spell out -I here.
9323 (GNULIB_LIB): Rename to ...
9324 (LIBGNU): ... this.
9325 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9326
1030e047
PA
93272012-04-19 Pedro Alves <palves@redhat.com>
9328
9329 * config.in: Regenerate.
9330
447d4319
PA
93312012-04-19 Pedro Alves <palves@redhat.com>
9332
9333 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9334 * server.h (memmem): Remove declaration.
9335 * config.in: Regenerate.
9336 * configure: Regenerate.
9337
aad9eab9
YQ
93382012-04-19 Yao Qi <yao@codesourcery.com>
9339
9340 * Makefile.in (SFILES): Add common/vec.c.
9341 (OBS): Add vec.o.
9342 (vec.o): New rule.
9343
3e10640f
YQ
93442012-04-19 Yao Qi <yao@codesourcery.com>
9345
9346 * remote-utils.c (prepare_resume_reply): Replace with macro
9347 target_core_of_thread.
9348 * server.c (handle_qxfer_threads_proper): Likewise.
9349 * target.h (traget_core_of_thread): New macro.
9350
71622373
PA
93512012-04-18 Pedro Alves <palves@redhat.com>
9352
9353 * aclocal.m4: Regenerate.
9354 * configure: Regenerate.
9355
80d26939
YQ
93562012-04-16 Yao Qi <yao@codesourcery.com>
9357
9358 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9359 duplicated on address.
9360
42476b70
YQ
93612012-04-16 Yao Qi <yao@codesourcery.com>
9362
9363 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9364 (struct tracepoint_action_ops) <send>: New field.
9365 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9366 (agent_expr_send, x_tracepoint_action_send): New.
9367 (l_tracepoint_action_send): New.
9368 (cmd_qtdp): Download and install tracepoint
9369 according to `use_agent'.
9370 (run_inferior_command): Add one more parameter `len'.
9371 Update callers.
9372 (tracepoint_send_agent): New.
9373 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9374
7bc83639
YQ
93752012-04-16 Yao Qi <yao@codesourcery.com>
9376
9377 * tracepoint.c (download_tracepoints): Moved to ...
9378 (cmd_qtstart): ... here.
9379
5f18041e
YQ
93802012-04-14 Yao Qi <yao@codesourcery.com>
9381
9382 * tracepoint.c: Include inttypes.h.
9383 (struct collect_memory_action): Use sized types.
9384 (struct tracepoint): Likewise.
9385 (cmd_qtdp, stop_tracing): Update print specifiers.
9386 (cmd_qtp, response_tracepoint): Likewise.
9387 (collect_data_at_tracepoint): Likewise.
9388 (collect_data_at_step): Likewise.
9389
55a8c076
YQ
93902012-04-14 Yao Qi <yao@codesourcery.com>
9391
9392 Import gnulib module inttypes.
9393 * aclocal.m4, config.in, configure: Regenerated.
9394
dc750257
YQ
93952012-04-14 Yao Qi <yao@codesourcery.com>
9396
9397 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9398 Makefile and config.status at last.
9399
0ab5faf9
YQ
94002012-04-13 Yao Qi <yao@codesourcery.com>
9401
9402 * tracepoint.c: Include stdint.h unconditionally.
9403
18f5fd81
TJB
94042012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9405
9406 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9407 on BFD_HAVE_SYS_PROCFS_TYPE.
9408 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9409 * configure: Regenerate.
9410 * config.in: Likewise.
9411
4d47af5c
L
94122012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9413
9414 * Makefile.in (clean): Also remove x32.c x32-linux.c
9415 x32-avx.c x32-avx-linux.c.
9416 (x32.o): New target.
9417 (x32.c): Likewise.
9418 (x32-linux.o): Likewise.
9419 (x32-linux.c): Likewise.
9420 (x32-avx.o): Likewise.
9421 (x32-avx.c): Likewise.
9422 (x32-avx-linux.o): Likewise.
9423 (x32-avx-linux.c): Likewise.
9424
9425 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9426 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9427 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9428 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9429 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9430 i386/x32-avx-linux.xml.
9431
9432 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9433 (init_registers_x32_avx_linux): Likwise.
9434 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9435 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9436
ecedbe58
PA
94372012-04-13 Pedro Alves <palves@redhat.com>
9438
9439 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9440 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9441 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9442 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9443 the sub-make.
9444
c92b5177
L
94452012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9446
9447 * linux-x86-low.c (compat_x32_clock_t): New.
9448 (compat_x32_siginfo_t): Likewise.
9449 (compat_x32_siginfo_from_siginfo): Likewise.
9450 (siginfo_from_compat_x32_siginfo): Likewise.
9451 (linux_is_elf64): Likewise.
9452 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9453 and siginfo_from_compat_x32_siginfo for x32.
9454 (x86_arch_setup): Set linux_is_elf64.
9455
214d508e
L
94562012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9457
9458 PR gdb/13969
9459 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9460 e_machine field.
9461 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9462 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9463 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9464 compatible with process.
9465
c9a1864a
YQ
94662012-04-12 Yao Qi <yao@codesourcery.com>
9467
9468 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9469 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9470 (install-only, install-info, clean): Handle sub dir gnulib.
9471 (all-lib, am--refresh): New targets.
9472 (memmem.o): Remove target.
9473 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9474 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9475 (AC_REPLACE_FUNCS): Remove memmem.
9476 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9477 (AC_OUTPUT): Generate Makefile in gnulib/.
9478 * aclocal.m4, config.in, configure: Regenerated.
9479
367ba2c2
MR
94802012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9481
9482 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9483
9d236627
PA
94842012-04-05 Pedro Alves <palves@redhat.com>
9485
9486 -Werror=strict-aliasing
9487
9488 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9489 pointer.
9490
111217b3
PA
94912012-04-04 Pedro Alves <palves@redhat.com>
9492
9493 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9494 (sparc_store_gregset_from_stack, sparc_store_gregset)
9495 (sparc_breakpoint_at): Fix formatting.
9496
8365dcf5
TJB
94972012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9498
9499 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9500 are available.
9501 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9502 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9503 * config.in: Regenerate.
9504 * configure: Likewise.
9505
689cc2ae
PA
95062012-03-29 Pedro Alves <palves@redhat.com>
9507
9508 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9509 Correct ptrace arguments.
9510
c14dfd32
PA
95112012-03-28 Pedro Alves <palves@redhat.com>
9512
9513 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9514 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9515 (IA64_FR1_REGNUM): New defines.
9516 (ia64_fetch_register): New.
9517 (the_low_target): Install it.
9518 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9519 field.
9520 * linux-low.c (linux_fetch_registers): Try the
9521 the_low_target.fetch_register hook first.
9522
9523 * linux-arm-low.c (the_low_target): Adjust.
9524 * linux-bfin-low.c (the_low_target): Adjust.
9525 * linux-cris-low.c (the_low_target): Adjust.
9526 * linux-crisv32-low.c (the_low_target): Adjust.
9527 * linux-m32r-low.c (the_low_target): Adjust.
9528 * linux-m68k-low.c (the_low_target): Adjust.
9529 * linux-mips-low.c (the_low_target): Adjust.
9530 * linux-ppc-low.c (the_low_target): Adjust.
9531 * linux-s390-low.c (the_low_target): Adjust.
9532 * linux-sh-low.c (the_low_target): Adjust.
9533 * linux-sparc-low.c (the_low_target): Adjust.
9534 * linux-tic6x-low.c (the_low_target): Adjust.
9535 * linux-x86-low.c (the_low_target): Adjust.
9536 * linux-xtensa-low.c (the_low_target): Adjust.
9537
63c88e13
PA
95382012-03-26 Pedro Alves <palves@redhat.com>
9539
9540 * server.c (handle_qxfer_libraries): Don't bail early if
9541 the_target->qxfer_libraries_svr4 is not NULL.
9542
fb723180
PA
95432012-03-26 Pedro Alves <palves@redhat.com>
9544
9545 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9546
0afae3cf
PA
95472012-03-23 Pedro Alves <palves@redhat.com>
9548
9549 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9550 "library-list-svr4" element's start tag when the the DSO list is
9551 empty.
9552
485f1ee4
PA
95532012-03-23 Pedro Alves <palves@redhat.com>
9554
9555 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9556 a variable whose type size is the same as the inferior's pointer
9557 size.
9558
a5362b9a
TS
95592012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9560
9561 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9562 struct siginfo.
9563 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9564 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9565 * linux-low.h: Include <signal.h>.
9566 (struct siginfo): Remove forward declaration.
9567 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9568 struct siginfo.
9569
d226c142
MF
95702012-03-21 Mike Frysinger <vapier@gentoo.org>
9571
9572 * .gitignore: Ignore more files.
9573
122f36ef
PA
95742012-03-19 Pedro Alves <palves@redhat.com>
9575 Jan Kratochvil <jan.kratochvil@redhat.com>
9576
9577 * server.c (cont_thread, general_thread): Add describing comments.
9578 (start_inferior): Clear `cont_thread'.
9579 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9580 of a process.
9581
fc3e5175
YQ
95822012-03-15 Yao Qi <yao@codesourcery.com>
9583
9584 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9585 handling to ...
9586 (cmd_qtdp): ... here.
9587
8d0d92cd
YQ
95882012-03-15 Yao Qi <yao@codesourcery.com>
9589
9590 * tracepoint.c (struct tracepoint_action_ops): New.
9591 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9592 (m_tracepoint_action_download): New.
9593 (r_tracepoint_action_download): New.
9594 (x_tracepoint_action_download): New.
9595 (l_tracepoint_action_download): New.
9596 (add_tracepoint_action): Install `action->ops' according type.
9597 (download_tracepoint_1): Move code `download' function pointer
9598 of various tracepoint_action_ops.
9599
87b0bb13
JK
96002012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9601
9602 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9603 linux_ptrace_attach_warnings.
9604
5f572dec
JK
96052012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9606
9607 * Makefile.in (linux-ptrace.o): New.
9608 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9609 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9610 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9611 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9612 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9613 of these targets.
9614 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9615
f4647387
YQ
96162012-03-08 Yao Qi <yao@codesourcery.com>
9617 Pedro Alves <palves@redhat.com>
9618
9619 Fix PR server/13392.
9620 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9621 offset of JMP insn.
9622 * tracepoint.c (remove_tracepoint): New.
9623 (cmd_qtdp): Call remove_tracepoint when failed to install.
9624
9b224c5e
PA
96252012-03-07 Pedro Alves <palves@redhat.com>
9626
9627 * linux-low.c (get_detach_signal): New.
9628 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9629 Pass on pending signals to PTRACE_DETACH. Check the result of the
9630 ptrace call.
9631 * server.c (program_signals, program_signals_p): New.
9632 (handle_general_set): Handle QProgramSignals.
9633 * server.h (program_signals, program_signals_p): Declare.
9634
e237a7e2
JK
96352012-03-05 Pedro Alves <palves@redhat.com>
9636 Jan Kratochvil <jan.kratochvil@redhat.com>
9637
9638 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9639 New comment why.
9640
5808517f
YQ
96412012-03-03 Yao Qi <yao@codesourcery.com>
9642
9643 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9644 agent_look_up_symbols.
9645
58b4daa5
YQ
96462012-03-03 Yao Qi <yao@codesourcery.com>
9647
9648 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9649 (linux-x86-low.o): Likewise.
9650 * server.h: Remove in_process_agent_loaded.
9651 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9652 common/agent.c.
9653 Update callers.
9654
8ffcbaaf
YQ
96552012-03-03 Yao Qi <yao@codesourcery.com>
9656
9657 * tracepoint.c (gdb_agent_capability): New global.
9658 (in_process_agent_loaded_ust): Renamed to
9659 `in_process_agent_supports_ust'.
9660 Update callers.
9661 (in_process_agent_supports_ust): Call agent_capability_check.
9662 (clear_installed_tracepoints): Assert that agent supports
9663 agent.
9664
d1feda86
YQ
96652012-03-03 Yao Qi <yao@codesourcery.com>
9666
9667 * linux-low.c (linux_supports_agent): New.
9668 (linux_target_ops): Initialize field `supports_agent' with
9669 linux_supports_agent.
9670 * target.h (struct target_ops) <supports_agent>: New.
9671 (target_supports_agent): New macro.
9672 * server.c (handle_general_set): Handle packet 'QAgent'.
9673 (handle_query): Send `QAgent+'.
9674 * Makefile.in (server.o): Depends on agent.h.
9675
2fa291ac
YQ
96762012-03-03 Yao Qi <yao@codesourcery.com>
9677
9678 * Makefile.in (OBS): Add agent.o.
9679 Add new rule for agent.o.
9680 Track dependence of tracepoint.c on agent.h.
9681 * tracepoint.c (run_inferior_command_1):
9682 (run_inferior_command): Call agent_run_command.
9683 (gdb_ust_connect_sync_socket): Deleted. Move it to
9684 common/agent.c.
9685 (resume_thread, stop_thread): Likewise.
9686 (gdb_ust_socket_init): Renamed to ...
9687 (gdb_agent_socket_init): ... New.
9688 (gdb_ust_thread): Renamed to ...
9689 (gdb_agent_helper_thread): ... New.
9690 (gdb_ust_init): Move some code to ...
9691 (gdb_agent_init): ... here. New.
9692 [HAVE_UST]: Call gdb_ust_init.
9693 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9694 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9695 * config.in, configure: Regenerated.
9696
05044653
PA
96972012-03-02 Pedro Alves <palves@redhat.com>
9698
9699 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9700 * linux-low.c (struct simple_pid_list): New.
9701 (stopped_pids): New a struct simple_pid_list pointer.
9702 (add_to_pid_list, pull_pid_from_list): New.
9703 (handle_extended_wait): Don't assume the first signal new children
9704 report is SIGSTOP. Adjust call to pull_pid_from_list.
9705 (linux_wait_for_lwp): Adjust.
9706
8d00225b
YQ
97072012-03-02 Yao Qi <yao@codesourcery.com>
9708
9709 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9710 debug log.
9711
19560ba5
YQ
97122012-03-02 Yao Qi <yao@codesourcery.com>
9713
9714 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9715 `stop_pc' and `tpoint'. Update caller.
9716
1faeff08
MR
97172012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9718
9719 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9720 * linux-low.c (use_linux_regsets): New macro.
9721 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9722 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9723 (linux_register_in_regsets): New function.
9724 (usr_fetch_inferior_registers): Skip registers covered by
9725 regsets.
9726 (usr_store_inferior_registers): Likewise.
9727 (usr_fetch_inferior_registers): New macro.
9728 (usr_store_inferior_registers): Likewise.
9729 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9730 (linux_store_registers): Likewise.
9731 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9732 prototype.
9733 (init_registers_mips64_dsp_linux): Likewise.
9734 (init_registers_mips_linux): New macro.
9735 (init_registers_mips_dsp_linux): Likewise.
9736 (mips_dsp_num_regs): Likewise.
9737 (DSP_BASE, DSP_CONTROL): New fallback macros.
9738 (mips_base_regs): New macro.
9739 (mips_regmap): Use it. Fix the size.
9740 (mips_dsp_regmap): New variable.
9741 (mips_dsp_regset_bitmap): Likewise.
9742 (mips_arch_setup): New function.
9743 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9744 than mips_regmap.
9745 (mips_cannot_store_register): Likewise.
9746 (the_low_target): Update .arch_setup, .num_regs and .regmap
9747 initializers. Add .regset_bitmap initializer.
9748 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9749 initializer.
9750 * linux-bfin-low.c (the_low_target): Likewise.
9751 * linux-cris-low.c (the_low_target): Likewise.
9752 * linux-crisv32-low.c (the_low_target): Likewise.
9753 * linux-ia64-low.c (the_low_target): Likewise.
9754 * linux-m32r-low.c (the_low_target): Likewise.
9755 * linux-m68k-low.c (the_low_target): Likewise.
9756 * linux-ppc-low.c (the_low_target): Likewise.
9757 * linux-s390-low.c (the_low_target): Likewise.
9758 * linux-sh-low.c (the_low_target): Likewise.
9759 * linux-sparc-low.c (the_low_target): Likewise.
9760 * linux-tic6x-low.c (the_low_target): Likewise.
9761 * linux-x86-low.c (the_low_target): Likewise.
9762 * linux-xtensa-low.c (the_low_target): Likewise.
9763 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9764 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9765 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9766 srv_xmlfiles.
9767 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9768 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9769
c03e6ccc
YQ
97702012-02-29 Yao Qi <yao@codesourcery.com>
9771 Pedro Alves <palves@redhat.com>
9772
9773 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9774 `step_over_finished' is true.
9775
644cebc9
PA
97762012-02-27 Pedro Alves <palves@redhat.com>
9777
9778 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9779 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9780
c14d7ab2
PA
97812012-02-27 Pedro Alves <palves@redhat.com>
9782
9783 PR server/9684
9784 * linux-low.c (pid_is_stopped): New.
9785 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9786
412c89dd
LM
97872012-02-25 Luis Machado <lgustavo@codesourcery.com>
9788
9789 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9790 of conditions.
9791
b745defe
MR
97922012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9793
9794 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9795
9f3a5c85
LM
97962012-02-24 Luis Machado <lgustavo@codesourcery>
9797
9798 * server.c (handle_query): Advertise support for target-side
9799 breakpoint condition evaluation.
9800 (process_point_options): New function.
9801 (process_serial_event): When inserting a breakpoint, check for
9802 a target-side condition that should be evaluated.
9803
9804 * mem-break.c: Include regcache.h and ax.h.
9805 (point_cond_list_t): New data structure.
9806 (breakpoint) <cond_list>: New field.
9807 (find_gdb_breakpoint_at): Make non-static.
9808 (delete_gdb_breakpoint_at): Clear any target-side
9809 conditions.
9810 (clear_gdb_breakpoint_conditions): New function.
9811 (add_condition_to_breakpoint): Likewise.
9812 (add_breakpoint_condition): Likewise.
9813 (gdb_condition_true_at_breakpoint): Likewise.
9814 (gdb_breakpoint_here): Return result directly instead
9815 of going through a local variable.
9816
9817 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9818 (clear_gdb_breakpoint_conditions): Likewise.
9819 (add_breakpoint_condition): Likewise.
9820 (gdb_condition_true_at_breakpoint): Likewise.
9821
9822 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9823 (need_step_over_p): Take target-side breakpoint condition into
9824 consideration.
9825
5e1dc496
LM
98262012-02-24 Luis Machado <lgustavo@codesourcery>
9827
9828 * server.h: Include tracepoint.h.
9829 (agent_mem_read, agent_get_trace_state_variable_value,
9830 agent_set_trace_state_variable_value,
9831 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9832 get_set_tsv_func_addr): New prototypes.
9833
9834 * ax.h: New include file.
9835 * ax.c: New source file.
9836
9837 * tracepoint.c: Include ax.h.
9838 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9839 agent_expr, eval_result_type): Move to ax.h.
9840 (parse_agent_expr): Rename to ...
9841 (gdb_parse_agent_expr): ... this, make it non-static and move
9842 to ax.h.
9843 (unparse_agent_expr) Rename to ...
9844 (gdb_unparse_agent_expr): ... this, make it non-static and move
9845 to ax.h.
9846 (eval_agent_expr): Rename to ...
9847 (eval_tracepoint_agent_expr): ... this.
9848 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9849 forward declarations.
9850 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9851 (agent_get_trace_state_variable_value): New function.
9852 (agent_set_trace_state_variable_value): New function.
9853 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9854 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9855 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9856 (condition_true_at_tracepoint): Likewise.
9857 (parse_agent_expr): Rename to ...
9858 (gdb_parse_agent_expr): ... this and move to ax.c.
9859 (unparse_agent_expr): Rename to ...
9860 (gdb_unparse_agent_expr): ... this and move to ax.c.
9861 (gdb_agent_op_name): Move to ax.c.
9862 (eval_agent_expr): Rename to ...
9863 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9864 and move to ax.c.
9865 (eval_tracepoint_agent_expr): New function.
9866 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9867 non-static.
5e1dc496
LM
9868 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9869 ax.c.
9870 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9871 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9872 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9873 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9874 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9875 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9876 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9877 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9878 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9879 (compile_bytecodes): Remove forward declaration.
9880 (is_goto_target): Move to ax.c.
9881 (compile_bytecodes): Move to ax.c and call
9882 agent_get_trace_state_variable_value (...) and
9883 agent_set_trace_state_variable_value (...).
9884
9885 * Makefile.in: Update ax.c and IPA dependencies.
9886
277e4e52
PA
98872012-02-24 Pedro Alves <palves@redhat.com>
9888
9889 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9890 (cmd_bigqtbuffer_circular): ... this. Only handle
9891 'QTBuffer:circular:'.
9892 (handle_tracepoint_general_set): Adjust.
9893
bf4c19f7
YQ
98942012-02-16 Yao Qi <yao@codesourcery.com>
9895
9896 * inferiors.c: Move code to ...
9897 * dll.c: .... here. New.
9898 * server.h: Declare clear_dlls.
9899 * Makefile.in (SFILES): Add dll.c.
9900 (OBS): Add dll.o
9901 (dll.o): New rule.
9902
d73f2619
YQ
99032012-02-11 Yao Qi <yao@codesourcery.com>
9904
9905 * server.c: (handle_monitor_command): Add a new parameter
9906 `own_buf'.
9907 (handle_query): Update caller.
9908
f8255c2a
JB
99092012-02-09 Joel Brobecker <brobecker@adacore.com>
9910
9911 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9912 * configure, config.in: Regenerate.
9913 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9914 is not defined.
9915
da84f473
PA
99162012-02-02 Pedro Alves <palves@redhat.com>
9917
9918 Try SIGKILL first, then PTRACE_KILL.
9919 * linux-low.c (linux_kill_one_lwp): New.
9920 (linux_kill_one_lwp): Rename to ...
9921 (kill_one_lwp_callback): ... this. Use the new
9922 linux_kill_one_lwp.
9923
e886a173
PA
99242012-02-02 Pedro Alves <palves@redhat.com>
9925
9926 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9927 inferior.
9928
be07f1a2
PA
99292012-01-27 Pedro Alves <palves@redhat.com>
9930
9931 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9932 (elf_64_file_p): Make static.
9933 (linux_pid_exe_is_elf_64_file): New.
9934 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9935 Delete declarations.
9936 (linux_pid_exe_is_elf_64_file): Declare.
9937 * linux-x86-low.c (x86_arch_setup): Use
9938 linux_pid_exe_is_elf_64_file.
9939
d8301ad1
JK
99402012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9941
9942 * linux-low.c (linux_wait_for_event_1): Rename to ...
9943 (linux_wait_for_event): ... here and merge it with former
9944 linux_wait_for_event - new variable wait_ptid, use it.
9945 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9946
01b17894
PA
99472012-01-23 Pedro Alves <palves@redhat.com>
9948
9949 * server.c (main): Avoid yet another case of infinite loop while
9950 detaching/killing after a longjmp.
9951
e825046f
JK
99522012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9953
9954 Code cleanup.
9955 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9956
b9e7b9c3
UW
99572012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9958
9959 * hostio.c (handle_readlink): New function.
9960 (handle_vFile): Call it to handle "vFile:readlink" packets.
9961
901f9912
UW
99622012-01-20 Pedro Alves <palves@redhat.com>
9963 Ulrich Weigand <ulrich.weigand@linaro.org>
9964
9965 * server.c (handle_v_requests): Only support vAttach and vRun to
9966 start multiple processes when in extended protocol mode.
9967
fc1ab1a0
PA
99682012-01-17 Pedro Alves <palves@redhat.com>
9969
9970 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9971 memalign plus mprotect to allocate the scratch buffer.
9972
7d5d4e98
PA
99732012-01-13 Pedro Alves <palves@redhat.com>
9974
9975 * server.c (attach_inferior): Clear `cont_thread'.
9976
f128d5e9
PA
99772012-01-13 Pedro Alves <palves@redhat.com>
9978
9979 * server.c (main): Avoid infinite loop while detaching/killing
9980 after a longjmp.
9981
06db92f0
DE
99822012-01-09 Doug Evans <dje@google.com>
9983
9984 * server.c (start_inferior): Set last_ptid in --wrapper case.
9985
32d92999
YQ
99862012-01-06 Yao Qi <yao@codesourcery.com>
9987
9988 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9989 defined.
9990 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9991
5e0a92a9
YQ
99922012-01-04 Yao Qi <yao@codesourcery.com>
9993
9994 * tracepoint.c (cmd_qtdp): Print debug message
9995 for static tracepoint.
9996
ae639e8c
YQ
99972012-01-04 Yao Qi <yao@codesourcery.com>
9998
9999 * tracepoint.c (trace_vdebug): Differentiate debug message
10000 between gdbserver and IPA.
10001
f72429c5
YQ
100022012-01-03 Yao Qi <yao@codesourcery.com>
10003
10004 * tracepoint.c (tracepoint_was_hit): Don't collect for
10005 static tracepoint.
10006
12c3e59c
JB
100072012-01-02 Joel Brobecker <brobecker@adacore.com>
10008
10009 * terminal.h: Reformat copyright header.
10010
67827812
JB
100112012-01-02 Joel Brobecker <brobecker@adacore.com>
10012
10013 * server.c (gdbserver_version): Update copyright year.
10014 * gdbreplay.c (gdbreplay_version): Likewise.
10015
3e52c33d
JK
100162011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10017
10018 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10019
10020 Revert:
10021 2011-12-18 Hui Zhu <teawater@gmail.com>
10022 * linux-low.c (linux_create_inferior): Save return value to ret.
10023
66f1260e
HZ
100242011-12-18 Hui Zhu <teawater@gmail.com>
10025
10026 * linux-low.c (linux_create_inferior): Save return value to ret.
10027
e77616d7
DE
100282011-12-16 Doug Evans <dje@google.com>
10029
e7b06c57
DE
10030 * linux-low.c (linux_create_inferior): If stdio connection,
10031 redirect stdin from /dev/null, stdout to stderr.
10032 * remote-utils.c (remote_is_stdio): New static global.
10033 (remote_connection_is_stdio): New function.
10034 (remote_prepare): Handle stdio connection.
10035 (remote_open): Ditto.
10036 (remote_close): Don't close stdin for stdio connections.
10037 (read_prim,write_prim): New functions. Replace all calls to
10038 read/write to these.
10039 * server.c (main): Watch for "-" argument. Move call to
10040 remote_prepare before start_inferior.
10041 * server.h (STDIO_CONNECTION_NAME): New macro.
10042 (remote_connection_is_stdio): Declare.
10043
e77616d7
DE
10044 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10045 in debugging output.
10046
82067193
YQ
100472011-12-15 Yao Qi <yao@codesourcery.com>
10048
10049 * tracepoint.c: Include sys/syscall.h.
10050 (gdb_ust_thread): Remove preprocessor conditional.
10051
82bfbe7e
PA
100522011-12-14 Pedro Alves <pedro@codesourcery.com>
10053
10054 * linux-low.c (linux_detach_one_lwp): Call
10055 the_low_target.prepare_to_resume before detaching.
10056
712c6575
YQ
100572011-12-14 Yao Qi <yao@codesourcery.com>
10058
10059 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10060 of write.
10061
d54d1edf
YQ
100622011-12-14 Yao Qi <yao@codesourcery.com>
10063
10064 * i386-low.c (i386_low_stopped_data_address): Initialize local
10065 variable `control'.
10066
6210a125
PA
100672011-12-13 Pedro Alves <pedro@codesourcery.com>
10068
10069 PR remote/13492
10070
10071 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10072 DR_CONTROL unless necessary. Extend comments.
10073 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10074 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10075
2ece8244
YQ
100762011-12-13 Yao Qi <yao@codesourcery.com>
10077
10078 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10079 macros.
10080 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10081
784867a5
JK
100822011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10083
10084 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10085 Print new debug message for such case.
10086
6bf36717
JK
100872011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10088
10089 Fix overlapping memcpy.
10090 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10091 the read_inferior_memory transfer.
10092 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10093 write_inferior_memory transfer.
10094 (set_fast_tracepoint_jump): New variable buf. Use it for the
10095 read_inferior_memory and write_inferior_memory transfers.
10096 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10097 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10098 Use it for the write_inferior_memory transfer.
10099 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10100 buffers.
10101
50275556
MR
101022011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10103
10104 * linux-low.c (fetch_register, store_register): Make code
10105 consistent, fix formatting.
10106
7325beb4
MR
101072011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10108
10109 * linux-low.c (usr_store_inferior_registers): Factor out code
10110 to handle individual registers into...
10111 (store_register): ... this new function.
10112
c642a434
UW
101132011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10114
10115 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10116 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10117 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10118 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10119 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10120 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10121 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10122 (srv_xmlfiles): Add new XML files.
10123
10124 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10125 and <sys/uio.h>.
10126 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10127 (init_registers_s390_linux32v1): Add prototype.
10128 (init_registers_s390_linux32v2): Likewise.
10129 (init_registers_s390_linux64v1): Likewise.
10130 (init_registers_s390_linux64v2): Likewise.
10131 (init_registers_s390x_linux64v1): Likewise.
10132 (init_registers_s390x_linux64v2): Likewise.
10133 (s390_num_regs): Increment to 52.
10134 (s390_regmap): Add orig_r2 register.
10135 (s390_num_regs_3264): Increment to 68.
10136 (s390_regmap_3264): Add orig_r2 register.
10137 (s390_collect_ptrace_register): Handle orig_r2 register.
10138 (s390_supply_ptrace_register): Likewise.
10139 (s390_fill_last_break): New function.
10140 (s390_store_last_break): Likewise.
10141 (s390_fill_system_call): New function.
10142 (s390_store_system_call): Likewise.
10143 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10144 register sets.
10145 (s390_check_regset): New function.
10146 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10147 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10148 Update target_regsets for available register sets.
10149
2268b414
JK
101502011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10151 Jan Kratochvil <jan.kratochvil@redhat.com>
10152
10153 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10154 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10155 New.
10156 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10157 * linux-low.h (struct process_info_private): New member r_debug.
10158 * server.c (handle_qxfer_libraries): Call
10159 the_target->qxfer_libraries_svr4.
10160 (handle_qxfer_libraries_svr4): New function.
10161 (qxfer_packets): New entry "libraries-svr4".
10162 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10163 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10164 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10165 PACKET_qXfer_libraries_svr4.
10166
d6db1fab
UW
101672011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10168
10169 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10170 PSW address/mask between 8-byte and 16-byte formats.
10171 (s390_supply_ptrace_register): Likewise.
10172 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10173 basic addressing mode bit.
10174
242f5f1c
SS
101752011-11-24 Stan Shebs <stan@codesourcery.com>
10176
10177 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10178
f196051f
SS
101792011-11-17 Stan Shebs <stan@codesourcery.com>
10180
10181 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10182 (tracing_start_time): New global.
10183 (tracing_stop_time): New global.
10184 (tracing_user_name): New global.
10185 (tracing_notes): New global.
10186 (tracing_stop_note): New global.
10187 (cmd_qtstart): Set traceframe_usage, start_time.
10188 (stop_tracing): Set stop_time.
10189 (cmd_qtstatus): Report additional status.
10190 (cmd_qtp): New function.
10191 (handle_tracepoint_query): Call it.
10192 (cmd_qtnotes): New function.
10193 (handle_tracepoint_general_set): Call it.
10194 (get_timestamp): Rename from tsv_get_timestamp.
10195
405f8e94
SS
101962011-11-14 Stan Shebs <stan@codesourcery.com>
10197 Kwok Cheung Yeung <kcy@codesourcery.com>
10198
10199 * linux-x86-low.c (small_jump_insn): New.
10200 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10201 trampoline and error message, build a trampoline and issue a small
10202 jump instruction to it.
10203 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10204 trampoline and error message.
10205 (x86_get_min_fast_tracepoint_insn_len): New.
10206 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10207 * linux-low.h (struct linux_target_ops): Add arguments to
10208 install_fast_tracepoint_jump_pad operation, add new operation.
10209 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10210 arguments.
10211 (linux_get_min_fast_tracepoint_insn_len): New function.
10212 (linux_target_op): Add new operation.
10213 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10214 (gdb_trampoline_buffer_end): Ditto.
10215 (gdb_trampoline_buffer_error): Ditto.
10216 (struct ipa_sym_addresses): Add fields for new IPA variables.
10217 (symbol_list): Add entries for new IPA variables.
10218 (struct tracepoint): Add fields to hold the address range of the
10219 trampoline used by the tracepoint.
10220 (trampoline_buffer_head): New static variable.
10221 (trampoline_buffer_tail): Ditto.
10222 (claim_trampoline_space): New function.
10223 (have_fast_tracepoint_trampoline_buffer): New function.
10224 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10225 structure.
10226 (install_fast_tracepoint): Ditto, also add error buffer argument.
10227 (cmd_qtminftpilen): New function.
10228 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10229 (fast_tracepoint_from_trampoline_address): New function.
10230 (fast_tracepoint_collecting): Handle trampoline as part of jump
10231 pad space.
10232 (set_trampoline_buffer_space): New function.
10233 (initialize_tracepoint): Initialize new IPA variables.
10234 * target.h (struct target_ops): Add arguments to
10235 install_fast_tracepoint_jump_pad operation, add new
10236 get_min_fast_tracepoint_insn_len operation.
10237 (target_get_min_fast_tracepoint_insn_len): New.
10238 (install_fast_tracepoint_jump_pad): Add arguments.
10239 * server.h (IPA_BUFSIZ): Define.
10240 * linux-i386-ipa.c: Include extra header files.
10241 (initialize_fast_tracepoint_trampoline_buffer): New function.
10242 (initialize_low_tracepoint): Call it.
10243 * server.h (set_trampoline_buffer_space): Declare.
10244 (claim_trampoline_space): Ditto.
10245 (have_fast_tracepoint_trampoline_buffer): Ditto.
10246
1e4d1764
YQ
102472011-11-14 Yao Qi <yao@codesourcery.com>
10248
10249 * server.c (handle_query): Handle InstallInTrace for qSupported.
10250 * tracepoint.c (add_tracepoint): Sort list.
10251 (install_tracepoint, download_tracepoint): New.
10252 (cmd_qtdp): Call them to install and download tracepoints.
10253 (sort_tracepoints): Removed.
10254 (cmd_qtstart): Update.
10255
5c73ff4e
YQ
102562011-11-14 Yao Qi <yao@codesourcery.com>
10257
10258 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10259 * mem-break.h: Declare.
10260 * tracepoint.c (cmd_qtstart): Move some code to ...
10261 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10262 New.
10263 (download_tracepoints): Move some code to ...
10264 (download_tracepoint_1): ... here. New.
10265
86a30030
YQ
102662011-11-08 Yao Qi <yao@codesourcery.com>
10267
10268 * remote-utils.c (relocate_instruction): A comment fix.
10269
8d26e50c
JB
102702011-11-07 Joel Brobecker <brobecker@adacore.com>
10271
10272 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10273 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10274 dr_status_mirror and dr_control_mirror from debug_reg_state.
10275 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10276 (i386_initial_stuff): Remove use of deleted globals.
10277 (i386_get_thread_context, i386_set_thread_context,
10278 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10279 from debug_reg_state.
10280
a59306a3
YQ
102812011-11-05 Yao Qi <yao@codesourcery.com>
10282
10283 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10284 address as TPOINT's.
10285
3065dfb6
SS
102862011-11-02 Stan Shebs <stan@codesourcery.com>
10287
10288 * tracepoint.c (agent_mem_read_string): New function.
10289 (eval_agent_expr): Call it for tracenz.
10290 * server.c (handle_query): Report support for tracenz.
10291
fd0d8c7c
YQ
102922011-11-02 Yao Qi <yao@codesourcery.com>
10293
10294 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10295
609086b1
YQ
102962011-11-02 Yao Qi <yao@codesourcery.com>
10297
10298 * target.h: Fix a typo in comment.
10299
b9fd1791
PA
103002011-10-31 Pedro Alves <pedro@codesourcery.com>
10301
10302 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10303 clobber the breakpoints' shadows with fast tracepoint jumps.
10304 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10305 * target.c (write_inferior_memory): Also pass MYADDR down to
10306 check_mem_write.
10307
03583c20
UW
103082011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10309
10310 * configure.ac: Check support for personality routine.
10311 * configure: Regenerate.
10312 * config.in: Likewise.
10313 * linux-low.c: Include <sys/personality.h>.
10314 Define ADDR_NO_RANDOMIZE if necessary.
10315 (linux_create_inferior): Disable address space randomization when
10316 forking inferior, if requested.
10317 (linux_supports_disable_randomization): New function.
10318 (linux_target_ops): Install it.
10319 * server.h (disable_randomization): Declare.
10320 * server.c (disable_randomization): New global variable.
10321 (handle_general_set): Handle QDisableRandomization.
10322 (handle_query): Likewise for qSupported.
10323 (main): Support --disable-randomization and --no-disable-randomization
10324 command line arguments.
10325 * target.h (struct target_ops): Add supports_disable_randomization.
10326 (target_supports_disable_randomization): New macro.
10327
723b724b
MF
103282011-09-29 Mike Frysinger <vapier@gentoo.org>
10329
10330 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10331 ifdef check.
10332 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10333 [!PT_GETDSBT] (target_loadmap): New definition.
10334 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10335 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10336 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10337 and PT_GETDSBT to LINUX_LOADMAP.
10338 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10339 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10340
55329a5c 103412011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
10342
10343 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10344 (arm_linux_hwbp_cap): New static variable.
10345 (arm_linux_get_hwbp_cap): Replace by ...
10346 (arm_linux_init_hwbp_cap): ... this new function.
10347 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10348 (arm_linux_get_hw_watchpoint_count): Likewise.
10349 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10350 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10351 (arm_prepare_to_resume): Use perror_with_name instead of error.
10352
55329a5c 103532011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
10354
10355 * linux-arm-low.c: Include <signal.h>.
10356 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10357 (struct arm_linux_hwbp_cap): New data type.
10358 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10359 (struct arm_linux_hw_breakpoint): New data type.
10360 (MAX_BPTS, MAX_WPTS): Define.
10361 (struct arch_process_info, struct arch_lwp_info): New data types.
10362 (arm_linux_get_hwbp_cap): New function.
10363 (arm_linux_get_hw_breakpoint_count): Likewise.
10364 (arm_linux_get_hw_watchpoint_count): Likewise.
10365 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10366 (arm_hwbp_control_initialize): Likewise.
10367 (arm_hwbp_control_is_enabled): Likewise.
10368 (arm_hwbp_control_is_initialized): Likewise.
10369 (arm_hwbp_control_disable): Likewise.
10370 (arm_linux_hw_breakpoint_equal): Likewise.
10371 (arm_linux_hw_point_initialize): Likewise.
10372 (struct update_registers_data): New data structure.
10373 (update_registers_callback: New function.
10374 (arm_insert_point): Likewise.
10375 (arm_remove_point): Likewise.
10376 (arm_stopped_by_watchpoint): Likewise.
10377 (arm_stopped_data_address): Likewise.
10378 (arm_new_process): Likewise.
10379 (arm_new_thread): Likewise.
10380 (arm_prepare_to_resume): Likewise.
10381 (the_low_target): Register arm_insert_point, arm_remove_point,
10382 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10383 arm_new_thread, and arm_prepare_to_resume.
10384
6b9801d4
SS
103852011-09-15 Stan Shebs <stan@codesourcery.com>
10386
10387 * server.h (struct emit_ops): Add compare-goto fields.
10388 * tracepoint.c (gdb_agent_op_sizes): New table.
10389 (emit_eq_goto): New function.
10390 (emit_ne_goto): New function.
10391 (emit_lt_goto): New function.
10392 (emit_le_goto): New function.
10393 (emit_gt_goto): New function.
10394 (emit_ge_goto): New function.
10395 (is_goto_target): New function.
10396 (compile_bytecodes): Recognize special cases of compare-goto
10397 combinations and call specialized emitters for them.
10398 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10399 (amd64_emit_ne_goto): New function.
10400 (amd64_emit_lt_goto): New function.
10401 (amd64_emit_le_goto): New function.
10402 (amd64_emit_gt_goto): New function.
10403 (amd64_emit_ge_goto): New function.
10404 (amd64_emit_ops): Add the new functions.
10405 (i386_emit_eq_goto): New function.
10406 (i386_emit_ne_goto): New function.
10407 (i386_emit_lt_goto): New function.
10408 (i386_emit_le_goto): New function.
10409 (i386_emit_gt_goto): New function.
10410 (i386_emit_ge_goto): New function.
10411 (i386_emit_ops): Add the new functions.
10412
bf15cbda
SS
104132011-09-08 Stan Shebs <stan@codesourcery.com>
10414
10415 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10416 (i386_emit_epilogue): Restore %ebx.
10417
943ca1dd
JZ
104182011-08-31 Jie Zhang <jzhang918@gmail.com>
10419
10420 * server.c (step_thread): Remove definition.
10421 (process_serial_event): Don't handle Hs.
10422 * server.h (step_thread): Remove declaration.
10423 * target.c (set_desired_inferior): Remove use of step_thread.
10424
e3deef73
LM
104252011-08-24 Luis Machado <lgustavo@codesourcery.com>
10426
10427 * linux-low.c: Include linux-procfs.h.
10428 (linux_attach_lwp_1): Update comments.
10429 (linux_attach): Scan for existing threads when attaching to a
10430 process that is the tgid.
10431 * Makefile.in: Update dependencies.
10432
13da1c97
LM
104332011-08-24 Luis Machado <lgustavo@codesourcery.com>
10434
10435 * configure.srv: Add linux-procfs.o dependencies.
10436
881127c9
YQ
104372011-08-14 Yao Qi <yao@codesourcery.com>
10438
10439 * target.h (struct target_ops): Fix indent.
10440 * win32-low.c (win32_target_ops): Fix comment.
10441
58dbd541
YQ
104422011-08-14 Andrew Jenner <andrew@codesourcery.com>
10443 Yao Qi <yao@codesourcery.com>
10444
10445 * Makefile.in (clean): Remove tic6x-*.c files.
10446 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10447 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10448 (tic6x-c64xp-linux.c): Likewise.
10449 * configure.srv: Add support for tic6x-*-uclinux.
10450 * linux-tic6x-low.c: New.
10451 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10452
78d85199
YQ
104532011-08-14 Andrew Stubbs <ams@codesourcery.com>
10454 Yao Qi <yao@codesourcery.com>
10455
10456 * target.h (struct target_ops): Add read_loadmap.
10457 * linux-low.c (struct target_loadseg): New type.
10458 (struct target_loadmap): New type.
10459 (linux_read_loadmap): New function.
10460 (linux_target_ops): Add linux_read_loadmap.
10461 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
10462 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10463 to NULL.
78d85199 10464
a959a88d
EZ
104652011-08-05 Eli Zaretskii <eliz@gnu.org>
10466
10467 * win32-low.c: Include <stdint.h>.
10468
1ced966e
PA
104692011-07-22 Pedro Alves <pedro@codesourcery.com>
10470
10471 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10472 to the inferior here.
10473 (i386_remove_aligned_watchpoint): Ditto.
10474 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10475 fit part of the watchpoint in the debug registers.
10476 (i386_update_inferior_debug_regs): New.
10477 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10478 registers, and only update the inferior on success.
10479 (i386_low_remove_watchpoint): Ditto.
10480
d26e3629
KY
104812011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10482
10483 * linux-low.c (compare_ints, unique, list_threads, show_process,
10484 linux_core_of_thread): Delete.
10485 (linux_target_ops): Change linux_core_of_thread to
10486 linux_common_core_of_thread.
10487 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10488 * utils.c (malloc_failure): Change type of argument.
10489 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10490 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10491 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10492 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10493 (IPA_OBJS): Add common-utils-ipa.o.
10494 (ptid_h, linux_osdata_h): New macros.
10495 (server_h): Add common/common-utils.h, common/xml-utils.h,
10496 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10497 common/ptid.h.
10498 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10499 ptid.o, buffer.o): New rules.
10500 (linux-low.o): Add common/linux-osdata.h as a dependency.
10501 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10502 * configure.ac: Add AC_HEADER_DIRENT check.
10503 * config.in: Regenerate.
10504 * configure: Regenerate.
10505 * remote-utils.c (xml_escape_text): Delete.
10506 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10507 buffer_xml_printf): Move to common/buffer.c.
10508 * server.c (main): Remove call to initialize_inferiors.
10509 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10510 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10511 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10512 internal_error, gdb_assert, gdb_assert_fail): Delete.
10513 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10514 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10515 common/buffer.h.
10516 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10517 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10518 initialize_inferiors): Delete.
10519
2275a1a7
PA
105202011-07-20 Pedro Alves <pedro@codesourcery.com>
10521
10522 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10523 symbol error.
10524
0a5b1e09
PA
105252011-05-31 Pedro Alves <pedro@codesourcery.com>
10526
10527 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10528 assertion.
10529 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10530
6938fd34
YQ
105312011-05-26 Yao Qi <yao@codesourcery.com>
10532
10533 * Makefile.in (thread-db.o): Track dependence to
10534 common/gdb_thread_db.h.
10535 * thread-db.c: include gdb_thread_db.h from right place.
10536
b481f9e0
TT
105372011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10538
10539 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10540 __FILE__ and __LINE__ to internal_error.
10541
98a5dd13
DE
105422011-05-13 Doug Evans <dje@google.com>
10543
10544 * thread-db.c (try_thread_db_load_from_sdir): New function.
10545 (try_thread_db_load_from_dir): New function.
10546 (thread_db_load_search): Handle $sdir, ignore $pdir.
10547 Remove trying of system directories if search of
10548 libthread-db-search-path fails, that is now done via $sdir.
10549
d248b706
KY
105502011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10551
10552 * server.c (handle_query): Add EnableDisableTracepoints to the list
10553 of supported features.
43aaf8b6 10554 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10555 tracepoints.
43aaf8b6
PA
10556 (cmd_qtenable_disable): New.
10557 (cmd_qtstart): Install tracepoints even if disabled.
10558 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10559 receiving a QTEnable or QTDisable packet.
10560 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10561 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10562 tracepoints.
10563 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10564
84e578fb
DE
105652011-05-10 Doug Evans <dje@google.com>
10566
10567 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10568
71f55dd8
DE
105692011-05-04 Doug Evans <dje@google.com>
10570
10571 * linux-low.c (linux_join): Skip process lookup.
10572 * spu-low.c (spu_join): Ditto.
10573 * server.c (join_inferiors_callback): Delete.
10574 (process_serial_event): For 'D' packet (detach) call join_inferior
10575 directly.
10576
4d393d60
JM
105772011-05-04 Joseph Myers <joseph@codesourcery.com>
10578
10579 * README: Don't mention xscale*-*-linux*.
10580 * configure.srv (xscale*-*-linux*): Don't handle target.
10581
b00ad6ff
NF
105822011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10583
10584 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10585 casting pointers.
10586 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10587 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10588 (i386_emit_void_call_2): Likewise.
10589
af96c192
YQ
105902011-04-26 Yao Qi <yao@codesourcery.com>
10591
43aaf8b6
PA
10592 * linux-low.c: Move common macros to linux-ptrace.h.
10593 Include linux-ptrace.h.
af96c192
YQ
10594 * Makefile.in (linux_ptrace_h): New.
10595 (linux-low.o): Depends on linux-ptrace.h.
10596
03f2bd59
JK
105972011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10598
10599 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10600 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10601 (remote_prepare): New function with most of the TCP code from ...
10602 (remote_open): ... here. Detect PORT here unconditionally. Move also
10603 setting transport_is_reliable.
10604 * server.c (run_once): New variable.
10605 (gdbserver_usage): Document it.
10606 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10607 the first run if RUN_ONCE.
10608 * server.h (run_once, remote_prepare): New declarations.
10609
7a9dd1b2
TT
106102011-04-19 Tom Tromey <tromey@redhat.com>
10611
10612 * win32-low.c (handle_load_dll): Remove duplicate "the".
10613
81239425
PM
106142011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10615
10616 Remove support for old Cygwin 1.5 versions.
10617 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10618 function to avoid warning.
10619 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10620 warning.
10621
9e0627f1
PM
106222011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10623
10624 * gdbserver/server.h (Macro _): Define it if not available.
10625
588eebee
MS
106262011-03-14 Michael Snyder <msnyder@vmware.com>
10627
348af9f7 10628 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10629
43f70d4c
JB
106302011-03-10 Joel Brobecker <brobecker@adacore.com>
10631
10632 * Makefile.in (maintainer-clean realclean distclean): Remove
10633 "make ... subdir_do" command.
10634
348af9f7
MS
106352011-03-10 Michael Snyder <msnyder@vmware.com>
10636
10637 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10638
10639 * server.c (handle_v_run): Free alloced buffer on early return.
10640
e637a4f5
YQ
106412011-03-09 Yao Qi <yao@codesourcery.com>
10642
10643 Revert:
10644 2011-03-04 Yao Qi <yao@codesourcery.com>
10645
10646 * Makefile.in: Remove GNU make feature --directory.
10647
10648 2011-03-05 Yao Qi <yao@codesourcery.com>
10649
10650 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10651 (subdir_do): New make target. Copied from gdb/Makefile.
10652 (maintainer-clean, realclean, distclean, clean): Call corresponding
10653 make targets in common/Makefile.
10654
10655 2011-02-11 Yao Qi <yao@codesourcery.com>
10656
10657 * configure.ac: Call AC_PROG_RANLIB.
10658 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10659 * configure: Regenerate.
10660
e6edda56
JK
106612011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10662
10663 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10664
e5141119
JB
106652011-03-06 Yao Qi <yao@codesourcery.com>
10666
10667 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10668
64794aa4
JB
106692011-03-05 Yao Qi <yao@codesourcery.com>
10670
10671 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10672 (subdir_do): New make target. Copied from gdb/Makefile.
10673 (maintainer-clean, realclean, distclean, clean): Call corresponding
10674 make targets in common/Makefile.
10675
7a762829
YQ
106762011-03-04 Yao Qi <yao@codesourcery.com>
10677
10678 * Makefile.in: Remove GNU make feature --directory.
10679
348af9f7
MS
106802011-03-04 Michael Snyder <msnyder@vmware.com>
10681
10682 * server.c (queue_stop_reply): Call xmalloc not malloc.
10683
106842011-03-02 Michael Snyder <msnyder@vmware.com>
10685
10686 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10687
9f72fee2
MS
106882011-02-28 Michael Snyder <msnyder@vmware.com>
10689
588eebee
MS
10690 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10691 (cmd_qtframe): Ditto.
10692 (cmd_qtbuffer): Ditto.
10693 (cmd_bigqtbuffer): Ditto.
10694
9f72fee2
MS
10695 * utils.c (decimal2str): Initialize 'width' to nine, then
10696 don't mess with it.
10697
8040bd49
UW
106982011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10699
10700 * hostio.c (require_data): Free *data, not data.
10701
7e52cbd0
JK
107022011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10703
10704 * hostio.c (require_data): Use free, not xfree.
10705
9130f83e
MS
107062011-02-27 Michael Snyder <msnyder@vmware.com>
10707
4b812f4e
MS
10708 * server.c (handle_query): Discard unused value.
10709
9130f83e
MS
10710 * hostio.c (require_data): Free malloc memory before returning
10711 error.
10712
69d37113
MS
107132011-02-26 Michael Snyder <msnyder@vmware.com>
10714
10715 * linux-low.c (list_threads): Call closedir for dirent.
10716
35f5825a
MS
107172011-02-27 Michael Snyder <msnyder@vmware.com>
10718
2a589cef
MS
10719 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10720 a case statement falls through.
10721
0adea5f7
MS
10722 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10723
35f5825a
MS
10724 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10725 in comparison.
10726
238f1c74
MS
107272011-02-26 Michael Snyder <msnyder@vmware.com>
10728
10729 * utils.c (decimal2str): Eliminate dead code and dead param.
10730 (pulongest): Drop dead param from call to decimal2str.
10731 (plongest): Ditto.
10732
633ff500
JB
107332011-02-24 Joel Brobecker <brobecker@adacore.com>
10734
10735 Revert the following patch (not approved yet):
10736 2011-02-21 Hui Zhu <teawater@gmail.com>
10737 * tracepoint.c (tp_printf): New function.
10738 (eval_agent_expr): Handle gdb_agent_op_printf.
10739
f9c6ff72
HZ
107402011-02-21 Hui Zhu <teawater@gmail.com>
10741
10742 * tracepoint.c (tp_printf): New function.
10743 (eval_agent_expr): Handle gdb_agent_op_printf.
10744
94d5e490
TT
107452011-02-18 Tom Tromey <tromey@redhat.com>
10746
10747 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10748 (tracepoint.o): Likewise.
10749 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10750 (gdb_agent_op_names): Likewise.
10751
c7f96d2b
TT
107522011-02-18 Tom Tromey <tromey@redhat.com>
10753
10754 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10755 gdb_agent_op_rot>: New constants.
10756 (gdb_agent_op_names): Add pick and roll.
10757 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10758 cases.
10759
0feedb2c
JK
107602011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10761
10762 * aclocal.m4: Regenerated with aclocal-1.11.1.
10763
b3b9301e
PA
107642011-02-14 Pedro Alves <pedro@codesourcery.com>
10765
10766 * server.c (handle_qxfer_traceframe_info): New.
10767 (qxfer_packets): Register "traceframe-info".
10768 (handle_query): Report support for qXfer:traceframe-info:read+.
10769 * tracepoint.c (match_blocktype): New.
10770 (traceframe_find_block_type): Rename to ...
10771 (traceframe_walk_blocks): ... this. Add callback filter argument,
10772 and use it.
10773 (traceframe_find_block_type): New, reimplemented on top of
10774 traceframe_walk_blocks.
10775 (build_traceframe_info_xml): New.
10776 (traceframe_read_info): New.
10777 * server.h (traceframe_read_info): Declare.
10778
4f3e6fb7
YQ
107792011-02-11 Yao Qi <yao@codesourcery.com>
10780
10781 * configure.ac: Call AC_PROG_RANLIB.
10782 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10783 * configure: Regenerate.
10784
764880b7
PA
107852011-02-07 Pedro Alves <pedro@codesourcery.com>
10786
10787 * server.c (gdb_read_memory): Change return semantics to allow
10788 partial transfers.
10789 (handle_search_memory_1): Adjust.
10790 (process_serial_event) <'m' packet>: Handle partial transfers.
10791 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10792
1c79eb8a
PA
107932011-01-28 Pedro Alves <pedro@codesourcery.com>
10794
10795 * regcache.c (init_register_cache): Initialize
10796 regcache->register_status.
10797 (free_register_cache): Release regcache->register_status.
10798 (regcache_cpy): Copy register_status.
10799 (registers_to_string): Print 'x's for unavailable registers.
10800 (supply_register): Mark the register's status valid or
10801 unavailable, depending on whether a buffer was passed in or not.
10802 (supply_register_zeroed): New.
10803 (supply_regblock): Mark the registers' status valid or
10804 unavailable, depending on whether a buffer was passed in or not.
10805 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10806 (struct regcache): New `register_status' field.
10807 (supply_register_zeroed): Declare.
10808 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10809 supply_register_zeroed, rather than passing a NULL buffer to
10810 supply_register.
10811 * tracepoint.c (fetch_traceframe_registers): Update comment.
10812
85724a0e
PA
108132011-01-28 Pedro Alves <pedro@codesourcery.com>
10814
10815 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10816 buffer explicit.
10817
d08aafef
PA
108182011-01-25 Pedro Alves <pedro@codesourcery.com>
10819
10820 * server.h (decode_xfer_write): Change prototype.
10821 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10822 and don't extract the annex here.
10823 * server.c (decode_xfer_read): Remove `annex' parameter,
10824 and don't extract the annex here.
10825 (decode_xfer): New.
10826 (struct qxfer): New.
10827 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10828 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10829 (handle_qxfer_statictrace): New functions, abstracted out from
10830 handle_query, and made to use the struct qxfer interface.
10831 (handle_threads_qxfer_proper): Rename to ...
10832 (handle_qxfer_threads_proper): ... this.
10833 (handle_threads_qxfer): Rename to ...
10834 (handle_qxfer_threads): ... this. Adjust.
10835 (qxfer_packets): New array.
10836 (handle_qxfer): New function.
10837 (handle_query): Use handle_qxfer.
10838
493e2a69
MS
108392011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10840
10841 * gdbreplay.c: Shorten lines of >= 80 columns.
10842 * linux-low.c: Ditto.
10843 * linux-ppc-low.c: Ditto.
10844 * linux-s390-low.c: Ditto.
10845 * linux-sparc-low.c: Ditto.
10846 * linux-x86-low.c: Ditto.
10847 * linux-xtensa-low.c: Ditto.
10848 * mem-break.c: Ditto.
10849 * nto-low.c: Ditto.
10850 * regcache.h: Ditto.
10851 * remote-utils.c: Ditto.
10852 * server.c: Ditto.
10853 * server.h: Ditto.
10854 * thread-db.c: Ditto.
10855 * tracepoint.c: Ditto.
10856 * utils.c: Ditto.
10857 * win32-low.h: Ditto.
10858
44944448
JB
108592011-01-05 Joel Brobecker <brobecker@adacore.com>
10860
10861 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10862 update.
10863
71ce852c
JB
108642011-01-01 Joel Brobecker <brobecker@adacore.com>
10865
10866 * server.c (gdbserver_version): Update copyright year in version
10867 output.
10868 * gdbreplay.c (gdbreplay_version): Ditto.
10869
eb826dc6
MF
108702010-12-29 Jie Zhang <jie.zhang@analog.com>
10871
10872 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10873 * linux-bfin-low.c: New file.
10874 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10875 PT_DATA_ADDR for BFIN targets.
10876 * Makefile.in (SFILES): Add linux-bfin-low.c.
10877 (clean): Remove reg-bfin.c.
10878 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10879 * README: Mention supported Blackfin targets.
10880
39ab222a
MF
108812010-12-23 Mike Frysinger <vapier@gentoo.org>
10882
10883 * .gitignore: New file.
10884
a1f2ce7d
MF
108852010-11-16 Mike Frysinger <vapier@gentoo.org>
10886
10887 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10888
f474844c
JZ
108892010-10-22 Jie Zhang <jie@codesourcery.com>
10890
10891 * Makefile.in: Add FLAGS_TO_PASS variable.
10892 (install): Remove dependency of install-only and recursively
10893 invoke make for install-only.
10894
f1048712
DE
108952010-10-04 Doug Evans <dje@google.com>
10896
10897 * Makefile.in (uninstall): Use $(DESTDIR).
10898
b53a1623
PA
108992010-09-24 Pedro Alves <pedro@codesourcery.com>
10900
e6ee044d
PA
10901 PR gdb/11842
10902
b53a1623
PA
10903 * linux-x86-low.c (compat_siginfo_from_siginfo)
10904 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10905 si_code is < 0. Check for si_code == SI_TIMER before checking for
10906 si_code < 0.
10907
fa1bd1e4
JB
109082010-09-13 Joel Brobecker <brobecker@adacore.com>
10909
10910 * lynx-i386-low.c: New file.
10911 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10912
47fac8f8
JB
109132010-09-13 Joel Brobecker <brobecker@adacore.com>
10914
10915 * lynx-low.c (ptrace_request_to_str): Remove handling for
10916 request values that have been removed in LynxOS 5.x.
10917
1adfc54d
JB
109182010-09-13 Joel Brobecker <brobecker@adacore.com>
10919
10920 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10921 <ptrace.h>
10922
c2a66c29
NS
109232010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10924
10925 * configure.ac: Add --enable-inprocess-agent option.
10926 * configure: Rebuilt.
10927
32fcada3
YQ
109282010-09-06 Yao Qi <yao@codesourcery.com>
10929
10930 * linux-low.c (linux_kill): Remove unused variable.
10931 (linux_stabilize_threads): Likewise.
10932 * server.c (start_inferior): Likewise.
10933 (queue_stop_reply_callback): Likewise.
10934 * tracepoint.c (do_action_at_tracepoint): Likewise.
10935
0cccb683
YQ
109362010-09-06 Yao Qi <yao@codesourcery.com>
10937
10938 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10939 on return.
10940
423ec54c
JK
109412010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10942
10943 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10944
12ac6819
PA
109452010-09-06 Pedro Alves <pedro@codesourcery.com>
10946
10947 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10948 "$(IPA_DEPFILES)".
10949
8ed54b31
JB
109502010-09-01 Joel Brobecker <brobecker@adacore.com>
10951
10952 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10953 gdbserver/lynx-ppc-low.c: New files.
10954 * Makefile.in (lynx_low_h): New variable.
10955 (lynx-low.o, lynx-ppc-low.o): New rules.
10956 * configure.ac: On LynxOS, link with -lnetinet.
10957 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10958 * configure: regenerate.
10959
bb0116a4
JB
109602010-09-01 Joel Brobecker <brobecker@adacore.com>
10961
10962 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10963 * configure.ac: Add check for vasprintf and vsnprintf.
10964 * configure, config.in: Regenerate.
10965 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10966
a778ab81 109672010-09-01 Joel Brobecker <brobecker@adacore.com>
10968
10969 * gdbreplay.c: Move include of alloca.h up, next to include of
10970 malloc.h.
10971 * server.h: Add include of malloc.h.
10972 * mem-break.c: Remove include of malloc.h.
10973 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10974
8b034a19 109752010-09-01 Joel Brobecker <brobecker@adacore.com>
10976
10977 * Makefile.in (memmem.o): Build with -Wno-error.
10978
109792010-09-01 Joel Brobecker <brobecker@adacore.com>
10980
10981 * utils.c (xsnprintf): Make non-static.
10982 * server.h: Add xsnprintf declaration.
10983 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10984 replace calls to snprintf by calls to xsnprintf throughout.
10985
109862010-09-01 Joel Brobecker <brobecker@adacore.com>
10987
10988 * configure.ac: Add configure check for alloca.
10989 * configure, config.in: Regenerate.
10990 * server.h: Include alloca.h if it exists.
10991 * gdbreplay.c: Include alloca.h if it exists.
10992
1a981360
PA
109932010-08-28 Pedro Alves <pedro@codesourcery.com>
10994
10995 * linux-low.c (__SIGRTMIN): Define if not already defined.
10996 (linux_create_inferior): Check for __ANDROID__ rather than
10997 __SIGRTMIN.
10998 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10999 are already deferred.
11000 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11001 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11002 stopped and already has a pending signal to report.
11003 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11004 a pending signal to report or is moving out of a jump pad.
11005 (linux_init_signals): Check for __ANDROID__ rather than
11006 __SIGRTMIN.
11007
b4d51a55
PA
110082010-08-28 Pedro Alves <pedro@codesourcery.com>
11009
11010 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11011 debug_threads check. Avoid a linear search when not doing debug
11012 output.
11013
ec48365d
PA
110142010-08-27 Pedro Alves <pedro@codesourcery.com>
11015
11016 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11017 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11018 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11019 (process_event): Change local fd's type to gdb_fildes_t.
11020 (create_file_handler): Adjust prototype.
11021 (delete_file_handler): Adjust prototype.
11022 (handle_file_event): Adjust prototype. Use pfildes.
11023 (create_file_event): Adjsut prototype.
11024 * remote-utils.c (remote_desc, listen_desc): Change type to
11025 gdb_fildes_t.
11026 * server.h: New gdb_fildes_t typedef.
11027 [USE_WIN32API]: Include winsock2.h.
11028 (delete_file_handler, add_file_handler): Adjust prototypes.
11029 (pfildes): Declare.
11030 * utils.c (pfildes): New.
11031
854d88f0
PA
110322010-08-27 Pedro Alves <pedro@codesourcery.com>
11033
11034 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11035 * configure: Regenerate.
11036
0146f85b
PA
110372010-08-27 Pedro Alves <pedro@codesourcery.com>
11038
11039 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11040 (linux_done_accessing_memory): ... this.
11041 (linux_target_ops): Adjust.
11042 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11043 * nto-low.c (nto_target_ops): Adjust comment.
11044 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11045 * spu-low.c (spu_target_ops): Adjust comment.
11046 * target.h (target_ops): Rename unprepare_to_access_memory field
11047 to done_accessing_memory.
11048 (unprepare_to_access_memory): Rename to ...
11049 (done_accessing_memory): ... this.
11050
90d74c30
PA
110512010-08-26 Pedro Alves <pedro@codesourcery.com>
11052
11053 * linux-low.c (linux_prepare_to_access_memory): New.
11054 (linux_unprepare_to_access_memory): New.
11055 (linux_target_ops): Install them.
11056 * server.c (read_memory): Rename to ...
11057 (gdb_read_memory): ... this. Use
11058 prepare_to_access_memory/prepare_to_access_memory.
11059 (write_memory): Rename to ...
11060 (gdb_write_memory): ... this. Use
11061 prepare_to_access_memory/prepare_to_access_memory.
11062 (handle_search_memory_1): Adjust.
11063 (process_serial_event): Adjust.
11064 * target.h (struct target_ops): New fields
11065 prepare_to_access_memory and unprepare_to_access_memory.
11066 (prepare_to_access_memory, unprepare_to_access_memory): New.
11067 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11068 prepare_to_access_memory/prepare_to_access_memory.
11069 * nto-low.c (nto_target_ops): Adjust.
11070 * spu-low.c (spu_target_ops): Adjust.
11071 * win32-low.c (win32_target_ops): Adjust.
11072
fd467969
PA
110732010-08-26 Pedro Alves <pedro@codesourcery.com>
11074
11075 * Makefile.in (WARN_CFLAGS): Get it from configure.
11076 (WERROR_CFLAGS): New.
11077 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11078 * configure.ac: Introduce --enable-werror, which adds -Werror to
11079 the compiler command line. Enabled by default. Disable with
11080 --disable-werror. Add -Wdeclaration-after-statement
11081 Wpointer-arith and -Wformat-nonliteral to warning flags.
11082 * configure: Regenerate.
11083
331e2f5f
PA
110842010-08-26 Pedro Alves <pedro@codesourcery.com>
11085
11086 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11087
e581f2b4
PA
110882010-08-26 Pedro Alves <pedro@codesourcery.com>
11089
11090 * gdbreplay.c (remote_error): New.
11091 (gdbchar): New.
11092 (expect): Use gdbchar. Check for error reading from GDB.
11093 Clarify sync error output.
11094 (play): Check for errors writing to GDB.
11095 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11096 * remote-utils.c (getpkt): Check for errors writing to the remote
11097 descriptor.
11098
3c11dd79
PA
110992010-08-25 Pedro Alves <pedro@codesourcery.com>
11100
11101 * linux-low.c (linux_wait_1): Move non-debugging code out of
11102 `debug_threads' control.
11103
d20a8ad9
PA
111042010-08-25 Pedro Alves <pedro@codesourcery.com>
11105
11106 * linux-low.c (linux_wait_1): Don't set last_status here.
11107 * server.c (push_event, queue_stop_reply_callback): Assert we're
11108 not pushing a TARGET_WAITKIND_IGNORE event.
11109 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11110 (myresume, handle_target_event): Set the thread's last_resume_kind
11111 and last_status from the target returned status.
11112
964e4306
PA
111132010-08-25 Pedro Alves <pedro@codesourcery.com>
11114
11115 PR threads/10729
11116
11117 * linux-x86-low.c (update_debug_registers_callback): New.
11118 (i386_dr_low_set_addr): Use it.
11119 (i386_dr_low_get_addr): New.
11120 (i386_dr_low_set_control): Use update_debug_registers_callback.
11121 (i386_dr_low_get_control): New.
11122 (i386_dr_low_get_status): Adjust.
11123 * linux-low.c (linux_stop_lwp): New.
11124 * linux-low.h (linux_stop_lwp): Declare.
11125
11126 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11127 argument instead of a i386_debug_reg_state.
11128 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11129 a i386_debug_reg_state.
11130 (i386_insert_aligned_watchpoint): Adjust.
11131 (i386_remove_aligned_watchpoint): Adjust.
11132 (i386_low_stopped_data_address): Read the debug registers from the
11133 inferior instead of from the mirrors.
11134 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11135 (i386_dr_low_get_addr): Declare.
11136 (i386_dr_low_get_control): Declare.
11137 (i386_dr_low_get_status): Change prototype.
11138
11139 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11140 (i386_dr_low_get_addr): New.
11141 (i386_dr_low_get_control): New.
11142 (i386_dr_low_get_status): Adjust prototype. Return
11143 dr_status_mirror.
11144 (i386_initial_stuff): Clear dr_status_mirror and
11145 dr_control_mirror.
11146 (i386_get_thread_context): Adjust.
11147 (i386_set_thread_context): Adjust.
11148 (i386_thread_added): Adjust.
11149
5f21a75b
PA
111502010-08-24 Pedro Alves <pedro@codesourcery.com>
11151
11152 * linux-low.h (linux_thread_area): Delete declaration.
11153
3e4c1235
TS
111542010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11155
11156 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11157 after its termination.
11158
1971b033
PA
111592010-08-09 Pedro Alves <pedro@codesourcery.com>
11160
11161 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11162 (gdb_wants_all_stopped): Delete.
11163 (linux_wait_1): Don't call them.
11164 * server.c (handle_v_cont): Tag all threads as want-stopped.
11165 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11166 stopped as "client-wants-stopped".
11167
310444ac
PA
111682010-07-31 Pedro Alves <pedro@codesourcery.com>
11169
11170 * Makefile.in (signals_h): New.
11171 (server_h): Depend on it.
11172 (server.o): Don't depend on $(signals_def).
11173 (signals.o): Depend on $(signals_def).
11174
a19cae16
JK
111752010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11176
11177 * Makefile.in (signals_def): New.
11178 (server_h): Append include/gdb/signals.h and signals_def.
11179 (server.o): Append signals_def.
11180
30d50328
JK
111812010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11182
11183 * server.c (handle_target_event): Use target_signal_to_host for
11184 resume_info.sig initialization.
11185 * target.h (struct thread_resume) <sig>: New comment.
11186
5c3216e2
OS
111872010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11188
c6f46ca0
OS
11189 * server.c (handle_query): strcpy() the returned string from paddress()
11190 instead of sprintf().
5c3216e2
OS
11191 * utils.c (paddress): Return phex_nz().
11192
6bd31874
JB
111932010-07-07 Joel Brobecker <brobecker@adacore.com>
11194
11195 * server.c (handle_v_cont): Call mourn_inferior if process
11196 just exited.
11197 (myresume): Likewise.
11198
0fb4aa4b
PA
111992010-07-01 Pedro Alves <pedro@codesourcery.com>
11200
11201 Static tracepoints, and integration with UST.
11202
11203 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11204 * mem-break.c (uninsert_all_breakpoints)
11205 (reinsert_all_breakpoints): New.
11206 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11207 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11208 (gdb_agent_ust_loaded, helper_thread_id)
11209 (gdb_agent_helper_thread_id): New macros.
11210 (struct ipa_sym_addresses): Add addr_ust_loaded,
11211 addr_helper_thread_id, addr_cmd_buf.
11212 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11213 (in_process_agent_loaded_ust): New.
11214 (write_e_ust_not_loaded): New.
11215 (maybe_write_ipa_ust_not_loaded): New.
11216 (struct collect_static_trace_data_action): New.
11217 (enum tracepoint_type) <static_tracepoint>: New.
11218 (struct tracepoint) <handle>: Mention static tracepoints.
11219 (struct static_tracepoint_ctx): New.
11220 (CMD_BUF_SIZE): New.
11221 (add_tracepoint_action): Handle static tracepoint actions.
11222 (unprobe_marker_at): New.
11223 (clear_installed_tracepoints): Handle static tracepoints.
11224 (cmd_qtdp): Handle static tracepoints.
11225 (probe_marker_at): New.
11226 (cmd_qtstart): Handle static tracepoints.
11227 (response_tracepoint): Handle static tracepoints.
11228 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11229 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11230 (get_context_regcache): Handle static tracepoints.
11231 (do_action_at_tracepoint): Handle static tracepoint actions.
11232 (traceframe_find_block_type): Handle static trace data blocks.
11233 (traceframe_read_sdata): New.
11234 (download_tracepoints): Download static tracepoint actions.
11235 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11236 (GDB_PROBE_NAME): New.
11237 (ust_ops): New.
11238 (GET_UST_SYM): New.
11239 (USTF): New.
11240 (dlsym_ust): New.
11241 (ust_marker_to_static_tracepoint): New.
11242 (gdb_probe): New.
11243 (collect_ust_data_at_tracepoint): New.
11244 (gdb_ust_probe): New.
11245 (UNIX_PATH_MAX, SOCK_DIR): New.
11246 (gdb_ust_connect_sync_socket): New.
11247 (resume_thread, stop_thread): New.
11248 (run_inferior_command): New.
11249 (init_named_socket): New.
11250 (gdb_ust_socket_init): New.
11251 (cstr_to_hexstr): New.
11252 (next_st): New.
11253 (first_marker, next_marker): New.
11254 (response_ust_marker): New.
11255 (cmd_qtfstm, cmd_qtsstm): New.
11256 (unprobe_marker_at, probe_marker_at): New.
11257 (cmd_qtstmat, gdb_ust_thread): New.
11258 (gdb_ust_init): New.
11259 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11260 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11261 (ST_REGENTRY): New.
11262 (x86_64_st_collect_regmap): New.
11263 (X86_64_NUM_ST_COLLECT_GREGS): New.
11264 (AMD64_RIP_REGNUM): New.
11265 (supply_static_tracepoint_registers): New.
11266 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11267 (ST_REGENTRY): New.
11268 (i386_st_collect_regmap): New.
11269 (i386_NUM_ST_COLLECT_GREGS): New.
11270 (supply_static_tracepoint_registers): New.
11271 * server.c (handle_query): Handle qXfer:statictrace:read.
11272 <qSupported>: Report support for StaticTracepoints, and
11273 qXfer:statictrace:read features.
11274 * server.h (traceframe_read_sdata)
11275 (supply_static_tracepoint_registers): Declare.
11276 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11277 (unpack_varlen_hex): Include in IPA build.
11278 * Makefile.in (ustlibs, ustinc): New.
11279 (IPA_OBJS): Add remote-utils-ipa.o.
11280 ($(IPA_LIB)): Link -ldl and -lpthread.
11281 (UST_CFLAGS): New.
11282 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11283 * config.in, configure: Regenerate.
11284
9e4344e5
PA
112852010-06-20 Ian Lance Taylor <iant@google.com>
11286 Pedro Alves <pedro@codesourcery.com>
11287
11288 * linux-x86-low.c (always_true): Delete.
11289 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11290 trying to fool the compiler with always_true.
11291
c6beb2cb
PA
112922010-06-20 Pedro Alves <pedro@codesourcery.com>
11293
11294 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11295 conditions in gdbserver.
11296
d2ed6730
UW
112972010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11298
11299 * spu-low.c (spu_read_memory): Wrap around local store limit.
11300 (spu_write_memory): Likewise.
11301
4e29fb54
PA
113022010-06-15 Pedro Alves <pedro@codesourcery.com>
11303
11304 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11305 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11306 LONGEST uses.
11307 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11308 uses.
11309 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11310 uses with LONGEST uses.
11311
6a271cae
PA
113122010-06-14 Stan Shebs <stan@codesourcery.com>
11313 Pedro Alves <pedro@codesourcery.com>
11314
11315 Bytecode compiler.
11316
11317 * linux-x86-low.c: Include limits.h.
11318 (add_insns): New.
11319 (always_true): New.
11320 (EMIT_ASM): New.
11321 (EMIT_ASM32): New.
11322 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11323 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11324 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11325 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11326 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11327 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11328 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11329 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11330 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11331 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11332 (amd64_emit_void_call_2): New.
11333 (amd64_emit_ops): New.
11334 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11335 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11336 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11337 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11338 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11339 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11340 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11341 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11342 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11343 (i386_emit_stack_adjust, i386_emit_int_call_1)
11344 (i386_emit_void_call_2): New.
11345 (i386_emit_ops): New.
11346 (x86_emit_ops): New.
11347 (the_low_target): Install x86_emit_ops.
11348 * server.h (struct emit_ops): New.
11349 (get_raw_reg_func_addr): Declare.
11350 (current_insn_ptr, emit_error): Declare.
11351 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11352 (set_trace_state_variable_value): New defines.
11353 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11354 addr_get_trace_state_variable_value and
11355 addr_set_trace_state_variable_value.
11356 (symbol_list): New fields for get_raw_reg,
11357 get_trace_state_variable_value and set_trace_state_variable_value.
11358 (condfn): New typedef.
11359 (struct tracepoint): New field `compiled_cond'.
11360 (do_action_at_tracepoint): Clear compiled_cond.
11361 (get_trace_state_variable_value, set_trace_state_variable_value):
11362 Export in the IPA.
11363 (condition_true_at_tracepoint): If there's a compiled condition,
11364 run that.
11365 (current_insn_ptr, emit_error): New globals.
11366 (struct bytecode_address): New.
11367 (get_raw_reg_func_addr): New.
11368 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11369 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11370 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11371 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11372 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11373 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11374 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11375 (compile_tracepoint_condition, compile_bytecodes): New.
11376 * target.h (emit_ops): Forward declare.
11377 (struct target_ops): New field emit_ops.
11378 (target_emit_ops): New.
11379 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11380 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11381 * linux-low.c (linux_emit_ops): New.
11382 (linux_target_ops): Install it.
11383 * linux-low.h (struct linux_target_ops): New field emit_ops.
11384
92b72907
UW
113852010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11386
11387 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11388 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11389
fa593d66
PA
113902010-06-01 Pedro Alves <pedro@codesourcery.com>
11391 Stan Shebs <stan@codesourcery.com>
11392
11393 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11394 (all): Depend on $(extra_libraries).
11395 (install-only): Install the IPA.
11396 (IPA_OBJS, IPA_LIB): New.
11397 (clean): Remove the IPA lib.
11398 (IPAGENT_CFLAGS): New.
11399 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11400 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11401 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11402 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11403 * configure.ac: Check for atomic builtins support in the compiler.
11404 (IPA_DEPFILES, extra_libraries): Define.
11405 * configure.srv (ipa_obj): Add description.
11406 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11407 (i[34567]86-*-linux*): Set ipa_obj.
11408 (x86_64-*-linux*): Set ipa_obj.
11409 * linux-low.c (stabilizing_threads): New.
11410 (supports_fast_tracepoints): New.
11411 (linux_detach): Stabilize threads before detaching.
11412 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11413 the lwp is either not stabilizing, or is moving out of a jump pad.
11414 (linux_fast_tracepoint_collecting): New.
11415 (maybe_move_out_of_jump_pad): New.
11416 (enqueue_one_deferred_signal): New.
11417 (dequeue_one_deferred_signal): New.
11418 (linux_wait_for_event_1): If moving out of a jump pad, defer
11419 pending signals to later.
11420 (linux_stabilize_threads): New.
11421 (linux_wait_1): Check if threads need moving out of jump pads, and
11422 do it if so.
11423 (stuck_in_jump_pad_callback): New.
11424 (move_out_of_jump_pad_callback): New.
11425 (lwp_running): New.
11426 (linux_resume_one_lwp): Handle moving out of jump pads.
11427 (linux_set_resume_request): Dequeue deferred signals.
11428 (need_step_over_p): Also step over fast tracepoint jumps.
11429 (start_step_over): Also uninsert fast tracepoint jumps.
11430 (finish_step_over): Also reinsert fast tracepoint jumps.
11431 (linux_install_fast_tracepoint_jump): New.
11432 (linux_target_ops): Install linux_stabilize_threads and
11433 linux_install_fast_tracepoint_jump_pad.
11434 * linux-low.h (linux_target_ops) <get_thread_area,
11435 install_fast_tracepoint_jump_pad>: New fields.
11436 (struct lwp_info) <collecting_fast_tracepoint,
11437 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11438 (linux_get_thread_area): Declare.
11439 * linux-x86-low.c (jump_insn): New.
11440 (x86_get_thread_area): New.
11441 (append_insns): New.
11442 (push_opcode): New.
11443 (amd64_install_fast_tracepoint_jump_pad): New.
11444 (i386_install_fast_tracepoint_jump_pad): New.
11445 (x86_install_fast_tracepoint_jump_pad): New.
11446 (the_low_target): Install x86_get_thread_area and
11447 x86_install_fast_tracepoint_jump_pad.
11448 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11449 (struct fast_tracepoint_jump): New.
11450 (fast_tracepoint_jump_insn): New.
11451 (fast_tracepoint_jump_shadow): New.
11452 (find_fast_tracepoint_jump_at): New.
11453 (fast_tracepoint_jump_here): New.
11454 (delete_fast_tracepoint_jump): New.
11455 (set_fast_tracepoint_jump): New.
11456 (uninsert_fast_tracepoint_jumps_at): New.
11457 (reinsert_fast_tracepoint_jumps_at): New.
11458 (set_breakpoint_at): Use write_inferior_memory.
11459 (uninsert_raw_breakpoint): Use write_inferior_memory.
11460 (check_mem_read): Mask out fast tracepoint jumps.
11461 (check_mem_write): Mask out fast tracepoint jumps.
11462 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11463 (set_fast_tracepoint_jump): Declare.
11464 (delete_fast_tracepoint_jump)
11465 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11466 (reinsert_fast_tracepoint_jumps_at): Declare.
11467 * regcache.c: Don't compile many functions when building the
11468 in-process agent library.
11469 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11470 the register buffer in the heap.
11471 (free_register_cache): If the register buffer isn't owned by the
11472 regcache, don't free it.
11473 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11474 pre-existing register caches.
11475 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11476 type.
11477 (convert_ascii_to_int): : Constify `from' parameter type.
11478 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11479 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11480 the needed buffer in-place.
11481 (relocate_instruction): New.
11482 * server.c (handle_query) <qSymbols>: If the target supports
11483 tracepoints, give it a chance of looking up symbols. Report
11484 support for fast tracepoints.
11485 (handle_status): Stabilize threads.
11486 (process_serial_event): Adjust.
11487 * server.h (struct fast_tracepoint_jump): Forward declare.
11488 (struct process_info) <fast_tracepoint_jumps>: New field.
11489 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11490 (decode_X_packet, decode_M_packet): Adjust.
11491 (relocate_instruction): Declare.
11492 (in_process_agent_loaded): Declare.
11493 (tracepoint_look_up_symbols): Declare.
11494 (struct fast_tpoint_collect_status): Declare.
11495 (fast_tracepoint_collecting): Declare.
11496 (force_unlock_trace_buffer): Declare.
11497 (handle_tracepoint_bkpts): Declare.
11498 (initialize_low_tracepoint)
11499 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11500 * target.h (struct target_ops) <stabilize_threads,
11501 install_fast_tracepoint_jump_pad>: New fields.
11502 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11503 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11504 [HAVE_STDINT_H]: Include stdint.h.
11505 (trace_debug_1): Rename to ...
11506 (trace_vdebug): ... this.
11507 (trace_debug): Rename to ...
11508 (trace_debug_1): ... this. Add `level' parameter.
11509 (trace_debug): New.
11510 (ATTR_USED, ATTR_NOINLINE): New.
11511 (IP_AGENT_EXPORT): New.
11512 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11513 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11514 (about_to_request_buffer_space, trace_buffer_is_full)
11515 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11516 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11517 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11518 (traceframe_write_count, traceframes_created)
11519 (trace_state_variables)
11520 New renaming defines.
11521 (struct ipa_sym_addresses): New.
11522 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11523 (symbol_list): New.
11524 (ipa_sym_addrs): New.
11525 (all_tracepoint_symbols_looked_up): New.
11526 (in_process_agent_loaded): New.
11527 (write_e_ipa_not_loaded): New.
11528 (maybe_write_ipa_not_loaded): New.
11529 (tracepoint_look_up_symbols): New.
11530 (debug_threads) [IN_PROCESS_AGENT]: New.
11531 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11532 (UNKNOWN_SIDE_EFFECTS): New.
11533 (stop_tracing): New.
11534 (flush_trace_buffer): New.
11535 (stop_tracing_bkpt): New.
11536 (flush_trace_buffer_bkpt): New.
11537 (read_inferior_integer): New.
11538 (read_inferior_uinteger): New.
11539 (read_inferior_data_pointer): New.
11540 (write_inferior_data_pointer): New.
11541 (write_inferior_integer): New.
11542 (write_inferior_uinteger): New.
11543 (struct collect_static_trace_data_action): Delete.
11544 (enum tracepoint_type): New.
11545 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11546 <actions_str, step_actions, step_actions_str>: Only include in
11547 GDBserver.
fa593d66
PA
11548 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11549 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11550 (tracepoints): Use IP_AGENT_EXPORT.
11551 (last_tracepoint): Don't include in the IPA.
11552 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11553 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11554 (alloced_trace_state_variables): New.
11555 (trace_state_variables): Use IP_AGENT_EXPORT.
11556 (traceframe_t): Delete unused variable.
11557 (circular_trace_buffer): Don't include in the IPA.
11558 (trace_buffer_start): Delete.
11559 (struct trace_buffer_control): New.
11560 (trace_buffer_free): Delete.
11561 (struct ipa_trace_buffer_control): New.
11562 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11563 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11564 New.
11565 (trace_buffer_ctrl): New.
11566 (TRACE_BUFFER_CTRL_CURR): New.
11567 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11568 Reimplement as macros.
11569 (trace_buffer_wrap): Delete.
11570 (traceframe_write_count, traceframe_read_count)
11571 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11572 (struct tracepoint_hit_ctx) <type>: New field.
11573 (struct fast_tracepoint_ctx): New.
11574 (memory_barrier): New.
11575 (cmpxchg): New.
11576 (record_tracepoint_error): Update atomically in the IPA.
11577 (clear_inferior_trace_buffer): New.
11578 (about_to_request_buffer_space): New.
11579 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11580 updating the same buffer.
11581 (add_tracepoint): Default the tracepoint's type to trap
11582 tracepoint, and orig_size to -1.
11583 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11584 internal variables.
11585 (create_trace_state_variable): New parameter `gdb'. Handle it.
11586 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11587 (cmd_qtdp): Handle fast tracepoints.
11588 (cmd_qtdv): Adjust.
11589 (max_jump_pad_size): New.
11590 (gdb_jump_pad_head): New.
11591 (get_jump_space_head): New.
11592 (claim_jump_space): New.
11593 (sort_tracepoints): New.
11594 (MAX_JUMP_SIZE): New.
11595 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11596 IPA.
11597 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11598 support. Upload fast traceframes, and delete internal IPA
11599 breakpoints.
11600 (stop_tracing_handler): New.
11601 (flush_trace_buffer_handler): New.
11602 (cmd_qtstop): Upload fast tracepoints.
11603 (response_tracepoint): Handle fast tracepoints.
11604 (tracepoint_finished_step): Upload fast traceframes. Set the
11605 tracepoint hit context's tracepoint type.
11606 (handle_tracepoint_bkpts): New.
11607 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11608 type. Add comment about fast tracepoints.
11609 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11610 non-existing action_str field.
11611 (get_context_regcache): Handle fast tracepoints.
11612 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11613 to the regcache.
11614 (fast_tracepoint_from_jump_pad_address): New.
11615 (fast_tracepoint_from_ipa_tpoint_address): New.
11616 (collecting_t): New.
11617 (force_unlock_trace_buffer): New.
11618 (fast_tracepoint_collecting): New.
11619 (collecting): New.
11620 (gdb_collect): New.
11621 (write_inferior_data_ptr): New.
11622 (target_tp_heap): New.
11623 (target_malloc): New.
11624 (download_agent_expr): New.
11625 (UALIGN): New.
11626 (download_tracepoints): New.
11627 (download_trace_state_variables): New.
11628 (upload_fast_traceframes): New.
11629 (IPA_FIRST_TRACEFRAME): New.
11630 (IPA_NEXT_TRACEFRAME_1): New.
11631 (IPA_NEXT_TRACEFRAME): New.
11632 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11633 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11634 (gdb_jump_pad_buffer_end): New.
11635 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11636 (initialize_tracepoint): Adjust.
11637 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11638 buffer. Initialize the low module.
11639 * utils.c (PREFIX, TOOLNAME): New.
11640 (malloc_failure): Use PREFIX.
11641 (error): In the IPA, an error causes an exit.
11642 (fatal, warning): Use PREFIX.
11643 (internal_error): Use TOOLNAME.
11644 (NUMCELLS): Increase to 10.
11645 * configure, config.in: Regenerate.
11646
d149dd1d
PA
116472010-06-01 Pedro Alves <pedro@codesourcery.com>
11648
11649 * server.c (handle_query) <qSupported>: Do two passes over the
11650 qSupported string to avoid nesting strtok.
11651
f6528abd
JK
116522010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11653
11654 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11655 (CDEPS): New.
11656 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11657 -Wl,--dynamic-list.
11658 * configure: Regenerate.
11659 * proc-service.list: New.
11660
ca2a87a0
JK
116612010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11662
11663 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11664 New comment.
11665
363a6e9f
OS
116662010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11667
11668 * gdbreplay.c (remote_open): Check error return from socket() call by
11669 its equality to -1 not by it being negative.
11670 * remote-utils.c (remote_open): Likewise.
11671
d23b6cb1
PA
116722010-05-23 Pedro Alves <pedro@codesourcery.com>
11673
11674 * config.h: Regenerate.
11675
28d3cf85
MK
116762010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11677
11678 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11679 doesn't provide PTRACE_GET_THREAD_AREA.
11680
fea36a59
MK
116812010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11682
11683 * linux-m68k-low.c: Include <asm/ptrace.h>
11684 (ps_get_thread_area): Implement.
11685
24b066ba
DE
116862010-05-03 Doug Evans <dje@google.com>
11687
11688 * event-loop.c (struct callback_event): New struct.
11689 (callback_list): New global.
11690 (append_callback_event, delete_callback_event): New functions.
11691 (process_callback): New function.
11692 (start_event_loop): Call it.
11693 * remote-utils.c (NOT_SCHEDULED): Define.
11694 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11695 moved out of readchar.
11696 (readchar): Rewrite. Call reschedule before returning.
11697 (reset_readchar): New function.
11698 (remote_close): Call it.
11699 (process_remaining, reschedule): New functions.
11700 * server.h (callback_handler_func): New typedef.
11701 (append_callback_event, delete_callback_event): Declare.
11702
9836d6ea
PA
117032010-05-03 Pedro Alves <pedro@codesourcery.com>
11704
11705 * proc-service.c (ps_pglobal_lookup): Use
11706 thread_db_look_up_one_symbol.
11707 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11708 parameter. Use it instead of all_symbols_looked_up.
11709 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11710 field.
11711 (all_symbols_looked_up): Don't declare.
11712 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11713 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11714 field.
11715 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11716 Set all_symbols_looked_up here.
11717 (thread_db_look_up_one_symbol): New.
11718 (thread_db_get_tls_address): Adjust.
11719 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11720 thread_db object on the heap, and tentatively set it in the
11721 process structure.
11722 (thread_db_init): Don't set all_symbols_looked_up here.
11723 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11724
7984d532
PA
117252010-05-03 Pedro Alves <pedro@codesourcery.com>
11726
11727 * linux-low.c (linux_kill, linux_detach): Adjust.
11728 (status_pending_p_callback): Remove redundant statement. Check
11729 for !TARGET_WAITIKIND_IGNORE, instead of
11730 TARGET_WAITKIND_STOPPED.
11731 (handle_tracepoints): Make sure LWP is locked. Adjust.
11732 (linux_wait_for_event_1): Adjust.
11733 (linux_cancel_breakpoints): New.
11734 (unsuspend_one_lwp): New.
11735 (unsuspend_all_lwps): New.
11736 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11737 (send_sigstop_callback): Change return type to int, add new
11738 `except' parameter and handle it.
11739 (suspend_and_send_sigstop_callback): New.
11740 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11741 pass them down. If SUSPEND, also increment the lwp's suspend
11742 count.
11743 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11744 (need_step_over_p): Don't consider suspended LWPs.
11745 (start_step_over): Adjust.
11746 (proceed_one_lwp): Change return type to int, add new `except'
11747 parameter and handle it.
11748 (unsuspend_and_proceed_one_lwp): New.
11749 (proceed_all_lwps): Use find_inferior instead of
11750 for_each_inferior.
11751 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11752 also decrement the suspend count of LWPs. Pass `except' down,
11753 instead of hacking its suspend count.
11754 (linux_pause_all): Add `freeze' parameter. Adjust.
11755 (linux_unpause_all): New.
11756 (linux_target_ops): Install linux_unpause_all.
11757 * server.c (handle_status): Adjust.
11758 * target.h (struct target_ops): New fields `unpause_all' and
11759 `cancel_breakpoints'. Add new parameter to `pause_all'.
11760 (pause_all): Add new `freeze' parameter.
11761 (unpause_all): New.
11762 (cancel_breakpoints): New.
11763 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11764 cancel breakpoints.
11765 (cmd_qtstart): Pause threads.
11766 (stop_tracing): Pause threads, and cancel breakpoints.
11767 * win32-low.c (win32_target_ops): Adjust.
11768
e471f25b
PA
117692010-05-03 Pedro Alves <pedro@codesourcery.com>
11770
11771 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11772 the inferior right away from here...
11773 (linux_wait_1): ... to here, and adjust to check the thread's
11774 last_resume_kind instead of the lwp's step or stop_expected flags.
11775
1915ef4f
PA
117762010-05-02 Pedro Alves <pedro@codesourcery.com>
11777
11778 * README: Use consistent `GDB' and `GDBserver' spellings.
11779
f9e39928
PA
117802010-05-02 Pedro Alves <pedro@codesourcery.com>
11781
11782 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11783 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11784 (linux_detach_one_lwp): Assume the lwp is stopped.
11785 (any_thread_of): Delete.
11786 (linux_detach): Stop all lwps here. Don't blindly delete all
11787 breakpoints.
11788 (delete_lwp_callback): New.
11789 (linux_mourn): Delete all lwps of the process that is gone.
11790 (linux_wait_1): Don't delete the last lwp of the process here.
11791 * mem-break.h (mark_breakpoints_out): Declare.
11792 * mem-break.c (mark_breakpoints_out): New.
11793 (free_all_breakpoints): Use it.
11794 * server.c (handle_target_event): If the process is gone, mark
11795 breakpoints out.
11796 * thread-db.c (struct thread_db) <create_bp>: New field.
11797 (thread_db_enable_reporting): Fix prototype. Store a thread event
11798 breakpoint reference in the thread_db struct.
11799 (thread_db_load_search): Clear the thread_db object.
11800 (try_thread_db_load_1): Ditto.
11801 (switch_to_process): New.
11802 (disable_thread_event_reporting): Use it.
11803 (remove_thread_event_breakpoints): New.
11804 (thread_db_detach, thread_db_mourn): Use it.
11805
1e7fc18c
PA
118062010-05-01 Pedro Alves <pedro@codesourcery.com>
11807
11808 * linux-low.c (linux_enable_event_reporting): New.
11809 (linux_wait_for_event_1, handle_extended_wait): Use it.
11810
02fc4de7
PA
118112010-04-30 Pedro Alves <pedro@codesourcery.com>
11812
11813 * linux-low.c (linux_kill_one_lwp, linux_kill)
11814 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11815 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11816 SIGSTOP even if the LWP is stopped.
11817 (send_sigstop_callback): New.
11818 (stop_all_lwps): Use send_sigstop_callback instead.
11819 (linux_resume_one_thread): Adjust.
11820 (proceed_one_lwp): Still proceed an LWP that the client has
11821 requested to stop, if we haven't reported it as stopped yet. Make
11822 sure that LWPs the client want stopped, have a pending SIGSTOP.
11823
bc3b5632
DE
118242010-04-26 Doug Evans <dje@google.com>
11825
ae1ada35
DE
11826 * server.c (handle_general_set): Make static.
11827
bc3b5632
DE
11828 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11829 Print received char after testing for error/eof instead of before.
11830 (input_interrupt): Tweak comment.
11831
65730243
DE
118322010-04-23 Doug Evans <dje@google.com>
11833
11834 * server.c (start_inferior): Print inferior argv if --debug.
11835
a8ae7dc0
AR
118362010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11837
11838 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11839 * nto-x86-low.c: Include server.h
11840
1c07cc19
PM
118412010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11842
11843 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11844 be consistent with other sources of this directory.
11845 (init_registers_amd64): Correct name of source file of this function
11846 in the comment.
11847
e0a61e09
PM
118482010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11849
11850 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11851 64-bit executables.
11852
54709339
PM
118532010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11854
11855 * win32-i386-low.c: Add 64-bit support.
11856 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11857 (init_registers_amd64): Declare.
11858 (mappings): Add 64-bit version of array.
11859 (init_windows_x86): New function.
11860 (the_low_target): Change init_arch field to init_windows_x86.
11861
e8f0053d
PM
118622010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11863
11864 * win32-low.c: Adapt to support also 64-bit architecture.
11865 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11866 (get_image_name): Use SIZE_T type for local variable `done'.
11867 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11868 (toolhelp_get_dll_name): Idem.
11869 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11870 Use uintptr_t typecast to avoid warning.
11871 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11872 (handle_exception): Use phex_nz to avoid warning.
11873 (win32_wait): Remove unused local variable `process'.
11874
c481e77e
PM
118752010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11876
11877 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11878 `amd64-avx.o'.
11879
12ea4b69
PM
118802010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11881
11882 * configure.ac: Use `ws2_32' library for srv_mingw.
11883 * configure: Regenerate.
11884 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11885 * remote-utils.c: Likewise.
11886
f6d1620c
L
118872010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11888
11889 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11890 if __x86_64__ is defined.
11891
8e642873
PM
118922010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11893
11894 * configure: Regenerate.
11895
711e434b
PM
118962010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11897
11898 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11899 * target.h (target_ops): New get_tib_address field.
11900 * win32-low.h (win32_thread_info): Add thread_local_base field.
11901 * win32-low.c (child_add_thread): Add tlb argument.
11902 Set thread_local_base field to TLB.
11903 (get_child_debug_event): Adapt to child_add_thread change.
11904 (win32_get_tib_address): New function.
11905 (win32_target_ops): Set get_tib_address field to
11906 win32_get_tib_address.
11907 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11908
505106cd
PA
119092010-04-12 Pedro Alves <pedro@codesourcery.com>
11910
505106cd
PA
11911 * linux-low.c (linux_mourn): Also remove the process.
11912 * server.c (handle_target_event): Don't remove the process here.
11913 * nto-low.c (nto_mourn): New.
11914 (nto_target_ops): Install it.
11915 * spu-low.c (spu_mourn): New.
11916 (spu_target_ops): Install it.
11917 * win32-low.c (win32_mourn): New.
11918 (win32_target_ops): Install it.
11919
e8470a06
PA
119202010-04-12 Pedro Alves <pedro@codesourcery.com>
11921
11922 * server.h (buffer_xml_printf): Remove redundant `;'.
11923
45ba0d02
PA
119242010-04-12 Pedro Alves <pedro@codesourcery.com>
11925
11926 * regcache.c (set_register_cache): Invalidate regcaches before
11927 changing the register cache layout.
11928 (regcache_invalidate_one): Allow a NULL regcache.
11929 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11930 regcaches before changing the register cache layout or the target
11931 regsets.
11932
59e04013
L
119332010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11934
11935 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11936 variable warning on Linux/x86-64.
11937
8336d594
PA
119382010-04-11 Pedro Alves <pedro@codesourcery.com>
11939
11940 GDBserver disconnected tracing support.
11941
11942 * linux-low.c (linux_remove_process): Delete.
11943 (add_lwp): Don't set last_resume_kind here.
11944 (linux_kill): Use `mourn'.
11945 (linux_detach): Use `thread_db_detach', and `mourn'.
11946 (linux_mourn): New.
11947 (linux_attach_lwp_1): Adjust comment.
11948 (linux_attach): last_resume_kind moved the thread_info; adjust.
11949 (status_pending_p_callback): Adjust.
11950 (linux_wait_for_event_1): Adjust.
11951 (count_events_callback, select_singlestep_lwp_callback)
11952 (select_event_lwp_callback, cancel_breakpoints_callback)
11953 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11954 (proceed_one_lwp): Adjust.
11955 (linux_async): Add debug output.
11956 (linux_thread_stopped): New.
11957 (linux_pause_all): New.
11958 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11959 linux_pause_all.
11960 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11961 (thread_db_free): Delete declaration.
11962 (thread_db_detach, thread_db_mourn): Declare.
11963 * thread-db.c (thread_db_init): Use thread_db_mourn.
11964 (thread_db_free): Delete, split in two.
11965 (disable_thread_event_reporting): New.
11966 (thread_db_detach): New.
11967 (thread_db_mourn): New.
11968
11969 * server.h (struct thread_info) <last_resume_kind>: New field.
11970 <attached>: Add comment.
11971 <gdb_detached>: New field.
11972 (handler_func): Change return type to int.
11973 (handle_serial_event, handle_target_event): Ditto.
11974 (gdb_connected): Declare.
11975 (tracing): Delete.
11976 (disconnected_tracing): Declare.
11977 (stop_tracing): Declare.
11978
11979 * server.c (handle_query) <qSupported>: Report support for
11980 disconnected tracing.
11981 (queue_stop_reply_callback): Account for running threads.
11982 (gdb_wants_thread_stopped): New.
11983 (gdb_wants_all_threads_stopped): New.
11984 (gdb_reattached_process): New.
11985 (handle_status): Clear the `gdb_detached' flag of all processes.
11986 In all-stop, stop all threads.
11987 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11988 (process_serial_event): If the remote connection breaks, or if an
11989 exit was forced with "monitor exit", force an event loop exit.
11990 Handle disconnected tracing on detach.
11991 (handle_serial_event): Adjust.
11992 (handle_target_event): If GDB isn't connected, forward events back
11993 to the inferior, unless the last process exited, in which case,
11994 exit gdbserver. Adjust interface.
11995
11996 * remote-utils.c (remote_open): Don't block in accept. Instead
11997 register an event loop source on the listen socket file
11998 descriptor. Refactor bits into ...
11999 (listen_desc): ... this new global.
12000 (gdb_connected): ... this new function.
12001 (enable_async_notification): ... this new function.
12002 (handle_accept_event): ... this new function.
12003 (remote_close): Clear remote_desc.
12004
12005 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12006
12007 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12008 New fields.
12009 (mourn_inferior): Define.
12010 (target_process_qsupported): Avoid the dangling else problem.
12011 (thread_stopped): Define.
12012 (pause_all): Define.
12013 (target_waitstatus_to_string): Declare.
12014 * target.c (target_waitstatus_to_string): New.
12015
12016 * tracepoint.c (tracing): Make extern.
12017 (disconnected_tracing): New.
12018 (stop_tracing): Make extern. Handle tracing stops due to GDB
12019 disconnecting.
12020 (cmd_qtdisconnected): New.
12021 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12022 (handle_tracepoint_general_set): Handle QTDisconnected.
12023
12024 * event-loop.c (event_handler_func): Change return type to int.
12025 (process_event): Bail out if the event handler wants the event
12026 loop to stop.
12027 (handle_file_event): Ditto.
12028 (start_event_loop): Bail out if the event handler wants the event
12029 loop to stop.
12030
12031 * nto-low.c (nto_target_ops): Adjust.
12032 * spu-low.c (spu_wait): Don't remove the process here.
12033 (spu_target_ops): Adjust.
12034 * win32-low.c (win32_wait): Don't remove the process here.
12035 (win32_target_ops): Adjust.
12036
5d267c4c
PA
120372010-04-11 Pedro Alves <pedro@codesourcery.com>
12038
12039 * regcache.c (realloc_register_cache): Invalidate inferior's
12040 regcache before recreating it.
12041
623ccd72
PA
120422010-04-09 Pedro Alves <pedro@codesourcery.com>
12043
12044 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12045
219f2f23
PA
120462010-04-09 Stan Shebs <stan@codesourcery.com>
12047 Pedro Alves <pedro@codesourcery.com>
12048
12049 * server.h (LONGEST): New.
12050 (struct thread_info) <while_stepping>: New field.
12051 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12052 Declare.
12053 (initialize_tracepoint, handle_tracepoint_general_set)
12054 (handle_tracepoint_query, tracepoint_finished_step)
12055 (tracepoint_was_hit, release_while_stepping_state_list):
12056 (current_traceframe): Declare.
12057 * server.c (handle_general_set): Handle tracepoint packets.
12058 (read_memory): New.
12059 (write_memory): New.
12060 (handle_search_memory_1): Use read_memory.
12061 (handle_query): Report support for conditional tracepoints, trace
12062 state variables, and tracepoint sources. Handle tracepoint
12063 queries.
12064 (main): Initialize the tracepoints module.
12065 (process_serial_event): Handle traceframe reads/writes.
12066
12067 * linux-low.c (handle_tracepoints): New.
12068 (linux_wait_1): Call it.
12069 (linux_resume_one_lwp): Handle while-stepping.
12070 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12071 (linux_target_ops): Install them.
12072 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12073 New field.
12074 * linux-x86-low.c (x86_supports_tracepoints): New.
12075 (the_low_target). Install it.
12076
12077 * mem-break.h (delete_breakpoint): Declare.
12078 * mem-break.c (delete_breakpoint): Make external.
12079
12080 * target.h (struct target_ops): Add `supports_tracepoints',
12081 `read_pc', and `write_pc' fields.
12082 (target_supports_tracepoints): Define.
12083 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12084 (phex_nz): New.
12085
12086 * regcache.h (struct regcache) <registers_owned>: New field.
12087 (init_register_cache, regcache_cpy): Declare.
12088 (regcache_read_pc, regcache_write_pc): Declare.
12089 (register_cache_size): Declare.
12090 (supply_regblock): Declare.
12091 * regcache.c (init_register_cache): New.
12092 (new_register_cache): Use it.
12093 (regcache_cpy): New.
12094 (register_cache_size): New.
12095 (supply_regblock): New.
12096 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 12097
219f2f23
PA
12098 * tracepoint.c: New.
12099
12100 * Makefile.in (OBS): Add tracepoint.o.
12101 (tracepoint.o): New rule.
12102
3a13a53b
L
121032010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12104
12105 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12106 (i386-mmx.o): New.
12107 (i386-mmx.c): Likewise.
12108 (i386-mmx-linux.o): Likewise.
12109 (i386-mmx-linux.c): Likewise.
12110
12111 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12112 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12113 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12114 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12115
12116 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12117 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12118 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12119
1570b33e
L
121202010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12121
12122 * Makefile.in (clean): Updated.
12123 (i386-avx.o): New.
12124 (i386-avx.c): Likewise.
12125 (i386-avx-linux.o): Likewise.
12126 (i386-avx-linux.c): Likewise.
12127 (amd64-avx.o): Likewise.
12128 (amd64-avx.c): Likewise.
12129 (amd64-avx-linux.o): Likewise.
12130 (amd64-avx-linux.c): Likewise.
12131
12132 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12133 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12134 (srv_amd64_regobj): Add amd64-avx.o.
12135 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12136 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12137 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12138 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12139 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12140 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12141 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12142
12143 * i387-fp.c: Include "i386-xstate.h".
12144 (i387_xsave): New.
12145 (i387_cache_to_xsave): Likewise.
12146 (i387_xsave_to_cache): Likewise.
12147 (x86_xcr0): Likewise.
12148
12149 * i387-fp.h (i387_cache_to_xsave): Likewise.
12150 (i387_xsave_to_cache): Likewise.
12151 (x86_xcr0): Likewise.
12152
12153 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12154 * linux-crisv32-low.c (target_regsets): Likewise.
12155 * linux-m68k-low.c (target_regsets): Likewise.
12156 * linux-mips-low.c (target_regsets): Likewise.
12157 * linux-ppc-low.c (target_regsets): Likewise.
12158 * linux-s390-low.c (target_regsets): Likewise.
12159 * linux-sh-low.c (target_regsets): Likewise.
12160 * linux-sparc-low.c (target_regsets): Likewise.
12161 * linux-xtensa-low.c (target_regsets): Likewise.
12162
12163 * linux-low.c: Include <sys/uio.h>.
12164 (regsets_fetch_inferior_registers): Support nt_type.
12165 (regsets_store_inferior_registers): Likewise.
12166 (linux_process_qsupported): New.
12167 (linux_target_ops): Add linux_process_qsupported.
12168
12169 * linux-low.h (regset_info): Add nt_type.
12170 (linux_target_ops): Add process_qsupported.
12171
12172 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12173 and <sys/uio.h>.
12174 (init_registers_i386_avx_linux): New.
12175 (init_registers_amd64_avx_linux): Likewise.
12176 (xmltarget_i386_linux_no_xml): Likewise.
12177 (xmltarget_amd64_linux_no_xml): Likewise.
12178 (PTRACE_GETREGSET): Likewise.
12179 (PTRACE_SETREGSET): Likewise.
12180 (x86_fill_xstateregset): Likewise.
12181 (x86_store_xstateregset): Likewise.
12182 (use_xml): Likewise.
12183 (x86_linux_update_xmltarget): Likewise.
12184 (x86_linux_process_qsupported): Likewise.
12185 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12186 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12187 init_registers_i386_linux here. Call
12188 x86_linux_update_xmltarget.
12189 (the_low_target): Add x86_linux_process_qsupported.
12190
12191 * server.c (handle_query): Call target_process_qsupported.
12192
12193 * target.h (target_ops): Add process_qsupported.
12194 (target_process_qsupported): New.
12195
fc7238bb
PA
121962010-04-03 Pedro Alves <pedro@codesourcery.com>
12197
12198 * inferiors.c (add_thread): Set last_status kind to
12199 TARGET_WAITKIND_IGNORE.
12200 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12201 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12202 (linux_wait_1): Move `thread' local definition to block that uses
12203 it. Don't NULL initialize `event_child'.
12204 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12205 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12206 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12207
bdabb078
PA
122082010-04-01 Pedro Alves <pedro@codesourcery.com>
12209
12210 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12211 an extended waitstatus, or by a watchpoint.
12212 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12213 thread was stepping or has been stopped by a watchpoint.
12214
d3bbe7a0
PA
122152010-04-01 Pedro Alves <pedro@codesourcery.com>
12216
12217 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12218 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12219 of another, then delete the previous, and validate all
12220 breakpoints.
12221 (validate_inserted_breakpoint): New.
12222 (delete_disabled_breakpoints): New.
12223 (validate_breakpoints): New.
12224 (check_mem_read): Validate breakpoints before trusting their
12225 shadow. Delete disabled breakpoints.
12226 (check_mem_write): Validate breakpoints before trusting they
12227 should be inserted. Delete disabled breakpoints.
12228 * mem-break.h (validate_breakpoints):
12229 * server.c (handle_query): Validate breakpoints when we see a
12230 qSymbol query.
12231
8b07ae33
PA
122322010-04-01 Pedro Alves <pedro@codesourcery.com>
12233
12234 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12235 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12236 if we could tell there's a GDB breakpoint at stop_pc.
12237 (need_step_over_p): Don't do a step over if we find a GDB
12238 breakpoint at the resume PC.
12239
12240 * mem-break.c (struct raw_breakpoint): New.
12241 (enum bkpt_type): New type `gdb_breakpoint'.
12242 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12243 fields. New field `raw'.
12244 (find_raw_breakpoint_at): New.
12245 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12246 breakpoint instead.
12247 (set_breakpoint_at): Adjust.
12248 (delete_raw_breakpoint): New.
12249 (release_breakpoint): New.
12250 (delete_breakpoint): Rename to...
12251 (delete_breakpoint_1): ... this. Add proc parameter. Use
12252 release_breakpoint. Return ENOENT.
12253 (delete_breakpoint): Reimplement.
12254 (find_breakpoint_at): Delete.
12255 (find_gdb_breakpoint_at): New.
12256 (delete_breakpoint_at): Delete.
12257 (set_gdb_breakpoint_at): New.
12258 (delete_gdb_breakpoint_at): New.
12259 (gdb_breakpoint_here): New.
12260 (set_reinsert_breakpoint): Use release_breakpoint.
12261 (uninsert_breakpoint): Rename to ...
12262 (uninsert_raw_breakpoint): ... this.
12263 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12264 (reinsert_raw_breakpoint): Change parameter type to
12265 raw_breakpoint.
12266 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12267 instead.
12268 (check_breakpoints): Adjust. Use release_breakpoint.
12269 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12270 (breakpoint_inserted_here): Ditto.
12271 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12272 Don't trust the breakpoint's shadow if it is not inserted.
12273 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12274 (delete_all_breakpoints): Adjust.
12275 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12276 use delete_breakpoint_1.
12277
12278 * mem-break.h (breakpoints_supported): Delete declaration.
12279 (set_gdb_breakpoint_at): Declare.
12280 (gdb_breakpoint_here): Declare.
12281 (delete_breakpoint_at): Delete.
12282 (delete_gdb_breakpoint_at): Declare.
12283
12284 * server.h (struct raw_breakpoint): Forward declare.
12285 (struct process_info): New field `raw_breakpoints'.
12286
12287 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12288 breakpoints.
12289
6bf5e0ba
PA
122902010-03-24 Pedro Alves <pedro@codesourcery.com>
12291
12292 * linux-low.c (status_pending_p_callback): Fix comment.
12293 (linux_wait_for_event_1): Move most of the internal breakpoint
12294 handling from here...
12295 (linux_wait_1): ... to here.
12296 (count_events_callback): New.
12297 (select_singlestep_lwp_callback): New.
12298 (select_event_lwp_callback): New.
12299 (cancel_breakpoints_callback): New.
12300 (select_event_lwp): New.
12301 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12302 priority to all LWPs that have had events that should be reported
12303 to the client. Cancel breakpoints when about to reporting the
12304 event to the client, not while stopping lwps. No longer cancel
12305 finished single-steps here.
12306 (cancel_finished_single_step): Delete.
12307 (cancel_finished_single_steps): Delete.
12308
414a389f
PA
123092010-03-24 Pedro Alves <pedro@codesourcery.com>
12310
12311 * mem-break.c (enum bkpt_type): New.
12312 (struct breakpoint): New field `type'.
12313 (set_breakpoint_at): Change return type to struct breakpoint
12314 pointer. Set type to `other_breakpoint' by default.
12315 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12316 in the breakpoint list.
12317 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12318 (reinsert_breakpoint): Rename to ...
12319 (reinsert_raw_breakpoint): ... this.
12320 (reinsert_breakpoints_at): Adjust.
12321 * mem-break.h (struct breakpoint): Declare.
12322 (set_breakpoint_at): Change return type to struct breakpoint
12323 pointer.
12324
2280c721
PA
123252010-03-24 Pedro Alves <pedro@codesourcery.com>
12326
12327 * server.c (handle_query): Assign, not compare.
12328
d50171e4
PA
123292010-03-24 Pedro Alves <pedro@codesourcery.com>
12330
12331 Teach linux gdbserver to step-over-breakpoints.
12332
12333 * linux-low.c (can_hardware_single_step): New.
12334 (supports_breakpoints): New.
12335 (handle_extended_wait): If stopping threads, read the stop pc of
12336 the new cloned LWP.
12337 (get_pc): New.
12338 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12339 low target doesn't support retrieving the PC.
12340 (add_lwp): Set last_resume_kind to resume_continue.
12341 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12342 (linux_attach): Don't clear stop_expected. Set the lwp's
12343 last_resume_kind to resume_stop.
12344 (linux_detach_one_lwp): Don't check for removed breakpoints.
12345 (check_removed_breakpoint): Delete.
12346 (status_pending_p): Rename to ...
12347 (status_pending_p_callback): ... this. Don't check for removed
12348 breakpoints. Don't consider threads that are stopped from GDB's
12349 perspective.
12350 (linux_wait_for_lwp): Always read the stop_pc here.
12351 (cancel_breakpoint): New.
12352 (step_over_bkpt): New global.
12353 (linux_wait_for_event_1): Implement stepping over breakpoints.
12354 (gdb_wants_lwp_stopped): New.
12355 (gdb_wants_all_stopped): New.
12356 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12357 single-step traps here. Store the thread's last reported target
12358 wait status.
12359 (send_sigstop): Don't clear stop_expected. Always set it,
12360 instead.
12361 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12362 (cancel_finished_single_step): New.
12363 (cancel_finished_single_steps): New.
12364 (wait_for_sigstop): Don't cancel finished single-step traps here.
12365 (linux_resume_one_lwp): Don't check for removed breakpoints.
12366 Don't set `step' on non-hardware step archs.
12367 (linux_set_resume_request): Ignore resume_stop requests if already
12368 stopping or stopped. Set the lwp's last_resume_kind.
12369 (resume_status_pending_p): Don't check for removed breakpoints.
12370 (need_step_over_p): New.
12371 (start_step_over): New.
12372 (finish_step_over): New.
12373 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12374 requests. Clear the thread's last reported target waitstatus.
12375 Don't use the `suspended' flag. Don't consider pending breakpoints.
12376 (linux_resume): Start a step-over if necessary.
12377 (proceed_one_lwp): New.
12378 (proceed_all_lwps): New.
12379 (unstop_all_lwps): New.
12380 * linux-low.h (struct lwp_info): Rewrite comment for the
12381 `suspended' flag. Add the `stop_pc' field. Delete the
12382 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12383 Add `'last_resume_kind' and `need_step_over' fields.
12384 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12385 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12386 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12387 (set_raw_breakpoint_at): New.
12388 (set_breakpoint_at): Rewrite to use it.
12389 (reinsert_breakpoint_handler): Delete.
12390 (set_reinsert_breakpoint): New.
12391 (reinsert_breakpoint_by_bp): Delete.
12392 (delete_reinsert_breakpoints): New.
12393 (uninsert_breakpoint): Rewrite.
12394 (uninsert_breakpoints_at): New.
12395 (reinsert_breakpoint): Rewrite.
12396 (reinsert_breakpoints_at): New.
12397 (check_breakpoints): Rewrite.
12398 (breakpoint_here): New.
12399 (breakpoint_inserted_here): New.
12400 (check_mem_read): Adjust.
12401 * mem-break.h (breakpoints_supported, breakpoint_here)
12402 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12403 (reinsert_breakpoint_by_bp): Delete declaration.
12404 (delete_reinsert_breakpoints): Declare.
12405 (reinsert_breakpoint): Delete declaration.
12406 (reinsert_breakpoints_at): Declare.
12407 (uninsert_breakpoint): Delete declaration.
12408 (uninsert_breakpoints_at): Declare.
12409 (check_breakpoints): Adjust prototype.
12410 * server.h: Adjust include order.
12411 (struct thread_info): Declare here. Add a `last_status' field.
12412
30ba68cb
MS
124132010-03-23 Michael Snyder <msnyder@vmware.com>
12414
12415 * server.c (crc32): New function.
12416 (handle_query): Add handling for 'qCRC:' request.
12417
b9a881c2
PA
124182010-03-23 Pedro Alves <pedro@codesourcery.com>
12419
12420 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12421 lwp had been stopped by a watchpoint.
12422
e92d13d5
PA
124232010-03-16 Pedro Alves <pedro@codesourcery.com>
12424
12425 * server.h (internal_error): Declare.
12426 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12427 * utils.c (internal_error): New function.
12428
64daa791
AS
124292010-03-15 Andreas Schwab <schwab@redhat.com>
12430
12431 * configure.srv: Fix typo setting srv_regobj.
12432
f52cd8cd
PA
124332010-03-15 Pedro Alves <pedro@codesourcery.com>
12434
12435 * linux-low.c (fetch_register): Avoid passing a non string literal
12436 format to `error'.
12437 (usr_store_inferior_registers): Ditto.
12438
93ae6fdc
PA
124392010-03-14 Pedro Alves <pedro@codesourcery.com>
12440
12441 * linux-low.c (linux_write_memory): Bail out early if peeking
12442 memory failed.
12443
c3adc08c
PA
124442010-03-14 Pedro Alves <pedro@codesourcery.com>
12445
12446 * linux-low.h (struct lwp_info): New fields
12447 `stopped_by_watchpoint' and `stopped_data_address'.
12448 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12449 here, and cache them in the lwp object.
12450 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12451 directly.
12452 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12453 field.
12454 (linux_stopped_by_watchpoint): Rewrite.
12455 (linux_stopped_data_address): Rewrite.
12456
bce522a2
PA
124572010-03-06 Simo Melenius <simo.melenius@iki.fi>
12458
12459 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12460 switching the current inferior, not before.
12461
90884b2b
L
124622010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12463
12464 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12465 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12466 i386-linux.c and amd64-linux.c.
12467 (reg-i386.o): Removed.
12468 (reg-i386.c): Likewise.
12469 (reg-i386-linux.o): Likewise.
12470 (reg-i386-linux.c): Likewise.
12471 (reg-x86-64.o): Likewise.
12472 (reg-x86-64.c): Likewise.
12473 (reg-x86-64-linux.o): Likewise.
12474 (reg-x86-64-linux.c): Likewise.
12475 (i386.o): New.
12476 (i386.c): Likewise.
12477 (i386-linux.o): Likewise.
12478 (i386-linux.c): Likewise.
12479 (amd64.o): Likewise.
12480 (amd64.c): Likewise.
12481 (amd64-linux.o): Likewise.
12482 (amd64-linux.c): Likewise.
12483
12484 * configure.srv (srv_i386_regobj): New.
12485 (srv_i386_linux_regobj): Likewise.
12486 (srv_amd64_regobj): Likewise.
12487 (srv_amd64_linux_regobj): Likewise.
12488 (srv_i386_32bit_xmlfiles): Likewise.
12489 (srv_i386_64bit_xmlfiles): Likewise.
12490 (srv_i386_xmlfiles): Likewise.
12491 (srv_amd64_xmlfiles): Likewise.
12492 (srv_i386_linux_xmlfiles): Likewise.
12493 (srv_amd64_linux_xmlfiles): Likewise.
12494 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12495 srv_xmlfiles to $srv_i386_xmlfiles.
12496 (i[34567]86-*-mingw32ce*): Likewise.
12497 (i[34567]86-*-mingw*): Likewise.
12498 (i[34567]86-*-nto*): Likewise.
12499 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12500 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12501 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12502 (x86_64-*-linux*): Likewise.
12503
12504 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12505 (init_registers_amd64_linux): New.
12506 (x86_arch_setup): Replace init_registers_x86_64_linux with
12507 init_registers_amd64_linux.
12508
193f13e6
MK
125092010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12510
12511 * configure.ac: Check for libdl. If it is not available link against
12512 static libthread_db.
12513 * configure: Regenerate.
12514
85d721b8
PA
125152010-02-22 Pedro Alves <pedro@codesourcery.com>
12516
12517 PR9605
12518
12519 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12520 handing a read watchpoint.
12521 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12522
6076632b
DE
125232010-02-12 Doug Evans <dje@google.com>
12524
12525 * linux-low.c (linux_supports_tracefork_flag): Document.
12526 (linux_look_up_symbols): Add comment.
12527
3327ccf7
L
125282010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12529
12530 * regcache.c (supply_register): Clear regcache if buf is NULL.
12531
0718675c 125322010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 12533 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
12534
12535 * inferiors.c (find_inferior): Add function documentation.
12536 (unloaded_dll): Handle the case where the unloaded dll has not
12537 been previously registered in the dll list.
12538
177321bd
DJ
125392010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12540
12541 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12542 (thumb2_breakpoint): New.
12543 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12544
2b009048
DJ
125452010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12546
12547 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12548 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12549 breakpoints.
12550
3be029c7
PA
125512010-01-21 Pedro Alves <pedro@codesourcery.com>
12552
12553 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12554
18f5de3b
JK
125552010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12556
12557 * linux-s390-low.c (s390_collect_ptrace_register)
12558 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12559
3743bb4f
DE
125602010-01-21 Doug Evans <dje@google.com>
12561
14ce3065
DE
12562 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12563 (PTRACE_ARG4_TYPE): New macro.
12564 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12565 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12566 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12567 (usr_store_inferior_registers): Ditto.
12568 (linux_read_memory, linux_write_memory): Ditto.
12569 (linux_test_for_tracefork): Ditto.
12570
3743bb4f
DE
12571 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12572 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12573
8b315be5
PA
125742010-01-21 Pedro Alves <pedro@codesourcery.com>
12575
12576 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12577 target.
12578
85492558
PA
125792010-01-21 Pedro Alves <pedro@codesourcery.com>
12580
12581 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12582 prototype to take a regcache. Adjust.
12583
442ea881
PA
125842010-01-20 Pedro Alves <pedro@codesourcery.com>
12585
12586 * regcache.h (struct thread_info): Forward declare.
12587 (struct regcache): New.
12588 (new_register_cache): Adjust prototype.
12589 (get_thread_regcache): Declare.
12590 (free_register_cache): Adjust prototype.
12591 (registers_to_string, registers_from_string): Ditto.
12592 (supply_register, supply_register_by_name, collect_register)
12593 (collect_register_as_string, collect_register_by_name): Ditto.
12594 * regcache.c (struct inferior_regcache_data): Delete.
12595 (get_regcache): Rename to ...
12596 (get_thread_regcache): ... this. Adjust. Switch inferior before
12597 fetching registers.
12598 (regcache_invalidate_one): Adjust.
12599 (regcache_invalidate): Fix prototype.
12600 (new_register_cache): Return the new register cache.
12601 (free_register_cache): Change prototype.
12602 (realloc_register_cache): Adjust.
12603 (registers_to_string): Change prototype to take a regcache. Adjust.
12604 (registers_from_string): Ditto.
12605 (register_data): Ditto.
12606 (supply_register): Ditto.
12607 (supply_register_by_name): Ditto.
12608 (collect_register): Ditto.
12609 (collect_register_as_string): Ditto.
12610 (collect_register_by_name): Ditto.
12611 * server.c (process_serial_event): Adjust.
12612 * linux-low.h (regset_fill_func, regset_store_func): Change
12613 prototype.
12614 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12615 Change prototype.
12616 * linux-low.c (get_stop_pc): Adjust.
12617 (check_removed_breakpoint): Adjust.
12618 (linux_wait_for_event): Adjust.
12619 (linux_resume_one_lwp): Adjust.
12620 (fetch_register): Add regcache parameter. Adjust.
12621 (usr_store_inferior_registers): Ditto.
12622 (regsets_fetch_inferior_registers): Ditto.
12623 (regsets_store_inferior_registers): Ditto.
12624 (linux_fetch_registers, linux_store_registers): Ditto.
12625 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12626 regcache. Adjust.
43aaf8b6
PA
12627 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12628 Ditto.
442ea881
PA
12629 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12630 prototype to take a regcache.
12631 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12632 * remote-utils.c (convert_ascii_to_int, outreg)
12633 (prepare_resume_reply): Change prototype to take a regcache.
12634 Adjust.
12635 * target.h (struct target_ops) <fetch_registers, store_registers>:
12636 Change prototype to take a regcache.
12637 (fetch_inferior_registers, store_inferior_registers): Change
12638 prototype to take a regcache. Adjust.
12639 * proc-service.c (ps_lgetregs): Adjust.
12640 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12641 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12642 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12643 take a regcache. Adjust.
12644 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12645 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12646 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12647 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12648 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12649 (cris_cannot_fetch_register):
12650 (cris_breakpoint_at): Change prototype to take a regcache.
12651 Adjust.
12652 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12653 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12654 to take a regcache. Adjust.
12655 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12656 Adjust.
12657 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12658 take a regcache. Adjust.
12659 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12660 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12661 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12662 * linux-mips-low.c (mips_get_pc):
12663 (mips_set_pc): Change prototype to take a regcache. Adjust.
12664 (mips_reinsert_addr): Adjust.
12665 (mips_collect_register): Change prototype to take a regcache.
12666 Adjust.
12667 (mips_supply_register):
12668 (mips_collect_register_32bit, mips_supply_register_32bit)
12669 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12670 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12671 * linux-ppc-low.c (ppc_supply_ptrace_register)
12672 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12673 (parse_spufs_run): Adjust.
12674 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12675 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12676 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12677 take a regcache. Adjust.
12678 * linux-s390-low.c (s390_collect_ptrace_register)
12679 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12680 (s390_set_pc): Change prototype to take a regcache. Adjust.
12681 (s390_arch_setup): Adjust.
12682 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12683 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12684 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12685 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12686 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12687 regcache. Adjust.
12688 (sparc_breakpoint_at): Adjust.
12689 * linux-xtensa-low.c (xtensa_fill_gregset):
12690 (xtensa_store_gregset):
12691 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12692 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12693 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12694 prototype to take a regcache. Adjust.
12695 * win32-arm-low.c (arm_fetch_inferior_register)
12696 (arm_store_inferior_register): Change prototype to take a
12697 regcache. Adjust.
12698 * win32-i386-low.c (i386_fetch_inferior_register)
12699 (i386_store_inferior_register): Change prototype to take a
12700 regcache. Adjust.
12701 * win32-low.c (child_fetch_inferior_registers)
12702 (child_store_inferior_registers): Change prototype to take a
12703 regcache. Adjust.
12704 (win32_wait): Adjust.
12705 (win32_fetch_inferior_registers): Change prototype to take a
12706 regcache. Adjust.
12707 (win32_store_inferior_registers): Adjust.
12708 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12709 store_inferior_register>: Change prototype to take a regcache.
12710
60c3d7b0
DE
127112010-01-20 Doug Evans <dje@google.com>
12712
12713 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12714 #ifdef.
12715 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12716 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12717
dc146f7c
VP
127182010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12719
12720 * linux-low.c (linux_core_of_thread): New.
12721 (compare_ints, show_process, list_threads): New.
12722 (linux_qxfer_osdata): Report threads and cores.
12723 (linux_target_op): Register linux_core_of_thread.
12724 * remote-utils.c (prepare_resume_reply): Report the core.
12725 (buffer_xml_printf): Support %d specifier.
12726 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12727 New.
12728 (handle_query): Handle qXfer:threads. Announce availability
12729 thereof.
12730 * target.h (struct target_ops): New field core_of_thread.
12731
7803799a
UW
127322010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12733
12734 * Makefile.in (clean): Remove new generated files.
12735 (reg-s390.o, reg-s390.c): Remove rules.
12736 (reg-s390x.o, reg-s390x.c): Likewise.
12737 (s390-linux32.o, s390-linux32.c): Add rules.
12738 (s390-linux64.o, s390-linux64.c): Likewise.
12739 (s390x-linux64.o, s390x-linux64.c): Likewise.
12740 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12741 * linux-s390-low.c: Include <elf.h>.
12742 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12743 (init_registers_s390): Remove prototype.
12744 (init_registers_s390x): Likewise.
12745 (init_registers_s390_linux32): Add prototype.
12746 (init_registers_s390_linux64): Likewise.
12747 (init_registers_s390x_linux64): Likewise.
12748 (s390_num_regs_3264): New define.
12749 (s390_regmap_3264): New global variable.
12750 (s390_cannot_fetch_register): Remove obsolete check.
12751 (s390_cannot_store_register): Likewise.
12752 (s390_collect_ptrace_register): Handle upper/lower register halves.
12753 (s390_supply_ptrace_register): Likewise.
12754 (s390_fill_gregset): Update to register number changes.
12755 (s390_get_hwcap): New routine.
12756 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12757 Install appropriate regmap and register set.
12758
6e7ffa39
JB
127592010-01-01 Joel Brobecker <brobecker@adacore.com>
12760
12761 * server.c (gdbserver_version): Update copyright year to 2010.
12762 * gdbreplay.c (gdbreplay_version): Likewise.
12763
957f3f49
DE
127642009-12-28 Doug Evans <dje@google.com>
12765
12766 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12767 elf/external.h. Include <elf.h> instead but only if necessary.
12768
ca5c370d
PA
127692009-12-28 Pedro Alves <pedro@codesourcery.com>
12770
12771 * linux-low.c (linux_remove_process): Remove `detaching'
12772 parameter. Don't release/detach from thread_db here.
12773 (linux_kill): Release/detach from thread_db here, ...
12774 (linux_detach): ... and here, before actually detaching.
12775 (linux_wait_1): ... and here, when a process exits.
12776 * thread-db.c (any_thread_of): New.
12777 (thread_db_free): Switch the current inferior to a thread of the
12778 passed in process.
12779
4ee62156
DE
127802009-12-21 Doug Evans <dje@google.com>
12781
d90e6a88
DE
12782 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12783
c5f62d5f
DE
12784 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12785 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12786 warning ifndef __NR_tkill. Move setting of errno there too.
12787 Delete unnecessary resetting of errno after syscall.
12788 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12789
10e86dd7
DE
12790 * configure.ac: Check for dladdr.
12791 * config.in: Regenerate.
12792 * configure: Regenerate.
12793 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12794 (try_thread_db_load): Update.
12795
4ee62156
DE
12796 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12797
00f515da
DE
127982009-12-18 Doug Evans <dje@google.com>
12799
e9464885
DE
12800 * event-loop.c: Include unistd.h if it exists.
12801
07d4f67e
DE
12802 * linux-low.c (my_waitpid): Move definition away from being in
12803 between linux_tracefork_child/linux_test_for_tracefork.
12804
00f515da
DE
12805 * gdb_proc_service.h (psaddr_t): Fix type.
12806 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12807 signature to match glibc.
12808
1de1badb
DE
128092009-12-16 Doug Evans <dje@google.com>
12810
12811 * linux-low.c (linux_read_memory): Fix argument to read.
12812
aeeb81d1
PA
128132009-11-26 Pedro Alves <pedro@codesourcery.com>
12814
12815 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12816 events, don't leave current_inferior pointing at null.
12817
10357975
PA
128182009-11-26 Pedro Alves <pedro@codesourcery.com>
12819
12820 * win32-low.c (LOG): Delete.
12821 (OUTMSG): Output to stderr.
12822 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12823 on compile time LOG macro.
12824 (win32_wait): Fix debug output.
12825
cf6e3471
PA
128262009-11-26 Pedro Alves <pedro@codesourcery.com>
12827
12828 * win32-low.c (win32_add_one_solib): If the dll name is
12829 "ntdll.dll", prepend the system directory to the dll path.
12830
0c85e18e
MK
128312009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12832
12833 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12834
9ac544ce 128352009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12836 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12837
12838 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12839 * configure.ac: Check for __mcoldfire__ and set
12840 gdb_cv_m68k_is_coldfire.
12841 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12842 reg-cf.o and reg-m68k.o.
12843 * configure: Regenerated.
12844
fd7dd3e6
PA
128452009-11-16 Pedro Alves <pedro@codesourcery.com>
12846
12847 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12848 Pass it to thread_db_free.
12849 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12850 proper `detaching' argument to linux_remove_process.
12851 * linux-low.h (thread_db_free): Add `detaching' parameter.
12852 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12853 to thread_db_free.
12854 (thread_db_free): Add `detaching' parameter. Only
12855 call td_ta_clear_event if detaching from process.
12856
75aa492e
MK
128572009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12858
12859 * thread-db.c (thread_db_free): Fix typo.
12860
21e1bee4
PP
128612009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12862
12863 PR gdb/10838
12864 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12865
8838b45e
NS
128662009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12867
12868 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12869 with an i686 compiler.
12870 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12871 needed.
12872 * configure: Rebuilt.
12873
8a35fb51
SL
128742009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12875
12876 PR gdb/10783
12877
12878 * server.c (handle_search_memory_1): Correct read_addr initialization
12879 in loop for searching subsequent chunks.
12880
96f15937
PP
128812009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12882
12883 * configure.ac: New --with-libthread-db option.
12884 * thread-db.c: Allow direct dependence on libthread_db.
12885 (thread_db_free): Adjust.
12886 * config.in: Regenerate.
12887 * configure: Likewise.
889bf7c5 12888
5f7d1694
PP
128892009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12890
12891 PR gdb/10757
12892 * thread-db.c (attach_thread): New function.
12893 (maybe_attach_thread): Return success/failure.
12894 (find_new_threads_callback): Adjust.
889bf7c5
PA
12895 (thread_db_find_new_threads): Loop until no new threads.
12896
88e3b899
PA
128972009-10-13 Pedro Alves <pedro@codesourcery.com>
12898
12899 * proc-service.c (ps_lgetregs): Formatting.
12900
cdbfd419
PP
129012009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12902
12903 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12904 * configure.ac: Adjust.
12905 * linux-low.h (struct process_info_private): Move members to struct
12906 thread_db.
12907 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12908 * linux-low.c (linux_remove_process): Adjust.
12909 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12910 * server.c (handle_query): Move code ...
12911 (handle_monitor_command): ... here. New function.
12912 * target.h (struct target_ops): New member.
12913 * thread-db.c (struct thread_db): New.
12914 (libthread_db_search_path): New variable.
12915 (thread_db_create_event, thread_db_enable_reporting)
12916 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12917 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12918 (try_thread_db_load_1, dladdr_to_soname): New functions.
12919 (try_thread_db_load, thread_db_load_search): New functions.
12920 (thread_db_init): Search for libthread_db.
12921 (thread_db_free): New function.
12922 (thread_db_handle_monitor_command): Likewise.
12923 * config.in: Regenerate.
12924 * configure: Regenerate.
889bf7c5 12925
4168d2d6
UW
129262009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12927
12928 * spu-low.c (spu_kill): Wait for inferior to terminate.
12929 Call clear_inferiors.
12930 (spu_detach): Call clear_inferiors.
12931
81ecdfbb
RW
129322009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12933
12934 * aclocal.m4: Regenerate.
12935 * config.in: Likewise.
12936 * configure: Likewise.
12937
0b9ff2c0
UW
129382009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12939
12940 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12941 (parse_spufs_run): New function.
12942 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12943 (ppc_breakpoint_at): Handle SPU breakpoints.
12944
efcbbd14
UW
129452009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12946
12947 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12948 (SPUFS_MAGIC): Define.
12949 (spu_enumerate_spu_ids): New function.
12950 (linux_qxfer_spu): New function.
12951 (linux_target_ops): Install linux_qxfer_spu.
12952
f4d9bade
UW
129532009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12954
12955 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12956 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12957 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12958 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12959 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12960 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12961 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12962 (init_registers_powerpc_cell32l): Add prototype.
12963 (init_registers_powerpc_cell64l): Likewise.
12964 (ppc_arch_setup): Detect Cell/B.E. architecture.
12965
96e946ca
RW
129662009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12967
12968 * Makefile.in (datarootdir): New variable.
12969
58d6951d
DJ
129702009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12971
12972 * linux-low.c (linux_write_memory): Update debugging output.
12973 * Makefile.in (clean): Add new descriptions.
12974 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12975 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12976 * configure.srv: Add new files for arm*-*-linux*.
12977 * linux-arm-low.c: Add new declarations.
12978 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12979 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12980 (HWCAP_VFPv3D16): New.
12981 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12982 instead of __IWMMXT__.
12983 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12984 (arm_arch_setup): New.
12985 (target_regsets): Remove #ifdef. Add VFP regset.
12986 (the_low_target): Use arm_arch_setup.
12987
12b42a12
DJ
129882009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12989
12990 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12991 the main thread again.
12992
ac8c974e
AR
129932009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12994
12995 Adding Neutrino gdbserver.
12996 * configure: Regenerated.
12997 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12998 * configure.srv (i[34567]86-*-nto*): New target.
12999 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13000 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13001 (nto_comctrl) [__QNX__]: New function.
13002 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13003
4424e0c3 130042009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
13005
13006 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13007 srv_tgtobj.
13008
912cf4ba
PA
130092009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13010 Pedro Alves <pedro@codesourcery.com>
13011
13012 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13013 don't support CONTEXT_EXTENDED_REGISTERS.
13014 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13015 (the_low_target): Install them.
13016 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13017 failing with ERROR_PIPE_NOT_CONNECTED.
13018
aa5ca48f
DE
130192009-06-30 Doug Evans <dje@google.com>
13020 Pierre Muller <muller@ics.u-strasbg.fr>
13021
13022 Add h/w watchpoint support to x86-linux, win32-i386.
13023 * Makefile.in (SFILES): Add i386-low.c
13024 (i386_low_h): Define.
13025 (i386-low.o): Add dependencies.
13026 (linux-x86-low.o): Add i386-low.h dependency.
13027 (win32-i386-low.o): Ditto.
13028 * i386-low.c: New file.
13029 * i386-low.h: New file.
13030 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13031 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13032 * linux-low.c (linux_add_process): Initialize arch_private.
13033 (linux_remove_process): Free arch_private.
13034 (add_lwp): Initialize arch_private.
13035 (delete_lwp): Free arch_private.
13036 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13037 provided.
13038 * linux-low.h (process_info_private): New member arch_private.
13039 (lwp_info): New member arch_private.
13040 (linux_target_ops): New members new_process, new_thread,
13041 prepare_to_resume.
13042 (ptid_of): New macro.
13043 * linux-x86-low.c: Include stddef.h, i386-low.h.
13044 (arch_process_info): New struct.
13045 (arch_lwp_info): New struct.
13046 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13047 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13048 (i386_dr_low_get_status): New function.
13049 (x86_insert_point, x86_remove_point): New functions.
13050 (x86_stopped_by_watchpoint): New function.
13051 (x86_stopped_data_address): New function.
13052 (x86_linux_new_process, x86_linux_new_thread): New functions.
13053 (x86_linux_prepare_to_resume): New function.
13054 (the_low_target): Add entries for insert_point, remove_point,
13055 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13056 prepare_to_resume.
13057 * server.c (debug_hw_points): New global.
13058 (monitor_show_help): Document set debug-hw-points.
13059 (handle_query): Process "set debug-hw-points".
13060 * server.h (debug_hw_points): Declare.
13061 (paddress): Declare.
13062 * utils.c (NUMCELLS, CELLSIZE): New macros.
13063 (get_sell, xsnprintf, paddress): New functions.
13064 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13065 remove_point, stopped_by_watchpoint, stopped_data_address.
13066 * win32-i386-low.c: Include i386-low.h.
13067 (debug_reg_state): Replaces dr.
13068 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13069 (i386_dr_low_get_status): New function.
13070 (i386_insert_point, i386_remove_point): New functions.
13071 (i386_stopped_by_watchpoint): New function.
13072 (i386_stopped_data_address): New function.
13073 (i386_initial_stuff): Update.
13074 (get_thread_context,set_thread_context,i386_thread_added): Update.
13075 (the_low_target): Add entries for insert_point,
13076 remove_point, stopped_by_watchpoint, stopped_data_address.
13077 * win32-low.c (win32_insert_watchpoint): New function.
13078 (win32_remove_watchpoint): New function.
13079 (win32_stopped_by_watchpoint): New function.
13080 (win32_stopped_data_address): New function.
13081 (win32_target_ops): Add entries for insert_watchpoint,
13082 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13083 * win32-low.h (win32_target_ops): New members insert_point,
13084 remove_point, stopped_by_watchpoint, stopped_data_address.
13085
d993e290
PA
130862009-06-25 Pedro Alves <pedro@codesourcery.com>
13087
13088 * server.c (process_serial_event): Re-return unsupported, not
13089 error, if the type isn't recognized. Re-allow supporting only
13090 insert or remove packets. Also call require_running for
13091 breakpoints. Add missing break statement to default case. Tidy.
13092 * target.h (struct target_ops): Rename insert_watchpoint to
13093 insert_point, and remove_watchpoint to remove_point.
13094
13095 * linux-low.h (struct linux_target_ops): Likewise.
13096 * linux-low.c (linux_insert_watchpoint): Rename to ...
13097 (linux_insert_point): ... this. Adjust.
13098 (linux_remove_watchpoint): Rename to ...
13099 (linux_remove_point): ... this. Adjust.
13100 (linux_target_ops): Adjust.
13101 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13102 (cris_insert_point): ... this.
13103 (cris_remove_watchpoint): Rename to ...
13104 (cris_remove_point): ... this.
13105 (the_low_target): Adjust.
13106
0f54c268
PM
131072009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13108
13109 * server.c (handle_v_kill): Pass signal_pid to
13110 kill_inferior if multi_process is zero.
13111
c6314022
AR
131122009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13113
13114 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13115 * target.h (target_ops): Comment for *_watchpoint to make it clear
13116 the functions can get types '0' and '1'.
13117
4463ce24
AR
131182009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13119
13120 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13121 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13122 * regcache.c (get_regcache): Likewise.
13123 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13124 * win32-low.c (child_fetch_inferior_registers): Remove check for
13125 regno 0.
13126
cf8fd78b
PA
131272009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13128 Pedro Alves <pedro@codesourcery.com>
13129
13130 * target.h (struct target_ops) <supports_multi_process>: New
13131 callback.
13132 (target_supports_multi_process): New.
13133 * server.c (handle_query): Even if GDB reports support, only
13134 enable multi-process if the target also supports it. Report
13135 multi-process support only if the target backend supports it.
13136 * linux-low.c (linux_supports_multi_process): New function.
13137 (linux_target_ops): Install it as target_supports_multi_process
13138 callback.
13139
47c0c975
DE
131402009-05-24 Doug Evans <dje@google.com>
13141
e09875d4
DE
13142 Global renaming of find_thread_pid to find_thread_ptid.
13143 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13144 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13145 All callers updated.
13146
e27d73f6
DE
13147 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13148 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13149 directly.
13150
47c0c975
DE
13151 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13152 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13153 (linux_resume_one_lwp): Ditto.
13154
2acc282a
DE
131552009-05-23 Doug Evans <dje@google.com>
13156
13157 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13158 from struct inferior_list_entry * to struct lwp_info *.
13159 All callers updated.
13160
9f1036c1
DE
131612009-05-13 Doug Evans <dje@google.com>
13162
13163 * linux-x86-low.c: Don't include assert.h.
13164 (x86_siginfo_fixup): Use fatal, not assert.
13165 (x86_arch_setup): Fix comment.
13166
d0722149
DE
131672009-05-12 Doug Evans <dje@google.com>
13168
13169 Biarch support for i386/amd64 gdbserver.
13170 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13171 Add linux-x86-low.c.
13172 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13173 (linux-x86-low.o): Add.
13174 * linux-x86-64-low.c: Delete.
13175 * linux-i386-low.c: Delete.
13176 * linux-x86-low.c: New file.
13177 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13178 linux-x86-low.o.
13179 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13180 linux-x86-low.o.
13181 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13182 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13183 (linux_child_pid_to_exec_file): New function.
13184 (elf_64_header_p, elf_64_file_p): New functions.
13185 (siginfo_fixup): New function.
13186 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13187 give target a chance to convert layout.
13188 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13189 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13190
fdeb2a12
DE
131912009-05-07 Doug Evans <dje@google.com>
13192
13193 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13194 (regsets_store_inferior_registers): Ditto.
13195
a6dbe5df
PA
131962009-05-06 Pedro Alves <pedro@codesourcery.com>
13197
13198 PR server/10048
13199
13200 * linux-low.c (must_set_ptrace_flags): Delete.
13201 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13202 of the global.
13203 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13204 `lwp->must_set_ptrace_flags' instead.
ba42693b 13205 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
13206 (linux_wait_1): ... not here.
13207
5091eb23
DE
132082009-04-30 Doug Evans <dje@google.com>
13209
9f767825
DE
13210 * inferiors.c (started_inferior_callback): New function.
13211 (attached_inferior_callback): New function.
13212 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13213 * server.c (print_started_pid, print_attached_pid): New functions.
13214 (detach_or_kill_for_exit): New function.
13215 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13216 * server.h (have_started_inferiors_p): Declare.
13217 (have_attached_inferiors_p): Declare.
13218
5091eb23
DE
13219 * inferiors.c (remove_process): Fix memory leak, free process.
13220 * linux-low.c (linux_remove_process): New function.
13221 (linux_kill): Call it instead of remove_process.
13222 (linux_detach, linux_wait_1): Ditto.
13223
155c8968
PA
132242009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13225
13226 * configure.srv: Add x86 Windows CE target.
13227
7fe519cb
UW
132282009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13229
13230 * inferiors.c (get_thread_process): Make global.
13231 * server.h (get_thread_process): Add prototype.
13232 * thread-db.c (find_one_thread): Use get_thread_process
13233 instead of current_process.
13234 (thread_db_get_tls_address): Do not crash if called when
13235 thread layer is not yet initialized.
13236
5472f405
UW
132372009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13238
13239 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13240 * spu-low.c (current_tid): Rename to ...
13241 (current_ptid): ... this.
13242 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13243 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13244 ptid_get_lwp (current_ptid) instead of current_tid.
13245 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13246 instead of current_tid. Use find_process_pid to verify pid
13247 argument is valid. Pass proper argument to remove_process.
13248 (spu_thread_alive): Compare current_ptid instead of current_tid.
13249 (spu_resume): Likewise.
13250
55ac2b99
PA
132512009-04-02 Pedro Alves <pedro@codesourcery.com>
13252
13253 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13254 variable.
13255
95954743
PA
132562009-04-01 Pedro Alves <pedro@codesourcery.com>
13257
13258 Implement the multiprocess extensions, and add linux multiprocess
13259 support.
13260
13261 * server.h (ULONGEST): Declare.
13262 (struct ptid, ptid_t): New.
13263 (minus_one_ptid, null_ptid): Declare.
13264 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13265 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13266 (struct inferior_list_entry): Change `id' type from unsigned from
13267 to ptid_t.
13268 (struct sym_cache, struct breakpoint, struct
13269 process_info_private): Forward declare.
13270 (struct process_info): Declare.
13271 (current_process): Declare.
13272 (all_processes): Declare.
13273 (initialize_inferiors): Declare.
13274 (add_thread): Adjust to use ptid_t.
13275 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13276 (add_process, remove_process, find_thread_pid): Declare.
13277 (find_inferior_id): Adjust to use ptid_t.
13278 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13279 (multi_process): Declare.
13280 (push_event): Adjust to use ptid_t.
13281 (read_ptid, write_ptid): Declare.
13282 (prepare_resume_reply): Adjust to use ptid_t.
13283 (clear_symbol_cache): Declare.
13284 * inferiors.c (all_processes): New.
13285 (null_ptid, minus_one_ptid): New.
13286 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13287 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13288 (add_thread): Change unsigned long to ptid. Remove gdb_id
13289 parameter. Adjust.
13290 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13291 (gdb_id_to_thread): Rename to ...
13292 (find_thread_pid): ... this. Change unsigned long to ptid.
13293 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13294 (loaded_dll, pull_pid_from_list): Adjust.
13295 (add_process, remove_process, find_process_pid)
13296 (get_thread_process, current_process, initialize_inferiors): New.
13297 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13298 (struct target_waitstatus) <related_pid>: Ditto.
13299 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13300 return type to int.
13301 (struct target_ops) <join>: Add `pid' argument.
13302 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13303 (struct target_ops) <wait>: Add `ptid' field. Change return type
13304 to ptid.
13305 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13306 (mywait): Add `ptid' argument. Change return type to ptid_t.
13307 (target_pid_to_str): Declare.
13308 * target.c (set_desired_inferior): Adjust to use ptids.
13309 (mywait): Add new `ptid' argument. Adjust.
13310 (target_pid_to_str): New.
13311 * mem-break.h (free_all_breakpoints): Declare.
13312 * mem-break.c (breakpoints): Delelete.
13313 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13314 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13315 to use per-process breakpoint list.
13316 (free_all_breakpoints): New.
13317 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13318 (symbol_cache, all_symbols_looked_up): Delete.
13319 (hexchars): New.
13320 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13321 read_ptid): New.
13322 (prepare_resume_reply): Change ptid argument's type from unsigned
13323 long to ptid_t. Adjust. Implement W;process and X;process.
13324 (free_sym_cache, clear_symbol_cache): New.
13325 (look_up_one_symbol): Adjust to per-process symbol cache. *
13326 * server.c (cont_thread, general_thread, step_thread): Change type
13327 to ptid_t.
13328 (attached): Delete.
13329 (multi_process): New.
13330 (last_ptid): Change type to ptid_t.
13331 (struct vstop_notif) <ptid>: Change type to ptid_t.
13332 (queue_stop_reply, push_event): Change `ptid' argument's type to
13333 ptid_t.
13334 (discard_queued_stop_replies): Add `pid' argument.
13335 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13336 changes. Don't reference the `attached' global.
13337 (attach_inferior): Adjust to mywait interface changes.
13338 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13339 features. Handle and report "multiprocess+". Handle
13340 "qAttached:PID".
13341 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13342 changes.
13343 (handle_v_kill): New.
13344 (handle_v_stopped): Adjust to use target_pid_to_str.
13345 (handle_v_requests): Allow multiple attaches and runs when
13346 multiprocess extensions are in effect. Handle "vKill".
13347 (myresume): Adjust to use ptids.
13348 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13349 (handle_status): Adjust to discard_queued_stop_replies interface
13350 change.
13351 (first_thread_of, kill_inferior_callback)
13352 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13353 (main): Call initialize_inferiors. Adjust to use ptids, killing
13354 and detaching from all inferiors. Handle multiprocess packet
13355 variants.
13356 * linux-low.h: Include gdb_proc_service.h.
13357 (struct process_info_private): New.
13358 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13359 <lwpid_of>: Use ptid_get_lwp.
13360 (get_lwp_thread): Adjust.
13361 (struct lwp_info): Add `dead' member.
13362 (find_lwp_pid): Declare.
13363 * linux-low.c (thread_db_active): Delete.
13364 (new_inferior): Adjust comment.
13365 (inferior_pid): Delete.
13366 (linux_add_process): New.
13367 (handle_extended_wait): Adjust.
13368 (add_lwp): Change unsigned long to ptid.
13369 (linux_create_inferior): Add process to processes table. Adjust
13370 to use ptids. Don't set new_inferior here.
13371 (linux_attach_lwp): Rename to ...
13372 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13373 it. Adjust to use ptids.
13374 (linux_attach_lwp): New.
13375 (linux_attach): Add process to processes table. Don't set
13376 new_inferior here.
13377 (struct counter): New.
13378 (second_thread_of_pid_p, last_thread_of_process_p): New.
13379 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13380 multiple processes.
13381 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13382 processes. Remove process from process table.
13383 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13384 to multiple processes.
13385 (any_thread_of): New.
13386 (linux_detach): Add `pid' argument, and handle it. Remove process
13387 from processes table.
13388 (linux_join): Add `pid' argument. Handle it.
13389 (linux_thread_alive): Change unsighed long argument to ptid_t.
13390 Consider dead lwps as not being alive.
13391 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13392 threads we're not interested in.
13393 (same_lwp, find_lwp_pid): New.
13394 (linux_wait_for_lwp): Change `pid' argument's type from int to
13395 ptid_t. Adjust.
13396 (linux_wait_for_event): Rename to ...
13397 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13398 from int to ptid_t. Adjust.
13399 (linux_wait_for_event): New.
13400 (linux_wait_1): Add `ptid' argument. Change return type to
13401 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13402 that exit from the process table.
13403 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13404 Adjust.
13405 (mark_lwp_dead): New.
13406 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13407 stopping all threads, mark its main lwp as dead.
13408 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13409 ptids.
13410 (fetch_register, usr_store_inferior_registers)
13411 (regsets_fetch_inferior_registers)
13412 (regsets_store_inferior_registers, linux_read_memory)
13413 (linux_write_memory): Inline `inferior_pid'.
13414 (linux_look_up_symbols): Adjust to use per-process
13415 `thread_db_active'.
13416 (linux_request_interrupt): Adjust to use ptids.
13417 (linux_read_auxv): Inline `inferior_pid'.
13418 (initialize_low): Don't reference thread_db_active.
13419 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13420 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13421 (ps_getpid): Return the pid of the current inferior.
13422 * thread-db.c (proc_handle, thread_agent): Delete.
13423 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13424 per-process data.
13425 (find_one_thread): Change argument type to ptid_t. Adjust to
13426 per-process data.
13427 (maybe_attach_thread): Adjust to per-process data and ptids.
13428 (thread_db_find_new_threads): Ditto.
13429 (thread_db_init): Ditto.
13430 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13431 processes table. Adjust to use ptids.
13432 (spu_kill, spu_detach): Adjust interface. Remove process from
13433 processes table.
13434 (spu_join, spu_thread_alive): Adjust interface.
13435 (spu_wait): Adjust interface. Remove process from processes
13436 table. Adjust to use ptids.
13437 * win32-low.c (current_inferior_tid): Delete.
13438 (current_inferior_ptid): New.
13439 (debug_event_ptid): New.
13440 (thread_rec): Take a ptid. Adjust.
13441 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13442 (child_delete_thread): Ditto.
13443 (do_initial_child_stuff): Add `attached' argument. Add process to
13444 processes table.
13445 (child_fetch_inferior_registers, child_store_inferior_registers):
13446 Adjust.
13447 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13448 (win32_attach): Pass 1 to do_initial_child_stuff.
13449 (win32_kill): Adjust interface. Remove process from processes
13450 table.
13451 (win32_detach): Ditto.
13452 (win32_join): Adjust interface.
13453 (win32_thread_alive): Take a ptid.
13454 (win32_resume): Adjust to use ptids.
13455 (get_child_debug_event): Ditto.
13456 (win32_wait): Adjust interface. Remove exiting process from
13457 processes table.
13458
bd99dc85
PA
134592009-04-01 Pedro Alves <pedro@codesourcery.com>
13460
13461 Non-stop mode support.
13462
13463 * server.h (non_stop): Declare.
13464 (gdb_client_data, handler_func): Declare.
13465 (delete_file_handler, add_file_handler, start_event_loop):
13466 Declare.
13467 (handle_serial_event, handle_target_event, push_event)
13468 (putpkt_notif): Declare.
13469 * target.h (enum resume_kind): New.
13470 (struct thread_resume): Replace `step' field by `kind' field.
13471 (TARGET_WNOHANG): Define.
13472 (struct target_ops) <wait>: Add `options' argument.
13473 <supports_non_stop, async, start_non_stop>: New fields.
13474 (target_supports_non_stop, target_async): New.
13475 (start_non_stop): Declare.
13476 (mywait): Add `options' argument.
13477 * target.c (mywait): Add `options' argument. Print child exit
13478 notifications here.
13479 (start_non_stop): New.
13480 * server.c (non_stop, own_buf, mem_buf): New globals.
13481 (struct vstop_notif): New.
13482 (notif_queue): New global.
13483 (queue_stop_reply, push_event, discard_queued_stop_replies)
13484 (send_next_stop_reply): New.
13485 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13486 interface changes.
13487 (attach_inferior): In non-stop mode, don't wait for the target
13488 here.
13489 (handle_general_set): Handle QNonStop.
13490 (handle_query): When handling qC, return the current general
13491 thread, instead of the first thread of the list.
13492 (handle_query): If the backend supports non-stop mode, include
13493 QNonStop+ in the qSupported query response.
13494 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13495 and non-stop mode.
13496 (handle_v_attach, handle_v_run): Handle non-stop mode.
13497 (handle_v_stopped): New.
13498 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13499 (myresume): Adjust to use resume_kind. Handle non-stop.
13500 (queue_stop_reply_callback): New.
13501 (handle_status): Handle non-stop mode.
13502 (main): Clear non_stop flag on reconnection. Use the event-loop.
13503 Refactor serial protocol handling from here ...
13504 (process_serial_event): ... to this new function. When GDB
13505 selects any thread, select one here. In non-stop mode, wait until
13506 GDB acks all pending events before exiting.
13507 (handle_serial_event, handle_target_event): New.
13508 * remote-utils.c (remote_open): Install remote_desc in the event
13509 loop.
13510 (remote_close): Remove remote_desc from the event loop.
13511 (putpkt_binary): Rename to...
13512 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13513 (putpkt_binary): New as wrapper around putpkt_binary_1.
13514 (putpkt_notif): New.
13515 (prepare_resume_reply): In non-stop mode, don't change the
13516 general_thread.
13517 * event-loop.c: New.
13518 * Makefile.in (OBJ): Add event-loop.o.
13519 (event-loop.o): New rule.
13520
13521 * linux-low.h (pid_of): Moved here.
13522 (lwpid_of): New.
13523 (get_lwp_thread): Use lwpid_of.
13524 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13525 * linux-low.c (pid_of): Delete.
13526 (inferior_pid): Use lwpid_of.
13527 (linux_event_pipe): New.
13528 (target_is_async_p): New.
13529 (delete_lwp): New.
13530 (handle_extended_wait): Use lwpid_of.
13531 (add_lwp): Don't set lwpid field.
13532 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13533 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13534 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13535 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13536 first. Adjust to linux_wait_for_event interface changes. Use
13537 lwpid_of.
13538 (linux_detach): Don't delete the main lwp here.
13539 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13540 (status_pending_p): Don't consider explicitly suspended lwps.
13541 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13542 pointer. Add OPTIONS argument. Change return type to int. Use
13543 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13544 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13545 pointer. Add status pointer argument. Return a pid instead of a
13546 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13547 changes. In non-stop mode, don't switch to a random thread.
13548 (linux_wait): Rename to...
13549 (linux_wait_1): ... this. Add target_options argument, and handle
13550 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13551 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13552 clean exit and signal exit code. Don't stop all threads in
13553 non-stop mode. In all-stop mode, only stop all threads when
13554 reporting a stop to GDB. Handle explicit thread stop requests.
13555 (async_file_flush, async_file_mark): New.
13556 (linux_wait): New.
13557 (send_sigstop): Use lwpid_of.
13558 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13559 interface changes. In non-stop mode, don't switch to a random
13560 thread.
13561 (linux_resume_one_lwp): Use lwpid_of.
13562 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13563 (linux_resume_one_thread): ... this. Handle resume_stop. In
13564 non-stop mode, don't look for pending flag in all threads.
13565 (resume_status_pending_p): Don't consider explicitly suspended
13566 threads.
13567 (my_waitpid): Reimplement. Emulate __WALL.
13568 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13569 Use lwpid_of.
13570 (sigchld_handler, linux_supports_non_stop, linux_async)
13571 (linux_start_non_stop): New.
13572 (linux_target_ops): Register linux_supports_non_stop, linux_async
13573 and linux_start_non_stop.
13574 (initialize_low): Install SIGCHLD handler.
13575 * thread-db.c (thread_db_create_event, find_one_thread)
13576 (thread_db_get_tls_address): Use lwpid_of.
13577 * win32-low.c (win32_detach): Adjust to use resume_kind.
13578 (win32_wait): Add `options' argument.
13579 * spu-low.c (spu_resume): Adjust to use resume_kind.
13580 (spu_wait): Add `options' argument.
13581
5b1c542e
PA
135822009-04-01 Pedro Alves <pedro@codesourcery.com>
13583
13584 Decouple target code from remote protocol.
13585
13586 * target.h (enum target_waitkind): New.
13587 (struct target_waitstatus): New.
13588 (struct target_ops) <wait>: Return an unsigned long. Take a
13589 target_waitstatus pointer instead of a char pointer.
13590 (mywait): Likewise.
13591 * target.c (mywait): Change prototype to return an unsigned long.
13592 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13593 * server.h (thread_from_wait, old_thread_from_wait): Delete
13594 declarations.
13595 (prepare_resume_reply): Change prototype to take a
13596 target_waitstatus.
13597 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13598 (last_status, last_ptid): New.
13599 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13600 pid instead of a signal.
13601 (attach_inferior): Remove "status" and "signal" parameters.
13602 Adjust.
13603 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13604 not as an address.
13605 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13606 (handle_v_requests, myresume): Remove "status" and "signal"
13607 parameters. Adjust.
13608 (handle_status): New.
13609 (main): Delete local `status'. Adjust.
13610 * remote-utils.c: Include target.h.
13611 (prepare_resume_reply): Change prototype to take a
13612 target_waitstatus. Adjust.
13613
13614 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13615 interface.
13616 * spu-low.c (spu_wait): Adjust.
13617 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13618 Delete.
13619 (win32_wait): Adjust.
13620
2bd7c093
PA
136212009-04-01 Pedro Alves <pedro@codesourcery.com>
13622
13623 * target.h (struct thread_resume): Delete leave_stopped member.
13624 (struct target_ops): Add a `n' argument to the `resume' callback.
13625 * server.c (start_inferior): Adjust.
13626 (handle_v_cont, myresume): Adjust.
13627 * linux-low.c (check_removed_breakpoint): Adjust to resume
13628 interface change, and to removed leave_stopped field.
13629 (resume_ptr): Delete.
13630 (struct thread_resume_array): New.
13631 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13632 resume interface change.
13633 (linux_continue_one_thread, linux_queue_one_thread)
13634 (resume_status_pending_p): Check if the resume field is NULL
13635 instead of checking the leave_stopped member.
13636 (linux_resume): Adjust to the target resume interface change.
13637 * spu-low.c (spu_resume): Adjust to the target resume interface
13638 change.
13639 * win32-low.c (win32_detach, win32_resume): Ditto.
13640
c35fafde
PA
136412009-04-01 Pedro Alves <pedro@codesourcery.com>
13642
13643 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13644 flag.
13645 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13646 pending.
13647 (linux_continue_one_thread): Only preserve the stepping flag if
13648 there's a pending breakpoint.
13649
0a59d50b
PA
136502009-03-31 Pedro Alves <pedro@codesourcery.com>
13651
13652 * server.c (main): After the inferior having exited, call
13653 remote_close before exiting gdbserver.
13654
f04c6d38
TJB
136552009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13656
13657 Fix size of FPSCR in Power 7 processors.
13658 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13659 (PPC_FEATURE_HAS_DFP): New #define.
13660 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13661 size of the FPSCR.
13662
78e5cee6
PA
136632009-03-23 Pedro Alves <pedro@codesourcery.com>
13664
13665 * server.c (handle_query) Whitespace and formatting.
13666
1b3f6016
PA
136672009-03-22 Pedro Alves <pedro@codesourcery.com>
13668
13669 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13670 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13671 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13672 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13673 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13674 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13675 Makefile.in, configure.ac: Fix whitespace throughout.
13676 * configure: Regenerate.
13677
a07b2135
PA
136782009-03-22 Pedro Alves <pedro@codesourcery.com>
13679
13680 * inferiors.c (find_inferior): Make it safe for the callback
13681 function to delete the currently iterated inferior.
13682
67cc2626
PA
136832009-03-22 Pedro Alves <pedro@codesourcery.com>
13684
13685 * Makefile.in (linuw_low_h): Move higher.
13686 (thread-db.o): Depend on $(linux_low_h).
13687
54a0b537
PA
136882009-03-17 Pedro Alves <pedro@codesourcery.com>
13689
13690 Rename "process" to "lwp" throughout.
13691
13692 * linux-low.c (all_processes): Rename to...
13693 (all_lwps): ... this.
13694 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13695 (add_process): Rename to ...
13696 (add_lwp): ... this. Adjust.
13697 (linux_create_inferior): Adjust.
13698 (linux_attach_lwp): Adjust.
13699 (linux_attach): Adjust.
13700 (linux_kill_one_process): Rename to ...
13701 (linux_kill_one_lwp): ... this. Adjust.
13702 (linux_kill): Adjust.
13703 (linux_detach_one_process): Rename to ...
13704 (linux_detach_one_lwp): ... this. Adjust.
13705 (linux_detach): Adjust.
13706 (check_removed_breakpoint): Adjust.
13707 (status_pending_p): Adjust.
13708 (linux_wait_for_process): Rename to ...
13709 (linux_wait_for_lwp): ... this. Adjust.
13710 (linux_wait_for_event): Adjust.
13711 (send_sigstop): Adjust.
13712 (wait_for_sigstop): Adjust.
13713 (stop_all_processes): Rename to ...
13714 (stop_all_lwps): ... this.
13715 (linux_resume_one_process): Rename to ...
13716 (linux_resume_one_lwp): ... this. Adjust.
13717 (linux_set_resume_request, linux_continue_one_thread)
13718 (linux_queue_one_thread, resume_status_pending_p)
13719 (usr_store_inferior_registers, regsets_store_inferior_registers)
13720 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13721 Adjust.
13722 * linux-low.h (get_process): Rename to ...
13723 (get_lwp): ... this. Adjust.
13724 (get_thread_process): Rename to ...
13725 (get_thread_lwp): ... this. Adjust.
13726 (get_process_thread): Rename to ...
13727 (get_lwp_thread): ... this. Adjust.
13728 (struct process_info): Rename to ...
13729 (struct lwp_info): ... this.
13730 (all_processes): Rename to ...
13731 (all_lwps): ... this.
13732 * proc-service.c (ps_lgetregs): Adjust.
13733 * thread-db.c (thread_db_create_event, find_one_thread)
13734 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13735
0b16c5cf
PA
137362009-03-14 Pedro Alves <pedro@codesourcery.com>
13737
13738 * server.c (handle_query): Handle "qAttached".
13739
32de4b9d
NS
137402009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13741
13742 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13743 GPLv3, update license URL.
13744
2aecd87f
DE
137452009-03-01 Doug Evans <dje@google.com>
13746
93efd302 13747 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13748 (server_h): Add gdb_signals.h.
13749 (signals.o): Update.
13750 * server.h (target_signal_from_host,target_signal_to_host_p)
13751 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13752
86b1f9c5
PM
137532009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13754
13755 * remote-utils.c (getpkt): Also generate remote-debug
13756 information if noack_mode is set.
13757
4aa995e1
PA
137582009-02-06 Pedro Alves <pedro@codesourcery.com>
13759
13760 * server.c (handle_query): Report qXfer:siginfo:read and
13761 qXfer:siginfo:write as supported and handle them.
13762 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13763 * linux-low.c (linux_xfer_siginfo): New.
13764 (linux_target_ops): Set it.
13765
62709adf
PA
137662009-01-26 Pedro Alves <pedro@codesourcery.com>
13767
13768 * server.c (gdbserver_usage): Mention --remote-debug.
13769 (main): Accept '--remote-debug' switch.
13770
aef93bd7
DE
137712009-01-18 Doug Evans <dje@google.com>
13772
13773 * regcache.c (new_register_cache): No need to check result of xcalloc.
13774 * server.c (handle_search_memory): Back out calls to xmalloc,
13775 result is checked and error is returned to user upon failure.
13776 (handle_query): Ditto. Add more checks for result of malloc.
13777 (handle_v_cont): Check result of malloc, report error back to
13778 user upon failure.
13779 (handle_v_run): Ditto. Call freeargv.
13780 * server.h (freeargv): Declare.
13781 * utils.c (freeargv): New fn.
13782
54363045
DE
137832009-01-15 Doug Evans <dje@google.com>
13784
f626972c
DE
13785 * gdbreplay.c (perror_with_name): Make arg const char *.
13786 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13787 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13788 * utils.c (perror_with_name): Make arg const char *.
54363045 13789
18aae699
PA
137902009-01-14 Pedro Alves <pedro@codesourcery.com>
13791
13792 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13793 when handling a EXIT_PROCESS_DEBUG_EVENT.
13794
ff703abe
JB
137952009-01-06 Joel Brobecker <brobecker@adacore.com>
13796
13797 * gdbreplay.c (gdbreplay_version): Update copyright year.
13798 * server.c (gdbserver_version): Likewise.
13799
f21cc1a2 138002009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13801
13802 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13803 (handle_extended_wait): Improve comment.
0e21c1ec 13804
bca929d3
DE
138052008-12-13 Doug Evans <dje@google.com>
13806
13807 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13808 * server.h (ATTR_MALLOC): New macro.
13809 (xmalloc,xcalloc,xstrdup): Declare.
13810 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13811 * inferiors.c: Ditto.
13812 * linux-low.c: Ditto.
13813 * mem-break.c: Ditto.
13814 * regcache.c: Ditto.
13815 * remote-utils.c: Ditto.
13816 * server.c: Ditto.
13817 * target.c: Ditto.
13818 * win32-low.c: Ditto.
13819
97438e3f
DE
138202008-12-12 Doug Evans <dje@google.com>
13821
896c7fbb
DE
13822 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13823 in debugging printf.
13824
97438e3f
DE
13825 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13826
e3b886f8
DE
138272008-12-09 Doug Evans <dje@google.com>
13828
13829 * linux-low.h (struct process_info): Delete member tid, unused.
13830 * thread-db.c (find_one_thread): Update.
13831 (maybe_attach_thread): Update.
13832
07e059b5
VP
138332008-12-02 Pedro Alves <pedro@codesourcery.com>
13834
889bf7c5
PA
13835 * target.h (struct target_ops): Add qxfer_osdata member.
13836 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13837 and dirent.h.
13838 (linux_qxfer_osdata): New functions.
13839 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13840 callback.
13841 * server.c (handle_query): Handle "qXfer:osdata:read:".
13842 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13843 (buffer_xml_printf): New functions.
13844 * server.h (struct buffer): New.
13845 (buffer_grow_str, buffer_grow_str0): New macros.
13846 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13847 (buffer_xml_printf): Declare.
07e059b5 13848
4cab47ab
DE
138492008-11-24 Doug Evans <dje@google.com>
13850
13851 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13852
f142445f
DJ
138532008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13854
13855 * server.c (handle_v_run): Always use the supplied argument list.
13856
d0107bb6 138572008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13858
d0107bb6
BW
13859 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13860 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13861
2c4ad781
TJB
138622008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13863
13864 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13865 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13866 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13867 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13868 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13869 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13870 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13871 XML target descriptions.
13872 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13873 when inferior is running on an ISA 2.05 or later processor. Add
13874 special case to return offset for full 64-bit slot of FPSCR when
13875 in 32-bits.
13876
dfb64f85
DJ
138772008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13878
13879 * Makefile.in (SFILES, clean): Added sparc64 files.
13880 (reg-sparc64.o, reg-sparc64.c): New.
13881 * configure.srv (sparc*-*-linux*): New configuration.
13882 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13883 syscall arguments for SPARC.
13884 (regsets_store_inferior_registers): Likewise.
13885 * linux-sparc-low.c: New file.
13886
66b6e1dd
DE
138872008-10-21 Doug Evans <dje@google.com>
13888
13889 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13890 (READLINE_DIR,READLINE_DEP): Delete.
13891 (INTERNAL_CFLAGS): Update.
13892 (LINTFLAGS): Update.
13893
9b710a42
PA
138942008-10-10 Pedro Alves <pedro@codesourcery.com>
13895
13896 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13897 whole argv from the last run, not just argv[0].
13898
5822d809
PA
138992008-09-08 Pedro Alves <pedro@codesourcery.com>
13900
13901 * regcache.c (new_register_cache): Return NULL if the register
13902 cache size isn't known yet.
13903 (free_register_cache): Avoid dereferencing a NULL regcache.
13904
74aac56f
DJ
139052008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13906
13907 * configure.srv: Merge MIPS and MIPS64.
13908
400b20f5
MR
139092008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13910
13911 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13912
677c5bb1
LM
139132008-08-18 Luis Machado <luisgpm@br.ibm.com>
13914
13915 * Makefile.in: Add required vsx dependencies.
13916
13917 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13918 Declare init_registers_powerpc_vsx32l.
13919 Declare init_registers_powerpc_vsx64l.
13920 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13921 (ppc_arch_setup): Check for VSX in hwcap.
13922 (ppc_fill_vsxregset): New function.
13923 (ppc_store_vsxregset): New function.
13924 Add new VSX entry in regset_info target_regsets.
13925
13926 * configure.srv: Add new VSX dependencies.
13927
a6f3e723
SL
139282008-08-12 Pedro Alves <pedro@codesourcery.com>
13929
13930 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13931 (remote_open): Set or clear transport_is_reliable.
13932 (putpkt_binary): Don't expect acks in noack mode.
13933 (getpkt): Don't send ack/nac in noack mode.
13934 * server.c (handle_general_set): Handle QStartNoAckMode.
13935 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13936 qSupported.
13937 (main): Reset noack_mode on every connection.
13938 * server.h (noack_mode): Declare.
13939
a417dc56
RW
139402008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13941
13942 * Makefile.in (GDBREPLAY_OBS): New variable.
13943 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13944
3221518c
UW
139452008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13946 Daniel Jacobowitz <dan@codesourcery.com>
13947
13948 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13949 (usr_store_inferior_registers): Likewise.
13950 (regsets_store_inferior_registers): Likewise.
13951
ec56be1b
PA
139522008-07-31 Rolf Jansen <rj@surtec.com>
13953 Pedro Alves <pedro@codesourcery.com>
13954
13955 * configure.ac: Check for memmem declaration.
13956 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13957 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13958 (disable_packet_qfThreadInfo): Unconditionally compile.
13959 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13960 * configure, config.in: Regenerate.
13961
2fe5e3ff
DE
139622008-07-28 Doug Kwan <dougkwan@google.com>
13963
13964 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13965 (linux_write_memory): Remove declaration of errno.
13966
836acd6d
UW
139672008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13968
13969 * linux-low.c (handle_extended_wait): Do not use "status"
13970 variable uninitialized.
13971
aeba519e
PA
139722008-07-07 Pedro Alves <pedro@codesourcery.com>
13973
13974 * server.c (handle_v_attach): Inhibit reporting dll changes.
13975
db42f210
PA
139762008-06-27 Pedro Alves <pedro@codesourcery.com>
13977
13978 * remote-utils.c (prepare_resume_reply): If requested, don't
13979 output "thread:TID" in the T stop reply.
13980
13981 * server.c (disable_packet_vCont, disable_packet_Tthread)
13982 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13983 (handle_query): If requested, disable support for qC, qfThreadInfo
13984 and qsThreadInfo.
13985 (handle_v_requests): If requested, disable support for vCont.
13986 (gdbserver_show_disableable): New.
13987 (main): Handle --disable-packet and --disable-packet=LIST.
13988
13989 * server.h (disable_packet_vCont, disable_packet_Tthread)
13990 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13991
8e4c5421
CD
139922008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13993
13994 * server.c (gdbserver_usage): Mention --version.
13995
6e23a804
DJ
139962008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13997
13998 * Makefile.in (gdbreplay.o): New rule.
13999
90aa6a40
JM
140002008-06-06 Joseph Myers <joseph@codesourcery.com>
14001
14002 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14003 message, not gdbserver.
14004
c16158bc 140052008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
14006 Nathan Sidwell <nathan@codesourcery.com>
14007 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
14008
14009 * acinclude.m4: Include ../../config/acx.m4.
14010 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14011 * configure, config.in: Regenerate.
14012 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14013 * server.c (gdbserver_version): Print PKGVERSION.
14014 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14015 (main): Adjust gdbserver_usage calls.
14016 * gdbreplay.c (version, host_name): Add declarations.
14017 (gdbreplay_version, gdbreplay_usage): New.
14018 (main): Accept --version and --help options.
14019
aeb75bf5
DJ
140202008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14021
14022 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14023 (arm_breakpoint_at): Handle Thumb.
14024 (the_low_target): Add comment.
14025
76b233dd
UW
140262008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14027
14028 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14029
08388c79
DE
140302008-05-09 Doug Evans <dje@google.com>
14031
a3c83fae
DE
14032 * server.h (decode_search_memory_packet): Declare.
14033 * remote-utils.c (decode_search_memory_packet): New fn.
14034 * server.c (handle_search_memory_1): New fn.
08388c79
DE
14035 (handle_search_memory): New fn.
14036 (handle_query): Process qSearch:memory packets.
14037
bb9c3d36
UW
140382008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14039
14040 * regcache.c (registers_length): Remove.
14041 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14042 full register packet.
14043 * regcache.h (registers_length): Remove prototype.
14044 * server.h (PBUFSIZ): Define to 16384.
14045
7284e1be
UW
140462008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14047
14048 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14049 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14050 powerpc-64l.o, and powerpc-altivec64l.o.
14051 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14052 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14053 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14054 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14055 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14056 to srv_xmlfiles.
14057
14058 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14059 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14060 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14061 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14062 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14063 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14064 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14065 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14066 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14067 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14068 (clean): Update.
14069
14070 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14071 (init_registers_powerpc_32l): ... this new prototype.
14072 (init_registers_powerpc_32): Remove, replace by ...
14073 (init_registers_powerpc_altivec32l): ... this new prototype.
14074 (init_registers_powerpc_e500): Remove, replace by ...
14075 (init_registers_powerpc_e500l): ... this new prototype.
14076 (init_registers_ppc64): Remove, replace by ...
14077 (init_registers_powerpc_64l): ... this new prototype.
14078 (init_registers_powerpc_64): Remove, replace by ...
14079 (init_registers_powerpc_altivec64l): ... this new prototype.
14080 (ppc_num_regs): Set to 73.
14081 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14082 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14083 (ppc_cannot_store_register): Handle orig_r3 and trap.
14084 (ppc_arch_setup): Update init_registers_... calls.
14085 (ppc_fill_gregset): Handle orig_r3 and trap.
14086
14087 * inferiors.c (clear_inferiors): Reset current_inferior.
14088
fdc59709
PB
140892008-04-23 Paolo Bonzini <bonzini@gnu.org>
14090
889bf7c5
PA
14091 * acinclude.m4: Add override.m4.
14092 * configure: Regenerate.
fdc59709 14093
c9b2f845
UW
140942008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14095
14096 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14097 initial call to init_register_ppc64.
14098
550512b8
UW
140992008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14100
43aaf8b6
PA
14101 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14102 single powerpc*-*-linux* case.
550512b8
UW
14103 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14104
b6430ec3
UW
141052008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14106
14107 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 14108 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
14109 from reg_xmlfiles.
14110 * linux-ppc-low.c: Include <elf.h>.
14111 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14112 (ppc_hwcap): New global variable.
14113 (ppc_regmap): Remove __SPE__ #ifdef sections.
14114 (ppc_regmap_e500): New global variable.
14115 (ppc_cannot_store_register): Update __SPE__ special case.
14116 (ppc_get_hwcap): New function.
14117 (ppc_arch_setup): Use it to determine whether inferior supports
14118 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14119 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14120 Do not access registers if target does not support AltiVec.
14121 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14122 Do not access registers if target does not support SPE.
14123 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14124
52fa2412
UW
141252008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14126
14127 * linux-low.c (disabled_regsets, num_regsets): New.
14128 (use_regsets_p): Delete.
14129 (linux_wait_for_process): Clear disabled_regsets.
14130 (regsets_fetch_inferior_registers): Check and set it.
14131 (regsets_store_inferior_registers): Likewise.
14132 (linux_fetch_registers, linux_store_registers): Do not use
14133 use_regsets_p.
14134 (initialize_low): Allocate disabled_regsets.
14135
e28b3332
DJ
141362008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14137
14138 * Makefile.in (LIBOBJS): New.
14139 (OBS): Use LIBOBJS.
14140 (memmem.o): New rule.
14141 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14142 * configure: Regenerated.
14143
4536995d
UW
141442008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14145
14146 * server.c (handle_query): Never return "unsupported" for
14147 qXfer:features:read queries.
14148
221c031f
UW
141492008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14150
14151 * server.c (get_features_xml): Fix inverted condition.
14152 (handle_query): Always support qXfer:feature:read.
14153
ccd213ac
DJ
141542008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14155
14156 * server.c (wrapper_argv): New.
14157 (start_inferior): Handle wrapper_argv. If set, expect an extra
14158 trap.
14159 (gdbserver_usage): Document --wrapper.
14160 (main): Parse --wrapper.
14161
6fe305f7
UW
141622008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14163
14164 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14165 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14166 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14167 (ppc_set_pc): Likewise.
14168 (ppc_arch_setup): New function.
14169 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14170 of collect_register.
889bf7c5 14171 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 14172
5b0a002e
UW
141732008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14174
14175 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14176 instead of linux-ppc64-low.o.
14177 * linux-ppc64-low.c: Remove file.
14178 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14179 (linux-ppc64-low.o): Remove rule.
14180
14181 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14182 (init_registers_powerpc_64): Likewise.
14183 (ppc_regmap): Conditionally define depending on __powerpc64__.
14184 (ppc_cannot_store_register): Do not special-case "fpscr" when
14185 compiled on __powerpc64__.
14186 (ppc_collect_ptrace_register): New function.
14187 (ppc_supply_ptrace_register): New function.
14188 (ppc_breakpoint): Change type to "unsigned int".
14189 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14190 (the_low_target): Conditionally provide initializers for the
889bf7c5 14191 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
14192 collect_ptrace_register and supply_ptrace_register members.
14193
9b4b61c8
UW
141942008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14195
14196 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14197 * server.c (gdbserver_xmltarget): Define.
14198 (get_features_xml): Use it to replace "target.xml" and arch_string.
14199
14200 * configure.srv: Remove srv_xmltarget. Add XML files that were
14201 mentioned there to srv_xmlfiles instead. Remove conditional tests
14202 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14203 srv_xmlfiles and srv_regobj to include all possible choices.
14204 * configure.ac (srv_xmltarget): Remove.
14205 (srv_xmlfiles): Do not add "target.xml".
14206 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14207 checks for supplementary target information.
14208 * configure: Regenerate.
14209 * Makefile.in (XML_TARGET): Remove.
14210 (target.xml): Remove rule.
14211 (clean): Do not clean up target.xml.
14212 (.PRECIOUS): Do not mention target.xml.
14213
14214 * target.h (struct target_ops): Remove arch_string member.
14215 * linux-low.c (linux_arch_string): Remove.
14216 (linux_target_ops): Remove arch_string initializer.
14217 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14218 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14219 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14220 * spu-low.c (spu_arch_string): Remove.
14221 (spu_target_ops): Remove arch_string initializer.
14222 * win32-low.c (win32_arch_string): Remove.
14223 (win32_target_ops): Remove arch_string initializer.
14224 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14225 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14226 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14227
ee1a7ae4
UW
142282008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14229
14230 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14231 by collect_ptrace_register and supply_ptrace_register hooks.
14232 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14233 instead of checking for the_low_target.left_pad_xfer.
14234 (usr_store_inferior_registers): Use collect_ptrace_register callback
14235 instead of checking for the_low_target.left_pad_xfer.
14236
14237 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14238 (s390_supply_ptrace_register): Likewise.
14239 (s390_fill_gregset): Call s390_collect_ptrace_register.
14240 (the_low_target): Update.
14241
14242 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14243 (ppc_supply_ptrace_register): Likewise.
14244 (the_low_target): Update.
14245
14246 * linux-i386-low.c (the_low_target): Update.
14247 * linux-x86-64-low.c (the_low_target): Update.
14248
d61ddec4
UW
142492008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14250
14251 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14252 reg-s390.o and reg-s390x.o.
14253
14254 * linux-low.c (new_inferior): New global variable.
14255 (linux_create_inferior, linux_attach): Set it.
14256 (linux_wait_for_process): Call the_low_target.arch_setup after the
14257 target has stopped for the first time.
14258 (initialize_low): Do not call the_low_target.arch_setup.
14259
14260 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14261 (s390_set_pc): Likewise.
14262 (s390_arch_setup): New function.
14263 (the_low_target): Use s390_arch_setup as arch_setup routine.
14264
14265 * regcache.c (realloc_register_cache): New function.
14266 (set_register_cache): Call it for each existing regcache.
14267
d05b4ac3
UW
142682008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14269
14270 * server.h (init_registers): Remove prototype.
14271
14272 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14273 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14274 instead of init_registers ().
14275 * linux-arm-low.c (init_registers_arm): Add prototype.
14276 (init_registers_arm_with_iwmmxt): Likewise.
14277 (the_low_target): Add initializer for arch_setup field.
14278 * linux-cris-low.c (init_registers_cris): Add prototype.
14279 (the_low_target): Add initializer for arch_setup field.
14280 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14281 (the_low_target): Add initializer for arch_setup field.
14282 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14283 (the_low_target): Add initializer for arch_setup field.
14284 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14285 (the_low_target): Add initializer for arch_setup field.
14286 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14287 (the_low_target): Add initializer for arch_setup field.
14288 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14289 (the_low_target): Add initializer for arch_setup field.
14290 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14291 (init_registers_mips64_linux): Likewise.
14292 (the_low_target): Add initializer for arch_setup field.
14293 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14294 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14295 (the_low_target): Add initializer for arch_setup field.
14296 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14297 (init_registers_powerpc_64): Likewise.
14298 (the_low_target): Add initializer for arch_setup field.
14299 * linux-s390-low.c (init_registers_s390): Add prototype.
14300 (init_registers_s390x): Likewise.
14301 (the_low_target): Add initializer for arch_setup field.
14302 * linux-sh-low.c (init_registers_sh): Add prototype.
14303 (the_low_target): Add initializer for arch_setup field.
14304 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14305 (the_low_target): Add initializer for arch_setup field.
14306 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14307 (the_low_target): Add initializer for arch_setup field.
14308
14309 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14310 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14311 instead of init_registers ().
14312 * win32-arm-low.c (init_registers_arm): Add prototype.
14313 (the_low_target): Add initializer for arch_setup field.
14314 * win32-i386-low.c (init_registers_i386): Add prototype.
14315 (the_low_target): Add initializer for arch_setup field.
14316
14317 * spu-low.c (init_registers_spu): Add prototype.
14318 (initialize_low): Call initialie_registers_spu () instead of
14319 initialize_registers ().
14320
fd96d250
PA
143212008-02-19 Pedro Alves <pedro@codesourcery.com>
14322
14323 * server.c (handle_v_requests): When handling the vRun and vAttach
14324 packets, if already debugging a process, don't kill it. Return an
14325 error instead.
14326
d41b6bb4
DJ
143272008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14328
14329 * server.c (handle_query): Correct length check.
14330
5ac588cf
PA
143312008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14332
14333 * win32-low.c (do_initial_child_stuff): Add process handle
14334 parameter. Set current_process_handle and current_process_id from the
14335 parameters. Clear globals.
14336 (win32_create_inferior): Don't set current_process_handle and
14337 current_process_id here. Instead pass them on the call to
14338 do_initial_child_stuff.
14339 (win32_attach): Likewise.
14340 (win32_clear_inferiors): New.
14341 (win32_kill): Don't close the current process handle or the
14342 current thread handle here. Instead call win32_clear_inferiors.
14343 (win32_detach): Don't open a new handle to the process. Call
14344 win32_clear_inferiors.
14345 (win32_join): Don't rely on current_process_handle; open a new
14346 handle using the process id.
14347 (win32_wait): Call win32_clear_inferiors when the inferior process
14348 has exited.
14349
ecd7ecbc
DJ
143502008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14351
14352 * server.c (monitor_show_help): Add "exit".
14353
1525d545
MG
143542008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14355
ecd7ecbc 14356 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
14357 (clean): Add reg-xtensa.c.
14358 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
14359 * configure.srv (xtensa*-*-linux*) New target.
14360 * linux-xtensa-low.c: New.
14361 * xtensa-xtregs.c: New.
1525d545 14362
59a016f0
PA
143632008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14364
14365 * hostio.c: Don't include errno.h.
14366 (errno_to_fileio_errno): Move to hostio-errno.
14367 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14368 error number outputting to the target->hostio_last_error callback.
14369 (hostio_packet_error): Use FILEIO_EINVAL directly.
14370 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14371 calls to hostio_error.
14372 * hostio-errno.c: New.
14373 * server.h (hostio_last_error_from_errno): Declare.
14374 * target.h (target_ops): Add hostio_last_error member.
14375 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14376 as hostio_last_error handler.
889bf7c5 14377 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
14378 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14379 (wince_hostio_last_error): New functions.
14380 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14381 as hostio_last_error handler.
14382 (win32_target_ops) [!_WIN32_WCE]: Register
14383 hostio_last_error_from_errno as hostio_last_error handler.
14384 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14385 (hostio-errno.o): New rule.
14386 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14387 * configure.srv (srv_hostio_err_objs): New variable. Default to
14388 hostio-errno.o.
14389 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14390 * configure: Regenerate.
14391
2d717e4f
DJ
143922008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14393
14394 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14395 (linux_kill, linux_detach): Clean up the process list.
14396 * remote-utils.c (remote_open): Improve port number parsing.
14397 (putpkt_binary, input_interrupt): Only send interrupts if the target
14398 is running.
14399 * server.c (extended_protocol): Make static.
14400 (attached): Define earlier.
14401 (exit_requested, response_needed, program_argv): New variables.
14402 (target_running): New.
14403 (start_inferior): Clear attached here.
14404 (attach_inferior): Set attached here.
14405 (require_running): Define.
14406 (handle_query): Use require_running and target_running. Implement
14407 "monitor exit".
14408 (handle_v_attach, handle_v_run): New.
14409 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14410 (gdbserver_usage): Update.
14411 (main): Redo argument parsing. Handle --debug and --multi. Handle
14412 --attach along with other options or after the port. Save
14413 program_argv. Support no initial program. Resynchronize
14414 communication with GDB after an error. Handle "monitor exit".
14415 Use require_running and target_running. Always allow the extended
14416 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14417 restart in extended mode.
14418 * README: Refer to the GDB manual. Update --attach usage.
14419
7407e2de
AS
144202007-12-20 Andreas Schwab <schwab@suse.de>
14421
14422 * linux-low.c (STACK_SIZE): Define.
14423 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14424 (linux_test_for_tracefork): Likewise.
14425
b65d95c5
DJ
144262007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14427
14428 * linux-low.c (linux_wait_for_event): Update messages. Do not
14429 reinsert auto-delete breakpoints.
14430 * mem-break.c (struct breakpoint): Change return type of handler to
14431 int.
14432 (set_breakpoint_at): Update handler type.
14433 (reinsert_breakpoint_handler): Return 1 instead of calling
14434 delete_breakpoint.
14435 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14436 setting a new one.
14437 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14438 * mem-break.h (set_breakpoint_at): Update handler type.
14439 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14440 * win32-low.c (auto_delete_breakpoint): New.
14441 (get_child_debug_event): Use it.
14442
4e799345
DJ
144432007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14444
14445 * configure.ac: Check for pread and pwrite.
14446 * hostio.c (handle_pread): Fall back to lseek and read.
14447 (handle_pwrite): Fall back to lseek and write.
14448 * config.in, configure: Regenerated.
14449
27524b67
DJ
144502007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14451
14452 * server.c (myresume): Add own_buf argument.
14453 (main): Update calls.
14454
a20d5e98
DJ
144552007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14456
14457 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14458 * remote-utils.c (remote_open): Do not call disable_async_io.
14459 (block_async_io): Delete.
14460 (unblock_async_io): Make static.
14461 (initialize_async_io): New.
14462 * server.c (handle_v_cont): Handle async I/O here.
14463 (myresume): Likewise. Move other common resume tasks here...
14464 (main): ... from here. Call initialize_async_io. Disable async
14465 I/O before the main loop.
14466 * server.h (initialize_async_io): Declare.
14467 (block_async_io, unblock_async_io): Delete prototypes.
14468 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14469
b79d787e
DJ
144702007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14471
14472 * remote-utils.c (readchar): Allow binary data in received messages.
14473
d97903b2
PA
144742007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14475
14476 * win32-low.c (attaching): New global.
14477 (win32_create_inferior): Clear the `attaching' global.
14478 (win32_attach): Set the `attaching' global.
14479 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14480 attaching. Only set a breakpoint at the entry point if not
14481 attaching.
14482
311de423
PA
144832007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14484
14485 * server.c (main): Don't report dll events on the initial
14486 connection on attaches.
14487
6c2d16d2
PA
144882007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14489
14490 * server.c (main): Relax numerical bases supported for the pid of
14491 the --attach command line argument.
14492
5ca906e6
PA
144932007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14494
14495 * win32-low.c (win32_attach): Call OpenProcess before
14496 DebugActiveProcess, not after. Add last error output to error
14497 call.
14498
9c6c8194
PA
144992007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14500
14501 * win32-low.c (win32_get_thread_context)
14502 (win32_set_thread_context): New functions.
14503 (thread_rec): Use win32_get_thread_context.
14504 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14505 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14506 field.
14507
4d5d1aaa
PA
145082007-12-03 Leo Zayas
14509 Pedro Alves <pedro_alves@portugalmail.pt>
14510
14511 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14512 global variables.
14513 (child_add_thread): Minor cleanup.
14514 (child_continue): Resume artificially suspended threads before
14515 calling ContinueDebugEvent.
14516 (suspend_one_thread): New.
14517 (fake_breakpoint_event): New.
14518 (get_child_debug_event): Change return type to int. Check here if
14519 gdb sent an interrupt request. If a soft interrupt was requested,
14520 fake a breakpoint event. Return 0 if there is no event to handle,
14521 and 1 otherwise.
14522 (win32_wait): Don't check here if gdb sent an interrupt request.
14523 Ensure there is a valid event to handle.
14524 (win32_request_interrupt): Add soft interruption method as last
14525 resort.
14526
c436e841
PA
145272007-12-03 Leo Zayas
14528 Pedro Alves <pedro_alves@portugalmail.pt>
14529
14530 * win32-low.h (win32_thread_info): Add descriptions to the
14531 structure members. Replace `suspend_count' counter by a
14532 `suspended' flag.
14533 * win32-low.c (thread_rec): Update condition of when to get the
14534 context from the inferior. Rely on ContextFlags being set if it
14535 has already been retrieved. Only suspend the inferior thread if
14536 we haven't already. Warn if that fails.
14537 (continue_one_thread): s/suspend_count/suspended/. Only call
14538 ResumeThread once. Warn if that fails.
14539
e7b5fa67
PA
145402007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14541
14542 * win32-low.c (win32_wait): Don't read from the inferior when it
14543 has already exited.
14544
a385171d
PA
145452007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14546
14547 * Makefile.in (win32_low_h): New variable.
14548 (win32-low.o): Add dependency on $(win32_low_h).
14549 (win32-arm-low.o, win32-i386-low.o): New rules.
14550
f80c84b3
DJ
145512007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14552
14553 * hostio.c: Correct copyright year.
14554
a6b151f1
DJ
145552007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14556
14557 * Makefile.in (OBS): Add hostio.o.
14558 (hostio.o): New rule.
14559 * server.h (handle_vFile): Declare.
14560 * hostio.c: New file.
14561 * server.c (handle_v_requests): Take packet_len and new_packet_len
14562 for binary packets. Call handle_vFile.
14563 (main): Update call to handle_v_requests.
14564
f9387fc3
DJ
145652007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14566
14567 * linux-low.c: Include <sched.h>.
14568
51c2684e
DJ
145692007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14570
14571 * linux-low.c (linux_tracefork_grandchild): New.
14572 (linux_tracefork_child): Use clone.
14573 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14574
75f83163
JB
145752007-10-31 Joel Brobecker <brobecker@adacore.com>
14576
14577 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14578
da5898ce
DJ
145792007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14580
14581 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14582
24a09b5f
DJ
145832007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14584
14585 * inferiors.c (change_inferior_id): Delete.
14586 (add_pid_to_list, pull_pid_from_list): New.
14587 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14588 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14589 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14590 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14591 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14592 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14593 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14594 (using_threads): Always set to 1.
14595 (handle_extended_wait): New.
14596 (add_process): Do not set TID.
14597 (linux_create_inferior): Set must_set_ptrace_flags.
14598 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14599 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14600 (linux_thread_alive): Rename TID argument to LWPID.
14601 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14602 (linux_wait_for_event): Do not use TID or check using_threads. Update
14603 call to dead_thread_notify. Call handle_extended_wait.
14604 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14605 (send_sigstop): Delete sigstop_sent.
14606 (wait_for_sigstop): Avoid TID.
14607 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14608 (linux_test_for_tracefork): New.
14609 (linux_lookup_signals): Use thread_db_active and
14610 linux_supports_tracefork_flag.
14611 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14612 * linux-low.h (get_process_thread): Avoid TID.
14613 (struct process_ifo): Move thread_known and tid to the end. Remove
14614 sigstop_sent.
14615 (linux_attach_lwp, thread_db_init): Update prototypes.
14616 * server.h (change_inferior_id): Delete prototype.
14617 (add_pid_to_list, pull_pid_from_list): New prototypes.
14618 * thread-db.c (thread_db_use_events): New.
14619 (find_first_thread): Rename to...
14620 (find_one_thread): ...this. Update callers and messages. Do not
14621 call fatal. Check thread_db_use_events. Do not call
14622 change_inferior_id or new_thread_notify.
14623 (maybe_attach_thread): Update. Do not call new_thread_notify.
14624 (thread_db_init): Set thread_db_use_events. Check use_events.
14625 * utils.c (fatal, warning): Correct message prefix.
14626
30ed0a8f
DJ
146272007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14628
14629 * Makefile.in (clean): Remove new files.
14630 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14631 (powerpc-64.o, powerpc-64.c): New rules.
14632 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14633 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14634 with SPE.
14635 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14636 SPE targets.
14637 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14638 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14639 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14640 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14641 (target_regsets): Add AltiVec and SPE register sets.
14642 * configure.ac: Check for AltiVec and SPE.
14643 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14644 (ppc_fill_vrregset, ppc_store_vrregset): New.
14645 (target_regsets): Add AltiVec register set.
14646 * configure: Regenerated.
14647
fd462a61
DJ
146482007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14649
14650 * linux-low.c (O_LARGEFILE): Define.
14651 (linux_read_memory): Use /proc/PID/mem.
14652 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14653 * configure, config.in: Regenerated.
14654
69f223ed
DJ
146552007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14656
14657 * linux-low.c (linux_wait_for_event): Do not pass signals while
14658 single-stepping.
14659
aec18585
PA
146602007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14661
14662 * win32-low.c (create_process): New.
14663 (win32_create_inferior): Use create_process instead of
14664 CreateProcess. If create_process failed retry appending an ".exe"
14665 suffix. Store the GetLastError result immediatelly after
14666 create_process calls and use it on the call to error.
14667
34d86ddd
PA
146682007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14669
14670 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14671
5a0e3bd0
JB
146722007-08-23 Joel Brobecker <brobecker@adacore.com>
14673
14674 * configure.ac: Switch license to GPLv3.
14675
f88c79e6
MS
146762007-08-01 Michael Snyder <msnyder@access-company.com>
14677
14678 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14679
6b3d9b83
PA
146802007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14681
14682 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14683 typedef.
14684 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14685 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14686 CloseToolhelp32Snapshot.
14687 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14688 CloseToolhelp32Snapshot.
14689
c588c53c
MS
146902007-07-27 Michael Snyder <michael.snyder@access-company.com>
14691
14692 * server.c (main): Check for inferior exit before main loop.
14693
aa0403d9
PA
146942007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14695
14696 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14697 instead of on tmp_desc.
14698
255e7678
DJ
146992007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14700 Daniel Jacobowitz <dan@codesourcery.com>
14701
14702 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14703 (add_thread): Minor cleanups.
14704 (clear_inferiors): Move lower in the file. Clear the DLL
14705 list.
14706 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14707 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14708 (xml_escape_text): New.
14709 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14710 for qSupported.
14711 (handle_v_cont): Report errors.
14712 (gdbserver_version): Update.
14713 (main): Correct size of own_buf. Do not report initial DLL events.
14714 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14715 (unloaded_dll, xml_escape_text): New.
14716 * win32-low.c (enum target_waitkind): Update comments.
14717 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14718 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14719 (win32_EnumProcessModules, win32_GetModuleInformation)
14720 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14721 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14722 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14723 (win32_Module32First, win32_Module32Next, load_toolhelp)
14724 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14725 (get_child_debug_event): Handle DLL events.
14726 (win32_wait): Likewise.
14727
0d37add9
DJ
147282007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14729
14730 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14731 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14732
45e2715e
PA
147332007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14734
14735 * win32-low.c (handle_output_debug_string): Ignore event if not
14736 waiting.
14737
c5674cf1
PA
147382007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14739
14740 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14741
2bbe3cc1
DJ
147422007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14743
14744 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14745
ae13219e
DJ
147462007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14747
14748 * inferiors.c (change_inferior_id): Add comment.
14749 * linux-low.c (check_removed_breakpoint): Add an early
14750 prototype. Improve debug output.
14751 (linux_attach): Doc update.
14752 (linux_detach_one_process, linux_detach): Clean up before releasing
14753 each process.
14754 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14755 * linux-low.h (struct process_info): Doc improvement.
14756 * mem-break.c (delete_all_breakpoints): New.
14757 * mem-break.h (delete_all_breakpoints): New prototype.
14758 * thread-db.c (find_first_thread): New.
14759 (thread_db_create_event): Call it instead of
14760 thread_db_find_new_threads. Clean up unused variables.
14761 (maybe_attach_thread): Remove first thread handling.
14762 (thread_db_find_new_threads): Use find_first_thread.
14763 (thread_db_get_tls_address): Likewise.
14764
4105de34
DJ
147652007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14766
14767 * thread-db.c (thread_db_find_new_threads): Add prototype.
14768 (thread_db_create_event): Check for the main thread before adding
14769 a new thread.
14770 (maybe_attach_thread): Only enable event reporting if TID == 0.
14771 (thread_db_get_tls_address): Check for new threads.
14772
2b876972
DJ
147732007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14774
14775 * linux-low.c (linux_create_inferior): Try execv before execvp.
14776 * spu-low.c (spu_create_inferior): Likewise.
14777
7a245884
DJ
147782007-06-13 Mike Frysinger <vapier@gentoo.org>
14779
14780 * linux-low.c (linux_create_inferior): Change execv to execvp.
14781 * spu-low.c (spu_create_inferior): Likewies.
14782
117ce543
DJ
147832007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14784
14785 * Makefile.in (clean): Clean new files instead of deleted ones.
14786 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14787 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14788 rules.
14789 * configure.srv: Specify XML files and new regformats for MIPS and
14790 MIPS64 GNU/Linux.
14791 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14792 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14793 an entry for the restart register.
14794 (mips_cannot_fetch_register, mips_cannot_store_register)
14795 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14796 register names to match the XML descriptions.
14797 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14798 restart register instead of $0.
14799
0e7f50da
UW
148002007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14801 Markus Deuling <deuling@de.ibm.com>
14802
14803 * remote-utils.c (decode_xfer_write): New function.
14804 * server.h (decode_xfer_write): Add prototype.
14805 * server.c (handle_query): Add PACKET_LEN argument. Support
14806 qXfer:spu:read and qXfer:spu:write packets.
14807 (main): Pass packet_len to handle_query.
14808 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14809 * target.h (target_ops): Add qxfer_spu.
14810
374c1d38
UW
148112007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14812
14813 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14814 accessing non-seekable spufs files.
14815
bb63802a
UW
148162007-05-16 Markus Deuling <deuling@de.ibm.com>
14817
889bf7c5 14818 * server.c (handle_query): Add reply for qC packet.
bb63802a 14819
7390519e
PA
148202007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14821 Leo Zayas <lerele@champenstudios@com>
14822
14823 * server.h (check_remote_input_interrupt_request): New function.
14824 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14825 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14826 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14827 (check_remote_input_interrupt_request): New function.
14828 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14829 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14830 winapi_GenerateConsoleCtrlEvent): New typedefs.
14831 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14832 to 250 ms.
14833 (win32_wait): Check for remote interrupt request
14834 with check_remote_input_interrupt_request.
14835 (win32_request_interrupt): New function.
14836 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14837
34b34921
PA
148382007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14839
14840 * win32-low.c (debug_registers_changed,
14841 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14842 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14843 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14844 (thread_rec): Get context using the low target.
14845 (child_add_thread): Call thread_added on the low target,
14846 which does the same thing.
14847 (regptr): Delete.
14848 (do_initial_child_stuff): Remove debug registers references.
14849 Set context using the low target. Resume threads after
14850 setting the contexts.
14851 (child_continue): Remove dead variable. Remove debug
14852 registers references.
14853 (child_fetch_inferior_registers): Go through the low target.
14854 (do_child_store_inferior_registers): Remove.
14855 (child_store_inferior_registers): Go through the low target.
14856 (win32_resume): Remove debug registers references.
14857 Set context using the low target.
14858 (handle_exception): Change return type to void. Don't record
14859 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14860 first chance exception.
889bf7c5 14861 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14862 goto loop. Always return after waiting for debug event.
14863 (win32_wait): Convert to switch statement. Handle spurious
14864 events.
14865
14866 * win32-i386-low.c (debug_registers_changed,
14867 debug_registers_used): New.
14868 (initial_stuff): Rename to ...
14869 (i386_initial_stuff): ... this. Clear debug registers
14870 state variables.
14871 (store_debug_registers): Delete.
14872 (i386_get_thread_context): New.
14873 (load_debug_registers): Delete.
14874 (i386_set_thread_context): New.
14875 (i386_thread_added): New.
14876 (single_step): Rename to ...
14877 (i386_single_step): ... this.
14878 (do_fetch_inferior_registers): Rename to ...
14879 (i386_fetch_inferior_register): ... this.
14880 (i386_store_inferior_register): New.
14881 (the_low_target): Adapt to new interface.
14882
14883 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14884 (arm_get_thread_context): New.
14885 (arm_set_thread_context): New.
14886 (regptr): New.
14887 (do_fetch_inferior_registers): Rename to ...
14888 (arm_fetch_inferior_register): ... this.
14889 (arm_store_inferior_register): New.
14890 (arm_wince_breakpoint): Reimplement as unsigned long.
14891 (arm_wince_breakpoint_len): Define.
14892 (the_low_target): Adapt to new interface.
14893
14894 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14895 load_debug_registers. Add get_thread_context, set_thread_context,
14896 thread_added and store_inferior_register. Rename
14897 fetch_inferior_registers to fetch_inferior_register.
14898 (regptr): Remove declaration.
14899
dd6953e1
PA
149002007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14901
14902 * linux-low.c (linux_detach): Change return type to int. Return 0.
14903 * spu-low.c (spu_detach): Likewise.
14904
444d6139
PA
149052007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14906
14907 * target.h (target_ops): Change return type of detach to int.
14908 Add join.
14909 (join_inferior): New.
14910 * server.c (main): Don't skip detach support on mingw32.
14911 If the inferior doesn't support detaching return error.
14912 Call join_inferior instead of using waitpid.
14913 * linux-low.c (linux_join): New.
14914 (linux_target_op): Add linux_join.
14915 * spu-low.c (spu_join): New.
14916 (spu_target_ops): Add spu_join.
14917 * win32-low.c (win32_detach): Adapt to new interface.
14918 Reopen current_process_handle before detaching. Issue a child
14919 resume before detaching.
14920 (win32_join): New.
14921 (win32_target_op): Add win32_join.
14922
1d5315fe
PA
149232007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14924
14925 * win32-low.c (win32-attach): Fix return value.
14926 * target.h (target_ops): Describe ATTACH return values.
14927
bf914831
PA
149282007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14929
14930 * win32-low.c (GETPROCADDRESS): Define.
14931 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14932 (winapi_DebugSetProcessKillOnExit): Likewise.
14933 (win32_create_inferior): Force usage of ansi CreateProcessA.
14934 (win32_attach): Use GETPROCADDRESS.
14935 (win32_detach): Likewise.
14936
f72f3e60
PA
149372007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14938
14939 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14940
ed50f18f
PA
149412007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14942
14943 * win32-low.c: Commit leftover changes from 2007-03-29.
14944
0c2ead7e
DJ
149452007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14946
14947 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14948 fields short instead of int. Add explicit padding.
14949 (i387_cache_to_fsave): Remove unnecessary casts.
14950 (i387_fsave_to_cache): Doc fix.
14951 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14952
73725ff3
DJ
149532007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14954
14955 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14956 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14957
d99f33d8
PA
149582007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14959
14960 * configure.srv (arm*-*-mingw32ce*): Move near the other
14961 arm targets.
14962
68070c10
PA
149632007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14964
2482afc6 14965 * configure.ac: Add errno checking.
68070c10
PA
14966 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14967 sys/file.h and malloc.h.
14968 (AC_CHECK_DECLS): Add perror.
14969 (srv_mingwce): Handle.
2482afc6 14970 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14971 win32-i386-low.o to srv_tgtobj.
14972 (i[34567]86-*-mingw*): Likewise.
14973 (arm*-*-mingw32ce*): Add case.
14974 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14975 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14976 [__MINGW32CE__] (strerror): New function.
14977 [__MINGW32CE__] (errno): Define to GetLastError.
14978 [__MINGW32CE__] (COUNTOF): New macro.
14979 (remote_open): Remove extra close call.
14980 * mem-break.c (delete_breakpoint_at): New function.
14981 * mem-break.h (delete_breakpoint_at): Declare.
14982 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14983 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14984 [USE_WIN32API] (read, write): Add char* casts.
14985 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14986 * server.h: Include wincecompat.h on Windows CE.
14987 [HAVE_ERRNO_H]: Check.
14988 (perror): Declare if not declared.
14989 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14990 (perror_with_name): Remove errno declaration.
14991 * wincecompat.h: New.
14992 * wincecompat.c: New.
14993 * win32-low.h: New.
14994 * win32-arm-low.c: New.
14995 * win32-i386-low.c: New.
14996 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14997 (OUTMSG2): Make it safe.
14998 (_T): New macro.
14999 (COUNTOF): New macro.
15000 (NUM_REGS): Get it from the low target.
15001 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15002 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15003 (thread_rec): Let low target handle debug registers.
15004 (child_add_thread): Likewise.
15005 (child_init_thread_list): Likewise.
15006 (continue_one_thread): Likewise.
15007 (regptr): New.
15008 (do_child_fetch_inferior_registers): Move to ...
15009 * win32-i386-low.c: ... here, and rename to ...
15010 (do_fetch_inferior_registers): ... this.
889bf7c5 15011 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
15012 Go through the low target.
15013 (do_child_store_inferior_registers): Use regptr.
15014 (strwinerror): New function.
15015 (win32_create_inferior): Handle Windows CE.
15016 Use strwinerror instead of strerror on Windows error
15017 codes. Add program to the error output.
15018 Don't close the main thread handle on Windows CE.
15019 (win32_attach): Use coredll.dll on Windows CE.
15020 (win32_kill): Close current process and current
15021 thread handles.
15022 (win32_detach): Use coredll.dll on Windows CE.
15023 (win32_resume): Let low target handle debug registers, and
15024 step request.
15025 (handle_exception): Add/Remove initial breakpoint. Avoid
15026 non-existant WSTOPSIG on Windows CE.
15027 (win32_read_inferior_memory): Cast to remove warning.
15028 (win32_arch_string): Go through the low target.
15029 (initialize_low): Call set_breakpoint_data with the low
15030 target's breakpoint.
15031 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15032 FOP_REGNUM, mappings): Move to ...
15033 * win32-i386-low.c: ... here.
15034 * win32-low.c (win32_thread_info): Move to ...
15035 * win32-low.h: ... here.
15036 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15037 win32-arm-low.c and wincecompat.c.
15038 (all:): Add $EXEEXT.
15039 (install-only:): Likewise.
15040 (gdbserver:): Likewise.
15041 (gdbreplay:): Likewise.
15042 * config.in: Regenerate.
15043 * configure: Regenerate.
15044
41093d81
PA
150452007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15046
15047 * win32-low.c: Rename typedef thread_info to
15048 win32_thread_info throughout.
15049
544afa54
PA
150502007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15051
15052 * win32-i386-low.c: Rename to ...
15053 * win32-low.c: ... this.
15054 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15055 * Makefile.in: Likewise.
15056
bce7165d
PA
150572007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15058
15059 * remote-utils.c (monitor_output): Constify msg parameter.
15060 * server.h (monitor_output): Likewise.
15061 * win32-i386-low.c (handle_output_debug_string): New.
15062 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15063 handle_output_debug_string.
15064 (get_child_debug_event): Likewise.
15065
506c7aa0
DJ
150662007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15067
15068 * server.c (main): Correct strtoul check.
15069
42c81e2a
DJ
150702007-03-27 Jon Ringle <jon@ringle.org>
15071
15072 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15073
9453113a
DJ
150742007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15075
15076 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15077
64a69107
DJ
150782007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15079
15080 * terminal.h: Check HAVE_SGTTY_H.
15081
150822007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
15083
15084 * remote-utils.c (remote_open): Print out the assigned port number.
15085
c74d0ad8
DJ
150862007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15087
15088 * remote-utils.c (monitor_output): New function.
15089 * server.c (debug_threads): Define here.
15090 (monitor_show_help): New function.
15091 (handle_query): Handle qRcmd.
15092 (main): Do not handle 'd' packet.
15093 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15094 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15095 of debug_threads.
15096
de7c3b4a
PA
150972007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15098
15099 * Makefile.in (EXEEXT): New.
15100 (clean): Use $(EXEEXT).
15101
ef57601b
PA
151022007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15103
15104 * target.h (target_ops): Rename send_signal to request_interrupt,
15105 and remove enum target_signal parameter.
15106 * linux-low.c (linux_request_interrupt): Rename from
15107 linux_send_signal, and always send SIGINT.
15108 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15109 and always send SIGINT.
15110 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15111 of send_signal.
15112 (input_interrupt): Likewise.
15113
820f2bda
PA
151142007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15115
15116 * server.c (get_features_xml): Check if target implemented
15117 arch_string.
15118 * win32-i386-low.c (win32_arch_string): New.
15119 (win32_target_ops): Add win32_arch_string as arch_string member.
15120
ab39bf24
UW
151212007-02-22 Markus Deuling <deuling@de.ibm.com>
15122
15123 * spu-low.c (spu_arch_string): New.
15124 (spu_target_ops): Add spu_arch_string.
15125
61ff6e04
DJ
151262007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15127
15128 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15129 * configure.ac: Do not check for terminal.h.
15130 * configure, config.in: Regenerated.
15131
fb1e4ffc
DJ
151322007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15133
15134 * Makefile.in (OBS): Add $(XML_BUILTIN).
15135 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15136 (clean): Update.
15137 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15138 (arm-with-iwmmxt.c): New.
15139 * config.in, configure: Regenerate.
15140 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15141 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15142 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15143 (arm*-*-linux*): Add iWMMXt and regset support.
15144 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15145 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15146 (arm_store_wmmxregset, target_regsets): New.
15147 * server.c (get_features_xml): Take annex argument. Check builtin
15148 XML documents.
15149 (handle_query): Handle multiple annexes.
15150
0f48aa01
DJ
151512007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15152
15153 * remote-utils.c [USE_WIN32API] (read, write): Define.
15154 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15155 write.
15156
23181151
DJ
151572007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15158
15159 * linux-i386-low.c (the_low_target): Set arch_string.
15160 * linux-x86-64-low.c (the_low_target): Likewise.
15161 * linux-low.c (linux_arch_string): New.
15162 (linux_target_ops): Add it.
15163 * linux-low.h (struct linux_target_ops): Add arch_string.
15164 * server.c (write_qxfer_response): Use const void * for DATA.
15165 (get_features_xml): New.
15166 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15167 * target.h (struct target_ops): Add arch_string method.
15168
9d606399
DJ
151692007-01-03 Denis Pilat <denis.pilat@st.com>
15170 Daniel Jacobowitz <dan@codesourcery.com>
15171
15172 * linux-low.c (linux_kill): Handle being called with no threads.
15173 * win32-i386-low.c (win32_kill): Likewise.
15174 (get_child_debug_event): Clear current_process_handle.
15175
151762006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
15177 Daniel Jacobowitz <dan@codesourcery.com>
15178
15179 * remote-utils.c (remote_open): Check the type of specified
15180 serial port devices before opening them.
15181 * server.c (main): Kill the inferior if an error occurs during
15182 the first remote_open.
15183
a5e13d24
DJ
151842006-12-05 Markus Deuling <deuling@de.ibm.com>
15185
15186 * README: Update supported targets.
15187
186947f7
DJ
151882006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15189
15190 * Makefile.in (clean): Remove reg-mips64.c.
15191 (reg-mips64.c, reg-mips64.o): New rules.
15192 * configure.srv: Handle mips64. Include regset support for mips.
15193 * linux-mips-low.c (union mips_register): New.
15194 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15195 (mips_breakpoint, mips_breakpoint_at): Use int.
15196 (mips_collect_register, mips_supply_register)
15197 (mips_collect_register_32bit, mips_supply_register_32bit)
15198 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15199 (mips_store_fpregset, target_regsets): New.
15200 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15201
a13e2c95
UW
152022006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15203
15204 * configure.srv: Add target "spu*-*-*".
15205 * Makefile.in (clean): Remove reg-spu.c.
15206 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15207 * spu-low.c: New file.
15208
cb7283db
DJ
152092006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15210
15211 * configure.ac: Correct td_thr_tls_get_addr test.
15212 * configure: Regenerated.
15213
89be2091
DJ
152142006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15215
15216 * linux-low.c (linux_wait_for_event): Reformat. Use the
15217 pass_signals array.
15218 * remote-utils.c (decode_address_to_semicolon): New.
15219 * server.c (pass_signals, handle_general_set): New.
15220 (handle_query): Mention QPassSignals for qSupported.
15221 (main): Call handle_general_set.
15222 * server.h (pass_signals, decode_address_to_semicolon): New.
15223
000ef4f0
DJ
152242006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15225
15226 * server.c (handle_query): Correct error handling for read_auxv.
15227
b7149293
UW
152282005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15229
15230 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15231 and srv_linux_thread_db to yes.
15232 * linux-s390-low.c (s390_fill_gregset): New function.
15233 (target_regsets): Define data structure.
15234
dae5f5cf
DJ
152352006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15236
15237 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15238 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15239 * config.in, configure: Regenerated.
15240 * inferiors.c (gdb_id_to_thread): New function.
15241 (gdb_id_to_thread_id): Use it.
15242 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15243 * linux-low.h (struct process_info): Add th member.
15244 (thread_db_get_tls_address): New prototype.
15245 * remote-utils.c (decode_address): Make non-static.
15246 * server.c (handle_query): Handle qGetTLSAddr.
15247 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15248 * target.h (struct target_ops): Add get_tls_address.
15249 * thread-db.c (maybe_attach_thread): Save the thread handle.
15250 (thread_db_get_tls_address): New.
15251
32ca6d61
DJ
152522006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15253
15254 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15255 (linux_resume_one_process): Take a siginfo_t *. Update all
15256 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15257 (struct pending_signals): Add a siginfo_t.
15258 (linux_wait_for_process): Always set last_status.
15259 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15260 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15261 * linux-low.h (struct process_info): Add last_status.
15262
5ffff7c1
DJ
152632006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15264
15265 * remote-utils.c (try_rle): New function.
15266 (putpkt_binary): Use it.
15267
8695c747
DJ
152682006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15269
15270 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15271 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15272 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15273 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15274 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15275 point registers.
15276
290fadea
RS
152772006-08-08 Richard Sandiford <richard@codesourcery.com>
15278
15279 * server.c (terminal_fd): New variable.
15280 (old_foreground_pgrp): Likewise.
15281 (restore_old_foreground_pgrp): New function.
15282 (start_inferior): Record the terminal file descriptor in terminal_fd
15283 and its original foreground group in old_foreground_pgrp. Register
15284 restore_old_foreground_pgrp with atexit().
15285
9f2e1e63
DJ
152862006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15287
15288 * server.c (handle_query): Correct qPart to qXfer.
15289
b80864fb
DJ
152902006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15291
15292 * configure.ac: Check for more headers which are missing on
15293 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15294 * configure.srv: Add Cygwin and mingw32.
15295 * remote-utils.c: Don't include headers unconditionally which
15296 are missing on mingw32. Include <winsock.h> for mingw32.
15297 (remote_open): Adjust for mingw32 support. Flush
15298 standard error after writing to it.
15299 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15300 (unblock_async_io, enable_async_io, disable_async_io)
15301 (readchar, getpkt): Update for Winsock support.
15302 (prepare_resume_reply): Expect a protocol signal number.
15303 * server.c: Disable <sys/wait.h> on mingw32.
15304 (start_inferior): Adjust for mingw32 support. Flush
15305 standard error after writing to it.
15306 (attach_inferior): Likewise. Use protocol signal
15307 numbers.
15308 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15309 and names.
15310 * win32-i386-low.c: New file.
15311 * Makefile.in (XM_CLIBS): Set.
15312 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15313 (win32-i386-low.o): New dependency rule.
15314 * linux-low.c (linux_wait): Use target signal numbers.
15315 * target.h (struct target_ops): Doc fix.
15316 * server.h (target_signal_to_name): New prototype.
15317 * gdbreplay.c: Don't include headers unconditionally which
15318 are missing on mingw32. Include <winsock.h> for mingw32.
15319 (remote_close, remote_open): Adjust for Winsock support.
15320 * configure, config.in: Regenerated.
15321
0876f84a
DJ
153222006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15323
15324 * server.c (decode_xfer_read, write_qxfer_response): New.
15325 (handle_query): Take a packet length argument. Handle
15326 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15327 the qSupported response.
15328 (main): Update call to handle_query.
15329
01f9e8fa
DJ
153302006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15331
15332 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15333 (putpkt_binary): Renamed from putpkt and adjusted for binary
15334 data.
15335 (putpkt): New wrapper for putpkt_binary.
15336 (readchar): Don't mask off the high bit.
15337 (decode_X_packet): New function.
15338 * server.c (main): Call putpkt_binary if a handler sets the packet
15339 length. Save the length of the incoming packet. Handle 'X'.
15340 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15341
be2a5f71
DJ
153422006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15343
15344 * server.c (handle_query): Handle qSupported.
15345
ea025f5f
DJ
153462006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15347
15348 * remote-utils.c (all_symbols_looked_up): New variable.
15349 (look_up_one_symbol): Check it.
15350 * server.h (look_up_one_symbol): New declaration.
15351 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15352
9308fc88
DJ
153532006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15354
15355 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 15356 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
15357 (PTRACE_GET_THREAD_AREA): Define.
15358 (ps_get_thread_area): New function.
15359
52fb6437
NS
153602006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15361
15362 * configure.srv (m68k*-*-uclinux*): New target.
15363 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15364 (linux_resume_one_process): Remove extraneous cast.
15365 (linux_read_offsets): New.
15366 (linux_target_op): Add linux_read_offsets on mmuless systems.
15367 * server.c (handle_query): Add qOffsets logic.
15368 * target.h (struct target_ops): Add read_offsets.
15369
21b0f40c
DJ
153702006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15371
15372 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15373 (PTRACE_GET_THREAD_AREA): Define.
15374 (ps_get_thread_area): New function.
15375 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15376 (linux-x86-64-low.o): Update.
15377
0050a760
DJ
153782006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15379
15380 * configure.ac: Remove checks for prfpregset_t.
15381 * gdb_proc_service.h: New file.
15382 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15383 new "gdb_proc_service.h".
15384 * proc-service.c: Likewise.
15385 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15386 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15387 * Makefile.in (gdb_proc_service_h): Updated.
15388 * configure, config.in: Regenerated.
15389
b92a518e
DJ
153902006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15391
15392 * remote-utils.c (prepare_resume_reply): Move declaration
15393 of gdb_id_from_wait to the top of the block.
15394
545587ee
DJ
153952006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15396
15397 * linux-low.c (regsets_store_inferior_registers): Read the regset
15398 from the target before filling it.
15399
9db87ebd
DJ
154002006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15401
15402 * server.c (attach_inferior): Return SIGTRAP for a successful
15403 attach.
15404
dd24457d
DJ
154052006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15406
15407 * Makefile.in (OBS): Add version.o.
15408 (STAGESTUFF): Delete.
15409 (version.o): Add dependencies.
15410 (version.c): Replace rule.
15411 (clean): Remove version.c.
15412 * server.c (gdbserver_version): New.
15413 (gdbserver_usage): Use printf.
15414 (main): Handle --version and --help.
15415 * server.h (version, host_name): Add declarations.
15416
6f0f660e
EZ
154172005-12-23 Eli Zaretskii <eliz@gnu.org>
15418
889bf7c5
PA
15419 * linux-arm-low.c:
15420 * linux-arm-low.c:
15421 * inferiors.c:
15422 * i387-fp.h:
15423 * i387-fp.c:
15424 * gdbreplay.c:
15425 * regcache.c:
15426 * proc-service.c:
15427 * mem-break.h:
15428 * mem-break.c:
15429 * linux-x86-64-low.c:
15430 * linux-sh-low.c:
15431 * linux-s390-low.c:
15432 * linux-ppc64-low.c:
15433 * linux-ppc-low.c:
15434 * linux-mips-low.c:
15435 * linux-m68k-low.c:
15436 * linux-m32r-low.c:
15437 * linux-low.h:
15438 * linux-low.c:
15439 * linux-ia64-low.c:
15440 * linux-i386-low.c:
15441 * linux-crisv32-low.c:
15442 * thread-db.c:
15443 * terminal.h:
15444 * target.h:
15445 * target.c:
15446 * server.h:
15447 * server.c:
15448 * remote-utils.c:
15449 * regcache.h:
15450 * utils.c:
15451 * Makefile.in:
15452 * configure.ac:
6f0f660e
EZ
15453 * gdbserver.1: Add (C) after Copyright. Update the FSF
15454 address.
15455
9d1fb177
DJ
154562005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15457
15458 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15459 (arm_breakpoint_at): Recognize both breakpoints.
15460 (the_low_target): Use the correct breakpoint instruction.
15461
011a70c2
DJ
154622005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15463
15464 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15465 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15466 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15467 (the_low_target): Update.
15468
7fb85e41
AS
154692005-10-25 Andreas Schwab <schwab@suse.de>
15470
15471 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15472
15473 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15474 (ia64_num_regs): Reduce to 462.
15475
3db0444b
DJ
154762005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15477
15478 * acinclude.m4: Correct quoting.
15479 * aclocal.m4: Regenerated.
15480
15481 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15482 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15483 (thread_db_init): Call thread_db_err_str.
15484 * configure.ac: Check for TD_VERSION.
15485 * config.in, configure: Regenerated.
15486
bee0189a
DJ
154872005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15488
15489 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15490
e9d25b98
DJ
154912005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15492
15493 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15494 is not available. Define HAVE_PTRACE_GETREGS if it is.
15495 * config.in, configure: Regenerated.
15496 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15497 * linux-i386-low.c, linux-m68k-low.c: Update to use
15498 HAVE_PTRACE_GETREGS.
15499 * linux-low.c (regsets_fetch_inferior_registers)
15500 (regsets_store_inferior_registers): Only return 0 if we processed
15501 GENERAL_REGS.
15502 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15503 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15504
a06660f7
DJ
155052005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15506
15507 * inferiors.c (struct thread_info): Add gdb_id.
15508 (add_thread): Add gdb_id argument.
15509 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15510 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15511 calls to add_thread.
15512 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15513 * server.c (handle_query): Use thread_to_gdb_id.
15514 (handle_v_cont, main): Use gdb_id_to_thread_id.
15515 * server.h (add_thread): Update prototype.
15516 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15517 prototypes.
15518
5a1f5858
DJ
155192005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15520
15521 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15522 left-padded registers.
15523 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15524 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15525
e122f1f5
SE
155262005-07-01 Steve Ellcey <sje@cup.hp.com>
15527
15528 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15529 * configure: Regenerate.
15530 * config.in: Regenerate.
15531 * server.h (NEED_DECLARATION_STRERROR):
15532 Replace with !HAVE_DECL_STRERROR.
15533
d592fa2f
DJ
155342005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15535
15536 * linux-low.c (linux_wait, linux_send_signal): Don't test
15537 an unsigned long variable for > 0 if it could be MAX_ULONG.
15538 * server.c (myresume): Likewise.
15539 * target.c (set_desired_inferior): Likewise.
15540
ccbd4912
MK
155412005-06-13 Mark Kettenis <kettenis@gnu.org>
15542
15543 * configure.ac: Simplify and improve check for socklen_t.
15544 * configure, config.in: Regenerate.
15545
f450004a
DJ
155462005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15547
15548 * acconfig.h: Remove.
15549 * configure.ac: Add a test for socklen_t. Use three-argument
15550 AC_DEFINE throughout.
15551 * config.in: Regenerated using autoheader 2.59.
15552 * configure: Regenerated.
15553
15554 * gdbreplay.c (socklen_t): Provide a default.
15555 (remote_open): Use socklen_t.
15556 * remote-utils.c (socklen_t): Provide a default.
15557 (remote_open): Use socklen_t.
15558 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15559 unsigned char.
15560
15561 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15562 char for buffers.
15563 * linux-low.c (linux_read_memory, linux_write_memory)
15564 (linux_read_auxv): Likewise.
15565 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15566 (check_mem_write): Likewise.
15567 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15568 Likewise.
15569 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15570 (registers_from_string, register_data): Likewise.
15571 * server.c (handle_query, main): Likewise.
15572 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15573 (decode_M_packet): Likewise.
15574 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15575 * target.h (struct target_ops): Update read_memory, write_memory,
15576 and read_auxv.
15577 (read_inferior_memory, write_inferior_memory): Update.
15578 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15579 to unsigned char *.
15580 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15581 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15582 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15583 linux-s390-low.c, linux-sh-low.c: Update for changes in
15584 read_inferior_memory and the_low_target->breakpoint.
15585
eee84df1
DJ
155862005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15587
15588 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15589 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15590 * configure.srv: Add powerpc64-*-linux*.
15591 * linux-ppc64-low.c: New file.
15592
45b134e5
OF
155932005-05-23 Orjan Friberg <orjanf@axis.com>
15594
15595 * linux-cris-low.c: New file with support for CRIS.
15596 * linux-crisv32-low.c: Ditto for CRISv32.
15597 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15598 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15599 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15600 reg-crisv32.o, and reg-crisv32.c to make rules.
15601 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15602 recognized targets.
15603
48d93c75
UW
156042005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15605
15606 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15607 of sizeof (PTRACE_XFER_TYPE).
15608 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15609
e013ee27
OF
156102005-05-12 Orjan Friberg <orjanf@axis.com>
15611
889bf7c5 15612 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15613 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15614 pointers for hardware watchpoint support.
15615 * linux-low.h (struct linux_target_ops): Ditto.
15616 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15617 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15618 to linux_target_ops.
15619 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15620 reply packet.
15621 * server.c (main): Recognize 'Z' and 'z' packets.
15622
b0ded00b
UW
156232005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15624
15625 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15626 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15627 (the_low_target): Add new members.
15628
8643e2ad
DJ
156292005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15630
15631 * proc-service.c (ps_lgetregs): Search all_processes instead of
15632 all_threads.
15633
fc620387
DJ
156342005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15635
15636 * server.c (start_inferior): Change return type to int.
15637 (attach_inferior): Change sigptr to int *.
15638 (handle_v_cont, handle_v_requests): Change signal to int *.
15639 (main): Change signal to int.
15640
156412005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15642
15643 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15644 * configure.srv: Add m32r*-*-linux*.
15645 * linux-m32r-low.c: New file.
15646
e0e76420
DJ
156472005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15648
15649 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15650
a1928bad
DJ
156512005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15652
15653 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15654 Take unsigned long arguments for PIDs.
15655 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15656 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15657 (wait_for_sigstop, linux_resume_one_process)
15658 (regsets_fetch_inferior_registers, linux_send_signal)
15659 (linux_read_auxv): Likewise. Update the types of variables holding
15660 PIDs. Update format string specifiers.
15661 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15662 * remote-utils.c (prepare_resume_reply): Likewise.
15663 * server.c (cont_thread, general_thread, step_thread)
15664 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15665 unsigned long.
15666 (handle_query): Update format specifiers.
15667 (handle_v_cont, main): Use strtoul for thread IDs.
15668 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15669 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15670 (general_thread, step_thread, thread_from_wait)
15671 (old_thread_from_wait): Update.
15672 * target.h (struct thread_resume): Use unsigned long for THREAD.
15673 (struct target_ops): Use unsigned long for arguments to attach and
15674 thread_alive.
15675
dcdb98d2
DJ
156762005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15677
15678 * acinclude.m4: Include bfd/bfd.m4 directly.
15679 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15680 <agriffis@toolchain.org>.
15681 * aclocal.m4, configure: Regenerated.
15682
bec39cab
AC
156832005-01-07 Andrew Cagney <cagney@gnu.org>
15684
15685 * configure.ac: Rename configure.in, require autoconf 2.59.
15686 * configure: Re-generate.
15687
434c4c77
DJ
156882004-12-08 Daniel Jacobowitz <dan@debian.org>
15689
15690 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15691 LIBS when finished.
15692 * aclocal.m4: Regenerated.
15693 * configure: Regenerated.
15694
db1d3e1b
AS
156952004-11-21 Andreas Schwab <schwab@suse.de>
15696
15697 * linux-m68k-low.c (m68k_num_gregs): Define.
15698 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15699 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15700 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15701 (m68k_breakpoint_at): New. Add to the_low_target.
15702
15703 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15704 srv_linux_thread_db to yes.
15705
43360365
JB
157062004-10-20 Joel Brobecker <brobecker@gnat.com>
15707
15708 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15709 (ARCH_SET_FS): Likewise.
15710 (ARCH_GET_FS): Likewise.
15711 (ARCH_GET_GS): Likewise.
15712
fd500816
DJ
157132004-10-16 Daniel Jacobowitz <dan@debian.org>
15714
15715 * linux-i386-low.c (ps_get_thread_area): New.
15716 * linux-x86-64-low.c (ps_get_thread_area): New.
15717 * linux-low.c: Include <sys/syscall.h>.
15718 (linux_kill_one_process): Don't kill the first thread here.
15719 (linux_kill): Kill the first thread here.
15720 (kill_lwp): New function.
15721 (send_sigstop, linux_send_signal): Use it.
15722 * proc-service.c: Clean up #ifdefs.
15723 (fpregset_info): Delete.
15724 (ps_lgetregs): Update and enable implementation.
15725 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15726 implementations.
15727 * remote-utils.c (struct sym_cache, symbol_cache): New.
15728 (input_interrupt): Print a clearer message.
15729 (async_io_enabled): New variable.
15730 (enable_async_io, disable_async_io): Use it. Update comments.
15731 (look_up_one_symbol): Use the symbol cache.
15732 * thread-db.c (thread_db_look_up_symbols): New function.
15733 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15734
f6de3c42
DJ
157352004-10-16 Daniel Jacobowitz <dan@debian.org>
15736
15737 * configure.in: Test for -rdynamic.
15738 * configure: Regenerated.
15739 * Makefile (INTERNAL_LDFLAGS): New.
15740 (gdbserver, gdbreplay): Use it.
15741
2c0fc042
AC
157422004-09-02 Andrew Cagney <cagney@gnu.org>
15743
15744 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15745
075b3282
DJ
157462004-03-23 Daniel Jacobowitz <drow@mvista.com>
15747
15748 * linux-low.c (linux_wait): Clear all_processes list also.
15749
fa6a77dc
DJ
157502004-03-12 Daniel Jacobowitz <drow@mvista.com>
15751
15752 * linux-low.c: Include <errno.h>. Remove extern declaration of
15753 errno.
15754
6d782a97
DJ
157552004-03-12 Daniel Jacobowitz <drow@mvista.com>
15756
15757 * gdbreplay.c, server.h, utils.c: Update copyright years.
15758
3a7fb99b
DJ
157592004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15760
15761 * server.c (main): Print child status or termination signal from
15762 variable 'signal', not 'sig'.
15763
c3e735a6
DJ
157642004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15765
15766 * linux-low.c (linux_read_memory): Change return type to
15767 int. Check for and return error from ptrace().
15768 * target.c (read_inferior_memory): Change return type to int. Pass
15769 back return status from the_target->read_memory().
15770 * target.h (struct target_ops): Adapt *read_memory() prototype.
15771 Update comment.
15772 (read_inferior_memory): Adapt prototype.
15773 * server.c (main): Return an error packet if
15774 read_inferior_memory() returns an error.
15775
a59d1c82
DJ
157762004-03-04 Daniel Jacobowitz <drow@mvista.com>
15777
15778 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15779 Unify with other clean targets.
15780
dc3f8883
DJ
157812004-02-29 Daniel Jacobowitz <drow@mvista.com>
15782
15783 * server.c (handle_v_cont): Call set_desired_inferior.
15784
89a208da
DJ
157852004-02-29 Daniel Jacobowitz <drow@mvista.com>
15786
15787 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15788
62ea82f5
DJ
157892004-02-29 Daniel Jacobowitz <drow@mvista.com>
15790
15791 * linux-low.c (linux_wait): Unblock async I/O.
15792 (linux_resume): Block and enable async I/O.
15793 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15794 * server.h (block_async_io, unblock_async_io): Add prototypes.
15795
6910d122
DJ
157962004-02-29 Daniel Jacobowitz <drow@mvista.com>
15797
15798 * remote-utils.c (remote_open): Print a status notice after
15799 opening a TCP port.
15800 * server.c (attach_inferior): Print a status notice after
15801 attaching.
15802
158032004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15804
15805 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15806
c89dc5d4
DJ
158072004-02-26 Daniel Jacobowitz <drow@mvista.com>
15808
15809 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15810 error packet.
15811 * server.c, target.h: Update copyright years.
15812
4b8dad4a
RM
158132004-02-25 Roland McGrath <roland@redhat.com>
15814
15815 * target.h (struct target_ops): New member `read_auxv'.
15816 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15817 * linux-low.c (linux_read_auxv): New function.
15818 (linux_target_ops): Initialize `read_auxv' member to that.
15819
d7446758
JB
158202004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15821
15822 Committed by Jim Blandy <jimb@redhat.com>.
15823
15824 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15825 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15826 instead of GPR_SIZE to distiguish s390 and s390x targets.
15827
5544ad89
DJ
158282004-01-31 Daniel Jacobowitz <drow@mvista.com>
15829
15830 * linux-low.c: Update copyright year.
15831 (check_removed_breakpoint): Clear pending_is_breakpoint.
15832 (linux_set_resume_request, linux_queue_one_thread)
15833 (resume_status_pending_p): New functions.
15834 (linux_continue_one_thread): Use process->resume.
15835 (linux_resume): Only resume threads if there are no pending events.
15836 * linux-low.h (struct process_info): Add resume request
15837 pointer.
15838
2a68b70e
DJ
158392004-01-30 Daniel Jacobowitz <drow@mvista.com>
15840
15841 * regcache.c (new_register_cache): Clear the allocated register
15842 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15843
64386c31
DJ
158442003-10-13 Daniel Jacobowitz <drow@mvista.com>
15845
15846 * linux-low.c (linux_resume): Take a struct thread_resume *
15847 argument.
15848 (linux_wait): Update call.
15849 (resume_ptr): New static variable.
15850 (linux_continue_one_thread): Renamed from
15851 linux_continue_one_process. Use resume_ptr.
15852 (linux_resume): Use linux_continue_one_thread.
15853 * server.c (handle_v_cont, handle_v_requests): New functions.
15854 (myresume): New function.
15855 (main): Handle 'v' case.
15856 * target.h (struct thread_resume): New type.
15857 (struct target_ops): Change argument of "resume" to struct
15858 thread_resume *.
15859 (myresume): Delete macro.
15860
c938e9b0
L
158612003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15862
15863 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15864 (uninstall): Support DESTDIR.
15865
7f313d07
BC
15866Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15867
15868 * configure.srv: Add xscale*linux copy of arm*linux entry.
15869
3b2fc2ea
DJ
158702003-07-24 Daniel Jacobowitz <drow@mvista.com>
15871
15872 * linux-arm-low.c (arm_reinsert_addr): New function.
15873 (the_low_target): Add arm_reinsert_addr.
15874
1c0a559e
MK
158752003-07-08 Mark Kettenis <kettenis@gnu.org>
15876
15877 * mem-break.c: Remove whitespace at end of file.
15878
43d5792c
DJ
158792003-06-28 Daniel Jacobowitz <drow@mvista.com>
15880
15881 * configure.in: Check whether we need to prototype strerror.
15882 * server.h: Optionally prototype strerror.
15883 * gdbreplay.c (perror_with_name): Use strerror.
15884 * linux-low.c (linux_attach_lwp): Use strerror.
15885 * utils.c (perror_with_name): Use strerror.
15886 * config.in, configure: Regenerated.
15887
c8a86edf
DJ
158882003-06-28 Daniel Jacobowitz <drow@mvista.com>
15889
15890 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15891 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15892
73d37363
DJ
158932003-06-20 Daniel Jacobowitz <drow@mvista.com>
15894
15895 * Makefile.in (SFILES): Update.
15896 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15897 low-sun3.c: Remove files.
15898
6ad8ae5c
DJ
158992003-06-17 Daniel Jacobowitz <drow@mvista.com>
15900
15901 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15902 (linux_detach_one_process, linux_detach): New functions.
15903 (linux_target_ops): Add linux_detach.
15904 * server.c (main): Handle 'D' packet.
15905 * target.h (struct target_ops): Add "detach" member.
15906 (detach_inferior): Define.
15907
1581182a
MK
159082003-06-13 Mark Kettenis <kettenis@gnu.org>
15909
15910 From Kelley Cook <kelleycook@wideopenwest.com>:
15911 * configure.srv: Accept i[34567]86 variants.
15912
e5379b03
DJ
159132003-06-05 Daniel Jacobowitz <drow@mvista.com>
15914
15915 * linux-low.c (linux_wait_for_event): Correct comment typos.
15916 (linux_resume_one_process): Call check_removed_breakpoint.
15917 (linux_send_signal): New function.
15918 (linux_target_ops): Add linux_send_signal.
15919 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15920 of kill.
15921 * target.h (struct target_ops): Add send_signal.
15922
2ff29de4
JB
159232003-05-29 Jim Blandy <jimb@redhat.com>
15924
15925 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15926 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15927 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15928 away part of the register's value.
15929
254787d4
DJ
159302003-03-26 Daniel Jacobowitz <drow@mvista.com>
15931
15932 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15933 (linux_wait_for_event, linux_init_signals): Likewise.
15934
94e10508
DJ
159352003-03-17 Daniel Jacobowitz <drow@mvista.com>
15936
15937 * configure.in: Check for stdlib.h.
15938 * configure: Regenerated.
15939 * config.in: Regenerated.
15940
4c0711e0
DJ
159412003-01-04 Andreas Schwab <schwab@suse.de>
15942
15943 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15944
ef66e766
AC
159452003-01-02 Andrew Cagney <ac131313@redhat.com>
15946
15947 * Makefile.in: Remove obsolete code.
15948
a1358604
DJ
159492002-11-20 Daniel Jacobowitz <drow@mvista.com>
15950
15951 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15952 defined(PT_FPR0_HI).
15953
23ce3b1c
DJ
159542002-11-17 Stuart Hughes <seh@zee2.com>
15955
15956 * linux-arm-low.c (arm_num_regs): Increase.
15957 (arm_regmap): Include status register.
15958
159592002-11-17 Daniel Jacobowitz <drow@mvista.com>
15960
15961 * linux-low.c (register_addr): Remove incorrect -1 check.
15962
a9fa9f7d
DJ
159632002-08-29 Daniel Jacobowitz <drow@mvista.com>
15964
15965 * linux-low.c (linux_create_inferior): Call setpgid. Return
15966 the new PID.
15967 (unstopped_p, linux_signal_pid): Remove.
15968 (linux_target_ops): Remove linux_signal_pid.
15969 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15970 global instead of target method.
15971 * target.h (struct target_ops): Remove signal_pid. Update comment
15972 for create_inferior.
15973 * server.c (signal_pid): New variable.
15974 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15975 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15976 (attach_inferior): Set signal_pid.
15977
17574093
DJ
159782002-08-23 Daniel Jacobowitz <drow@mvista.com>
15979
15980 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15981
159822002-08-20 Jim Blandy <jimb@redhat.com>
15983
15984 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15985 default for this.
15986
159872002-08-01 Andrew Cagney <cagney@redhat.com>
15988
15989 * Makefile.in: Make chill references obsolete.
15990
159912002-07-24 Kevin Buettner <kevinb@redhat.com>
15992
15993 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15994 * configure: Regenerate.
15995 * config.in: Regenerate.
15996
159972002-07-09 David O'Brien <obrien@FreeBSD.org>
15998
15999 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16000 (perror_with_name, remote_close, remote_open, expect, play): Static.
16001
160022002-07-04 Michal Ludvig <mludvig@suse.cz>
16003
4b8dad4a 16004 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
16005 byte offsets instead of an array of indexes.
16006 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16007
160082002-06-13 Daniel Jacobowitz <drow@mvista.com>
16009
16010 * regcache.c: Add comment.
16011
160122002-06-11 Daniel Jacobowitz <drow@mvista.com>
16013
16014 * thread-db.c: New file.
16015 * proc-service.c: New file.
16016 * acinclude.m4: New file.
16017 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16018 proc-service.o, and thread-db.o.
16019 (linux-low.o): Add USE_THREAD_DB.
16020 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16021 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16022 * aclocal.m4: Regenerated.
16023 * config.in: Regenerated.
16024 * configure: Regenerated.
16025 * configure.in: Check for proc_service.h, sys/procfs.h,
16026 thread_db.h, and linux/elf.h headrs.
16027 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16028 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16029 Check for -lthread_db and thread support.
16030 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16031 PowerPC, and SuperH.
16032 * i387-fp.c: Constify arguments.
16033 * i387-fp.h: Likewise.
16034 * inferiors.c: (struct thread_info): Renamed from
16035 `struct inferior_info'. Remove PID member. Use generic inferior
16036 list header. All uses updated.
16037 (inferiors, signal_pid): Removed.
16038 (all_threads): New variable.
16039 (get_thread): Define.
16040 (add_inferior_to_list): New function.
16041 (for_each_inferior): New function.
16042 (change_inferior_id): New function.
16043 (add_inferior): Removed.
16044 (remove_inferior): New function.
16045 (add_thread): New function.
16046 (free_one_thread): New function.
16047 (remove_thread): New function.
16048 (clear_inferiors): Use for_each_inferior and free_one_thread.
16049 (find_inferior): New function.
16050 (find_inferior_id): New function.
16051 (inferior_target_data): Update argument type.
16052 (set_inferior_target_data): Likewise.
16053 (inferior_regcache_data): Likewise.
16054 (set_inferior_regcache_data): Likewise.
16055 * linux-low.c (linux_bp_reinsert): Remove.
16056 (all_processes, stopping_threads, using_thrads)
16057 (struct pending_signals, debug_threads, pid_of): New.
16058 (inferior_pid): Replace with macro.
16059 (struct inferior_linux_data): Remove.
16060 (get_stop_pc, add_process): New functions.
16061 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16062 Use add_process and add_thread.
16063 (linux_attach_lwp): New function, based on old linux_attach. Use
16064 add_process and add_thread. Set stop_expected for new threads.
16065 (linux_attach): New function.
16066 (linux_kill_one_process): New function.
16067 (linux_kill): Kill all LWPs.
16068 (linux_thread_alive): Use find_inferior_id.
16069 (check_removed_breakpoints, status_pending_p): New functions.
16070 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16071 Update. Use WNOHANG. Wait for cloned processes also. Update process
16072 struct for the found process.
16073 (linux_wait_for_event): New function.
16074 (linux_wait): Use it. Support LWPs.
16075 (send_sigstop, wait_for_sigstop, stop_all_processes)
16076 (linux_resume_one_process, linux_continue_one_process): New functions.
16077 (linux_resume): Support LWPs.
16078 (REGISTER_RAW_SIZE): Remove.
16079 (fetch_register): Use register_size instead. Call supply_register.
16080 (usr_store_inferior_registers): Likewise. Call collect_register.
16081 Fix recursive case.
16082 (regsets_fetch_inferior_registers): Improve error message.
16083 (regsets_store_inferior_registers): Add debugging.
16084 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16085 (unstopped_p, linux_signal_pid): New functions.
16086 (linux_target_ops): Add linux_signal_pid.
16087 (linux_init_signals): New function.
16088 (initialize_low): Call it. Initialize using_threads.
16089 * regcache.c (inferior_regcache_data): Add valid
16090 flag.
16091 (get_regcache): Fetch registers lazily. Add fetch argument
16092 and update all callers.
16093 (regcache_invalidate_one, regcache_invalidate): New
16094 functions.
16095 (new_register_cache): Renamed from create_register_cache.
16096 Return the new regcache.
16097 (free_register_cache): Change argument to a void *.
16098 (registers_to_string, registers_from_string): Call get_regcache
16099 with fetch flag set.
16100 (register_data): Make static. Pass fetch flag to get_regcache.
16101 (supply_register): Call get_regcache with fetch flag clear.
16102 (collect_register): Call get_regcache with fetch flag set.
16103 (collect_register_as_string): New function.
16104 * regcache.h: Update.
16105 * remote-utils.c (putpkt): Flush after debug output and use
16106 stderr.
16107 Handle input interrupts while waiting for an ACK.
16108 (input_interrupt): Use signal_pid method.
16109 (getpkt): Flush after debug output and use stderr.
16110 (outreg): Use collect_register_as_string.
16111 (new_thread_notify, dead_thread_notify): New functions.
16112 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16113 and general_thread.
16114 (look_up_one_symbol): Flush after debug output.
16115 * server.c (step_thread, server_waiting): New variables.
16116 (start_inferior): Don't use signal_pid. Update call to mywait.
16117 (attach_inferior): Update call to mywait.
16118 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16119 (main): Don't fetch/store registers explicitly. Use
16120 set_desired_inferior. Support proposed ``Hs'' packet. Update
16121 calls to mywait.
16122 * server.h: Update.
16123 (struct inferior_list, struct_inferior_list_entry): New.
16124 * target.c (set_desired_inferior): New.
16125 (write_inferior_memory): Constify.
16126 (mywait): New function.
16127 * target.h: Update.
16128 (struct target_ops): New signal_pid method.
16129 (mywait): Removed macro, added prototype.
16130
16131 * linux-low.h (regset_func): Removed.
16132 (regset_fill_func, regset_store_func): New.
16133 (enum regset_type): New.
16134 (struct regset_info): Add type field. Use new operation types.
16135 (struct linux_target_ops): stop_pc renamed to get_pc.
16136 Add decr_pc_after_break and breakpoint_at.
16137 (get_process, get_thread_proess, get_process_thread)
16138 (strut process_info, all_processes, linux_attach_lwp)
16139 (thread_db_init): New.
16140
16141 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16142 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16143 (the_low_target): Add new members.
16144 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16145 (i386_store_fpxregset): Constify.
16146 (target_regsets): Add new kind identifier.
16147 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16148 (i386_set_pc): Add debugging.
16149 (i386_breakpoint_at): New function.
16150 (the_low_target): Add new members.
16151 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16152 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16153 (mips_breakpoint_at): New.
16154 (the_low_target): Add new members.
16155 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16156 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16157 (the_low_target): Add new members.
16158 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16159 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16160 (the_low_target): Add new members.
16161 * linux-x86-64-low.c (target_regsets): Add new kind
16162 identifier.
16163
161642002-05-15 Daniel Jacobowitz <drow@mvista.com>
16165
16166 From Martin Pool <mbp@samba.org>:
16167 * server.c (gdbserver_usage): New function.
16168 (main): Call it.
16169
161702002-05-14 Daniel Jacobowitz <drow@mvista.com>
16171
16172 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16173 stop_at -> stop_pc.
16174
161752002-05-04 Andrew Cagney <ac131313@redhat.com>
16176
16177 * Makefile.in: Remove obsolete code.
16178
161792002-04-24 Michal Ludvig <mludvig@suse.cz>
16180
16181 * linux-low.c (regsets_fetch_inferior_registers),
16182 (regsets_store_inferior_registers): Removed cast to int from
16183 ptrace() calls.
16184 * regcache.h: Added declaration of struct inferior_info.
16185
161862002-04-20 Daniel Jacobowitz <drow@mvista.com>
16187
16188 * inferiors.c (struct inferior_info): Add regcache_data.
16189 (add_inferior): Call create_register_cache.
16190 (clear_inferiors): Call free_register_cache.
16191 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16192 * regcache.c (struct inferior_regcache_data): New.
16193 (registers): Remove.
16194 (get_regcache): New function.
16195 (create_register_cache, free_register_cache): New functions.
16196 (set_register_cache): Don't initialize the register cache here.
16197 (registers_to_string, registers_from_string, register_data): Call
16198 get_regcache.
16199 * regcache.h: Add prototypes.
16200 * server.h: Likewise.
16201
162022002-04-20 Daniel Jacobowitz <drow@mvista.com>
16203
16204 * mem-break.c: New file.
16205 * mem-break.h: New file.
16206 * Makefile.in: Add mem-break.o rule; update server.h
16207 dependencies.
16208 * inferiors.c (struct inferior_info): Add target_data
16209 member.
16210 (clear_inferiors): Free target_data member if set.
16211 (inferior_target_data, set_inferior_target_data): New functions.
16212 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16213 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16214 * linux-low.c (linux_bp_reinsert): New variable.
16215 (struct inferior_linux_data): New.
16216 (linux_create_inferior): Use set_inferior_target_data.
16217 (linux_attach): Likewise. Call add_inferior.
16218 (linux_wait_for_one_inferior): New function.
16219 (linux_wait): Call it.
16220 (linux_write_memory): Add const.
16221 (initialize_low): Call set_breakpoint_data.
16222 * linux-low.h (struct linux_target_ops): Add breakpoint
16223 handling members.
16224 * server.c (attach_inferior): Remove extra add_inferior
16225 call.
16226 * server.h: Include mem-break.h. Update inferior.c
16227 prototypes.
16228 * target.c (read_inferior_memory)
16229 (write_inferior_memory): New functions.
16230 * target.h (read_inferior_memory)
16231 (write_inferior_memory): Change macros to prototypes.
16232 (struct target_ops): Update comments. Add const to write_memory
16233 definition.
16234
162352002-04-11 Daniel Jacobowitz <drow@mvista.com>
16236
16237 * linux-low.c (usr_store_inferior_registers): Support
16238 registers which are allowed to fail to store.
16239 * linux-low.h (linux_target_ops): Likewise.
16240 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16241 (ppc_cannot_store_register): FPSCR may not be storable.
16242
162432002-04-09 Daniel Jacobowitz <drow@mvista.com>
16244
16245 * server.h: Include <string.h> if HAVE_STRING_H.
16246 * ChangeLog: Correct paths in last ChangeLog entry.
16247
162482002-04-09 Daniel Jacobowitz <drow@mvista.com>
16249
16250 * linux-low.h: Remove obsolete prototypes.
16251 (struct linux_target_ops): New.
16252 (extern the_low_target): New.
16253 * linux-low.c (num_regs, regmap): Remove declarations.
16254 (register_addr): Use the_low_target explicitly.
16255 (fetch_register): Likewise.
16256 (usr_fetch_inferior_registers): Likewise.
16257 (usr_store_inferior_registers): Likewise.
16258 * linux-arm-low.c (num_regs): Remove.
16259 (arm_num_regs): Define.
16260 (arm_regmap): Renamed from regmap, made static.
16261 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16262 made static.
16263 (arm_cannot_store_register): Renamed from cannot_store_register,
16264 made static.
16265 (the_low_target): New.
16266 * linux-i386-low.c (num_regs): Remove.
16267 (i386_num_regs): Define.
16268 (i386_regmap): Renamed from regmap, made static.
16269 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16270 made static.
16271 (i386_cannot_store_register): Renamed from cannot_store_register,
16272 made static.
16273 (the_low_target): New.
16274 * linux-ia64-low.c (num_regs): Remove.
16275 (ia64_num_regs): Define.
16276 (ia64_regmap): Renamed from regmap, made static.
16277 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16278 made static.
16279 (ia64_cannot_store_register): Renamed from cannot_store_register,
16280 made static.
16281 (the_low_target): New.
16282 * linux-m68k-low.c (num_regs): Remove.
16283 (m68k_num_regs): Define.
16284 (m68k_regmap): Renamed from regmap, made static.
16285 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16286 made static.
16287 (m68k_cannot_store_register): Renamed from cannot_store_register,
16288 made static.
16289 (the_low_target): New.
16290 * linux-mips-low.c (num_regs): Remove.
16291 (mips_num_regs): Define.
16292 (mips_regmap): Renamed from regmap, made static.
16293 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16294 made static.
16295 (mips_cannot_store_register): Renamed from cannot_store_register,
16296 made static.
16297 (the_low_target): New.
16298 * linux-ppc-low.c (num_regs): Remove.
16299 (ppc_num_regs): Define.
16300 (ppc_regmap): Renamed from regmap, made static.
16301 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16302 made static.
16303 (ppc_cannot_store_register): Renamed from cannot_store_register,
16304 made static.
16305 (the_low_target): New.
16306 * linux-s390-low.c (num_regs): Remove.
16307 (s390_num_regs): Define.
16308 (s390_regmap): Renamed from regmap, made static.
16309 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16310 made static.
16311 (s390_cannot_store_register): Renamed from cannot_store_register,
16312 made static.
16313 (the_low_target): New.
16314 * linux-sh-low.c (num_regs): Remove.
16315 (sh_num_regs): Define.
16316 (sh_regmap): Renamed from regmap, made static.
16317 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16318 made static.
16319 (sh_cannot_store_register): Renamed from cannot_store_register,
16320 made static.
16321 (the_low_target): New.
16322 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16323 (the_low_target): New.
16324
163252002-04-09 Daniel Jacobowitz <drow@mvista.com>
16326
16327 * Makefile.in: Add stamp-h target.
16328 * configure.in: Create stamp-h.
16329 * configure: Regenerated.
16330
163312002-04-09 Daniel Jacobowitz <drow@mvista.com>
16332
16333 * inferiors.c: New file.
16334 * target.c: New file.
16335 * target.h: New file.
16336 * Makefile.in: Add target.o and inferiors.o. Update
16337 dependencies.
16338 * linux-low.c (inferior_pid): New static variable,
16339 moved from server.c.
16340 (linux_create_inferior): Renamed from create_inferior.
16341 Call add_inferior. Return 0 on success instead of a PID.
16342 (linux_attach): Renamed from myattach.
16343 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16344 (linux_thread_alive): Renamed from mythread_alive.
16345 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16346 child dies.
16347 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16348 (regsets_store_inferior_registers): Correct error message.
16349 Add missing ``return 0''.
16350 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16351 (linux_store_registers): Renamed from store_inferior_registers.
16352 (linux_read_memory): Renamed from read_inferior_memory.
16353 (linux_write_memory): Renamed from write_inferior_memory.
16354 (linux_target_ops): New structure.
16355 (initialize_low): Call set_target_ops ().
16356 * remote-utils.c (unhexify): New function.
16357 (hexify): New function.
16358 (input_interrupt): Send signals to ``signal_pid''.
16359 * server.c (inferior_pid): Remove.
16360 (start_inferior): Update create_inferior call.
16361 (attach_inferior): Call add_inferior.
16362 (handle_query): New function.
16363 (main): Call handle_query for `q' packets.
16364 * server.h: Include "target.h". Remove obsolete prototypes.
16365 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16366
163672002-04-09 Daniel Jacobowitz <drow@mvista.com>
16368
16369 * Makefile.in: Add WARN_CFLAGS. Update configury
16370 dependencies.
16371 * configure.in: Check for <string.h>
16372 * configure: Regenerate.
16373 * config.in: Regenerate.
16374 * gdbreplay.c: Include needed system headers.
16375 (remote_open): Remove strchr prototype.
16376 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16377 * regcache.c (supply_register): Change buf argument to const void *.
16378 (supply_register_by_name): Likewise.
16379 (collect_register): Change buf argument to void *.
16380 (collect_register_by_name): Likewise.
16381 * regcache.h: Add missing prototypes.
16382 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16383 * server.c (handle_query): New function.
16384 (attached): New static variable, moved out of main.
16385 (main): Quiet longjmp clobber warnings.
16386 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16387 * utils.c (error): Remove NORETURN.
16388 (fatal): Likewise.
This page took 2.880429 seconds and 4 git commands to generate.