]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
opcodes error messages
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
b1223e78
MM
12018-03-01 Markus Metzger <markus.t.metzger@intel.com>
2
3 * target.h (target_enable_btrace, target_disable_btrace)
4 (target_read_btrace, target_read_btrace_conf): Turn macro into
5 inline function. Throw error if target method is not defined.
6 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
7 check for btrace target method. Be prepared to handle exceptions
8 from btrace target methods.
9
81561546
SDJ
102018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
11
12 * server.c (captured_main): Change order of error message printed
13 when the current working directory cannot be found.
14
25e3c82c
SDJ
152018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
16
17 * server.c: Include "filenames.h" and "pathstuff.h".
18 (program_name): Delete variable.
19 (program_path): New anonymous class.
20 (get_exec_wrapper): Use "program_path" instead of
21 "program_name".
22 (handle_v_run): Likewise.
23 (captured_main): Likewise.
24 (process_serial_event): Likewise.
25
b4987c95
SDJ
262018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
27
28 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
29 (OBJS): Add "pathstuff.o".
30 * server.c (current_directory): New global variable.
31 (captured_main): Initialize "current_directory".
32
f46cd62a
AH
332018-02-26 Alan Hayward <alan.hayward@arm.com>
34
35 * tdesc.c: Use common/tdesc.h.
36 * tdesc.h: Likewise.
37
a543c5ca
AH
382018-02-20 Alan Hayward <alan.hayward@arm.com>
39 Simon Marchi <simon.marchi@ericsson.com>
40
41 * Makefile.in: Switch order of make rules.
42
b5884fa7
AH
432018-02-19 Alan Hayward <alan.hayward@arm.com>
44
45 * Makefile.in: Add common directory in build.
46 * configure.ac: Add common reference.
47 * configure: Regenerate.
48
de6242d3
MM
492018-02-09 Markus Metzger <markus.t.metzger@intel.com>
50
51 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
52 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
53 * spu-low.c (spu_target_ops): Likewise.
54 * win32-low.c (win32_target_ops): Likewise.
55 * server.c (supported_btrace_packets): Report packets unconditionally.
56 * target.h (target_ops) <supports_btrace>: Remove.
57 (target_supports_btrace): Remove.
58
9ee23a85
MM
592018-02-09 Markus Metzger <markus.t.metzger@intel.com>
60
61 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
62 (handle_btrace_disable): Change return type to void. Use exceptions
63 to report errors.
64 (handle_btrace_general_set): Catch exception and copy message to
65 return message.
66
8ce47547
TT
672018-02-08 Tom Tromey <tom@tromey.com>
68
69 * linux-low.c (install_software_single_step_breakpoints): Use
70 make_scoped_restore.
71 * inferiors.c (make_cleanup_restore_current_thread): Remove.
72 (do_restore_current_thread_cleanup): Remove.
73 * gdbthread.h (make_cleanup_restore_current_thread): Don't
74 declare.
75
45dd3607
TT
762018-02-08 Tom Tromey <tom@tromey.com>
77
78 * mem-break.c (set_raw_breakpoint_at): Use
79 gdb::unique_xmalloc_ptr.
80
e671cd59
PA
812018-01-30 Pedro Alves <palves@redhat.com>
82
83 PR gdb/13211
84 * target.c (target_terminal::terminal_state): Rename to ...
85 (target_terminal::m_terminal_state): ... this.
86
a0aad537
JC
872018-01-19 James Clarke <jrtc27@jrtc27.com>
88
89 * linux-low.c (handle_extended_wait): Surround call to
90 thread_db_notice_clone with #ifdef USE_THREAD_DB.
91
4d9b86e1
SM
922018-01-17 Simon Marchi <simon.marchi@ericsson.com>
93
94 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
95 linux_ptrace_attach_fail_reason_string now returning an
96 std::string.
97 (linux_attach): Likewise.
98 * thread-db.c (attach_thread): Likewise.
99
f517c180
EA
1002018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
101
102 PR gdb/21559
103 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
104 checking for fs_base/gs_base fields in struct user_regs_struct.
105 * configure: Regenerate.
106
9a70f35c
YQ
1072018-01-16 Yao Qi <yao.qi@linaro.org>
108
109 PR gdb/18749
110 * linux-low.c (fetch_register): Call supply_register instead of
111 error.
112
605fd3c6
YQ
1132018-01-08 Yao Qi <yao.qi@linaro.org>
114 Simon Marchi <simon.marchi@ericsson.com>
115
116 * Makefile.in (OBS): Remove selftest.o.
117 * configure.ac: Set srv_selftest_objs if $development is true.
118 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
119 * configure: Re-generated.
120 * server.c (captured_main): Wrap variable selftest_filter with
121 GDB_SELF_TEST.
122
2cc05030
SM
1232018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
124
125 * server.c (parse_debug_format_options): Return std::string.
126 (handle_monitor_command, captured_main): Adjust.
127
e379cee6
PA
1282018-01-05 Pedro Alves <palves@redhat.com>
129
130 PR gdb/18653
131 * server.c (captured_main): Pass quiet=false to
132 save_original_signals_state.
133
82e1e79a
JB
1342018-01-01 Joel Brobecker <brobecker@adacore.com>
135
136 * gdbreplay.c (gdbreplay_version): Update copyright year in
137 version message.
138 * server.c (gdbserver_version): Likewise.
139
8e481c3b
TT
1402017-12-08 Tom Tromey <tom@tromey.com>
141
142 * ax.c (ax_printf): Update.
143
a8806230
YQ
1442017-12-07 Yao Qi <yao.qi@linaro.org>
145
146 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
147 aarch64_linux_read_description.
148 * linux-amd64-ipa.c (idx2mask): New array.
149 (get_ipa_tdesc): Move idx2mask out.
150 (initialize_low_tracepoint): Initialize target descriptions.
151 * linux-i386-ipa.c (idx2mask): New array.
152 (get_ipa_tdesc): Move idx2mask out.
153 (initialize_low_tracepoint): Initialize target descriptions.
154
d4a0e8b5
SM
1552017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
156
157 * tdesc.c (struct tdesc_type): Change return type.
158 (tdesc_add_flag): Change parameter type.
159 (tdesc_add_bitfield): Likewise.
160 (tdesc_add_field): Likewise.
161 (tdesc_set_struct_size): Likewise.
162
798a7429
SM
1632017-12-05 Simon Marchi <simon.marchi@ericsson.com>
164
165 * regcache.c (registers_to_string): Remove unused variable.
166
c0e15c9b
SM
1672017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
168
169 * inferiors.c (for_each_inferior_with_data): Remove.
170 * inferiors.h (for_each_inferior_with_data): Remove.
171 * server.c (handle_qxfer_threads_worker): Change parameter type.
172 (handle_qxfer_threads_proper): Use for_each_thread.
173
f0045347
SM
1742017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
175
176 * inferiors.c (for_each_inferior): Remove.
177 (clear_inferiors): Use for_each_thread.
178 * inferiors.h (for_each_inferior): Remove.
179 * linux-low.c (linux_wait_for_event_filtered): Use
180 for_each_thread.
181 (linux_stabilize_threads): Likewise.
182 * regcache.c (regcache_release): Likewise.
183 * server.c (gdb_wants_all_threads_stopped): Likewise.
184 (clear_pending_status_callback): Remove.
185 (handle_status): Use for_each_thread.
186 (captured_main): Likewise.
187 * win32-low.c (child_init_thread_list): Likewise.
188 (win32_clear_inferiors): Likewise.
189 (fake_breakpoint_event): Likewise.
190
9521758b
SM
1912017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
192
193 * inferiors.h (find_inferior): Remove.
194 * inferiors.c (find_inferior): Remove.
195
8f86d7aa
SM
1962017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
197
198 * linux-low.c (resume_status_pending_p): Update comment.
199 (need_step_over_p): Update comment.
200
e2b44075
SM
2012017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
202
203 * linux-low.c (proceed_one_lwp): Return void, change parameter
204 type.
205 (unsuspend_and_proceed_one_lwp): Likewise.
206 (proceed_all_lwps): Use for_each_thread.
207 (unstop_all_lwps): Likewise.
208
c80825ff
SM
2092017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
210
211 * linux-low.c (linux_resume_one_thread): Return void, take
212 parameter directly.
213 (linux_resume): Use for_each_thread.
214
df3e4dbe
SM
2152017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
216
217 * linux-low.c (send_sigstop_callback): Return void, change
218 parameter type. Rename to...
219 (send_sigstop): ... this.
220 (suspend_and_send_sigstop_callback): Return void, change parameter
221 type. Rename to...
222 (suspend_and_send_sigstop): ... this.
223 (stop_all_lwps): Use for_each_thread.
224
5a6b0a41
SM
2252017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
226
227 * linux-low.c (lwp_running): Return bool, remove unused
228 argument.
229 (linux_stabilize_threads): Use find_thread.
230
39a64da5
SM
2312017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
232
233 * linux-low.c (select_singlestep_lwp_callback): Remove.
234 (count_events_callback): Remove.
235 (select_event_lwp_callback): Remove.
236 (select_event_lwp): Use find_thread/for_each_thread.
237
a1385b7b
SM
2382017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
239
240 * linux-low.c (not_stopped_callback): Return bool, take filter
241 argument directly.
242 (linux_wait_for_event_filtered): Use find_thread.
243 (linux_wait_1): Likewise.
244
454296a2
SM
2452017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
246
247 * linux-low.c (same_lwp): Remove.
248 (find_lwp_pid): Use find_thread.
249
6b2a85da
SM
2502017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
251
252 * linux-low.c (delete_lwp_callback): Remove.
253 (linux_mourn): Use for_each_thread.
254
798a38e8
SM
2552017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
256
257 * linux-low.c (linux_detach_lwp_callback): Return void, remove
258 args parameter, don't check for pid.
259 (linux_detach): Use for_each_thread.
260
e4eb0dec
SM
2612017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
262
263 * linux-low.c (struct counter): Remove.
264 (second_thread_of_pid_p): Remove.
265 (last_thread_of_process_p): Use find_thread.
266
83e1b6c1
SM
2672017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
268
269 * inferiors.c (find_inferior_in_random): Remove.
270 * inferiors.h (find_inferior_in_random): Remove.
271 * linux-low.c (status_pending_p_callback): Return bool, accept
272 parameter ptid directly.
273 (linux_wait_for_event_filtered): Use find_thread_in_random.
274 (linux_wait_1): Likewise.
275
8dc7b443
SM
2762017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
277
278 * inferiors.c (find_inferior_id): Remove.
279 (find_thread_ptid): Move implemention from find_inferior_id to
280 here.
281 * inferiors.h (find_inferior_id): Remove.
282 * server.c (handle_status): Use find_thread_ptid.
283 (process_serial_event): Likewise.
284 * thread-db.c (find_one_thread): Likewise.
285 (thread_db_thread_handle): Likewise.
286 * win32-low.c (thread_rec): Likewise.
287 (child_delete_thread): Likewise.
288 (win32_thread_alive): Likewise.
289 (get_child_debug_event): Likewise.
290
da25033c
SM
2912017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
292
293 * linux-mips-low.c (update_watch_registers_callback): Return
294 void, remove pid_p parameter, don't check for pid.
295 (mips_insert_point, mips_remove_point): Use for_each_thread.
296
c91bb56b
SM
2972017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
298
299 * lynx.low (lynx_delete_thread_callback): Remove.
300 (lynx_mourn): Use for_each_thread.
301
634a3254
SM
3022017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
303
304 * regcache.c (regcache_invalidate_one): Remove.
305 (regcache_invalidate_pid): use for_each_thread.
306
41272101
TT
3072017-11-26 Tom Tromey <tom@tromey.com>
308
309 * linux-low.c (linux_create_inferior): Update.
310
f5291a6f
UW
3112017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
312
313 * spu-low.c (spu_create_inferior): Fix typo in argument name.
314
6654d750
AH
3152017-11-24 Alan Hayward <alan.hayward@arm.com>
316
317 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
318 * linux-aarch64-low.c (initialize_low_arch): Call init func.
319 * linux-aarch64-tdesc-selftest.c: New file.
320 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
321
3222017-11-24 Alan Hayward <alan.hayward@arm.com>
323
324 * configure.srv: Add new file.
325 * linux-aarch64-low.c (initialize_low_arch): Call init func.
326 * linux-aarch64-tdesc-selftest.c: New file.
327 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
328
49bdb7ee
AH
3292017-11-24 Alan Hayward <alan.hayward@arm.com>
330
331 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
332 * linux-aarch64-low.c (initialize_low_arch): Remove init.
333 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
334
d6d7ce56
AH
3352017-11-24 Alan Hayward <alan.hayward@arm.com>
336
337 * configure.srv: Add new files.
338 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
339 aarch64_linux_read_description.
340 * linux-aarch64-low.c (aarch64_linux_read_description):
341 Merge with aarch64_arch_setup.
342 (aarch64_arch_setup): Call aarch64_linux_read_description.
343 * linux-aarch64-tdesc.c: New file.
344 * linux-aarch64-tdesc.h: New file.
345
506fe5f4
YQ
3462017-11-24 Yao Qi <yao.qi@linaro.org>
347
348 * configure.srv: Set $srv_regobj for tic6x-linux.
349 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
350 (tic6x_read_description): Move some code to tic6x_arch_setup.
351 (tic6x_tdesc_test): New function.
352 (initialize_low_arch): Call selftests::register_test.
353
29f9a567
YQ
3542017-11-22 Yao Qi <yao.qi@linaro.org>
355
356 * remote-utils.c (prepare_resume_reply): Use memcpy.
357
578290ec
SM
3582017-11-19 Simon Marchi <simon.marchi@ericsson.com>
359
360 * linux-low.c (kill_one_lwp_callback): Return void, take
361 argument directly, don't filter on pid.
362 (linux_kill): Use for_each_thread.
363
eca55aec
SM
3642017-11-19 Simon Marchi <simon.marchi@ericsson.com>
365
366 * linux-low.c (need_step_over_p): Return bool, remove dummy
367 argument.
368 (linux_resume, proceed_all_lwps): Use find_thread.
369
25c28b4d
SM
3702017-11-19 Simon Marchi <simon.marchi@ericsson.com>
371
372 * linux-low.c (resume_status_pending_p): Return bool, remove
373 flag_p argument.
374 (linux_resume): Use find_thread.
375
5fdda392
SM
3762017-11-19 Simon Marchi <simon.marchi@ericsson.com>
377
378 * linux-low.c (struct thread_resume_array): Remove.
379 (linux_set_resume_request): Return void, take arguments
380 directly.
381 (linux_resume): Use for_each_thread.
382
fcb056a5
SM
3832017-11-19 Simon Marchi <simon.marchi@ericsson.com>
384
385 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
386 return bool, remove data argument.
387 (linux_stabilize_threads): Use find_thread.
388
139720c5
SM
3892017-11-19 Simon Marchi <simon.marchi@ericsson.com>
390
391 * linux-low.c (unsuspend_one_lwp): Remove.
392 (unsuspend_all_lwps): Use for_each_thread, inline code from
393 unsuspend_one_lwp.
394
6d1e5673
SM
3952017-11-19 Simon Marchi <simon.marchi@ericsson.com>
396
397 * gdbthread.h (find_thread): Add overload with ptid_t filter.
398 * linux-low.c (struct iterate_over_lwps_args): Remove.
399 (iterate_over_lwps_filter): Remove.
400 (iterate_over_lwps): Use find_thread.
401
bbf550d5
SM
4022017-11-19 Simon Marchi <simon.marchi@ericsson.com>
403
404 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
405 (linux_handle_new_gdb_connection): Use for_each_thread, inline
406 code from reset_lwp_ptrace_options_callback.
407
00192f77
SM
4082017-11-19 Simon Marchi <simon.marchi@ericsson.com>
409
410 * linux-arm-low.c (struct update_registers_data): Remove.
411 (update_registers_callback): Return void, take arguments
412 directly, don't check thread's pid.
413 (arm_insert_point, arm_remove_point): Use for_each_thread.
414
2bee2b6c
SM
4152017-11-19 Simon Marchi <simon.marchi@ericsson.com>
416
417 * win32-low.c (continue_one_thread): Return void, take argument
418 directly.
419 (child_continue): Use for_each_thread.
420
0b360f19
SM
4212017-11-19 Simon Marchi <simon.marchi@ericsson.com>
422
423 * win32-i386-low.c (update_debug_registers_callback): Rename
424 to ...
425 (update_debug_registers): ... this, return void, remove pid_p arg.
426 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
427
f27866ba
SM
4282017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
429
430 * inferiors.h (struct process_info): Add constructor, initialize
431 fields..
432 <syscalls_to_catch>: Change type to std::vector<int>.
433 * inferiors.c (add_process): Allocate process_info with new.
434 (remove_process): Free process_info with delete.
435 * linux-low.c (handle_extended_wait): Adjust.
436 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
437 * server.c (handle_general_set): Adjust.
438
e849ea89
PA
4392017-11-16 Pedro Alves <palves@redhat.com>
440
441 * remote-utils.c (remote_close): Block SIGIO signals instead of
442 uninstalling the SIGIO handler.
443
1d0aa65c
AH
4442017-11-16 Alan Hayward <alan.hayward@arm.com>
445
446 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
447
3491a34c
YQ
4482017-11-16 Yao Qi <yao.qi@linaro.org>
449
450 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
451 (tic6x_store_gregset): Likewise.
452 (tic6x_usrregs_info): Move it up.
453
a602f924
AH
4542017-11-15 Alan Hayward <alan.hayward@arm.com>
455
456 * Makefile.in: Update arch rules.
457 * configure.srv: Explicitly mark arch/ files.
458
5616b6c3
AS
4592017-11-13 Andreas Schwab <schwab@suse.de>
460
461 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
462 function.
463 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
464
d1928160
PA
4652017-11-06 Pedro Alves <palves@redhat.com>
466
467 * config.in, configure: Regenerate.
468
bac608e7
SM
4692017-10-27 Simon Marchi <simon.marchi@ericsson.com>
470
471 * target.c (struct thread_search): Remove.
472 (thread_search_callback): Remove.
473 (prepare_to_access_memory): Use for_each_thread instead of
474 find_inferior. Inline code from thread_search_callback.
475
eaddb425
SM
4762017-10-27 Simon Marchi <simon.marchi@ericsson.com>
477
478 * server.c (struct visit_actioned_threads_data): Remove.
479 (visit_actioned_threads): Change prototype to take arguments
480 directly.
481 (resume): Use find_thread instead of find_inferior.
482
99078d34
SM
4832017-10-27 Simon Marchi <simon.marchi@ericsson.com>
484
485 * server.c (queue_stop_reply_callback): Change prototype, return
486 void.
487 (find_status_pending_thread_callback): Remove.
488 (handle_status): Replace find_inferior with find_thread and
489 for_each_thread.
490
cc628f3d
AH
4912017-10-25 Alan Hayward <alan.hayward@arm.com>
492
493 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
494 with REGNO.
495 (aarch64_store_gregset): Likewise.
496 (aarch64_fill_fpregset): Likewise.
497 (aarch64_store_fpregset): Likewise.
498
4d3bb80e
SM
4992017-10-21 Simon Marchi <simon.marchi@ericsson.com>
500
501 * gdbthread.h (find_thread, for_each_thread): New functions.
502 * inferiors.c (thread_of_pid): Remove.
503 (find_any_thread_of_pid): Use find_thread.
504 * linux-low.c (num_lwps): Use for_each_thread.
505
7a7cdfa0
YQ
5062017-10-17 Yao Qi <yao.qi@linaro.org>
507
508 * Makefile.in: Remove one rule.
509 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
510
e675d170
YQ
5112017-10-17 Yao Qi <yao.qi@linaro.org>
512
513 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
514 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
515
7eb4e0f9
YQ
5162017-10-17 Yao Qi <yao.qi@linaro.org>
517
518 * configure.srv: Rename arm.o with arch/arm.o.
519
60d6cfc9
YQ
5202017-10-17 Yao Qi <yao.qi@linaro.org>
521
522 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
523 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
524 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
525 (arch-i386.o, arch-amd64.o): Remove rules.
526 (arch/%.o): New rule.
527 Update POSTCOMPILE and COMPILE.pre.
528 * configure.ac: Invoke AC_CONFIG_COMMANDS.
529 * configure: Re-generated.
530 * configure.srv: Replace arch-i386.o with arch/i386.o.
531 Replace arch-amd64.o with arch/amd64.o.
532
5bfda255
YQ
5332017-10-16 Yao Qi <yao.qi@linaro.org>
534
535 * configure: Regenerated.
536
9c80ecd6
SM
5372017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
538
539 * inferiors.h: (struct inferior_list): Remove.
540 (struct inferior_list_entry); Remove.
541 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
542 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
543 get_first_inferior): Remove.
544 (for_each_inferior, for_each_inferior_with_data, find_inferior,
545 find_inferior_id, find_inferior_in_random): Change signature.
546 * inferiors.c (all_threads): Change type to
547 std::list<thread_info *>.
548 (get_thread): Remove macro.
549 (find_inferior, find_inferior_id): Change signature, implement
550 using find_thread.
551 (find_inferior_in_random): Change signature, implement using
552 find_thread_in_random.
553 (for_each_inferior, for_each_inferior_with_data): Change
554 signature, implement using for_each_thread.
555 (add_inferior_to_list, remove_inferior): Remove.
556 (add_thread, get_first_thread, thread_of_pid,
557 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
558 (get_first_inferior, one_inferior_p, clear_inferior_list):
559 Remove.
560 (clear_inferiors, get_thread_process): Update.
561 * gdbthread.h: Include <list>.
562 (struct thread_info) <entry>: Remove field.
563 <id>: New field.
564 (all_threads): Change type to std::list<thread_info *>.
565 (get_first_inferior): Add doc.
566 (find_thread, for_each_thread, find_thread_in_random): New
567 functions.
568 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
569 * linux-arm-low.c (update_registers_callback): Update.
570 * linux-low.c (second_thread_of_pid_p): Update.
571 (kill_one_lwp_callback, linux_detach_lwp_callback,
572 delete_lwp_callback, status_pending_p_callback, same_lwp,
573 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
574 iterate_over_lwps, not_stopped_callback,
575 resume_stopped_resumed_lwps, count_events_callback,
576 select_singlestep_lwp_callback, select_event_lwp_callback,
577 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
578 suspend_and_send_sigstop_callback, wait_for_sigstop,
579 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
580 lwp_running, linux_set_resume_request, resume_status_pending_p,
581 need_step_over_p, start_step_over, linux_resume_one_thread,
582 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
583 reset_lwp_ptrace_options_callback): Update.
584 * linux-mips-low.c (update_watch_registers_callback): Update.
585 * regcache.c (regcache_invalidate_one, regcache_invalidate):
586 Update.
587 (free_register_cache_thread_one): Remove.
588 (regcache_release): Update.
589 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
590 handle_qxfer_threads_worker): Update.
591 (handle_query): Update, use list iterator.
592 (visit_actioned_threads, handle_pending_status,
593 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
594 clear_pending_status_callback, set_pending_status_callback,
595 find_status_pending_thread_callback, handle_status,
596 process_serial_event): Update.
597 * target.c (thread_search_callback): Update.
598 * thread-db.c (thread_db_get_tls_address): Update.
599 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
600 Update.
601 * win32-i386-low.c (update_debug_registers_callback): Update.
602 * win32-low.c (delete_thread_info, child_delete_thread,
603 continue_one_thread, suspend_one_thread,
604 get_child_debug_event): Adjust.
605
9179355e
SM
6062017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
607
608 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
609 * inferiors.h: Include <list>.
610 (struct process_info) <entry>: Remove field.
611 <pid>: New field.
612 (pid_of): Change macro to function.
613 (ptid_of, lwpid_of): Remove macro.
614 (all_processes): Change type to std::list<process_info *>.
615 (ALL_PROCESSES): Remove macro.
616 (for_each_process, find_process): New function.
617 * inferiors.c (all_processes): Change type to
618 std::list<process_info *>.
619 (find_thread_process): Adjust.
620 (add_process): Likewise.
621 (remove_process): Likewise.
622 (find_process_pid): Likewise.
623 (get_first_process): Likewise.
624 (started_inferior_callback): Remove.
625 (have_started_inferiors_p): Adjust.
626 (attached_inferior_callback): Remove.
627 (have_attached_inferiors_p): Adjust.
628 * linux-low.c (check_zombie_leaders): Likewise.
629 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
630 (x86_linux_update_xmltarget): Adjust.
631 * server.c (handle_query): Likewise.
632 (gdb_reattached_process): Remove.
633 (handle_status): Adjust.
634 (kill_inferior_callback): Likewise.
635 (detach_or_kill_inferior): Remove.
636 (print_started_pid): Likewise.
637 (print_attached_pid): Likewise.
638 (detach_or_kill_for_exit): Update.
639 (process_serial_event): Likewise.
640 * linux-arm-low.c (arm_new_fork): Likewise.
641
c9cb8905
SM
6422017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
643
644 * dll.h: Include <list>.
645 (struct dll_info): Add constructor.
646 <entry>: Remove field.
647 (all_dlls): Change type to std::list<dll_info>.
648 * dll.c: Include <algorithm>.
649 (get_dll): Remove macro.
650 (all_dlls): Change type to std::list<dll_info *>.
651 (free_one_dll): Remove.
652 (match_dll): Likewise.
653 (loaded_dll): Adjust.
654 (unloaded_dll): Adjust to all_dlls type change, use
655 std::find_if. Inline code from match_dll.
656 (clear_dlls): Adjust to all_dlls type change.
657 * server.c (emit_dll_description): Remove.
658 (handle_qxfer_libraries): Adjust to all_dlls type change,
659 integrate emit_dll_description's functionality.
660
04ec7890
SM
6612017-10-12 Simon Marchi <simon.marchi@ericsson.com>
662
663 * linux-low.h (struct linux_target_ops) <delete_process>: New
664 field.
665 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
666 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
667 (struct linux_target_ops): Add delete_process callback.
668 * linux-arm-low.c (arm_delete_process): New.
669 (struct linux_target_ops): Add delete_process callback.
670 * linux-bfin-low.c (struct linux_target_ops): Likewise.
671 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
672 * linux-m32r-low.c (struct linux_target_ops): Likewise.
673 * linux-mips-low.c (mips_linux_delete_process): New.
674 (struct linux_target_ops): Add delete_process callback.
675 * linux-ppc-low.c (struct linux_target_ops): Likewise.
676 * linux-s390-low.c (struct linux_target_ops): Likewise.
677 * linux-sh-low.c (struct linux_target_ops): Likewise.
678 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
679 * linux-tile-low.c (struct linux_target_ops): Likewise.
680 * linux-x86-low.c (x86_linux_delete_process): New.
681 (struct linux_target_ops): Add delete_process callback.
682 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
683
466eecee
SM
6842017-10-12 Simon Marchi <simon.marchi@ericsson.com>
685
686 * linux-aarch64-low.c (the_low_target): Add thread delete
687 callback.
688 * linux-arm-low.c (arm_delete_thread): New function.
689 (the_low_target): Add thread delete callback.
690 * linux-bfin-low.c (the_low_target): Likewise.
691 * linux-crisv32-low.c (the_low_target): Likewise.
692 * linux-low.c (delete_lwp): Invoke delete_thread callback if
693 set.
694 * linux-low.h (struct linux_target_ops) <delete_thread>: New
695 field.
696 * linux-m32r-low.c (the_low_target): Add thread delete callback.
697 * linux-mips-low.c (mips_linux_delete_thread): New function.
698 (the_low_target): Add thread delete callback.
699 * linux-ppc-low.c (the_low_target): Likewise.
700 * linux-s390-low.c (the_low_target): Likewise.
701 * linux-sh-low.c (the_low_target): Likewise.
702 * linux-tic6x-low.c (the_low_target): Likewise.
703 * linux-tile-low.c (the_low_target): Likewise.
704 * linux-x86-low.c (the_low_target): Likewise.
705 * linux-xtensa-low.c (the_low_target): Likewise.
706
b79f7801
YZ
7072017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
708
709 * win32-low.c: Include "common-inferior.h".
710
bc3b087d
SDJ
7112017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
712
713 * inferiors.c (set_inferior_cwd): New function.
714 * server.c (handle_general_set): Handle QSetWorkingDir packet.
715 (handle_query): Inform that QSetWorkingDir is supported.
716 * win32-low.c (create_process): Pass the inferior's cwd to
717 CreateProcess.
718
d092c5a2
SDJ
7192017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
720
721 * inferiors.c (current_inferior_cwd): New global variable.
722 (get_inferior_cwd): New function.
723 * inferiors.h (struct process_info) <cwd>: New field.
724
7da0a886
SDJ
7252017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
726
727 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
728 (OBS): Add gdb_tilde_expand.o.
729
289a6840
SM
7302017-10-02 Simon Marchi <simon.marchi@ericsson.com>
731
732 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
733 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
734
256642e8
PA
7352017-09-29 Pedro Alves <palves@redhat.com>
736
737 * ax.c (gdb_parse_agent_expr): Constify.
738 * ax.h (gdb_parse_agent_expr): Constify.
739 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
740 Constify.
741 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
742 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
743 * remote-utils.h (read_ptid): Constify.
744 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
745 (process_point_options, process_serial_event): Constify.
746 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
747 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
748 (cmd_qtbuffer): Constify.
749
5b9ca4d4
PA
7502017-09-29 Pedro Alves <palves@redhat.com>
751
752 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
753 fails.
754
94c207e0
PA
7552017-09-29 Pedro Alves <palves@redhat.com>
756
757 * linux-low.c (handle_extended_wait): Pass parent thread instead
758 of process to thread_db_notice_clone.
759 * linux-low.h (thread_db_notice_clone): Replace parent process
760 parameter with parent thread parameter.
761 * thread-db.c (find_one_thread): Add comment.
762 (thread_db_notice_clone): Replace parent process parameter with
763 parent thread parameter. Temporarily switch to the parent thread.
764
75352e28
SDJ
7652017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
766
767 * gdbthread.h: Include "common-gdbthread.h".
768 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
769 "if" when validating the ptid.
770 * remote-utils.c: Include "gdbthread.h".
771 (prepare_resume_reply): Use "switch_to_thread".
772 * target.c (done_accessing_memory): Likewise.
773
ad339634
AA
7742017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
775
776 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
777 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
778 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
779 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
780 s390x-gs-linux64-ipa.o to ipa_obj.
781 * linux-s390-low.c (HWCAP_S390_GS): New define.
782 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
783 New functions.
784 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
785 (s390_arch_setup): Check for guarded-storage support and choose
786 appropriate tdesc.
787 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
788 init_registers_s390x_gs_linux64.
789 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
790 enum value.
791 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
792 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
793
cc4d742f
SM
7942017-09-22 Simon Marchi <simon.marchi@ericsson.com>
795
796 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
797
f6327dcb
KB
7982017-09-21 Kevin Buettner <kevinb@redhat.com>
799
800 * linux-low.h (struct lwp_info): Add new field, thread_handle.
801 (thread_db_thread_handle): Declare.
802 * linux-low.c (linux_target_ops): Initialize thread_handle.
803 * server.c (handle_qxfer_threads_worker): Add support for
804 "handle" attribute.
805 * target.h (struct target_ops): Add new function pointer,
806 thread_handle.
807 (target_thread_handle): Define.
808 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
809 field in lwp.
810 (thread_db_thread_handle): New function.
811
86299109
KB
8122017-09-21 Kevin Buettner <kevinb@redhat.com>
813
814 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
815 * linux-low.h (thread_db_notice_clone): Declare.
816 * thread-db.c (thread_db_notice_clone): New function.
817
f557a88a
PA
8182017-09-21 Pedro Alves <palves@redhat.com>
819
820 * server.c (gdb_read_memory, handle_status, process_serial_event)
821 (handle_serial_event, handle_target_event): Adjust to
822 set_desired_thread prototype change.
823 * target.c (set_desired_thread): Remove 'use_general' parameter
824 and adjust.
825 * target.h (set_desired_thread): Remove 'use_general' parameter.
826
223ffa71
TT
8272017-09-20 Tom Tromey <tom@tromey.com>
828
829 * target.c (target_terminal::terminal_state): Define.
830 (target_terminal::init): Rename from target_terminal_init.
831 (target_terminal::inferior): Rename from
832 target_terminal_inferior.
833 (target_terminal::ours): Rename from target_terminal_ours.
834 (target_terminal::ours_for_output, target_terminal::info): New.
835
04fd3ba9
SM
8362017-09-16 Simon Marchi <simon.marchi@ericsson.com>
837
838 * server.c (accumulate_file_name_length): Remove.
839 (emit_dll_description): Adjust to std::string change.
840 (handle_qxfer_libraries): Use std::string to hold document.
841
5e187554
SM
8422017-09-16 Simon Marchi <simon.marchi@ericsson.com>
843
844 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
845 return type of xml_escape_text.
846 * server.c (emit_dll_description): Likewise.
847
1526853e
SM
8482017-09-16 Simon Marchi <simon.marchi@ericsson.com>
849
850 * server.c (captured_main): Accept argument for --selftest.
851 Update run_tests call.
852 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
853 when registering selftests.
854
c4dfafab
SDJ
8552017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
856
857 * regcache.c (get_thread_regcache): Update code to use "std::vector"
858 instead of "VEC" for "target_desc.reg_defs".
859 (regcache_cpy): Likewise.
860 (registers_to_string): Likewise.
861 (registers_from_string): Likewise.
862 (find_regno): Likewise.
863 (supply_regblock): Likewise.
864 (regcache_raw_read_unsigned): Likewise.
865 * tdesc.c (init_target_desc): Likewise.
866 (tdesc_create_reg): Likewise.
867 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
868 (struct target_desc) <reg_defs>: Convert to "std::vector".
869 (target_desc): Do not initialize "reg_defs".
870 (~target_desc): Update code to use "std::vector" instead of "VEC"
871 for "target_desc.reg_defs".
872 (operator==): Likewise.
873
124aceb4
SM
8742017-09-15 Simon Marchi <simon.marchi@ericsson.com>
875
876 * inferiors.h (thread_to_gdb_id): Remove.
877 * inferiors.c (thread_to_gdb_id): Remove.
878 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
879 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
880 lynx_store_registers, lynx_read_memory, lynx_write_memory):
881 Likewise.
882 * nto-low.c (nto_fetch_registers, nto_store_registers,
883 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
884
96cde54f
SM
8852017-09-15 Simon Marchi <simon.marchi@ericsson.com>
886
887 * inferiors.h (gdb_id_to_thread_id): Remove.
888 * inferiors.c (gdb_id_to_thread_id): Remove.
889 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
890 removal. Move pid declaration closer to where it's used.
891
e8ca139e
SM
8922017-09-15 Simon Marchi <simon.marchi@ericsson.com>
893
894 * server.c (handle_detach): New function.
895 (process_serial_event): Move code out, call handle_detach.
896
f8a4e119
SM
8972017-09-15 Simon Marchi <simon.marchi@ericsson.com>
898
899 * server.c (require_running): Rename to ...
900 (require_running_or_return): ... this ...
901 (require_running_or_break): ... and this.
902 (handle_query, process_serial_event): Adjust.
903
0eb0a407
SM
9042017-09-15 Simon Marchi <simon.marchi@ericsson.com>
905
906 * linux-low.c (linux_set_resume_request): Remove unused
907 variables.
908
785922a5
SM
9092017-09-15 Simon Marchi <simon.marchi@ericsson.com>
910
911 * server.c (first_thread_of): Remove.
912 (process_serial_event): Replace usage of first_thread_of with
913 find_any_thread_of_pid.
914 * tracepoint.c (same_process_p): Remove.
915 (gdb_agent_about_to_close): Replace usage of same_process_p with
916 find_any_thread_of_pid.
917 * linux-x86-low.c (same_process_callback): Remove.
918 (x86_arch_setup_process_callback): Replace usage of
919 same_process_callback with find_any_thread_of_pid.
920 * thread-db.c (any_thread_of): Remove.
921 (switch_to_process): Replace usage of any_thread_of with
922 find_any_thread_of_pid.
923 * inferiors.c (thread_pid_matches_callback): Remove.
924 (find_thread_process): Adjust to use find_any_thread_of_pid.
925
a059f00c
SDJ
9262017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
927
928 * regcache.c (get_thread_regcache): Guard calls to "memset"
929 with "!VEC_empty".
930
cc397f3a
SDJ
9312017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
932
933 * linux-low.c (handle_extended_wait): Use
934 "allocate_target_description" instead of "XNEW".
935 * linux-x86-low.c (initialize_low_arch): Likewise.
936
22916b07
YQ
9372017-09-05 Yao Qi <yao.qi@linaro.org>
938
939 * configure.srv (srv_i386_regobj): Remove.
940 (srv_amd64_regobj): Remove.
941 (srv_regobj): Set it to "" for x86 non-linux targets.
942 * linux-x86-tdesc.c (i386_linux_read_description):
943 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
944 (init_registers_i386): Remove the declaration.
945 (tdesc_i386): Remove the declaration.
946 (lynx_i386_arch_setup): Call i386_create_target_description.
947 * nto-x86-low.c: Likewise.
948 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
949 [!__x86_64__]: include arch/i386.h.
950 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
951
38602d55
YQ
9522017-09-05 Yao Qi <yao.qi@linaro.org>
953
954 * configure.srv (srv_amd64_linux_xmlfiles): Remove
955 i386/amd64-XXX-linux from it.
956
44b886ff
YQ
9572017-09-05 Yao Qi <yao.qi@linaro.org>
958
959 * configure.srv: Empty srv_amd64_linux_regobj if $development is
960 false.
961 (ipa_amd64_linux_regobj): Remove.
962 (ipa_x32_linux_regobj): Remove.
963
b4570e4b
YQ
9642017-09-05 Yao Qi <yao.qi@linaro.org>
965
966 * Makefile.in (arch-amd64.o): New rule.
967 * configure.srv: Append arch-amd64.o.
968 * linux-amd64-ipa.c: Include common/x86-xstate.h.
969 (get_ipa_tdesc): Call amd64_linux_read_description.
970 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
971 and init_registers_amd64_XXX.
972 * linux-x86-low.c (x86_linux_read_description): Call
973 amd64_linux_read_description.
974 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
975 (initialize_low_arch): Don't call init_registers_x32_XXX and
976 init_registers_amd64_XXX.
977 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
978 and tdesc_amd64_XXX.
979 [__x86_64__] (amd64_tdesc_test): New function.
980 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
981 and init_registers_amd64_XXX.
982 * linux-x86-tdesc.c: Include arch/amd64.h.
983 (xcr0_to_tdesc_idx): New function.
984 (i386_linux_read_description): New function.
985 (amd64_get_ipa_tdesc_idx): New function.
986 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
987 (amd64_get_ipa_tdesc): Declare.
988
d1f28ea2
YQ
9892017-09-05 Yao Qi <yao.qi@linaro.org>
990
991 * configure.srv (srv_i386_linux_xmlfiles): Remove
992 i386/i386-XXX-linux.xml from it.
993
25a93583
YQ
9942017-09-05 Yao Qi <yao.qi@linaro.org>
995
996 * configure.srv: Set srv_i386_linux_regobj empty if $development
997 is false.
998 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
999 initialize_low_tdesc.
1000 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1001 with #if initialize_low_tdesc.
1002 * linux-x86-tdesc-selftest.c: New file.
1003 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1004
5f035c07
YQ
10052017-09-05 Yao Qi <yao.qi@linaro.org>
1006
1007 * Makefile.in (arch-i386.o): New rule.
1008 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1009 (x86_64-*-linux*): Likewise.
1010 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1011 include arch/i386.h.
1012 (i386_linux_read_description): Remove code and call
1013 i386_create_target_description.
1014 * tdesc.c (allocate_target_description): New function.
1015 * tdesc.h (set_tdesc_architecture): Remove declaration.
1016 (set_tdesc_osabi): Likewise.
1017
0abe8a89
YQ
10182017-09-05 Yao Qi <yao.qi@linaro.org>
1019
1020 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1021 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1022 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1023 .xmltarget.
1024 * server.c (get_features_xml): Call tdesc_get_features_xml.
1025 * tdesc.c (set_tdesc_architecture): New function.
1026 (set_tdesc_osabi): New function.
1027 (tdesc_get_features_xml): New function.
1028 (tdesc_create_feature): Add an argument.
1029 * tdesc.h (struct target_desc) <features>: New field.
1030 <arch, osabi>: New field.
1031 (~target_desc): xfree features, arch, and osabi.
1032 (target_desc::oerator==): Don't compare .xmltarget.
1033 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1034 (set_tdesc_osabi): Likewise.
1035 (tdesc_get_features_xml): Likewise.
1036
0a188386
YQ
10372017-09-05 Yao Qi <yao.qi@linaro.org>
1038
1039 * linux-x86-tdesc.c: Include selftest.h.
1040 (i386_tdesc_test): New function.
1041 (initialize_low_tdesc): Call selftests::register_test.
1042 * tdesc.h: Include regdef.h.
1043 (target_desc): Override operator == and !=.
1044
f49ff000
YQ
10452017-09-05 Yao Qi <yao.qi@linaro.org>
1046
1047 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1048 (ipa_obj): Likewise.
1049 * linux-i386-ipa.c: Include common/x86-xstate.h
1050 (get_ipa_tdesc): Call i386_linux_read_description.
1051 (initialize_low_tracepoint): Don't call init_registers_XXX
1052 functions, call initialize_low_tdesc instead.
1053 * linux-x86-low.c (x86_linux_read_description): Call
1054 i386_linux_read_description.
1055 (initialize_low_arch): Don't call init_registers_i386_XXX
1056 functions, call initialize_low_tdesc.
1057 * linux-x86-tdesc.c: New file.
1058 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1059 (i386_get_ipa_tdesc_idx): Declare.
1060 (i386_get_ipa_tdesc): Declare.
1061 (initialize_low_tdesc): Declare.
1062
2b68ef2f
YQ
10632017-09-05 Yao Qi <yao.qi@linaro.org>
1064
1065 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1066 instead of 0.
1067
f7000548
YQ
10682017-09-05 Yao Qi <yao.qi@linaro.org>
1069
1070 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1071 * regcache.c (get_thread_regcache): Use VEC_length.
1072 (init_register_cache): Likewise.
1073 (regcache_cpy): Likewise.
1074 (registers_to_string): Iterate reg_defs via VEC_iterate.
1075 (find_regno): Likewise.
1076 (find_register_by_number): Use VEC_index.
1077 (register_size): Call find_register_by_number.
1078 (register_data): Call find_register_by_number.
1079 (supply_regblock): Use VEC_length.
1080 (regcache_raw_read_unsigned): Likewise.
1081 * tdesc.c (init_target_desc): Iterate reg_defs via
1082 VEC_iterate.
1083 (default_description): Update initializer.
1084 (copy_target_description): Don't update field num_registers.
1085 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1086 <num_registers>: Remove.
1087
50a421ac
SM
10882017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1089
1090 * Makefile.in (.SECONDARY): Define target.
1091
23fdd69e
SM
10922017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1093
1094 * linux-low.c (linux_wait_1): Adjust.
1095 * server.c (queue_stop_reply_callback): Adjust.
1096
0a2dde4a
SDJ
10972017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1098
1099 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1100 QEnvironmentUnset and QEnvironmentReset packets.
1101 (handle_query): Inform remote that QEnvironmentHexEncoded,
1102 QEnvironmentUnset and QEnvironmentReset are supported.
1103
6afd337d
SM
11042017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1105
1106 * inferiors.h (inferior_target_data): Rename to ...
1107 (thread_target_data): ... this.
1108 (inferior_regcache_data): Rename to ...
1109 (thread_regcache_data): ... this.
1110 (set_inferior_regcache_data): Rename to ...
1111 (set_thread_regcache_data): ... this.
1112 * inferiors.c (inferior_target_data): Rename to ...
1113 (thread_target_data): ... this.
1114 (inferior_regcache_data): Rename to ...
1115 (thread_regcache_data): ... this.
1116 (set_inferior_regcache_data): Rename to ...
1117 (set_thread_regcache_data): ... this.
1118 (free_one_thread): Update.
1119 * linux-low.h (get_thread_lwp): Update.
1120 * regcache.c (get_thread_regcache): Update.
1121 (regcache_invalidate_thread): Update.
1122 (free_register_cache_thread): Update.
1123 * win32-i386-low.c (update_debug_registers_callback): Update.
1124 (win32_get_current_dr): Update.
1125 * win32-low.c (thread_rec): Update.
1126 (delete_thread_info): Update.
1127 (continue_one_thread): Update.
1128 (suspend_one_thread): Update.
1129
a160cc46
SM
11302017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1131
1132 * inferiors.c (set_inferior_target_data): Remove.
1133 * inferiors.h (set_inferior_target_data): Remove.
1134
6d580b63
YQ
11352017-08-18 Yao Qi <yao.qi@linaro.org>
1136
1137 * Makefile.in (OBS): Add selftest.o.
1138 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1139 * configure, config.in: Re-generated.
1140 * server.c: Include common/sefltest.h.
1141 (captured_main): Handle option --selftest.
1142
f5a29eb0
YQ
11432017-08-09 Yao Qi <yao.qi@linaro.org>
1144
1145 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1146 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1147 i386-avx-mpx.o and i386-mmx.o.
1148 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1149 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1150 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1151 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1152 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1153 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1154 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1155 i386/amd64-avx-mpx.xml.
1156
57757c2f
YQ
11572017-08-09 Yao Qi <yao.qi@linaro.org>
1158
1159 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1160 and x32-avx-avx512.o.
1161 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1162 i386/x32-avx-avx512.xml.
1163
229d26fc
SM
11642017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1165
1166 * tracepoint.h (enum class fast_tpoint_collect_result): New
1167 enumeration.
1168 (fast_tracepoint_collecting): Change return type to
1169 fast_tpoint_collect_result.
1170 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1171 * linux-low.h: Include tracepoint.h.
1172 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1173 fast_tpoint_collect_result.
1174 * linux-low.c (handle_tracepoints): Adjust.
1175 (linux_fast_tracepoint_collecting): Change return type to
1176 fast_tpoint_collect_result.
1177 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1178 linux_wait_1, stuck_in_jump_pad_callback,
1179 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1180 proceed_one_lwp): Adjust to type change.
1181
2e1e43e1
YQ
11822017-07-10 Yao Qi <yao.qi@linaro.org>
1183
1184 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1185
adc764e7
YQ
11862017-06-29 Yao Qi <yao.qi@linaro.org>
1187
1188 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1189 Remove.
1190 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1191
a206891a
SM
11922017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1193
1194 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1195
9a6c7d9c
SDJ
11962017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1197
1198 * linux-low.c (linux_create_inferior): Adjust code to access the
1199 environment information via 'gdb_environ' class.
1200 * lynx-low.c (lynx_create_inferior): Likewise.
1201 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1202 (get_environ): Return a pointer to 'our_environ'.
1203 (captured_main): Initialize 'our_environ'.
1204 * server.h (get_environ): Adjust prototype.
1205 * spu-low.c (spu_create_inferior): Adjust code to access the
1206 environment information via 'gdb_environ' class.
1207
ae3e2ccf
SM
12082017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1209
1210 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1211 usage of "register" keyword.
1212
3e019bdc
SM
12132017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1214
1215 * configure: Re-generate.
1216
8465943a
SM
12172017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1218
1219 * configure: Re-generate.
1220
cf0dd6f0
SM
12212017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1222
1223 * Makefile.in (COMPILE.pre): Add "-x c++".
1224
9845682b
SDJ
12252017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1226
1227 * fork-child.c: Conditionally include <signal.h>.
1228
aefd8b33
SDJ
12292017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1230
1231 * server.c (handle_general_set): Handle new packet
1232 "QStartupWithShell".
1233 (handle_query): Add "QStartupWithShell" to the list of supported
1234 packets.
1235 (gdbserver_usage): Add help text explaining the
1236 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1237 options.
1238 (captured_main): Recognize and act upon the presence of the new
1239 CLI options.
1240
2090129c
SDJ
12412017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1242 Pedro Alves <palves@redhat.com>
1243
1244 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1245 * configure: Regenerate.
1246 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1247 "fork-inferior.o".
1248 (i[34567]86-*-lynxos*): Likewise.
1249 (spu*-*-*): Likewise.
1250 * fork-child.c: New file.
1251 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1252 and "environ.h".
1253 (linux_ptrace_fun): New function.
1254 (linux_create_inferior): Adjust function prototype to reflect
1255 change on "target.h". Adjust function code to use
1256 "fork_inferior".
1257 (linux_request_interrupt): Delete "signal_pid".
1258 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1259 (lynx_ptrace_fun): New function.
1260 (lynx_create_inferior): Adjust function prototype to reflect
1261 change on "target.h". Adjust function code to use
1262 "fork_inferior".
1263 * nto-low.c (nto_create_inferior): Adjust function prototype and
1264 code to reflect change on "target.h". Update comments.
1265 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1266 "common-terminal.h" and "environ.h".
1267 (terminal_fd): Moved to fork-child.c.
1268 (old_foreground_pgrp): Likewise.
1269 (restore_old_foreground_pgrp): Likewise.
1270 (last_status): Make it global.
1271 (last_ptid): Likewise.
1272 (our_environ): New variable.
1273 (startup_with_shell): Likewise.
1274 (program_name): Likewise.
1275 (program_argv): Rename to...
1276 (program_args): ...this.
1277 (wrapper_argv): New variable.
1278 (start_inferior): Delete function.
1279 (get_exec_wrapper): New function.
1280 (get_exec_file): Likewise.
1281 (get_environ): Likewise.
1282 (prefork_hook): Likewise.
1283 (post_fork_inferior): Likewise.
1284 (postfork_hook): Likewise.
1285 (postfork_child_hook): Likewise.
1286 (handle_v_run): Update code to deal with arguments coming from the
1287 remote host. Update calls from "start_inferior" to
1288 "create_inferior".
1289 (captured_main): Likewise. Initialize environment variable. Call
1290 "have_job_control".
1291 * server.h (post_fork_inferior): New prototype.
1292 (get_environ): Likewise.
1293 (last_status): Declare.
1294 (last_ptid): Likewise.
1295 (signal_pid): Likewise.
1296 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1297 (spu_ptrace_fun): New function.
1298 (spu_create_inferior): Adjust function prototype to reflect change
1299 on "target.h". Adjust function code to use "fork_inferior".
1300 * target.c (target_terminal_init): New function.
1301 (target_terminal_inferior): Likewise.
1302 (target_terminal_ours): Likewise.
1303 * target.h: Include <vector>.
1304 (struct target_ops) <create_inferior>: Update prototype.
1305 (create_inferior): Update macro.
1306 * utils.c (gdb_flush_out_err): New function.
1307 * win32-low.c (win32_create_inferior): Adjust function prototype
1308 and code to reflect change on "target.h".
1309
043a4934
SDJ
13102017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1311
1312 * inferiors.c (switch_to_thread): New function.
1313
15652511
SDJ
13142017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1315
1316 * Makefile.in (SFILE): Add "common/job-control.c".
1317 (OBS): Add "job-control.o".
1318
21ea5acd
SDJ
13192017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1320
1321 * Makefile: Remove "@host_makefile_frag@".
1322
e13cb306
PA
13232017-05-05 Pedro Alves <palves@redhat.com>
1324
1325 * configure: Regenerate.
1326
c94fee56
SDJ
13272017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1328
1329 * configure: Regenerate.
1330
a0ff9e1a
SM
13312017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1332
1333 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1334 software_single_step change of return type to
1335 std::vector<CORE_ADDR>.
1336 * linux-low.c (install_software_single_step_breakpoints):
1337 Likewise.
1338 * linux-low.h (install_software_single_step_breakpoints):
1339 Likewise.
1340
be628ab8
SDJ
13412017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1342
1343 * remote-utils.c: Include "gdb_termios.h" instead of
1344 "terminal.h".
1345 * terminal.h: Delete file.
1346
7c5ded6a
SDJ
13472017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1348
1349 * server.c: Include <vector>.
1350 <program_argv, wrapper_argv>: Convert to std::vector.
1351 (start_inferior): Rewrite function to use C++.
1352 (handle_v_run): Likewise. Update code that calculates the argv
1353 based on the vRun packet; use C++.
1354 (captured_main): Likewise.
1355
436252de
SM
13562017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1357
1358 * server.c (handle_v_cont): Initialize thread_resume::thread
1359 with null_ptid.
1360
9bf2a700
PA
13612017-04-05 Pedro Alves <palves@redhat.com>
1362
1363 * configure: Regenerate.
1364
a121b7c1
PA
13652017-04-05 Pedro Alves <palves@redhat.com>
1366
1367 * gdbreplay.c (sync_error): Constify.
1368 * linux-x86-low.c (push_opcode): Constify.
1369
21c8a587
PA
13702017-04-05 Pedro Alves <palves@redhat.com>
1371
1372 * win32-low.c (get_child_debug_event)
1373 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1374 Report TARGET_WAITKIND_SPURIOUS instead.
1375
fb32b4f7
PA
13762017-04-05 Pedro Alves <palves@redhat.com>
1377
1378 * remote-utils.c (remote_prepare, remote_open): Constify.
1379 * remote-utils.h (remote_prepare, remote_open): Constify.
1380 * server.c (captured_main): Constify 'port' handling.
1381
65dd1e59
SM
13822017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1383
1384 * Makefile.in (clean): Clear .deps.
1385
8fa5b777
SM
13862017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1387
1388 * .gitignore: Remove generated files, replace with wildcard.
1389 * (clean): Replace removal of generated files with wildcard.
1390 (version.c): Replace with...
1391 (version-generated.c): ...this.
1392 (xml-builtin.c): Replace with...
1393 (xml-builtin-generated.c): ...this.
1394 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1395 (%.c: *regformats*): Replace with...
1396 (%-generated.c: *regformats*): ...this.
1397
a12e714b
MF
13982017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1399
1400 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1401 (xtensa_fill_gregset): Call collect_register_by_name for
1402 threadptr register.
1403 (xtensa_store_gregset): Call supply_register_by_name for
1404 threadptr register.
1405
1a09b50a
MF
14062017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1407
1408 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1409 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1410 (xtensa_store_gregset): Call supply_register for all registers in
1411 a0_regnum..a0_regnum + C0_NREGS range.
1412
1a01e7c6
SM
14132017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1414
1415 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1416 (ax-ipa.o: ax.c): Remove.
1417 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1418 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1419 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1420 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1421 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1422
36bc18a8
SM
14232017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1424
1425 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1426 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1427 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1428 (errors-ipa.o: ../common/errors.c): Remove.
1429 (format-ipa.o: ../common/format.c): Remove.
1430 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1431
a8ebe3d5
SM
14322017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1433
1434 * Makefile.in (%-ipa.o: %.c): New rule.
1435 (tracepoint-ipa.o: tracepoint.c): Remove.
1436 (utils-ipa.o: utils.c): Remove.
1437 (remote-utils-ipa.o: remote-utils.c): Remove.
1438 (regcache-ipa.o: regcache.c): Remove.
1439 (i386-linux-ipa.o: i386-linux.c): Remove.
1440 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1441 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1442 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1443 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1444 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1445 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1446 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1447 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1448 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1449 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1450 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1451 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1452 (aarch64-ipa.o: aarch64.c): Remove.
1453 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1454 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1455 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1456 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1457 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1458 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1459 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1460 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1461 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1462 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1463 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1464 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1465 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1466 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1467 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1468 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1469 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1470 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1471 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1472 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1473 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1474 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1475 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1476 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1477 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1478 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1479 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1480 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1481 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1482 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1483 (tdesc-ipa.o: tdesc.c): Remove.
1484 (x32-linux-ipa.o: x32-linux.c): Remove.
1485 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1486 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1487
50cfacb7
SM
14882017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1489
1490 * Makefile.in (%.o: ../arch/%.c): New rule.
1491 (arm.o: ../arch/arm.c): Remove.
1492 (arm-linux.o: ../arch/arm-linux.c): Remove.
1493 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1494 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1495
c5a22423
SM
14962017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1497
1498 * Makefile.in (%.o: ../nat/%.c): New rule.
1499 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1500 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1501 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1502 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1503 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1504 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1505 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1506 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1507 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1508 (linux-personality.o: ../nat/linux-personality.c): Remove.
1509 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1510 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1511 (x86-linux.o: ../nat/x86-linux.c): Remove.
1512 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1513 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1514
6bda016b
SM
15152017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1516
1517 * Makefile.in (%.o: ../common/%.c): New rule.
1518 (signals.o: ../common/signals.c): Remove.
1519 (print-utils.o: ../common/print-utils.c): Remove.
1520 (rsp-low.o: ../common/rsp-low.c): Remove.
1521 (common-utils.o: ../common/common-utils.c): Remove.
1522 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1523 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1524 (vec.o: ../common/vec.c): Remove.
1525 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1526 (xml-utils.o: ../common/xml-utils.c): Remove.
1527 (ptid.o: ../common/ptid.c): Remove.
1528 (buffer.o: ../common/buffer.c): Remove.
1529 (format.o: ../common/format.c): Remove.
1530 (filestuff.o: ../common/filestuff.c): Remove.
1531 (agent.o: ../common/agent.c): Remove.
1532 (errors.o: ../common/errors.c): Remove.
1533 (environ.o: ../common/environ.c): Remove.
1534 (common-debug.o: ../common/common-debug.c): Remove.
1535 (cleanups.o: ../common/cleanups.c): Remove.
1536 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1537 (fileio.o: ../common/fileio.c): Remove.
1538 (common-regcache.o: ../common/common-regcache.c): Remove.
1539 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1540 (new-op.o: ../common/new-op.c): Remove.
1541 (btrace-common.o: ../common/btrace-common.c): Remove.
1542
21122961
SM
15432017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1544
1545 * Makefile.in (%.o: ../target/%.c): New rule.
1546 (waitstatus.o: ../target/waitstatus.c): Remove.
1547
c362e621
SM
15482017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1549
1550 * Makefile.in
1551 (%.c: ../regformats/%.dat,
1552 (%.c: ../regformats/arm/%.dat,
1553 (%.c: ../regformats/i386/%.dat,
1554 (%.c: ../regformats/rs6000/%.dat): New rules.
1555 (aarch64.c): Remove.
1556 (reg-arm.c): Remove.
1557 (arm-with-iwmmxt.c): Remove.
1558 (arm-with-vfpv2.c): Remove.
1559 (arm-with-vfpv3.c): Remove.
1560 (arm-with-neon.c): Remove.
1561 (reg-bfin.c): Remove.
1562 (reg-cris.c): Remove.
1563 (reg-crisv32.c): Remove.
1564 (i386.c): Remove.
1565 (i386-linux.c): Remove.
1566 (i386-avx.c): Remove.
1567 (i386-avx-linux.c): Remove.
1568 (i386-avx-avx512.c): Remove.
1569 (i386-avx-avx512-linux.c): Remove.
1570 (i386-mpx.c): Remove.
1571 (i386-mpx-linux.c): Remove.
1572 (i386-avx-mpx-avx512-pku.c): Remove.
1573 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1574 (i386-avx-mpx.c): Remove.
1575 (i386-avx-mpx-linux.c): Remove.
1576 (i386-mmx.c): Remove.
1577 (i386-mmx-linux.c): Remove.
1578 (reg-ia64.c): Remove.
1579 (reg-m32r.c): Remove.
1580 (reg-m68k.c): Remove.
1581 (reg-cf.c): Remove.
1582 (mips-linux.c): Remove.
1583 (mips-dsp-linux.c): Remove.
1584 (mips64-linux.c): Remove.
1585 (mips64-dsp-linux.c): Remove.
1586 (nios2-linux.c): Remove.
1587 (powerpc-32.c): Remove.
1588 (powerpc-32l.c): Remove.
1589 (powerpc-altivec32l.c): Remove.
1590 (powerpc-cell32l.c): Remove.
1591 (powerpc-vsx32l.c): Remove.
1592 (powerpc-isa205-32l.c): Remove.
1593 (powerpc-isa205-altivec32l.c): Remove.
1594 (powerpc-isa205-vsx32l.c): Remove.
1595 (powerpc-e500l.c): Remove.
1596 (powerpc-64l.c): Remove.
1597 (powerpc-altivec64l.c): Remove.
1598 (powerpc-cell64l.c): Remove.
1599 (powerpc-vsx64l.c): Remove.
1600 (powerpc-isa205-64l.c): Remove.
1601 (powerpc-isa205-altivec64l.c): Remove.
1602 (powerpc-isa205-vsx64l.c): Remove.
1603 (s390-linux32.c): Remove.
1604 (s390-linux32v1.c): Remove.
1605 (s390-linux32v2.c): Remove.
1606 (s390-linux64.c): Remove.
1607 (s390-linux64v1.c): Remove.
1608 (s390-linux64v2.c): Remove.
1609 (s390-te-linux64.c): Remove.
1610 (s390-vx-linux64.c): Remove.
1611 (s390-tevx-linux64.c): Remove.
1612 (s390x-linux64.c): Remove.
1613 (s390x-linux64v1.c): Remove.
1614 (s390x-linux64v2.c): Remove.
1615 (s390x-te-linux64.c): Remove.
1616 (s390x-vx-linux64.c): Remove.
1617 (s390x-tevx-linux64.c): Remove.
1618 (tic6x-c64xp-linux.c): Remove.
1619 (tic6x-c64x-linux.c): Remove.
1620 (tic6x-c62x-linux.c): Remove.
1621 (reg-sh.c): Remove.
1622 (reg-sparc64.c): Remove.
1623 (reg-spu.c): Remove.
1624 (amd64.c): Remove.
1625 (amd64-linux.c): Remove.
1626 (amd64-avx.c): Remove.
1627 (amd64-avx-linux.c): Remove.
1628 (amd64-avx-avx512.c): Remove.
1629 (amd64-avx-avx512-linux.c): Remove.
1630 (amd64-mpx.c): Remove.
1631 (amd64-mpx-linux.c): Remove.
1632 (amd64-avx-mpx-avx512-pku.c): Remove.
1633 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1634 (amd64-avx-mpx.c): Remove.
1635 (amd64-avx-mpx-linux.c): Remove.
1636 (x32.c): Remove.
1637 (x32-linux.c): Remove.
1638 (x32-avx.c): Remove.
1639 (x32-avx-linux.c): Remove.
1640 (x32-avx-avx512.c): Remove.
1641 (x32-avx-avx512-linux.c): Remove.
1642 (reg-xtensa.c): Remove.
1643 (reg-tilegx.c): Remove.
1644 (reg-tilegx32.c): Remove.
1645
1672e0d9
SDJ
16462017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1647
1648 * Makefile.in (SFILES): Add "common/environ.c".
1649 (OBJS): Add "common/environ.h".
1650
239b6d10
WT
16512017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1652
1653 * configure.ac: Check if the fs_base and gs_base members of
1654 `struct user_regs_struct' exist.
1655 * config.in: Regenerated.
1656 * configure: Likewise.
1657
694b382c
AT
16582017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1659
1660 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1661 target_read_memory.
1662 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1663 (get_next_pcs_syscall_next_pc): Likewise.
1664
7dc53023
LM
16652016-12-23 Luis Machado <lgustavo@codesourcery.com>
1666
1667 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1668 * nto-x86-low.c: Likewise.
1669
ad02e4fe
SM
16702016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1671
1672 * Makefile.in: Include disable-implicit-rules.mk.
1673
dcb07cfa
PA
16742016-11-23 Pedro Alves <palves@redhat.com>
1675
1676 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1677 (debug_vprintf): Use std::chrono::steady_clock instead of
1678 gettimeofday. Use '.' instead of ':'.
1679 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1680 (get_timestamp): Use std::chrono::steady_clock instead of
1681 gettimeofday.
1682
8629c02c
SM
16832016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1684
1685 * Makefile.in: Fix whitespace formatting.
1686
b593ecca
SM
16872016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1688
1689 * Makefile.in (SFILES, OBS): Flatten list and order
1690 alphabetically.
1691
9986ba08
PA
16922016-11-23 Pedro Alves <palves@redhat.com>
1693
1694 * event-loop.c (handle_file_event): Use warning.
1695 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1696 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1697 Use warning.
1698
4eefa7bc
PA
16992016-11-23 Pedro Alves <palves@redhat.com>
1700
1701 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1702 output.
1703 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1704 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1705 debug_printf and debug_flush for debug output.
1706 * server.c (handle_general_set): Likewise.
1707 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1708 output.
1709
5443506e
SM
17102016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1711
1712 * Makefile.in (.c.o): Replace rule with ...
1713 (%.o: %.c): ... this one.
1714
3b165252
SM
17152016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1716
1717 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1718 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1719 make.
1720 * configure.ac: Remove checks for the make program.
1721 * configure: Re-generate.
1722
0bcda685
PA
17232016-10-28 Pedro Alves <palves@redhat.com>
1724
1725 * Makefile.in (CXX_DIALECT): Get from configure.
1726 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1727 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1728 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1729 * config.in: Regenerate.
1730 * configure: Regenerate.
1731
c3805894
YQ
17322016-10-27 Yao Qi <yao.qi@linaro.org>
1733
1734 * linux-low.c (linux_supports_range_stepping): Return true if
1735 can_software_single_step return true.
1736
89342618
YQ
17372016-10-27 Yao Qi <yao.qi@linaro.org>
1738
1739 * inferiors.c (find_inferior_in_random): New function.
1740 * inferiors.h (find_inferior_in_random): Declare.
1741 * linux-low.c (linux_wait_for_event_filtered): Call
1742 find_inferior_in_random instead of find_inferior.
1743
e3652c84
YQ
17442016-10-27 Yao Qi <yao.qi@linaro.org>
1745
1746 * linux-low.c (linux_wait_1): If single-step breakpoints are
1747 inserted, remove them.
1748
5a04c4cf
PA
17492016-10-26 Pedro Alves <palves@redhat.com>
1750
1751 * linux-low.c (handle_extended_wait): Link parent/child fork
1752 threads.
1753 (linux_wait_1): Unlink them.
1754 (linux_set_resume_request): Ignore resume requests for
1755 already-resumed and unhandled fork child threads.
1756 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1757 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1758 New functions.
1759 (handle_v_requests) <vCont>: Don't call require_running.
1760 * server.h (in_queued_stop_replies): New declaration.
1761
cb93dc7f
YQ
17622016-10-24 Yao Qi <yao.qi@linaro.org>
1763
1764 PR server/20733
1765 * linux-aarch64-low.c (append_insns): Cast the return value to
1766 'uint32_t *'.
1767
a1078bea
YQ
17682016-10-10 Yao Qi <yao.qi@linaro.org>
1769
1770 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1771
1fb77080
SDJ
17722016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1773
1774 * target.c (target_supports_multi_process): New function, moved
1775 from...
1776 * target.h (target_supports_multi_process): ... here. Remove
1777 macro.
1778
39b5a3b9
TT
17792016-10-05 Tom Tromey <tom@tromey.com>
1780
1781 PR remote/20655:
1782 * tracepoint.c (handle_tracepoint_bkpts): Check
1783 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1784
c1d0b70a
YQ
17852016-10-05 Yao Qi <yao.qi@linaro.org>
1786
1787 * configure.srv: Update the path of arm-*.xml files.
1788
0a69eedb
YQ
17892016-10-05 Terry Guo <terry.guo@arm.com>
1790 Yao Qi <yao.qi@linaro.org>
1791
1792 * Makefile.in: Adjust the path of rules.
1793 * configure.srv: Update the path of xml files.
1794 * regformats/arm-with-iwmmxt.dat: Regenerated.
1795 * regformats/arm-with-neon.dat: Likewise.
1796 * regformats/arm-with-vfpv2.dat: Likewise.
1797 * regformats/arm-with-vfpv3.dat Likewise.
1798
17e16485
YQ
17992016-09-30 Yao Qi <yao.qi@linaro.org>
1800
1801 PR gdbserver/20627
1802 * target.c (target_stop_and_wait): Don't call
1803 target_continue_no_signal, use resume_stop instead.
1804
edeeb602
YQ
18052016-09-26 Yao Qi <yao.qi@linaro.org>
1806
1807 * linux-low.c (linux_wait_1): Call debug_exit.
1808
503b1c39
PA
18092016-09-23 Pedro Alves <palves@redhat.com>
1810
1811 * Makefile.in (SFILES): Add common/new-op.c.
1812 (OBS): Add common/new-op.o.
1813 (new-op.o): New rule.
1814
74172ecf
SM
18152016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1816
1817 * .gitinore: Ignore more files.
1818
fc6cda2e
YQ
18192016-09-21 Yao Qi <yao.qi@linaro.org>
1820
1821 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1822 23.
1823
bc1e6c81
SDJ
18242016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1825
1826 * server.c (start_inferior): Call target_mourn_inferior instead of
1827 mourn_inferior; pass ptid_t argument to it.
1828 (resume): Likewise.
1829 (handle_target_event): Likewise.
1830 * target.c (target_mourn_inferior): New function.
1831 * target.h (mourn_inferior): Delete macro.
1832
0e00e962
AA
18332016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1834
1835 * linux-low.c (lwp_is_stepping): New function.
1836
1d8cb77d
CL
18372016-09-06 Carl Love <cel@us.ibm.com>
1838
1839 * server.c (start_inferior): Fixed comment, requested comment change
1840 didn't get updated correctly. Removed reference to ptrace () call as
1841 it is only true on Linux systems.
1842
7313bced
CL
18432016-09-06 Carl Love <cel@us.ibm.com>
1844
1845 * server.c (start_inferior): Do not call
1846 function target_post_create_inferior () if the
1847 inferior process has already exited.
1848
cf6de44d
PA
18492016-09-05 Pedro Alves <palves@redhat.com>
1850
1851 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1852 (COMPILE.pre, CC_LD): Use CXX directly.
1853 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1854 * acinclude.m4: Don't include build-with-cxx.m4.
1855 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1856 * configure: Regenerate.
1857
c1da6748
AT
18582016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1859
1860 PR gdb/19495
1861 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1862 call writing data to own_buf.
1863
f2b9e3df
SDJ
18642016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1865
1866 * target.c (mywait): Call target_wait instead of
1867 the_target->wait.
1868 (target_wait): New function.
1869
049a8570
SDJ
18702016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1871
1872 * server.c (start_inferior): New variable 'ptid'. Replace calls
1873 to the_target->resume by target_continue{,_no_signal}, depending
1874 on the case.
1875 * target.c (target_stop_and_wait): Call target_continue_no_signal
1876 instead of the_target->resume.
1877 (target_continue): New function.
1878
3aa5cfa0
AT
18792016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1880
1881 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1882
754653a7
AZ
18832016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1884
1885 PR server/20491
1886 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1887 ps_prochandle.
1888 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1889 * linux-arm-low.c (ps_get_thread_area): Likewise.
1890 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1891 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1892 * linux-mips-low.c (ps_get_thread_area): Likewise.
1893 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1894 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1895 * linux-x86-low.c (ps_get_thread_area): Likewise.
1896 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1897
ed036b40
PA
18982016-08-19 Pedro Alves <palves@redhat.com>
1899
1900 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1901
c8ef42ee
PA
19022016-08-19 Pedro Alves <palves@redhat.com>
1903
1904 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1905 comment. Use memcpy instead of casting through unsigned long.
1906
9c235a72
PA
19072016-08-19 Pedro Alves <palves@redhat.com>
1908
1909 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1910 allocating around 0x80000000.
1911
201506da
PA
19122016-08-19 Pedro Alves <palves@redhat.com>
1913
1914 PR gdb/20415
1915 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1916 (x32-avx512-linux-ipa.o): New rules.
1917 * configure.ac (x86_64-*-linux*): New x32 check.
1918 * configure.srv (ipa_x32_linux_regobj): New.
1919 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1920 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1921 descriptions.
1922 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1923 descriptions.
1924 * configure: Regenerate.
1925
f348d89a
PA
19262016-08-09 Pedro Alves <palves@redhat.com>
1927
1928 PR gdb/18653
1929 * Makefile.in (OBS): Add signals-state-save-restore.o.
1930 (signals-state-save-restore.o): New rule.
1931 * config.in: Regenerate.
1932 * configure: Regenerate.
1933 * linux-low.c: Include "signals-state-save-restore.h".
1934 (linux_create_inferior): Call
1935 restore_original_signals_state.
1936 * server.c: Include "dispositions-save-restore.h".
1937 (captured_main): Call save_original_signals_state.
1938
1baf5149
PA
19392016-08-05 Pedro Alves <palves@redhat.com>
1940
1941 * configure: Regenerate.
1942
fcd4a73d
YQ
19432016-08-04 Yao Qi <yao.qi@linaro.org>
1944
1945 * linux-low.c (regsets_fetch_inferior_registers): Check
1946 errno is ESRCH or not.
1947
979659d0
YQ
19482016-08-02 Yao Qi <yao.qi@linaro.org>
1949
1950 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1951 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1952 (thread_db_load_search): Update.
1953 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1954 td_ta_set_event and td_ta_event_getmsg.
1955
6598661d
PA
19562016-07-26 Pedro Alves <palves@redhat.com>
1957
1958 PR server/20414
1959 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1960 of unsigned long for 64-bit registers and use uint32_t instead of
1961 unsigned int for 32-bit registers.
1962
9cf12d57
PA
19632016-07-26 Pedro Alves <palves@redhat.com>
1964
1965 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1966 to 'ptrace'.
1967
305450ed
TT
19682016-07-21 Tom Tromey <tom@tromey.com>
1969
1970 * configure: Rebuild.
1971
2583da7c
YQ
19722016-07-21 Yao Qi <yao.qi@linaro.org>
1973
1974 * mem-break.c (find_gdb_breakpoint): Cast bp to
1975 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1976
21536b36
YQ
19772016-07-21 Yao Qi <yao.qi@linaro.org>
1978
1979 * server.c (handle_v_requests): Support s and S actions
1980 if target_supports_software_single_step return true.
1981
8901d193
YQ
19822016-07-21 Yao Qi <yao.qi@linaro.org>
1983
1984 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1985 is resume_step, call maybe_hw_step.
1986 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1987 and unstop them.
1988 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1989 breakpoints or not.
1990 (proceed_one_lwp): If resume request is resume_step, install
1991 reinsert breakpoints and call maybe_hw_step.
1992
0e9a339e
YQ
19932016-07-21 Yao Qi <yao.qi@linaro.org>
1994
1995 * linux-low.c (proceed_one_lwp): Declare.
1996 (linux_resume_one_thread): Remove local variable 'step'.
1997 Lift code enqueue signal. Call proceed_one_lwp instead of
1998 linux_resume_one_lwp.
1999
4281b351
YQ
20002016-07-21 Yao Qi <yao.qi@linaro.org>
2001
2002 * linux-low.c (linux_resume_one_thread): Call
2003 enqueue_pending_signal.
2004
984a2c04
YQ
20052016-07-21 Yao Qi <yao.qi@linaro.org>
2006
2007 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2008 * inferiors.c (do_restore_current_thread_cleanup): New function.
2009 (make_cleanup_restore_current_thread): Likewise.
2010 * linux-low.c (install_software_single_step_breakpoints): Call
2011 make_cleanup_restore_current_thread. Switch current_thread to
2012 thread.
2013
bec903c9
YQ
20142016-07-21 Yao Qi <yao.qi@linaro.org>
2015
2016 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2017 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2018 (clone_one_breakpoint): Likewise.
2019 (delete_reinsert_breakpoints): Change parameter to thread.
2020 Callers updated.
2021 (has_reinsert_breakpoints): Likewise.
2022 (uninsert_reinsert_breakpoints): Likewise.
2023 (reinsert_reinsert_breakpoints): Likewise.
2024 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2025 (delete_reinsert_breakpoints): Likewise.
2026 (reinsert_reinsert_breakpoints): Likewise.
2027 (uninsert_reinsert_breakpoints): Likewise.
2028 (has_reinsert_breakpoints): Likewise.
2029
63c40ec7
YQ
20302016-07-21 Yao Qi <yao.qi@linaro.org>
2031
2032 * inferiors.c (get_thread_process): Make parameter const.
2033 * inferiors.h (get_thread_process): Update declaration.
2034 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2035 Add new parameters child_thread and parent_thread. Callers
2036 updated.
2037 * mem-break.h (clone_all_breakpoints): Update declaration.
2038
9aa76cd0
YQ
20392016-07-21 Yao Qi <yao.qi@linaro.org>
2040
2041 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2042 <command_list, handler>: Remove.
2043 (struct gdb_breakpoint): New.
2044 (struct other_breakpoint): New.
2045 (struct reinsert_breakpoint): New.
2046 (is_gdb_breakpoint): New function.
2047 (any_persistent_commands): Update command_list if
2048 is_gdb_breakpoint returns true.
2049 (set_breakpoint): Create breakpoints according to their types.
2050 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2051 (set_gdb_breakpoint_1): Likewise.
2052 (set_gdb_breakpoint): Likewise.
2053 (clear_breakpoint_conditions): Change parameter type to
2054 'struct gdb_breakpoint *'.
2055 (clear_breakpoint_commands): Likewise.
2056 (clear_breakpoint_conditions_and_commands): Likewise.
2057 (add_condition_to_breakpoint): Likewise.
2058 (add_breakpoint_condition): Likewise.
2059 (add_commands_to_breakpoint): Likewise.
2060 (check_breakpoints): Check other_breakpoint.
2061 (clone_one_breakpoint): Clone breakpopint according to its type.
2062 * mem-break.h (struct gdb_breakpoint): Declare.
2063 (set_gdb_breakpoint): Update declaration.
2064 (clear_breakpoint_conditions_and_commands): Likewise.
2065 (add_breakpoint_condition): Likewise.
2066 (add_breakpoint_commands): Likewise.
2067 * server.c (process_point_options): Change parameter type to
2068 'struct gdb_breakpoint *'.
2069
811f8301
YQ
20702016-07-21 Yao Qi <yao.qi@linaro.org>
2071
2072 * mem-break.c (set_breakpoint_at): Rename it to ...
2073 (set_breakpoint_type_at): ... it.
2074 (set_breakpoint_at): Call set_breakpoint_type_at.
2075 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2076 * mem-break.h (set_breakpoint_at): Update comments.
2077
b1c51e36
CLT
20782016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2079
2080 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2081 to buf parameter.
2082 (nios2_store_gregset): Likewise.
2083
ced2dffb
PA
20842016-07-01 Pedro Alves <palves@redhat.com>
2085 Antoine Tremblay <antoine.tremblay@ericsson.com>
2086
2087 * linux-low.c: Change interface to take the target lwp_info
2088 pointer directly and return void. Handle detaching from a zombie
2089 thread.
2090 (linux_detach_lwp_callback): New function.
2091 (linux_detach): Detach from the leader thread after detaching from
2092 the clone threads.
2093
2ac09a5b
YQ
20942016-06-28 Yao Qi <yao.qi@linaro.org>
2095
2096 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2097 for variable new_offset.
2098 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2099 (aarch64_ftrace_insn_reloc_cb): Likewise.
2100 (aarch64_ftrace_insn_reloc_tb): Likewise.
2101 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2102 PRIx64 instead of PRIx32.
2103
79e7fd4f
YQ
21042016-06-28 Yao Qi <yao.qi@linaro.org>
2105
2106 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2107 (the_low_target): Install arm_get_syscall_trapinfo.
2108
061fc021
YQ
21092016-06-28 Yao Qi <yao.qi@linaro.org>
2110
2111 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2112 function.
2113 (the_low_target): Install aarch64_get_syscall_trapinfo.
2114
4cc32bec
YQ
21152016-06-28 Yao Qi <yao.qi@linaro.org>
2116
2117 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2118 Callers updated.
2119 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2120 Remove parameter sysno.
2121 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2122 sysret.
2123
782c1122
AA
21242016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2125
2126 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2127 (s390_emit_ne_goto): Likewise.
2128 (s390_emit_lt_goto): Likewise.
2129 (s390_emit_le_goto): Likewise.
2130 (s390_emit_gt_goto): Likewise.
2131 (s390_emit_ge_goto): Likewise.
2132 (s390x_emit_eq_goto): Likewise.
2133 (s390x_emit_ne_goto): Likewise.
2134 (s390x_emit_lt_goto): Likewise.
2135 (s390x_emit_le_goto): Likewise.
2136 (s390x_emit_gt_goto): Likewise.
2137 (s390x_emit_ge_goto): Likewise.
2138 (s390_emit_ops_impl): Mark variable static.
2139 (s390x_emit_ops): Likewise.
2140
2e7b624b
YQ
21412016-06-17 Yao Qi <yao.qi@linaro.org>
2142
2143 * linux-low.c (handle_extended_wait): Call
2144 uninsert_reinsert_breakpoints for the parent process. Remove
2145 reinsert breakpoints from the child process. Reinsert them to
2146 the parent process when vfork is done.
2147 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2148 (reinsert_reinsert_breakpoints): New function.
2149 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2150 (reinsert_reinsert_breakpoints): Declare.
2151
8a81c5d7
YQ
21522016-06-17 Yao Qi <yao.qi@linaro.org>
2153
2154 * linux-low.c (handle_extended_wait): If the parent is doing
2155 step-over, remove the reinsert breakpoints from the forked child.
2156
f50bf8e5
YQ
21572016-06-17 Yao Qi <yao.qi@linaro.org>
2158
2159 * linux-low.c (unsuspend_all_lwps): Declare.
2160 (linux_low_filter_event): If thread exited, call finish_step_over.
2161 If step-over is finished, unsuspend other threads.
2162
8376a3cb
YQ
21632016-06-17 Yao Qi <yao.qi@linaro.org>
2164
2165 * linux-low.c (linux_resume_one_lwp_throw): Assert
2166 has_reinsert_breakpoints returns false.
2167 * mem-break.c (delete_disabled_breakpoints): Assert
2168 bp type isn't reinsert_breakpoint.
2169
f79b145d
YQ
21702016-06-17 Yao Qi <yao.qi@linaro.org>
2171
2172 * linux-low.c (maybe_hw_step): New function.
2173 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2174 (finish_step_over): Switch current_thread to lwp temporarily,
2175 and assert has_reinsert_breakpoints returns true.
2176 (proceed_one_lwp): Call maybe_hw_step.
2177 * mem-break.c (has_reinsert_breakpoints): New function.
2178 * mem-break.h (has_reinsert_breakpoints): Declare.
2179
0ae534d2
JT
21802016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2181
2182 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2183
fcdad592
YQ
21842016-05-17 Yao Qi <yao.qi@linaro.org>
2185
2186 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2187 instead of find_inferior.
2188
9e784964
YQ
21892016-05-05 Yao Qi <yao.qi@linaro.org>
2190
2191 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2192 Initialize res to zero.
2193
cf2ebb6e
YQ
21942016-05-05 Yao Qi <yao.qi@linaro.org>
2195
2196 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2197 to uint32_t.
2198
c1aebf87
UW
21992016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2200
2201 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2202 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2203 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2204
35fd2deb 22052016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 2206 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
2207
2208 * tracepoint.c (write_inferior_int8): New function.
2209 (cmd_qtenable_disable): Write enable flag using
2210 write_inferior_int8.
2211
484b3c32
YQ
22122016-04-25 Yao Qi <yao.qi@linaro.org>
2213
2214 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2215 (need_step_over_p): Return zero if the LWP has pending signals
2216 can be delivered on software single step target.
2217
85ba7d86
YQ
22182016-04-25 Yao Qi <yao.qi@linaro.org>
2219
2220 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2221 return instead of error.
2222
3539aa13
YQ
22232016-04-22 Yao Qi <yao.qi@linaro.org>
2224
2225 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2226 to 23.
2227
5b061e98
YQ
22282016-04-22 Yao Qi <yao.qi@linaro.org>
2229
2230 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2231 signal when stepping over breakpoint with software single
2232 step.
2233
3451269c
PA
22342016-04-21 Pedro Alves <palves@redhat.com>
2235
2236 * linux-s390-low.c (s390_collect_ptrace_register)
2237 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2238 add casts.
2239 (s390_check_regset): Use void * instead of gdb_byte *.
2240
a2358508
PA
22412016-04-20 Pedro Alves <palves@redhat.com>
2242
2243 * configure: Renegerate.
2244
6885166d
YQ
22452016-04-20 Yao Qi <yao.qi@linaro.org>
2246
2247 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2248 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2249 number 16.
2250 (arm_store_gregset): Likewise.
2251
2b863f51
WT
22522016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2253
2254 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2255 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2256 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2257 (amd64-avx-mpx-linux.c): New rules.
2258 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2259 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2260 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2261 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2262 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2263 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2264 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2265 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2266 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2267 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2268 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2269 * linux-x86-low.c (x86_linux_read_description): Add case for
2270 X86_XSTATE_AVX_MPX_MASK.
2271 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2272 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2273 init_registers_i386_avx_mpx_linux.
2274 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2275 (initialize_low_tracepoint): Call
2276 init_registers_i386_avx_mpx_linux.
2277 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2278 (initialize_low_tracepoint): Call
2279 init_registers_amd64_avx_mpx_linux.
2280 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2281 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2282 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2283 declarations.
2284
9b30624b
PA
22852016-04-18 Pedro Alves <palves@redhat.com>
2286
2287 * configure: Regenerate.
2288
45e3745e
AT
22892016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2290
2291 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2292 (aarch64_emit_sub): Likewise.
2293
2afc13ff
PA
22942016-04-12 Pedro Alves <palves@redhat.com>
2295
2296 * utils.c (prepare_to_throw_exception): Delete.
2297
6e774b13
SM
22982016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2299
2300 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2301
4dca19f8
MK
23022016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2303
2304 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2305
d0a9981f
MK
23062016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2307
2308 * linux-aarch64-ipa.c: Add <elf.h> include.
2309 * linux-ppc-ipa.c: Add <elf.h> include.
2310 * linux-s390-ipa.c: Add <elf.h> include.
2311
252db07e
MK
23122016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2313
2314 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2315 (get_raw_reg_ptr): Likewise.
2316 (get_trace_state_variable_value_ptr): Likewise.
2317 (set_trace_state_variable_value_ptr): Likewise.
2318 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2319 char *.
2320
14e2b6d9
MK
23212016-03-31 Wei-cheng Wang <cole945@gmail.com>
2322 Marcin Kościelnicki <koriakin@0x04.net>
2323
2324 PR/17221
2325 * linux-ppc-low.c (emit_insns): New function.
2326 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2327 (ppc_emit_prologue): New function.
2328 (ppc_emit_epilogue): New function.
2329 (ppc_emit_add): New function.
2330 (ppc_emit_sub): New function.
2331 (ppc_emit_mul): New function.
2332 (ppc_emit_lsh): New function.
2333 (ppc_emit_rsh_signed): New function.
2334 (ppc_emit_rsh_unsigned): New function.
2335 (ppc_emit_ext): New function.
2336 (ppc_emit_zero_ext): New function.
2337 (ppc_emit_log_not): New function.
2338 (ppc_emit_bit_and): New function.
2339 (ppc_emit_bit_or): New function.
2340 (ppc_emit_bit_xor): New function.
2341 (ppc_emit_bit_not): New function.
2342 (ppc_emit_equal): New function.
2343 (ppc_emit_less_signed): New function.
2344 (ppc_emit_less_unsigned): New function.
2345 (ppc_emit_ref): New function.
2346 (ppc_emit_const): New function.
2347 (ppc_emit_reg): New function.
2348 (ppc_emit_pop): New function.
2349 (ppc_emit_stack_flush): New function.
2350 (ppc_emit_swap): New function.
2351 (ppc_emit_stack_adjust): New function.
2352 (ppc_emit_call): New function.
2353 (ppc_emit_int_call_1): New function.
2354 (ppc_emit_void_call_2): New function.
2355 (ppc_emit_if_goto): New function.
2356 (ppc_emit_goto): New function.
2357 (ppc_emit_eq_goto): New function.
2358 (ppc_emit_ne_goto): New function.
2359 (ppc_emit_lt_goto): New function.
2360 (ppc_emit_le_goto): New function.
2361 (ppc_emit_gt_goto): New function.
2362 (ppc_emit_ge_goto): New function.
2363 (ppc_write_goto_address): New function.
2364 (ppc_emit_ops_impl): New static variable.
2365 (ppc64v1_emit_prologue): New function.
2366 (ppc64v2_emit_prologue): New function.
2367 (ppc64_emit_epilogue): New function.
2368 (ppc64_emit_add): New function.
2369 (ppc64_emit_sub): New function.
2370 (ppc64_emit_mul): New function.
2371 (ppc64_emit_lsh): New function.
2372 (ppc64_emit_rsh_signed): New function.
2373 (ppc64_emit_rsh_unsigned): New function.
2374 (ppc64_emit_ext): New function.
2375 (ppc64_emit_zero_ext): New function.
2376 (ppc64_emit_log_not): New function.
2377 (ppc64_emit_bit_and): New function.
2378 (ppc64_emit_bit_or): New function.
2379 (ppc64_emit_bit_xor): New function.
2380 (ppc64_emit_bit_not): New function.
2381 (ppc64_emit_equal): New function.
2382 (ppc64_emit_less_signed): New function.
2383 (ppc64_emit_less_unsigned): New function.
2384 (ppc64_emit_ref): New function.
2385 (ppc64_emit_const): New function.
2386 (ppc64v1_emit_reg): New function.
2387 (ppc64v2_emit_reg): New function.
2388 (ppc64_emit_pop): New function.
2389 (ppc64_emit_stack_flush): New function.
2390 (ppc64_emit_swap): New function.
2391 (ppc64v1_emit_call): New function.
2392 (ppc64v2_emit_call): New function.
2393 (ppc64v1_emit_int_call_1): New function.
2394 (ppc64v2_emit_int_call_1): New function.
2395 (ppc64v1_emit_void_call_2): New function.
2396 (ppc64v2_emit_void_call_2): New function.
2397 (ppc64_emit_if_goto): New function.
2398 (ppc64_emit_eq_goto): New function.
2399 (ppc64_emit_ne_goto): New function.
2400 (ppc64_emit_lt_goto): New function.
2401 (ppc64_emit_le_goto): New function.
2402 (ppc64_emit_gt_goto): New function.
2403 (ppc64_emit_ge_goto): New function.
2404 (ppc64v1_emit_ops_impl): New static variable.
2405 (ppc64v2_emit_ops_impl): New static variable.
2406 (ppc_emit_ops): New function.
2407 (linux_low_target): Wire in ppc_emit_ops.
2408
a2174ba4
MK
24092016-03-31 Wei-cheng Wang <cole945@gmail.com>
2410 Marcin Kościelnicki <koriakin@0x04.net>
2411
2412 PR/17221
2413 * Makefile.in: Add powerpc-*-ipa.o
2414 * configure.srv: Add ipa_obj for powerpc*-linux.
2415 * linux-ppc-ipa.c: New file.
2416 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2417 includes.
2418 (PPC_FIELD): New macro.
2419 (PPC_SEXT): New macro.
2420 (PPC_OP6): New macro.
2421 (PPC_BO): New macro.
2422 (PPC_LI): New macro.
2423 (PPC_BD): New macro.
2424 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2425 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2426 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2427 (ppc_get_thread_area): New function.
2428 (is_elfv2_inferior): New function.
2429 (gen_ds_form): New function.
2430 (GEN_STD): New macro.
2431 (GEN_STDU): New macro.
2432 (GEN_LD): New macro.
2433 (GEN_LDU): New macro.
2434 (gen_d_form): New function.
2435 (GEN_ADDI): New macro.
2436 (GEN_ADDIS): New macro.
2437 (GEN_LI): New macro.
2438 (GEN_LIS): New macro.
2439 (GEN_ORI): New macro.
2440 (GEN_ORIS): New macro.
2441 (GEN_LWZ): New macro.
2442 (GEN_STW): New macro.
2443 (GEN_STWU): New macro.
2444 (gen_xfx_form): New function.
2445 (GEN_MFSPR): New macro.
2446 (GEN_MTSPR): New macro.
2447 (GEN_MFCR): New macro.
2448 (GEN_MTCR): New macro.
2449 (GEN_SYNC): New macro.
2450 (GEN_LWSYNC): New macro.
2451 (gen_x_form): New function.
2452 (GEN_OR): New macro.
2453 (GEN_MR): New macro.
2454 (GEN_LWARX): New macro.
2455 (GEN_STWCX): New macro.
2456 (GEN_CMPW): New macro.
2457 (gen_md_form): New function.
2458 (GEN_RLDICL): New macro.
2459 (GEN_RLDICR): New macro.
2460 (gen_i_form): New function.
2461 (GEN_B): New macro.
2462 (GEN_BL): New macro.
2463 (gen_b_form): New function.
2464 (GEN_BNE): New macro.
2465 (GEN_LOAD): New macro.
2466 (GEN_STORE): New macro.
2467 (gen_limm): New function.
2468 (gen_atomic_xchg): New function.
2469 (gen_call): New function.
2470 (ppc_relocate_instruction): New function.
2471 (ppc_install_fast_tracepoint_jump_pad): New function.
2472 (ppc_get_min_fast_tracepoint_insn_len): New function.
2473 (ppc_get_ipa_tdesc_idx): New function.
2474 (the_low_target): Wire in the new functions.
2475 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2476 tdescs.
2477 * linux-ppc-tdesc.h: New file.
2478
a13c4696
MK
24792016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2480
2481 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2482 (alloc_jump_pad_buffer): New function.
2483 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2484 (alloc_jump_pad_buffer): New function.
2485 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2486 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2487 (alloc_jump_pad_buffer): New function.
2488 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2489 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2490 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2491 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2492
1cda1512
MK
24932016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2494
2495 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2496 * linux-amd64-ipa.c: Likewise.
2497 * linux-i386-ipa.c: Likewise.
2498 * linux-s390-ipa.c: Likewise.
2499 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2500 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2501 set_trace_state_variable_value_ptr.
2502 (struct ipa_sym_addresses): Likewise.
2503 (symbol_list): Likewise.
2504 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2505 accessing gdb_collect directly.
2506 (gdb_collect_ptr_type): New typedef.
2507 (get_raw_reg_ptr_type): New typedef.
2508 (get_trace_state_variable_value_ptr_type): New typedef.
2509 (set_trace_state_variable_value_ptr_type): New typedef.
2510 (gdb_collect_ptr): New global.
2511 (get_raw_reg_ptr): New global.
2512 (get_trace_state_variable_value_ptr): New global.
2513 (set_trace_state_variable_value_ptr): New global.
2514 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2515 accessing get_raw_reg directly.
2516 (get_get_tsv_func_addr): Likewise for
2517 get_trace_state_variable_value_ptr.
2518 (get_set_tsv_func_addr): Likewise for
2519 set_trace_state_variable_value_ptr.
2520 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2521
72fb5488
SM
25222016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2523
2524 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2525
28170b88
MK
25262016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2527
2528 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2529 packets.
2530 (relocate_instruction): Remove own_buf.
2531 * server.c (own_buf): Make global.
2532 (handle_v_requests): Make global.
2533 * server.h (own_buf): New declaration.
2534 (handle_v_requests): New prototype.
2535
f39e8743
MK
25362016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2537
2538 PR 18377
2539 * linux-s390-low.c (add_insns): New function.
2540 (s390_emit_prologue): New function.
2541 (s390_emit_epilogue): New function.
2542 (s390_emit_add): New function.
2543 (s390_emit_sub): New function.
2544 (s390_emit_mul): New function.
2545 (s390_emit_lsh): New function.
2546 (s390_emit_rsh_signed): New function.
2547 (s390_emit_rsh_unsigned): New function.
2548 (s390_emit_ext): New function.
2549 (s390_emit_log_not): New function.
2550 (s390_emit_bit_and): New function.
2551 (s390_emit_bit_or): New function.
2552 (s390_emit_bit_xor): New function.
2553 (s390_emit_bit_not): New function.
2554 (s390_emit_equal): New function.
2555 (s390_emit_less_signed): New function.
2556 (s390_emit_less_unsigned): New function.
2557 (s390_emit_ref): New function.
2558 (s390_emit_if_goto): New function.
2559 (s390_emit_goto): New function.
2560 (s390_write_goto_address): New function.
2561 (s390_emit_litpool): New function.
2562 (s390_emit_const): New function.
2563 (s390_emit_call): New function.
2564 (s390_emit_reg): New function.
2565 (s390_emit_pop): New function.
2566 (s390_emit_stack_flush): New function.
2567 (s390_emit_zero_ext): New function.
2568 (s390_emit_swap): New function.
2569 (s390_emit_stack_adjust): New function.
2570 (s390_emit_set_r2): New function.
2571 (s390_emit_int_call_1): New function.
2572 (s390_emit_void_call_2): New function.
2573 (s390_emit_eq_goto): New function.
2574 (s390_emit_ne_goto): New function.
2575 (s390_emit_lt_goto): New function.
2576 (s390_emit_le_goto): New function.
2577 (s390_emit_gt_goto): New function.
2578 (s390_emit_ge_goto): New function.
2579 (s390x_emit_prologue): New function.
2580 (s390x_emit_epilogue): New function.
2581 (s390x_emit_add): New function.
2582 (s390x_emit_sub): New function.
2583 (s390x_emit_mul): New function.
2584 (s390x_emit_lsh): New function.
2585 (s390x_emit_rsh_signed): New function.
2586 (s390x_emit_rsh_unsigned): New function.
2587 (s390x_emit_ext): New function.
2588 (s390x_emit_log_not): New function.
2589 (s390x_emit_bit_and): New function.
2590 (s390x_emit_bit_or): New function.
2591 (s390x_emit_bit_xor): New function.
2592 (s390x_emit_bit_not): New function.
2593 (s390x_emit_equal): New function.
2594 (s390x_emit_less_signed): New function.
2595 (s390x_emit_less_unsigned): New function.
2596 (s390x_emit_ref): New function.
2597 (s390x_emit_if_goto): New function.
2598 (s390x_emit_const): New function.
2599 (s390x_emit_call): New function.
2600 (s390x_emit_reg): New function.
2601 (s390x_emit_pop): New function.
2602 (s390x_emit_stack_flush): New function.
2603 (s390x_emit_zero_ext): New function.
2604 (s390x_emit_swap): New function.
2605 (s390x_emit_stack_adjust): New function.
2606 (s390x_emit_int_call_1): New function.
2607 (s390x_emit_void_call_2): New function.
2608 (s390x_emit_eq_goto): New function.
2609 (s390x_emit_ne_goto): New function.
2610 (s390x_emit_lt_goto): New function.
2611 (s390x_emit_le_goto): New function.
2612 (s390x_emit_gt_goto): New function.
2613 (s390x_emit_ge_goto): New function.
2614 (s390_emit_ops): New function.
2615 (struct linux_target_ops): Fill in emit_ops hook.
2616
abd9baf9
MK
26172016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2618
2619 PR 18377
2620 * Makefile.in: Add s390 IPA files.
2621 * configure.srv: Build IPA for s390.
2622 * linux-s390-ipa.c: New file.
2623 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2624 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2625 (tdesc_s390_linux32): Likewise.
2626 (init_registers_s390_linux32v1): Likewise.
2627 (tdesc_s390_linux32v1): Likewise.
2628 (init_registers_s390_linux32v2): Likewise.
2629 (tdesc_s390_linux32v2): Likewise.
2630 (init_registers_s390_linux64): Likewise.
2631 (tdesc_s390_linux64): Likewise.
2632 (init_registers_s390_linux64v1): Likewise.
2633 (tdesc_s390_linux64v1): Likewise.
2634 (init_registers_s390_linux64v2): Likewise.
2635 (tdesc_s390_linux64v2): Likewise.
2636 (init_registers_s390_te_linux64): Likewise.
2637 (tdesc_s390_te_linux64): Likewise.
2638 (init_registers_s390_vx_linux64): Likewise.
2639 (tdesc_s390_vx_linux64): Likewise.
2640 (init_registers_s390_tevx_linux64): Likewise.
2641 (tdesc_s390_tevx_linux64): Likewise.
2642 (init_registers_s390x_linux64): Likewise.
2643 (tdesc_s390x_linux64): Likewise.
2644 (init_registers_s390x_linux64v1): Likewise.
2645 (tdesc_s390x_linux64v1): Likewise.
2646 (init_registers_s390x_linux64v2): Likewise.
2647 (tdesc_s390x_linux64v2): Likewise.
2648 (init_registers_s390x_te_linux64): Likewise.
2649 (tdesc_s390x_te_linux64): Likewise.
2650 (init_registers_s390x_vx_linux64): Likewise.
2651 (tdesc_s390x_vx_linux64): Likewise.
2652 (init_registers_s390x_tevx_linux64): Likewise.
2653 (tdesc_s390x_tevx_linux64): Likewise.
2654 (have_hwcap_s390_vx): New static variable.
2655 (s390_arch_setup): Fill have_hwcap_s390_vx.
2656 (s390_get_thread_area): New function.
2657 (s390_ft_entry_gpr_esa): New const.
2658 (s390_ft_entry_gpr_zarch): New const.
2659 (s390_ft_entry_misc): New const.
2660 (s390_ft_entry_fr): New const.
2661 (s390_ft_entry_vr): New const.
2662 (s390_ft_main_31): New const.
2663 (s390_ft_main_64): New const.
2664 (s390_ft_exit_fr): New const.
2665 (s390_ft_exit_vr): New const.
2666 (s390_ft_exit_misc): New const.
2667 (s390_ft_exit_gpr_esa): New const.
2668 (s390_ft_exit_gpr_zarch): New const.
2669 (append_insns): New function.
2670 (s390_relocate_instruction): New function.
2671 (s390_install_fast_tracepoint_jump_pad): New function.
2672 (s390_get_min_fast_tracepoint_insn_len): New function.
2673 (s390_get_ipa_tdesc_idx): New function.
2674 (struct linux_target_ops): Wire in the above functions.
2675 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2676 * linux-s390-tdesc.h: New file.
2677
a4105d04
MK
26782016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2679
2680 * linux-s390-low.c (s390_supports_tracepoints): New function.
2681 (struct linux_target_ops): Fill supports_tracepoints hook.
2682
35ac8b3e
YQ
26832016-03-18 Yao Qi <yao.qi@linaro.org>
2684
2685 * linux-low.c (lwp_signal_can_be_delivered): New function.
2686 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2687
94610ec4
YQ
26882016-03-18 Yao Qi <yao.qi@linaro.org>
2689
2690 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2691 0 if signal is enqueued. Remove 'signal' from one debugging
2692 message. Move one debugging message to some lines below.
2693 Remove code setting 'signal' to 0.
2694
80aea927
YQ
26952016-03-18 Yao Qi <yao.qi@linaro.org>
2696
2697 * linux-low.c (linux_low_filter_event): Remove redundant
2698 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2699
b04fd3be
MK
27002016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2701
2702 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2703 (struct linux_target_ops): Wire in the above.
2704
c40c8d4b
YQ
27052016-03-03 Yao Qi <yao.qi@linaro.org>
2706
2707 * linux-low.c: Update comments to start_step_over.
2708
0f8288ae
YQ
27092016-03-03 Yao Qi <yao.qi@linaro.org>
2710
2711 PR server/19736
2712 * linux-low.c (handle_extended_wait): Set child suspended
2713 if event_lwp->bp_reinsert isn't zero.
2714
fdbd04a8
YQ
27152016-03-02 Yao Qi <yao.qi@linaro.org>
2716
2717 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2718 enqueue_pending_signal.
2719
6896a8fa
MK
27202016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2721
2722 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2723 is actually loaded.
2724
ab503087
MK
27252016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2726
2727 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2728 (s390_regmap_3264) [!__s390x__]: New global.
2729 (s390_collect_ptrace_register): Skip map entries containing -1.
2730 (s390_supply_ptrace_register): Ditto.
2731 (s390_fill_gprs_high): New function.
2732 (s390_store_gprs_high): New function.
2733 (s390_regsets): Add NT_S390_HIGH_GPRS.
2734 (s390_get_hwcap): Enable on 31-bit.
2735 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2736 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2737 Detect NT_S390_HIGH_GPRS.
2738 (s390_usrregs_info_3264): Enable on 31-bit.
2739 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2740 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2741
ae91f625
MK
27422016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2743
2744 PR gdb/13808
2745 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2746 * configure.srv: Ditto.
2747 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2748 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2749 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2750 (init_registers_amd64_linux): Remove prototype.
2751 (tdesc_amd64_linux): Remove declaration.
2752 (get_ipa_tdesc): New function.
2753 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2754 initialize remaining tdescs.
2755 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2756 (init_registers_i386_linux): Remove prototype.
2757 (tdesc_i386_linux): Remove declaration.
2758 (get_ipa_tdesc): New function.
2759 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2760 initialize remaining tdescs.
2761 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2762 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2763 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2764 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2765 (x86_get_ipa_tdesc_idx): New function.
2766 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2767 * linux-x86-tdesc.h: New file.
2768 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2769 (target_get_ipa_tdesc_idx): New macro.
2770 * tracepoint.c (ipa_tdesc_idx): New macro.
2771 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2772 (symbol_list): Add ipa_tdesc_idx.
2773 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2774 (ipa_tdesc): Remove.
2775 (ipa_tdesc_idx): New variable.
2776 (get_context_regcache): Use get_ipa_tdesc.
2777 (gdb_collect): Ditto.
2778 (gdb_probe): Ditto.
2779 * tracepoint.h (get_ipa_tdesc): New prototype.
2780 (ipa_tdesc): Remove.
2781
e7ad2f14
PA
27822016-02-24 Pedro Alves <palves@redhat.com>
2783
2784 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2785 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2786 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2787 Factor out common code between the USE_SIGTRAP_SIGINFO and
2788 !USE_SIGTRAP_SIGINFO blocks.
2789 (linux_low_filter_event): Call save_stop_reason instead of
2790 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2791 Update comments.
2792 (linux_wait_1): Update comments.
2793
657f9cde
WW
27942016-02-24 Wei-cheng Wang <cole945@gmail.com>
2795
2796 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2797 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2798 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2799 ppc_insert_point, ppc_remove_point.
2800
b00b61e1
MK
28012016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2802
2803 * linux-s390-low.c (s390_supports_z_point_type): New function.
2804 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2805
553cb527
YQ
28062016-02-16 Yao Qi <yao.qi@linaro.org>
2807
2808 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2809 PC. Get pc from regcache_read_pc.
2810
a5652c21
YQ
28112016-02-12 Yao Qi <yao.qi@linaro.org>
2812
2813 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2814 or linux_get_pc_32bit.
2815 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2816
ed443b61
YQ
28172016-02-12 Yao Qi <yao.qi@linaro.org>
2818
2819 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2820 arm_linux_get_next_pcs_fixup.
2821
020ecd38
MK
28222016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2823
2824 * tracepoint.c (x_tracepoint_action_download): Change
2825 write_inferior_data_ptr to write_inferior_data_pointer.
2826 (cmd_qtstart): Likewise.
2827 (write_inferior_data_ptr): Remove.
2828 (download_agent_expr): Change write_inferior_data_ptr to
2829 write_inferior_data_pointer.
2830 (download_tracepoint_1): Likewise.
2831 (download_tracepoint): Likewise.
2832 (download_trace_state_variables): Likewise.
2833
7cae9051
WW
28342016-02-11 Wei-cheng Wang <cole945@gmail.com>
2835 Marcin Kościelnicki <koriakin@0x04.net>
2836
2837 * tracepoint.c (struct tracepoint_action_ops): Remove.
2838 (struct tracepoint_action): Remove ops.
2839 (m_tracepoint_action_download, r_tracepoint_action_download)
2840 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2841 size and offset accordingly.
2842 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2843 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2844 (tracepoint_action_send, tracepoint_action_download): New functions.
2845 Helpers for trace action handlers.
2846 (add_tracepoint_action): Remove setup actions ops.
2847 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2848
9f6a71b4
YQ
28492016-02-10 Yao Qi <yao.qi@linaro.org>
2850
2851 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2852
1e94266c
SM
28532016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2854
2855 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2856 to AC_OUTPUT.
2857 * configure: Regenerate.
2858
8adce034
SM
28592016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2860
2861 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2862 void * to gdb_byte *.
2863 * linux-low.c (siginfo_fixup): Likewise.
2864 (linux_xfer_siginfo): Likewise.
2865 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2866 Likewise.
2867 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2868
93813b37
WT
28692016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2870
2871 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2872 to srv_tgtobj.
2873 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2874 to srv_tgtobj.
2875 * linux-x86-low.c [__x86_64__]: Include
2876 "nat/amd64-linux-siginfo.h".
2877 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2878 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2879 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2880 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2881 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2882 (cpt_si_fd, si_timerid, si_overrun): Move from
2883 nat/amd64-linux-siginfo.c.
2884 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2885
8424cc97
SM
28862016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2887
2888 * server.c (skip_to_semicolon): Remove.
2889 (process_point_options): Use strchrnul instead of
2890 skip_to_semicolon.
2891
4d18591b
YQ
28922016-01-26 Yao Qi <yao.qi@linaro.org>
2893
2894 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2895 * linux-low.c (install_software_single_step_breakpoints): Don't
2896 call regcache_read_pc.
2897 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2898 argument pc.
2899
d8020970
YQ
29002016-01-26 Yao Qi <yao.qi@linaro.org>
2901
2902 * linux-low.c (install_software_single_step_breakpoints): Call
2903 regcache_read_pc instead of get_pc.
2904
8b207339
YQ
29052016-01-26 Yao Qi <yao.qi@linaro.org>
2906
2907 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2908 (unblock_async_io): Rename to ...
2909 (block_unblock_async_io): ... it. New function.
2910 (enable_async_io): Don't install SIGIO handler. Unblock it
2911 instead.
2912 (disable_async_io): Don't ignore SIGIO. Block it instead.
2913 (initialize_async_io): Install SIGIO handler. Don't call
2914 unblock_async_io.
2915
18879fef
YQ
29162016-01-26 Yao Qi <yao.qi@linaro.org>
2917
2918 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2919 first character is '\003', call *the_target->request_interrupt.
2920
a0f8e08a
YQ
29212016-01-25 Yao Qi <yao.qi@linaro.org>
2922
2923 * remote-utils.c (new_thread_notify): Remove.
2924 (dead_thread_notify): Likewise.
2925 * remote-utils.h (new_thread_notify): Remove declaration.
2926 (dead_thread_notify): Likewise.
2927
cc5fd9ab
MK
29282016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2929
2930 * gdb.trace/pending.exp: Fix expected message on continue.
2931
99e8eb11
MK
29322016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2933
2934 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2935 it works properly on big-endian machines where sizeof (CORE_ADDR)
2936 != sizeof (void *).
2937
a994041d
PA
29382016-01-21 Pedro Alves <palves@redhat.com>
2939
2940 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2941 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2942 * configure: Regenerate.
2943
f7a6a40d
YQ
29442016-01-21 Yao Qi <yao.qi@linaro.org>
2945
2946 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2947 is_thumb and set it according to CPSR saved on the stack.
2948 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2949 arm_sigreturn_next_pc.
2950
6f69e520
YQ
29512016-01-18 Yao Qi <yao.qi@linaro.org>
2952
2953 * linux-low.c (linux_set_pc_64bit): New function.
2954 (linux_get_pc_64bit): New function.
2955 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2956 Declare.
2957 * linux-sparc-low.c (debug_threads): Remove declaration.
2958 (sparc_get_pc): Remove.
2959 (the_low_target): Use linux_get_pc_64bit instead of
2960 sparc_get_pc.
2961 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2962 (the_low_target): Use linux_get_pc_64bit and
2963 linux_set_pc_64bit.
2964
276d4552
YQ
29652016-01-18 Yao Qi <yao.qi@linaro.org>
2966
2967 * linux-arm-low.c (debug_threads): Remove declaration.
2968 (arm_get_pc, arm_set_pc): Remove.
2969 (the_low_target): Use linux_get_pc_32bit and
2970 linux_set_pc_32bit.
2971 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2972 (the_low_target): Use linux_get_pc_32bit and
2973 linux_set_pc_32bit.
2974 * linux-cris-low.c (debug_threads): Remove declaration.
2975 (cris_get_pc, cris_set_pc,): Remove.
2976 (the_low_target): Use linux_get_pc_32bit and
2977 linux_set_pc_32bit.
2978 * linux-crisv32-low.c (debug_threads): Remove declaration.
2979 (cris_get_pc, cris_set_pc): Remove.
2980 (the_low_target): Use linux_get_pc_32bit and
2981 linux_set_pc_32bit.
2982 * linux-low.c: Include inttypes.h.
2983 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2984 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2985 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2986 (the_low_target): Use linux_get_pc_32bit and
2987 linux_set_pc_32bit.
2988 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2989 (the_low_target): Use linux_get_pc_32bit and
2990 linux_set_pc_32bit.
2991 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2992 (the_low_target): Use linux_get_pc_32bit and
2993 linux_set_pc_32bit.
2994 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2995 (the_low_target): Use linux_get_pc_32bit and
2996 linux_set_pc_32bit.
2997 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2998 (the_low_target): Use linux_get_pc_32bit and
2999 linux_set_pc_32bit.
3000
eb0edac8
GB
30012016-01-18 Gary Benson <gbenson@redhat.com>
3002
3003 * configure.ac (AC_FUNC_FORK): New check.
3004 * config.in: Regenerate.
3005 * configure: Likewise.
3006
1b451dda
YQ
30072016-01-14 Yao Qi <yao.qi@linaro.org>
3008
3009 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3010 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3011 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3012 arm_get_next_pcs_ctor.
3013
82075af2
JS
30142016-01-12 Josh Stone <jistone@redhat.com>
3015 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3016
3017 * inferiors.h: Include "gdb_vecs.h".
3018 (struct process_info): Add syscalls_to_catch.
3019 * inferiors.c (remove_process): Free syscalls_to_catch.
3020 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3021 syscall_return stops.
3022 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3023 * server.c (handle_general_set): Handle QCatchSyscalls.
3024 (handle_query): Report support for QCatchSyscalls.
3025 * target.h (struct target_ops): Add supports_catch_syscall.
3026 (target_supports_catch_syscall): New macro.
3027 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3028 (struct lwp_info): Add syscall_state.
3029 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3030 Maintain syscall_state and syscalls_to_catch across exec.
3031 (get_syscall_trapinfo): New function, proxy to the_low_target.
3032 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3033 (linux_low_filter_event): Toggle syscall_state entry/return for
3034 syscall traps, and set it ignored for all others.
3035 (gdb_catching_syscalls_p): New function.
3036 (gdb_catch_this_syscall_p): New function.
3037 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3038 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3039 (linux_supports_catch_syscall): New function.
3040 (linux_target_ops): Install it.
3041 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3042 (the_low_target): Install it.
3043
8f13a3ce
MF
30442016-01-12 Mike Frysinger <vapier@gentoo.org>
3045
3046 * acinclude.m4: Include new ../warning.m4 file.
3047 * configure: Regenerated.
3048 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3049
5b3da067
MF
30502016-01-12 Mike Frysinger <vapier@gentoo.org>
3051
3052 * ax.c (is_goto_target): Mark static.
3053 * linux-low.c (register_addr): Likewise.
3054 (linux_fetch_registers, linux_store_registers): Likewise.
3055 * mem-break.c (any_persistent_commands): Fix old prototype.
3056 (add_commands_to_breakpoint): Mark static.
3057 * regcache.c (find_register_by_name): Delete unused func.
3058 * remote-utils.c (hex_or_minus_one): Mark static.
3059 * server.c (monitor_show_help): Mark static.
3060 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3061 handle_v_requests): Likewise.
3062
bc504a31
PA
30632016-01-12 Pedro Alves <palves@redhat.com>
3064
3065 Remove use of the registered trademark symbol throughout.
3066
5a0dd67a
YQ
30672016-01-08 Yao Qi <yao.qi@linaro.org>
3068
3069 * remote-utils.c (getpkt): If c is '\003', call target hook
3070 request_interrupt.
3071
b2ca446f
YQ
30722016-01-06 Yao Qi <yao.qi@linaro.org>
3073
3074 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3075 linux-aarch32-low.c.
3076 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3077 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3078 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3079 (thumb2_breakpoint): Declare.
3080 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3081 linux-aarch32-low.h.
3082 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3083 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3084 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3085
edd88788
JB
30862016-01-01 Joel Brobecker <brobecker@adacore.com>
3087
3088 * gdbreplay.c (gdbreplay_version): Change copyright year in
3089 version message.
3090 * server.c (gdbserver_version): Likewise.
3091
65da7f14
PP
30922015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3093
3094 * server.c (crc32_table): Delete.
3095 (crc32): Use libiberty's xcrc32 function.
3096
4abd5ed2
JB
30972015-12-22 Joel Brobecker <brobecker@adacore.com>
3098
3099 * lynx-low.c (lynx_delete_thread_callback): New function.
3100 (lynx_mourn): Properly delete our process and all of its
3101 threads. Remove call to clear_inferiors.
3102
0e50fe5c
JB
31032015-12-22 Joel Brobecker <brobecker@adacore.com>
3104
3105 * target.c (thread_search_callback): Add check that
3106 the thread_stopped target callback is not NULL before
3107 calling it.
3108
35adc03f
YQ
31092015-12-21 Yao Qi <yao.qi@linaro.org>
3110
3111 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3112 arm breakpoint.
3113
bd2b2909
AT
31142015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3115
3116 * server.c (handle_query): Call target_supports_software_single_step.
3117
7fe5e27e
AT
31182015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3119
3120 * linux-low.c (single_step): New function.
3121 (linux_resume_one_lwp_throw): Call single_step.
3122 (start_step_over): Likewise.
3123
d9311bfa
AT
31242015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3125
3126 * Makefile.in (SFILES): Append arch/arm-linux.c,
3127 arch/arm-get-next-pcs.c.
3128 (arm-linux.o): New rule.
3129 (arm-get-next-pcs.o): New rule.
3130 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3131 arm-linux.o.
3132 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3133 to linux-aarch32-low.c.
3134 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3135 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3136 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3137 (thumb2_breakpoint_len): Likewise.
3138 (arm_is_thumb_mode): Make non-static.
3139 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3140 from linux-aarch32-low.c.
3141 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3142 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3143 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3144 (thumb2_breakpoint_len): Likewise.
3145 (arm_is_thumb_mode): New declaration.
3146 * linux-arm-low.c: Include arch/arm-linux.h
3147 aarch/arm-get-next-pcs.h, sys/syscall.h.
3148 (get_next_pcs_ops): New struct.
3149 (get_next_pcs_addr_bits_remove): New function.
3150 (get_next_pcs_is_thumb): New function.
3151 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3152 (arm_sigreturn_next_pc): Likewise.
3153 (get_next_pcs_syscall_next_pc): Likewise.
3154 (arm_gdbserver_get_next_pcs): Likewise.
3155 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3156 Initialize.
3157 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3158 * server.h: Include gdb_vecs.h.
3159
68ce2059
AT
31602015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3161
3162 * Makefile.in (SFILES): Append common/common-regcache.c.
3163 (OBS): Append common-regcache.o.
3164 (common-regcache.o): New rule.
3165 * regcache.c (init_register_cache): Initialize cache to
3166 REG_UNAVAILABLE.
3167 (regcache_raw_read_unsigned): New function.
3168 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3169 register_status enum.
3170
fa5308bd
AT
31712015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3172
3173 * linux-aarch64-low.c (the_low_targets): Rename
3174 breakpoint_reinsert_addr to get_next_pcs.
3175 * linux-arm-low.c (the_low_targets): Likewise.
3176 * linux-bfin-low.c (the_low_targets): Likewise.
3177 * linux-cris-low.c (the_low_targets): Likewise.
3178 * linux-crisv32-low.c (the_low_targets): Likewise.
3179 * linux-low.c (can_software_single_step): Likewise.
3180 (install_software_single_step_breakpoints): New function.
3181 (start_step_over): Use install_software_single_step_breakpoints.
3182 * linux-low.h: New CORE_ADDR vector.
3183 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3184 get_next_pcs.
3185 * linux-mips-low.c (the_low_targets): Likewise.
3186 * linux-nios2-low.c (the_low_targets): Likewise.
3187 * linux-sparc-low.c (the_low_targets): Likewise.
3188
4a6ed09b
PA
31892015-12-17 Pedro Alves <palves@redhat.com>
3190
3191 * linux-low.c (linux_kill_one_lwp): Remove references to
3192 LinuxThreads.
3193 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3194 to 'kill'.
3195 (linux_init_signals): Delete.
3196 (initialize_low): Adjust.
3197 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3198
7544db95
PA
31992015-12-16 Pedro Alves <palves@redhat.com>
3200
3201 * configure.ac (compiler warning flags): When testing a
3202 -Wno-foo option, check whether -Wfoo works instead.
3203 * configure: Regenerate.
3204
8020350c
DB
32052015-12-11 Don Breazeal <donb@codesourcery.com>
3206
3207 * server.c (process_serial_event): Don't exit from gdbserver
3208 in remote mode if there are still active inferiors.
3209
db91f502
YQ
32102015-12-11 Yao Qi <yao.qi@linaro.org>
3211
3212 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3213 arm_breakpoint_at if the process is 32-bit.
3214
b37a6290
YQ
32152015-12-11 Yao Qi <yao.qi@linaro.org>
3216
3217 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3218 arm breakpoint.
3219
17b1509a
YQ
32202015-12-07 Yao Qi <yao.qi@linaro.org>
3221
3222 * configure.srv: Append arm.o to srv_tgtobj for
3223 aarch64*-*-linux* target.
3224 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3225 from linux-arm-low.c.
3226 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3227 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3228 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3229 (thumb2_breakpoint_len): Likewise.
3230 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3231 (arm_breakpoint_kinds): Likewise.
3232 (arm_breakpoint_kind_from_pc): Likewise.
3233 (arm_sw_breakpoint_from_kind): Likewise.
3234 (arm_breakpoint_kind_from_current_state): Likewise.
3235 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3236 (arm_sw_breakpoint_from_kind): Declare.
3237 (arm_breakpoint_kind_from_current_state): Declare.
3238 (arm_breakpoint_at): Declare.
3239 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3240 arm_sw_breakpoint_from_kind if process is 32-bit.
3241 (aarch64_breakpoint_kind_from_pc): New function.
3242 (aarch64_breakpoint_kind_from_current_state): New function.
3243 (the_low_target): Initialize fields breakpoint_kind_from_pc
3244 and breakpoint_kind_from_current_state.
3245 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3246 linux-aarch32-low.c.
3247 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3248 (arm_breakpoint, arm_breakpoint_len): Likewise.
3249 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3250 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3251 (arm_is_thumb_mode): Likewise.
3252 (arm_breakpoint_at): Likewise.
3253 (arm_breakpoint_kind_from_pc): Likewise.
3254 (arm_sw_breakpoint_from_kind): Likewise.
3255 (arm_breakpoint_kind_from_current_state): Likewise.
3256
3257 Revert:
3258 2015-08-04 Yao Qi <yao.qi@linaro.org>
3259
3260 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3261 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3262 * server.c (extended_protocol): Remove "static".
3263 * server.h (extended_protocol): Declare it.
3264
ece66d65
JS
32652015-12-04 Josh Stone <jistone@redhat.com>
3266
3267 * target.h (struct target_ops) <arch_setup>: Rename to ...
3268 (struct target_ops) <post_create_inferior>: ... this.
3269 (target_arch_setup): Rename to ...
3270 (target_post_create_inferior): ... this, calling post_create_inferior.
3271 * server.c (start_inferior): Update target_arch_setup calls to
3272 target_post_create_inferior.
3273 * linux-low.c (linux_low_ptrace_options): Forward declare.
3274 (linux_arch_setup): Update its comment for general use.
3275 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3276 (struct linux_target_ops): Use linux_post_create_inferior.
3277 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3278 to post_create_inferior.
3279 * nto-low.c (struct nto_target_ops): Likewise.
3280 * spu-low.c (struct spu_target_ops): Likewise.
3281 * win32-low.c (struct win32_target_ops): Likewise.
3282
e58c48b4
AT
32832015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3284
3285 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3286
fbec8956
AT
32872015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3288
3289 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3290 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3291 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3292 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3293 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3294 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3295 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3296 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3297 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3298 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3299 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3300 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3301
9b4c5f87
AT
33022015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3303
3304 * linux-low.c (linux_look_up_symbols): Don't call
3305 linux_supports_traceclone.
3306 * linux-low.h (thread_db_init): Remove use_events argument.
3307 * thread-db.c (thread_db_use_event): Remove global variable.
3308 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3309 (struct thread_db) <td_create_bp>: Remove field.
3310 (thread_db_create_event): Remove function.
3311 (thread_db_enable_reporting): Likewise.
3312 (find_one_thread): Don't check for thread_db_use_events.
3313 (attach_thread): Likewise.
3314 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3315 (try_thread_db_load_1): Don't check for thread_db_use_events.
3316 (thread_db_init): Remove use_events argument and thread events
3317 handling.
3318 (remove_thread_event_breakpoints): Remove function.
3319 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3320
7d00775e
AT
33212015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3322
3323 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3324 New function.
3325 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3326 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3327 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3328 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3329 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3330 Initialize.
3331 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3332 New function.
3333 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3334 * linux-low.c (can_hardware_single_step): Use
3335 supports_hardware_single_step.
3336 (can_software_single_step): New function.
3337 (start_step_over): Call can_software_single_step.
3338 (linux_supports_hardware_single_step): New function.
3339 (struct target_ops) <supports_software_single_step>: Initialize.
3340 * linux-low.h (struct linux_target_ops)
3341 <supports_hardware_single_step>: Initialize.
3342 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3343 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3344 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3345 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3346 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3347 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3348 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3349 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3350 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3351 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3352 Initialize.
3353 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3354 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3355 Initialize.
3356 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3357 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3358 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3359 New function.
3360 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3361 * target.h (struct target_ops): <supports_software_single_step>:
3362 New field.
3363 (target_supports_software_single_step): New macro.
3364
2d97cd35
AT
33652015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3366
3367 * linux-low.c (linux_wait_1): Fix pc advance condition.
3368 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3369 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3370
769ef81f
AT
33712015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3372
3373 * linux-arm-low.c (arm_is_thumb_mode): New function.
3374 (arm_breakpoint_at): Use arm_is_thumb_mode.
3375 (arm_breakpoint_kind_from_current_state): New function.
3376 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3377 Initialize.
3378 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3379 (linux_breakpoint_kind_from_current_state): New function.
3380 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3381 * linux-low.h (struct linux_target_ops)
3382 <breakpoint_kind_from_current_state>: New field.
3383 * target.h (struct target_ops): Likewise.
3384 (target_breakpoint_kind_from_current_state): New macro.
3385
1bebeeca
PA
33862015-11-30 Pedro Alves <palves@redhat.com>
3387
3388 * linux-low.c (linux_resume): Wake up the event loop before
3389 returning.
3390
a67a9fae
PA
33912015-11-30 Pedro Alves <palves@redhat.com>
3392
3393 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3394 check.
3395 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3396 to -1.
3397 * target.c (struct thread_search): New structure.
3398 (thread_search_callback): New function.
3399 (prev_general_thread): New global.
3400 (prepare_to_access_memory, done_accessing_memory): New functions.
3401 * target.h (prepare_to_access_memory, done_accessing_memory):
3402 Replace macros with function declarations.
3403
f2faf941
PA
34042015-11-30 Pedro Alves <palves@redhat.com>
3405
3406 PR 14618
3407 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3408 report TARGET_WAITKIND_NO_RESUMED.
3409 * remote-utils.c (prepare_resume_reply): Handle
3410 TARGET_WAITKIND_NO_RESUMED.
3411 * server.c (report_no_resumed): New global.
3412 (handle_query) <qSupported>: Handle "no-resumed+". Report
3413 "no-resumed+" support.
3414 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3415 return error if the client doesn't support no-resumed events.
3416 (push_stop_notification): New function.
3417 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3418 events if the client supports them.
3419
a681f9c9
PA
34202015-11-30 Pedro Alves <palves@redhat.com>
3421
3422 * linux-low.c (thread_still_has_status_pending_p): Don't check
3423 vCont;t here.
3424 (lwp_resumed): New function.
3425 (status_pending_p_callback): Return early if the LWP is not
3426 supposed to be resumed.
3427
65706a29
PA
34282015-11-30 Pedro Alves <palves@redhat.com>
3429
3430 * linux-low.c (handle_extended_wait): Assert that the LWP's
3431 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3432 thread create events, leave the new child's status pending.
3433 (linux_low_filter_event): If GDB wants to hear about thread exit
3434 events, leave the LWP marked dead and don't delete it.
3435 (linux_wait_for_event_filtered): Don't check for thread exit.
3436 (filter_exit_event): New function.
3437 (linux_wait_1): Use it, when returning an exit event.
3438 (linux_resume_one_lwp_throw): Assert that the LWP's
3439 waitstatus is TARGET_WAITKIND_IGNORE.
3440 * remote-utils.c (prepare_resume_reply): Handle
3441 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3442 * server.c (report_thread_events): New global.
3443 (handle_general_set): Handle QThreadEvents.
3444 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3445 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3446 TARGET_WAITKIND_THREAD_EXITED.
3447 * server.h (report_thread_events): Declare.
3448
56cf4bed
PA
34492015-11-30 Pedro Alves <palves@redhat.com>
3450
3451 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3452 the thread's last_resume_kind was resume_stop.
3453
500c1d85
PA
34542015-11-30 Pedro Alves <palves@redhat.com>
3455
3456 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3457 before returning.
3458
de979965
PA
34592015-11-30 Pedro Alves <palves@redhat.com>
3460
3461 * server.c (handle_v_requests): Handle vCtrlC.
3462
34c65914
PA
34632015-11-30 Pedro Alves <palves@redhat.com>
3464
3465 * gdbthread.h (find_any_thread_of_pid): Declare.
3466 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3467 functions.
3468 * server.c (handle_query): If current_thread is NULL, look for
3469 another thread of the selected process.
3470
79efa585 34712015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3472 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3473
3474 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3475 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3476 name in reply.
3477 * target.h (struct target_ops) <thread_name>: New field.
3478 (target_thread_name): New macro.
3479
80d82c19
JB
34802015-11-23 Joel Brobecker <brobecker@adacore.com>
3481
3482 * regcache.h (regcache_invalidate_pid): Add declaration.
3483 * regcache.c (regcache_invalidate_pid): New function, extracted
3484 from regcache_invalidate.
3485 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3486 Add trivial documentation comment.
3487 * lynx-low.c: Use regcache_invalidate_pid instead of
3488 regcache_invalidate.
3489
64da5dd5
JB
34902015-11-23 Joel Brobecker <brobecker@adacore.com>
3491
3492 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3493 and Elf64_auxv_t if the target is Android.
3494
37ce4055
DE
34952015-11-22 Doug Evans <xdje42@gmail.com>
3496
3497 * target.h: #include <sys/types.h>.
3498
06e03fff
PA
34992015-11-19 Pedro Alves <palves@redhat.com>
3500
3501 * linux-low.c (linux_process_qsupported): Change prototype.
3502 Adjust.
3503 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3504 Change prototype.
3505 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3506 and adjust to loop over all features.
3507 * server.c (handle_query) <qSupported>: Adjust to call
3508 target_process_qsupported once, passing it a vector of unprocessed
3509 features.
3510 * target.h (struct target_ops) <process_qsupported>: Change
3511 prototype.
3512 (target_process_qsupported): Adjust.
3513
9a084706
PA
35142015-11-19 Pedro Alves <palves@redhat.com>
3515
3516 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3517 mode.
3518 * configure: Regenerate.
3519
dad44a1f
PA
35202015-11-19 Pedro Alves <palves@redhat.com>
3521
3522 * configure: Regenerate.
3523
231c0592
YQ
35242015-11-19 Yao Qi <yao.qi@linaro.org>
3525
3526 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3527 type to uint32_t.
3528
6c1c9a8b
YQ
35292015-11-19 Yao Qi <yao.qi@linaro.org>
3530
3531 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3532 (struct aarch64_operand): Move enum out.
3533
9caa3311
YQ
35342015-11-19 Yao Qi <yao.qi@linaro.org>
3535
3536 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3537 struct user_fpsimd_state *.
3538 (aarch64_store_fpregset): Likewise.
3539
6a69a054
YQ
35402015-11-19 Yao Qi <yao.qi@linaro.org>
3541
3542 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3543 struct user_pt_regs *.
3544 (aarch64_store_gregset): Likewise.
3545
1798301e
PA
35462015-11-18 Pedro Alves <palves@redhat.com>
3547
3548 * Makefile.in (all_object_files): Add $IPA_OBJS.
3549
ce7715e2
PA
35502015-11-17 Pedro Alves <palves@redhat.com>
3551
3552 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3553 GDB_SIGNAL_0 and gdb_signal_to_string.
3554
c0879059
PA
35552015-11-17 Pedro Alves <palves@redhat.com>
3556
3557 * win32-low.c (handle_output_debug_string): Remove parameter.
3558 (win32_kill): Remove our_status local and adjust call to
3559 handle_output_debug_string.
3560 (get_child_debug_event): Adjust call to
3561 handle_output_debug_string.
3562
1996e237
SM
35632015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3564
3565 * linux-mips-low.c (mips_fill_gregset): Add cast.
3566 (mips_store_gregset): Likewise.
3567 (mips_fill_fpregset): Likewise.
3568 (mips_store_fpregset): Likewise.
3569
cbec665b
SM
35702015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3571
3572 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3573 priv.
3574
eb3e3c67
SM
35752015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3576
3577 * linux-mips-low.c (mips_linux_new_thread): Change type of
3578 watch_type to enum target_hw_bp_type.
3579
171de4b8
SM
35802015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3581
3582 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3583 Change return type to arm_hwbp_type.
3584
04248ead
SM
35852015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3586
3587 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3588 (arm_store_gregset): Likewise.
3589 * linux-arm-low.c (arm_get_hwcap): Likewise.
3590 (arm_read_description): Likewise.
3591
04b3479c
SM
35922015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3593
3594 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3595
2bc84e8a
SM
35962015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3597
3598 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3599 (ppc_fill_vsxregset): Likewise.
3600 (ppc_store_vsxregset): Likewise.
3601 (ppc_fill_vrregset): Likewise.
3602 (ppc_store_vrregset): Likewise.
3603 (ppc_fill_evrregset): Likewise.
3604 (ppc_store_evrregset): Likewise.
3605
e6c5bb05
SM
36062015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3607
3608 * linux-ppc-low.c (ppc_usrregs_info): Remove
3609 forward-declaration.
3610 (ppc_arch_setup): Move lower in file.
3611
7ea45d72
SM
36122015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3613
3614 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3615 (ps_pdwrite): Likewise.
3616
69291610
HW
36172015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3618
3619 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3620 to after assert checks.
3621
b42945fd
SM
36222015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3623
3624 * proc-service.c (ps_pdread): Add/adjust casts.
3625 (ps_pdwrite): Add/adjust casts.
3626
d6f85c84
SM
36272015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3628
3629 * server.c (handle_search_memory_1): Cast return value of
3630 memmem.
3631
f98cd059
SM
36322015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3633
3634 * server.c (write_qxfer_response): Change type of data to
3635 gdb_byte *.
3636
d2412fa5
PA
36372015-10-29 Pedro Alves <palves@redhat.com>
3638
3639 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3640
c17414a2
PA
36412015-10-29 Pedro Alves <palves@redhat.com>
3642
3643 * tracepoint.c (clear_installed_tracepoints): Add casts.
3644
e053fbc4
PA
36452015-10-29 Pedro Alves <palves@redhat.com>
3646
3647 * server.c (handle_v_cont, process_serial_event): Add enum
3648 gdb_signal casts to signal parsing code.
3649
add67df8
PA
36502015-10-29 Pedro Alves <palves@redhat.com>
3651
3652 * linux-low.h (NULL_REGSET): Define.
3653 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3654 * linux-arm-low.c (arm_regsets): Likewise.
3655 * linux-crisv32-low.c (cris_regsets): Likewise.
3656 * linux-m68k-low.c (m68k_regsets): Likewise.
3657 * linux-mips-low.c (mips_regsets): Likewise.
3658 * linux-nios2-low.c (nios2_regsets): Likewise.
3659 * linux-ppc-low.c (ppc_regsets): Likewise.
3660 * linux-s390-low.c (s390_regsets): Likewise.
3661 * linux-sh-low.c (sh_regsets): Likewise.
3662 * linux-sparc-low.c (sparc_regsets): Likewise.
3663 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3664 * linux-tile-low.c (tile_regsets): Likewise.
3665 * linux-x86-low.c (x86_regsets): Likewise.
3666 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3667
50bc912a
PA
36682015-10-29 Pedro Alves <palves@redhat.com>
3669
3670 * linux-low.h (NULL_REGSET): Define.
3671 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3672 * linux-arm-low.c (arm_regsets): Likewise.
3673 * linux-crisv32-low.c (cris_regsets): Likewise.
3674 * linux-m68k-low.c (m68k_regsets): Likewise.
3675 * linux-mips-low.c (mips_regsets): Likewise.
3676 * linux-nios2-low.c (nios2_regsets): Likewise.
3677 * linux-ppc-low.c (ppc_regsets): Likewise.
3678 * linux-s390-low.c (s390_regsets): Likewise.
3679 * linux-sh-low.c (sh_regsets): Likewise.
3680 * linux-sparc-low.c (sparc_regsets): Likewise.
3681 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3682 * linux-tile-low.c (tile_regsets): Likewise.
3683 * linux-x86-low.c (x86_regsets): Likewise.
3684 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3685
682b2546
DE
36862015-10-26 Doug Evans <dje@google.com>
3687
3688 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3689
963843d4
DE
36902015-10-26 Doug Evans <dje@google.com>
3691
3692 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3693
d41401ac
DE
36942015-10-26 Doug Evans <dje@google.com>
3695
3696 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3697 for debug_printf.
3698 (attach_thread, find_new_threads_callback): Ditto.
3699
3db28855
AT
37002015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3701
3702 * mem-break.h (set_breakpoint_data): Remove.
3703
fb78e89c
AT
37042015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3705
3706 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3707 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3708 (initialize_low): Remove set_breakpoint_data call.
3709 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3710 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3711 (initialize_low): Remove set_breakpoint_data call.
3712 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3713 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3714 (initialize_low): Remove set_breakpoint_data call.
3715
2e6ee069
AT
37162015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3717
3718 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3719 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3720 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3721 * target.h (target_breakpoint_kind_from_pc): New macro.
3722
1652a986
AT
37232015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3724
3725 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3726 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3727 the default breakpoint kind.
3728
abeead09
AT
37292015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3730
3731 * linux-arm-low.c (arm_supports_z_point_type): Add software
3732 breakpoint support.
3733
b0b4b501
AT
37342015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3735
3736 * linux-arm-low.c: Refactor breakpoint definitions.
3737 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3738 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3739
8689682c
AT
37402015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3741
3742 * Makefile.in: Add arm.c/o.
3743 * configure.srv: Likewise.
3744 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3745 (arm_breakpoint_kind_from_pc): New function.
3746 (arm_sw_breakpoint_from_kind): Return proper kind.
3747 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3748
27165294
AT
37492015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3750
3751 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3752 removal.
3753 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3754 (struct raw_breakpoint) <size>: Remove.
3755 (struct raw_breakpoint) <kind>: Add.
3756 (bp_size): New function.
3757 (bp_opcode): Likewise.
3758 (find_raw_breakpoint_at): Adjust for kind.
3759 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3760 (remove_memory_breakpoint): Adjust for kind call bp_size.
3761 (set_raw_breakpoint_at): Adjust for kind.
3762 (set_breakpoint): Likewise.
3763 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3764 (delete_raw_breakpoint): Adjust for kind.
3765 (delete_breakpoint): Likewise.
3766 (find_gdb_breakpoint): Likewise.
3767 (set_gdb_breakpoint_1): Likewise.
3768 (set_gdb_breakpoint): Likewise.
3769 (delete_gdb_breakpoint_1): Likewise.
3770 (delete_gdb_breakpoint): Likewise.
3771 (uninsert_raw_breakpoint): Likewise.
3772 (reinsert_raw_breakpoint): Likewise.
3773 (set_breakpoint_data): Remove.
3774 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3775 (check_mem_read): Adjust for kind call bp_size.
3776 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3777 (clone_one_breakpoint): Adjust for kind.
3778 * mem-break.h (set_gdb_breakpoint): Likewise.
3779 (delete_gdb_breakpoint): Likewise.
3780 * server.c (process_serial_event): Likewise.
3781
dd373349
AT
37822015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3783
3784 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3785 (struct linux_target_ops) <breakpoint>: Remove.
3786 (struct linux_target_ops) <breakpoint_len>: Remove.
3787 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3788 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3789 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3790 (arm_sw_breakpoint_from_kind): New function.
3791 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3792 (struct linux_target_ops) <breakpoint>: Remove.
3793 (struct linux_target_ops) <breakpoint_len>: Remove.
3794 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3795 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3796 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3797 (struct linux_target_ops) <breakpoint>: Remove.
3798 (struct linux_target_ops) <breakpoint_len>: Remove.
3799 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3800 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3801 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3802 (struct linux_target_ops) <breakpoint>: Remove.
3803 (struct linux_target_ops) <breakpoint_len>: Remove.
3804 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3805 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3806 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3807 and sw_breakpoint_from_kind to increment the pc.
3808 (linux_breakpoint_kind_from_pc): New function.
3809 (linux_sw_breakpoint_from_kind): New function.
3810 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3811 (initialize_low): Call breakpoint_kind_from_pc and
3812 sw_breakpoint_from_kind to replace breakpoint_data/len.
3813 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3814 New field.
3815 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3816 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3817 (struct linux_target_ops) <breakpoint>: Remove.
3818 (struct linux_target_ops) <breakpoint_len>: Remove.
3819 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3820 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3821 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3822 (struct linux_target_ops) <breakpoint>: Remove.
3823 (struct linux_target_ops) <breakpoint_len>: Remove.
3824 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3825 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3826 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3827 (struct linux_target_ops) <breakpoint>: Remove.
3828 (struct linux_target_ops) <breakpoint_len>: Remove.
3829 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3830 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3831 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3832 (struct linux_target_ops) <breakpoint>: Remove.
3833 (struct linux_target_ops) <breakpoint_len>: Remove.
3834 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3835 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3836 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3837 (struct linux_target_ops) <breakpoint>: Remove.
3838 (struct linux_target_ops) <breakpoint_len>: Remove.
3839 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3840 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3841 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3842 (struct linux_target_ops) <breakpoint>: Remove.
3843 (struct linux_target_ops) <breakpoint_len>: Remove.
3844 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3845 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3846 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3847 (struct linux_target_ops) <breakpoint>: Remove.
3848 (struct linux_target_ops) <breakpoint_len>: Remove.
3849 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3850 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3851 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3852 (struct linux_target_ops) <breakpoint>: Remove.
3853 (struct linux_target_ops) <breakpoint_len>: Remove.
3854 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3855 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3856 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3857 (struct linux_target_ops) <breakpoint>: Remove.
3858 (struct linux_target_ops) <breakpoint_len>: Remove.
3859 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3860 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3861 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3862 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3863 (struct linux_target_ops) <breakpoint>: Remove.
3864 (struct linux_target_ops) <breakpoint_len>: Remove.
3865 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3866 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3867 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3868 (struct linux_target_ops) <breakpoint>: Remove.
3869 (struct linux_target_ops) <breakpoint_len>: Remove.
3870 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3871 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3872
4cd98a19
AT
38732015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3874
3875 * linux-cris-low.c (cris_get_pc): Remove void arg.
3876
774ee6d2
AR
38772015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3878
3879 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3880 variable name.
3881
833dcd29
AR
38822015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3883
3884 * inferiors.c (thread_pid_matches_callback): New function.
3885 (find_thread_process): New function.
3886 (remove_thread): Reset current_thread.
3887 (remove_process): Assert threads have been removed first.
3888
8d689ee5
YQ
38892015-10-15 Yao Qi <yao.qi@linaro.org>
3890
3891 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3892 if it is 3.
3893 (aarch64_remove_point): Likewise.
3894 * regcache.c (regcache_register_size): New function.
3895
1c2e1515
YQ
38962015-10-12 Yao Qi <yao.qi@linaro.org>
3897
3898 * linux-aarch64-low.c: Update all callers as emit_load_store
3899 is renamed to aarch64_emit_load_store.
3900
e1c587c3
YQ
39012015-10-12 Yao Qi <yao.qi@linaro.org>
3902
3903 * linux-aarch64-low.c: Update all callers of function renaming
3904 from emit_insn to aarch64_emit_insn.
3905
b6542f81
YQ
39062015-10-12 Yao Qi <yao.qi@linaro.org>
3907
3908 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3909 arch/aarch64-insn.h.
3910 (struct aarch64_memory_operand): Likewise.
3911 (ENCODE): Likewise.
3912 (emit_insn): Move to arch/aarch64-insn.c.
3913 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3914 (emit_load_store): Move to arch/aarch64-insn.c.
3915 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3916 (can_encode_int32): Remove.
3917
246994ce
YQ
39182015-10-12 Yao Qi <yao.qi@linaro.org>
3919
3920 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3921 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3922 (aarch64_relocate_instruction): Likewise.
3923 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3924 (struct aarch64_insn_visitor): Likewise.
3925
0badd99f
YQ
39262015-10-12 Yao Qi <yao.qi@linaro.org>
3927
3928 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3929 (struct aarch64_insn_visitor): New.
3930 (struct aarch64_insn_relocation_data): New.
3931 (aarch64_ftrace_insn_reloc_b): New function.
3932 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3933 (aarch64_ftrace_insn_reloc_cb): Likewise.
3934 (aarch64_ftrace_insn_reloc_tb): Likewise.
3935 (aarch64_ftrace_insn_reloc_adr): Likewise.
3936 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3937 (aarch64_ftrace_insn_reloc_others): Likewise.
3938 (visitor): New.
3939 (aarch64_relocate_instruction): Use visitor.
3940
dfaffe9d
YQ
39412015-10-12 Yao Qi <yao.qi@linaro.org>
3942
3943 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3944 int. Add argument buf.
3945 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3946 aarch64_relocate_instruction.
3947
70b439f0
YQ
39482015-10-12 Yao Qi <yao.qi@linaro.org>
3949
3950 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3951 argument insn. Remove local variable insn. Don't call
3952 target_read_uint32.
3953 (aarch64_install_fast_tracepoint_jump_pad): Call
3954 target_read_uint32.
3955
7781c06f
YQ
39562015-09-30 Yao Qi <yao.qi@linaro.org>
3957
3958 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3959 (emit_load_store_pair): Likewise.
3960
9a3c8263
SM
39612015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3962
3963 * dll.c (match_dll): Add cast(s).
3964 (unloaded_dll): Likewise.
3965 * linux-low.c (second_thread_of_pid_p): Likewise.
3966 (delete_lwp_callback): Likewise.
3967 (count_events_callback): Likewise.
3968 (select_event_lwp_callback): Likewise.
3969 (linux_set_resume_request): Likewise.
3970 * server.c (accumulate_file_name_length): Likewise.
3971 (emit_dll_description): Likewise.
3972 (handle_qxfer_threads_worker): Likewise.
3973 (visit_actioned_threads): Likewise.
3974 * thread-db.c (any_thread_of): Likewise.
3975 * tracepoint.c (same_process_p): Likewise.
3976 (match_blocktype): Likewise.
3977 (build_traceframe_info_xml): Likewise.
3978
224c3ddb
SM
39792015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3980
3981 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3982 assignment.
3983 (gdb_unparse_agent_expr): Likewise.
3984 * hostio.c (require_data): Likewise.
3985 (handle_pread): Likewise.
3986 * linux-low.c (disable_regset): Likewise.
3987 (fetch_register): Likewise.
3988 (store_register): Likewise.
3989 (get_dynamic): Likewise.
3990 (linux_qxfer_libraries_svr4): Likewise.
3991 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3992 (set_fast_tracepoint_jump): Likewise.
3993 (uninsert_fast_tracepoint_jumps_at): Likewise.
3994 (reinsert_fast_tracepoint_jumps_at): Likewise.
3995 (validate_inserted_breakpoint): Likewise.
3996 (clone_agent_expr): Likewise.
3997 * regcache.c (init_register_cache): Likewise.
3998 * remote-utils.c (putpkt_binary_1): Likewise.
3999 (decode_M_packet): Likewise.
4000 (decode_X_packet): Likewise.
4001 (look_up_one_symbol): Likewise.
4002 (relocate_instruction): Likewise.
4003 (monitor_output): Likewise.
4004 * server.c (handle_search_memory): Likewise.
4005 (handle_qxfer_exec_file): Likewise.
4006 (handle_qxfer_libraries): Likewise.
4007 (handle_qxfer): Likewise.
4008 (handle_query): Likewise.
4009 (handle_v_cont): Likewise.
4010 (handle_v_run): Likewise.
4011 (captured_main): Likewise.
4012 * target.c (write_inferior_memory): Likewise.
4013 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4014 * tracepoint.c (init_trace_buffer): Likewise.
4015 (add_tracepoint_action): Likewise.
4016 (add_traceframe): Likewise.
4017 (add_traceframe_block): Likewise.
4018 (cmd_qtdpsrc): Likewise.
4019 (cmd_qtdv): Likewise.
4020 (cmd_qtstatus): Likewise.
4021 (response_source): Likewise.
4022 (response_tsv): Likewise.
4023 (cmd_qtnotes): Likewise.
4024 (gdb_collect): Likewise.
4025 (initialize_tracepoint): Likewise.
4026
afbe19f8
PL
40272015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4028
4029 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4030 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4031 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4032 <NOP>: New.
4033 (enum aarch64_condition_codes): New enum.
4034 (w0): New static global.
4035 (fp): Likewise.
4036 (lr): Likewise.
4037 (struct aarch64_memory_operand) <type>: New
4038 MEMORY_OPERAND_POSTINDEX type.
4039 (postindex_memory_operand): New helper function.
4040 (emit_ret): New function.
4041 (emit_load_store_pair): New function, factored out of emit_stp
4042 with support for MEMORY_OPERAND_POSTINDEX.
4043 (emit_stp): Rewrite using emit_load_store_pair.
4044 (emit_ldp): New function.
4045 (emit_load_store): Likewise.
4046 (emit_ldr): Mention post-index instruction in comment.
4047 (emit_ldrh): New function.
4048 (emit_ldrb): New function.
4049 (emit_ldrsw): Mention post-index instruction in comment.
4050 (emit_str): Likewise.
4051 (emit_subs): New function.
4052 (emit_cmp): Likewise.
4053 (emit_and): Likewise.
4054 (emit_orr): Likewise.
4055 (emit_orn): Likewise.
4056 (emit_eor): Likewise.
4057 (emit_mvn): Likewise.
4058 (emit_lslv): Likewise.
4059 (emit_lsrv): Likewise.
4060 (emit_asrv): Likewise.
4061 (emit_mul): Likewise.
4062 (emit_sbfm): Likewise.
4063 (emit_sbfx): Likewise.
4064 (emit_ubfm): Likewise.
4065 (emit_ubfx): Likewise.
4066 (emit_csinc): Likewise.
4067 (emit_cset): Likewise.
4068 (emit_nop): Likewise.
4069 (emit_ops_insns): New helper function.
4070 (emit_pop): Likewise.
4071 (emit_push): Likewise.
4072 (aarch64_emit_prologue): New function.
4073 (aarch64_emit_epilogue): Likewise.
4074 (aarch64_emit_add): Likewise.
4075 (aarch64_emit_sub): Likewise.
4076 (aarch64_emit_mul): Likewise.
4077 (aarch64_emit_lsh): Likewise.
4078 (aarch64_emit_rsh_signed): Likewise.
4079 (aarch64_emit_rsh_unsigned): Likewise.
4080 (aarch64_emit_ext): Likewise.
4081 (aarch64_emit_log_not): Likewise.
4082 (aarch64_emit_bit_and): Likewise.
4083 (aarch64_emit_bit_or): Likewise.
4084 (aarch64_emit_bit_xor): Likewise.
4085 (aarch64_emit_bit_not): Likewise.
4086 (aarch64_emit_equal): Likewise.
4087 (aarch64_emit_less_signed): Likewise.
4088 (aarch64_emit_less_unsigned): Likewise.
4089 (aarch64_emit_ref): Likewise.
4090 (aarch64_emit_if_goto): Likewise.
4091 (aarch64_emit_goto): Likewise.
4092 (aarch64_write_goto_address): Likewise.
4093 (aarch64_emit_const): Likewise.
4094 (aarch64_emit_call): Likewise.
4095 (aarch64_emit_reg): Likewise.
4096 (aarch64_emit_pop): Likewise.
4097 (aarch64_emit_stack_flush): Likewise.
4098 (aarch64_emit_zero_ext): Likewise.
4099 (aarch64_emit_swap): Likewise.
4100 (aarch64_emit_stack_adjust): Likewise.
4101 (aarch64_emit_int_call_1): Likewise.
4102 (aarch64_emit_void_call_2): Likewise.
4103 (aarch64_emit_eq_goto): Likewise.
4104 (aarch64_emit_ne_goto): Likewise.
4105 (aarch64_emit_lt_goto): Likewise.
4106 (aarch64_emit_le_goto): Likewise.
4107 (aarch64_emit_gt_goto): Likewise.
4108 (aarch64_emit_ge_got): Likewise.
4109 (aarch64_emit_ops_impl): New static global variable.
4110 (aarch64_emit_ops): New target function, return
4111 &aarch64_emit_ops_impl.
4112 (struct linux_target_ops): Install it.
4113
bb903df0
PL
41142015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4115
4116 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4117 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4118 aarch64-ipa.o.
4119 * linux-aarch64-ipa.c: New file.
4120 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4121 and endian.h.
4122 (aarch64_get_thread_area): New target method.
4123 (extract_signed_bitfield): New helper function.
4124 (aarch64_decode_ldr_literal): New function.
4125 (enum aarch64_opcodes): New enum.
4126 (struct aarch64_register): New struct.
4127 (struct aarch64_operand): New struct.
4128 (x0): New static global.
4129 (x1): Likewise.
4130 (x2): Likewise.
4131 (x3): Likewise.
4132 (x4): Likewise.
4133 (w2): Likewise.
4134 (ip0): Likewise.
4135 (sp): Likewise.
4136 (xzr): Likewise.
4137 (aarch64_register): New helper function.
4138 (register_operand): Likewise.
4139 (immediate_operand): Likewise.
4140 (struct aarch64_memory_operand): New struct.
4141 (offset_memory_operand): New helper function.
4142 (preindex_memory_operand): Likewise.
4143 (enum aarch64_system_control_registers): New enum.
4144 (ENCODE): New macro.
4145 (emit_insn): New helper function.
4146 (emit_b): New function.
4147 (emit_bcond): Likewise.
4148 (emit_cb): Likewise.
4149 (emit_tb): Likewise.
4150 (emit_blr): Likewise.
4151 (emit_stp): Likewise.
4152 (emit_ldp_q_offset): Likewise.
4153 (emit_stp_q_offset): Likewise.
4154 (emit_load_store): Likewise.
4155 (emit_ldr): Likewise.
4156 (emit_ldrsw): Likewise.
4157 (emit_str): Likewise.
4158 (emit_ldaxr): Likewise.
4159 (emit_stxr): Likewise.
4160 (emit_stlr): Likewise.
4161 (emit_data_processing_reg): Likewise.
4162 (emit_data_processing): Likewise.
4163 (emit_add): Likewise.
4164 (emit_sub): Likewise.
4165 (emit_mov): Likewise.
4166 (emit_movk): Likewise.
4167 (emit_mov_addr): Likewise.
4168 (emit_mrs): Likewise.
4169 (emit_msr): Likewise.
4170 (emit_sevl): Likewise.
4171 (emit_wfe): Likewise.
4172 (append_insns): Likewise.
4173 (can_encode_int32_in): New helper function.
4174 (aarch64_relocate_instruction): New function.
4175 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4176 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4177 (struct linux_target_ops): Install aarch64_get_thread_area,
4178 aarch64_install_fast_tracepoint_jump_pad and
4179 aarch64_get_min_fast_tracepoint_insn_len.
4180
787749ea
PL
41812015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4182
4183 * Makefile.in (aarch64-insn.o): New rule.
4184 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4185
9812b2e6
YQ
41862015-09-21 Yao Qi <yao.qi@linaro.org>
4187
4188 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4189
18fe412b
YQ
41902015-09-21 Yao Qi <yao.qi@linaro.org>
4191
4192 * tracepoint.c (max_jump_pad_size): Remove.
4193
a0cc84cd
YQ
41942015-09-18 Yao Qi <yao.qi@linaro.org>
4195
4196 * linux-aarch64-low.c: Don't include sys/uio.h.
4197 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4198
d78908cf
WW
41992015-09-16 Wei-cheng Wang <cole945@gmail.com>
4200
4201 * tracepoint.c (eval_result_type): Change prototype.
4202 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4203
d57e0d50
PA
42042015-09-15 Pedro Alves <palves@redhat.com>
4205
4206 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4207 Check whether to report exec events instead of checking whether
4208 multiprocess is enabled.
4209
5a676acc
PA
42102015-09-15 Pedro Alves <palves@redhat.com>
4211
4212 PR remote/18965
4213 * remote-utils.c (prepare_resume_reply): Merge
4214 TARGET_WAITKIND_VFORK_DONE switch case with the
4215 TARGET_WAITKIND_FORKED case.
4216
7c5d0fad
YQ
42172015-09-15 Yao Qi <yao.qi@linaro.org>
4218
4219 * server.c (handle_query): Check string comparison using
4220 "else if" instead of "if".
4221
750ce8d1
YQ
42222015-09-15 Yao Qi <yao.qi@linaro.org>
4223
4224 * server.c (vCont_supported): New global variable.
4225 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4226 matches. Append ";vContSupported+" to own_buf.
4227 (handle_v_requests): Append ";s;S" to own_buf if target supports
4228 hardware single step or vCont_supported is false.
4229 (capture_main): Set vCont_supported to zero.
4230
70b90b91
YQ
42312015-09-15 Yao Qi <yao.qi@linaro.org>
4232
4233 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4234 it to ...
4235 (linux_supports_hardware_single_step): ... New function.
4236 (linux_target_ops): Update.
4237 * lynx-low.c (lynx_target_ops): Set field
4238 supports_hardware_single_step to target_can_do_hardware_single_step.
4239 * nto-low.c (nto_target_ops): Likewise.
4240 * spu-low.c (spu_target_ops): Likewise.
4241 * win32-low.c (win32_target_ops): Likewise.
4242 * target.c (target_can_do_hardware_single_step): New function.
4243 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4244 Remove. <supports_hardware_single_step>: New field.
4245 (target_supports_conditional_breakpoints): Remove.
4246 (target_supports_hardware_single_step): New macro.
4247 (target_can_do_hardware_single_step): Declare.
4248 * server.c (handle_query): Use target_supports_hardware_single_step
4249 instead of target_supports_conditional_breakpoints.
4250
ade90bde
YQ
42512015-09-15 Yao Qi <yao.qi@linaro.org>
4252
4253 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4254 function.
4255 (struct linux_target_ops the_low_target): Install
4256 aarch64_linux_siginfo_fixup.
4257
94585166
DB
42582015-09-11 Don Breazeal <donb@codesourcery.com>
4259 Luis Machado <lgustavo@codesourcery.com>
4260
4261 * linux-low.c (linux_mourn): Static declaration.
4262 (linux_arch_setup): Move in front of
4263 handle_extended_wait.
4264 (linux_arch_setup_thread): New function.
4265 (handle_extended_wait): Handle exec events. Call
4266 linux_arch_setup_thread. Make event_lwp argument a
4267 pointer-to-a-pointer.
4268 (check_zombie_leaders): Do not check stopped threads.
4269 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4270 (linux_low_filter_event): Add lwp and thread for exec'ing
4271 non-leader thread if leader thread has been deleted.
4272 Refactor code into linux_arch_setup_thread and call it.
4273 Pass child lwp pointer by reference to handle_extended_wait.
4274 (linux_wait_for_event_filtered): Update comment.
4275 (linux_wait_1): Prevent clobbering exec event status.
4276 (linux_supports_exec_events): New function.
4277 (linux_target_ops) <supports_exec_events>: Initialize new member.
4278 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4279 new member.
4280 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4281 * server.c (report_exec_events): New global variable.
4282 (handle_query): Handle qSupported query for exec-events feature.
4283 (captured_main): Initialize report_exec_events.
4284 * server.h (report_exec_events): Declare new global variable.
4285 * target.h (struct target_ops) <supports_exec_events>: New
4286 member.
4287 (target_supports_exec_events): New macro.
4288 * win32-low.c (win32_target_ops) <supports_exec_events>:
4289 Initialize new member.
4290
0568462b
MM
42912015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4292
4293 * linux-low.c (linux_low_enable_btrace): Remove.
4294 (linux_target_ops): Replace linux_low_enable_btrace with
4295 linux_enable_btrace.
4296
39edd165
YQ
42972015-09-03 Yao Qi <yao.qi@linaro.org>
4298
4299 * linux-aarch64-low.c (aarch64_insert_point): Call
4300 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4301 returns true.
4302
1db33b5a
UW
43032015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4304
4305 * linux-low.c (check_stopped_by_breakpoint): Use
4306 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4307
ab290430
PA
43082015-08-27 Pedro Alves <palves@redhat.com>
4309
4310 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4311
8d749320
SM
43122015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4313
6711b7f8
SM
4314 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4315 the XNEW-family equivalent.
8d749320
SM
4316 (compile_bytecodes): Likewise.
4317 * dll.c (loaded_dll): Likewise.
4318 * event-loop.c (append_callback_event): Likewise.
4319 (create_file_handler): Likewise.
4320 (create_file_event): Likewise.
4321 * hostio.c (handle_open): Likewise.
4322 * inferiors.c (add_thread): Likewise.
4323 (add_process): Likewise.
4324 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4325 * linux-arm-low.c (arm_new_process): Likewise.
4326 (arm_new_thread): Likewise.
4327 * linux-low.c (add_to_pid_list): Likewise.
4328 (linux_add_process): Likewise.
4329 (handle_extended_wait): Likewise.
4330 (add_lwp): Likewise.
4331 (enqueue_one_deferred_signal): Likewise.
4332 (enqueue_pending_signal): Likewise.
4333 (linux_resume_one_lwp_throw): Likewise.
4334 (linux_resume_one_thread): Likewise.
4335 (linux_read_memory): Likewise.
4336 (linux_write_memory): Likewise.
4337 * linux-mips-low.c (mips_linux_new_process): Likewise.
4338 (mips_linux_new_thread): Likewise.
4339 (mips_add_watchpoint): Likewise.
4340 * linux-x86-low.c (initialize_low_arch): Likewise.
4341 * lynx-low.c (lynx_add_process): Likewise.
4342 * mem-break.c (set_raw_breakpoint_at): Likewise.
4343 (set_breakpoint): Likewise.
4344 (add_condition_to_breakpoint): Likewise.
4345 (add_commands_to_breakpoint): Likewise.
4346 (clone_agent_expr): Likewise.
4347 (clone_one_breakpoint): Likewise.
4348 * regcache.c (new_register_cache): Likewise.
4349 * remote-utils.c (look_up_one_symbol): Likewise.
4350 * server.c (queue_stop_reply): Likewise.
4351 (start_inferior): Likewise.
4352 (queue_stop_reply_callback): Likewise.
4353 (handle_target_event): Likewise.
4354 * spu-low.c (fetch_ppc_memory): Likewise.
4355 (store_ppc_memory): Likewise.
4356 * target.c (set_target_ops): Likewise.
4357 * thread-db.c (thread_db_load_search): Likewise.
4358 (try_thread_db_load_1): Likewise.
4359 * tracepoint.c (add_tracepoint): Likewise.
4360 (add_tracepoint_action): Likewise.
4361 (create_trace_state_variable): Likewise.
4362 (cmd_qtdpsrc): Likewise.
4363 (cmd_qtro): Likewise.
4364 (add_while_stepping_state): Likewise.
4365 * win32-low.c (child_add_thread): Likewise.
4366 (get_image_name): Likewise.
4367
ed8b7b42
YQ
43682015-08-25 Yao Qi <yao.qi@linaro.org>
4369
4370 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4371
db3cb7cb
YQ
43722015-08-25 Yao Qi <yao.qi@linaro.org>
4373
4374 * Makefile.in (aarch64-linux.o): New rule.
4375 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4376 srv_tgtobj.
4377 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4378 (aarch64_init_debug_reg_state): Make it extern.
4379 (aarch64_linux_prepare_to_resume): Remove.
4380
f6011a1c
YQ
43812015-08-25 Yao Qi <yao.qi@linaro.org>
4382
4383 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4384 lwp_arch_private_info and ptid_of_lwp.
4385
88e2cf7e
YQ
43862015-08-25 Yao Qi <yao.qi@linaro.org>
4387
4388 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4389 Find proc_info by find_process_pid. All callers updated.
4390
5e35436e
YQ
43912015-08-25 Yao Qi <yao.qi@linaro.org>
4392
4393 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4394 Remove.
4395 (debug_reg_change_callback): Remove.
4396 (aarch64_notify_debug_reg_change): Remove.
4397
4a8a7965
YQ
43982015-08-25 Yao Qi <yao.qi@linaro.org>
4399
4400 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4401 Call current_lwp_ptid.
4402
32a271ee
YQ
44032015-08-25 Yao Qi <yao.qi@linaro.org>
4404
4405 * linux-aarch64-low.c (debug_reg_change_callback): Use
4406 debug_printf.
4407
0d51c8d7
YQ
44082015-08-25 Yao Qi <yao.qi@linaro.org>
4409
4410 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4411
31a43dd5
YQ
44122015-08-25 Yao Qi <yao.qi@linaro.org>
4413
4414 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4415
8ee52567
YQ
44162015-08-25 Yao Qi <yao.qi@linaro.org>
4417
4418 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4419 the code.
4420
ff3f0f45
YQ
44212015-08-25 Yao Qi <yao.qi@linaro.org>
4422
4423 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4424 Remove.
4425 (debug_reg_change_callback): Remove argument entry and add argument
4426 lwp. Remove local variable thread. Don't print thread id in the
4427 debugging output. Don't check whether pid of thread equals to pid.
4428 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4429 iterate_over_lwps instead find_inferior.
4430
3d40fbb5
PA
44312015-08-24 Pedro Alves <palves@redhat.com>
4432
4433 * inferiors.c (get_first_process): New function.
4434 * inferiors.h (get_first_process): New declaration.
4435 * remote-utils.c (read_ptid): Default to the first process in the
4436 list, instead of to the current thread's process.
4437
438e1e42
PA
44382015-08-24 Pedro Alves <palves@redhat.com>
4439
4440 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4441 * event-loop.c: Likewise.
4442 * remote-utils.c: Likewise.
4443 * tracepoint.c: Likewise.
4444
a8c6d4fc
PA
44452015-08-24 Pedro Alves <palves@redhat.com>
4446
4447 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4448 ptid_get_lwp.
4449
99b0bb12
PA
44502015-08-21 Pedro Alves <palves@redhat.com>
4451
4452 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4453 instead of literal 1.
4454
f8904751
PA
44552015-08-21 Pedro Alves <palves@redhat.com>
4456
4457 * tdesc.c (default_description): Explicitly zero-initialize.
4458
465a859e
PA
44592015-08-21 Pedro Alves <palves@redhat.com>
4460
4461 PR gdb/18749
4462 * inferiors.c (remove_thread): Discard any pending stop reply for
4463 this thread.
4464 * server.c (remove_all_on_match_pid): Rename to ...
4465 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4466 instead of a pid.
4467 (discard_queued_stop_replies): Change parameter to a ptid. Now
4468 extern.
4469 (handle_v_kill, kill_inferior_callback, captured_main)
4470 (process_serial_event): Adjust.
4471 * server.h (discard_queued_stop_replies): Declare.
4472
f0db101d
PA
44732015-08-21 Pedro Alves <palves@redhat.com>
4474
4475 * linux-low.c (wait_for_sigstop): Always switch to no thread
4476 selected if the previously current thread dies.
4477 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4478 process instead of the current thread's.
4479 * remote-utils.c (input_interrupt): Don't check if there's no
4480 current thread.
4481 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4482 current thread to the general thread fails, error out.
4483 (handle_qxfer_auxv, handle_qxfer_libraries)
4484 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4485 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4486 (handle_query): Check if there's a thread selected instead of
4487 checking whether there's any thread in the thread list.
4488 (handle_qxfer_threads, handle_qxfer_btrace)
4489 (handle_qxfer_btrace_conf): Don't error out early if there's no
4490 thread in the thread list.
4491 (handle_v_cont, myresume): Don't set the current thread to the
4492 continue thread.
4493 (process_serial_event) <Hg handling>: Also set thread_id if the
4494 previous general thread is still alive.
4495 (process_serial_event) <g/G handling>: If setting the current
4496 thread to the general thread fails, error out.
4497 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4498 thread's lwp instead of the current thread's.
4499 * target.c (set_desired_thread): If the desired thread was not
4500 found, leave the current thread pointing to NULL. Return an int
4501 (boolean) indicating success.
4502 * target.h (set_desired_thread): Change return type to int.
4503
40045d91
MF
45042015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4505
4506 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4507 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4508 #includes.
4509 (ps_get_thread_area): New function.
4510
45face3b
GB
45112015-08-19 Gary Benson <gbenson@redhat.com>
4512
4513 * hostio.c (handle_pread): Do not attempt to read more data
4514 than hostio_reply_with_data can fit in a packet.
4515
16d5f642
JB
45162015-08-18 Joel Brobecker <brobecker@adacore.com>
4517
4518 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4519
a738da3a
MF
45202015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4521
4522 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4523
33ebda9d
PA
45242015-08-06 Pedro Alves <palves@redhat.com>
4525
4526 * tracepoint.c (expr_eval_result): Now an int.
4527
a44892be
PA
45282015-08-06 Pedro Alves <palves@redhat.com>
4529
4530 * gdbthread.h (struct regcache): Forward declare.
4531 (struct thread_info) <regcache_data>: Now a struct regcache
4532 pointer.
4533 * inferiors.c (inferior_regcache_data)
4534 (set_inferior_regcache_data): Now work with struct regcache
4535 pointers.
4536 * inferiors.h (struct regcache): Forward declare.
4537 (inferior_regcache_data, set_inferior_regcache_data): Now work
4538 with struct regcache pointers.
4539 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4540 (free_register_cache_thread): Remove struct regcache pointer
4541 casts.
4542
608a1e46
PA
45432015-08-06 Pedro Alves <palves@redhat.com>
4544
4545 * server.c (captured_main): On error, print the exception message
4546 to stderr, and if run_once is set, throw a quit.
4547
f0ce0d3a
PA
45482015-08-06 Pedro Alves <palves@redhat.com>
4549
4550 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4551 the current thread.
4552
bf47e248
PA
45532015-08-06 Pedro Alves <palves@redhat.com>
4554
4555 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4556 reading beyond the passed in buffer length.
4557
b6b9ffcc
PL
45582015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4559
4560 * tracepoint.c (symbol_list) <required>: Remove.
4561
863d01bd
PA
45622015-08-06 Pedro Alves <palves@redhat.com>
4563
4564 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4565 count if stopping and suspending threads.
4566 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4567 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4568 (linux_detach): Complete an ongoing step-over.
4569 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4570 throughout.
4571 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4572 (linux_wait_1): If passing a signal to the inferior after
4573 finishing a step-over, unsuspend and re-resume all lwps. If we
4574 see a single-step event but the thread should be continuing, don't
4575 pass the trap to gdb.
4576 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4577 internal_error instead of gdb_assert.
4578 (enqueue_pending_signal): New function.
4579 (check_ptrace_stopped_lwp_gone): Add debug output.
4580 (start_step_over): Use internal_error instead of gdb_assert.
4581 (complete_ongoing_step_over): New function.
4582 (linux_resume_one_thread): Don't resume a suspended thread.
4583 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4584 it stepping.
4585
00db26fa
PA
45862015-08-06 Pedro Alves <palves@redhat.com>
4587
4588 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4589 (linux_thread_alive): Use lwp_is_marked_dead.
4590 (extended_event_reported): Delete.
4591 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4592 instead of extended_event_reported.
4593 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4594 as well.
4595 (lwp_is_marked_dead): New function.
4596 (lwp_running): Use lwp_is_marked_dead.
4597 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4598 comment.
4599
ad071a30
PA
46002015-08-06 Pedro Alves <palves@redhat.com>
4601
4602 * linux-low.c (linux_wait_1): Move fork event output out of the
4603 !report_to_gdb check. Pass event_child->waitstatus to
4604 target_waitstatus_to_string instead of ourstatus.
4605
524b57e6
YQ
46062015-08-04 Yao Qi <yao.qi@linaro.org>
4607
4608 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4609 if current_thread is 32 bit.
4610
6085d6f6
YQ
46112015-08-04 Yao Qi <yao.qi@linaro.org>
4612
4613 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4614 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4615 * server.c (extended_protocol): Remove "static".
4616 * server.h (extended_protocol): Declare it.
4617
8a7e4587
YQ
46182015-08-04 Yao Qi <yao.qi@linaro.org>
4619
4620 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4621 both aarch64 and aarch32.
4622 (aarch64_set_pc): Likewise.
4623
3b53ae99
YQ
46242015-08-04 Yao Qi <yao.qi@linaro.org>
4625
4626 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4627 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4628 arm-with-neon.xml to srv_xmlfiles.
4629 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4630 (is_64bit_tdesc): New function.
4631 (aarch64_linux_read_description): New function.
4632 (aarch64_arch_setup): Call aarch64_linux_read_description.
4633 (regs_info): Rename to regs_info_aarch64.
4634 (aarch64_regs_info): Return right regs_info.
4635 (initialize_low_arch): Call initialize_low_arch_aarch32.
4636
bd9e6534
YQ
46372015-08-04 Yao Qi <yao.qi@linaro.org>
4638
4639 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4640 * linux-aarch32-low.c: New file.
4641 * linux-aarch32-low.h: New file.
4642 * linux-arm-low.c (arm_fill_gregset): Move it to
4643 linux-aarch32-low.c.
4644 (arm_store_gregset): Likewise.
4645 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4646 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4647 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4648 (regs_info): Rename to regs_info_arm.
4649 (arm_regs_info): Return regs_info_aarch32 if
4650 have_ptrace_getregset is 1 and target description is
4651 arm_with_neon or arm_with_vfpv3.
4652 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4653 Call initialize_low_arch_aarch32 instead.
4654
ded48a5e
YQ
46552015-08-04 Yao Qi <yao.qi@linaro.org>
4656
4657 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4658 * linux-low.c: ... here.
4659 * linux-low.h (have_ptrace_getregset): Declare it.
4660
96e9210f
PA
46612015-08-04 Pedro Alves <palves@redhat.com>
4662
4663 * thread-db.c (struct thread_db): Use new typedefs.
4664 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4665 CHK calls.
4666 (disable_thread_event_reporting): Cast result of dlsym to
4667 destination function pointer type.
4668 (thread_db_mourn): Use td_ta_delete_ftype.
4669
af60a1ef
SL
46702015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4671
4672 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4673 arch variant.
4674 (CDX_BREAKPOINT): Define for R2.
4675 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4676 (the_low_target): Add comments.
4677
e8b41681
YQ
46782015-07-30 Yao Qi <yao.qi@linaro.org>
4679
4680 * linux-arm-low.c (arm_hwcap): Remove it.
4681 (arm_read_description): New local variable arm_hwcap. Don't
4682 set arm_hwcap to zero.
4683
89abb039
YQ
46842015-07-30 Yao Qi <yao.qi@linaro.org>
4685
4686 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4687 Use regcache->tdesc instead.
4688 (arm_store_wmmxregset): Likewise.
4689 (arm_fill_vfpregset): Likewise.
4690 (arm_store_vfpregset): Likewise.
4691
deca266c
YQ
46922015-07-30 Yao Qi <yao.qi@linaro.org>
4693
4694 * linux-arm-low.c: Include arch/arm.h.
4695 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4696 (arm_store_gregset): Likewise.
4697
aa58a496
SM
46982015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4699
4700 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4701 ptrace's 4th parameter.
4702
50904b25
YQ
47032015-07-27 Yao Qi <yao.qi@linaro.org>
4704
4705 * configure.srv (case aarch64*-*-linux*): Don't set
4706 srv_linux_usrregs.
4707
5826e159
PA
47082015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4709
4710 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4711 sys/ptrace.h.
4712 * linux-arm-low.c: Likewise.
4713 * linux-cris-low.c: Likewise.
4714 * linux-crisv32-low.c: Likewise.
4715 * linux-low.c: Likewise.
4716 * linux-m68k-low.c: Likewise.
4717 * linux-mips-low.c: Likewise.
4718 * linux-nios2-low.c: Likewise.
4719 * linux-s390-low.c: Likewise.
4720 * linux-sparc-low.c: Likewise.
4721 * linux-tic6x-low.c: Likewise.
4722 * linux-tile-low.c: Likewise.
4723 * linux-x86-low.c: Likewise.
4724
54019719
PA
47252015-07-24 Pedro Alves <palves@redhat.com>
4726
4727 * config.in: Regenerate.
4728 * configure: Regenerate.
4729
eb7aa561
PA
47302015-07-24 Pedro Alves <palves@redhat.com>
4731
4732 * acinclude.m4: Include ../ptrace.m4.
4733 * configure.ac: Call GDB_AC_PTRACE.
4734 * config.in, configure: Regenerate.
4735
55d7b841
YQ
47362015-07-24 Yao Qi <yao.qi@linaro.org>
4737
4738 * linux-low.c (linux_create_inferior): Remove setting to
4739 proc->priv->new_inferior.
4740 (linux_attach): Likewise.
4741 (linux_low_filter_event): Likewise.
4742 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4743
c06cbd92
YQ
47442015-07-24 Yao Qi <yao.qi@linaro.org>
4745
4746 * linux-low.c (linux_arch_setup): New function.
4747 (linux_low_filter_event): If proc->tdesc is NULL and
4748 proc->attached is true, call the_low_target.arch_setup.
4749 Otherwise, keep status pending, and return.
4750 (linux_resume_one_lwp_throw): Don't call get_pc if
4751 thread->while_stepping isn't NULL. Don't call
4752 get_thread_regcache if proc->tdesc is NULL.
4753 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4754 (linux_target_ops): Install arch_setup.
4755 * server.c (start_inferior): Call the_target->arch_setup.
4756 * target.h (struct target_ops) <arch_setup>: New field.
4757 (target_arch_setup): New marco.
4758 * lynx-low.c (lynx_target_ops): Update.
4759 * nto-low.c (nto_target_ops): Update.
4760 * spu-low.c (spu_target_ops): Update.
4761 * win32-low.c (win32_target_ops): Update.
4762
5ae3ebba
YQ
47632015-07-24 Yao Qi <yao.qi@linaro.org>
4764
4765 * linux-low.c (linux_add_process): Don't set
4766 proc->priv->new_inferior.
4767 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4768 (linux_attach): Likewise.
4769
eb97750b
YQ
47702015-07-24 Yao Qi <yao.qi@linaro.org>
4771
4772 * server.c (start_inferior): Code refactor.
4773
51aee833
YQ
47742015-07-24 Yao Qi <yao.qi@linaro.org>
4775
4776 * server.c (process_serial_event): Set general_thread.
4777
af1b22f3
YQ
47782015-07-21 Yao Qi <yao.qi@linaro.org>
4779
4780 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4781 aarch64_linux_get_debug_reg_capacity.
4782
554717a3
YQ
47832015-07-17 Yao Qi <yao.qi@linaro.org>
4784
4785 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4786 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4787 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4788 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4789 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4790 (AARCH64_HWP_ALIGNMENT): Likewise.
4791 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4792 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4793 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4794 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4795 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4796 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4797 (struct aarch64_debug_reg_state): Likewise.
4798 (struct arch_lwp_info): Likewise.
4799 (aarch64_align_watchpoint): Likewise.
4800 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4801 (aarch64_watchpoint_length): Likewise.
4802 (aarch64_point_encode_ctrl_reg): Likewise
4803 (aarch64_point_is_aligned): Likewise.
4804 (aarch64_align_watchpoint): Likewise.
4805 (aarch64_linux_set_debug_regs):
4806 (aarch64_dr_state_insert_one_point): Likewise.
4807 (aarch64_dr_state_remove_one_point): Likewise.
4808 (aarch64_handle_breakpoint): Likewise.
4809 (aarch64_handle_aligned_watchpoint): Likewise.
4810 (aarch64_handle_unaligned_watchpoint): Likewise.
4811 (aarch64_handle_watchpoint): Likewise.
4812
c67ca4de
YQ
48132015-07-17 Yao Qi <yao.qi@linaro.org>
4814
4815 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4816 and don't aarch64_get_debug_reg_state. All callers update.
4817 (aarch64_handle_aligned_watchpoint): Likewise.
4818 (aarch64_handle_unaligned_watchpoint): Likewise.
4819 (aarch64_handle_watchpoint): Likewise.
4820 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4821 (aarch64_remove_point): Likewise.
4822
25abf979
YQ
48232015-07-17 Yao Qi <yao.qi@linaro.org>
4824
4825 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4826 debug_printf.
4827 (aarch64_handle_unaligned_watchpoint): Likewise.
4828
db1ff28b
JK
48292015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4830
4831 Revert the previous 3 commits:
4832 Move gdb_regex* to common/
4833 Move linux_find_memory_regions_full & co.
4834 gdbserver build-id attribute generator
4835
700ca40f
JK
48362015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4837 Jan Kratochvil <jan.kratochvil@redhat.com>
4838
4839 gdbserver build-id attribute generator.
4840 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4841 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4842 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4843 (find_phdr): New.
4844 (get_dynamic): Use find_pdhr to traverse program headers.
4845 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4846 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4847 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4848 (get_hex_build_id): New.
4849 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4850 to reply XML document.
4851
9904185c
JK
48522015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4853 Jan Kratochvil <jan.kratochvil@redhat.com>
4854
4855 * target.c: Include target/target-utils.h and fcntl.h.
4856 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4857 (target_fileio_read_stralloc): New functions.
4858
6e5b4429
JK
48592015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4860
4861 * Makefile.in (OBS): Add gdb_regex.o.
4862 (gdb_regex.o): New.
4863 * config.in: Rebuilt.
4864 * configure: Rebuilt.
4865
ddc98fbf
JK
48662015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4867 Jan Kratochvil <jan.kratochvil@redhat.com>
4868
4869 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4870 * Makefile.in (OBS): Add target-utils.o.
4871 (linux-maps.o, target-utils.o): New.
4872 * configure.srv (srv_linux_obj): Add linux-maps.o.
4873
e57bb7a0
PL
48742015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4875
4876 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4877 function, return 1.
4878 (the_low_target): Install it.
4879
586b02a9
PA
48802015-07-14 Pedro Alves <palves@redhat.com>
4881
4882 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4883 Instead, ignore ECHILD, and throw an error for other errnos.
4884
58c1b36c
PA
48852015-07-10 Pedro Alves <palves@redhat.com>
4886
4887 * event-loop.c (struct callback_event) <data>: Change type to
4888 gdb_client_data instance instead of gdb_client_data pointer.
4889 (append_callback_event): Adjust.
4890
421530db
PL
48912015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4892
4893 * linux-aarch64-low.c: Add comments for each linux_target_ops
4894 method. Remove comments already covered in target_ops and
4895 linux_target_ops definitions.
4896 (the_low_target): Add comments for each unimplemented method.
4897
c2d65f38
YQ
48982015-07-09 Yao Qi <yao.qi@linaro.org>
4899
4900 * linux-aarch64-low.c (aarch64_regmap): Remove.
4901 (aarch64_usrregs_info): Remove.
4902 (regs_info): Set field usrregs to NULL.
4903
b20a6524
MM
49042015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4905
4906 * linux-low.c: Include "rsp-low.h"
4907 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4908 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4909 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4910 (handle_btrace_enable_pt): New.
4911 (handle_btrace_general_set): Support "pt".
4912 (handle_btrace_conf_general_set): Support "pt:size".
4913
96c97461
PL
49142015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4915
4916 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4917 Z_PACKET_SW_BP.
4918
37d66942
PL
49192015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4920
4921 * linux-aarch64-low.c: Remove comment about endianness.
4922 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4923 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4924 memcmp.
4925
dc06243f
GB
49262015-06-24 Gary Benson <gbenson@redhat.com>
4927
4928 * linux-i386-ipa.c (stdint.h): Do not include.
4929 * lynx-i386-low.c (stdint.h): Likewise.
4930 * lynx-ppc-low.c (stdint.h): Likewise.
4931 * mem-break.c (stdint.h): Likewise.
4932 * thread-db.c (stdint.h): Likewise.
4933 * tracepoint.c (stdint.h): Likewise.
4934 * win32-low.c (stdint.h): Likewise.
4935
124e13d9
SM
49362015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4937
4938 * server.c (write_qxfer_response): Update call to
4939 remote_escape_output.
4940
909c2cda
JK
49412015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4942 Jan Kratochvil <jan.kratochvil@redhat.com>
4943
4944 Merge multiple hex conversions.
4945 * gdbreplay.c (tohex): Rename to 'fromhex'.
4946 (logchar): Use fromhex.
4947
24c05f46
JK
49482015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4949
4950 * server.c (handle_qxfer_libraries): Set `version' attribute for
4951 <library-list>.
4952
14d2069a
GB
49532015-06-10 Gary Benson <gbenson@redhat.com>
4954
4955 * target.h (struct target_ops) <multifs_open>: New field.
4956 <multifs_unlink>: Likewise.
4957 <multifs_readlink>: Likewise.
4958 * linux-low.c (nat/linux-namespaces.h): New include.
4959 (linux_target_ops): Initialize the_target->multifs_open,
4960 the_target->multifs_unlink and the_target->multifs_readlink.
4961 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4962 * hostio.c (hostio_fs_pid): New static variable.
4963 (hostio_handle_new_gdb_connection): New function.
4964 (handle_setfs): Likewise.
4965 (handle_open): Use the_target->multifs_open as appropriate.
4966 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4967 (handle_readlink): Use the_target->multifs_readlink as
4968 appropriate.
4969 (handle_vFile): Handle vFile:setfs packets.
4970 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4971 after target_handle_new_gdb_connection.
4972
4b8b5e72
GB
49732015-06-10 Gary Benson <gbenson@redhat.com>
4974
4975 * configure.ac (AC_CHECK_FUNCS): Add setns.
4976 * config.in: Regenerate.
4977 * configure: Likewise.
4978 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4979 (linux-namespaces.o): New rule.
4980 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4981
3ac2e371
GB
49822015-06-09 Gary Benson <gbenson@redhat.com>
4983
4984 * hostio.c (handle_open): Process mode argument with
4985 fileio_to_host_mode.
4986
ca9b78ce
YQ
49872015-06-01 Yao Qi <yao.qi@linaro.org>
4988
4989 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4990 * linux-x86-low.c: Likewise.
4991
bfacd19d
DB
49922015-05-28 Don Breazeal <donb@codesourcery.com>
4993
4994 * linux-low.c (handle_extended_wait): Initialize
4995 thread_info.last_resume_kind for new fork children.
4996
452003ef
PA
49972015-05-15 Pedro Alves <palves@redhat.com>
4998
4999 * target.h (target_handle_new_gdb_connection): Rewrite using if
5000 wrapped in do/while.
5001
1041a03c
JB
50022015-05-14 Joel Brobecker <brobecker@adacore.com>
5003
5004 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5005 * configure, config.in: Regenerate.
5006 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5007 Declare typedef.
5008
c269dbdb
DB
50092015-05-12 Don Breazeal <donb@codesourcery.com>
5010
5011 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5012 PTRACE_EVENT_VFORK_DONE.
5013 (linux_low_ptrace_options, extended_event_reported): Add vfork
5014 events.
5015 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5016 and "vforkdone" for RSP 'T' Stop Reply Packet.
5017 * server.h (report_vfork_events): Declare
5018 global variable.
5019
3a8a0396
DB
50202015-05-12 Don Breazeal <donb@codesourcery.com>
5021
5022 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5023 (the_low_target) <new_fork>: Initialize new member.
5024 * linux-arm-low.c (arm_new_fork): New function.
5025 (the_low_target) <new_fork>: Initialize new member.
5026 * linux-low.c (handle_extended_wait): Call new target function
5027 new_fork.
5028 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5029 * linux-mips-low.c (mips_add_watchpoint): New function
5030 extracted from mips_insert_point.
5031 (the_low_target) <new_fork>: Initialize new member.
5032 (mips_linux_new_fork): New function.
5033 (mips_insert_point): Call mips_add_watchpoint.
5034 * linux-x86-low.c (x86_linux_new_fork): New function.
5035 (the_low_target) <new_fork>: Initialize new member.
5036
de0d863e
DB
50372015-05-12 Don Breazeal <donb@codesourcery.com>
5038
5039 * linux-low.c (handle_extended_wait): Implement return value,
5040 rename argument 'event_child' to 'event_lwp', handle
5041 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5042 (linux_low_ptrace_options): New function.
5043 (linux_low_filter_event): Call linux_low_ptrace_options,
5044 use different argument fo linux_enable_event_reporting,
5045 use return value from handle_extended_wait.
5046 (extended_event_reported): New function.
5047 (linux_wait_1): Call extended_event_reported and set
5048 status to report fork events.
5049 (linux_write_memory): Add pid to debug message.
5050 (reset_lwp_ptrace_options_callback): New function.
5051 (linux_handle_new_gdb_connection): New function.
5052 (linux_target_ops): Initialize new structure member.
5053 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5054 * lynx-low.c: Initialize new structure member.
5055 * remote-utils.c (prepare_resume_reply): Implement stop reason
5056 "fork" for "T" stop message.
5057 * server.c (handle_query): Call handle_new_gdb_connection.
5058 * server.h (report_fork_events): Declare global flag.
5059 * target.h (struct target_ops) <handle_new_gdb_connection>:
5060 New member.
5061 (target_handle_new_gdb_connection): New macro.
5062 * win32-low.c: Initialize new structure member.
5063
ddcbc397
DB
50642015-05-12 Don Breazeal <donb@codesourcery.com>
5065
5066 * mem-break.c (APPEND_TO_LIST): Define macro.
5067 (clone_agent_expr): New function.
5068 (clone_one_breakpoint): New function.
5069 (clone_all_breakpoints): New function.
5070 * mem-break.h: Declare new functions.
5071
89245bc0
DB
50722015-05-12 Don Breazeal <donb@codesourcery.com>
5073
5074 * linux-low.c (linux_supports_fork_events): New function.
5075 (linux_supports_vfork_events): New function.
5076 (linux_target_ops): Initialize new structure members.
5077 (initialize_low): Call linux_check_ptrace_features.
5078 * lynx-low.c (lynx_target_ops): Initialize new structure
5079 members.
5080 * server.c (report_fork_events, report_vfork_events):
5081 New global flags.
5082 (handle_query): Add new features to qSupported packet and
5083 response.
5084 (captured_main): Initialize new global variables.
5085 * target.h (struct target_ops) <supports_fork_events>:
5086 New member.
5087 <supports_vfork_events>: New member.
5088 (target_supports_fork_events): New macro.
5089 (target_supports_vfork_events): New macro.
5090 * win32-low.c (win32_target_ops): Initialize new structure
5091 members.
5092
835205d0
GB
50932015-05-12 Gary Benson <gbenson@redhat.com>
5094
5095 * server.c (handle_qxfer_exec_file): Use current process
5096 if annex is empty.
5097
21e94bd9
SL
50982015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5099
5100 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5101 Remove HAVE_PTRACE_GETREGS conditionals.
5102 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5103 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5104
45614f15
YQ
51052015-05-08 Yao Qi <yao.qi@linaro.org>
5106
5107 * linux-low.c (linux_supports_conditional_breakpoints): New
5108 function.
5109 (linux_target_ops): Install new target method.
5110 * lynx-low.c (lynx_target_ops): Install NULL hook for
5111 supports_conditional_breakpoints.
5112 * nto-low.c (nto_target_ops): Likewise.
5113 * spu-low.c (spu_target_ops): Likewise.
5114 * win32-low.c (win32_target_ops): Likewise.
5115 * server.c (handle_query): Check
5116 target_supports_conditional_breakpoints.
5117 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5118 New field.
5119 (target_supports_conditional_breakpoints): New macro.
5120
80ad801e
PA
51212015-05-06 Pedro Alves <palves@redhat.com>
5122
5123 PR server/18081
5124 * server.c (start_inferior): If the process exits, mourn it.
5125
819843c7
GB
51262015-04-21 Gary Benson <gbenson@redhat.com>
5127
5128 * hostio.c (fileio_open_flags_to_host): Factored out to
5129 fileio_to_host_openflags in common/fileio.c. Single use
5130 updated.
5131
a2d5a9d7
MF
51322015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5133
5134 * linux-xtensa-low.c (xtensa_fill_gregset)
5135 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5136 XCHAL_HAVE_LOOP.
5137
deb44829
MF
51382015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5139
5140 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5141 (regs_info): Replace usrregs pointer with NULL.
5142
e57f1de3
GB
51432015-04-17 Gary Benson <gbenson@redhat.com>
5144
5145 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5146 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5147 * server.c (handle_qxfer_exec_file): New function.
5148 (qxfer_packets): Add exec-file entry.
5149 (handle_query): Report qXfer:exec-file:read as supported packet.
5150
62828379
RN
51512015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5152
5153 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5154
b88bb450
GB
51552015-04-09 Gary Benson <gbenson@redhat.com>
5156
5157 * hostio-errno.c (errno_to_fileio_error): Remove function.
5158 Update caller to use remote_fileio_to_fio_error.
5159
c8f4bfdd
YQ
51602015-04-09 Yao Qi <yao.qi@linaro.org>
5161
5162 * linux-low.c (linux_insert_point): Call
5163 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5164 (linux_remove_point): Call remove_memory_breakpoint if type is
5165 raw_bkpt_type_sw.
5166 * linux-x86-low.c (x86_insert_point): Don't call
5167 insert_memory_breakpoint.
5168 (x86_remove_point): Don't call remove_memory_breakpoint.
5169
41f98f02
PA
51702015-04-01 Pedro Alves <palves@redhat.com>
5171 Cleber Rosa <crosa@redhat.com>
5172
5173 * server.c (gdbserver_usage): Reorganize and extend the usage
5174 message.
5175
2bf6fb9d
PA
51762015-03-24 Pedro Alves <palves@redhat.com>
5177
5178 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5179 output. Also dump TRAP_TRACE.
5180 (linux_low_filter_event): In debug output, distinguish a
5181 resume_stop SIGSTOP from a delayed SIGSTOP.
5182
369f6daa
GB
51832015-03-24 Gary Benson <gbenson@redhat.com>
5184
5185 * linux-x86-low.c (x86_linux_new_thread): Moved to
5186 nat/x86-linux.c.
5187 (x86_linux_prepare_to_resume): Likewise.
5188
8e5d4070
GB
51892015-03-24 Gary Benson <gbenson@redhat.com>
5190
5191 * Makefile.in (x86-linux-dregs.o): New rule.
5192 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5193 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5194 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5195 (x86_linux_dr_get): Likewise.
5196 (x86_linux_dr_set): Likewise.
5197 (update_debug_registers_callback): Likewise.
5198 (x86_linux_dr_set_addr): Likewise.
5199 (x86_linux_dr_get_addr): Likewise.
5200 (x86_linux_dr_set_control): Likewise.
5201 (x86_linux_dr_get_control): Likewise.
5202 (x86_linux_dr_get_status): Likewise.
5203 (x86_linux_update_debug_registers): Likewise.
5204
2b95d440
GB
52052015-03-24 Gary Benson <gbenson@redhat.com>
5206
5207 * linux-x86-low.c (x86_linux_update_debug_registers):
5208 New function, factored out from...
5209 (x86_linux_prepare_to_resume): ...this.
5210
14b0bc68
GB
52112015-03-24 Gary Benson <gbenson@redhat.com>
5212
5213 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5214 (x86_linux_dr_set): Likewise.
5215 (update_debug_registers_callback): Likewise.
5216 (x86_linux_dr_set_addr): Likewise.
5217 (x86_linux_dr_get_addr): Likewise.
5218 (x86_linux_dr_set_control): Likewise.
5219 (x86_linux_dr_get_control): Likewise.
5220 (x86_linux_dr_get_status): Likewise.
5221 (x86_linux_prepare_to_resume): Likewise.
5222
5dfe6ca8
GB
52232015-03-24 Gary Benson <gbenson@redhat.com>
5224
5225 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5226 Use perror_with_name. Pass string through gettext.
5227 (x86_linux_dr_set): Likewise.
5228
d33472ad
GB
52292015-03-24 Gary Benson <gbenson@redhat.com>
5230
5231 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5232 (x86_linux_dr_set_addr): ...this.
5233 (x86_dr_low_get_addr): Rename to...
5234 (x86_linux_dr_get_addr): ...this.
5235 (x86_dr_low_set_control): Rename to...
5236 (x86_linux_dr_set_control): ...this.
5237 (x86_dr_low_get_control): Rename to...
5238 (x86_linux_dr_get_control): ...this.
5239 (x86_dr_low_get_status): Rename to...
5240 (x86_linux_dr_get_status): ...this.
5241 (x86_dr_low): Update with new function names.
5242
4b134ca1
GB
52432015-03-24 Gary Benson <gbenson@redhat.com>
5244
5245 * Makefile.in (x86-linux.o): New rule.
5246 * configure.srv: Add x86-linux.o to relevant targets.
5247 * linux-low.c (lwp_set_arch_private_info): New function.
5248 (lwp_arch_private_info): Likewise.
5249 * linux-x86-low.c: Include nat/x86-linux.h.
5250 (arch_lwp_info): Removed structure.
5251 (update_debug_registers_callback):
5252 Use lwp_set_debug_registers_changed.
5253 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5254 and lwp_set_debug_registers_changed.
5255 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5256
34c703da
GB
52572015-03-24 Gary Benson <gbenson@redhat.com>
5258
5259 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5260 * linux-arm-low.c (arm_new_thread): Likewise.
5261 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5262 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5263 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5264 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5265
cff068da
GB
52662015-03-24 Gary Benson <gbenson@redhat.com>
5267
5268 * linux-low.c (ptid_of_lwp): New function.
5269 (lwp_is_stopped): Likewise.
5270 (lwp_stop_reason): Likewise.
5271 * linux-x86-low.c (update_debug_registers_callback):
5272 Use lwp_is_stopped.
5273 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5274 lwp_stop_reason.
5275
b2f7c7e8
GB
52762015-03-24 Gary Benson <gbenson@redhat.com>
5277
5278 * linux-low.h (linux_stop_lwp): Remove declaration.
5279
6d4ee8c6
GB
52802015-03-24 Gary Benson <gbenson@redhat.com>
5281
5282 * linux-low.h: Include nat/linux-nat.h.
5283 * linux-low.c (iterate_over_lwps_args): New structure.
5284 (iterate_over_lwps_filter): New function.
5285 (iterate_over_lwps): Likewise.
5286 * linux-x86-low.c (update_debug_registers_callback):
5287 Update signature to what iterate_over_lwps expects.
5288 Remove PID check that iterate_over_lwps now performs.
5289 (x86_dr_low_set_addr): Use iterate_over_lwps.
5290 (x86_dr_low_set_control): Likewise.
5291
70a0bb6b
GB
52922015-03-24 Gary Benson <gbenson@redhat.com>
5293
5294 * linux-x86-low.c (x86_debug_reg_state): New function.
5295 (x86_linux_prepare_to_resume): Use the above.
5296
7b669087
GB
52972015-03-24 Gary Benson <gbenson@redhat.com>
5298
5299 * linux-low.c (current_lwp_ptid): New function.
5300 * linux-x86-low.c: Include nat/linux-nat.h.
5301 (x86_dr_low_get_addr): Use current_lwp_ptid.
5302 (x86_dr_low_get_control): Likewise.
5303 (x86_dr_low_get_status): Likewise.
5304
eef49a3d
PA
53052015-03-20 Pedro Alves <palves@redhat.com>
5306
5307 * tracepoint.c (cmd_qtstatus): Make "str" const.
5308
b2333d22
PA
53092015-03-20 Pedro Alves <palves@redhat.com>
5310
5311 * server.c (handle_general_set): Make "req_str" const.
5312
23f238d3
PA
53132015-03-19 Pedro Alves <palves@redhat.com>
5314
5315 * linux-low.c (linux_resume_one_lwp): Rename to ...
5316 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5317 instead call perror_with_name.
5318 (check_ptrace_stopped_lwp_gone): New function.
5319 (linux_resume_one_lwp): Reimplement as wrapper around
5320 linux_resume_one_lwp_throw that swallows errors if the LWP is
5321 gone.
5322
91baf43f
PA
53232015-03-19 Pedro Alves <palves@redhat.com>
5324
5325 * linux-low.c (count_events_callback, select_event_lwp_callback):
5326 No longer check whether the thread has resume_stop as last resume
5327 kind.
5328
8bf3b159
PA
53292015-03-19 Pedro Alves <palves@redhat.com>
5330
5331 * linux-low.c (count_events_callback, select_event_lwp_callback):
5332 Use the lwp's status_pending_p field, not the thread's.
5333
b90fc188
PA
53342015-03-19 Pedro Alves <palves@redhat.com>
5335
5336 * linux-low.c (select_event_lwp_callback): Update comments to
5337 no longer mention SIGTRAP.
5338
464b0089
GB
53392015-03-18 Gary Benson <gbenson@redhat.com>
5340
5341 * server.c (handle_query): Do not report vFile:fstat as supported.
5342
aa9e327f
GB
53432015-03-11 Gary Benson <gbenson@redhat.com>
5344
5345 * hostio.c (sys/types.h): New include.
5346 (sys/stat.h): Likewise.
5347 (common-remote-fileio.h): Likewise.
5348 (handle_fstat): New function.
5349 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 5350
791c0056
GB
53512015-03-11 Gary Benson <gbenson@redhat.com>
5352
5353 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5354 struct stat.st_blocks and struct stat.st_blksize.
5355 * configure: Regenerate.
5356 * config.in: Likewise.
5357 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5358 (OBS): Add common-remote-fileio.o.
5359 (common-remote-fileio.o): New rule.
5360
9a9df970
PA
53612015-03-09 Pedro Alves <palves@redhat.com>
5362
5363 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5364 'struct sockaddr' pointer in 'accept' call.
5365
9eb1356e
PA
53662015-03-09 Pedro Alves <palves@redhat.com>
5367
5368 Revert:
5369 2015-03-07 Pedro Alves <palves@redhat.com>
5370 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5371 or <winsock2.h> here. Instead include "gdb_socket.h".
5372 (remote_open): Use union gdb_sockaddr_u.
5373 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5374 or <winsock2.h> here. Instead include "gdb_socket.h".
5375 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5376 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5377 or <sys/un.h>.
5378 (init_named_socket, gdb_agent_helper_thread): Use union
5379 gdb_sockaddr_u.
5380
aac331e4
PA
53812015-03-07 Pedro Alves <palves@redhat.com>
5382
5383 * configure.ac (build_warnings): Move
5384 -Wdeclaration-after-statement to the C-specific set.
5385 * configure: Regenerate.
5386
366c75fc
PA
53872015-03-07 Pedro Alves <palves@redhat.com>
5388
5389 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5390 or <winsock2.h> here. Instead include "gdb_socket.h".
5391 (remote_open): Use union gdb_sockaddr_u.
5392 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5393 or <winsock2.h> here. Instead include "gdb_socket.h".
5394 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5395 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5396 or <sys/un.h>.
5397 (init_named_socket, gdb_agent_helper_thread): Use union
5398 gdb_sockaddr_u.
5399
492d29ea
PA
54002015-03-07 Pedro Alves <palves@redhat.com>
5401
5402 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5403 instead.
5404
60a191ed
YQ
54052015-03-06 Yao Qi <yao.qi@linaro.org>
5406
5407 * linux-aarch64-low.c (aarch64_insert_point): Use
5408 show_debug_regs as a boolean.
5409 (aarch64_remove_point): Likewise.
5410
f5771b1d
PA
54112015-03-05 Pedro Alves <palves@redhat.com>
5412
5413 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5414 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5415 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5416 * nto-low.c (nto_target_ops): Likewise.
5417 * spu-low.c (spu_target_ops): Likewise.
5418 * win32-low.c (win32_target_ops): Likewise.
5419
3e572f71
PA
54202015-03-04 Pedro Alves <palves@redhat.com>
5421
72f4393d 5422 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
5423 Decide whether a breakpoint triggered based on the SIGTRAP's
5424 siginfo.si_code.
72f4393d
L
5425 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5426 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
5427 (linux_low_filter_event): Check for breakpoints before checking
5428 watchpoints.
5429 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5430 siginfo.si_code.
72f4393d
L
5431 (linux_stopped_by_sw_breakpoint)
5432 (linux_supports_stopped_by_sw_breakpoint)
5433 (linux_stopped_by_hw_breakpoint)
5434 (linux_supports_stopped_by_hw_breakpoint): New functions.
5435 (linux_target_ops): Install new target methods.
3e572f71 5436
1ec68e26
PA
54372015-03-04 Pedro Alves <palves@redhat.com>
5438
5439 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5440 * server.c (swbreak_feature, hwbreak_feature): New globals.
5441 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5442 (captured_main): Clear swbreak_feature and hwbreak_feature.
5443 * server.h (swbreak_feature, hwbreak_feature): Declare.
5444 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5445 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5446 supports_stopped_by_hw_breakpoint>: New fields.
5447 (target_supports_stopped_by_sw_breakpoint)
5448 (target_stopped_by_sw_breakpoint)
5449 (target_supports_stopped_by_hw_breakpoint)
5450 (target_stopped_by_hw_breakpoint): Declare.
5451
15c66dd6
PA
54522015-03-04 Pedro Alves <palves@redhat.com>
5453
5454 enum lwp_stop_reason -> enum target_stop_reason
5455 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5456 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5457 (linux_wait_1, stuck_in_jump_pad_callback)
5458 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5459 (linux_stopped_by_watchpoint):
5460 * linux-low.h (enum lwp_stop_reason): Delete.
5461 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5462 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5463
98fc70d6
YQ
54642015-03-04 Yao Qi <yao.qi@linaro.org>
5465
5466 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5467
dd2ac174
GB
54682015-03-03 Gary Benson <gbenson@redhat.com>
5469
5470 * hostio.c (handle_vFile): Fix prefix lengths.
5471
d68e53f4
MM
54722015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5473
5474 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5475 ptr_bits.
5476
bf2d68ab
AA
54772015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5478
5479 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5480 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5481 (clean): Add "rm -f" for above C files.
5482 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5483 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5484 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5485 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5486 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5487 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5488 (init_registers_s390x_vx_linux64)
5489 (init_registers_s390x_tevx_linux64)
5490 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5491 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5492 declarations.
5493 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5494 (s390_store_vxrs_high): New functions.
5495 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5496 NT_S390_VXRS_HIGH.
5497 (s390_arch_setup): Add logic for selecting one of the new target
5498 descriptions. Activate the new vector regsets if applicable.
5499 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5500 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5501 and init_registers_s390x_tevx_linux64.
5502
c966a859
PA
55032015-03-01 Pedro Alves <palves@redhat.com>
5504
5505 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5506 parameter.
5507
4180215b
PA
55082015-02-27 Pedro Alves <palves@redhat.com>
5509
5510 * linux-x86-low.c (u_debugreg_offset): New function.
5511 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5512
749bab01
PA
55132015-02-27 Pedro Alves <palves@redhat.com>
5514
5515 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5516 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5517 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5518 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5519 (ps_lsetfpregs, ps_getpid)
5520 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5521 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5522 (ps_lsetxregs, ps_plog): Declare.
5523
3c14e5a3
PA
55242015-02-27 Pedro Alves <palves@redhat.com>
5525
5526 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5527 IP_AGENT_EXPORT_FUNC.
5528 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5529 IP_AGENT_EXPORT_FUNC.
5530 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5531 (IP_AGENT_EXPORT): Delete.
5532 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5533 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5534 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5535 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5536 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5537 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5538 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5539 (traceframe_read_count, traceframe_write_count)
5540 (traceframes_created, trace_state_variables, get_raw_reg)
5541 (get_trace_state_variable_value, set_trace_state_variable_value)
5542 (ust_loaded, helper_thread_id, cmd_buf): Use
5543 IPA_SYM_EXPORTED_NAME.
5544 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5545 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5546 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5547 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5548 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5549 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5550 EXTERN_C_PUSH/EXTERN_C_POP.
5551 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5552 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5553 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5554 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5555 (traceframe_write_count, traceframe_read_count)
5556 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5557 (about_to_request_buffer_space, get_trace_state_variable_value)
5558 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5559 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5560 EXTERN_C_PUSH/EXTERN_C_POP.
5561 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5562 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5563 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5564 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5565 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5566 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5567 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5568 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5569 Define.
5570 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5571 (IP_AGENT_EXPORT_VAR_DECL): Define.
5572 (tracing): Declare.
5573 (gdb_agent_get_raw_reg): Declare.
5574
fe978cb0
PA
55752015-02-27 Tom Tromey <tromey@redhat.com>
5576 Pedro Alves <palves@redhat.com>
5577
5578 Rename symbols whose names are reserved C++ keywords throughout.
5579
3bc3d82a
PA
55802015-02-27 Pedro Alves <palves@redhat.com>
5581
5582 * Makefile.in (COMPILER): New, get it from autoconf.
5583 (CXX): Get from autoconf instead.
5584 (COMPILE.pre): Use COMPILER.
5585 (CC-LD): Rename to ...
5586 (CC_LD): ... this. Use COMPILER.
5587 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5588 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5589 * acinclude.m4: Include build-with-cxx.m4.
5590 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5591 Disable -Werror by default if building in C++ mode.
5592 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5593 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5594 the C++ compiler. Save/restore CXXFLAGS too.
5595 * configure: Regenerate.
5596
07697489
PA
55972015-02-27 Pedro Alves <palves@redhat.com>
5598
5599 * acinclude.m4: Include libiberty.m4.
5600 * configure.ac: Call libiberty_INIT.
5601 * config.in, configure: Regenerate.
5602
9beb7c4e
PA
56032015-02-26 Pedro Alves <palves@redhat.com>
5604
5605 * linux-low.c (linux_wait_1): When incrementing the PC past a
5606 program breakpoint always use the_low_target.breakpoint_len as
5607 increment, rather than the maximum between that and
5608 the_low_target.decr_pc_after_break.
5609
8090aef2
PA
56102015-02-23 Pedro Alves <palves@redhat.com>
5611
5612 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5613 thread was doing a step-over; always adjust the PC if
5614 we stepped over a permanent breakpoint.
5615 (linux_wait_1): If we stepped over breakpoint that was on top of a
5616 permanent breakpoint, manually advance the PC past it.
5617
bc9540e8
PA
56182015-02-23 Pedro Alves <palves@redhat.com>
5619
5620 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5621 modes.
5622 (x86_fill_gregset, x86_store_gregset): Use it when handling
5623 $orig_eax.
5624
2db9a427
PA
56252015-02-20 Pedro Alves <palves@redhat.com>
5626
5627 * thread-db.c: Include "nat/linux-procfs.h".
5628 (thread_db_init): Skip listing new threads if the kernel supports
5629 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5630
afa8d396
PA
56312015-02-20 Pedro Alves <palves@redhat.com>
5632
5633 * linux-low.c (status_pending_p_callback): Use ptid_match.
5634
c9587f88
AT
56352015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5636
5637 PR breakpoints/16812
5638 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5639 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5640 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5641
b05ec7a5
AT
56422015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5643
5644 PR breakpoints/15956
5645 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5646
d33501a5
MM
56472015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5648
5649 * linux-low.c (linux_low_btrace_conf): Print size.
5650 * server.c (handle_btrace_conf_general_set): New.
5651 (hanle_general_set): Call handle_btrace_conf_general_set.
5652 (handle_query): Report Qbtrace-conf:bts:size as supported.
5653
f4abbc16
MM
56542015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5655
5656 * linux-low.c (linux_low_enable_btrace): Update parameters.
5657 (linux_low_btrace_conf): New.
5658 (linux_target_ops)<to_btrace_conf>: Initialize.
5659 * server.c (current_btrace_conf): New.
5660 (handle_btrace_enable): Rename to ...
5661 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5662 to target_enable_btrace. Update comment. Update users.
5663 (handle_qxfer_btrace_conf): New.
5664 (qxfer_packets): Add btrace-conf entry.
5665 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5666 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5667 (target_ops)<read_btrace_conf>: New.
5668 (target_enable_btrace): Update parameters.
5669 (target_read_btrace_conf): New.
5670
043c3577
MM
56712015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5672
5673 * server.c (handle_btrace_general_set): Remove call to
5674 target_supports_btrace.
5675 (supported_btrace_packets): New.
5676 (handle_query): Call supported_btrace_packets.
5677 * target.h: include btrace-common.h.
5678 (btrace_target_info): Removed.
5679 (supports_btrace, target_supports_btrace): Update parameters.
5680
734b0e4b
MM
56812015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5682
5683 * Makefile.in (SFILES): Add common/btrace-common.c.
5684 (OBS): Add common/btrace-common.o.
5685 (btrace-common.o): Add build rules.
5686 * linux-low: Include btrace-common.h.
5687 (linux_low_read_btrace): Use struct btrace_data. Call
5688 btrace_data_init and btrace_data_fini.
5689
d6c146e9
PA
56902015-02-06 Pedro Alves <palves@redhat.com>
5691
5692 * thread-db.c (find_new_threads_callback): Add debug output.
5693
20ba1ce6
PA
56942015-02-04 Pedro Alves <palves@redhat.com>
5695
5696 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5697 (resume_stopped_resumed_lwps): New function.
5698 (linux_wait_for_event_filtered): Use it.
5699
8cc73a39
SDJ
57002015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5701
5702 * Makefile.in (SFILES): Add linux-personality.c.
5703 (linux-personality.o): New rule.
5704 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5705 list of objects to be built.
5706 * linux-low.c: Include nat/linux-personality.h.
5707 (linux_create_inferior): Remove code to disable address space
5708 randomization (moved to ../nat/linux-personality.c). Create
5709 cleanup to disable address space randomization.
5710
fb23d554
SDJ
57112015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5712
5713 * Makefile.in (posix-strerror.o): New rule.
5714 (mingw-strerror.o): Likewise.
5715 * configure: Regenerated.
5716 * configure.ac: Source file ../common/common.host. Initialize new
5717 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5718
cdf43629
YQ
57192015-01-14 Yao Qi <yao@codesourcery.com>
5720
5721 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5722 (ppc-linux.o): New rule.
5723 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5724 * configure.ac: AC_CHECK_FUNCS(getauxval).
5725 * config.in: Re-generated.
5726 * configure: Re-generated.
5727 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5728 ppc64_64bit_inferior_p
5729
514c5338
YQ
57302015-01-14 Yao Qi <yao@codesourcery.com>
5731
5732 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5733 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5734 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5735 (PT_ORIG_R3, PT_TRAP): Likewise.
5736 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5737 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5738 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5739
3368c1e5
JB
57402015-01-10 Joel Brobecker <brobecker@adacore.com>
5741
5742 * i387-fp.c (i387_cache_to_xsave): In look over
5743 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5744 zmmh_low_space field by use of zmmh_high_space.
5745
582511be
PA
57462015-01-09 Pedro Alves <palves@redhat.com>
5747
5748 * linux-low.c (step_over_bkpt): Move higher up in the file.
5749 (handle_extended_wait): Don't store the stop_pc here.
5750 (get_stop_pc): Adjust comments and rename to ...
5751 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5752 stopped for a software breakpoint or hardware breakpoint.
5753 (thread_still_has_status_pending_p): New function.
5754 (status_pending_p_callback): Use
5755 thread_still_has_status_pending_p. If the event is no longer
5756 interesting, resume the LWP.
5757 (handle_tracepoints): Add assert.
5758 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5759 (wstatus_maybe_breakpoint): New function.
5760 (cancel_breakpoint): Delete function.
5761 (check_stopped_by_watchpoint): New function, factored out from
5762 linux_low_filter_event.
5763 (lp_status_maybe_breakpoint): Delete function.
5764 (linux_low_filter_event): Remove filter_ptid argument.
5765 Leave thread group exits pending here. Store the LWP's stop PC.
5766 Always leave events pending.
5767 (linux_wait_for_event_filtered): Pull all events out of the
5768 kernel, and leave them all pending.
5769 (count_events_callback, select_event_lwp_callback): Consider all
5770 events.
5771 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5772 (select_event_lwp): Only give preference to the stepping LWP in
5773 all-stop mode. Adjust comments.
5774 (ignore_event): New function.
5775 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5776 references to cancel_breakpoints. Adjust to renames. Also give
5777 equal priority to all LWPs that have had events in non-stop mode.
5778 If reporting a software breakpoint event, unadjust the LWP's PC.
5779 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5780 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5781 Adjust.
5782 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5783 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5784 (linux_stopped_by_watchpoint): Adjust.
5785 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5786 * linux-low.h (enum lwp_stop_reason): New.
5787 (struct lwp_info) <stop_pc>: Adjust comment.
5788 <stopped_by_watchpoint>: Delete field.
5789 <stop_reason>: New field.
5790 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5791 * mem-break.c (software_breakpoint_inserted_here)
5792 (hardware_breakpoint_inserted_here): New function.
5793 * mem-break.h (software_breakpoint_inserted_here)
5794 (hardware_breakpoint_inserted_here): Declare.
5795 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5796 (cancel_breakpoints): Delete.
5797 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5798 (upload_fast_traceframes): Remove references to
5799 cancel_breakpoints.
5800
a33e3959
PA
58012015-01-09 Pedro Alves <palves@redhat.com>
5802
5803 * thread-db.c (find_new_threads_callback): Ignore thread if the
5804 kernel thread ID is -1.
5805
8784d563
PA
58062015-01-09 Pedro Alves <palves@redhat.com>
5807
5808 * linux-low.c (linux_attach_fail_reason_string): Move to
5809 nat/linux-ptrace.c, and rename.
5810 (linux_attach_lwp): Update comment.
5811 (attach_proc_task_lwp_callback): New function.
5812 (linux_attach): Adjust to rename and use
5813 linux_proc_attach_tgid_threads.
5814 (linux_attach_fail_reason_string): Delete declaration.
5815
76f2b779
JB
58162015-01-01 Joel Brobecker <brobecker@adacore.com>
5817
5818 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5819 * server.c (gdbserver_version): Likewise.
5820
fafcc06a
SDJ
58212014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5822
5823 * remote-utils.c: Include ctype.h.
5824 (input_interrupt): Explicitly handle the case when the char
5825 received is the NUL byte. Improve the printing of non-ASCII
5826 characters.
5827
beed38b8
JB
58282014-12-16 Joel Brobecker <brobecker@adacore.com>
5829
5830 * linux-low.c (linux_low_filter_event): Update call to
5831 linux_enable_event_reporting following the addition of
5832 a new parameter to that function.
5833
bf330350
CU
58342014-12-16 Catalin Udma <catalin.udma@freescale.com>
5835
5836 PR server/17457
5837 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5838 (AARCH64_FPCR_REGNO): Likewise.
5839 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5840 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5841 (aarch64_store_fpregset): Likewise.
5842
5227d625
JB
58432014-12-15 Joel Brobecker <brobecker@adacore.com>
5844
5845 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5846 Remove FIXME comment about assumption about N.
5847
f93b65a0
JB
58482014-12-13 Joel Brobecker <brobecker@adacore.com>
5849
5850 * configure.ac: If large-file support is disabled in GDBserver,
5851 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5852 * configure: Regenerate.
5853
e5a9158d
AA
58542014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5855
5856 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5857 warning upon ENODATA from ptrace.
5858 * linux-s390-low.c (s390_store_tdb): New.
5859 (s390_regsets): Add regset for NT_S390_TDB.
5860
feea5f36
AA
58612014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5862
5863 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5864 without a fill_function.
5865 * linux-s390-low.c (s390_fill_last_break): Remove.
5866 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5867 (s390_arch_setup): Use regset's size instead of fill_function for
5868 loop end condition.
5869
098dbe61
AA
58702014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5871
5872 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5873 the regset's store function when ptrace returned an error.
5874 * regcache.c (get_thread_regcache): Invalidate register cache
5875 before fetching inferior's registers.
5876
28eef672
AA
58772014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5878
5879 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5880 while-loop as for-loop.
5881 (regsets_store_inferior_registers): Likewise.
5882
bdca27a2
YQ
58832014-11-28 Yao Qi <yao@codesourcery.com>
5884
5885 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5886 * config.in, configure: Re-generate.
5887 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5888 is defined.
5889
9c232dda
YQ
58902014-11-21 Yao Qi <yao@codesourcery.com>
5891
5892 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5893 (AC_CHECK_HEADERS): Remove malloc.h.
5894 * configure: Re-generated.
5895 * config.in: Re-generated.
5896 * server.h: Don't include alloca.h and malloc.h.
5897 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5898 Don't include malloc.h.
5899
43968415
JB
59002014-11-17 Joel Brobecker <brobecker@adacore.com>
5901
5902 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5903 corresponding ERRNO check in same block.
5904
40e91bc7
PA
59052014-11-12 Pedro Alves <palves@redhat.com>
5906
5907 * server.c (cont_thread): Update comment.
5908 (start_inferior, attach_inferior): No longer clear cont_thread.
5909 (handle_v_cont): No longer set cont_thread.
5910 (captured_main): Clear cont_thread each time a GDB connects.
5911
c2c118cf
PA
59122014-11-12 Pedro Alves <palves@redhat.com>
5913
5914 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5915 thread, and don't resume all threads if the Hc thread has exited.
5916
78708b7c
PA
59172014-11-12 Pedro Alves <palves@redhat.com>
5918
5919 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5920 the process group instead of to a specific LWP.
5921
a2abc7de
PA
59222014-10-15 Pedro Alves <palves@redhat.com>
5923
5924 PR server/17487
5925 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5926 parameter.
5927 (arm_set_thread_context): Delete.
5928 (the_low_target): Adjust.
5929 * win32-i386-low.c (debug_registers_changed)
5930 (debug_registers_used): Delete.
5931 (update_debug_registers_callback): New function.
5932 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5933 needing to update their debug registers.
5934 (win32_get_current_dr): New function.
5935 (x86_dr_low_get_addr, x86_dr_low_get_control)
5936 (x86_dr_low_get_status): Fetch the debug register from the thread
5937 record's context.
5938 (i386_initial_stuff): Adjust.
5939 (i386_get_thread_context): Remove current_event parameter. Don't
5940 clear debug_registers_changed nor copy DR values to
5941 debug_reg_state.
5942 (i386_set_thread_context): Delete.
5943 (i386_prepare_to_resume): New function.
5944 (i386_thread_added): Mark the thread as needing to update irs
5945 debug registers.
5946 (the_low_target): Remove i386_set_thread_context and install
5947 i386_prepare_to_resume.
5948 * win32-low.c (win32_get_thread_context): Adjust.
5949 (win32_set_thread_context): Use SetThreadContext
5950 directly.
5951 (win32_prepare_to_resume): New function.
5952 (win32_require_context): New function, factored out from ...
5953 (thread_rec): ... this.
5954 (continue_one_thread): Call win32_prepare_to_resume on each thread
5955 we're about to continue.
5956 (win32_resume): Call win32_prepare_to_resume on the event thread.
5957 * win32-low.h (struct win32_thread_info)
5958 <debug_registers_changed>: New field.
5959 (struct win32_target_ops): Change prototype of set_thread_context,
5960 delete set_thread_context and add prepare_to_resume.
5961 (win32_require_context): New declaration.
5962
a442d071
GB
59632014-10-08 Gary Benson <gbenson@redhat.com>
5964
5965 * server.h: Do not include common-exceptions.h.
5966
6f1947e8
GB
59672014-10-08 Gary Benson <gbenson@redhat.com>
5968
5969 * server.h: Do not include cleanups.h.
5970
63b434a4
JH
59712014-09-30 James Hogan <james.hogan@imgtec.com>
5972
5973 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5974 mips64-dsp-linux.c.
5975
c4d9ceb6
YQ
59762014-09-23 Yao Qi <yao@codesourcery.com>
5977
5978 * linux-low.c (lp_status_maybe_breakpoint): New function.
5979 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5980 (count_events_callback): Likewise.
5981 (select_event_lwp_callback): Likewise.
5982 (cancel_breakpoints_callback): Likewise.
5983
89a5711c
DB
59842014-09-19 Don Breazeal <donb@codesourcery.com>
5985
5986 * linux-low.c (handle_extended_wait): Call
5987 linux_ptrace_get_extended_event.
5988 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5989 linux_is_extended_waitstatus.
5990
bffc0964
JB
59912014-09-16 Joel Brobecker <brobecker@adacore.com>
5992
5993 * Makefile.in (CPPFLAGS): Define.
5994 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5995 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5996
0bfdf32f
GB
59972014-09-16 Gary Benson <gbenson@redhat.com>
5998
5999 * inferiors.h (current_inferior): Renamed as...
6000 (current_thread): New variable. All uses updated.
6001 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6002 (maybe_move_out_of_jump_pad): Likewise.
6003 (cancel_breakpoint): Likewise.
6004 (linux_low_filter_event): Likewise.
6005 (wait_for_sigstop): Likewise.
6006 (linux_resume_one_lwp): Likewise.
6007 (need_step_over_p): Likewise.
6008 (start_step_over): Likewise.
6009 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6010 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6011 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6012 and save_inferior as saved_thread.
6013 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6014 saved_thread.
6015 (regcache_invalidate_thread): Likewise.
6016 * remote-utils.c (prepare_resume_reply): Likewise.
6017 * thread-db.c (thread_db_get_tls_address): Likewise.
6018 (disable_thread_event_reporting): Likewise.
6019 (remove_thread_event_breakpoints): Likewise.
6020 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6021 as saved_thread.
6022 * target.h (set_desired_inferior): Renamed as...
6023 (set_desired_thread): New declaration. All uses updated.
6024 * server.c (myresume): Updated comment to reference thread instead
6025 of inferior.
6026 (handle_serial_event): Likewise.
6027 (handle_target_event): Likewise.
6028
361c8ade
GB
60292014-09-12 Tom Tromey <tromey@redhat.com>
6030 Gary Benson <gbenson@redhat.com>
6031
6032 * regcache.h: Include common-regcache.h.
6033 (regcache_read_pc): Don't declare.
6034 * regcache.c (get_thread_regcache_for_ptid): New function.
6035
bd9269f7
GB
60362014-09-11 Tom Tromey <tromey@redhat.com>
6037 Gary Benson <gbenson@redhat.com>
6038
6039 * symbol.c: New file.
6040 * Makefile.in (SFILES): Add symbol.c.
6041 (OBS): Add symbol.o.
6042
f8c1d06b
GB
60432014-09-11 Gary Benson <gbenson@redhat.com>
6044
6045 * target.c (target_stop_ptid, target_continue_ptid): New
6046 functions.
6047
721ec300
GB
60482014-09-11 Tom Tromey <tromey@redhat.com>
6049 Gary Benson <gbenson@redhat.com>
6050
6051 * target.h: Include target/target.h.
6052 * target.c (target_read_memory, target_read_uint32)
6053 (target_write_memory): New functions.
6054
c5e92cca
GB
60552014-09-11 Gary Benson <gbenson@redhat.com>
6056
6057 * server.h (debug_hw_points): Don't declare.
6058 * server.c (debug_hw_points): Don't define. Replace all uses
6059 with show_debug_regs.
6060 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6061 all uses with show_debug_regs.
6062
2e4bb98a
EBM
60632014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6064
6065 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6066 endianness into account.
6067 (ppc_supply_ptrace_register): Likewise.
6068
ac740bc7
JH
60692014-09-03 James Hogan <james.hogan@imgtec.com>
6070
6071 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6072 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6073
97ea6506
GB
60742014-09-03 Gary Benson <gbenson@redhat.com>
6075
6076 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6077 ALL_DEBUG_ADDRESS_REGISTERS.
6078
df7e5265
GB
60792014-09-02 Gary Benson <gbenson@redhat.com>
6080
6081 * i386-low.h: Renamed as...
6082 * x86-low.h: New file. All type, function and variable name
6083 prefixes changed from "i386_" to "x86_". All references updated.
6084 * i386-low.c: Renamed as...
6085 * x86-low.c: New file. All type, function and variable name
6086 prefixes changed from "i386_" to "x86_". All references updated.
6087
ed859da7
GB
60882014-09-02 Gary Benson <gbenson@redhat.com>
6089
6090 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6091 (x86_linux_new_thread): Likewise.
6092
860789c7
GB
60932014-08-29 Gary Benson <gbenson@redhat.com>
6094
6095 * server.h (setjmp.h): Do not include.
6096 (toplevel): Do not declare.
6097 (common-exceptions.h): Include.
6098 (cleanups.h): Likewise.
6099 * server.c (toplevel): Do not define.
6100 (exit_code): New static global.
6101 (detach_or_kill_for_exit_cleanup): New function.
6102 (main): New function. Original main renamed to...
6103 (captured_main): New function.
6104 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6105
ff55e1b5
GB
61062014-08-29 Gary Benson <gbenson@redhat.com>
6107
6108 * Makefile.in (SFILES): Add common/common-exceptions.c.
6109 (OBS): Add common-exceptions.o.
6110 (common-exceptions.o): New rule.
6111 * utils.c (prepare_to_throw_exception): New function.
6112
e9bcb658
GB
61132014-08-29 Gary Benson <gbenson@redhat.com>
6114
6115 * config.in: Regenerate.
6116 * configure: Likewise.
6117
e3180625
GB
61182014-08-29 Gary Benson <gbenson@redhat.com>
6119
6120 * Makefile.in (SFILES): Add common/cleanups.c.
6121 (OBS): cleanups.o.
6122 (cleanups.o): New rule.
6123
e3d6ba5d
GB
61242014-08-29 Gary Benson <gbenson@redhat.com>
6125
6126 * utils.c (internal_vwarning): New function.
6127
7096e886
GB
61282014-08-28 Gary Benson <gbenson@redhat.com>
6129
6130 * utils.h (fatal): Remove declaration.
6131 * utils.c (fatal): Remove function.
6132
14ce3192
GB
61332014-08-28 Gary Benson <gbenson@redhat.com>
6134
6135 * tracepoint.c (gdb_agent_init): Replace fatal with
6136 perror_with_name.
6137 (initialize_tracepoint): Likewise.
6138
50278d59
GB
61392014-08-28 Gary Benson <gbenson@redhat.com>
6140
6141 * remote-utils.c (remote_prepare): Replace fatal with error.
6142
aa96c426
GB
61432014-08-28 Gary Benson <gbenson@redhat.com>
6144
6145 * linux-low.c (linux_async): Replace fatal with warning.
6146 Tidy up and return.
6147 (linux_start_non_stop): Return -1 if linux_async failed.
6148
f7160e97
GB
61492014-08-28 Gary Benson <gbenson@redhat.com>
6150
6151 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6152 gdb_assert.
6153 (i386_dr_low_get_addr): Remove vague comment.
6154 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6155 gdb_assert.
6156
38e08fca
GB
61572014-08-28 Gary Benson <gbenson@redhat.com>
6158
6159 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6160 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6161 internal_error.
6162 (linux_resume_one_lwp): Likewise.
6163 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6164 gdb_assert.
6165 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6166 with internal_error.
6167 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6168 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6169 (find_register_by_name): Replace fatal with internal_error.
6170 (find_regno): Likewise.
6171 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6172 * thread-db.c (thread_db_create_event): Likewise.
6173 (thread_db_load_search): Likewise.
6174 (try_thread_db_load_1): Likewise.
6175 * tracepoint.c (get_jump_space_head): Replace fatal with
6176 internal_error.
6177 (claim_trampoline_space): Likewise.
6178 (have_fast_tracepoint_trampoline_buffer): Likewise.
6179 (cmd_qtstart): Likewise.
6180 (stop_tracing): Likewise.
6181 (fast_tracepoint_collecting): Likewise.
6182 (target_malloc): Likewise.
6183 (download_tracepoint): Likewise.
6184 (download_trace_state_variables): Replace check with gdb_assert.
6185 (upload_fast_traceframes): Replace fatal with internal_error.
6186
34abf635
GB
61872014-08-19 Tom Tromey <tromey@redhat.com>
6188 Gary Benson <gbenson@redhat.com>
6189
6190 * Makefile.in (SFILES): Add common/common-debug.c.
6191 (OBS): Add common-debug.o.
6192 (common-debug.o): New rule.
6193 * debug.h (debug_printf): Don't declare.
6194 * debug.c (debug_printf): Renamed and rewritten as...
6195 (debug_vprintf): New function.
6196
f6e94d78
GB
61972014-08-19 Gary Benson <gbenson@redhat.com>
6198
6199 * utils.h: Do not include print-utils.h.
6200
9239eeab
GB
62012014-08-19 Tom Tromey <tromey@redhat.com>
6202 Gary Benson <gbenson@redhat.com>
6203
6204 * server.h: Add static assertion.
6205 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6206
ef87c8bb
GB
62072014-08-19 Tom Tromey <tromey@redhat.com>
6208 Gary Benson <gbenson@redhat.com>
6209
6210 * Makefile.in (SFILES): Add common/errors.c.
6211 (OBS): Add errors.o.
6212 (IPA_OBS): Add errors-ipa.o.
6213 (errors.o): New rule.
6214 (errors-ipa.o): Likewise.
6215 * utils.h (perror_with_name, error, warning): Don't declare.
6216 * utils.c (warning): Renamed and rewritten as...
6217 (vwarning): New function.
6218 (error): Renamed and rewritten as...
6219 (verror): New function.
6220 (internal_error): Renamed and rewritten as...
6221 (internal_verror): New function.
6222
bb974a24
GB
62232014-08-07 Gary Benson <gbenson@redhat.com>
6224
6225 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6226 * configure: Regenerate.
6227 * config.in: Likewise.
6228 * server.h: Do not include errno.h.
6229 * event-loop.c: Likewise.
6230 * hostio-errno.c: Likewise.
6231 * linux-low.c: Likewise.
6232 * remote-utils.c: Likewise.
6233 * spu-low.c: Likewise.
6234 * utils.c: Likewise.
6235 * gdbreplay.c: Unconditionally include errno.h.
6236
6d3d12eb
GB
62372014-08-07 Gary Benson <gbenson@redhat.com>
6238
6239 * server.h: Do not include string.h.
6240 * event-loop.c: Likewise.
6241 * linux-low.c: Likewise.
6242 * regcache.c: Likewise.
6243 * remote-utils.c: Likewise.
6244 * spu-low.c: Likewise.
6245 * utils.c: Likewise.
6246
dccbb609
GB
62472014-08-07 Gary Benson <gbenson@redhat.com>
6248
6249 * server.h: Do not include gdb_assert.h.
6250
e76df0d0
GB
62512014-08-07 Gary Benson <gbenson@redhat.com>
6252
6253 * server.h: Do not include common-utils.h.
6254
4cb9c816
GB
62552014-08-07 Gary Benson <gbenson@redhat.com>
6256
6257 * server.h: Do not include ptid.h.
6258 * notif.h: Likewise.
6259
3995eeee
GB
62602014-08-07 Gary Benson <gbenson@redhat.com>
6261
6262 * server.h: Do not include gdb_locale.h.
6263
cb9f1a9b
GB
62642014-08-07 Gary Benson <gbenson@redhat.com>
6265
6266 * server.h: Do not include gdb/signals.h.
6267 * win32-low.c: Likewise.
6268
a5fceff8
GB
62692014-08-07 Gary Benson <gbenson@redhat.com>
6270
6271 * server.h: Do not include pathmax.h.
6272
b9391142
GB
62732014-08-07 Gary Benson <gbenson@redhat.com>
6274
6275 * server.h: Do not include libiberty.h.
6276 * linux-bfin-low.c: Likewise.
6277
0e443c87
GB
62782014-08-07 Gary Benson <gbenson@redhat.com>
6279
6280 * server.h: Do not include ansidecl.h.
6281
8ebb3f56
GB
62822014-08-07 Gary Benson <gbenson@redhat.com>
6283
6284 * linux-x86-low.c: Do not include stddef.h.
6285 * lynx-ppc-low.c: Likewise.
6286 * tracepoint.c: Likewise.
6287
8980bdf6
GB
62882014-08-07 Gary Benson <gbenson@redhat.com>
6289
6290 * server.h: Do not include stdarg.h.
6291 * nto-low.c: Likewise.
6292
d7096f71
GB
62932014-08-07 Gary Benson <gbenson@redhat.com>
6294
6295 * server.h: Do not include stdlib.h.
6296 * inferiors.c: Likewise.
6297 * linux-low.c: Likewise.
6298 * regcache.c: Likewise.
6299 * spu-low.c: Likewise.
6300 * tracepoint.c: Likewise.
6301 * utils.c: Likewise.
6302
d02f550d
GB
63032014-08-07 Gary Benson <gbenson@redhat.com>
6304
6305 * server.h: Do not include stdio.h.
6306 * linux-low.c: Likewise.
6307 * remote-utils.c: Likewise.
6308 * spu-low.c: Likewise.
6309 * utils.c: Likewise.
6310 * wincecompat.c: Likewise.
6311
87f6c4e3
GB
63122014-08-06 Gary Benson <gbenson@redhat.com>
6313
6314 * regcache.c (init_register_cache): Move conditionals inside if.
6315
7089dca4
GB
63162014-08-06 Gary Benson <gbenson@redhat.com>
6317
6318 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6319
462f517e
GB
63202014-07-31 Gary Benson <gbenson@redhat.com>
6321
6322 * ax.h: Do not include server.h.
6323 * gdbthread.h: Likewise.
6324 * lynx-low.h: Likewise.
6325 * notif.h: Likewise.
6326
976411d6
GB
63272014-07-30 Gary Benson <gbenson@redhat.com>
6328
6329 * server.h: Include common-defs.h.
6330 Do not include config.h or build-gnulib-gdbserver/config.h.
6331
d41f6d8e
GB
63322014-07-30 Gary Benson <gbenson@redhat.com>
6333
6334 * hostio-errno.c: Move server.h to top of includes list.
6335 * inferiors.c: Likewise.
6336 * linux-x86-low.c: Likewise.
6337 * notif.c: Include server.h.
6338
314c6a35
TT
63392014-07-24 Tom Tromey <tromey@redhat.com>
6340 Gary Benson <gbenson@redhat.com>
6341
6342 * server.h (CORE_ADDR): Now unsigned.
6343
69ff6be5
PA
63442014-07-16 Pedro Alves <palves@redhat.com>
6345
6346 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6347
ce9e3fe7
PA
63482014-07-15 Pedro Alves <palves@redhat.com>
6349
6350 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6351 copy.
6352
e76126e8
PA
63532014-07-11 Pedro Alves <palves@redhat.com>
6354
6355 * linux-low.c (kill_wait_lwp): New function, based on
6356 kill_one_lwp_callback, but use my_waitpid directly.
6357 (kill_one_lwp_callback, linux_kill): Use it.
6358
8e9db26e
PA
63592014-06-23 Pedro Alves <palves@redhat.com>
6360
6361 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6362 before setting DR0..DR3.
6363
698b3e08
GB
63642014-06-20 Gary Benson <gbenson@redhat.com>
6365
6366 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6367 * configure: Regenerated.
6368 * config.in: Likewise.
6369
125f8a3d
GB
63702014-06-20 Gary Benson <gbenson@redhat.com>
6371
6372 * Makefile.in (SFILES): Update locations for files moved
6373 from common to nat.
6374 (object file files): Reordered.
6375
42995dbd
GB
63762014-06-20 Gary Benson <gbenson@redhat.com>
6377
6378 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6379 (i386_dr_low_set_addr): Likewise.
6380 (i386_dr_low_get_addr): Likewise.
6381 (i386_dr_low_can_set_control): Likewise.
6382 (i386_dr_low_set_control): Likewise.
6383 (i386_dr_low_get_control): Likewise.
6384 (i386_dr_low_get_status): Likewise.
6385 (i386_get_debug_register_length): Likewise.
6386 * linux-x86-low.c (i386_dr_low_set_addr):
6387 Changed signature. Made static.
6388 (i386_dr_low_get_addr): Likewise.
6389 (i386_dr_low_set_control): Likewise.
6390 (i386_dr_low_get_control): Likewise.
6391 (i386_dr_low_get_status): Likewise.
6392 (i386_dr_low): New global variable.
6393 * win32-i386-low.c (i386_dr_low_set_addr):
6394 Changed signature. Made static.
6395 (i386_dr_low_get_addr): Likewise.
6396 (i386_dr_low_set_control): Likewise.
6397 (i386_dr_low_get_control): Likewise.
6398 (i386_dr_low_get_status): Likewise.
6399 (i386_dr_low): New global variable.
6400
e1d2394b
MS
64012014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6402
6403 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6404 * Makefile.in (AR, AR_FLAGS): Define.
6405 * configure: Regenerate.
6406
3a8ee006
GB
64072014-06-19 Gary Benson <gbenson@redhat.com>
6408
6409 * Makefile.in (i386-dregs.o): New rule.
6410 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6411 * i386-low.c (target.h): Remove include.
6412 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6413 (DR_CONTROL_SHIFT): Likewise.
6414 (DR_CONTROL_SIZE): Likewise.
6415 (DR_RW_EXECUTE): Likewise.
6416 (DR_RW_WRITE): Likewise.
6417 (DR_RW_READ): Likewise.
6418 (DR_RW_IORW): Likewise.
6419 (DR_LEN_1): Likewise.
6420 (DR_LEN_2): Likewise.
6421 (DR_LEN_4): Likewise.
6422 (DR_LEN_8): Likewise.
6423 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6424 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6425 (DR_ENABLE_SIZE): Likewise.
6426 (DR_LOCAL_SLOWDOWN): Likewise.
6427 (DR_GLOBAL_SLOWDOWN): Likewise.
6428 (DR_CONTROL_RESERVED): Likewise.
6429 (I386_DR_CONTROL_MASK): Likewise.
6430 (I386_DR_VACANT): Likewise.
6431 (I386_DR_LOCAL_ENABLE): Likewise.
6432 (I386_DR_GLOBAL_ENABLE): Likewise.
6433 (I386_DR_DISABLE): Likewise.
6434 (I386_DR_SET_RW_LEN): Likewise.
6435 (I386_DR_GET_RW_LEN): Likewise.
6436 (I386_DR_WATCH_HIT): Likewise.
6437 (i386_wp_op_t): Likewise.
6438 (i386_show_dr): Likewise.
6439 (i386_length_and_rw_bits): Likewise.
6440 (i386_insert_aligned_watchpoint): Likewise.
6441 (i386_remove_aligned_watchpoint): Likewise.
6442 (i386_handle_nonaligned_watchpoint): Likewise.
6443 i386_update_inferior_debug_regs(): Likewise.
6444 (i386_dr_insert_watchpoint): Likewise.
6445 (i386_dr_remove_watchpoint): Likewise.
6446 (i386_dr_region_ok_for_watchpoint): Likewise.
6447 (i386_dr_stopped_data_address): Likewise.
6448 (i386_dr_stopped_by_watchpoint): Likewise.
6449
8f26655c
GB
64502014-06-19 Gary Benson <gbenson@redhat.com>
6451
6452 * i386-low.c (i386_dr_show): Renamed to
6453 i386_show_dr and made static. All uses updated.
6454 (i386_dr_length_and_rw_bits): Renamed to
6455 i386_length_and_rw_bits and made static.
6456 All uses updated.
6457 (i386_dr_insert_aligned_watchpoint): Renamed to
6458 i386_insert_aligned_watchpoint and made static.
6459 All uses updated.
6460 (i386_dr_remove_aligned_watchpoint): Renamed to
6461 i386_remove_aligned_watchpoint and made static.
6462 All uses updated.
6463 (i386_dr_update_inferior_debug_regs): Renamed to
6464 i386_update_inferior_debug_regs and made static.
6465 All uses updated.
6466
b9228891
GB
64672014-06-18 Gary Benson <gbenson@redhat.com>
6468
5171def3
GB
6469 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6470 (i386_dr_low_can_set_control): Likewise.
6471 (i386_get_debug_register_length): Likewise.
6472 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6473 (i386_dr_low_can_set_control): Likewise.
6474 (i386_get_debug_register_length): Likewise.
6475
64762014-06-17 Gary Benson <gbenson@redhat.com>
6477
b9228891
GB
6478 * i386-low.h (i386-dregs.h): New include.
6479 (DR_FIRSTADDR): Now in i386-dregs.h.
6480 (DR_LASTADDR): Likewise.
6481 (DR_NADDR): Likewise.
6482 (DR_STATUS): Likewise.
6483 (DR_CONTROL): Likewise.
6484 (i386_debug_reg_state): Likewise.
6485 (i386_dr_insert_watchpoint): Likewise.
6486 (i386_dr_remove_watchpoint): Likewise.
6487 (i386_dr_region_ok_for_watchpoint): Likewise.
6488 (i386_dr_stopped_data_address): Likewise.
6489 (i386_dr_stopped_by_watchpoint): Likewise.
6490 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6491
4be83cc2
GB
64922014-06-18 Gary Benson <gbenson@redhat.com>
6493
6494 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6495 i386_dr_insert_watchpoint.
6496 (i386_low_remove_watchpoint): Renamed to
6497 i386_dr_remove_watchpoint.
6498 (i386_low_region_ok_for_watchpoint): Renamed to
6499 i386_dr_region_ok_for_watchpoint.
6500 (i386_low_stopped_data_address): Renamed to
6501 i386_dr_stopped_data_address.
6502 (i386_low_stopped_by_watchpoint): Renamed to
6503 i386_dr_stopped_by_watchpoint.
6504 * i386-low.c (i386_show_dr): Renamed to
6505 i386_dr_show and made nonstatic. All uses updated.
6506 (i386_length_and_rw_bits): Renamed to
6507 i386_dr_length_and_rw_bits and made nonstatic.
6508 All uses updated.
6509 (i386_insert_aligned_watchpoint): Renamed to
6510 i386_dr_insert_aligned_watchpoint and made nonstatic.
6511 All uses updated.
6512 (i386_remove_aligned_watchpoint): Renamed to
6513 i386_dr_remove_aligned_watchpoint and made nonstatic.
6514 All uses updated.
6515 (i386_update_inferior_debug_regs): Renamed to
6516 i386_dr_update_inferior_debug_regs and made nonstatic.
6517 All uses updated.
6518 (i386_low_insert_watchpoint): Renamed to
6519 i386_dr_insert_watchpoint. All uses updated.
6520 (i386_low_remove_watchpoint): Renamed to
6521 i386_dr_remove_watchpoint. All uses updated.
6522 (i386_low_region_ok_for_watchpoint): Renamed to
6523 i386_dr_region_ok_for_watchpoint. All uses updated.
6524 (i386_low_stopped_data_address): Renamed to
6525 i386_dr_stopped_data_address. All uses updated.
6526 (i386_low_stopped_by_watchpoint): Renamed to
6527 i386_dr_stopped_by_watchpoint. All uses updated.
6528
131aa0d4
GB
65292014-06-18 Gary Benson <gbenson@redhat.com>
6530
6531 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6532 (i386_dr_low_can_set_control): Likewise.
6533 (i386_insert_aligned_watchpoint): New check.
6534
d9305f7f
GB
65352014-06-18 Gary Benson <gbenson@redhat.com>
6536
6537 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6538 Renamed to state.
6539
e927c9fc
GB
65402014-06-18 Gary Benson <gbenson@redhat.com>
6541
6542 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6543 instead of fatal and error.
6544 (i386_handle_nonaligned_watchpoint): Likewise.
6545
1b6d4134
GB
65462014-06-18 Gary Benson <gbenson@redhat.com>
6547
6548 * i386-low.c (i386_get_debug_register_length): New macro.
6549 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6550 (i386_show_dr): Use debug_printf instead of fprintf. Use
6551 phex to format values.
6552
6e62758f
GB
65532014-06-18 Gary Benson <gbenson@redhat.com>
6554
6555 * i386-low.h: Comment changes.
6556 * i386-low.c: Likewise.
6557
fc6e2f03
GB
65582014-06-18 Gary Benson <gbenson@redhat.com>
6559
6560 * i386-low.c: Whitespace changes.
6561
f9d1eeed
TT
65622014-06-12 Tom Tromey <tromey@redhat.com>
6563
6564 * utils.c (freeargv): Remove.
6565
0b04e523
TT
65662014-06-12 Tom Tromey <tromey@redhat.com>
6567
6568 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6569 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6570 (parse_debug_format_options): Likewise.
6571 (gdbserver_usage): Likewise.
6572 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6573 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6574 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6575 against libiberty.
6576 ($(LIBGNU)): Depend on libiberty.
6577 (all-lib): Recurse into all subdirs.
6578 (install-only): Invoke "install" target in subdirs.
6579 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6580 targets.
6581 * configure: Rebuild.
6582 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6583 for vasprintf, vsnprintf, or gettimeofday.
6584 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6585 srv_tgtobj.
6586
270c9937
JB
65872014-06-05 Joel Brobecker <brobecker@adacore.com>
6588
6589 * development.sh: Delete.
6590 * Makefile.in (config.status): Adjust dependency on development.sh.
6591 * configure.ac: Adjust development.sh source call.
6592 * configure: Regenerate.
6593
0a261ed8
PA
65942014-06-02 Pedro Alves <palves@redhat.com>
6595
6596 * ax.c (gdb_free_agent_expr): New function.
6597 * ax.h (gdb_free_agent_expr): New declaration.
6598 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6599 list.
6600 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6601 static.
6602 (clear_breakpoint_conditions_and_commands): New function.
6603 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6604 (clear_breakpoint_conditions_and_commands): New declaration.
6605
e9dae05e
RR
66062014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6607
6608 * linux-aarch64-low.c (asm/ptrace.h): Include.
6609
5876f503
JK
66102014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6611
6612 Fix TLS access for -static -pthread.
6613 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6614 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6615 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6616
802e8e6d
PA
66172014-05-20 Pedro Alves <palves@redhat.com>
6618
6619 * linux-aarch64-low.c (aarch64_insert_point)
6620 (aarch64_remove_point): No longer check whether the type is
6621 supported here. Adjust to new interface.
6622 (the_low_target): Install aarch64_supports_z_point_type as
6623 supports_z_point_type method.
6624 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6625 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6626 instead of a Z packet char. Adjust.
6627 (arm_supports_z_point_type): New function.
6628 (arm_insert_point, arm_remove_point): Adjust to new interface.
6629 (the_low_target): Install arm_supports_z_point_type.
6630 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6631 (cris_insert_point, cris_remove_point): Adjust to new interface.
6632 Don't check whether the type is supported here.
6633 (the_low_target): Install cris_supports_z_point_type.
6634 * linux-low.c (linux_supports_z_point_type): New function.
6635 (linux_insert_point, linux_remove_point): Adjust to new interface.
6636 * linux-low.h (struct linux_target_ops) <insert_point,
6637 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6638 raw_breakpoint pointer parameter.
6639 <supports_z_point_type>: New method.
6640 * linux-mips-low.c (mips_supports_z_point_type): New function.
6641 (mips_insert_point, mips_remove_point): Adjust to new interface.
6642 Use mips_supports_z_point_type.
6643 (the_low_target): Install mips_supports_z_point_type.
6644 * linux-ppc-low.c (the_low_target): Install NULL as
6645 supports_z_point_type method.
6646 * linux-s390-low.c (the_low_target): Install NULL as
6647 supports_z_point_type method.
6648 * linux-sparc-low.c (the_low_target): Install NULL as
6649 supports_z_point_type method.
6650 * linux-x86-low.c (x86_supports_z_point_type): New function.
6651 (x86_insert_point): Adjust to new insert_point interface. Use
6652 insert_memory_breakpoint. Adjust to new
6653 i386_low_insert_watchpoint interface.
6654 (x86_remove_point): Adjust to remove_point interface. Use
6655 remove_memory_breakpoint. Adjust to new
6656 i386_low_remove_watchpoint interface.
6657 (the_low_target): Install x86_supports_z_point_type.
6658 * lynx-low.c (lynx_target_ops): Install NULL as
6659 supports_z_point_type callback.
6660 * nto-low.c (nto_supports_z_point_type): New.
6661 (nto_insert_point, nto_remove_point): Adjust to new interface.
6662 (nto_target_ops): Install nto_supports_z_point_type.
6663 * mem-break.c: Adjust intro comment.
6664 (struct raw_breakpoint) <raw_type, size>: New fields.
6665 <inserted>: Update comment.
6666 <shlib_disabled>: Delete field.
6667 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6668 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6669 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6670 (raw_bkpt_type_to_target_hw_bp_type): New function.
6671 (find_enabled_raw_code_breakpoint_at): New function.
6672 (find_raw_breakpoint_at): New type and size parameters. Use them.
6673 (insert_memory_breakpoint): New function, based off
6674 set_raw_breakpoint_at.
6675 (remove_memory_breakpoint): New function.
6676 (set_raw_breakpoint_at): Reimplement.
6677 (set_breakpoint): New, based on set_breakpoint_at.
6678 (set_breakpoint_at): Reimplement.
6679 (delete_raw_breakpoint): Go through the_target->remove_point
6680 instead of assuming memory breakpoints.
6681 (find_gdb_breakpoint_at): Delete.
6682 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6683 (find_gdb_breakpoint): New function.
6684 (set_gdb_breakpoint_at): Delete.
6685 (z_type_supported): New function.
6686 (set_gdb_breakpoint_1): New function, loosely based off
6687 set_gdb_breakpoint_at.
6688 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6689 (delete_gdb_breakpoint_at): Delete.
6690 (delete_gdb_breakpoint_1): New function, loosely based off
6691 delete_gdb_breakpoint_at.
6692 (delete_gdb_breakpoint): New function.
6693 (clear_gdb_breakpoint_conditions): Rename to ...
6694 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6695 breakpoint.
6696 (add_condition_to_breakpoint): Make static.
6697 (add_breakpoint_condition): Take a struct breakpoint pointer
6698 instead of an address. Adjust.
6699 (gdb_condition_true_at_breakpoint): Rename to ...
6700 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6701 z_type parameter.
6702 (gdb_condition_true_at_breakpoint): Reimplement.
6703 (add_breakpoint_commands): Take a struct breakpoint pointer
6704 instead of an address. Adjust.
6705 (gdb_no_commands_at_breakpoint): Rename to ...
6706 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6707 parameter. Return true if no breakpoint was found. Change debug
6708 output.
6709 (gdb_no_commands_at_breakpoint): Reimplement.
6710 (run_breakpoint_commands): Rename to ...
6711 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6712 and change return type to boolean.
6713 (run_breakpoint_commands): New function.
6714 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6715 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6716 breakpoint. Go through the_target->remove_point instead of
6717 assuming memory breakpoint.
6718 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6719 software and hardware breakpoints.
6720 (reinsert_raw_breakpoint): Go through the_target->insert_point
6721 instead of assuming memory breakpoint.
6722 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6723 software and hardware breakpoints.
6724 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6725 Check both software and hardware breakpoints.
6726 (validate_inserted_breakpoint): Assert the breakpoint is a
6727 software breakpoint. Set the inserted flag to -1 instead of
6728 setting shlib_disabled.
6729 (delete_disabled_breakpoints): Adjust.
6730 (validate_breakpoints): Only validate software breakpoints.
6731 Adjust to inserted flag change.
6732 (check_mem_read, check_mem_write): Skip breakpoint types other
6733 than software breakpoints. Adjust to inserted flag change.
6734 * mem-break.h (enum raw_bkpt_type): New enum.
6735 (raw_breakpoint, struct process_info): Forward declare.
6736 (Z_packet_to_target_hw_bp_type): Delete declaration.
6737 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6738 (set_gdb_breakpoint, delete_gdb_breakpoint)
6739 (clear_breakpoint_conditions): New declarations.
6740 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6741 (breakpoint_inserted_here): Update comment.
6742 (add_breakpoint_condition, add_breakpoint_commands): Replace
6743 address parameter with a breakpoint pointer parameter.
6744 (gdb_breakpoint_here): Update comment.
6745 (delete_gdb_breakpoint_at): Delete.
6746 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6747 * server.c (process_point_options): Take a struct breakpoint
6748 pointer instead of an address. Adjust.
6749 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6750 delete_gdb_breakpoint.
6751 * spu-low.c (spu_target_ops): Install NULL as
6752 supports_z_point_type method.
6753 * target.h: Include mem-break.h.
6754 (struct target_ops) <prepare_to_access_memory>: Update comment.
6755 <supports_z_point_type>: New field.
6756 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6757 instead of a char. Also take a raw breakpoint pointer.
6758 * win32-arm-low.c (the_low_target): Install NULL as
6759 supports_z_point_type.
6760 * win32-i386-low.c (i386_supports_z_point_type): New function.
6761 (i386_insert_point, i386_remove_point): Adjust to new interface.
6762 (the_low_target): Install i386_supports_z_point_type.
6763 * win32-low.c (win32_supports_z_point_type): New function.
6764 (win32_insert_point, win32_remove_point): Adjust to new interface.
6765 (win32_target_ops): Install win32_supports_z_point_type.
6766 * win32-low.h (struct win32_target_ops):
6767 <supports_z_point_type>: New method.
6768 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6769 instead of a char. Also take a raw breakpoint pointer.
6770
932539e3
PA
67712014-05-20 Pedro Alves <palves@redhat.com>
6772
6773 * mem-break.h: Include break-common.h.
6774 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6775 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6776 (Z_packet_to_target_hw_bp_type): New declaration.
6777 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6778 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6779 (Z_PACKET_ACCESS_WP): Delete macros.
6780 (Z_packet_to_hw_type): Delete function.
6781 * i386-low.h: Don't include break-common.h here.
6782 (Z_packet_to_hw_type): Delete declaration.
6783 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6784 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6785 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6786 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6787 * linux-aarch64-low.c: Don't include break-common.h here.
6788 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6789 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6790 (Z_packet_to_target_hw_bp_type): Delete function.
6791 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6792 function.
6793 (mips_insert_point, mips_remove_point): Use
6794 Z_packet_to_target_hw_bp_type.
6795
4ff0d3d8
PA
67962014-05-20 Pedro Alves <palves@redhat.com>
6797
6798 * linux-aarch64-low.c: Include break-common.h.
6799 (enum target_point_type): Delete.
6800 (Z_packet_to_point_type): Rename to ...
6801 (Z_packet_to_target_hw_bp_type): ... this, and return a
6802 target_hw_bp_type instead.
6803 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6804 instead of an enum target_point_type.
6805 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6806 breakpoint type.
6807 (aarch64_dr_state_insert_one_point)
6808 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6809 (aarch64_handle_aligned_watchpoint)
6810 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6811 Take an enum target_hw_bp_type instead of an enum
6812 target_point_type.
6813 (aarch64_supports_z_point_type): New function.
6814 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6815 use Z_packet_to_target_hw_bp_type.
6816
786dc519
JB
68172014-05-20 Joel Brobecker <brobecker@adacore.com>
6818
6819 * configure.ac: Only use -Werror by default when DEVELOPMENT
6820 is true.
6821 * configure: Regenerate.
6822
9e0aa64f
JK
68232014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6824
6825 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6826 * linux-x86-low.c (X86_64_USER_REGS): New.
6827 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6828
2b577b92
YQ
68292014-04-28 Yao Qi <yao@codesourcery.com>
6830
6831 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6832 name.
6833
94611da2
PA
68342014-04-25 Pedro Alves <palves@redhat.com>
6835
6836 PR server/16255
6837 * linux-low.c (linux_attach_fail_reason_string): New function.
6838 (linux_attach_lwp): Delete.
6839 (linux_attach_lwp_1): Rename to ...
6840 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6841 argument. Remove "initial" parameter. Return int instead of
6842 void. Don't error or warn here.
6843 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6844 failure to attach to the tgid. Call warning when failing to
6845 attach to an lwp.
6846 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6847 argument. Remove "initial" parameter. Return int instead of
6848 void. Don't error or warn here.
6849 (linux_attach_fail_reason_string): New declaration.
6850 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6851 interface change. Use linux_attach_fail_reason_string.
6852
01f9f808
MS
68532014-04-24 Michael Sturm <michael.sturm@mintel.com>
6854 Walfred Tedeschi <walfred.tedeschi@intel.com>
6855
6856 * Makefile.in: Added rules to handle new files
6857 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6858 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6859 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6860 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6861 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6862 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6863 x32-avx512-linux.o.
6864 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6865 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6866 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6867 i386/x32-avx512.xml.
6868 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6869 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6870 i386/x32-avx512-linux.xml.
6871 * i387-fp.c (num_avx512_k_registers): New constant for number
6872 of K registers.
6873 (num_avx512_zmmh_low_registers): New constant for number of
6874 lower ZMM registers (0-15).
6875 (num_avx512_zmmh_high_registers): New constant for number of
6876 higher ZMM registers (16-31).
6877 (num_avx512_ymmh_registers): New contant for number of higher
6878 YMM registers (ymm16-31 added by avx521 on x86_64).
6879 (num_avx512_xmm_registers): New constant for number of higher
6880 XMM registers (xmm16-31 added by AVX512 on x86_64).
6881 (struct i387_xsave): Add space for AVX512 registers.
6882 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6883 Add code to handle AVX512 registers.
6884 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6885 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6886 prototypei from generated file.
6887 (tdesc_amd64_avx512_linux): Likewise.
6888 (init_registers_x32_avx512_linux): Likewise.
6889 (tdesc_x32_avx512_linux): Likewise.
6890 (init_registers_i386_avx512_linux): Likewise.
6891 (tdesc_i386_avx512_linux): Likewise.
6892 (x86_64_regmap): Add AVX512 registers.
6893 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6894 mask.
6895 (initialize_low_arch): Add code to initialize AVX512 registers.
6896
51aa91f9
PA
68972014-04-23 Pedro Alves <palves@redhat.com>
6898
6899 * mem-break.c (find_gdb_breakpoint_at): Make static.
6900 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6901
a4165e94
PA
69022014-04-23 Pedro Alves <palves@redhat.com>
6903
6904 * i386-low.c: Don't include break-common.h here.
6905 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6906 prototype to take target_hw_bp_type as argument instead of a Z
6907 packet char.
6908 * i386-low.h: Include break-common.h here.
6909 (Z_packet_to_hw_type): Declare.
6910 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6911 prototypes.
6912 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6913 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6914 (x86_remove_point): Convert the packet number to a
6915 target_hw_bp_type before calling i386_low_remove_watchpoint.
6916 * win32-i386-low.c (i386_insert_point): Convert the packet number
6917 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6918 (i386_remove_point): Convert the packet number to a
6919 target_hw_bp_type before calling i386_low_remove_watchpoint.
6920
b8acf843
PA
69212014-04-23 Pedro Alves <palves@redhat.com>
6922
6923 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6924
d708bcd1
PA
69252014-04-10 Pedro Alves <palves@redhat.com>
6926
6927 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6928 Check if the condition or command is NULL before checking if the
6929 breakpoint is known. On success, return true.
6930 * mem-break.h (add_breakpoint_condition): Document return.
6931 (add_breakpoint_commands): Add describing comment.
6932 * server.c (skip_to_semicolon): New function.
6933 (process_point_options): Use it.
6934
2eec7d5b
PA
69352014-04-09 Pedro Alves <palves@redhat.com>
6936
6937 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6938 to lwpid_of.
6939
fa96cb38
PA
69402014-02-27 Pedro Alves <palves@redhat.com>
6941
6942 PR 12702
6943 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6944 macros.
6945 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6946 output.
6947 (last_thread_of_process_p): Take a PID argument instead of a
6948 thread pointer.
6949 (linux_wait_for_lwp): Delete.
6950 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6951 functions.
6952 (linux_low_filter_event): New function, party factored out from
6953 linux_wait_for_event.
6954 (linux_wait_for_event): Rename to ...
6955 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6956 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6957 sigsuspend. Check for zombie leaders.
6958 (linux_wait_for_event): Reimplement as wrapper around
6959 linux_wait_for_event_filtered.
6960 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6961 a normal or signal exit is seen, it's the whole process exiting.
6962 (wait_for_sigstop): No longer a for_each_inferior callback.
6963 Rewrite on top of linux_wait_for_event_filtered.
6964 (stop_all_lwps): Call wait_for_sigstop directly.
6965 * server.c (resume, handle_target_event): Handle
6966 TARGET_WAITKIND_NO_RESUMED.
6967
d763de10
JB
69682014-02-26 Joel Brobecker <brobecker@adacore.com>
6969
6970 * win32-low.c (psapi_get_dll_name,
6971 * win32_CreateToolhelp32Snapshot): Delete.
6972 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6973 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6974 Delete.
6975 (handle_load_dll): Add function description.
6976 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6977
850a0f76
JB
69782014-02-26 Joel Brobecker <brobecker@adacore.com>
6979
6980 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6981 Add comment.
6982 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6983 base address when calling win32_add_one_solib.
6984 (handle_load_dll): Delete local variable load_addr.
6985 Remove 0x1000 offset applied to DLL base address when calling
6986 win32_add_one_solib.
6987 (handle_unload_dll): Add comment.
6988
f25b3fc3
JB
69892014-02-26 Joel Brobecker <brobecker@adacore.com>
6990
6991 * win32-low.c (win32_add_all_dlls): Renames
6992 win32_ensure_ntdll_loaded. Rewrite function documentation.
6993 Adjust implementation to always load all DLLs.
6994 Add 0x1000 offset to DLL base address when calling
6995 win32_add_one_solib.
6996 (child_initialization_done): New static global.
6997 (do_initial_child_stuff): Set child_initialization_done to
6998 zero during child initialization, and 1 after. Replace call
6999 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7000 Add comment.
7001 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7002 (handle_unload_dll): Add function documentation.
7003 (get_child_debug_event): Ignore load and unload DLL events
7004 during child initialization.
7005
d86d4aaf
DE
70062014-02-20 Doug Evans <dje@google.com>
7007
3bc32da3 7008 Remove global all_lwps.
d86d4aaf
DE
7009 * inferiors.h (ptid_of): Move here from linux-low.h.
7010 (pid_of, lwpid_of): Ditto.
7011 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7012 parameter is a struct thread_info * now.
7013 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7014 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7015 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7016 directly.
7017 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7018 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7019 * linux-arm-low.c (update_registers_callback): Update, "entry"
7020 parameter is a struct thread_info * now.
7021 Fetch lwpid from current_inferior directly.
7022 (arm_insert_point): Pass &all_threads to find_inferior instead of
7023 &all_lwps.
7024 (arm_remove_point): Ditto.
7025 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7026 (arm_prepare_to_resume): Fetch pid from thread.
7027 (arm_read_description): Fetch lwpid from current_inferior directly.
7028 * linux-low.c (all_lwps): Delete.
7029 (delete_lwp): Delete call to remove_inferior.
7030 (handle_extended_wait): Fetch lwpid from thread.
7031 (add_lwp): Don't set lwp->entry.id. Remove call to
7032 add_inferior_to_list.
7033 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7034 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7035 (kill_one_lwp_callback): Ditto.
7036 (linux_kill): Don't dereference NULL pointer.
7037 Fetch ptid,lwpid from thread.
7038 (get_detach_signal): Fetch ptid from thread.
7039 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7040 Simplify call to regcache_invalidate_thread.
7041 (delete_lwp_callback): Update, "entry" parameter is a
7042 struct thread_info * now. Fetch pid from thread.
7043 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7044 (status_pending_p_callback): Update, "entry" parameter is a
7045 struct thread_info * now. Fetch ptid from thread.
7046 (find_lwp_pid): Update, "entry" parameter is a
7047 struct thread_info * now.
7048 (linux_wait_for_lwp): Fetch pid from thread.
7049 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7050 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7051 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7052 (dequeue_one_deferred_signal): Ditto.
7053 (cancel_breakpoint): Fetch ptid from current_inferior.
7054 (linux_wait_for_event): Pass &all_threads to find_inferior,
7055 not &all_lwps. Fetch ptid, lwpid from thread.
7056 (count_events_callback): Update, "entry" parameter is a
7057 struct thread_info * now.
7058 (select_singlestep_lwp_callback): Ditto.
7059 (select_event_lwp_callback): Ditto.
7060 (cancel_breakpoints_callback): Ditto.
7061 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7062 not &all_lwps.
7063 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7064 (unsuspend_one_lwp): Update, "entry" parameter is a
7065 struct thread_info * now.
7066 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7067 not &all_lwps.
7068 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7069 Fetch lwpid from thread, not lwp.
7070 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7071 Pass &all_threads to find_inferior, not &all_lwps.
7072 (send_sigstop): Fetch lwpid from thread, not lwp.
7073 (send_sigstop_callback): Update, "entry" parameter is a
7074 struct thread_info * now.
7075 (suspend_and_send_sigstop_callback): Ditto.
7076 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7077 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7078 struct thread_info * now.
7079 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7080 from thread, lwp.
7081 (lwp_running): Update, "entry" parameter is a
7082 struct thread_info * now.
7083 (stop_all_lwps): Fetch ptid from thread.
7084 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7085 (linux_resume_one_lwp): Fetch lwpid from thread.
7086 (linux_set_resume_request): Update, "entry" parameter is a
7087 struct thread_info * now. Fetch pid, lwpid from thread.
7088 (resume_status_pending_p): Update, "entry" parameter is a
7089 struct thread_info * now.
7090 (need_step_over_p): Ditto. Fetch lwpid from thread.
7091 (start_step_over): Fetch lwpid from thread.
7092 (linux_resume_one_thread): Update, "entry" parameter is a
7093 struct thread_info * now. Fetch lwpid from thread.
7094 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7095 (proceed_one_lwp): Update, "entry" parameter is a
7096 struct thread_info * now. Fetch lwpid from thread.
7097 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7098 struct thread_info * now.
7099 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7100 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7101 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7102 directly.
7103 (regsets_store_inferior_registers): Ditto.
7104 (fetch_register, store_register): Ditto.
7105 (linux_read_memory, linux_write_memory): Ditto.
7106 (linux_request_interrupt): Ditto.
7107 (linux_read_auxv): Ditto.
7108 (linux_xfer_siginfo): Ditto.
7109 (linux_qxfer_spu): Ditto.
7110 (linux_qxfer_libraries_svr4): Ditto.
7111 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7112 moved to inferiors.h.
7113 (get_lwp): Delete.
7114 (get_thread_lwp): Update.
7115 (struct lwp_info): Delete member "entry". Simplify comment for
7116 member "thread".
7117 (all_lwps): Delete.
7118 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7119 current_inferior directly.
7120 (update_watch_registers_callback): Update, "entry" parameter is a
7121 struct thread_info * now. Fetch pid from thread.
7122 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7123 (mips_insert_point): Fetch lwpid from current_inferior.
7124 Pass &all_threads to find_inferior, not &all_lwps.
7125 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7126 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7127 directly.
7128 (mips_stopped_data_address): Ditto.
7129 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7130 directly.
7131 * linux-tile-low.c (tile_arch_setup): Ditto.
7132 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7133 (update_debug_registers_callback): Update, "entry" parameter is a
7134 struct thread_info * now. Fetch pid from thread.
7135 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7136 Pass &all_threads to find_inferior, not &all_lwps.
7137 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7138 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7139 Pass &all_threads to find_inferior, not &all_lwps.
7140 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7141 (i386_dr_low_get_status): Ditto.
7142 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7143 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7144 (x86_linux_read_description): Ditto.
7145 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7146
3b8361aa
DE
71472014-02-20 Doug Evans <dje@google.com>
7148
7149 * inferiors.c (get_first_inferior): Fix buglet.
7150
f7667f0d
DE
71512014-02-19 Doug Evans <dje@google.com>
7152
7153 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7154 * inferiors.c (add_thread): Change result type to struct thread_info *.
7155 All callers updated.
7156 (add_lwp): Call add_thread here instead of in callers.
7157 All callers updated.
7158 * linux-low.h (get_lwp_thread): Rewrite.
7159 (struct lwp_info): New member "thread".
7160
b3312d80
DE
71612014-02-19 Doug Evans <dje@google.com>
7162
7163 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7164 All callers updated.
7165
ecc6f45c
DE
71662014-02-19 Doug Evans <dje@google.com>
7167
7168 * inferiors.c (add_thread): Fix whitespace.
7169
649ebbca
DE
71702014-02-19 Doug Evans <dje@google.com>
7171
7172 * dll.c (clear_dlls): Replace accessing list implemention details
7173 with API function.
7174 * gdbthread.h (get_first_thread): Declare.
7175 * inferiors.c (for_each_inferior_with_data): New function.
7176 (get_first_thread): New function.
7177 (find_thread_ptid): Simplify.
7178 (get_first_inferior): New function.
7179 (clear_list): Delete.
7180 (one_inferior_p): New function.
7181 (clear_inferior_list): New function.
7182 (clear_inferiors): Update.
7183 * inferiors.h (for_each_inferior_with_data): Declare.
7184 (clear_inferior_list): Declare.
7185 (one_inferior_p): Declare.
7186 (get_first_inferior): Declare.
7187 * linux-low.c (linux_wait_for_event): Replace accessing list
7188 implemention details with API function.
7189 * server.c (target_running): Ditto.
7190 (accumulate_file_name_length): New function.
7191 (emit_dll_description): New function.
7192 (handle_qxfer_libraries): Replace accessing list implemention
7193 details with API function.
7194 (handle_qxfer_threads_worker): New function.
7195 (handle_qxfer_threads_proper): Replace accessing list implemention
7196 details with API function.
7197 (handle_query): Ditto.
7198 (visit_actioned_threads_callback_ftype): New typedef.
7199 (visit_actioned_threads_data): New struct.
7200 (visit_actioned_threads): Rewrite to be find_inferior callback.
7201 (resume): Call find_inferior.
7202 (handle_status): Replace accessing list implemention
7203 details with API function.
7204 (process_serial_event): Replace accessing list implemention details
7205 with API function.
7206 * target.c (set_desired_inferior): Replace accessing list implemention
7207 details with API function.
7208 * tracepoint.c (same_process_p): New function.
7209 (gdb_agent_about_to_close): Replace accessing list implemention
7210 details with API function.
7211 * win32-low.c (child_delete_thread): Replace accessing list
7212 implemention details with API function.
7213 (match_dll_by_basename): New function.
7214 (dll_is_loaded_by_basename): New function.
7215 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7216 details call to dll_is_loaded_by_basename.
7217
80894984
DE
72182014-02-19 Doug Evans <dje@google.com>
7219
7220 * dll.h (struct dll_info): Add comment.
7221 * gdbthread.h (struct thread_info): Add comment.
7222 (current_ptid): Simplify.
7223 * inferiors.c (add_process): Update.
7224 (remove_process): Update.
7225 * inferiors.h (struct process_info): Rename member "head" to "entry".
7226 * linux-low.c (delete_lwp): Update.
7227 (add_lwp): Update.
7228 (last_thread_of_process_p): Update.
7229 (kill_one_lwp_callback, linux_kill): Update.
7230 (status_pending_p_callback): Update.
7231 (wait_for_sigstop): Update. Simplify read of ptid.
7232 (start_step_over): Update.
7233 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7234 (get_lwp_thread): Update.
7235 (struct lwp_info): Rename member "head" to "entry".
7236 * regcache.h (inferior_list_entry): Delete.
7237 * server.c (kill_inferior_callback): Update.
7238 (detach_or_kill_inferior_callback): Update.
7239 (print_started_pid): Update.
7240 (print_attached_pid): Update.
7241 (process_serial_event): Simplify read of ptid.
7242 * thread-db.c (thread_db_create_event): Update.
7243 (thread_db_get_tls_address): Update.
7244 * win32-low.c (current_inferior_ptid): Simplify.
7245
46917d26
TT
72462014-02-19 Tom Tromey <tromey@redhat.com>
7247
7248 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7249 argument.
7250 (target_supports_btrace): Update.
7251
0759a81e
YQ
72522014-02-14 Yao Qi <yao@codesourcery.com>
7253
7254 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7255 (rsp-low-ipa.o): New target.
7256
a7191e8b
TT
72572014-02-12 Tom Tromey <tromey@redhat.com>
7258
7259 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7260 convert_ascii_to_int.
7261 * regcache.c (registers_to_string): Likewise.
7262 * remote-utils.c (decode_M_packet): Likewise.
7263 * server.c (process_serial_event): Likewise.
7264
ff0e980e
TT
72652014-02-12 Tom Tromey <tromey@redhat.com>
7266
7267 * server.c (handle_query, handle_v_run): Use hex2bin, not
7268 unhexify.
7269 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7270
e9371aff
TT
72712014-02-12 Tom Tromey <tromey@redhat.com>
7272
7273 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7274 convert_int_to_ascii.
7275 * regcache.c (registers_to_string, collect_register_as_string):
7276 Likewise.
7277 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7278 Likewise.
7279 * server.c (process_serial_event): Likewise.
7280 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7281 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7282
971dc0b8
TT
72832014-02-12 Tom Tromey <tromey@redhat.com>
7284
7285 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7286 bin2hex, not hexify.
7287 * tracepoint.c (cmd_qtstatus): Likewise.
7288
0a822afb
TT
72892014-02-12 Tom Tromey <tromey@redhat.com>
7290
7291 * remote-utils.c (monitor_output): Pass explicit length to
7292 hexify.
7293
9c3d6531
TT
72942014-02-12 Tom Tromey <tromey@redhat.com>
7295
7296 * tracepoint.c: Include rsp-low.h.
7297 * server.c: Include rsp-low.h.
7298 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7299 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7300 declare.
7301 * remote-utils.c: Include rsp-low.h.
7302 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7303 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7304 (convert_int_to_ascii, convert_ascii_to_int): Move to
7305 common/rsp-low.c.
7306 * regcache.c: Include rsp-low.h.
7307 * ax.c: Include rsp-low.h.
7308 * Makefile.in (SFILES): Add common/rsp-low.c.
7309 (OBS): Add rsp-low.o.
7310 (rsp-low.o): New target.
7311
01fd3ea5
TT
73122014-02-12 Tom Tromey <tromey@redhat.com>
7313
7314 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7315 Include print-utils.h.
7316 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7317 (plongest, thirty_two, phex_nz): Remove.
7318 * Makefile.in (SFILES): Add common/print-utils.c.
7319 (OBS): Add print-utils.o.
7320 (print-utils-ipa.o): New target.
7321 (print-utils.o): New target.
7322 (IPA_OBJS): Add print-utils-ipa.o.
7323
e99dc820
TT
73242014-02-06 Tom Tromey <tromey@redhat.com>
7325
7326 * Makefile.in (SFILES): Fix indentation.
7327
ee1e2d4f
DE
73282014-02-05 Doug Evans <dje@google.com>
7329
7330 * linux-low.c (linux_wait_for_event): Improve comment.
7331 (linux_wait_1): Keep current_inferior in sync with event_child.
7332
f5a02773
DE
73332014-01-22 Doug Evans <dje@google.com>
7334
7335 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7336
87ce2a04
DE
73372014-01-22 Doug Evans <dje@google.com>
7338
7339 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7340 * configure: Regenerate.
7341 * config.in: Regenerate.
7342 * Makefile.in (SFILES): Add debug.c.
7343 (OBS): Add debug.o.
7344 * debug.c: New file.
7345 * debug.h: New file.
7346 * linux-aarch64-low.c (*): Update all debugging printfs to use
7347 debug_printf instead of fprintf.
7348 * linux-arm-low.c (*): Ditto.
7349 * linux-cris-low.c (*): Ditto.
7350 * linux-crisv32-low.c (*): Ditto.
7351 * linux-m32r-low.c (*): Ditto.
7352 * linux-sparc-low.c (*): Ditto.
7353 * linux-x86.c (*): Ditto.
7354 * linux-low.c (*): Ditto.
7355 (linux_wait_1): Add calls to debug_enter, debug_exit.
7356 (linux_wait): Remove redundant debugging printf.
7357 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7358 (linux_resume, unstop_all_lwps): Ditto.
7359 * mem-break.c (*): Update all debugging printfs to use
7360 debug_printf instead of fprintf.
7361 * remote-utils.c (*): Ditto.
7362 * thread-db.c (*): Ditto.
7363 * server.c #include <ctype.h>, "gdb_vecs.h".
7364 (debug_threads): Moved to debug.c.
7365 (*): Update all debugging printfs to use debug_printf instead of
7366 fprintf.
7367 (start_inferior): Replace call to fflush with call to debug_flush.
7368 (monitor_show_help): Mention set debug-format.
7369 (parse_debug_format_options): New function.
7370 (handle_monitor_command): Handle "monitor set debug-format".
7371 (gdbserver_usage): Mention --debug-format.
7372 (main): Parse --debug-format.
7373 * server.h (debug_threads): Declaration moved to debug.h.
7374 #include "debug.h".
7375 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7376 trace_debug_1 that uses debug_printf.
7377 (tracepoint_look_up_symbols): Update all debugging printfs to use
7378 debug_printf instead of fprintf.
7379
e671835b
BS
73802014-01-20 Baruch Siach <baruch@tkos.co.il>
7381
7382 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7383 sys/ptrace.h.
7384
b5737fa9
PA
73852014-01-17 Pedro Alves <palves@redhat.com>
7386
ea38d2a9 7387 PR build/16445
c7faa97a
PA
7388 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7389 defined after including gdb_proc_service.h.
b5737fa9 7390
40ed484e
DE
73912014-01-16 Doug Evans <dje@google.com>
7392
7393 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7394 (match_dll): Use it.
7395
969c39fb
MM
73962014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7397
7398 * target.h (target_ops) <read_btrace>: Change parameters and
7399 return type to allow error reporting.
7400 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7401 trace reading errors on.
7402 * linux-low.c (linux_low_read_btrace): Pass trace reading
7403 errors on.
7404 (linux_low_disable_btrace): New.
7405
ab7f45ba
DE
74062014-01-15 Doug Evans <dje@google.com>
7407
7408 * inferiors.c (thread_id_to_gdb_id): Delete.
7409 * inferiors.h (thread_id_to_gdb_id): Delete.
7410
66af0f44
EZ
74112014-01-13 Eli Zaretskii <eliz@gnu.org>
7412
7413 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7414 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7415 versions.
7416
9939e131
PA
74172014-01-08 Pedro Alves <palves@redhat.com>
7418
7419 * server.c (handle_status): Don't discard previous queued stop
7420 replies or thread's pending status here.
7421 (main) <disconnection>: Do it here instead.
7422
b7ea362b
PA
74232014-01-08 Pedro Alves <palves@redhat.com>
7424
7425 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7426 * server.c (visit_actioned_threads, handle_pending_status): New
7427 function.
7428 (handle_v_cont): Factor out parts to ...
7429 (resume): ... this new function. If in all-stop, and a thread
7430 being resumed has a pending status, report it without actually
7431 resuming.
7432 (myresume): Adjust to use the new 'resume' function.
7433 (clear_pending_status_callback, set_pending_status_callback)
7434 (find_status_pending_thread_callback): New functions.
7435 (handle_status): Handle the case of multiple threads having
7436 interesting statuses to report. Report threads' real last signal
7437 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7438 with an interesting thread to report the status for, instead of
7439 always reporting the status of the first thread.
7440
28498c42
JB
74412014-01-01 Joel Brobecker <brobecker@adacore.com>
7442
7443 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7444 * gdbreplay.c (gdbreplay_version): Likewise.
7445
f45c82da
YZ
74462013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7447
7448 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7449 iov.iov_len with the real length in use.
7450
379a5e2d
JB
74512013-12-13 Joel Brobecker <brobecker@adacore.com>
7452
7453 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7454 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7455 for all targets that use win32-low.c.
7456 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7457 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7458
4210d83e
PA
74592013-12-13 Pedro Alves <palves@redhat.com>
7460
7461 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7462 if equal to TARGET_WAITKIND_LOADED.
7463 * win32-low.c (cached_status): New static global.
7464 (win32_wait): Add declaration.
7465 (do_initial_child_stuff): Flush all initial pending debug events
7466 up to the initial breakpoint.
7467 (win32_wait): If CACHED_STATUS was set, return that instead
7468 of doing a real wait. Remove the code resuming the execution
7469 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7470 during the initial phase. Also remove the code changing
7471 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7472 TARGET_WAITKIND_STOPPED.
7473
e7f0d979
YQ
74742013-12-11 Yao Qi <yao@codesourcery.com>
7475
7476 * notif.c (handle_notif_ack): Return 0 if no notification
7477 matches.
7478
ebcf782c
DE
74792013-11-20 Doug Evans <dje@google.com>
7480
7481 * linux-low.c (linux_set_resume_request): Fix comment.
7482
20ad9378
DE
74832013-11-20 Doug Evans <dje@google.com>
7484
7485 * linux-low.c (resume_status_pending_p): Tweak comment.
7486
a196ebeb
WT
74872013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7488
7489 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7490 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7491 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7492 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7493 (srv_amd64_regobj): Add amd64-mpx.o.
7494 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7495 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7496 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7497 * i387-fp.c (num_pl_bnd_register) Added constant.
7498 (num_pl_bnd_cfg_registers) Added constant.
7499 (struct i387_xsave) Added reserved area and MPX fields.
7500 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7501 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7502 function.
7503 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7504 (init_registers_amd64_mpx_linux): Declare new function.
7505 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7506 (x86_64_regmap): Add MPX registers.
7507 (x86_linux_read_description): Add MPX case.
7508 (initialize_low_arch): Initialize MPX targets.
7509
0080a2f6
TT
75102013-11-18 Tom Tromey <tromey@redhat.com>
7511
7512 * configure: Rebuild.
7513 * configure.ac: Don't check for stdlib.h.
7514 * gdbreplay.c: Unconditionally include stdlib.h.
7515
2978b111
TT
75162013-11-18 Tom Tromey <tromey@redhat.com>
7517
7518 * config.in: Rebuild.
7519 * configure: Rebuild.
7520 * configure.ac: Don't use AC_HEADER_DIRENT.
7521
a3d08894
TT
75222013-11-18 Tom Tromey <tromey@redhat.com>
7523
7524 * server.h: Don't check HAVE_STRING_H.
7525 * gdbreplay.c: Don't check HAVE_STRING_H.
7526 * configure: Rebuild.
7527
0a5dd17d
TT
75282013-11-18 Tom Tromey <tromey@redhat.com>
7529
7530 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7531 LIBGNU.
7532
1bd2f0ba
TT
75332013-11-08 Tom Tromey <tromey@redhat.com>
7534
7535 * configure, config.in: Rebuild.
7536 * configure.ac: Remove unused configury.
7537
3266f10b
TT
75382013-11-08 Tom Tromey <tromey@redhat.com>
7539
7540 * acinclude.m4: Include common.m4, codeset.m4.
7541 * configure, config.in: Rebuild.
7542 * configure.ac: Use GDB_AC_COMMON.
7543
6682d959
AA
75442013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7545
7546 * linux-s390-low.c (HWCAP_S390_TE): New define.
7547 (s390_arch_setup): Consider the TE field in the HWCAP for
7548 determining 'have_regset_tdb'.
7549
fd0a4d76
SDJ
75502013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7551
7552 PR gdb/16014
7553 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7554 call to sizeof.
7555
1a3d890b
PA
75562013-10-02 Pedro Alves <palves@redhat.com>
7557
7558 * server.c (process_serial_event): Don't output "GDBserver
7559 exiting" if GDB is connected through stdio.
7560 * target.c (mywait): Likewise, be silent if GDB is connected
7561 through stdio.
7562
97ad4581
JB
75632013-10-01 Joel Brobecker <brobecker@adacore.com>
7564
7565 * lynx-low.c (lynx_add_threads_after_attach): New function.
7566 (lynx_attach): Remove call to add_thread. Add call to
7567 lynx_add_threads_after_attach instead.
7568
5b4e221c
MF
75692013-09-28 Mike Frysinger <vapier@gentoo.org>
7570
7571 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7572 * config.in, configure: Regenerated.
7573
ee47b2f8
YQ
75742013-09-18 Yao Qi <yao@codesourcery.com>
7575
7576 PR server/15959
7577 * server.c (start_inferior): Clear 'resume_info'.
7578
d6707650 75792013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7580
d6707650
JW
7581 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7582 for each register.
7583
9243dd0e 75842013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7585
9243dd0e
JW
7586 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7587 linux-tile-low.o to srv_tgtobj.
7588
c623a6ef
WN
75892013-09-16 Will Newton <will.newton@linaro.org>
7590
7591 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7592 out regs.
7593
fb71d39e
PA
75942013-09-06 Pedro Alves <palves@redhat.com>
7595
7596 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7597 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7598 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7599 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7600 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7601 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7602
8e7e9910
PA
76032013-09-06 Pedro Alves <palves@redhat.com>
7604
7605 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7606 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7607
7c3a12ca
PA
76082013-09-06 Pedro Alves <palves@redhat.com>
7609
7610 * linux-amd64-ipa.c: Include tracepoint.h.
7611 * linux-i386-ipa.c: Include tracepoint.h.
7612
8eb3d7b6
RW
76132013-09-06 Ricard Wanderlof <ricardw@axis.com>
7614
7615 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7616 (ps_get_thread_area): New function.
7617
eddddb9d
RW
76182013-09-06 Ricard Wanderlof <ricardw@axis.com>
7619
7620 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7621 (initialize_low_arch): Call init_registers_crisv32 rather than
7622 init_register_crisv32.
7623
533b0600
PA
76242013-09-05 Pedro Alves <palves@redhat.com>
7625
7626 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7627 to ...
7628 * hostio.h: ... this new file.
7629 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7630 win32-low.c: Include hostio.h.
7631
0ce3d3b5
PA
76322013-09-05 Pedro Alves <palves@redhat.com>
7633
7634 * server.h (gdb_client_data, handler_func, callback_handler_func)
7635 (delete_file_handler, add_file_handler, append_callback_event)
7636 (delete_callback_event, start_event_loop, initialize_event_loop):
7637 Move to event-loop.h and include it.
7638 * event-loop.h: New file.
7639
799cdc37
PA
76402013-09-05 Pedro Alves <palves@redhat.com>
7641
7642 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7643 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7644 (loaded_dll, unloaded_dll): Move to ...
7645 * dll.h: ... this new file.
7646 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7647
6a6bbd9d
PA
76482013-09-05 Pedro Alves <palves@redhat.com>
7649
7650 * server.h (current_process, get_thread_process, all_processes)
7651 (add_inferior_to_list, for_each_inferior, current_inferior)
7652 (remove_inferior, add_process, remove_process, find_process_pid)
7653 (have_started_inferiors_p, have_attached_inferiors_p)
7654 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7655 (clear_inferiors, find_inferior, find_inferior_id)
7656 (inferior_target_data, set_inferior_target_data)
7657 (inferior_regcache_data, set_inferior_regcache_data): Move to
7658 inferiors.h, and include it.
7659 * inferiors.h: New file.
7660
f699aaba
PA
76612013-09-05 Pedro Alves <palves@redhat.com>
7662
7663 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7664 Move ...
72f4393d 7665 * ax.h: ... here.
f699aaba 7666
c144c7a0
PA
76672013-09-05 Pedro Alves <palves@redhat.com>
7668
7669 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7670 tracepoint.h.
7671 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7672 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7673 (handle_tracepoint_general_set, handle_tracepoint_query)
7674 (tracepoint_finished_step, tracepoint_was_hit)
7675 (release_while_stepping_state_list, current_traceframe)
7676 (in_readonly_region, traceframe_read_mem)
7677 (fetch_traceframe_registers, traceframe_read_sdata)
7678 (traceframe_read_info, struct fast_tpoint_collect_status)
7679 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7680 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7681 (supply_fast_tracepoint_registers)
7682 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7683 (ipa_tdesc, claim_trampoline_space)
7684 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7685 (agent_mem_read, agent_get_trace_state_variable_value)
7686 (agent_set_trace_state_variable_value, agent_tsv_read)
7687 (agent_mem_read_string, get_raw_reg_func_addr)
7688 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7689 * tracepoint.h: ... this new file.
7690
ff42e6ab
PA
76912013-09-05 Pedro Alves <palves@redhat.com>
7692
7693 * server.h (perror_with_name, error, fatal, warning, paddress)
7694 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7695 include it.
7696 * utils.h: New file.
7697
541af0f4
PA
76982013-09-05 Pedro Alves <palves@redhat.com>
7699
7700 * server.h (remote_debug, noack_mode, transport_is_reliable)
7701 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7702 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7703 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7704 (write_enn, initialize_async_io, enable_async_io)
7705 (disable_async_io, check_remote_input_interrupt_request)
7706 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7707 (dead_thread_notify, prepare_resume_reply)
7708 (decode_address_to_semicolon, decode_address, decode_m_packet)
7709 (decode_M_packet, decode_X_packet, decode_xfer_write)
7710 (decode_search_memory_packet, unhexify, hexify)
7711 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7712 (look_up_one_symbol, relocate_instruction)
7713 (monitor_output): Move to remote-utils.h, and include it.
7714 * remote-utils.h: New file.
7715
eebdf26b
PA
77162013-09-05 Pedro Alves <palves@redhat.com>
7717
7718 * server.h (_): Delete.
7719
3aafd2ff
PA
77202013-09-02 Pedro Alves <palves@redhat.com>
7721
7722 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7723 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7724 allocated.
7725 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7726
cee83bcb
PM
77272013-09-02 Pierre Muller <muller@sourceware.org>
7728
7729 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7730 or WriteProcessMemory complete successfully and handle
7731 ERROR_PARTIAL_COPY error.
7732
9a13b2fa
PA
77332013-09-02 Pedro Alves <palves@redhat.com>
7734
7735 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7736 error instead of EIO.
7737
602e3198
JK
77382013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7739
7740 PR server/15604
7741 * linux-low.c: Include filestuff.h.
7742 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7743 * lynx-low.c: Include filestuff.h.
7744 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7745 * server.c: Include filestuff.h.
7746 (main): Call notice_open_fds.
7747 * spu-low.c: Include filestuff.h.
7748 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7749
96d7229d
LM
77502013-08-22 Luis Machado <lgustavo@codesourcery.com>
7751
7752 * Makefile.in: Explain why ../target and ../nat are not
7753 listed as include file search paths.
7754 (linux-waitpid.o): New object file rule.
7755 * configure.srv (srv_native_linux_obj): New variable.
7756 Replace all occurrences of linux native object files with
7757 $srv_native_linux_obj.
7758 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7759 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7760 (linux_enable_event_reporting): Remove declaration.
7761 (my_waitpid): Moved to common/linux-waitpid.c.
7762 (linux_wait_for_event): Pass ptid when calling
7763 linux_enable_event_reporting.
7764 (linux_supports_tracefork_flag): Remove.
7765 (linux_enable_event_reporting): Likewise.
7766 (linux_tracefork_grandchild): Remove.
7767 (STACK_SIZE): Moved to common/linux-ptrace.c.
7768 (linux_tracefork_child): Remove.
7769 (linux_test_for_tracefork): Remove.
7770 (linux_look_up_symbols): Call linux_supports_traceclone.
7771 (initialize_low): Remove call to linux_test_for_tracefork.
7772 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7773 common/linux-ptrace.h.
7774 (PTRACE_TYPE_ARG4): Likewise.
7775 Include linux-ptrace.h.
7776
32940073
PA
77772013-08-21 Pedro Alves <palves@redhat.com>
7778
7779 * config.in: Renegerate.
7780
33b60d58 77812013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7782
33b60d58
LM
7783 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7784 (SFILES): Remove $(srcdir)/common/target-common.c and
7785 add $(srcdir)/target/waitstatus.c.
7786 (OBS): Remove target-common.o and add waitstatus.o.
7787 (server_h): Remove $(srcdir)/../common/target-common.h and
7788 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7789 and $(srcdir)/../target/waitstatus.h.
7790 (target-common.o): Remove.
7791 (waitstatus.o): New target object file.
7792 * target.h: Do not include target-common.h and
7793 include target/resume.h, target/wait.h and
7794 target/waitstatus.h.
7795
b8e1b30e
LM
77962013-08-13 Luis Machado <lgustavo@codesourcery.com>
7797
7798 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7799 to PTRACE_TYPE_ARG3.
7800 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7801 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7802 PTRACE_TYPE_ARG4.
7803 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7804 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7805
7a60ad40
YQ
78062013-07-27 Jie Zhang <jie@codesourcery.com>
7807 Daniel Jacobowitz <dan@codesourcery.com>
7808 Yao Qi <yao@codesourcery.com>
7809
7810 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7811 (mips-linux-watch.o): New rule.
7812 (mips_linux_watch_h): New variable.
7813 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7814 srv_tgtobj.
7815 * linux-mips-low.c: Include mips-linux-watch.h.
7816 (struct arch_process_info, struct arch_lwp_info): New.
7817 (update_watch_registers_callback): New function.
7818 (mips_linux_new_process, mips_linux_new_thread) New functions.
7819 (mips_linux_prepare_to_resume, mips_insert_point): New
7820 functions.
7821 (mips_remove_point, mips_stopped_by_watchpoint): New
7822 functions.
7823 (rsp_bp_type_to_target_hw_bp_type): New function.
7824 (mips_stopped_data_address): New function.
7825 (the_low_target): Add watchpoint support functions.
7826
de6f69ad
YQ
78272013-07-27 Yao Qi <yao@codesourcery.com>
7828
7829 * i386-low.c: Include break-common.h.
7830 (enum target_hw_bp_type): Remove.
7831
3360c0bf
LM
78322013-07-24 Luis Machado <lgustavo@codesourcery.com>
7833
7834 * Makefile.in (SFILES): /common/target-common.c.
7835 (OBS): Add target-common.o.
7836 (server_h): Add $(srcdir)/../common/target-common.h.
7837 (target-common.o): New target.
7838 * server.c (queue_stop_reply_callback): Free
7839 status string after use.
7840 * target.c (target_waitstatus_to_string): Remove.
7841 * target.h: Include target-common.h.
7842 (resume_kind): Likewise.
7843 (target_waitkind): Likewise.
7844 (target_waitstatus): Likewise.
7845 (TARGET_WNOHANG): Likewise.
7846
bd885420
YQ
78472013-07-04 Yao Qi <yao@codesourcery.com>
7848
7849 * Makefile.in (host_alias): Use @host_noncanonical@.
7850 (target_alias): Use @target_noncanonical@.
7851 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7852 ACX_NONCANONICAL_HOST.
7853 * configure: Regenerated.
7854
7855 Revert:
7856 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7857
7858 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7859 * configure: Rebuild.
7860 * Makefile.in (version_host, version_target): Get from configure.
7861 (version.c): Use $(version_host) and $(version_target).
7862
17ef446e
PA
78632013-07-03 Pedro Alves <palves@redhat.com>
7864
7865 * Makefile.in (config.status): Depend on development.sh.
7866 * acinclude.m4: Include libmcheck.m4.
7867 * configure: Regenerate.
7868
7a9a7487
MG
78692013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7870
7871 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7872 attribute inside the parentheses.
7873 (winapi_DebugSetProcessKillOnExit): Ditto.
7874 (winapi_DebugBreakProcess): Ditto.
7875 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7876
49b64de6
MG
78772013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7878
7879 * notif.h (notif_event): Add a dummy member to avoid compiler
7880 errors.
7881
d5749ee7
PA
78822013-07-01 Pedro Alves <palves@redhat.com>
7883
7884 * hostio.c (HOSTIO_PATH_MAX): Define.
7885 (require_filename, handle_open, handle_unlink, handle_readlink):
7886 Use it.
7887
d8d2a3ee
PA
78882013-07-01 Pedro Alves <palves@redhat.com>
7889
7890 * server.h: Include "pathmax.h".
7891 * linux-low.c: Don't include sys/param.h.
7892 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7893 MAXPATHLEN.
7894 * win32-low.c: Don't include sys/param.h.
7895 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7896
bc7dea8d
PA
78972013-07-01 Pedro Alves <palves@redhat.com>
7898
7899 * event-loop.c: Don't check HAVE_UNISTD_H before including
7900 <unistd.h>.
7901 * gdbreplay.c: Likewise.
7902 * remote-utils.c: Likewise.
7903 * server.c: Likewise.
7904 * configure.ac: Don't check for unistd.h.
7905 * configure: Regenerate.
7906
d6c2da54
TT
79072013-06-28 Tom Tromey <tromey@redhat.com>
7908
7909 * Makefile.in (version.c): Use version.in, not
7910 common/version.in.
7911
257b6bec
MG
79122013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7913
7914 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7915 * configure: Rebuild.
7916 * Makefile.in (version_host, version_target): Get from configure.
7917 (version.c): Use $(version_host) and $(version_target).
7918
86ebe149
DK
79192013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7920
7921 Fix trace-status to output user name without trailing colon.
7922 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7923
f30aa5af
DK
79242013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7925
7926 Fix trace-status to output proper start-time and stop-time.
7927 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7928 output start time and stop time in hex as gdb expects.
7929
28a93511
YQ
79302013-06-26 Pedro Alves <pedro@codesourcery.com>
7931
7932 * tracepoint.c (build_traceframe_info_xml): Output trace state
7933 variables present in the trace buffer.
7934
01208463
TT
79352013-06-24 Tom Tromey <tromey@redhat.com>
7936
7937 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7938 create-version.sh.
7939 (version.o): Remove.
7940 * gdbreplay.c: Include version.h.
7941 (version, host_name): Don't declare.
7942 * server.h: Include version.h.
7943 (version, host_name): Don't declare.
7944
760256f9
PA
79452013-06-12 Pedro Alves <palves@redhat.com>
7946
7947 * linux-x86-low.c (linux_is_elf64): Delete global.
7948 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7949 with local linux_pid_exe_is_elf_64_file use.
7950
030031ee
PA
79512013-06-11 Pedro Alves <palves@redhat.com>
7952
7953 * linux-low.c (regset_disabled, disable_regset): New functions.
7954 (regsets_fetch_inferior_registers)
7955 (regsets_store_inferior_registers): Use them.
7956 (initialize_regsets_info); Don't allocate the disabled_regsets
7957 array here.
7958 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7959 comment.
7960
5da6eb0a
PA
79612013-06-11 Pedro Alves <palves@redhat.com>
7962
7963 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7964 xmalloc.
7965
7e5aaa09
PA
79662013-06-11 Pedro Alves <palves@redhat.com>
7967
7968 * linux-x86-low.c (initialize_low_arch): Call
7969 init_registers_x32_avx_linux.
7970
d878444c
JK
79712013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7972
7973 Fix compatibility with Android Bionic.
7974 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7975 it is not empty.
7976
3aee8918
PA
79772013-06-07 Pedro Alves <palves@redhat.com>
7978
5f2b57b5 7979 PR server/14823
3aee8918
PA
7980 * Makefile.in (OBS): Add tdesc.o.
7981 (IPA_OBJS): Add tdesc-ipa.o.
7982 (tdesc-ipa.o): New rule.
7983 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7984 interface.
7985 * linux-low.c (new_inferior): Delete.
7986 (disabled_regsets, num_regsets): Delete.
7987 (linux_add_process): Adjust to set the new per-process
7988 new_inferior flag.
7989 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7990 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7991 was a stop. When calling arch_setup, switch the current inferior
7992 to the thread that got an event.
7993 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7994 (regsets_fetch_inferior_registers)
7995 (regsets_store_inferior_registers): New regsets_info parameter.
7996 Adjust to use it.
7997 (linux_register_in_regsets): New regs_info parameter. Adjust to
7998 use it.
7999 (register_addr, fetch_register, store_register): New usrregs_info
8000 parameter. Adjust to use it.
8001 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8002 parameter regs_info. Adjust to use it.
8003 (linux_fetch_registers): Get the current inferior's regs_info, and
8004 adjust to use it.
8005 (linux_store_registers): Ditto.
8006 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8007 (initialize_low): Don't initialize the target_regsets here. Call
8008 initialize_low_arch.
8009 * linux-low.h (target_regsets): Delete declaration.
8010 (struct regsets_info): New.
8011 (struct usrregs_info): New.
8012 (struct regs_info): New.
8013 (struct process_info_private) <new_inferior>: New field.
8014 (struct linux_target_ops): Delete the num_regs, regmap, and
8015 regset_bitmap fields. New field regs_info.
8016 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8017 * i387-fp.c (num_xmm_registers): Delete.
8018 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8019 calls to new interface.
8020 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8021 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8022 Infer the number of xmm registers from the regcache's target
8023 description.
8024 * i387-fp.h (num_xmm_registers): Delete.
8025 * inferiors.c (add_thread): Don't install the thread's regcache
8026 here.
8027 * proc-service.c (gregset_info): Fetch the current inferior's
8028 regs_info. Adjust to use it.
8029 * regcache.c: Include tdesc.h.
8030 (register_bytes, reg_defs, num_registers)
8031 (gdbserver_expedite_regs): Delete.
8032 (get_thread_regcache): If the thread doesn't have a regcache yet,
8033 create one, instead of aborting gdbserver.
8034 (regcache_invalidate_one): Rename to ...
8035 (regcache_invalidate_thread): ... this.
8036 (regcache_invalidate_one): New.
8037 (regcache_invalidate): Only invalidate registers of the current
8038 process.
8039 (init_register_cache): Add target_desc parameter, and use it.
8040 (new_register_cache): Ditto. Assert the target description has a
8041 non zero registers_size.
8042 (regcache_cpy): Add assertions. Adjust.
8043 (realloc_register_cache, set_register_cache): Delete.
8044 (registers_to_string, registers_from_string): Adjust.
8045 (find_register_by_name, find_regno, find_register_by_number)
8046 (register_cache_size): Add target_desc parameter, and use it.
8047 (free_register_cache_thread, free_register_cache_thread_one)
8048 (regcache_release, register_cache_size): New.
8049 (register_size): Add target_desc parameter, and use it.
8050 (register_data, supply_register, supply_register_zeroed)
8051 (supply_regblock, supply_register_by_name, collect_register)
8052 (collect_register_as_string, collect_register_by_name): Adjust.
8053 * regcache.h (struct target_desc): Forward declare.
8054 (struct regcache) <tdesc>: New field.
8055 (init_register_cache, new_register_cache): Add target_desc
8056 parameter.
8057 (regcache_invalidate_thread): Declare.
8058 (regcache_invalidate_one): Delete declaration.
8059 (regcache_release): Declare.
8060 (find_register_by_number, register_cache_size, register_size)
8061 (find_regno): Add target_desc parameter.
8062 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8063 declarations.
8064 * remote-utils.c: Include tdesc.h.
8065 (outreg, prepare_resume_reply): Adjust.
8066 * server.c: Include tdesc.h.
8067 (gdbserver_xmltarget): Delete declaration.
8068 (get_features_xml, process_serial_event): Adjust.
8069 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8070 declare.
8071 (struct process_info) <tdesc>: New field.
8072 (ipa_tdesc): Declare.
8073 * tdesc.c: New file.
8074 * tdesc.h: New file.
8075 * tracepoint.c: Include tdesc.h.
8076 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8077 (get_context_regcache): Adjust to pass ipa_tdesc down.
8078 (do_action_at_tracepoint): Adjust to get the register cache size
8079 from the context regcache's description.
8080 (traceframe_walk_blocks): Adjust to get the register cache size
8081 from the current trace frame's description.
8082 (traceframe_get_pc): Adjust to get current trace frame's
8083 description and pass it down.
8084 (gdb_collect): Adjust to get the register cache size from the
8085 IPA's description.
8086 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8087 (gdbserver_xmltarget): Delete.
8088 (initialize_low_tracepoint): Set the ipa's target description.
8089 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8090 (initialize_low_tracepoint): Set the ipa's target description.
8091 * linux-x86-low.c: Include tdesc.h.
8092 [__x86_64__] (is_64bit_tdesc): New.
8093 (ps_get_thread_area, x86_get_thread_area): Use it.
8094 (i386_cannot_store_register): Rename to ...
8095 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8096 (i386_cannot_fetch_register): Rename to ...
8097 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8098 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8099 to new interface.
8100 (target_regsets): Rename to ...
8101 (x86_regsets): ... this.
8102 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8103 interface.
8104 (x86_siginfo_fixup): Use is_64bit_tdesc.
8105 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8106 (tdesc_x32_avx_linux, tdesc_x32_linux)
8107 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8108 Declare.
8109 (x86_linux_update_xmltarget): Delete.
8110 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8111 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8112 (AMD64_LINUX_USER64_CS): New.
8113 (x86_linux_read_description): New, based on
8114 x86_linux_update_xmltarget.
8115 (same_process_callback): New.
8116 (x86_arch_setup_process_callback): New.
8117 (x86_linux_update_xmltarget): New.
8118 (x86_regsets_info): New.
8119 (amd64_linux_regs_info): New.
8120 (i386_linux_usrregs_info): New.
8121 (i386_linux_regs_info): New.
8122 (x86_linux_regs_info): New.
8123 (x86_arch_setup): Reimplement.
8124 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8125 (x86_emit_ops): Ditto.
8126 (the_low_target): Adjust. Install x86_linux_regs_info,
8127 x86_cannot_fetch_register, and x86_cannot_store_register.
8128 (initialize_low_arch): New.
8129 * linux-ia64-low.c (tdesc_ia64): Declare.
8130 (ia64_fetch_register): Adjust.
8131 (ia64_usrregs_info, regs_info): New globals.
8132 (ia64_regs_info): New function.
8133 (the_low_target): Adjust.
8134 (initialize_low_arch): New function.
8135 * linux-sparc-low.c (tdesc_sparc64): Declare.
8136 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8137 Adjust.
8138 (sparc_arch_setup): New function.
8139 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8140 (the_low_target): Adjust.
8141 (initialize_low_arch): New function.
8142 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8143 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8144 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8145 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8146 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8147 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8148 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8149 (tdesc_powerpc_isa205_vsx64l): Declare.
8150 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8151 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8152 (ppc_set_pc, ppc_get_hwcap): Adjust.
8153 (ppc_usrregs_info): Forward declare.
8154 (!__powerpc64__) ppc_regmap_adjusted: New global.
8155 (ppc_arch_setup): Adjust to the current process'es target
8156 description.
8157 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8158 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8159 (ppc_store_evrregset): Adjust.
8160 (target_regsets): Rename to ...
8161 (ppc_regsets): ... this, and make static.
8162 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8163 (ppc_regs_info): New function.
8164 (the_low_target): Adjust.
8165 (initialize_low_arch): New function.
8166 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8167 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8168 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8169 (tdesc_s390x_linux64v2): Declare.
8170 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8171 (s390_fill_gregset, s390_store_last_break): Adjust.
8172 (target_regsets): Rename to ...
8173 (s390_regsets): ... this, and make static.
8174 (s390_get_pc, s390_set_pc): Adjust.
8175 (s390_get_hwcap): New target_desc parameter, and use it.
8176 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8177 (s390_arch_setup): Adjust to set the current process'es target
8178 description. Don't adjust the regmap.
8179 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8180 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8181 (regs_info_3264): New globals.
8182 (s390_regs_info): New function.
8183 (the_low_target): Adjust.
8184 (initialize_low_arch): New function.
8185 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8186 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8187 [__mips64] (init_registers_mips_linux)
8188 (init_registers_mips_dsp_linux): Delete defines.
8189 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8190 (have_dsp): New global.
8191 (mips_read_description): New, based on mips_arch_setup.
8192 (mips_arch_setup): Reimplement.
8193 (get_usrregs_info): New function.
8194 (mips_cannot_fetch_register, mips_cannot_store_register)
8195 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8196 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8197 (target_regsets): Rename to ...
8198 (mips_regsets): ... this, and make static.
8199 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8200 (dsp_regs_info, regs_info): New globals.
8201 (mips_regs_info): New function.
8202 (the_low_target): Adjust.
8203 (initialize_low_arch): New function.
8204 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8205 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8206 Declare.
8207 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8208 (arm_read_description): New, with bits factored from
8209 arm_arch_setup.
8210 (arm_arch_setup): Reimplement.
8211 (target_regsets): Rename to ...
8212 (arm_regsets): ... this, and make static.
8213 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8214 (arm_regs_info): New function.
8215 (the_low_target): Adjust.
8216 (initialize_low_arch): New function.
8217 * linux-m68k-low.c (tdesc_m68k): Declare.
8218 (target_regsets): Rename to ...
8219 (m68k_regsets): ... this, and make static.
8220 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8221 (m68k_regs_info): New function.
8222 (m68k_arch_setup): New function.
8223 (the_low_target): Adjust.
8224 (initialize_low_arch): New function.
8225 * linux-sh-low.c (tdesc_sharch): Declare.
8226 (target_regsets): Rename to ...
8227 (sh_regsets): ... this, and make static.
8228 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8229 (sh_regs_info, sh_arch_setup): New functions.
8230 (the_low_target): Adjust.
8231 (initialize_low_arch): New function.
8232 * linux-bfin-low.c (tdesc_bfin): Declare.
8233 (bfin_arch_setup): New function.
8234 (bfin_usrregs_info, regs_info): New globals.
8235 (bfin_regs_info): New function.
8236 (the_low_target): Adjust.
8237 (initialize_low_arch): New function.
8238 * linux-cris-low.c (tdesc_cris): Declare.
8239 (cris_arch_setup): New function.
8240 (cris_usrregs_info, regs_info): New globals.
8241 (cris_regs_info): New function.
8242 (the_low_target): Adjust.
8243 (initialize_low_arch): New function.
8244 * linux-cris-low.c (tdesc_crisv32): Declare.
8245 (cris_arch_setup): New function.
8246 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8247 (cris_regs_info): New function.
8248 (the_low_target): Adjust.
8249 (initialize_low_arch): New function.
8250 * linux-m32r-low.c (tdesc_m32r): Declare.
8251 (m32r_arch_setup): New function.
8252 (m32r_usrregs_info, regs_info): New globals.
8253 (m32r_regs_info): Adjust.
8254 (initialize_low_arch): New function.
8255 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8256 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8257 (tic6x_usrregs_info): Forward declare.
8258 (tic6x_read_description): New function, based on ...
8259 (tic6x_arch_setup): ... this. Reimplement.
8260 (target_regsets): Rename to ...
8261 (tic6x_regsets): ... this, and make static.
8262 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8263 (tic6x_regs_info): New function.
8264 (the_low_target): Adjust.
8265 (initialize_low_arch): New function.
8266 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8267 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8268 (target_regsets): Rename to ...
8269 (xtensa_regsets): ... this, and make static.
8270 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8271 globals.
8272 (xtensa_arch_setup, xtensa_regs_info): New functions.
8273 (the_low_target): Adjust.
8274 (initialize_low_arch): New function.
8275 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8276 (nios2_arch_setup): Set the current process'es tdesc.
8277 (target_regsets): Rename to ...
8278 (nios2_regsets): ... this.
8279 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8280 (nios2_regs_info): New function.
8281 (the_low_target): Adjust.
8282 (initialize_low_arch): New function.
a261b8f5
PA
8283 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8284 (aarch64_arch_setup): Set the current process'es tdesc.
8285 (target_regsets): Rename to ...
8286 (aarch64_regsets): ... this.
8287 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8288 (aarch64_regs_info): New function.
8289 (the_low_target): Adjust.
8290 (initialize_low_arch): New function.
3aee8918
PA
8291 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8292 globals.
8293 (target_regsets): Rename to ...
8294 (tile_regsets): ... this.
8295 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8296 (tile_regs_info): New function.
8297 (tile_arch_setup): Set the current process'es tdesc.
8298 (the_low_target): Adjust.
8299 (initialize_low_arch): New function.
8300 * spu-low.c (tdesc_spu): Declare.
8301 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8302 * win32-arm-low.c (tdesc_arm): Declare.
8303 (arm_arch_setup): New function.
8304 (the_low_target): Install arm_arch_setup instead of
8305 init_registers_arm.
8306 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8307 (init_windows_x86): Rename to ...
8308 (i386_arch_setup): ... this. Set `win32_tdesc'.
8309 (the_low_target): Adjust.
8310 * win32-low.c (win32_tdesc): New global.
8311 (child_add_thread): Don't create the thread cache here.
8312 (do_initial_child_stuff): Set the new process'es tdesc.
8313 * win32-low.h (struct target_desc): Forward declare.
8314 (win32_tdesc): Declare.
8315 * lynx-i386-low.c (tdesc_i386): Declare global.
8316 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8317 * lynx-low.c (lynx_tdesc): New global.
8318 (lynx_add_process): Set the new process'es tdesc.
8319 * lynx-low.h (struct target_desc): Forward declare.
8320 (lynx_tdesc): Declare global.
8321 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8322 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8323 * nto-low.c (nto_tdesc): New global.
8324 (do_attach): Set the new process'es tdesc.
8325 * nto-low.h (struct target_desc): Forward declare.
8326 (nto_tdesc): Declare.
8327 * nto-x86-low.c (tdesc_i386): Declare.
8328 (nto_x86_arch_setup): Set `nto_tdesc'.
8329
b1fbec62
GB
83302013-06-04 Gary Benson <gbenson@redhat.com>
8331
8332 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8333 to qSupported response when appropriate.
8334 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8335 with nonzero-length annex.
8336 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8337 arguments supplied in annex.
8338
d1ec4ce7
DE
83392013-05-31 Doug Evans <dje@google.com>
8340
ac44adcb 8341 PR server/15594
d1ec4ce7
DE
8342 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8343 64 bits in 64-cross-32 environment.
8344
9b25f2d3
PA
83452013-05-28 Pedro Alves <palves@redhat.com>
8346
8347 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8348 (aarch64-without-fpu.c): Delete rule.
8349 * configure.srv (aarch64*-*-linux*): Remove references to
8350 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8351 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8352 declaration.
8353
6740dc9c
PA
83542013-05-24 Pedro Alves <palves@redhat.com>
8355
8356 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8357 instead of strchr/decode_address. Error if the range isn't split
8358 with a ','. Don't assume there's be a ':' in the action.
8359
c2d6af84
PA
83602013-05-23 Yao Qi <yao@codesourcery.com>
8361 Pedro Alves <palves@redhat.com>
8362
8363 * linux-low.c (lwp_in_step_range): New function.
8364 (linux_wait_1): If the thread was range stepping and stopped
8365 outside the stepping range, report the stop to GDB. Otherwise,
8366 continue stepping. Add range stepping debug output.
8367 (linux_set_resume_request): Copy the step range from the resume
8368 request to the lwp.
8369 (linux_supports_range_stepping): New.
8370 (linux_target_ops) <supports_range_stepping>: Set to
8371 linux_supports_range_stepping.
8372 * linux-low.h (struct linux_target_ops)
8373 <supports_range_stepping>: New field.
8374 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8375 * linux-x86-low.c (x86_supports_range_stepping): New.
8376 (the_low_target) <supports_range_stepping>: Set to
8377 x86_supports_range_stepping.
8378 * server.c (handle_v_cont): Handle 'r' action.
8379 (handle_v_requests): Append ";r" if the target supports range
8380 stepping.
8381 * target.h (struct thread_resume) <step_range_start,
8382 step_range_end>: New fields.
8383 (struct target_ops) <supports_range_stepping>:
8384 New field.
8385 (target_supports_range_stepping): New macro.
8386
58794e1a
JB
83872013-05-17 Joel Brobecker <brobecker@adacore.com>
8388
8389 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8390 confusion in comment.
8391
d631c5a7
JB
83922013-05-17 Joel Brobecker <brobecker@adacore.com>
8393
8394 * lynx-low.c (struct process_info_private): New type.
8395 (lynx_add_process): New function.
8396 (lynx_create_inferior, lynx_attach): Replace calls to
8397 add_process by calls to lynx_add_process.
8398 (lynx_resume): If PTID is null, then try using
8399 current_process()->private->last_wait_event_ptid.
8400 Add comments.
8401 (lynx_clear_inferiors): Delete. The contents of that function
8402 has been inlined in lynx_mourn;
8403 (lynx_wait_1): Save the ptid in the process's private data.
8404 (lynx_mourn): Free the process' private data. Replace call
8405 to lynx_clear_inferiors by call to clear_inferiors.
8406
96f7a20f
YQ
84072013-05-17 Yao Qi <yao@codesourcery.com>
8408
8409 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8410 the right place.
8411
db0dfaa0
LM
84122013-05-16 Luis Machado <lgustavo@codesourcery.com>
8413
8414 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8415 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8416 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8417 PT_TEXT_END_ADDR guards. Update comments.
8418 (linux_target_op) <read_offsets>: Conditionally define to
8419 linux_read_offsets if the target is UCLIBC and if it defines
8420 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8421
68f5f838
SL
84222013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8423 Andrew Jenner <andrew@codesourcery.com>
8424
8425 * Makefile.in (SFILES): Add linux-nios2-low.c.
8426 (clean): Add action to delete nios2-linux.c.
8427 (nios2-linux.c): New rule.
8428 * configure.srv: Add nios2*-*-linux*.
8429 * linux-nios2-low.c: New.
8430
1ebff1fd
HAQ
84312013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8432
8433 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8434
f6150862
HZ
84352013-04-25 Hui Zhu <hui@codesourcery.com>
8436
8437 PR gdb/15186
f6150862
HZ
8438 * ax.c (ax_printf): Add fflush.
8439
614c279d
TT
84402013-04-22 Tom Tromey <tromey@redhat.com>
8441
8442 * Makefile.in (SFILES): Add filestuff.c.
8443 (OBS): Add filestuff.o.
8444 (filestuff.o): New target.
8445 * config.in, configure: Rebuild.
8446 * configure.ac: Check for fdwalk, pipe2.
8447
7d4e5717
PA
84482013-04-17 Pedro Alves <palves@redhat.com>
8449
8450 * configure.ac (USE_THREAD_DB): Delete variable.
8451 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8452 Don't AC_SUBST USE_THREAD_DB.
8453 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8454 * config.in, configure: Regenerate.
8455
d5c93e41
PA
84562013-04-16 Pedro Alves <palves@redhat.com>
8457
8458 * linux-low.h (struct lwp_info) <thread_known>: Move under
8459 the USE_THREAD_DB #ifdef.
8460
04f5fe89
PA
84612013-04-16 Pedro Alves <palves@redhat.com>
8462
8463 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8464 (linux-low.o): Delete rule.
8465 * linux-low.h: Always include "gdb_thread_db.h" instead of
8466 conditionally including thread_db.h.
8467 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8468 HAVE_THREAD_DB_H.
8469
480b27bf
JK
84702013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8471
8472 * Makefile.in (install-only): Fix make install regression.
8473
43662968
JK
84742013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8475
8476 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8477 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8478 installation.
8479 * gdbserver.1: Remove.
8480
3e74e146
PA
84812013-03-22 Pedro Alves <palves@redhat.com>
8482
8483 * linux-low.c (handle_extended_wait): Don't call
8484 linux_enable_event_reporting.
8485
a8347a2a
TT
84862013-03-15 Tony Theodore <tonyt@logyst.com>
8487
8488 PR build/9098:
8489 * Makefile.in (SHELL): Use @SHELL@.
8490
eeb56fa7
SDJ
84912013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8492
8493 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8494 compiler warning.
8495
4fa7e2ff
JB
84962013-03-13 Joel Brobecker <brobecker@adacore.com>
8497
8498 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8499 Remove extraneous NULL element.
8500
8ddb1965
YQ
85012013-03-13 Yao Qi <yao@codesourcery.com>
8502
8503 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8504 'V' block in trace frame.
8505
9accd112
MM
85062013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8507
8508 * target.h (struct target_ops): Add btrace ops.
8509 (target_supports_btrace): New macro.
8510 (target_enable_btrace): New macro.
8511 (target_disable_btrace): New macro.
8512 (target_read_btrace): New macro.
8513 * gdbthread.h (struct thread_info): Add btrace field.
8514 * server.c: Include btrace-common.h.
8515 (handle_btrace_general_set): New function.
8516 (handle_btrace_enable): New function.
8517 (handle_btrace_disable): New function.
8518 (handle_general_set): Call handle_btrace_general_set.
8519 (handle_qxfer_btrace): New function.
8520 (struct qxfer qxfer_packets[]): Add btrace entry.
8521 * inferiors.c (remove_thread): Disable btrace.
8522 * linux-low: Include linux-btrace.h.
8523 (linux_low_enable_btrace): New function.
8524 (linux_low_read_btrace): New function.
8525 (linux_target_ops): Add btrace ops.
8526 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8527 Add srv_linux_btrace=yes.
8528 (x86_64-*-linux*): Add linux-btrace.o.
8529 Add srv_linux_btrace=yes.
8530 * configure.ac: Define HAVE_LINUX_BTRACE.
8531 * config.in: Regenerated.
8532 * configure: Regenerated.
8533
5cc22e4c
MM
85342013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8535
8536 * server.c (handle_qxfer): Preserve error message if -3 is
8537 returned.
8538 (qxfer): Document the -3 return value.
8539
7c97f91e
MM
85402013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8541
8542 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8543 (linux_btrace_h): New variable.
8544 (linux-btrace.o): New rule.
8545
be9a119c 85462013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8547 Hafiz Abid Qadeer <abidh@codesourcery.com>
8548
8549 * tracepoint.c (trace_buffer_size): New global.
8550 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8551 (init_trace_buffer): Change to one-argument function. Allocate
8552 trace buffer memory.
8553 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8554 handle QTBuffer:size packet.
8555 (cmd_bigqtbuffer_size): New function.
8556 (initialize_tracepoint): Call init_trace_buffer with
8557 DEFAULT_TRACE_BUFFER_SIZE.
8558 * server.c (handle_query): Add QTBuffer:size in the
8559 supported packets.
8560
e64f7499
YQ
85612013-03-07 Yao Qi <yao@codesourcery.com>
8562
8563 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8564 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8565 of -1.
8566 (cmd_qtsp): Adjust condition. Do post increment.
8567 Set cur_action and cur_step_action back to 0.
8568
f0ae6fc3
PA
85692013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8570
8571 PR server/15236
8572 * linux-low.c (linux_write_memory): Return early success if LEN is
8573 zero.
8574
b5b0b0af
CV
85752013-03-05 Corinna Vinschen <vinschen@redhat.de>
8576
334ad4a8 8577 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8578
589bc927
TT
85792013-02-28 Tom Tromey <tromey@redhat.com>
8580
8581 * configure.ac: Invoke AC_SYS_LARGEFILE.
8582 * configure, config.in: Rebuild.
8583
dfe07582
CV
85842013-02-28 Corinna Vinschen <vinschen@redhat.com>
8585
8586 * win32-low.c: Throughout, fix format strings and casts of
8587 printf-like functions to avoid type related warnings on all
8588 platforms.
8589 (get_child_debug_event): Print dwDebugEventCode as hex since
8590 that's how it's usually documented.
8591
736cd585
YQ
85922013-02-28 Yao Qi <yao@codesourcery.com>
8593
8594 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8595 pulongest.
8596
e1f58301
JW
85972013-02-27 Jiong Wang <jiwang@tilera.com>
8598
8599 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8600 (reg-tilegx32.c): New rule.
8601 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8602 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8603 different register info initializer according to elf class.
8604 (init_registers_tilgx32): New function. The tilegx32 register info
8605 initializer.
8606 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8607 (tile_store_gregset): Likewise.
8608
d171ca78
YQ
86092013-02-27 Yao Qi <yao@codesourcery.com>
8610
8611 * server.c (process_point_options): Print debug message when
8612 debug_threads is true.
8613
282bbdf3
YQ
86142013-02-26 Yao Qi <yao@codesourcery.com>
8615
8616 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8617
aca22551
PA
86182013-02-19 Pedro Alves <palves@redhat.com>
8619 Kai Tietz <ktietz@redhat.com>
8620
8621 PR gdb/15161
8622
8623 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8624 instead of strtoul to extract address from packet.
8625 (process_serial_event) <'z'>: Likewise.
8626
4f3cee1c
YQ
86272013-02-18 Yao Qi <yao@codesourcery.com>
8628
8629 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8630
8e1d55a3
PA
86312013-02-14 Pedro Alves <palves@redhat.com>
8632
8633 Plug memory leak.
8634
8635 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8636 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8637
458820da
PA
86382013-02-14 Pedro Alves <palves@redhat.com>
8639
8640 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8641
baea0dae
PA
86422013-02-14 Pedro Alves <palves@redhat.com>
8643
8644 * tracepoint.c (save_string): Delete.
8645 (add_tracepoint_action): Use savestring instead of save_string.
8646
0b1afbb3
PA
86472013-02-12 Pedro Alves <palves@redhat.com>
8648
8649 * linux-xtensa-low.c: Ditto.
8650 * xtensa-xtregs.c: Ditto.
8651
8a4ac37e
PA
86522013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8653
8654 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8655 thread_db.
8656
148de6bb
MS
86572013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8658
8659 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8660 aarch64_num_wp_regs and aarch64_num_bp_regs to
8661 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8662
55fac6e0
MS
86632013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8664
8665 * linux-aarch64-low.c (ps_get_thread_area): Replace
8666 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8667
176eb98c
MS
86682013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8669 Marcus Shawcroft <marcus.shawcroft@arm.com>
8670 Nigel Stephens <nigel.stephens@arm.com>
8671 Yufeng Zhang <yufeng.zhang@arm.com>
8672
8673 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8674 (aarch64.c, aarch64-without-fpu.c): New targets.
8675 * configure.srv (aarch64*-*-linux*): New.
8676 * linux-aarch64-low.c: New file.
8677
56f7af9c
MS
86782013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8679
43aaf8b6 8680 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8681 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8682 (dequeue_one_deferred_signal, linux_resume_one_thread)
8683 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8684 (linux_tracefork_grandchild, linux_test_for_tracefork)
8685 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8686 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8687 where the argument is 0.
8688
60f662b0
YQ
86892013-01-25 Yao Qi <yao@codesourcery.com>
8690
8691 * event-loop.c: Include "queue.h".
8692 (gdb_event_p): New typedef.
8693 (struct gdb_event) <next_event>: Remove.
8694 (event_queue): Change to QUEUE(gdb_event_p).
8695 (async_queue_event): Remove.
8696 (gdb_event_xfree): New.
8697 (initialize_event_loop): New.
8698 (process_event): Use API from QUEUE.
8699 (wait_for_event): Likewise.
8700 * server.c (main): Call initialize_event_loop.
8701 * server.h (initialize_event_loop): Declare.
8702
5ae4861a
YQ
87032013-01-18 Yao Qi <yao@codesourcery.com>
8704
8705 * ax.h (struct eval_agent_expr_context): New.
8706 (gdb_eval_agent_expr): Update declaration.
8707 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8708 TFRAME. Add new argument CTX.
8709 * server.h (struct eval_agent_expr_context): Declare.
8710 (agent_mem_read, agent_tsv_read): Update declaration.
8711 (agent_mem_read_string): Likewise.
8712 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8713 (add_traceframe_block): Add new argument TPOINT.
8714 Increase TPOINT->traceframe_usage.
8715 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8716 eval_tracepoint_agent_expr.
8717 (condition_true_at_tracepoint): Likewise.
8718 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8719 (agent_mem_read_string, agent_tsv_read): Likewise.
8720
85e00e85
YQ
87212013-01-16 Yao Qi <yao@codesourcery.com>
8722
8723 * linux-low.c (linux_resume_one_lwp): Don't check
8724 'lwp->bp_reinsert != 0'.
8725
4039cf45
JB
87262013-01-07 Joel Brobecker <brobecker@adacore.com>
8727 Pedro Alves <palves@redhat.com>
8728
8729 * lynx-low.c (ptrace_request_to_str): Define a temporary
8730 macro and use it to simplify this function's implementation.
8731
9044dee2
JB
87322013-01-07 Joel Brobecker <brobecker@adacore.com>
8733
8734 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8735 sets errno.
8736
e6352c8f
JB
87372013-01-07 Joel Brobecker <brobecker@adacore.com>
8738
8739 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8740
50681a27
JB
87412013-01-07 Joel Brobecker <brobecker@adacore.com>
8742
8743 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8744
3f6e77ef
JB
87452013-01-07 Joel Brobecker <brobecker@adacore.com>
8746
8747 * lynx-low.c (lynx_resume): Use the resume_info parameter
8748 to determine the ptid for the lynx_ptrace call, unless
8749 it is equal to minus_one_ptid, in which case we use the
8750 ptid of the current_inferior.
8751 (lynx_wait_1): After having received a thread create/exit
8752 event, resume the inferior's execution using the signaling
8753 thread's ptid, rather than the old ptid.
8754
7fda33ae
JB
87552013-01-07 Joel Brobecker <brobecker@adacore.com>
8756
8757 * lynx-low.c (lynx_resume): Delete variable ret.
8758
b9786c74
JB
87592013-01-01 Joel Brobecker <brobecker@adacore.com>
8760
8761 * gdbreplay.c (gdbreplay_version): Update copyright year.
8762 * server.c (gdbserver_version): Likewise.
8763
8b93d60f
JB
87642012-12-17 Joel Brobecker <brobecker@adacore.com>
8765
8766 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8767 new thread.
8768
037335a7
JB
87692012-12-17 Joel Brobecker <brobecker@adacore.com>
8770
8771 * lynx-low.c (ptrace_request_to_str): Add handling for
8772 PTRACE_GETTRACESIG.
8773
52d4cbd8
JB
87742012-12-17 Joel Brobecker <brobecker@adacore.com>
8775
8776 * lynx-low.c (lynx_attach): Delete variable new_process.
8777
ab8f6ca9
JB
87782012-12-17 Joel Brobecker <brobecker@adacore.com>
8779
8780 * lynx-low.c (lynx_create_inferior): Delete variable
8781 new_process.
8782
78cbc024
JB
87832012-12-17 Joel Brobecker <brobecker@adacore.com>
8784
8785 * lynx-low.c (ptrace_request_to_str): Do not handle
8786 PTRACE_GETTHREADLIST if this macro does not exist.
8787
14a00470
YQ
87882012-12-15 Yao Qi <yao@codesourcery.com>
8789
8790 * Makefile.in (OBS): Add notif.o.
8791 * notif.c, notif.h: New.
8792 * server.c: Include "notif.h".
8793 (struct vstop_notif) <next>: Remove.
8794 <base>: New field.
8795 (queue_stop_reply): Update.
8796 (push_event, send_next_stop_reply): Remove.
8797 (discard_queued_stop_replies): Update.
8798 (notif_stop): New variable.
8799 (handle_v_stopped): Remove.
8800 (handle_v_requests): Don't call handle_v_stopped. Call
8801 handle_ack_notif instead.
8802 (queue_stop_reply_callback): Call notif_event_enque instead
8803 of queue_stop_reply.
8804 (handle_status): Don't call send_next_stop_reply, call
8805 notif_write_event instead.
8806 (kill_inferior_callback): Likewise.
8807 (detach_or_kill_inferior_callback): Likewise.
8808 (main): Call initialize_notif.
8809 (process_serial_event): Call QUEUE_is_empty.
8810 (handle_target_event): Call notif_push instead of push event.
8811 * server.h (push_event): Remove declaration.
8812
61c125b9
TT
88132012-12-10 Tom Tromey <tromey@redhat.com>
8814
8815 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8816 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8817 macros.
8818 (.c.o): Rewrite.
8819 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8820 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8821 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8822 (amd64-linux-ipa.o, ax.o): Rewrite.
8823 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8824 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8825 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8826 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8827 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8828 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8829 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8830 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8831 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8832 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8833 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8834 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8835 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8836 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8837 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8838 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8839 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8840 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8841 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8842 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8843 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8844 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8845 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8846 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8847 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8848 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8849 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8850 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8851 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8852 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8853 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8854 (reg-tilegx.o): Remove.
8855 (all_object_files): New macro.
8856 Include .deps files.
8857 * aclocal.m4, configure: Rebuild.
8858 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8859 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8860 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8861
e90e9ad9
TT
88622012-12-05 Tom Tromey <tromey@redhat.com>
8863
8864 PR gdb/14917:
8865 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8866
02d403bf 88672012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8868
8869 * configure.ac: Check for linux/perf_event.h.
8870 * config.in: Regenerated.
8871 * configure: Regenerated.
8872
0270a750
PA
88732012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8874
8875 * hostio.c (handle_readlink): Decrease buffer size
8876 parameter passed to readlink by one byte.
8877
8c29b58e
YQ
88782012-11-26 Yao Qi <yao@codesourcery.com>
8879
8880 * configure.ac (build_warnings): Append '-Wempty-body'.
8881 * configure: Regenerated.
8882 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8883 body.
8884
8bdce1ff
PM
88852012-11-15 Pierre Muller <muller@sourceware.org>
8886
8887 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8888 * config.in: Regenerate.
8889 * configure: Regenerate.
8890 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8891 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8892 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8893 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8894 header.
8895 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8896 instead of <sys/wait.h> header.
8897 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8898
02d403bf 88992012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8900
8901 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8902 (various make rules): Remove -DGDBSERVER
8903
fbd5db48
YQ
89042012-11-09 Yao Qi <yao@codesourcery.com>
8905
8906 * spu-low.c (current_ptid): Move it to ..
8907 * gdbthread.h: ... here. New.
8908 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8909 * server.c (myresume, process_serial_event): Likewise.
8910 * thread-db.c (thread_db_find_new_threads): Likewise.
8911 * tracepoint.c (run_inferior_command): Likewise.
8912
b3dc46ff
AB
89132012-10-01 Andrew Burgess <aburgess@broadcom.com>
8914
8915 * server.c (handle_search_memory_1): Include access length in
8916 warning message.
8917
07c04788
HPN
89182012-09-05 Michael Brandt <michael.brandt@axis.com>
8919
8920 * linux-crisv32-low.c: Fix compile errors.
8921
918d227b
YQ
89222012-09-04 Yao Qi <yao@codesourcery.com>
8923
8924 * tracepoint.c (cmd_qtsv): Adjust debug message.
8925 Don't check CUR_TPOINT.
8926
18c1b81a
YQ
89272012-08-28 Yao Qi <yao@codesourcery.com>
8928
8929 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8930 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8931 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8932 Remove declarations of xmalloc, xreallloc, xstrdup and
8933 freeargv.
8934 * Makefile.in (libiberty_h): New.
8935 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8936 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8937
dc82f37b
YQ
89382012-08-23 Yao Qi <yao@codesourcery.com>
8939
8940 * server.h: Remove declaration of 'xsnprintf'.
8941
406b1477
KS
89422012-08-22 Keith Seitz <keiths@redhat.com>
8943
8944 * server.h: Include build-gnulib-gbserver/config.h.
8945 * gdbreplay.c: Likewise.
8946
e6712ff1
DE
89472012-08-08 Doug Evans <dje@google.com>
8948
8949 * Makefile.in (SFILES): Add gdb_vecs.c.
8950 (OBS): Add gdb_vecs.o.
8951 (gdb_vecs_h, host_defs_h): New variables.
8952 (thread-db.o): Add $(gdb_vecs_h) dependency.
8953 (gdb_vecs.o): New rule.
8954 * thread-db.c: #include "gdb_vecs.h".
8955 (thread_db_load_search): Use a vector to iterate over path elements.
8956 Handle text appearing after "$pdir".
8957
8958 * configure.ac: Add check for strstr.
8959 * config.in: Regenerate.
8960 * configure: Regenerate.
8961
7c3270ae
UW
89622012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8963
8964 * hostio.c (handle_pread): If pread fails, fall back to attempting
8965 lseek/read.
8966 (handle_pwrite): Likewise for pwrite.
8967
b62e2b27
UW
89682012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8969
8970 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8971 between unsupported TYPE and unimplementable ADDR/LEN combination.
8972 (arm_insert_point): Act on new return value.
8973
78a99e91
PA
89742012-07-31 Pedro Alves <palves@redhat.com>
8975
8976 * server.c (process_point_options): Only skip tokens if we find
8977 one that is unrecognized. Don't treat 'X' specially while
8978 skipping unrecognized tokens.
8979
fcf303ab
UW
89802012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8981
8982 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8983 to 4-byte-align HW breakpoint addresses for Thumb.
8984
7255706c
YQ
89852012-07-27 Yao Qi <yao@codesourcery.com>
8986
8987 PR remote/14161.
8988
8989 * server.h: Declare gdb_agent_about_to_close.
8990 * target.c (kill_inferior): Include "agent.h".
8991 New. Send command 'kill'.
8992 * target.h (kill_inferior): Removed macro.
8993 * tracepoint.c (gdb_agent_about_to_close): New.
8994 (gdb_agent_helper_thread): Handle command 'close'.
8995 Wait endlessly until the inferior stops.
8996 Install gdb_agent_remove_socket to atexit hook.
8997 (agent_socket_name): New static variable.
8998 (gdb_agent_socket_init): Replace local variable 'name' with
8999 'agent_socket_name'.
9000 (gdb_agent_remove_socket): New.
9001
5a3f286f
YQ
90022012-07-27 Yao Qi <yao@codesourcery.com>
9003
9004 * server.c (process_point_options): Stop at 'X' when parsing.
9005
961bd387
ME
90062012-07-19 Michael Eager <eager@eagercon.com>
9007
a261b8f5 9008 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
9009 to hw_execute.
9010 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9011 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9012 hardware breakpoint.
9013
aa7c7447
JK
90142012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9015
9016 * gdbserver/linux-low.c (initialize_low): Call
9017 linux_ptrace_init_warnings.
9018
7f216e7c
DE
90192012-07-02 Doug Evans <dje@google.com>
9020
9021 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9022 pointer to int.
9023
d3ce09f5
SS
90242012-07-02 Stan Shebs <stan@codesourcery.com>
9025
9026 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9027 (ax.o): Add it to build rule.
9028 (ax-ipa.o): Ditto.
9029 (OBS): Add format.o.
9030 (IPA_OBS): Add format.o.
9031 * server.c (handle_query): Claim support for breakpoint commands.
9032 (process_point_options): Add command case.
9033 (process_serial_event): Leave running if there are printfs in
9034 effect.
9035 * mem-break.h (any_persistent_commands): Declare.
9036 (add_breakpoint_commands): Declare.
9037 (gdb_no_commands_at_breakpoint): Declare.
9038 (run_breakpoint_commands): Declare.
9039 * mem-break.c (struct point_command_list): New struct.
9040 (struct breakpoint): New field command_list.
9041 (any_persistent_commands): New function.
9042 (add_commands_to_breakpoint): New function.
9043 (add_breakpoint_commands): New function.
9044 (gdb_no_commands_at_breakpoint): New function.
9045 (run_breakpoint_commands): New function.
9046 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9047 locally.
9048 * ax.c: Include format.h.
9049 (ax_printf): New function.
9050 (gdb_eval_agent_expr): Add printf opcode.
9051
2f8f6aed
YQ
90522012-06-13 Yao Qi <yao@codesourcery.com>
9053
9054 * server.c (start_inferior): Remove duplicated writes to fields
9055 'last_resume_kind' and 'last_status' of 'current_inferior'.
9056
0c9070b3
YQ
90572012-06-12 Yao Qi <yao@codesourcery.com>
9058 Pedro Alves <palves@redhat.com>
9059
9060 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9061 comment.
9062 * server.c (handle_v_cont): Extend comment.
9063
c52daf70
YQ
90642012-06-11 Yao Qi <yao@codesourcery.com>
9065
9066 * linux-low.c (linux_attach): Add 'static'.
9067
d38bbb0a
YQ
90682012-06-06 Yao Qi <yao@codesourcery.com>
9069
9070 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9071
89dc0afd
JK
90722012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9073
9074 Fix gcc -flto compilation warning.
9075 * server.c (main): Make variable multi_mode and attach volatile.
9076
75f62ce7
TJB
90772012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9078
9079 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9080 if the platform doesn't know about it.
9081
65f479b6
PA
90822012-05-30 Jeff Kenton <jkenton@tilera.com>
9083
9084 * Makefile.in (SFILES): Add linux-tile-low.c.
9085 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9086 * configure.srv: Handle tilegx-*-linux*.
9087 * linux-tile-low.c: New file.
9088
0c5bf5a9
JK
90892012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9090
9091 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9092
a493e3e2
PA
90932012-05-24 Pedro Alves <palves@redhat.com>
9094
9095 PR gdb/7205
9096
43aaf8b6 9097 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 9098
2ea28649
PA
90992012-05-24 Pedro Alves <palves@redhat.com>
9100
9101 PR gdb/7205
9102
9103 Replace target_signal with gdb_signal throughout.
9104
8d409d16
MR
91052012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9106
9107 * linux-low.c (linux_store_registers): Avoid the copying sequence
9108 when no data has been retrieved by ptrace.
9109
23512c01
MGD
91102012-05-22 Will Deacon <will.deacon@arm.com>
9111
9112 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9113 Include asm/ptrace.h.
9114 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9115 already defined.
9116
4934b29e
MR
91172012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9118
9119 * linux-low.c (linux_store_registers): Don't re-retrieve data
9120 with ptrace that has already been obtained from /proc. Always
9121 copy any data retrieved with ptrace to the buffer supplied.
9122
bde24c0a
PA
91232012-05-11 Yao Qi <yao@codesourcery.com>
9124 Pedro Alves <palves@redhat.com>
9125
9126 * linux-low.c (enum stopping_threads_kind): New.
9127 (stopping_threads): Change type to `enum stopping_threads_kind'.
9128 (handle_extended_wait): If stopping and suspending threads, leave
9129 the new_lwp suspended too.
9130 (linux_wait_for_event): Adjust.
9131 (stop_all_lwps): Set `stopping_threads' to
9132 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9133 whether we're suspending threads or just stopping them. Assert no
9134 recursion happens.
9135
623b6bdf
YQ
91362012-04-29 Yao Qi <yao@codesourcery.com>
9137
9138 * server.h: Move some code to ...
9139 * gdbthread.h: ... here. New.
9140 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9141 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9142 (nto-low.o, win32-low.o): Likewise.
9143 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9144 * regcache.c, remote-utils.c, server.c: Likewise.
9145 * target.c, tracepoint.c, win32-low.c: Likewise.
9146
f15f9948
TJB
91472012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9148
9149 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9150 (PTRACE_ARG4_TYPE): Likewise.
9151 (PTRACE_XFER_TYPE): Likewise.
9152 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9153 ptrace to PTRACE_ARG3_TYPE.
9154 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9155 (PTRACE_ARG4_TYPE): Likewise.
9156 (PTRACE_XFER_TYPE): Likewise.
9157 (linux_detach_one_lwp): Cast fourth argument of
9158 ptrace to long then PTRACE_ARG4_TYPE.
9159 (regsets_fetch_inferior_registers): Cast third argument of
9160 ptrace to long then PTRACE_ARG3_TYPE.
9161 (regsets_store_inferior_registers): Likewise.
9162
38ea300a
PA
91632012-04-20 Pedro Alves <palves@redhat.com>
9164
9165 * configure: Regenerate.
9166
c971b7fa
PA
91672012-04-19 Pedro Alves <palves@redhat.com>
9168
43aaf8b6 9169 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 9170 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
9171 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9172 (all, install-only, uninstall, clean-info, all-lib, clean): No
9173 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9174 (maintainer-clean realclean distclean): Use subdir_do.
9175 (subdir_do): New.
9176 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 9177 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
9178 * acinclude.m4: Include acx_configure_dir.m4.
9179 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9180 calls. Call AC_PROG_RANLIB. Configure gnulib using
9181 ACX_CONFIGURE_DIR.
9182 (GNULIB): New.
9183 (GNULIB_STDINT_H): Adjust.
9184 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9185 * gdbreplay.c: Include build-gnulib/config.h.
9186 * server.h: Likewise.
9187 * aclocal.m4: Regenerate.
9188 * config.in: Regenerate.
9189 * configure: Regenerate.
c971b7fa 9190
809277f8
PA
91912012-04-19 Pedro Alves <palves@redhat.com>
9192
9193 * Makefile.in (LIBGNU, INCGNU): Adjust.
9194 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9195 (all, install-only, uninstall, clean-info, all-lib, clean)
9196 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9197 * configure.ac: Adjust AC_OUTPUT output.
9198 * aclocal.m4: Regenerate.
9199 * configure: Regenerate.
9200
fd9bb8b8
PA
92012012-04-19 Pedro Alves <palves@redhat.com>
9202
9203 * Makefile.in (generated_files): New.
9204 (server_h): Remove the explicit dependency on config.h, and depend
9205 on $generated_files.
9206
1c298c66
PA
92072012-04-19 Pedro Alves <palves@redhat.com>
9208
9209 * Makefile.in (INCGNU): Add -Ignulib.
9210
57c4b50b
PA
92112012-04-19 Pedro Alves <palves@redhat.com>
9212
9213 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9214 (INCGNU): ... this, and spell out -I here.
9215 (GNULIB_LIB): Rename to ...
9216 (LIBGNU): ... this.
9217 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9218
1030e047
PA
92192012-04-19 Pedro Alves <palves@redhat.com>
9220
9221 * config.in: Regenerate.
9222
447d4319
PA
92232012-04-19 Pedro Alves <palves@redhat.com>
9224
9225 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9226 * server.h (memmem): Remove declaration.
9227 * config.in: Regenerate.
9228 * configure: Regenerate.
9229
aad9eab9
YQ
92302012-04-19 Yao Qi <yao@codesourcery.com>
9231
9232 * Makefile.in (SFILES): Add common/vec.c.
9233 (OBS): Add vec.o.
9234 (vec.o): New rule.
9235
3e10640f
YQ
92362012-04-19 Yao Qi <yao@codesourcery.com>
9237
9238 * remote-utils.c (prepare_resume_reply): Replace with macro
9239 target_core_of_thread.
9240 * server.c (handle_qxfer_threads_proper): Likewise.
9241 * target.h (traget_core_of_thread): New macro.
9242
71622373
PA
92432012-04-18 Pedro Alves <palves@redhat.com>
9244
9245 * aclocal.m4: Regenerate.
9246 * configure: Regenerate.
9247
80d26939
YQ
92482012-04-16 Yao Qi <yao@codesourcery.com>
9249
9250 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9251 duplicated on address.
9252
42476b70
YQ
92532012-04-16 Yao Qi <yao@codesourcery.com>
9254
9255 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9256 (struct tracepoint_action_ops) <send>: New field.
9257 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9258 (agent_expr_send, x_tracepoint_action_send): New.
9259 (l_tracepoint_action_send): New.
9260 (cmd_qtdp): Download and install tracepoint
9261 according to `use_agent'.
9262 (run_inferior_command): Add one more parameter `len'.
9263 Update callers.
9264 (tracepoint_send_agent): New.
9265 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9266
7bc83639
YQ
92672012-04-16 Yao Qi <yao@codesourcery.com>
9268
9269 * tracepoint.c (download_tracepoints): Moved to ...
9270 (cmd_qtstart): ... here.
9271
5f18041e
YQ
92722012-04-14 Yao Qi <yao@codesourcery.com>
9273
9274 * tracepoint.c: Include inttypes.h.
9275 (struct collect_memory_action): Use sized types.
9276 (struct tracepoint): Likewise.
9277 (cmd_qtdp, stop_tracing): Update print specifiers.
9278 (cmd_qtp, response_tracepoint): Likewise.
9279 (collect_data_at_tracepoint): Likewise.
9280 (collect_data_at_step): Likewise.
9281
55a8c076
YQ
92822012-04-14 Yao Qi <yao@codesourcery.com>
9283
9284 Import gnulib module inttypes.
9285 * aclocal.m4, config.in, configure: Regenerated.
9286
dc750257
YQ
92872012-04-14 Yao Qi <yao@codesourcery.com>
9288
9289 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9290 Makefile and config.status at last.
9291
0ab5faf9
YQ
92922012-04-13 Yao Qi <yao@codesourcery.com>
9293
9294 * tracepoint.c: Include stdint.h unconditionally.
9295
18f5fd81
TJB
92962012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9297
9298 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9299 on BFD_HAVE_SYS_PROCFS_TYPE.
9300 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9301 * configure: Regenerate.
9302 * config.in: Likewise.
9303
4d47af5c
L
93042012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9305
9306 * Makefile.in (clean): Also remove x32.c x32-linux.c
9307 x32-avx.c x32-avx-linux.c.
9308 (x32.o): New target.
9309 (x32.c): Likewise.
9310 (x32-linux.o): Likewise.
9311 (x32-linux.c): Likewise.
9312 (x32-avx.o): Likewise.
9313 (x32-avx.c): Likewise.
9314 (x32-avx-linux.o): Likewise.
9315 (x32-avx-linux.c): Likewise.
9316
9317 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9318 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9319 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9320 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9321 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9322 i386/x32-avx-linux.xml.
9323
9324 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9325 (init_registers_x32_avx_linux): Likwise.
9326 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9327 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9328
ecedbe58
PA
93292012-04-13 Pedro Alves <palves@redhat.com>
9330
9331 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9332 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9333 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9334 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9335 the sub-make.
9336
c92b5177
L
93372012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9338
9339 * linux-x86-low.c (compat_x32_clock_t): New.
9340 (compat_x32_siginfo_t): Likewise.
9341 (compat_x32_siginfo_from_siginfo): Likewise.
9342 (siginfo_from_compat_x32_siginfo): Likewise.
9343 (linux_is_elf64): Likewise.
9344 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9345 and siginfo_from_compat_x32_siginfo for x32.
9346 (x86_arch_setup): Set linux_is_elf64.
9347
214d508e
L
93482012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9349
9350 PR gdb/13969
9351 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9352 e_machine field.
9353 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9354 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9355 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9356 compatible with process.
9357
c9a1864a
YQ
93582012-04-12 Yao Qi <yao@codesourcery.com>
9359
9360 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9361 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9362 (install-only, install-info, clean): Handle sub dir gnulib.
9363 (all-lib, am--refresh): New targets.
9364 (memmem.o): Remove target.
9365 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9366 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9367 (AC_REPLACE_FUNCS): Remove memmem.
9368 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9369 (AC_OUTPUT): Generate Makefile in gnulib/.
9370 * aclocal.m4, config.in, configure: Regenerated.
9371
367ba2c2
MR
93722012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9373
9374 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9375
9d236627
PA
93762012-04-05 Pedro Alves <palves@redhat.com>
9377
9378 -Werror=strict-aliasing
9379
9380 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9381 pointer.
9382
111217b3
PA
93832012-04-04 Pedro Alves <palves@redhat.com>
9384
9385 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9386 (sparc_store_gregset_from_stack, sparc_store_gregset)
9387 (sparc_breakpoint_at): Fix formatting.
9388
8365dcf5
TJB
93892012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9390
9391 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9392 are available.
9393 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9394 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9395 * config.in: Regenerate.
9396 * configure: Likewise.
9397
689cc2ae
PA
93982012-03-29 Pedro Alves <palves@redhat.com>
9399
9400 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9401 Correct ptrace arguments.
9402
c14dfd32
PA
94032012-03-28 Pedro Alves <palves@redhat.com>
9404
9405 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9406 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9407 (IA64_FR1_REGNUM): New defines.
9408 (ia64_fetch_register): New.
9409 (the_low_target): Install it.
9410 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9411 field.
9412 * linux-low.c (linux_fetch_registers): Try the
9413 the_low_target.fetch_register hook first.
9414
9415 * linux-arm-low.c (the_low_target): Adjust.
9416 * linux-bfin-low.c (the_low_target): Adjust.
9417 * linux-cris-low.c (the_low_target): Adjust.
9418 * linux-crisv32-low.c (the_low_target): Adjust.
9419 * linux-m32r-low.c (the_low_target): Adjust.
9420 * linux-m68k-low.c (the_low_target): Adjust.
9421 * linux-mips-low.c (the_low_target): Adjust.
9422 * linux-ppc-low.c (the_low_target): Adjust.
9423 * linux-s390-low.c (the_low_target): Adjust.
9424 * linux-sh-low.c (the_low_target): Adjust.
9425 * linux-sparc-low.c (the_low_target): Adjust.
9426 * linux-tic6x-low.c (the_low_target): Adjust.
9427 * linux-x86-low.c (the_low_target): Adjust.
9428 * linux-xtensa-low.c (the_low_target): Adjust.
9429
63c88e13
PA
94302012-03-26 Pedro Alves <palves@redhat.com>
9431
9432 * server.c (handle_qxfer_libraries): Don't bail early if
9433 the_target->qxfer_libraries_svr4 is not NULL.
9434
fb723180
PA
94352012-03-26 Pedro Alves <palves@redhat.com>
9436
9437 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9438
0afae3cf
PA
94392012-03-23 Pedro Alves <palves@redhat.com>
9440
9441 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9442 "library-list-svr4" element's start tag when the the DSO list is
9443 empty.
9444
485f1ee4
PA
94452012-03-23 Pedro Alves <palves@redhat.com>
9446
9447 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9448 a variable whose type size is the same as the inferior's pointer
9449 size.
9450
a5362b9a
TS
94512012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9452
9453 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9454 struct siginfo.
9455 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9456 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9457 * linux-low.h: Include <signal.h>.
9458 (struct siginfo): Remove forward declaration.
9459 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9460 struct siginfo.
9461
d226c142
MF
94622012-03-21 Mike Frysinger <vapier@gentoo.org>
9463
9464 * .gitignore: Ignore more files.
9465
122f36ef
PA
94662012-03-19 Pedro Alves <palves@redhat.com>
9467 Jan Kratochvil <jan.kratochvil@redhat.com>
9468
9469 * server.c (cont_thread, general_thread): Add describing comments.
9470 (start_inferior): Clear `cont_thread'.
9471 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9472 of a process.
9473
fc3e5175
YQ
94742012-03-15 Yao Qi <yao@codesourcery.com>
9475
9476 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9477 handling to ...
9478 (cmd_qtdp): ... here.
9479
8d0d92cd
YQ
94802012-03-15 Yao Qi <yao@codesourcery.com>
9481
9482 * tracepoint.c (struct tracepoint_action_ops): New.
9483 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9484 (m_tracepoint_action_download): New.
9485 (r_tracepoint_action_download): New.
9486 (x_tracepoint_action_download): New.
9487 (l_tracepoint_action_download): New.
9488 (add_tracepoint_action): Install `action->ops' according type.
9489 (download_tracepoint_1): Move code `download' function pointer
9490 of various tracepoint_action_ops.
9491
87b0bb13
JK
94922012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9493
9494 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9495 linux_ptrace_attach_warnings.
9496
5f572dec
JK
94972012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9498
9499 * Makefile.in (linux-ptrace.o): New.
9500 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9501 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9502 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9503 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9504 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9505 of these targets.
9506 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9507
f4647387
YQ
95082012-03-08 Yao Qi <yao@codesourcery.com>
9509 Pedro Alves <palves@redhat.com>
9510
9511 Fix PR server/13392.
9512 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9513 offset of JMP insn.
9514 * tracepoint.c (remove_tracepoint): New.
9515 (cmd_qtdp): Call remove_tracepoint when failed to install.
9516
9b224c5e
PA
95172012-03-07 Pedro Alves <palves@redhat.com>
9518
9519 * linux-low.c (get_detach_signal): New.
9520 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9521 Pass on pending signals to PTRACE_DETACH. Check the result of the
9522 ptrace call.
9523 * server.c (program_signals, program_signals_p): New.
9524 (handle_general_set): Handle QProgramSignals.
9525 * server.h (program_signals, program_signals_p): Declare.
9526
e237a7e2
JK
95272012-03-05 Pedro Alves <palves@redhat.com>
9528 Jan Kratochvil <jan.kratochvil@redhat.com>
9529
9530 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9531 New comment why.
9532
5808517f
YQ
95332012-03-03 Yao Qi <yao@codesourcery.com>
9534
9535 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9536 agent_look_up_symbols.
9537
58b4daa5
YQ
95382012-03-03 Yao Qi <yao@codesourcery.com>
9539
9540 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9541 (linux-x86-low.o): Likewise.
9542 * server.h: Remove in_process_agent_loaded.
9543 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9544 common/agent.c.
9545 Update callers.
9546
8ffcbaaf
YQ
95472012-03-03 Yao Qi <yao@codesourcery.com>
9548
9549 * tracepoint.c (gdb_agent_capability): New global.
9550 (in_process_agent_loaded_ust): Renamed to
9551 `in_process_agent_supports_ust'.
9552 Update callers.
9553 (in_process_agent_supports_ust): Call agent_capability_check.
9554 (clear_installed_tracepoints): Assert that agent supports
9555 agent.
9556
d1feda86
YQ
95572012-03-03 Yao Qi <yao@codesourcery.com>
9558
9559 * linux-low.c (linux_supports_agent): New.
9560 (linux_target_ops): Initialize field `supports_agent' with
9561 linux_supports_agent.
9562 * target.h (struct target_ops) <supports_agent>: New.
9563 (target_supports_agent): New macro.
9564 * server.c (handle_general_set): Handle packet 'QAgent'.
9565 (handle_query): Send `QAgent+'.
9566 * Makefile.in (server.o): Depends on agent.h.
9567
2fa291ac
YQ
95682012-03-03 Yao Qi <yao@codesourcery.com>
9569
9570 * Makefile.in (OBS): Add agent.o.
9571 Add new rule for agent.o.
9572 Track dependence of tracepoint.c on agent.h.
9573 * tracepoint.c (run_inferior_command_1):
9574 (run_inferior_command): Call agent_run_command.
9575 (gdb_ust_connect_sync_socket): Deleted. Move it to
9576 common/agent.c.
9577 (resume_thread, stop_thread): Likewise.
9578 (gdb_ust_socket_init): Renamed to ...
9579 (gdb_agent_socket_init): ... New.
9580 (gdb_ust_thread): Renamed to ...
9581 (gdb_agent_helper_thread): ... New.
9582 (gdb_ust_init): Move some code to ...
9583 (gdb_agent_init): ... here. New.
9584 [HAVE_UST]: Call gdb_ust_init.
9585 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9586 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9587 * config.in, configure: Regenerated.
9588
05044653
PA
95892012-03-02 Pedro Alves <palves@redhat.com>
9590
9591 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9592 * linux-low.c (struct simple_pid_list): New.
9593 (stopped_pids): New a struct simple_pid_list pointer.
9594 (add_to_pid_list, pull_pid_from_list): New.
9595 (handle_extended_wait): Don't assume the first signal new children
9596 report is SIGSTOP. Adjust call to pull_pid_from_list.
9597 (linux_wait_for_lwp): Adjust.
9598
8d00225b
YQ
95992012-03-02 Yao Qi <yao@codesourcery.com>
9600
9601 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9602 debug log.
9603
19560ba5
YQ
96042012-03-02 Yao Qi <yao@codesourcery.com>
9605
9606 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9607 `stop_pc' and `tpoint'. Update caller.
9608
1faeff08
MR
96092012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9610
9611 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9612 * linux-low.c (use_linux_regsets): New macro.
9613 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9614 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9615 (linux_register_in_regsets): New function.
9616 (usr_fetch_inferior_registers): Skip registers covered by
9617 regsets.
9618 (usr_store_inferior_registers): Likewise.
9619 (usr_fetch_inferior_registers): New macro.
9620 (usr_store_inferior_registers): Likewise.
9621 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9622 (linux_store_registers): Likewise.
9623 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9624 prototype.
9625 (init_registers_mips64_dsp_linux): Likewise.
9626 (init_registers_mips_linux): New macro.
9627 (init_registers_mips_dsp_linux): Likewise.
9628 (mips_dsp_num_regs): Likewise.
9629 (DSP_BASE, DSP_CONTROL): New fallback macros.
9630 (mips_base_regs): New macro.
9631 (mips_regmap): Use it. Fix the size.
9632 (mips_dsp_regmap): New variable.
9633 (mips_dsp_regset_bitmap): Likewise.
9634 (mips_arch_setup): New function.
9635 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9636 than mips_regmap.
9637 (mips_cannot_store_register): Likewise.
9638 (the_low_target): Update .arch_setup, .num_regs and .regmap
9639 initializers. Add .regset_bitmap initializer.
9640 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9641 initializer.
9642 * linux-bfin-low.c (the_low_target): Likewise.
9643 * linux-cris-low.c (the_low_target): Likewise.
9644 * linux-crisv32-low.c (the_low_target): Likewise.
9645 * linux-ia64-low.c (the_low_target): Likewise.
9646 * linux-m32r-low.c (the_low_target): Likewise.
9647 * linux-m68k-low.c (the_low_target): Likewise.
9648 * linux-ppc-low.c (the_low_target): Likewise.
9649 * linux-s390-low.c (the_low_target): Likewise.
9650 * linux-sh-low.c (the_low_target): Likewise.
9651 * linux-sparc-low.c (the_low_target): Likewise.
9652 * linux-tic6x-low.c (the_low_target): Likewise.
9653 * linux-x86-low.c (the_low_target): Likewise.
9654 * linux-xtensa-low.c (the_low_target): Likewise.
9655 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9656 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9657 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9658 srv_xmlfiles.
9659 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9660 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9661
c03e6ccc
YQ
96622012-02-29 Yao Qi <yao@codesourcery.com>
9663 Pedro Alves <palves@redhat.com>
9664
9665 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9666 `step_over_finished' is true.
9667
644cebc9
PA
96682012-02-27 Pedro Alves <palves@redhat.com>
9669
9670 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9671 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9672
c14d7ab2
PA
96732012-02-27 Pedro Alves <palves@redhat.com>
9674
9675 PR server/9684
9676 * linux-low.c (pid_is_stopped): New.
9677 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9678
412c89dd
LM
96792012-02-25 Luis Machado <lgustavo@codesourcery.com>
9680
9681 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9682 of conditions.
9683
b745defe
MR
96842012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9685
9686 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9687
9f3a5c85
LM
96882012-02-24 Luis Machado <lgustavo@codesourcery>
9689
9690 * server.c (handle_query): Advertise support for target-side
9691 breakpoint condition evaluation.
9692 (process_point_options): New function.
9693 (process_serial_event): When inserting a breakpoint, check for
9694 a target-side condition that should be evaluated.
9695
9696 * mem-break.c: Include regcache.h and ax.h.
9697 (point_cond_list_t): New data structure.
9698 (breakpoint) <cond_list>: New field.
9699 (find_gdb_breakpoint_at): Make non-static.
9700 (delete_gdb_breakpoint_at): Clear any target-side
9701 conditions.
9702 (clear_gdb_breakpoint_conditions): New function.
9703 (add_condition_to_breakpoint): Likewise.
9704 (add_breakpoint_condition): Likewise.
9705 (gdb_condition_true_at_breakpoint): Likewise.
9706 (gdb_breakpoint_here): Return result directly instead
9707 of going through a local variable.
9708
9709 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9710 (clear_gdb_breakpoint_conditions): Likewise.
9711 (add_breakpoint_condition): Likewise.
9712 (gdb_condition_true_at_breakpoint): Likewise.
9713
9714 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9715 (need_step_over_p): Take target-side breakpoint condition into
9716 consideration.
9717
5e1dc496
LM
97182012-02-24 Luis Machado <lgustavo@codesourcery>
9719
9720 * server.h: Include tracepoint.h.
9721 (agent_mem_read, agent_get_trace_state_variable_value,
9722 agent_set_trace_state_variable_value,
9723 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9724 get_set_tsv_func_addr): New prototypes.
9725
9726 * ax.h: New include file.
9727 * ax.c: New source file.
9728
9729 * tracepoint.c: Include ax.h.
9730 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9731 agent_expr, eval_result_type): Move to ax.h.
9732 (parse_agent_expr): Rename to ...
9733 (gdb_parse_agent_expr): ... this, make it non-static and move
9734 to ax.h.
9735 (unparse_agent_expr) Rename to ...
9736 (gdb_unparse_agent_expr): ... this, make it non-static and move
9737 to ax.h.
9738 (eval_agent_expr): Rename to ...
9739 (eval_tracepoint_agent_expr): ... this.
9740 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9741 forward declarations.
9742 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9743 (agent_get_trace_state_variable_value): New function.
9744 (agent_set_trace_state_variable_value): New function.
9745 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9746 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9747 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9748 (condition_true_at_tracepoint): Likewise.
9749 (parse_agent_expr): Rename to ...
9750 (gdb_parse_agent_expr): ... this and move to ax.c.
9751 (unparse_agent_expr): Rename to ...
9752 (gdb_unparse_agent_expr): ... this and move to ax.c.
9753 (gdb_agent_op_name): Move to ax.c.
9754 (eval_agent_expr): Rename to ...
9755 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9756 and move to ax.c.
9757 (eval_tracepoint_agent_expr): New function.
9758 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9759 non-static.
5e1dc496
LM
9760 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9761 ax.c.
9762 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9763 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9764 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9765 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9766 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9767 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9768 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9769 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9770 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9771 (compile_bytecodes): Remove forward declaration.
9772 (is_goto_target): Move to ax.c.
9773 (compile_bytecodes): Move to ax.c and call
9774 agent_get_trace_state_variable_value (...) and
9775 agent_set_trace_state_variable_value (...).
9776
9777 * Makefile.in: Update ax.c and IPA dependencies.
9778
277e4e52
PA
97792012-02-24 Pedro Alves <palves@redhat.com>
9780
9781 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9782 (cmd_bigqtbuffer_circular): ... this. Only handle
9783 'QTBuffer:circular:'.
9784 (handle_tracepoint_general_set): Adjust.
9785
bf4c19f7
YQ
97862012-02-16 Yao Qi <yao@codesourcery.com>
9787
9788 * inferiors.c: Move code to ...
9789 * dll.c: .... here. New.
9790 * server.h: Declare clear_dlls.
9791 * Makefile.in (SFILES): Add dll.c.
9792 (OBS): Add dll.o
9793 (dll.o): New rule.
9794
d73f2619
YQ
97952012-02-11 Yao Qi <yao@codesourcery.com>
9796
9797 * server.c: (handle_monitor_command): Add a new parameter
9798 `own_buf'.
9799 (handle_query): Update caller.
9800
f8255c2a
JB
98012012-02-09 Joel Brobecker <brobecker@adacore.com>
9802
9803 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9804 * configure, config.in: Regenerate.
9805 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9806 is not defined.
9807
da84f473
PA
98082012-02-02 Pedro Alves <palves@redhat.com>
9809
9810 Try SIGKILL first, then PTRACE_KILL.
9811 * linux-low.c (linux_kill_one_lwp): New.
9812 (linux_kill_one_lwp): Rename to ...
9813 (kill_one_lwp_callback): ... this. Use the new
9814 linux_kill_one_lwp.
9815
e886a173
PA
98162012-02-02 Pedro Alves <palves@redhat.com>
9817
9818 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9819 inferior.
9820
be07f1a2
PA
98212012-01-27 Pedro Alves <palves@redhat.com>
9822
9823 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9824 (elf_64_file_p): Make static.
9825 (linux_pid_exe_is_elf_64_file): New.
9826 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9827 Delete declarations.
9828 (linux_pid_exe_is_elf_64_file): Declare.
9829 * linux-x86-low.c (x86_arch_setup): Use
9830 linux_pid_exe_is_elf_64_file.
9831
d8301ad1
JK
98322012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9833
9834 * linux-low.c (linux_wait_for_event_1): Rename to ...
9835 (linux_wait_for_event): ... here and merge it with former
9836 linux_wait_for_event - new variable wait_ptid, use it.
9837 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9838
01b17894
PA
98392012-01-23 Pedro Alves <palves@redhat.com>
9840
9841 * server.c (main): Avoid yet another case of infinite loop while
9842 detaching/killing after a longjmp.
9843
e825046f
JK
98442012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9845
9846 Code cleanup.
9847 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9848
b9e7b9c3
UW
98492012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9850
9851 * hostio.c (handle_readlink): New function.
9852 (handle_vFile): Call it to handle "vFile:readlink" packets.
9853
901f9912
UW
98542012-01-20 Pedro Alves <palves@redhat.com>
9855 Ulrich Weigand <ulrich.weigand@linaro.org>
9856
9857 * server.c (handle_v_requests): Only support vAttach and vRun to
9858 start multiple processes when in extended protocol mode.
9859
fc1ab1a0
PA
98602012-01-17 Pedro Alves <palves@redhat.com>
9861
9862 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9863 memalign plus mprotect to allocate the scratch buffer.
9864
7d5d4e98
PA
98652012-01-13 Pedro Alves <palves@redhat.com>
9866
9867 * server.c (attach_inferior): Clear `cont_thread'.
9868
f128d5e9
PA
98692012-01-13 Pedro Alves <palves@redhat.com>
9870
9871 * server.c (main): Avoid infinite loop while detaching/killing
9872 after a longjmp.
9873
06db92f0
DE
98742012-01-09 Doug Evans <dje@google.com>
9875
9876 * server.c (start_inferior): Set last_ptid in --wrapper case.
9877
32d92999
YQ
98782012-01-06 Yao Qi <yao@codesourcery.com>
9879
9880 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9881 defined.
9882 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9883
5e0a92a9
YQ
98842012-01-04 Yao Qi <yao@codesourcery.com>
9885
9886 * tracepoint.c (cmd_qtdp): Print debug message
9887 for static tracepoint.
9888
ae639e8c
YQ
98892012-01-04 Yao Qi <yao@codesourcery.com>
9890
9891 * tracepoint.c (trace_vdebug): Differentiate debug message
9892 between gdbserver and IPA.
9893
f72429c5
YQ
98942012-01-03 Yao Qi <yao@codesourcery.com>
9895
9896 * tracepoint.c (tracepoint_was_hit): Don't collect for
9897 static tracepoint.
9898
12c3e59c
JB
98992012-01-02 Joel Brobecker <brobecker@adacore.com>
9900
9901 * terminal.h: Reformat copyright header.
9902
67827812
JB
99032012-01-02 Joel Brobecker <brobecker@adacore.com>
9904
9905 * server.c (gdbserver_version): Update copyright year.
9906 * gdbreplay.c (gdbreplay_version): Likewise.
9907
3e52c33d
JK
99082011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9909
9910 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9911
9912 Revert:
9913 2011-12-18 Hui Zhu <teawater@gmail.com>
9914 * linux-low.c (linux_create_inferior): Save return value to ret.
9915
66f1260e
HZ
99162011-12-18 Hui Zhu <teawater@gmail.com>
9917
9918 * linux-low.c (linux_create_inferior): Save return value to ret.
9919
e77616d7
DE
99202011-12-16 Doug Evans <dje@google.com>
9921
e7b06c57
DE
9922 * linux-low.c (linux_create_inferior): If stdio connection,
9923 redirect stdin from /dev/null, stdout to stderr.
9924 * remote-utils.c (remote_is_stdio): New static global.
9925 (remote_connection_is_stdio): New function.
9926 (remote_prepare): Handle stdio connection.
9927 (remote_open): Ditto.
9928 (remote_close): Don't close stdin for stdio connections.
9929 (read_prim,write_prim): New functions. Replace all calls to
9930 read/write to these.
9931 * server.c (main): Watch for "-" argument. Move call to
9932 remote_prepare before start_inferior.
9933 * server.h (STDIO_CONNECTION_NAME): New macro.
9934 (remote_connection_is_stdio): Declare.
9935
e77616d7
DE
9936 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9937 in debugging output.
9938
82067193
YQ
99392011-12-15 Yao Qi <yao@codesourcery.com>
9940
9941 * tracepoint.c: Include sys/syscall.h.
9942 (gdb_ust_thread): Remove preprocessor conditional.
9943
82bfbe7e
PA
99442011-12-14 Pedro Alves <pedro@codesourcery.com>
9945
9946 * linux-low.c (linux_detach_one_lwp): Call
9947 the_low_target.prepare_to_resume before detaching.
9948
712c6575
YQ
99492011-12-14 Yao Qi <yao@codesourcery.com>
9950
9951 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9952 of write.
9953
d54d1edf
YQ
99542011-12-14 Yao Qi <yao@codesourcery.com>
9955
9956 * i386-low.c (i386_low_stopped_data_address): Initialize local
9957 variable `control'.
9958
6210a125
PA
99592011-12-13 Pedro Alves <pedro@codesourcery.com>
9960
9961 PR remote/13492
9962
9963 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9964 DR_CONTROL unless necessary. Extend comments.
9965 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9966 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9967
2ece8244
YQ
99682011-12-13 Yao Qi <yao@codesourcery.com>
9969
9970 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9971 macros.
9972 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9973
784867a5
JK
99742011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9975
9976 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9977 Print new debug message for such case.
9978
6bf36717
JK
99792011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9980
9981 Fix overlapping memcpy.
9982 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9983 the read_inferior_memory transfer.
9984 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9985 write_inferior_memory transfer.
9986 (set_fast_tracepoint_jump): New variable buf. Use it for the
9987 read_inferior_memory and write_inferior_memory transfers.
9988 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9989 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9990 Use it for the write_inferior_memory transfer.
9991 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9992 buffers.
9993
50275556
MR
99942011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9995
9996 * linux-low.c (fetch_register, store_register): Make code
9997 consistent, fix formatting.
9998
7325beb4
MR
99992011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10000
10001 * linux-low.c (usr_store_inferior_registers): Factor out code
10002 to handle individual registers into...
10003 (store_register): ... this new function.
10004
c642a434
UW
100052011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10006
10007 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10008 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10009 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10010 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10011 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10012 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10013 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10014 (srv_xmlfiles): Add new XML files.
10015
10016 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10017 and <sys/uio.h>.
10018 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10019 (init_registers_s390_linux32v1): Add prototype.
10020 (init_registers_s390_linux32v2): Likewise.
10021 (init_registers_s390_linux64v1): Likewise.
10022 (init_registers_s390_linux64v2): Likewise.
10023 (init_registers_s390x_linux64v1): Likewise.
10024 (init_registers_s390x_linux64v2): Likewise.
10025 (s390_num_regs): Increment to 52.
10026 (s390_regmap): Add orig_r2 register.
10027 (s390_num_regs_3264): Increment to 68.
10028 (s390_regmap_3264): Add orig_r2 register.
10029 (s390_collect_ptrace_register): Handle orig_r2 register.
10030 (s390_supply_ptrace_register): Likewise.
10031 (s390_fill_last_break): New function.
10032 (s390_store_last_break): Likewise.
10033 (s390_fill_system_call): New function.
10034 (s390_store_system_call): Likewise.
10035 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10036 register sets.
10037 (s390_check_regset): New function.
10038 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10039 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10040 Update target_regsets for available register sets.
10041
2268b414
JK
100422011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10043 Jan Kratochvil <jan.kratochvil@redhat.com>
10044
10045 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10046 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10047 New.
10048 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10049 * linux-low.h (struct process_info_private): New member r_debug.
10050 * server.c (handle_qxfer_libraries): Call
10051 the_target->qxfer_libraries_svr4.
10052 (handle_qxfer_libraries_svr4): New function.
10053 (qxfer_packets): New entry "libraries-svr4".
10054 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10055 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10056 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10057 PACKET_qXfer_libraries_svr4.
10058
d6db1fab
UW
100592011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10060
10061 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10062 PSW address/mask between 8-byte and 16-byte formats.
10063 (s390_supply_ptrace_register): Likewise.
10064 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10065 basic addressing mode bit.
10066
242f5f1c
SS
100672011-11-24 Stan Shebs <stan@codesourcery.com>
10068
10069 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10070
f196051f
SS
100712011-11-17 Stan Shebs <stan@codesourcery.com>
10072
10073 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10074 (tracing_start_time): New global.
10075 (tracing_stop_time): New global.
10076 (tracing_user_name): New global.
10077 (tracing_notes): New global.
10078 (tracing_stop_note): New global.
10079 (cmd_qtstart): Set traceframe_usage, start_time.
10080 (stop_tracing): Set stop_time.
10081 (cmd_qtstatus): Report additional status.
10082 (cmd_qtp): New function.
10083 (handle_tracepoint_query): Call it.
10084 (cmd_qtnotes): New function.
10085 (handle_tracepoint_general_set): Call it.
10086 (get_timestamp): Rename from tsv_get_timestamp.
10087
405f8e94
SS
100882011-11-14 Stan Shebs <stan@codesourcery.com>
10089 Kwok Cheung Yeung <kcy@codesourcery.com>
10090
10091 * linux-x86-low.c (small_jump_insn): New.
10092 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10093 trampoline and error message, build a trampoline and issue a small
10094 jump instruction to it.
10095 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10096 trampoline and error message.
10097 (x86_get_min_fast_tracepoint_insn_len): New.
10098 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10099 * linux-low.h (struct linux_target_ops): Add arguments to
10100 install_fast_tracepoint_jump_pad operation, add new operation.
10101 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10102 arguments.
10103 (linux_get_min_fast_tracepoint_insn_len): New function.
10104 (linux_target_op): Add new operation.
10105 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10106 (gdb_trampoline_buffer_end): Ditto.
10107 (gdb_trampoline_buffer_error): Ditto.
10108 (struct ipa_sym_addresses): Add fields for new IPA variables.
10109 (symbol_list): Add entries for new IPA variables.
10110 (struct tracepoint): Add fields to hold the address range of the
10111 trampoline used by the tracepoint.
10112 (trampoline_buffer_head): New static variable.
10113 (trampoline_buffer_tail): Ditto.
10114 (claim_trampoline_space): New function.
10115 (have_fast_tracepoint_trampoline_buffer): New function.
10116 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10117 structure.
10118 (install_fast_tracepoint): Ditto, also add error buffer argument.
10119 (cmd_qtminftpilen): New function.
10120 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10121 (fast_tracepoint_from_trampoline_address): New function.
10122 (fast_tracepoint_collecting): Handle trampoline as part of jump
10123 pad space.
10124 (set_trampoline_buffer_space): New function.
10125 (initialize_tracepoint): Initialize new IPA variables.
10126 * target.h (struct target_ops): Add arguments to
10127 install_fast_tracepoint_jump_pad operation, add new
10128 get_min_fast_tracepoint_insn_len operation.
10129 (target_get_min_fast_tracepoint_insn_len): New.
10130 (install_fast_tracepoint_jump_pad): Add arguments.
10131 * server.h (IPA_BUFSIZ): Define.
10132 * linux-i386-ipa.c: Include extra header files.
10133 (initialize_fast_tracepoint_trampoline_buffer): New function.
10134 (initialize_low_tracepoint): Call it.
10135 * server.h (set_trampoline_buffer_space): Declare.
10136 (claim_trampoline_space): Ditto.
10137 (have_fast_tracepoint_trampoline_buffer): Ditto.
10138
1e4d1764
YQ
101392011-11-14 Yao Qi <yao@codesourcery.com>
10140
10141 * server.c (handle_query): Handle InstallInTrace for qSupported.
10142 * tracepoint.c (add_tracepoint): Sort list.
10143 (install_tracepoint, download_tracepoint): New.
10144 (cmd_qtdp): Call them to install and download tracepoints.
10145 (sort_tracepoints): Removed.
10146 (cmd_qtstart): Update.
10147
5c73ff4e
YQ
101482011-11-14 Yao Qi <yao@codesourcery.com>
10149
10150 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10151 * mem-break.h: Declare.
10152 * tracepoint.c (cmd_qtstart): Move some code to ...
10153 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10154 New.
10155 (download_tracepoints): Move some code to ...
10156 (download_tracepoint_1): ... here. New.
10157
86a30030
YQ
101582011-11-08 Yao Qi <yao@codesourcery.com>
10159
10160 * remote-utils.c (relocate_instruction): A comment fix.
10161
8d26e50c
JB
101622011-11-07 Joel Brobecker <brobecker@adacore.com>
10163
10164 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10165 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10166 dr_status_mirror and dr_control_mirror from debug_reg_state.
10167 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10168 (i386_initial_stuff): Remove use of deleted globals.
10169 (i386_get_thread_context, i386_set_thread_context,
10170 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10171 from debug_reg_state.
10172
a59306a3
YQ
101732011-11-05 Yao Qi <yao@codesourcery.com>
10174
10175 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10176 address as TPOINT's.
10177
3065dfb6
SS
101782011-11-02 Stan Shebs <stan@codesourcery.com>
10179
10180 * tracepoint.c (agent_mem_read_string): New function.
10181 (eval_agent_expr): Call it for tracenz.
10182 * server.c (handle_query): Report support for tracenz.
10183
fd0d8c7c
YQ
101842011-11-02 Yao Qi <yao@codesourcery.com>
10185
10186 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10187
609086b1
YQ
101882011-11-02 Yao Qi <yao@codesourcery.com>
10189
10190 * target.h: Fix a typo in comment.
10191
b9fd1791
PA
101922011-10-31 Pedro Alves <pedro@codesourcery.com>
10193
10194 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10195 clobber the breakpoints' shadows with fast tracepoint jumps.
10196 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10197 * target.c (write_inferior_memory): Also pass MYADDR down to
10198 check_mem_write.
10199
03583c20
UW
102002011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10201
10202 * configure.ac: Check support for personality routine.
10203 * configure: Regenerate.
10204 * config.in: Likewise.
10205 * linux-low.c: Include <sys/personality.h>.
10206 Define ADDR_NO_RANDOMIZE if necessary.
10207 (linux_create_inferior): Disable address space randomization when
10208 forking inferior, if requested.
10209 (linux_supports_disable_randomization): New function.
10210 (linux_target_ops): Install it.
10211 * server.h (disable_randomization): Declare.
10212 * server.c (disable_randomization): New global variable.
10213 (handle_general_set): Handle QDisableRandomization.
10214 (handle_query): Likewise for qSupported.
10215 (main): Support --disable-randomization and --no-disable-randomization
10216 command line arguments.
10217 * target.h (struct target_ops): Add supports_disable_randomization.
10218 (target_supports_disable_randomization): New macro.
10219
723b724b
MF
102202011-09-29 Mike Frysinger <vapier@gentoo.org>
10221
10222 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10223 ifdef check.
10224 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10225 [!PT_GETDSBT] (target_loadmap): New definition.
10226 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10227 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10228 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10229 and PT_GETDSBT to LINUX_LOADMAP.
10230 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10231 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10232
55329a5c 102332011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
10234
10235 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10236 (arm_linux_hwbp_cap): New static variable.
10237 (arm_linux_get_hwbp_cap): Replace by ...
10238 (arm_linux_init_hwbp_cap): ... this new function.
10239 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10240 (arm_linux_get_hw_watchpoint_count): Likewise.
10241 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10242 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10243 (arm_prepare_to_resume): Use perror_with_name instead of error.
10244
55329a5c 102452011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
10246
10247 * linux-arm-low.c: Include <signal.h>.
10248 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10249 (struct arm_linux_hwbp_cap): New data type.
10250 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10251 (struct arm_linux_hw_breakpoint): New data type.
10252 (MAX_BPTS, MAX_WPTS): Define.
10253 (struct arch_process_info, struct arch_lwp_info): New data types.
10254 (arm_linux_get_hwbp_cap): New function.
10255 (arm_linux_get_hw_breakpoint_count): Likewise.
10256 (arm_linux_get_hw_watchpoint_count): Likewise.
10257 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10258 (arm_hwbp_control_initialize): Likewise.
10259 (arm_hwbp_control_is_enabled): Likewise.
10260 (arm_hwbp_control_is_initialized): Likewise.
10261 (arm_hwbp_control_disable): Likewise.
10262 (arm_linux_hw_breakpoint_equal): Likewise.
10263 (arm_linux_hw_point_initialize): Likewise.
10264 (struct update_registers_data): New data structure.
10265 (update_registers_callback: New function.
10266 (arm_insert_point): Likewise.
10267 (arm_remove_point): Likewise.
10268 (arm_stopped_by_watchpoint): Likewise.
10269 (arm_stopped_data_address): Likewise.
10270 (arm_new_process): Likewise.
10271 (arm_new_thread): Likewise.
10272 (arm_prepare_to_resume): Likewise.
10273 (the_low_target): Register arm_insert_point, arm_remove_point,
10274 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10275 arm_new_thread, and arm_prepare_to_resume.
10276
6b9801d4
SS
102772011-09-15 Stan Shebs <stan@codesourcery.com>
10278
10279 * server.h (struct emit_ops): Add compare-goto fields.
10280 * tracepoint.c (gdb_agent_op_sizes): New table.
10281 (emit_eq_goto): New function.
10282 (emit_ne_goto): New function.
10283 (emit_lt_goto): New function.
10284 (emit_le_goto): New function.
10285 (emit_gt_goto): New function.
10286 (emit_ge_goto): New function.
10287 (is_goto_target): New function.
10288 (compile_bytecodes): Recognize special cases of compare-goto
10289 combinations and call specialized emitters for them.
10290 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10291 (amd64_emit_ne_goto): New function.
10292 (amd64_emit_lt_goto): New function.
10293 (amd64_emit_le_goto): New function.
10294 (amd64_emit_gt_goto): New function.
10295 (amd64_emit_ge_goto): New function.
10296 (amd64_emit_ops): Add the new functions.
10297 (i386_emit_eq_goto): New function.
10298 (i386_emit_ne_goto): New function.
10299 (i386_emit_lt_goto): New function.
10300 (i386_emit_le_goto): New function.
10301 (i386_emit_gt_goto): New function.
10302 (i386_emit_ge_goto): New function.
10303 (i386_emit_ops): Add the new functions.
10304
bf15cbda
SS
103052011-09-08 Stan Shebs <stan@codesourcery.com>
10306
10307 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10308 (i386_emit_epilogue): Restore %ebx.
10309
943ca1dd
JZ
103102011-08-31 Jie Zhang <jzhang918@gmail.com>
10311
10312 * server.c (step_thread): Remove definition.
10313 (process_serial_event): Don't handle Hs.
10314 * server.h (step_thread): Remove declaration.
10315 * target.c (set_desired_inferior): Remove use of step_thread.
10316
e3deef73
LM
103172011-08-24 Luis Machado <lgustavo@codesourcery.com>
10318
10319 * linux-low.c: Include linux-procfs.h.
10320 (linux_attach_lwp_1): Update comments.
10321 (linux_attach): Scan for existing threads when attaching to a
10322 process that is the tgid.
10323 * Makefile.in: Update dependencies.
10324
13da1c97
LM
103252011-08-24 Luis Machado <lgustavo@codesourcery.com>
10326
10327 * configure.srv: Add linux-procfs.o dependencies.
10328
881127c9
YQ
103292011-08-14 Yao Qi <yao@codesourcery.com>
10330
10331 * target.h (struct target_ops): Fix indent.
10332 * win32-low.c (win32_target_ops): Fix comment.
10333
58dbd541
YQ
103342011-08-14 Andrew Jenner <andrew@codesourcery.com>
10335 Yao Qi <yao@codesourcery.com>
10336
10337 * Makefile.in (clean): Remove tic6x-*.c files.
10338 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10339 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10340 (tic6x-c64xp-linux.c): Likewise.
10341 * configure.srv: Add support for tic6x-*-uclinux.
10342 * linux-tic6x-low.c: New.
10343 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10344
78d85199
YQ
103452011-08-14 Andrew Stubbs <ams@codesourcery.com>
10346 Yao Qi <yao@codesourcery.com>
10347
10348 * target.h (struct target_ops): Add read_loadmap.
10349 * linux-low.c (struct target_loadseg): New type.
10350 (struct target_loadmap): New type.
10351 (linux_read_loadmap): New function.
10352 (linux_target_ops): Add linux_read_loadmap.
10353 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
10354 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10355 to NULL.
78d85199 10356
a959a88d
EZ
103572011-08-05 Eli Zaretskii <eliz@gnu.org>
10358
10359 * win32-low.c: Include <stdint.h>.
10360
1ced966e
PA
103612011-07-22 Pedro Alves <pedro@codesourcery.com>
10362
10363 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10364 to the inferior here.
10365 (i386_remove_aligned_watchpoint): Ditto.
10366 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10367 fit part of the watchpoint in the debug registers.
10368 (i386_update_inferior_debug_regs): New.
10369 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10370 registers, and only update the inferior on success.
10371 (i386_low_remove_watchpoint): Ditto.
10372
d26e3629
KY
103732011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10374
10375 * linux-low.c (compare_ints, unique, list_threads, show_process,
10376 linux_core_of_thread): Delete.
10377 (linux_target_ops): Change linux_core_of_thread to
10378 linux_common_core_of_thread.
10379 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10380 * utils.c (malloc_failure): Change type of argument.
10381 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10382 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10383 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10384 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10385 (IPA_OBJS): Add common-utils-ipa.o.
10386 (ptid_h, linux_osdata_h): New macros.
10387 (server_h): Add common/common-utils.h, common/xml-utils.h,
10388 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10389 common/ptid.h.
10390 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10391 ptid.o, buffer.o): New rules.
10392 (linux-low.o): Add common/linux-osdata.h as a dependency.
10393 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10394 * configure.ac: Add AC_HEADER_DIRENT check.
10395 * config.in: Regenerate.
10396 * configure: Regenerate.
10397 * remote-utils.c (xml_escape_text): Delete.
10398 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10399 buffer_xml_printf): Move to common/buffer.c.
10400 * server.c (main): Remove call to initialize_inferiors.
10401 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10402 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10403 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10404 internal_error, gdb_assert, gdb_assert_fail): Delete.
10405 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10406 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10407 common/buffer.h.
10408 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10409 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10410 initialize_inferiors): Delete.
10411
2275a1a7
PA
104122011-07-20 Pedro Alves <pedro@codesourcery.com>
10413
10414 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10415 symbol error.
10416
0a5b1e09
PA
104172011-05-31 Pedro Alves <pedro@codesourcery.com>
10418
10419 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10420 assertion.
10421 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10422
6938fd34
YQ
104232011-05-26 Yao Qi <yao@codesourcery.com>
10424
10425 * Makefile.in (thread-db.o): Track dependence to
10426 common/gdb_thread_db.h.
10427 * thread-db.c: include gdb_thread_db.h from right place.
10428
b481f9e0
TT
104292011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10430
10431 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10432 __FILE__ and __LINE__ to internal_error.
10433
98a5dd13
DE
104342011-05-13 Doug Evans <dje@google.com>
10435
10436 * thread-db.c (try_thread_db_load_from_sdir): New function.
10437 (try_thread_db_load_from_dir): New function.
10438 (thread_db_load_search): Handle $sdir, ignore $pdir.
10439 Remove trying of system directories if search of
10440 libthread-db-search-path fails, that is now done via $sdir.
10441
d248b706
KY
104422011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10443
10444 * server.c (handle_query): Add EnableDisableTracepoints to the list
10445 of supported features.
43aaf8b6 10446 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10447 tracepoints.
43aaf8b6
PA
10448 (cmd_qtenable_disable): New.
10449 (cmd_qtstart): Install tracepoints even if disabled.
10450 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10451 receiving a QTEnable or QTDisable packet.
10452 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10453 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10454 tracepoints.
10455 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10456
84e578fb
DE
104572011-05-10 Doug Evans <dje@google.com>
10458
10459 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10460
71f55dd8
DE
104612011-05-04 Doug Evans <dje@google.com>
10462
10463 * linux-low.c (linux_join): Skip process lookup.
10464 * spu-low.c (spu_join): Ditto.
10465 * server.c (join_inferiors_callback): Delete.
10466 (process_serial_event): For 'D' packet (detach) call join_inferior
10467 directly.
10468
4d393d60
JM
104692011-05-04 Joseph Myers <joseph@codesourcery.com>
10470
10471 * README: Don't mention xscale*-*-linux*.
10472 * configure.srv (xscale*-*-linux*): Don't handle target.
10473
b00ad6ff
NF
104742011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10475
10476 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10477 casting pointers.
10478 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10479 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10480 (i386_emit_void_call_2): Likewise.
10481
af96c192
YQ
104822011-04-26 Yao Qi <yao@codesourcery.com>
10483
43aaf8b6
PA
10484 * linux-low.c: Move common macros to linux-ptrace.h.
10485 Include linux-ptrace.h.
af96c192
YQ
10486 * Makefile.in (linux_ptrace_h): New.
10487 (linux-low.o): Depends on linux-ptrace.h.
10488
03f2bd59
JK
104892011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10490
10491 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10492 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10493 (remote_prepare): New function with most of the TCP code from ...
10494 (remote_open): ... here. Detect PORT here unconditionally. Move also
10495 setting transport_is_reliable.
10496 * server.c (run_once): New variable.
10497 (gdbserver_usage): Document it.
10498 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10499 the first run if RUN_ONCE.
10500 * server.h (run_once, remote_prepare): New declarations.
10501
7a9dd1b2
TT
105022011-04-19 Tom Tromey <tromey@redhat.com>
10503
10504 * win32-low.c (handle_load_dll): Remove duplicate "the".
10505
81239425
PM
105062011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10507
10508 Remove support for old Cygwin 1.5 versions.
10509 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10510 function to avoid warning.
10511 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10512 warning.
10513
9e0627f1
PM
105142011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10515
10516 * gdbserver/server.h (Macro _): Define it if not available.
10517
588eebee
MS
105182011-03-14 Michael Snyder <msnyder@vmware.com>
10519
348af9f7 10520 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10521
43f70d4c
JB
105222011-03-10 Joel Brobecker <brobecker@adacore.com>
10523
10524 * Makefile.in (maintainer-clean realclean distclean): Remove
10525 "make ... subdir_do" command.
10526
348af9f7
MS
105272011-03-10 Michael Snyder <msnyder@vmware.com>
10528
10529 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10530
10531 * server.c (handle_v_run): Free alloced buffer on early return.
10532
e637a4f5
YQ
105332011-03-09 Yao Qi <yao@codesourcery.com>
10534
10535 Revert:
10536 2011-03-04 Yao Qi <yao@codesourcery.com>
10537
10538 * Makefile.in: Remove GNU make feature --directory.
10539
10540 2011-03-05 Yao Qi <yao@codesourcery.com>
10541
10542 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10543 (subdir_do): New make target. Copied from gdb/Makefile.
10544 (maintainer-clean, realclean, distclean, clean): Call corresponding
10545 make targets in common/Makefile.
10546
10547 2011-02-11 Yao Qi <yao@codesourcery.com>
10548
10549 * configure.ac: Call AC_PROG_RANLIB.
10550 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10551 * configure: Regenerate.
10552
e6edda56
JK
105532011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10554
10555 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10556
e5141119
JB
105572011-03-06 Yao Qi <yao@codesourcery.com>
10558
10559 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10560
64794aa4
JB
105612011-03-05 Yao Qi <yao@codesourcery.com>
10562
10563 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10564 (subdir_do): New make target. Copied from gdb/Makefile.
10565 (maintainer-clean, realclean, distclean, clean): Call corresponding
10566 make targets in common/Makefile.
10567
7a762829
YQ
105682011-03-04 Yao Qi <yao@codesourcery.com>
10569
10570 * Makefile.in: Remove GNU make feature --directory.
10571
348af9f7
MS
105722011-03-04 Michael Snyder <msnyder@vmware.com>
10573
10574 * server.c (queue_stop_reply): Call xmalloc not malloc.
10575
105762011-03-02 Michael Snyder <msnyder@vmware.com>
10577
10578 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10579
9f72fee2
MS
105802011-02-28 Michael Snyder <msnyder@vmware.com>
10581
588eebee
MS
10582 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10583 (cmd_qtframe): Ditto.
10584 (cmd_qtbuffer): Ditto.
10585 (cmd_bigqtbuffer): Ditto.
10586
9f72fee2
MS
10587 * utils.c (decimal2str): Initialize 'width' to nine, then
10588 don't mess with it.
10589
8040bd49
UW
105902011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10591
10592 * hostio.c (require_data): Free *data, not data.
10593
7e52cbd0
JK
105942011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10595
10596 * hostio.c (require_data): Use free, not xfree.
10597
9130f83e
MS
105982011-02-27 Michael Snyder <msnyder@vmware.com>
10599
4b812f4e
MS
10600 * server.c (handle_query): Discard unused value.
10601
9130f83e
MS
10602 * hostio.c (require_data): Free malloc memory before returning
10603 error.
10604
69d37113
MS
106052011-02-26 Michael Snyder <msnyder@vmware.com>
10606
10607 * linux-low.c (list_threads): Call closedir for dirent.
10608
35f5825a
MS
106092011-02-27 Michael Snyder <msnyder@vmware.com>
10610
2a589cef
MS
10611 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10612 a case statement falls through.
10613
0adea5f7
MS
10614 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10615
35f5825a
MS
10616 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10617 in comparison.
10618
238f1c74
MS
106192011-02-26 Michael Snyder <msnyder@vmware.com>
10620
10621 * utils.c (decimal2str): Eliminate dead code and dead param.
10622 (pulongest): Drop dead param from call to decimal2str.
10623 (plongest): Ditto.
10624
633ff500
JB
106252011-02-24 Joel Brobecker <brobecker@adacore.com>
10626
10627 Revert the following patch (not approved yet):
10628 2011-02-21 Hui Zhu <teawater@gmail.com>
10629 * tracepoint.c (tp_printf): New function.
10630 (eval_agent_expr): Handle gdb_agent_op_printf.
10631
f9c6ff72
HZ
106322011-02-21 Hui Zhu <teawater@gmail.com>
10633
10634 * tracepoint.c (tp_printf): New function.
10635 (eval_agent_expr): Handle gdb_agent_op_printf.
10636
94d5e490
TT
106372011-02-18 Tom Tromey <tromey@redhat.com>
10638
10639 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10640 (tracepoint.o): Likewise.
10641 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10642 (gdb_agent_op_names): Likewise.
10643
c7f96d2b
TT
106442011-02-18 Tom Tromey <tromey@redhat.com>
10645
10646 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10647 gdb_agent_op_rot>: New constants.
10648 (gdb_agent_op_names): Add pick and roll.
10649 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10650 cases.
10651
0feedb2c
JK
106522011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10653
10654 * aclocal.m4: Regenerated with aclocal-1.11.1.
10655
b3b9301e
PA
106562011-02-14 Pedro Alves <pedro@codesourcery.com>
10657
10658 * server.c (handle_qxfer_traceframe_info): New.
10659 (qxfer_packets): Register "traceframe-info".
10660 (handle_query): Report support for qXfer:traceframe-info:read+.
10661 * tracepoint.c (match_blocktype): New.
10662 (traceframe_find_block_type): Rename to ...
10663 (traceframe_walk_blocks): ... this. Add callback filter argument,
10664 and use it.
10665 (traceframe_find_block_type): New, reimplemented on top of
10666 traceframe_walk_blocks.
10667 (build_traceframe_info_xml): New.
10668 (traceframe_read_info): New.
10669 * server.h (traceframe_read_info): Declare.
10670
4f3e6fb7
YQ
106712011-02-11 Yao Qi <yao@codesourcery.com>
10672
10673 * configure.ac: Call AC_PROG_RANLIB.
10674 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10675 * configure: Regenerate.
10676
764880b7
PA
106772011-02-07 Pedro Alves <pedro@codesourcery.com>
10678
10679 * server.c (gdb_read_memory): Change return semantics to allow
10680 partial transfers.
10681 (handle_search_memory_1): Adjust.
10682 (process_serial_event) <'m' packet>: Handle partial transfers.
10683 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10684
1c79eb8a
PA
106852011-01-28 Pedro Alves <pedro@codesourcery.com>
10686
10687 * regcache.c (init_register_cache): Initialize
10688 regcache->register_status.
10689 (free_register_cache): Release regcache->register_status.
10690 (regcache_cpy): Copy register_status.
10691 (registers_to_string): Print 'x's for unavailable registers.
10692 (supply_register): Mark the register's status valid or
10693 unavailable, depending on whether a buffer was passed in or not.
10694 (supply_register_zeroed): New.
10695 (supply_regblock): Mark the registers' status valid or
10696 unavailable, depending on whether a buffer was passed in or not.
10697 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10698 (struct regcache): New `register_status' field.
10699 (supply_register_zeroed): Declare.
10700 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10701 supply_register_zeroed, rather than passing a NULL buffer to
10702 supply_register.
10703 * tracepoint.c (fetch_traceframe_registers): Update comment.
10704
85724a0e
PA
107052011-01-28 Pedro Alves <pedro@codesourcery.com>
10706
10707 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10708 buffer explicit.
10709
d08aafef
PA
107102011-01-25 Pedro Alves <pedro@codesourcery.com>
10711
10712 * server.h (decode_xfer_write): Change prototype.
10713 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10714 and don't extract the annex here.
10715 * server.c (decode_xfer_read): Remove `annex' parameter,
10716 and don't extract the annex here.
10717 (decode_xfer): New.
10718 (struct qxfer): New.
10719 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10720 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10721 (handle_qxfer_statictrace): New functions, abstracted out from
10722 handle_query, and made to use the struct qxfer interface.
10723 (handle_threads_qxfer_proper): Rename to ...
10724 (handle_qxfer_threads_proper): ... this.
10725 (handle_threads_qxfer): Rename to ...
10726 (handle_qxfer_threads): ... this. Adjust.
10727 (qxfer_packets): New array.
10728 (handle_qxfer): New function.
10729 (handle_query): Use handle_qxfer.
10730
493e2a69
MS
107312011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10732
10733 * gdbreplay.c: Shorten lines of >= 80 columns.
10734 * linux-low.c: Ditto.
10735 * linux-ppc-low.c: Ditto.
10736 * linux-s390-low.c: Ditto.
10737 * linux-sparc-low.c: Ditto.
10738 * linux-x86-low.c: Ditto.
10739 * linux-xtensa-low.c: Ditto.
10740 * mem-break.c: Ditto.
10741 * nto-low.c: Ditto.
10742 * regcache.h: Ditto.
10743 * remote-utils.c: Ditto.
10744 * server.c: Ditto.
10745 * server.h: Ditto.
10746 * thread-db.c: Ditto.
10747 * tracepoint.c: Ditto.
10748 * utils.c: Ditto.
10749 * win32-low.h: Ditto.
10750
44944448
JB
107512011-01-05 Joel Brobecker <brobecker@adacore.com>
10752
10753 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10754 update.
10755
71ce852c
JB
107562011-01-01 Joel Brobecker <brobecker@adacore.com>
10757
10758 * server.c (gdbserver_version): Update copyright year in version
10759 output.
10760 * gdbreplay.c (gdbreplay_version): Ditto.
10761
eb826dc6
MF
107622010-12-29 Jie Zhang <jie.zhang@analog.com>
10763
10764 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10765 * linux-bfin-low.c: New file.
10766 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10767 PT_DATA_ADDR for BFIN targets.
10768 * Makefile.in (SFILES): Add linux-bfin-low.c.
10769 (clean): Remove reg-bfin.c.
10770 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10771 * README: Mention supported Blackfin targets.
10772
39ab222a
MF
107732010-12-23 Mike Frysinger <vapier@gentoo.org>
10774
10775 * .gitignore: New file.
10776
a1f2ce7d
MF
107772010-11-16 Mike Frysinger <vapier@gentoo.org>
10778
10779 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10780
f474844c
JZ
107812010-10-22 Jie Zhang <jie@codesourcery.com>
10782
10783 * Makefile.in: Add FLAGS_TO_PASS variable.
10784 (install): Remove dependency of install-only and recursively
10785 invoke make for install-only.
10786
f1048712
DE
107872010-10-04 Doug Evans <dje@google.com>
10788
10789 * Makefile.in (uninstall): Use $(DESTDIR).
10790
b53a1623
PA
107912010-09-24 Pedro Alves <pedro@codesourcery.com>
10792
e6ee044d
PA
10793 PR gdb/11842
10794
b53a1623
PA
10795 * linux-x86-low.c (compat_siginfo_from_siginfo)
10796 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10797 si_code is < 0. Check for si_code == SI_TIMER before checking for
10798 si_code < 0.
10799
fa1bd1e4
JB
108002010-09-13 Joel Brobecker <brobecker@adacore.com>
10801
10802 * lynx-i386-low.c: New file.
10803 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10804
47fac8f8
JB
108052010-09-13 Joel Brobecker <brobecker@adacore.com>
10806
10807 * lynx-low.c (ptrace_request_to_str): Remove handling for
10808 request values that have been removed in LynxOS 5.x.
10809
1adfc54d
JB
108102010-09-13 Joel Brobecker <brobecker@adacore.com>
10811
10812 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10813 <ptrace.h>
10814
c2a66c29
NS
108152010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10816
10817 * configure.ac: Add --enable-inprocess-agent option.
10818 * configure: Rebuilt.
10819
32fcada3
YQ
108202010-09-06 Yao Qi <yao@codesourcery.com>
10821
10822 * linux-low.c (linux_kill): Remove unused variable.
10823 (linux_stabilize_threads): Likewise.
10824 * server.c (start_inferior): Likewise.
10825 (queue_stop_reply_callback): Likewise.
10826 * tracepoint.c (do_action_at_tracepoint): Likewise.
10827
0cccb683
YQ
108282010-09-06 Yao Qi <yao@codesourcery.com>
10829
10830 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10831 on return.
10832
423ec54c
JK
108332010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10834
10835 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10836
12ac6819
PA
108372010-09-06 Pedro Alves <pedro@codesourcery.com>
10838
10839 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10840 "$(IPA_DEPFILES)".
10841
8ed54b31
JB
108422010-09-01 Joel Brobecker <brobecker@adacore.com>
10843
10844 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10845 gdbserver/lynx-ppc-low.c: New files.
10846 * Makefile.in (lynx_low_h): New variable.
10847 (lynx-low.o, lynx-ppc-low.o): New rules.
10848 * configure.ac: On LynxOS, link with -lnetinet.
10849 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10850 * configure: regenerate.
10851
bb0116a4
JB
108522010-09-01 Joel Brobecker <brobecker@adacore.com>
10853
10854 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10855 * configure.ac: Add check for vasprintf and vsnprintf.
10856 * configure, config.in: Regenerate.
10857 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10858
a778ab81 108592010-09-01 Joel Brobecker <brobecker@adacore.com>
10860
10861 * gdbreplay.c: Move include of alloca.h up, next to include of
10862 malloc.h.
10863 * server.h: Add include of malloc.h.
10864 * mem-break.c: Remove include of malloc.h.
10865 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10866
8b034a19 108672010-09-01 Joel Brobecker <brobecker@adacore.com>
10868
10869 * Makefile.in (memmem.o): Build with -Wno-error.
10870
108712010-09-01 Joel Brobecker <brobecker@adacore.com>
10872
10873 * utils.c (xsnprintf): Make non-static.
10874 * server.h: Add xsnprintf declaration.
10875 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10876 replace calls to snprintf by calls to xsnprintf throughout.
10877
108782010-09-01 Joel Brobecker <brobecker@adacore.com>
10879
10880 * configure.ac: Add configure check for alloca.
10881 * configure, config.in: Regenerate.
10882 * server.h: Include alloca.h if it exists.
10883 * gdbreplay.c: Include alloca.h if it exists.
10884
1a981360
PA
108852010-08-28 Pedro Alves <pedro@codesourcery.com>
10886
10887 * linux-low.c (__SIGRTMIN): Define if not already defined.
10888 (linux_create_inferior): Check for __ANDROID__ rather than
10889 __SIGRTMIN.
10890 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10891 are already deferred.
10892 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10893 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10894 stopped and already has a pending signal to report.
10895 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10896 a pending signal to report or is moving out of a jump pad.
10897 (linux_init_signals): Check for __ANDROID__ rather than
10898 __SIGRTMIN.
10899
b4d51a55
PA
109002010-08-28 Pedro Alves <pedro@codesourcery.com>
10901
10902 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10903 debug_threads check. Avoid a linear search when not doing debug
10904 output.
10905
ec48365d
PA
109062010-08-27 Pedro Alves <pedro@codesourcery.com>
10907
10908 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10909 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10910 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10911 (process_event): Change local fd's type to gdb_fildes_t.
10912 (create_file_handler): Adjust prototype.
10913 (delete_file_handler): Adjust prototype.
10914 (handle_file_event): Adjust prototype. Use pfildes.
10915 (create_file_event): Adjsut prototype.
10916 * remote-utils.c (remote_desc, listen_desc): Change type to
10917 gdb_fildes_t.
10918 * server.h: New gdb_fildes_t typedef.
10919 [USE_WIN32API]: Include winsock2.h.
10920 (delete_file_handler, add_file_handler): Adjust prototypes.
10921 (pfildes): Declare.
10922 * utils.c (pfildes): New.
10923
854d88f0
PA
109242010-08-27 Pedro Alves <pedro@codesourcery.com>
10925
10926 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10927 * configure: Regenerate.
10928
0146f85b
PA
109292010-08-27 Pedro Alves <pedro@codesourcery.com>
10930
10931 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10932 (linux_done_accessing_memory): ... this.
10933 (linux_target_ops): Adjust.
10934 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10935 * nto-low.c (nto_target_ops): Adjust comment.
10936 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10937 * spu-low.c (spu_target_ops): Adjust comment.
10938 * target.h (target_ops): Rename unprepare_to_access_memory field
10939 to done_accessing_memory.
10940 (unprepare_to_access_memory): Rename to ...
10941 (done_accessing_memory): ... this.
10942
90d74c30
PA
109432010-08-26 Pedro Alves <pedro@codesourcery.com>
10944
10945 * linux-low.c (linux_prepare_to_access_memory): New.
10946 (linux_unprepare_to_access_memory): New.
10947 (linux_target_ops): Install them.
10948 * server.c (read_memory): Rename to ...
10949 (gdb_read_memory): ... this. Use
10950 prepare_to_access_memory/prepare_to_access_memory.
10951 (write_memory): Rename to ...
10952 (gdb_write_memory): ... this. Use
10953 prepare_to_access_memory/prepare_to_access_memory.
10954 (handle_search_memory_1): Adjust.
10955 (process_serial_event): Adjust.
10956 * target.h (struct target_ops): New fields
10957 prepare_to_access_memory and unprepare_to_access_memory.
10958 (prepare_to_access_memory, unprepare_to_access_memory): New.
10959 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10960 prepare_to_access_memory/prepare_to_access_memory.
10961 * nto-low.c (nto_target_ops): Adjust.
10962 * spu-low.c (spu_target_ops): Adjust.
10963 * win32-low.c (win32_target_ops): Adjust.
10964
fd467969
PA
109652010-08-26 Pedro Alves <pedro@codesourcery.com>
10966
10967 * Makefile.in (WARN_CFLAGS): Get it from configure.
10968 (WERROR_CFLAGS): New.
10969 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10970 * configure.ac: Introduce --enable-werror, which adds -Werror to
10971 the compiler command line. Enabled by default. Disable with
10972 --disable-werror. Add -Wdeclaration-after-statement
10973 Wpointer-arith and -Wformat-nonliteral to warning flags.
10974 * configure: Regenerate.
10975
331e2f5f
PA
109762010-08-26 Pedro Alves <pedro@codesourcery.com>
10977
10978 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10979
e581f2b4
PA
109802010-08-26 Pedro Alves <pedro@codesourcery.com>
10981
10982 * gdbreplay.c (remote_error): New.
10983 (gdbchar): New.
10984 (expect): Use gdbchar. Check for error reading from GDB.
10985 Clarify sync error output.
10986 (play): Check for errors writing to GDB.
10987 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10988 * remote-utils.c (getpkt): Check for errors writing to the remote
10989 descriptor.
10990
3c11dd79
PA
109912010-08-25 Pedro Alves <pedro@codesourcery.com>
10992
10993 * linux-low.c (linux_wait_1): Move non-debugging code out of
10994 `debug_threads' control.
10995
d20a8ad9
PA
109962010-08-25 Pedro Alves <pedro@codesourcery.com>
10997
10998 * linux-low.c (linux_wait_1): Don't set last_status here.
10999 * server.c (push_event, queue_stop_reply_callback): Assert we're
11000 not pushing a TARGET_WAITKIND_IGNORE event.
11001 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11002 (myresume, handle_target_event): Set the thread's last_resume_kind
11003 and last_status from the target returned status.
11004
964e4306
PA
110052010-08-25 Pedro Alves <pedro@codesourcery.com>
11006
11007 PR threads/10729
11008
11009 * linux-x86-low.c (update_debug_registers_callback): New.
11010 (i386_dr_low_set_addr): Use it.
11011 (i386_dr_low_get_addr): New.
11012 (i386_dr_low_set_control): Use update_debug_registers_callback.
11013 (i386_dr_low_get_control): New.
11014 (i386_dr_low_get_status): Adjust.
11015 * linux-low.c (linux_stop_lwp): New.
11016 * linux-low.h (linux_stop_lwp): Declare.
11017
11018 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11019 argument instead of a i386_debug_reg_state.
11020 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11021 a i386_debug_reg_state.
11022 (i386_insert_aligned_watchpoint): Adjust.
11023 (i386_remove_aligned_watchpoint): Adjust.
11024 (i386_low_stopped_data_address): Read the debug registers from the
11025 inferior instead of from the mirrors.
11026 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11027 (i386_dr_low_get_addr): Declare.
11028 (i386_dr_low_get_control): Declare.
11029 (i386_dr_low_get_status): Change prototype.
11030
11031 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11032 (i386_dr_low_get_addr): New.
11033 (i386_dr_low_get_control): New.
11034 (i386_dr_low_get_status): Adjust prototype. Return
11035 dr_status_mirror.
11036 (i386_initial_stuff): Clear dr_status_mirror and
11037 dr_control_mirror.
11038 (i386_get_thread_context): Adjust.
11039 (i386_set_thread_context): Adjust.
11040 (i386_thread_added): Adjust.
11041
5f21a75b
PA
110422010-08-24 Pedro Alves <pedro@codesourcery.com>
11043
11044 * linux-low.h (linux_thread_area): Delete declaration.
11045
3e4c1235
TS
110462010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11047
11048 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11049 after its termination.
11050
1971b033
PA
110512010-08-09 Pedro Alves <pedro@codesourcery.com>
11052
11053 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11054 (gdb_wants_all_stopped): Delete.
11055 (linux_wait_1): Don't call them.
11056 * server.c (handle_v_cont): Tag all threads as want-stopped.
11057 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11058 stopped as "client-wants-stopped".
11059
310444ac
PA
110602010-07-31 Pedro Alves <pedro@codesourcery.com>
11061
11062 * Makefile.in (signals_h): New.
11063 (server_h): Depend on it.
11064 (server.o): Don't depend on $(signals_def).
11065 (signals.o): Depend on $(signals_def).
11066
a19cae16
JK
110672010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11068
11069 * Makefile.in (signals_def): New.
11070 (server_h): Append include/gdb/signals.h and signals_def.
11071 (server.o): Append signals_def.
11072
30d50328
JK
110732010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11074
11075 * server.c (handle_target_event): Use target_signal_to_host for
11076 resume_info.sig initialization.
11077 * target.h (struct thread_resume) <sig>: New comment.
11078
5c3216e2
OS
110792010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11080
c6f46ca0
OS
11081 * server.c (handle_query): strcpy() the returned string from paddress()
11082 instead of sprintf().
5c3216e2
OS
11083 * utils.c (paddress): Return phex_nz().
11084
6bd31874
JB
110852010-07-07 Joel Brobecker <brobecker@adacore.com>
11086
11087 * server.c (handle_v_cont): Call mourn_inferior if process
11088 just exited.
11089 (myresume): Likewise.
11090
0fb4aa4b
PA
110912010-07-01 Pedro Alves <pedro@codesourcery.com>
11092
11093 Static tracepoints, and integration with UST.
11094
11095 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11096 * mem-break.c (uninsert_all_breakpoints)
11097 (reinsert_all_breakpoints): New.
11098 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11099 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11100 (gdb_agent_ust_loaded, helper_thread_id)
11101 (gdb_agent_helper_thread_id): New macros.
11102 (struct ipa_sym_addresses): Add addr_ust_loaded,
11103 addr_helper_thread_id, addr_cmd_buf.
11104 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11105 (in_process_agent_loaded_ust): New.
11106 (write_e_ust_not_loaded): New.
11107 (maybe_write_ipa_ust_not_loaded): New.
11108 (struct collect_static_trace_data_action): New.
11109 (enum tracepoint_type) <static_tracepoint>: New.
11110 (struct tracepoint) <handle>: Mention static tracepoints.
11111 (struct static_tracepoint_ctx): New.
11112 (CMD_BUF_SIZE): New.
11113 (add_tracepoint_action): Handle static tracepoint actions.
11114 (unprobe_marker_at): New.
11115 (clear_installed_tracepoints): Handle static tracepoints.
11116 (cmd_qtdp): Handle static tracepoints.
11117 (probe_marker_at): New.
11118 (cmd_qtstart): Handle static tracepoints.
11119 (response_tracepoint): Handle static tracepoints.
11120 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11121 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11122 (get_context_regcache): Handle static tracepoints.
11123 (do_action_at_tracepoint): Handle static tracepoint actions.
11124 (traceframe_find_block_type): Handle static trace data blocks.
11125 (traceframe_read_sdata): New.
11126 (download_tracepoints): Download static tracepoint actions.
11127 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11128 (GDB_PROBE_NAME): New.
11129 (ust_ops): New.
11130 (GET_UST_SYM): New.
11131 (USTF): New.
11132 (dlsym_ust): New.
11133 (ust_marker_to_static_tracepoint): New.
11134 (gdb_probe): New.
11135 (collect_ust_data_at_tracepoint): New.
11136 (gdb_ust_probe): New.
11137 (UNIX_PATH_MAX, SOCK_DIR): New.
11138 (gdb_ust_connect_sync_socket): New.
11139 (resume_thread, stop_thread): New.
11140 (run_inferior_command): New.
11141 (init_named_socket): New.
11142 (gdb_ust_socket_init): New.
11143 (cstr_to_hexstr): New.
11144 (next_st): New.
11145 (first_marker, next_marker): New.
11146 (response_ust_marker): New.
11147 (cmd_qtfstm, cmd_qtsstm): New.
11148 (unprobe_marker_at, probe_marker_at): New.
11149 (cmd_qtstmat, gdb_ust_thread): New.
11150 (gdb_ust_init): New.
11151 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11152 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11153 (ST_REGENTRY): New.
11154 (x86_64_st_collect_regmap): New.
11155 (X86_64_NUM_ST_COLLECT_GREGS): New.
11156 (AMD64_RIP_REGNUM): New.
11157 (supply_static_tracepoint_registers): New.
11158 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11159 (ST_REGENTRY): New.
11160 (i386_st_collect_regmap): New.
11161 (i386_NUM_ST_COLLECT_GREGS): New.
11162 (supply_static_tracepoint_registers): New.
11163 * server.c (handle_query): Handle qXfer:statictrace:read.
11164 <qSupported>: Report support for StaticTracepoints, and
11165 qXfer:statictrace:read features.
11166 * server.h (traceframe_read_sdata)
11167 (supply_static_tracepoint_registers): Declare.
11168 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11169 (unpack_varlen_hex): Include in IPA build.
11170 * Makefile.in (ustlibs, ustinc): New.
11171 (IPA_OBJS): Add remote-utils-ipa.o.
11172 ($(IPA_LIB)): Link -ldl and -lpthread.
11173 (UST_CFLAGS): New.
11174 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11175 * config.in, configure: Regenerate.
11176
9e4344e5
PA
111772010-06-20 Ian Lance Taylor <iant@google.com>
11178 Pedro Alves <pedro@codesourcery.com>
11179
11180 * linux-x86-low.c (always_true): Delete.
11181 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11182 trying to fool the compiler with always_true.
11183
c6beb2cb
PA
111842010-06-20 Pedro Alves <pedro@codesourcery.com>
11185
11186 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11187 conditions in gdbserver.
11188
d2ed6730
UW
111892010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11190
11191 * spu-low.c (spu_read_memory): Wrap around local store limit.
11192 (spu_write_memory): Likewise.
11193
4e29fb54
PA
111942010-06-15 Pedro Alves <pedro@codesourcery.com>
11195
11196 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11197 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11198 LONGEST uses.
11199 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11200 uses.
11201 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11202 uses with LONGEST uses.
11203
6a271cae
PA
112042010-06-14 Stan Shebs <stan@codesourcery.com>
11205 Pedro Alves <pedro@codesourcery.com>
11206
11207 Bytecode compiler.
11208
11209 * linux-x86-low.c: Include limits.h.
11210 (add_insns): New.
11211 (always_true): New.
11212 (EMIT_ASM): New.
11213 (EMIT_ASM32): New.
11214 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11215 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11216 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11217 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11218 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11219 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11220 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11221 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11222 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11223 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11224 (amd64_emit_void_call_2): New.
11225 (amd64_emit_ops): New.
11226 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11227 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11228 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11229 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11230 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11231 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11232 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11233 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11234 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11235 (i386_emit_stack_adjust, i386_emit_int_call_1)
11236 (i386_emit_void_call_2): New.
11237 (i386_emit_ops): New.
11238 (x86_emit_ops): New.
11239 (the_low_target): Install x86_emit_ops.
11240 * server.h (struct emit_ops): New.
11241 (get_raw_reg_func_addr): Declare.
11242 (current_insn_ptr, emit_error): Declare.
11243 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11244 (set_trace_state_variable_value): New defines.
11245 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11246 addr_get_trace_state_variable_value and
11247 addr_set_trace_state_variable_value.
11248 (symbol_list): New fields for get_raw_reg,
11249 get_trace_state_variable_value and set_trace_state_variable_value.
11250 (condfn): New typedef.
11251 (struct tracepoint): New field `compiled_cond'.
11252 (do_action_at_tracepoint): Clear compiled_cond.
11253 (get_trace_state_variable_value, set_trace_state_variable_value):
11254 Export in the IPA.
11255 (condition_true_at_tracepoint): If there's a compiled condition,
11256 run that.
11257 (current_insn_ptr, emit_error): New globals.
11258 (struct bytecode_address): New.
11259 (get_raw_reg_func_addr): New.
11260 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11261 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11262 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11263 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11264 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11265 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11266 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11267 (compile_tracepoint_condition, compile_bytecodes): New.
11268 * target.h (emit_ops): Forward declare.
11269 (struct target_ops): New field emit_ops.
11270 (target_emit_ops): New.
11271 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11272 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11273 * linux-low.c (linux_emit_ops): New.
11274 (linux_target_ops): Install it.
11275 * linux-low.h (struct linux_target_ops): New field emit_ops.
11276
92b72907
UW
112772010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11278
11279 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11280 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11281
fa593d66
PA
112822010-06-01 Pedro Alves <pedro@codesourcery.com>
11283 Stan Shebs <stan@codesourcery.com>
11284
11285 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11286 (all): Depend on $(extra_libraries).
11287 (install-only): Install the IPA.
11288 (IPA_OBJS, IPA_LIB): New.
11289 (clean): Remove the IPA lib.
11290 (IPAGENT_CFLAGS): New.
11291 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11292 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11293 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11294 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11295 * configure.ac: Check for atomic builtins support in the compiler.
11296 (IPA_DEPFILES, extra_libraries): Define.
11297 * configure.srv (ipa_obj): Add description.
11298 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11299 (i[34567]86-*-linux*): Set ipa_obj.
11300 (x86_64-*-linux*): Set ipa_obj.
11301 * linux-low.c (stabilizing_threads): New.
11302 (supports_fast_tracepoints): New.
11303 (linux_detach): Stabilize threads before detaching.
11304 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11305 the lwp is either not stabilizing, or is moving out of a jump pad.
11306 (linux_fast_tracepoint_collecting): New.
11307 (maybe_move_out_of_jump_pad): New.
11308 (enqueue_one_deferred_signal): New.
11309 (dequeue_one_deferred_signal): New.
11310 (linux_wait_for_event_1): If moving out of a jump pad, defer
11311 pending signals to later.
11312 (linux_stabilize_threads): New.
11313 (linux_wait_1): Check if threads need moving out of jump pads, and
11314 do it if so.
11315 (stuck_in_jump_pad_callback): New.
11316 (move_out_of_jump_pad_callback): New.
11317 (lwp_running): New.
11318 (linux_resume_one_lwp): Handle moving out of jump pads.
11319 (linux_set_resume_request): Dequeue deferred signals.
11320 (need_step_over_p): Also step over fast tracepoint jumps.
11321 (start_step_over): Also uninsert fast tracepoint jumps.
11322 (finish_step_over): Also reinsert fast tracepoint jumps.
11323 (linux_install_fast_tracepoint_jump): New.
11324 (linux_target_ops): Install linux_stabilize_threads and
11325 linux_install_fast_tracepoint_jump_pad.
11326 * linux-low.h (linux_target_ops) <get_thread_area,
11327 install_fast_tracepoint_jump_pad>: New fields.
11328 (struct lwp_info) <collecting_fast_tracepoint,
11329 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11330 (linux_get_thread_area): Declare.
11331 * linux-x86-low.c (jump_insn): New.
11332 (x86_get_thread_area): New.
11333 (append_insns): New.
11334 (push_opcode): New.
11335 (amd64_install_fast_tracepoint_jump_pad): New.
11336 (i386_install_fast_tracepoint_jump_pad): New.
11337 (x86_install_fast_tracepoint_jump_pad): New.
11338 (the_low_target): Install x86_get_thread_area and
11339 x86_install_fast_tracepoint_jump_pad.
11340 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11341 (struct fast_tracepoint_jump): New.
11342 (fast_tracepoint_jump_insn): New.
11343 (fast_tracepoint_jump_shadow): New.
11344 (find_fast_tracepoint_jump_at): New.
11345 (fast_tracepoint_jump_here): New.
11346 (delete_fast_tracepoint_jump): New.
11347 (set_fast_tracepoint_jump): New.
11348 (uninsert_fast_tracepoint_jumps_at): New.
11349 (reinsert_fast_tracepoint_jumps_at): New.
11350 (set_breakpoint_at): Use write_inferior_memory.
11351 (uninsert_raw_breakpoint): Use write_inferior_memory.
11352 (check_mem_read): Mask out fast tracepoint jumps.
11353 (check_mem_write): Mask out fast tracepoint jumps.
11354 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11355 (set_fast_tracepoint_jump): Declare.
11356 (delete_fast_tracepoint_jump)
11357 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11358 (reinsert_fast_tracepoint_jumps_at): Declare.
11359 * regcache.c: Don't compile many functions when building the
11360 in-process agent library.
11361 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11362 the register buffer in the heap.
11363 (free_register_cache): If the register buffer isn't owned by the
11364 regcache, don't free it.
11365 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11366 pre-existing register caches.
11367 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11368 type.
11369 (convert_ascii_to_int): : Constify `from' parameter type.
11370 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11371 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11372 the needed buffer in-place.
11373 (relocate_instruction): New.
11374 * server.c (handle_query) <qSymbols>: If the target supports
11375 tracepoints, give it a chance of looking up symbols. Report
11376 support for fast tracepoints.
11377 (handle_status): Stabilize threads.
11378 (process_serial_event): Adjust.
11379 * server.h (struct fast_tracepoint_jump): Forward declare.
11380 (struct process_info) <fast_tracepoint_jumps>: New field.
11381 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11382 (decode_X_packet, decode_M_packet): Adjust.
11383 (relocate_instruction): Declare.
11384 (in_process_agent_loaded): Declare.
11385 (tracepoint_look_up_symbols): Declare.
11386 (struct fast_tpoint_collect_status): Declare.
11387 (fast_tracepoint_collecting): Declare.
11388 (force_unlock_trace_buffer): Declare.
11389 (handle_tracepoint_bkpts): Declare.
11390 (initialize_low_tracepoint)
11391 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11392 * target.h (struct target_ops) <stabilize_threads,
11393 install_fast_tracepoint_jump_pad>: New fields.
11394 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11395 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11396 [HAVE_STDINT_H]: Include stdint.h.
11397 (trace_debug_1): Rename to ...
11398 (trace_vdebug): ... this.
11399 (trace_debug): Rename to ...
11400 (trace_debug_1): ... this. Add `level' parameter.
11401 (trace_debug): New.
11402 (ATTR_USED, ATTR_NOINLINE): New.
11403 (IP_AGENT_EXPORT): New.
11404 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11405 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11406 (about_to_request_buffer_space, trace_buffer_is_full)
11407 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11408 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11409 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11410 (traceframe_write_count, traceframes_created)
11411 (trace_state_variables)
11412 New renaming defines.
11413 (struct ipa_sym_addresses): New.
11414 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11415 (symbol_list): New.
11416 (ipa_sym_addrs): New.
11417 (all_tracepoint_symbols_looked_up): New.
11418 (in_process_agent_loaded): New.
11419 (write_e_ipa_not_loaded): New.
11420 (maybe_write_ipa_not_loaded): New.
11421 (tracepoint_look_up_symbols): New.
11422 (debug_threads) [IN_PROCESS_AGENT]: New.
11423 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11424 (UNKNOWN_SIDE_EFFECTS): New.
11425 (stop_tracing): New.
11426 (flush_trace_buffer): New.
11427 (stop_tracing_bkpt): New.
11428 (flush_trace_buffer_bkpt): New.
11429 (read_inferior_integer): New.
11430 (read_inferior_uinteger): New.
11431 (read_inferior_data_pointer): New.
11432 (write_inferior_data_pointer): New.
11433 (write_inferior_integer): New.
11434 (write_inferior_uinteger): New.
11435 (struct collect_static_trace_data_action): Delete.
11436 (enum tracepoint_type): New.
11437 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11438 <actions_str, step_actions, step_actions_str>: Only include in
11439 GDBserver.
fa593d66
PA
11440 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11441 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11442 (tracepoints): Use IP_AGENT_EXPORT.
11443 (last_tracepoint): Don't include in the IPA.
11444 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11445 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11446 (alloced_trace_state_variables): New.
11447 (trace_state_variables): Use IP_AGENT_EXPORT.
11448 (traceframe_t): Delete unused variable.
11449 (circular_trace_buffer): Don't include in the IPA.
11450 (trace_buffer_start): Delete.
11451 (struct trace_buffer_control): New.
11452 (trace_buffer_free): Delete.
11453 (struct ipa_trace_buffer_control): New.
11454 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11455 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11456 New.
11457 (trace_buffer_ctrl): New.
11458 (TRACE_BUFFER_CTRL_CURR): New.
11459 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11460 Reimplement as macros.
11461 (trace_buffer_wrap): Delete.
11462 (traceframe_write_count, traceframe_read_count)
11463 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11464 (struct tracepoint_hit_ctx) <type>: New field.
11465 (struct fast_tracepoint_ctx): New.
11466 (memory_barrier): New.
11467 (cmpxchg): New.
11468 (record_tracepoint_error): Update atomically in the IPA.
11469 (clear_inferior_trace_buffer): New.
11470 (about_to_request_buffer_space): New.
11471 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11472 updating the same buffer.
11473 (add_tracepoint): Default the tracepoint's type to trap
11474 tracepoint, and orig_size to -1.
11475 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11476 internal variables.
11477 (create_trace_state_variable): New parameter `gdb'. Handle it.
11478 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11479 (cmd_qtdp): Handle fast tracepoints.
11480 (cmd_qtdv): Adjust.
11481 (max_jump_pad_size): New.
11482 (gdb_jump_pad_head): New.
11483 (get_jump_space_head): New.
11484 (claim_jump_space): New.
11485 (sort_tracepoints): New.
11486 (MAX_JUMP_SIZE): New.
11487 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11488 IPA.
11489 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11490 support. Upload fast traceframes, and delete internal IPA
11491 breakpoints.
11492 (stop_tracing_handler): New.
11493 (flush_trace_buffer_handler): New.
11494 (cmd_qtstop): Upload fast tracepoints.
11495 (response_tracepoint): Handle fast tracepoints.
11496 (tracepoint_finished_step): Upload fast traceframes. Set the
11497 tracepoint hit context's tracepoint type.
11498 (handle_tracepoint_bkpts): New.
11499 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11500 type. Add comment about fast tracepoints.
11501 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11502 non-existing action_str field.
11503 (get_context_regcache): Handle fast tracepoints.
11504 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11505 to the regcache.
11506 (fast_tracepoint_from_jump_pad_address): New.
11507 (fast_tracepoint_from_ipa_tpoint_address): New.
11508 (collecting_t): New.
11509 (force_unlock_trace_buffer): New.
11510 (fast_tracepoint_collecting): New.
11511 (collecting): New.
11512 (gdb_collect): New.
11513 (write_inferior_data_ptr): New.
11514 (target_tp_heap): New.
11515 (target_malloc): New.
11516 (download_agent_expr): New.
11517 (UALIGN): New.
11518 (download_tracepoints): New.
11519 (download_trace_state_variables): New.
11520 (upload_fast_traceframes): New.
11521 (IPA_FIRST_TRACEFRAME): New.
11522 (IPA_NEXT_TRACEFRAME_1): New.
11523 (IPA_NEXT_TRACEFRAME): New.
11524 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11525 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11526 (gdb_jump_pad_buffer_end): New.
11527 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11528 (initialize_tracepoint): Adjust.
11529 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11530 buffer. Initialize the low module.
11531 * utils.c (PREFIX, TOOLNAME): New.
11532 (malloc_failure): Use PREFIX.
11533 (error): In the IPA, an error causes an exit.
11534 (fatal, warning): Use PREFIX.
11535 (internal_error): Use TOOLNAME.
11536 (NUMCELLS): Increase to 10.
11537 * configure, config.in: Regenerate.
11538
d149dd1d
PA
115392010-06-01 Pedro Alves <pedro@codesourcery.com>
11540
11541 * server.c (handle_query) <qSupported>: Do two passes over the
11542 qSupported string to avoid nesting strtok.
11543
f6528abd
JK
115442010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11545
11546 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11547 (CDEPS): New.
11548 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11549 -Wl,--dynamic-list.
11550 * configure: Regenerate.
11551 * proc-service.list: New.
11552
ca2a87a0
JK
115532010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11554
11555 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11556 New comment.
11557
363a6e9f
OS
115582010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11559
11560 * gdbreplay.c (remote_open): Check error return from socket() call by
11561 its equality to -1 not by it being negative.
11562 * remote-utils.c (remote_open): Likewise.
11563
d23b6cb1
PA
115642010-05-23 Pedro Alves <pedro@codesourcery.com>
11565
11566 * config.h: Regenerate.
11567
28d3cf85
MK
115682010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11569
11570 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11571 doesn't provide PTRACE_GET_THREAD_AREA.
11572
fea36a59
MK
115732010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11574
11575 * linux-m68k-low.c: Include <asm/ptrace.h>
11576 (ps_get_thread_area): Implement.
11577
24b066ba
DE
115782010-05-03 Doug Evans <dje@google.com>
11579
11580 * event-loop.c (struct callback_event): New struct.
11581 (callback_list): New global.
11582 (append_callback_event, delete_callback_event): New functions.
11583 (process_callback): New function.
11584 (start_event_loop): Call it.
11585 * remote-utils.c (NOT_SCHEDULED): Define.
11586 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11587 moved out of readchar.
11588 (readchar): Rewrite. Call reschedule before returning.
11589 (reset_readchar): New function.
11590 (remote_close): Call it.
11591 (process_remaining, reschedule): New functions.
11592 * server.h (callback_handler_func): New typedef.
11593 (append_callback_event, delete_callback_event): Declare.
11594
9836d6ea
PA
115952010-05-03 Pedro Alves <pedro@codesourcery.com>
11596
11597 * proc-service.c (ps_pglobal_lookup): Use
11598 thread_db_look_up_one_symbol.
11599 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11600 parameter. Use it instead of all_symbols_looked_up.
11601 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11602 field.
11603 (all_symbols_looked_up): Don't declare.
11604 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11605 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11606 field.
11607 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11608 Set all_symbols_looked_up here.
11609 (thread_db_look_up_one_symbol): New.
11610 (thread_db_get_tls_address): Adjust.
11611 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11612 thread_db object on the heap, and tentatively set it in the
11613 process structure.
11614 (thread_db_init): Don't set all_symbols_looked_up here.
11615 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11616
7984d532
PA
116172010-05-03 Pedro Alves <pedro@codesourcery.com>
11618
11619 * linux-low.c (linux_kill, linux_detach): Adjust.
11620 (status_pending_p_callback): Remove redundant statement. Check
11621 for !TARGET_WAITIKIND_IGNORE, instead of
11622 TARGET_WAITKIND_STOPPED.
11623 (handle_tracepoints): Make sure LWP is locked. Adjust.
11624 (linux_wait_for_event_1): Adjust.
11625 (linux_cancel_breakpoints): New.
11626 (unsuspend_one_lwp): New.
11627 (unsuspend_all_lwps): New.
11628 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11629 (send_sigstop_callback): Change return type to int, add new
11630 `except' parameter and handle it.
11631 (suspend_and_send_sigstop_callback): New.
11632 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11633 pass them down. If SUSPEND, also increment the lwp's suspend
11634 count.
11635 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11636 (need_step_over_p): Don't consider suspended LWPs.
11637 (start_step_over): Adjust.
11638 (proceed_one_lwp): Change return type to int, add new `except'
11639 parameter and handle it.
11640 (unsuspend_and_proceed_one_lwp): New.
11641 (proceed_all_lwps): Use find_inferior instead of
11642 for_each_inferior.
11643 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11644 also decrement the suspend count of LWPs. Pass `except' down,
11645 instead of hacking its suspend count.
11646 (linux_pause_all): Add `freeze' parameter. Adjust.
11647 (linux_unpause_all): New.
11648 (linux_target_ops): Install linux_unpause_all.
11649 * server.c (handle_status): Adjust.
11650 * target.h (struct target_ops): New fields `unpause_all' and
11651 `cancel_breakpoints'. Add new parameter to `pause_all'.
11652 (pause_all): Add new `freeze' parameter.
11653 (unpause_all): New.
11654 (cancel_breakpoints): New.
11655 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11656 cancel breakpoints.
11657 (cmd_qtstart): Pause threads.
11658 (stop_tracing): Pause threads, and cancel breakpoints.
11659 * win32-low.c (win32_target_ops): Adjust.
11660
e471f25b
PA
116612010-05-03 Pedro Alves <pedro@codesourcery.com>
11662
11663 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11664 the inferior right away from here...
11665 (linux_wait_1): ... to here, and adjust to check the thread's
11666 last_resume_kind instead of the lwp's step or stop_expected flags.
11667
1915ef4f
PA
116682010-05-02 Pedro Alves <pedro@codesourcery.com>
11669
11670 * README: Use consistent `GDB' and `GDBserver' spellings.
11671
f9e39928
PA
116722010-05-02 Pedro Alves <pedro@codesourcery.com>
11673
11674 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11675 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11676 (linux_detach_one_lwp): Assume the lwp is stopped.
11677 (any_thread_of): Delete.
11678 (linux_detach): Stop all lwps here. Don't blindly delete all
11679 breakpoints.
11680 (delete_lwp_callback): New.
11681 (linux_mourn): Delete all lwps of the process that is gone.
11682 (linux_wait_1): Don't delete the last lwp of the process here.
11683 * mem-break.h (mark_breakpoints_out): Declare.
11684 * mem-break.c (mark_breakpoints_out): New.
11685 (free_all_breakpoints): Use it.
11686 * server.c (handle_target_event): If the process is gone, mark
11687 breakpoints out.
11688 * thread-db.c (struct thread_db) <create_bp>: New field.
11689 (thread_db_enable_reporting): Fix prototype. Store a thread event
11690 breakpoint reference in the thread_db struct.
11691 (thread_db_load_search): Clear the thread_db object.
11692 (try_thread_db_load_1): Ditto.
11693 (switch_to_process): New.
11694 (disable_thread_event_reporting): Use it.
11695 (remove_thread_event_breakpoints): New.
11696 (thread_db_detach, thread_db_mourn): Use it.
11697
1e7fc18c
PA
116982010-05-01 Pedro Alves <pedro@codesourcery.com>
11699
11700 * linux-low.c (linux_enable_event_reporting): New.
11701 (linux_wait_for_event_1, handle_extended_wait): Use it.
11702
02fc4de7
PA
117032010-04-30 Pedro Alves <pedro@codesourcery.com>
11704
11705 * linux-low.c (linux_kill_one_lwp, linux_kill)
11706 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11707 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11708 SIGSTOP even if the LWP is stopped.
11709 (send_sigstop_callback): New.
11710 (stop_all_lwps): Use send_sigstop_callback instead.
11711 (linux_resume_one_thread): Adjust.
11712 (proceed_one_lwp): Still proceed an LWP that the client has
11713 requested to stop, if we haven't reported it as stopped yet. Make
11714 sure that LWPs the client want stopped, have a pending SIGSTOP.
11715
bc3b5632
DE
117162010-04-26 Doug Evans <dje@google.com>
11717
ae1ada35
DE
11718 * server.c (handle_general_set): Make static.
11719
bc3b5632
DE
11720 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11721 Print received char after testing for error/eof instead of before.
11722 (input_interrupt): Tweak comment.
11723
65730243
DE
117242010-04-23 Doug Evans <dje@google.com>
11725
11726 * server.c (start_inferior): Print inferior argv if --debug.
11727
a8ae7dc0
AR
117282010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11729
11730 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11731 * nto-x86-low.c: Include server.h
11732
1c07cc19
PM
117332010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11734
11735 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11736 be consistent with other sources of this directory.
11737 (init_registers_amd64): Correct name of source file of this function
11738 in the comment.
11739
e0a61e09
PM
117402010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11741
11742 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11743 64-bit executables.
11744
54709339
PM
117452010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11746
11747 * win32-i386-low.c: Add 64-bit support.
11748 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11749 (init_registers_amd64): Declare.
11750 (mappings): Add 64-bit version of array.
11751 (init_windows_x86): New function.
11752 (the_low_target): Change init_arch field to init_windows_x86.
11753
e8f0053d
PM
117542010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11755
11756 * win32-low.c: Adapt to support also 64-bit architecture.
11757 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11758 (get_image_name): Use SIZE_T type for local variable `done'.
11759 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11760 (toolhelp_get_dll_name): Idem.
11761 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11762 Use uintptr_t typecast to avoid warning.
11763 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11764 (handle_exception): Use phex_nz to avoid warning.
11765 (win32_wait): Remove unused local variable `process'.
11766
c481e77e
PM
117672010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11768
11769 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11770 `amd64-avx.o'.
11771
12ea4b69
PM
117722010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11773
11774 * configure.ac: Use `ws2_32' library for srv_mingw.
11775 * configure: Regenerate.
11776 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11777 * remote-utils.c: Likewise.
11778
f6d1620c
L
117792010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11780
11781 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11782 if __x86_64__ is defined.
11783
8e642873
PM
117842010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11785
11786 * configure: Regenerate.
11787
711e434b
PM
117882010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11789
11790 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11791 * target.h (target_ops): New get_tib_address field.
11792 * win32-low.h (win32_thread_info): Add thread_local_base field.
11793 * win32-low.c (child_add_thread): Add tlb argument.
11794 Set thread_local_base field to TLB.
11795 (get_child_debug_event): Adapt to child_add_thread change.
11796 (win32_get_tib_address): New function.
11797 (win32_target_ops): Set get_tib_address field to
11798 win32_get_tib_address.
11799 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11800
505106cd
PA
118012010-04-12 Pedro Alves <pedro@codesourcery.com>
11802
505106cd
PA
11803 * linux-low.c (linux_mourn): Also remove the process.
11804 * server.c (handle_target_event): Don't remove the process here.
11805 * nto-low.c (nto_mourn): New.
11806 (nto_target_ops): Install it.
11807 * spu-low.c (spu_mourn): New.
11808 (spu_target_ops): Install it.
11809 * win32-low.c (win32_mourn): New.
11810 (win32_target_ops): Install it.
11811
e8470a06
PA
118122010-04-12 Pedro Alves <pedro@codesourcery.com>
11813
11814 * server.h (buffer_xml_printf): Remove redundant `;'.
11815
45ba0d02
PA
118162010-04-12 Pedro Alves <pedro@codesourcery.com>
11817
11818 * regcache.c (set_register_cache): Invalidate regcaches before
11819 changing the register cache layout.
11820 (regcache_invalidate_one): Allow a NULL regcache.
11821 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11822 regcaches before changing the register cache layout or the target
11823 regsets.
11824
59e04013
L
118252010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11826
11827 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11828 variable warning on Linux/x86-64.
11829
8336d594
PA
118302010-04-11 Pedro Alves <pedro@codesourcery.com>
11831
11832 GDBserver disconnected tracing support.
11833
11834 * linux-low.c (linux_remove_process): Delete.
11835 (add_lwp): Don't set last_resume_kind here.
11836 (linux_kill): Use `mourn'.
11837 (linux_detach): Use `thread_db_detach', and `mourn'.
11838 (linux_mourn): New.
11839 (linux_attach_lwp_1): Adjust comment.
11840 (linux_attach): last_resume_kind moved the thread_info; adjust.
11841 (status_pending_p_callback): Adjust.
11842 (linux_wait_for_event_1): Adjust.
11843 (count_events_callback, select_singlestep_lwp_callback)
11844 (select_event_lwp_callback, cancel_breakpoints_callback)
11845 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11846 (proceed_one_lwp): Adjust.
11847 (linux_async): Add debug output.
11848 (linux_thread_stopped): New.
11849 (linux_pause_all): New.
11850 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11851 linux_pause_all.
11852 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11853 (thread_db_free): Delete declaration.
11854 (thread_db_detach, thread_db_mourn): Declare.
11855 * thread-db.c (thread_db_init): Use thread_db_mourn.
11856 (thread_db_free): Delete, split in two.
11857 (disable_thread_event_reporting): New.
11858 (thread_db_detach): New.
11859 (thread_db_mourn): New.
11860
11861 * server.h (struct thread_info) <last_resume_kind>: New field.
11862 <attached>: Add comment.
11863 <gdb_detached>: New field.
11864 (handler_func): Change return type to int.
11865 (handle_serial_event, handle_target_event): Ditto.
11866 (gdb_connected): Declare.
11867 (tracing): Delete.
11868 (disconnected_tracing): Declare.
11869 (stop_tracing): Declare.
11870
11871 * server.c (handle_query) <qSupported>: Report support for
11872 disconnected tracing.
11873 (queue_stop_reply_callback): Account for running threads.
11874 (gdb_wants_thread_stopped): New.
11875 (gdb_wants_all_threads_stopped): New.
11876 (gdb_reattached_process): New.
11877 (handle_status): Clear the `gdb_detached' flag of all processes.
11878 In all-stop, stop all threads.
11879 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11880 (process_serial_event): If the remote connection breaks, or if an
11881 exit was forced with "monitor exit", force an event loop exit.
11882 Handle disconnected tracing on detach.
11883 (handle_serial_event): Adjust.
11884 (handle_target_event): If GDB isn't connected, forward events back
11885 to the inferior, unless the last process exited, in which case,
11886 exit gdbserver. Adjust interface.
11887
11888 * remote-utils.c (remote_open): Don't block in accept. Instead
11889 register an event loop source on the listen socket file
11890 descriptor. Refactor bits into ...
11891 (listen_desc): ... this new global.
11892 (gdb_connected): ... this new function.
11893 (enable_async_notification): ... this new function.
11894 (handle_accept_event): ... this new function.
11895 (remote_close): Clear remote_desc.
11896
11897 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11898
11899 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11900 New fields.
11901 (mourn_inferior): Define.
11902 (target_process_qsupported): Avoid the dangling else problem.
11903 (thread_stopped): Define.
11904 (pause_all): Define.
11905 (target_waitstatus_to_string): Declare.
11906 * target.c (target_waitstatus_to_string): New.
11907
11908 * tracepoint.c (tracing): Make extern.
11909 (disconnected_tracing): New.
11910 (stop_tracing): Make extern. Handle tracing stops due to GDB
11911 disconnecting.
11912 (cmd_qtdisconnected): New.
11913 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11914 (handle_tracepoint_general_set): Handle QTDisconnected.
11915
11916 * event-loop.c (event_handler_func): Change return type to int.
11917 (process_event): Bail out if the event handler wants the event
11918 loop to stop.
11919 (handle_file_event): Ditto.
11920 (start_event_loop): Bail out if the event handler wants the event
11921 loop to stop.
11922
11923 * nto-low.c (nto_target_ops): Adjust.
11924 * spu-low.c (spu_wait): Don't remove the process here.
11925 (spu_target_ops): Adjust.
11926 * win32-low.c (win32_wait): Don't remove the process here.
11927 (win32_target_ops): Adjust.
11928
5d267c4c
PA
119292010-04-11 Pedro Alves <pedro@codesourcery.com>
11930
11931 * regcache.c (realloc_register_cache): Invalidate inferior's
11932 regcache before recreating it.
11933
623ccd72
PA
119342010-04-09 Pedro Alves <pedro@codesourcery.com>
11935
11936 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11937
219f2f23
PA
119382010-04-09 Stan Shebs <stan@codesourcery.com>
11939 Pedro Alves <pedro@codesourcery.com>
11940
11941 * server.h (LONGEST): New.
11942 (struct thread_info) <while_stepping>: New field.
11943 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11944 Declare.
11945 (initialize_tracepoint, handle_tracepoint_general_set)
11946 (handle_tracepoint_query, tracepoint_finished_step)
11947 (tracepoint_was_hit, release_while_stepping_state_list):
11948 (current_traceframe): Declare.
11949 * server.c (handle_general_set): Handle tracepoint packets.
11950 (read_memory): New.
11951 (write_memory): New.
11952 (handle_search_memory_1): Use read_memory.
11953 (handle_query): Report support for conditional tracepoints, trace
11954 state variables, and tracepoint sources. Handle tracepoint
11955 queries.
11956 (main): Initialize the tracepoints module.
11957 (process_serial_event): Handle traceframe reads/writes.
11958
11959 * linux-low.c (handle_tracepoints): New.
11960 (linux_wait_1): Call it.
11961 (linux_resume_one_lwp): Handle while-stepping.
11962 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11963 (linux_target_ops): Install them.
11964 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11965 New field.
11966 * linux-x86-low.c (x86_supports_tracepoints): New.
11967 (the_low_target). Install it.
11968
11969 * mem-break.h (delete_breakpoint): Declare.
11970 * mem-break.c (delete_breakpoint): Make external.
11971
11972 * target.h (struct target_ops): Add `supports_tracepoints',
11973 `read_pc', and `write_pc' fields.
11974 (target_supports_tracepoints): Define.
11975 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11976 (phex_nz): New.
11977
11978 * regcache.h (struct regcache) <registers_owned>: New field.
11979 (init_register_cache, regcache_cpy): Declare.
11980 (regcache_read_pc, regcache_write_pc): Declare.
11981 (register_cache_size): Declare.
11982 (supply_regblock): Declare.
11983 * regcache.c (init_register_cache): New.
11984 (new_register_cache): Use it.
11985 (regcache_cpy): New.
11986 (register_cache_size): New.
11987 (supply_regblock): New.
11988 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11989
219f2f23
PA
11990 * tracepoint.c: New.
11991
11992 * Makefile.in (OBS): Add tracepoint.o.
11993 (tracepoint.o): New rule.
11994
3a13a53b
L
119952010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11996
11997 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11998 (i386-mmx.o): New.
11999 (i386-mmx.c): Likewise.
12000 (i386-mmx-linux.o): Likewise.
12001 (i386-mmx-linux.c): Likewise.
12002
12003 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12004 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12005 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12006 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12007
12008 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12009 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12010 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12011
1570b33e
L
120122010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12013
12014 * Makefile.in (clean): Updated.
12015 (i386-avx.o): New.
12016 (i386-avx.c): Likewise.
12017 (i386-avx-linux.o): Likewise.
12018 (i386-avx-linux.c): Likewise.
12019 (amd64-avx.o): Likewise.
12020 (amd64-avx.c): Likewise.
12021 (amd64-avx-linux.o): Likewise.
12022 (amd64-avx-linux.c): Likewise.
12023
12024 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12025 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12026 (srv_amd64_regobj): Add amd64-avx.o.
12027 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12028 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12029 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12030 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12031 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12032 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12033 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12034
12035 * i387-fp.c: Include "i386-xstate.h".
12036 (i387_xsave): New.
12037 (i387_cache_to_xsave): Likewise.
12038 (i387_xsave_to_cache): Likewise.
12039 (x86_xcr0): Likewise.
12040
12041 * i387-fp.h (i387_cache_to_xsave): Likewise.
12042 (i387_xsave_to_cache): Likewise.
12043 (x86_xcr0): Likewise.
12044
12045 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12046 * linux-crisv32-low.c (target_regsets): Likewise.
12047 * linux-m68k-low.c (target_regsets): Likewise.
12048 * linux-mips-low.c (target_regsets): Likewise.
12049 * linux-ppc-low.c (target_regsets): Likewise.
12050 * linux-s390-low.c (target_regsets): Likewise.
12051 * linux-sh-low.c (target_regsets): Likewise.
12052 * linux-sparc-low.c (target_regsets): Likewise.
12053 * linux-xtensa-low.c (target_regsets): Likewise.
12054
12055 * linux-low.c: Include <sys/uio.h>.
12056 (regsets_fetch_inferior_registers): Support nt_type.
12057 (regsets_store_inferior_registers): Likewise.
12058 (linux_process_qsupported): New.
12059 (linux_target_ops): Add linux_process_qsupported.
12060
12061 * linux-low.h (regset_info): Add nt_type.
12062 (linux_target_ops): Add process_qsupported.
12063
12064 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12065 and <sys/uio.h>.
12066 (init_registers_i386_avx_linux): New.
12067 (init_registers_amd64_avx_linux): Likewise.
12068 (xmltarget_i386_linux_no_xml): Likewise.
12069 (xmltarget_amd64_linux_no_xml): Likewise.
12070 (PTRACE_GETREGSET): Likewise.
12071 (PTRACE_SETREGSET): Likewise.
12072 (x86_fill_xstateregset): Likewise.
12073 (x86_store_xstateregset): Likewise.
12074 (use_xml): Likewise.
12075 (x86_linux_update_xmltarget): Likewise.
12076 (x86_linux_process_qsupported): Likewise.
12077 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12078 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12079 init_registers_i386_linux here. Call
12080 x86_linux_update_xmltarget.
12081 (the_low_target): Add x86_linux_process_qsupported.
12082
12083 * server.c (handle_query): Call target_process_qsupported.
12084
12085 * target.h (target_ops): Add process_qsupported.
12086 (target_process_qsupported): New.
12087
fc7238bb
PA
120882010-04-03 Pedro Alves <pedro@codesourcery.com>
12089
12090 * inferiors.c (add_thread): Set last_status kind to
12091 TARGET_WAITKIND_IGNORE.
12092 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12093 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12094 (linux_wait_1): Move `thread' local definition to block that uses
12095 it. Don't NULL initialize `event_child'.
12096 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12097 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12098 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12099
bdabb078
PA
121002010-04-01 Pedro Alves <pedro@codesourcery.com>
12101
12102 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12103 an extended waitstatus, or by a watchpoint.
12104 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12105 thread was stepping or has been stopped by a watchpoint.
12106
d3bbe7a0
PA
121072010-04-01 Pedro Alves <pedro@codesourcery.com>
12108
12109 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12110 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12111 of another, then delete the previous, and validate all
12112 breakpoints.
12113 (validate_inserted_breakpoint): New.
12114 (delete_disabled_breakpoints): New.
12115 (validate_breakpoints): New.
12116 (check_mem_read): Validate breakpoints before trusting their
12117 shadow. Delete disabled breakpoints.
12118 (check_mem_write): Validate breakpoints before trusting they
12119 should be inserted. Delete disabled breakpoints.
12120 * mem-break.h (validate_breakpoints):
12121 * server.c (handle_query): Validate breakpoints when we see a
12122 qSymbol query.
12123
8b07ae33
PA
121242010-04-01 Pedro Alves <pedro@codesourcery.com>
12125
12126 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12127 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12128 if we could tell there's a GDB breakpoint at stop_pc.
12129 (need_step_over_p): Don't do a step over if we find a GDB
12130 breakpoint at the resume PC.
12131
12132 * mem-break.c (struct raw_breakpoint): New.
12133 (enum bkpt_type): New type `gdb_breakpoint'.
12134 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12135 fields. New field `raw'.
12136 (find_raw_breakpoint_at): New.
12137 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12138 breakpoint instead.
12139 (set_breakpoint_at): Adjust.
12140 (delete_raw_breakpoint): New.
12141 (release_breakpoint): New.
12142 (delete_breakpoint): Rename to...
12143 (delete_breakpoint_1): ... this. Add proc parameter. Use
12144 release_breakpoint. Return ENOENT.
12145 (delete_breakpoint): Reimplement.
12146 (find_breakpoint_at): Delete.
12147 (find_gdb_breakpoint_at): New.
12148 (delete_breakpoint_at): Delete.
12149 (set_gdb_breakpoint_at): New.
12150 (delete_gdb_breakpoint_at): New.
12151 (gdb_breakpoint_here): New.
12152 (set_reinsert_breakpoint): Use release_breakpoint.
12153 (uninsert_breakpoint): Rename to ...
12154 (uninsert_raw_breakpoint): ... this.
12155 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12156 (reinsert_raw_breakpoint): Change parameter type to
12157 raw_breakpoint.
12158 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12159 instead.
12160 (check_breakpoints): Adjust. Use release_breakpoint.
12161 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12162 (breakpoint_inserted_here): Ditto.
12163 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12164 Don't trust the breakpoint's shadow if it is not inserted.
12165 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12166 (delete_all_breakpoints): Adjust.
12167 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12168 use delete_breakpoint_1.
12169
12170 * mem-break.h (breakpoints_supported): Delete declaration.
12171 (set_gdb_breakpoint_at): Declare.
12172 (gdb_breakpoint_here): Declare.
12173 (delete_breakpoint_at): Delete.
12174 (delete_gdb_breakpoint_at): Declare.
12175
12176 * server.h (struct raw_breakpoint): Forward declare.
12177 (struct process_info): New field `raw_breakpoints'.
12178
12179 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12180 breakpoints.
12181
6bf5e0ba
PA
121822010-03-24 Pedro Alves <pedro@codesourcery.com>
12183
12184 * linux-low.c (status_pending_p_callback): Fix comment.
12185 (linux_wait_for_event_1): Move most of the internal breakpoint
12186 handling from here...
12187 (linux_wait_1): ... to here.
12188 (count_events_callback): New.
12189 (select_singlestep_lwp_callback): New.
12190 (select_event_lwp_callback): New.
12191 (cancel_breakpoints_callback): New.
12192 (select_event_lwp): New.
12193 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12194 priority to all LWPs that have had events that should be reported
12195 to the client. Cancel breakpoints when about to reporting the
12196 event to the client, not while stopping lwps. No longer cancel
12197 finished single-steps here.
12198 (cancel_finished_single_step): Delete.
12199 (cancel_finished_single_steps): Delete.
12200
414a389f
PA
122012010-03-24 Pedro Alves <pedro@codesourcery.com>
12202
12203 * mem-break.c (enum bkpt_type): New.
12204 (struct breakpoint): New field `type'.
12205 (set_breakpoint_at): Change return type to struct breakpoint
12206 pointer. Set type to `other_breakpoint' by default.
12207 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12208 in the breakpoint list.
12209 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12210 (reinsert_breakpoint): Rename to ...
12211 (reinsert_raw_breakpoint): ... this.
12212 (reinsert_breakpoints_at): Adjust.
12213 * mem-break.h (struct breakpoint): Declare.
12214 (set_breakpoint_at): Change return type to struct breakpoint
12215 pointer.
12216
2280c721
PA
122172010-03-24 Pedro Alves <pedro@codesourcery.com>
12218
12219 * server.c (handle_query): Assign, not compare.
12220
d50171e4
PA
122212010-03-24 Pedro Alves <pedro@codesourcery.com>
12222
12223 Teach linux gdbserver to step-over-breakpoints.
12224
12225 * linux-low.c (can_hardware_single_step): New.
12226 (supports_breakpoints): New.
12227 (handle_extended_wait): If stopping threads, read the stop pc of
12228 the new cloned LWP.
12229 (get_pc): New.
12230 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12231 low target doesn't support retrieving the PC.
12232 (add_lwp): Set last_resume_kind to resume_continue.
12233 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12234 (linux_attach): Don't clear stop_expected. Set the lwp's
12235 last_resume_kind to resume_stop.
12236 (linux_detach_one_lwp): Don't check for removed breakpoints.
12237 (check_removed_breakpoint): Delete.
12238 (status_pending_p): Rename to ...
12239 (status_pending_p_callback): ... this. Don't check for removed
12240 breakpoints. Don't consider threads that are stopped from GDB's
12241 perspective.
12242 (linux_wait_for_lwp): Always read the stop_pc here.
12243 (cancel_breakpoint): New.
12244 (step_over_bkpt): New global.
12245 (linux_wait_for_event_1): Implement stepping over breakpoints.
12246 (gdb_wants_lwp_stopped): New.
12247 (gdb_wants_all_stopped): New.
12248 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12249 single-step traps here. Store the thread's last reported target
12250 wait status.
12251 (send_sigstop): Don't clear stop_expected. Always set it,
12252 instead.
12253 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12254 (cancel_finished_single_step): New.
12255 (cancel_finished_single_steps): New.
12256 (wait_for_sigstop): Don't cancel finished single-step traps here.
12257 (linux_resume_one_lwp): Don't check for removed breakpoints.
12258 Don't set `step' on non-hardware step archs.
12259 (linux_set_resume_request): Ignore resume_stop requests if already
12260 stopping or stopped. Set the lwp's last_resume_kind.
12261 (resume_status_pending_p): Don't check for removed breakpoints.
12262 (need_step_over_p): New.
12263 (start_step_over): New.
12264 (finish_step_over): New.
12265 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12266 requests. Clear the thread's last reported target waitstatus.
12267 Don't use the `suspended' flag. Don't consider pending breakpoints.
12268 (linux_resume): Start a step-over if necessary.
12269 (proceed_one_lwp): New.
12270 (proceed_all_lwps): New.
12271 (unstop_all_lwps): New.
12272 * linux-low.h (struct lwp_info): Rewrite comment for the
12273 `suspended' flag. Add the `stop_pc' field. Delete the
12274 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12275 Add `'last_resume_kind' and `need_step_over' fields.
12276 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12277 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12278 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12279 (set_raw_breakpoint_at): New.
12280 (set_breakpoint_at): Rewrite to use it.
12281 (reinsert_breakpoint_handler): Delete.
12282 (set_reinsert_breakpoint): New.
12283 (reinsert_breakpoint_by_bp): Delete.
12284 (delete_reinsert_breakpoints): New.
12285 (uninsert_breakpoint): Rewrite.
12286 (uninsert_breakpoints_at): New.
12287 (reinsert_breakpoint): Rewrite.
12288 (reinsert_breakpoints_at): New.
12289 (check_breakpoints): Rewrite.
12290 (breakpoint_here): New.
12291 (breakpoint_inserted_here): New.
12292 (check_mem_read): Adjust.
12293 * mem-break.h (breakpoints_supported, breakpoint_here)
12294 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12295 (reinsert_breakpoint_by_bp): Delete declaration.
12296 (delete_reinsert_breakpoints): Declare.
12297 (reinsert_breakpoint): Delete declaration.
12298 (reinsert_breakpoints_at): Declare.
12299 (uninsert_breakpoint): Delete declaration.
12300 (uninsert_breakpoints_at): Declare.
12301 (check_breakpoints): Adjust prototype.
12302 * server.h: Adjust include order.
12303 (struct thread_info): Declare here. Add a `last_status' field.
12304
30ba68cb
MS
123052010-03-23 Michael Snyder <msnyder@vmware.com>
12306
12307 * server.c (crc32): New function.
12308 (handle_query): Add handling for 'qCRC:' request.
12309
b9a881c2
PA
123102010-03-23 Pedro Alves <pedro@codesourcery.com>
12311
12312 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12313 lwp had been stopped by a watchpoint.
12314
e92d13d5
PA
123152010-03-16 Pedro Alves <pedro@codesourcery.com>
12316
12317 * server.h (internal_error): Declare.
12318 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12319 * utils.c (internal_error): New function.
12320
64daa791
AS
123212010-03-15 Andreas Schwab <schwab@redhat.com>
12322
12323 * configure.srv: Fix typo setting srv_regobj.
12324
f52cd8cd
PA
123252010-03-15 Pedro Alves <pedro@codesourcery.com>
12326
12327 * linux-low.c (fetch_register): Avoid passing a non string literal
12328 format to `error'.
12329 (usr_store_inferior_registers): Ditto.
12330
93ae6fdc
PA
123312010-03-14 Pedro Alves <pedro@codesourcery.com>
12332
12333 * linux-low.c (linux_write_memory): Bail out early if peeking
12334 memory failed.
12335
c3adc08c
PA
123362010-03-14 Pedro Alves <pedro@codesourcery.com>
12337
12338 * linux-low.h (struct lwp_info): New fields
12339 `stopped_by_watchpoint' and `stopped_data_address'.
12340 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12341 here, and cache them in the lwp object.
12342 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12343 directly.
12344 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12345 field.
12346 (linux_stopped_by_watchpoint): Rewrite.
12347 (linux_stopped_data_address): Rewrite.
12348
bce522a2
PA
123492010-03-06 Simo Melenius <simo.melenius@iki.fi>
12350
12351 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12352 switching the current inferior, not before.
12353
90884b2b
L
123542010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12355
12356 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12357 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12358 i386-linux.c and amd64-linux.c.
12359 (reg-i386.o): Removed.
12360 (reg-i386.c): Likewise.
12361 (reg-i386-linux.o): Likewise.
12362 (reg-i386-linux.c): Likewise.
12363 (reg-x86-64.o): Likewise.
12364 (reg-x86-64.c): Likewise.
12365 (reg-x86-64-linux.o): Likewise.
12366 (reg-x86-64-linux.c): Likewise.
12367 (i386.o): New.
12368 (i386.c): Likewise.
12369 (i386-linux.o): Likewise.
12370 (i386-linux.c): Likewise.
12371 (amd64.o): Likewise.
12372 (amd64.c): Likewise.
12373 (amd64-linux.o): Likewise.
12374 (amd64-linux.c): Likewise.
12375
12376 * configure.srv (srv_i386_regobj): New.
12377 (srv_i386_linux_regobj): Likewise.
12378 (srv_amd64_regobj): Likewise.
12379 (srv_amd64_linux_regobj): Likewise.
12380 (srv_i386_32bit_xmlfiles): Likewise.
12381 (srv_i386_64bit_xmlfiles): Likewise.
12382 (srv_i386_xmlfiles): Likewise.
12383 (srv_amd64_xmlfiles): Likewise.
12384 (srv_i386_linux_xmlfiles): Likewise.
12385 (srv_amd64_linux_xmlfiles): Likewise.
12386 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12387 srv_xmlfiles to $srv_i386_xmlfiles.
12388 (i[34567]86-*-mingw32ce*): Likewise.
12389 (i[34567]86-*-mingw*): Likewise.
12390 (i[34567]86-*-nto*): Likewise.
12391 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12392 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12393 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12394 (x86_64-*-linux*): Likewise.
12395
12396 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12397 (init_registers_amd64_linux): New.
12398 (x86_arch_setup): Replace init_registers_x86_64_linux with
12399 init_registers_amd64_linux.
12400
193f13e6
MK
124012010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12402
12403 * configure.ac: Check for libdl. If it is not available link against
12404 static libthread_db.
12405 * configure: Regenerate.
12406
85d721b8
PA
124072010-02-22 Pedro Alves <pedro@codesourcery.com>
12408
12409 PR9605
12410
12411 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12412 handing a read watchpoint.
12413 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12414
6076632b
DE
124152010-02-12 Doug Evans <dje@google.com>
12416
12417 * linux-low.c (linux_supports_tracefork_flag): Document.
12418 (linux_look_up_symbols): Add comment.
12419
3327ccf7
L
124202010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12421
12422 * regcache.c (supply_register): Clear regcache if buf is NULL.
12423
0718675c 124242010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 12425 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
12426
12427 * inferiors.c (find_inferior): Add function documentation.
12428 (unloaded_dll): Handle the case where the unloaded dll has not
12429 been previously registered in the dll list.
12430
177321bd
DJ
124312010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12432
12433 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12434 (thumb2_breakpoint): New.
12435 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12436
2b009048
DJ
124372010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12438
12439 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12440 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12441 breakpoints.
12442
3be029c7
PA
124432010-01-21 Pedro Alves <pedro@codesourcery.com>
12444
12445 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12446
18f5de3b
JK
124472010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12448
12449 * linux-s390-low.c (s390_collect_ptrace_register)
12450 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12451
3743bb4f
DE
124522010-01-21 Doug Evans <dje@google.com>
12453
14ce3065
DE
12454 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12455 (PTRACE_ARG4_TYPE): New macro.
12456 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12457 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12458 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12459 (usr_store_inferior_registers): Ditto.
12460 (linux_read_memory, linux_write_memory): Ditto.
12461 (linux_test_for_tracefork): Ditto.
12462
3743bb4f
DE
12463 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12464 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12465
8b315be5
PA
124662010-01-21 Pedro Alves <pedro@codesourcery.com>
12467
12468 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12469 target.
12470
85492558
PA
124712010-01-21 Pedro Alves <pedro@codesourcery.com>
12472
12473 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12474 prototype to take a regcache. Adjust.
12475
442ea881
PA
124762010-01-20 Pedro Alves <pedro@codesourcery.com>
12477
12478 * regcache.h (struct thread_info): Forward declare.
12479 (struct regcache): New.
12480 (new_register_cache): Adjust prototype.
12481 (get_thread_regcache): Declare.
12482 (free_register_cache): Adjust prototype.
12483 (registers_to_string, registers_from_string): Ditto.
12484 (supply_register, supply_register_by_name, collect_register)
12485 (collect_register_as_string, collect_register_by_name): Ditto.
12486 * regcache.c (struct inferior_regcache_data): Delete.
12487 (get_regcache): Rename to ...
12488 (get_thread_regcache): ... this. Adjust. Switch inferior before
12489 fetching registers.
12490 (regcache_invalidate_one): Adjust.
12491 (regcache_invalidate): Fix prototype.
12492 (new_register_cache): Return the new register cache.
12493 (free_register_cache): Change prototype.
12494 (realloc_register_cache): Adjust.
12495 (registers_to_string): Change prototype to take a regcache. Adjust.
12496 (registers_from_string): Ditto.
12497 (register_data): Ditto.
12498 (supply_register): Ditto.
12499 (supply_register_by_name): Ditto.
12500 (collect_register): Ditto.
12501 (collect_register_as_string): Ditto.
12502 (collect_register_by_name): Ditto.
12503 * server.c (process_serial_event): Adjust.
12504 * linux-low.h (regset_fill_func, regset_store_func): Change
12505 prototype.
12506 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12507 Change prototype.
12508 * linux-low.c (get_stop_pc): Adjust.
12509 (check_removed_breakpoint): Adjust.
12510 (linux_wait_for_event): Adjust.
12511 (linux_resume_one_lwp): Adjust.
12512 (fetch_register): Add regcache parameter. Adjust.
12513 (usr_store_inferior_registers): Ditto.
12514 (regsets_fetch_inferior_registers): Ditto.
12515 (regsets_store_inferior_registers): Ditto.
12516 (linux_fetch_registers, linux_store_registers): Ditto.
12517 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12518 regcache. Adjust.
43aaf8b6
PA
12519 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12520 Ditto.
442ea881
PA
12521 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12522 prototype to take a regcache.
12523 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12524 * remote-utils.c (convert_ascii_to_int, outreg)
12525 (prepare_resume_reply): Change prototype to take a regcache.
12526 Adjust.
12527 * target.h (struct target_ops) <fetch_registers, store_registers>:
12528 Change prototype to take a regcache.
12529 (fetch_inferior_registers, store_inferior_registers): Change
12530 prototype to take a regcache. Adjust.
12531 * proc-service.c (ps_lgetregs): Adjust.
12532 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12533 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12534 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12535 take a regcache. Adjust.
12536 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12537 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12538 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12539 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12540 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12541 (cris_cannot_fetch_register):
12542 (cris_breakpoint_at): Change prototype to take a regcache.
12543 Adjust.
12544 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12545 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12546 to take a regcache. Adjust.
12547 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12548 Adjust.
12549 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12550 take a regcache. Adjust.
12551 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12552 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12553 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12554 * linux-mips-low.c (mips_get_pc):
12555 (mips_set_pc): Change prototype to take a regcache. Adjust.
12556 (mips_reinsert_addr): Adjust.
12557 (mips_collect_register): Change prototype to take a regcache.
12558 Adjust.
12559 (mips_supply_register):
12560 (mips_collect_register_32bit, mips_supply_register_32bit)
12561 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12562 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12563 * linux-ppc-low.c (ppc_supply_ptrace_register)
12564 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12565 (parse_spufs_run): Adjust.
12566 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12567 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12568 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12569 take a regcache. Adjust.
12570 * linux-s390-low.c (s390_collect_ptrace_register)
12571 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12572 (s390_set_pc): Change prototype to take a regcache. Adjust.
12573 (s390_arch_setup): Adjust.
12574 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12575 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12576 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12577 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12578 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12579 regcache. Adjust.
12580 (sparc_breakpoint_at): Adjust.
12581 * linux-xtensa-low.c (xtensa_fill_gregset):
12582 (xtensa_store_gregset):
12583 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12584 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12585 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12586 prototype to take a regcache. Adjust.
12587 * win32-arm-low.c (arm_fetch_inferior_register)
12588 (arm_store_inferior_register): Change prototype to take a
12589 regcache. Adjust.
12590 * win32-i386-low.c (i386_fetch_inferior_register)
12591 (i386_store_inferior_register): Change prototype to take a
12592 regcache. Adjust.
12593 * win32-low.c (child_fetch_inferior_registers)
12594 (child_store_inferior_registers): Change prototype to take a
12595 regcache. Adjust.
12596 (win32_wait): Adjust.
12597 (win32_fetch_inferior_registers): Change prototype to take a
12598 regcache. Adjust.
12599 (win32_store_inferior_registers): Adjust.
12600 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12601 store_inferior_register>: Change prototype to take a regcache.
12602
60c3d7b0
DE
126032010-01-20 Doug Evans <dje@google.com>
12604
12605 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12606 #ifdef.
12607 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12608 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12609
dc146f7c
VP
126102010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12611
12612 * linux-low.c (linux_core_of_thread): New.
12613 (compare_ints, show_process, list_threads): New.
12614 (linux_qxfer_osdata): Report threads and cores.
12615 (linux_target_op): Register linux_core_of_thread.
12616 * remote-utils.c (prepare_resume_reply): Report the core.
12617 (buffer_xml_printf): Support %d specifier.
12618 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12619 New.
12620 (handle_query): Handle qXfer:threads. Announce availability
12621 thereof.
12622 * target.h (struct target_ops): New field core_of_thread.
12623
7803799a
UW
126242010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12625
12626 * Makefile.in (clean): Remove new generated files.
12627 (reg-s390.o, reg-s390.c): Remove rules.
12628 (reg-s390x.o, reg-s390x.c): Likewise.
12629 (s390-linux32.o, s390-linux32.c): Add rules.
12630 (s390-linux64.o, s390-linux64.c): Likewise.
12631 (s390x-linux64.o, s390x-linux64.c): Likewise.
12632 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12633 * linux-s390-low.c: Include <elf.h>.
12634 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12635 (init_registers_s390): Remove prototype.
12636 (init_registers_s390x): Likewise.
12637 (init_registers_s390_linux32): Add prototype.
12638 (init_registers_s390_linux64): Likewise.
12639 (init_registers_s390x_linux64): Likewise.
12640 (s390_num_regs_3264): New define.
12641 (s390_regmap_3264): New global variable.
12642 (s390_cannot_fetch_register): Remove obsolete check.
12643 (s390_cannot_store_register): Likewise.
12644 (s390_collect_ptrace_register): Handle upper/lower register halves.
12645 (s390_supply_ptrace_register): Likewise.
12646 (s390_fill_gregset): Update to register number changes.
12647 (s390_get_hwcap): New routine.
12648 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12649 Install appropriate regmap and register set.
12650
6e7ffa39
JB
126512010-01-01 Joel Brobecker <brobecker@adacore.com>
12652
12653 * server.c (gdbserver_version): Update copyright year to 2010.
12654 * gdbreplay.c (gdbreplay_version): Likewise.
12655
957f3f49
DE
126562009-12-28 Doug Evans <dje@google.com>
12657
12658 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12659 elf/external.h. Include <elf.h> instead but only if necessary.
12660
ca5c370d
PA
126612009-12-28 Pedro Alves <pedro@codesourcery.com>
12662
12663 * linux-low.c (linux_remove_process): Remove `detaching'
12664 parameter. Don't release/detach from thread_db here.
12665 (linux_kill): Release/detach from thread_db here, ...
12666 (linux_detach): ... and here, before actually detaching.
12667 (linux_wait_1): ... and here, when a process exits.
12668 * thread-db.c (any_thread_of): New.
12669 (thread_db_free): Switch the current inferior to a thread of the
12670 passed in process.
12671
4ee62156
DE
126722009-12-21 Doug Evans <dje@google.com>
12673
d90e6a88
DE
12674 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12675
c5f62d5f
DE
12676 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12677 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12678 warning ifndef __NR_tkill. Move setting of errno there too.
12679 Delete unnecessary resetting of errno after syscall.
12680 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12681
10e86dd7
DE
12682 * configure.ac: Check for dladdr.
12683 * config.in: Regenerate.
12684 * configure: Regenerate.
12685 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12686 (try_thread_db_load): Update.
12687
4ee62156
DE
12688 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12689
00f515da
DE
126902009-12-18 Doug Evans <dje@google.com>
12691
e9464885
DE
12692 * event-loop.c: Include unistd.h if it exists.
12693
07d4f67e
DE
12694 * linux-low.c (my_waitpid): Move definition away from being in
12695 between linux_tracefork_child/linux_test_for_tracefork.
12696
00f515da
DE
12697 * gdb_proc_service.h (psaddr_t): Fix type.
12698 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12699 signature to match glibc.
12700
1de1badb
DE
127012009-12-16 Doug Evans <dje@google.com>
12702
12703 * linux-low.c (linux_read_memory): Fix argument to read.
12704
aeeb81d1
PA
127052009-11-26 Pedro Alves <pedro@codesourcery.com>
12706
12707 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12708 events, don't leave current_inferior pointing at null.
12709
10357975
PA
127102009-11-26 Pedro Alves <pedro@codesourcery.com>
12711
12712 * win32-low.c (LOG): Delete.
12713 (OUTMSG): Output to stderr.
12714 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12715 on compile time LOG macro.
12716 (win32_wait): Fix debug output.
12717
cf6e3471
PA
127182009-11-26 Pedro Alves <pedro@codesourcery.com>
12719
12720 * win32-low.c (win32_add_one_solib): If the dll name is
12721 "ntdll.dll", prepend the system directory to the dll path.
12722
0c85e18e
MK
127232009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12724
12725 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12726
9ac544ce 127272009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12728 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12729
12730 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12731 * configure.ac: Check for __mcoldfire__ and set
12732 gdb_cv_m68k_is_coldfire.
12733 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12734 reg-cf.o and reg-m68k.o.
12735 * configure: Regenerated.
12736
fd7dd3e6
PA
127372009-11-16 Pedro Alves <pedro@codesourcery.com>
12738
12739 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12740 Pass it to thread_db_free.
12741 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12742 proper `detaching' argument to linux_remove_process.
12743 * linux-low.h (thread_db_free): Add `detaching' parameter.
12744 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12745 to thread_db_free.
12746 (thread_db_free): Add `detaching' parameter. Only
12747 call td_ta_clear_event if detaching from process.
12748
75aa492e
MK
127492009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12750
12751 * thread-db.c (thread_db_free): Fix typo.
12752
21e1bee4
PP
127532009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12754
12755 PR gdb/10838
12756 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12757
8838b45e
NS
127582009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12759
12760 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12761 with an i686 compiler.
12762 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12763 needed.
12764 * configure: Rebuilt.
12765
8a35fb51
SL
127662009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12767
12768 PR gdb/10783
12769
12770 * server.c (handle_search_memory_1): Correct read_addr initialization
12771 in loop for searching subsequent chunks.
12772
96f15937
PP
127732009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12774
12775 * configure.ac: New --with-libthread-db option.
12776 * thread-db.c: Allow direct dependence on libthread_db.
12777 (thread_db_free): Adjust.
12778 * config.in: Regenerate.
12779 * configure: Likewise.
889bf7c5 12780
5f7d1694
PP
127812009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12782
12783 PR gdb/10757
12784 * thread-db.c (attach_thread): New function.
12785 (maybe_attach_thread): Return success/failure.
12786 (find_new_threads_callback): Adjust.
889bf7c5
PA
12787 (thread_db_find_new_threads): Loop until no new threads.
12788
88e3b899
PA
127892009-10-13 Pedro Alves <pedro@codesourcery.com>
12790
12791 * proc-service.c (ps_lgetregs): Formatting.
12792
cdbfd419
PP
127932009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12794
12795 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12796 * configure.ac: Adjust.
12797 * linux-low.h (struct process_info_private): Move members to struct
12798 thread_db.
12799 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12800 * linux-low.c (linux_remove_process): Adjust.
12801 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12802 * server.c (handle_query): Move code ...
12803 (handle_monitor_command): ... here. New function.
12804 * target.h (struct target_ops): New member.
12805 * thread-db.c (struct thread_db): New.
12806 (libthread_db_search_path): New variable.
12807 (thread_db_create_event, thread_db_enable_reporting)
12808 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12809 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12810 (try_thread_db_load_1, dladdr_to_soname): New functions.
12811 (try_thread_db_load, thread_db_load_search): New functions.
12812 (thread_db_init): Search for libthread_db.
12813 (thread_db_free): New function.
12814 (thread_db_handle_monitor_command): Likewise.
12815 * config.in: Regenerate.
12816 * configure: Regenerate.
889bf7c5 12817
4168d2d6
UW
128182009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12819
12820 * spu-low.c (spu_kill): Wait for inferior to terminate.
12821 Call clear_inferiors.
12822 (spu_detach): Call clear_inferiors.
12823
81ecdfbb
RW
128242009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12825
12826 * aclocal.m4: Regenerate.
12827 * config.in: Likewise.
12828 * configure: Likewise.
12829
0b9ff2c0
UW
128302009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12831
12832 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12833 (parse_spufs_run): New function.
12834 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12835 (ppc_breakpoint_at): Handle SPU breakpoints.
12836
efcbbd14
UW
128372009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12838
12839 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12840 (SPUFS_MAGIC): Define.
12841 (spu_enumerate_spu_ids): New function.
12842 (linux_qxfer_spu): New function.
12843 (linux_target_ops): Install linux_qxfer_spu.
12844
f4d9bade
UW
128452009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12846
12847 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12848 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12849 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12850 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12851 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12852 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12853 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12854 (init_registers_powerpc_cell32l): Add prototype.
12855 (init_registers_powerpc_cell64l): Likewise.
12856 (ppc_arch_setup): Detect Cell/B.E. architecture.
12857
96e946ca
RW
128582009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12859
12860 * Makefile.in (datarootdir): New variable.
12861
58d6951d
DJ
128622009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12863
12864 * linux-low.c (linux_write_memory): Update debugging output.
12865 * Makefile.in (clean): Add new descriptions.
12866 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12867 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12868 * configure.srv: Add new files for arm*-*-linux*.
12869 * linux-arm-low.c: Add new declarations.
12870 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12871 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12872 (HWCAP_VFPv3D16): New.
12873 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12874 instead of __IWMMXT__.
12875 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12876 (arm_arch_setup): New.
12877 (target_regsets): Remove #ifdef. Add VFP regset.
12878 (the_low_target): Use arm_arch_setup.
12879
12b42a12
DJ
128802009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12881
12882 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12883 the main thread again.
12884
ac8c974e
AR
128852009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12886
12887 Adding Neutrino gdbserver.
12888 * configure: Regenerated.
12889 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12890 * configure.srv (i[34567]86-*-nto*): New target.
12891 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12892 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12893 (nto_comctrl) [__QNX__]: New function.
12894 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12895
4424e0c3 128962009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12897
12898 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12899 srv_tgtobj.
12900
912cf4ba
PA
129012009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12902 Pedro Alves <pedro@codesourcery.com>
12903
12904 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12905 don't support CONTEXT_EXTENDED_REGISTERS.
12906 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12907 (the_low_target): Install them.
12908 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12909 failing with ERROR_PIPE_NOT_CONNECTED.
12910
aa5ca48f
DE
129112009-06-30 Doug Evans <dje@google.com>
12912 Pierre Muller <muller@ics.u-strasbg.fr>
12913
12914 Add h/w watchpoint support to x86-linux, win32-i386.
12915 * Makefile.in (SFILES): Add i386-low.c
12916 (i386_low_h): Define.
12917 (i386-low.o): Add dependencies.
12918 (linux-x86-low.o): Add i386-low.h dependency.
12919 (win32-i386-low.o): Ditto.
12920 * i386-low.c: New file.
12921 * i386-low.h: New file.
12922 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12923 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12924 * linux-low.c (linux_add_process): Initialize arch_private.
12925 (linux_remove_process): Free arch_private.
12926 (add_lwp): Initialize arch_private.
12927 (delete_lwp): Free arch_private.
12928 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12929 provided.
12930 * linux-low.h (process_info_private): New member arch_private.
12931 (lwp_info): New member arch_private.
12932 (linux_target_ops): New members new_process, new_thread,
12933 prepare_to_resume.
12934 (ptid_of): New macro.
12935 * linux-x86-low.c: Include stddef.h, i386-low.h.
12936 (arch_process_info): New struct.
12937 (arch_lwp_info): New struct.
12938 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12939 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12940 (i386_dr_low_get_status): New function.
12941 (x86_insert_point, x86_remove_point): New functions.
12942 (x86_stopped_by_watchpoint): New function.
12943 (x86_stopped_data_address): New function.
12944 (x86_linux_new_process, x86_linux_new_thread): New functions.
12945 (x86_linux_prepare_to_resume): New function.
12946 (the_low_target): Add entries for insert_point, remove_point,
12947 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12948 prepare_to_resume.
12949 * server.c (debug_hw_points): New global.
12950 (monitor_show_help): Document set debug-hw-points.
12951 (handle_query): Process "set debug-hw-points".
12952 * server.h (debug_hw_points): Declare.
12953 (paddress): Declare.
12954 * utils.c (NUMCELLS, CELLSIZE): New macros.
12955 (get_sell, xsnprintf, paddress): New functions.
12956 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12957 remove_point, stopped_by_watchpoint, stopped_data_address.
12958 * win32-i386-low.c: Include i386-low.h.
12959 (debug_reg_state): Replaces dr.
12960 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12961 (i386_dr_low_get_status): New function.
12962 (i386_insert_point, i386_remove_point): New functions.
12963 (i386_stopped_by_watchpoint): New function.
12964 (i386_stopped_data_address): New function.
12965 (i386_initial_stuff): Update.
12966 (get_thread_context,set_thread_context,i386_thread_added): Update.
12967 (the_low_target): Add entries for insert_point,
12968 remove_point, stopped_by_watchpoint, stopped_data_address.
12969 * win32-low.c (win32_insert_watchpoint): New function.
12970 (win32_remove_watchpoint): New function.
12971 (win32_stopped_by_watchpoint): New function.
12972 (win32_stopped_data_address): New function.
12973 (win32_target_ops): Add entries for insert_watchpoint,
12974 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12975 * win32-low.h (win32_target_ops): New members insert_point,
12976 remove_point, stopped_by_watchpoint, stopped_data_address.
12977
d993e290
PA
129782009-06-25 Pedro Alves <pedro@codesourcery.com>
12979
12980 * server.c (process_serial_event): Re-return unsupported, not
12981 error, if the type isn't recognized. Re-allow supporting only
12982 insert or remove packets. Also call require_running for
12983 breakpoints. Add missing break statement to default case. Tidy.
12984 * target.h (struct target_ops): Rename insert_watchpoint to
12985 insert_point, and remove_watchpoint to remove_point.
12986
12987 * linux-low.h (struct linux_target_ops): Likewise.
12988 * linux-low.c (linux_insert_watchpoint): Rename to ...
12989 (linux_insert_point): ... this. Adjust.
12990 (linux_remove_watchpoint): Rename to ...
12991 (linux_remove_point): ... this. Adjust.
12992 (linux_target_ops): Adjust.
12993 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12994 (cris_insert_point): ... this.
12995 (cris_remove_watchpoint): Rename to ...
12996 (cris_remove_point): ... this.
12997 (the_low_target): Adjust.
12998
0f54c268
PM
129992009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13000
13001 * server.c (handle_v_kill): Pass signal_pid to
13002 kill_inferior if multi_process is zero.
13003
c6314022
AR
130042009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13005
13006 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13007 * target.h (target_ops): Comment for *_watchpoint to make it clear
13008 the functions can get types '0' and '1'.
13009
4463ce24
AR
130102009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13011
13012 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13013 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13014 * regcache.c (get_regcache): Likewise.
13015 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13016 * win32-low.c (child_fetch_inferior_registers): Remove check for
13017 regno 0.
13018
cf8fd78b
PA
130192009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13020 Pedro Alves <pedro@codesourcery.com>
13021
13022 * target.h (struct target_ops) <supports_multi_process>: New
13023 callback.
13024 (target_supports_multi_process): New.
13025 * server.c (handle_query): Even if GDB reports support, only
13026 enable multi-process if the target also supports it. Report
13027 multi-process support only if the target backend supports it.
13028 * linux-low.c (linux_supports_multi_process): New function.
13029 (linux_target_ops): Install it as target_supports_multi_process
13030 callback.
13031
47c0c975
DE
130322009-05-24 Doug Evans <dje@google.com>
13033
e09875d4
DE
13034 Global renaming of find_thread_pid to find_thread_ptid.
13035 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13036 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13037 All callers updated.
13038
e27d73f6
DE
13039 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13040 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13041 directly.
13042
47c0c975
DE
13043 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13044 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13045 (linux_resume_one_lwp): Ditto.
13046
2acc282a
DE
130472009-05-23 Doug Evans <dje@google.com>
13048
13049 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13050 from struct inferior_list_entry * to struct lwp_info *.
13051 All callers updated.
13052
9f1036c1
DE
130532009-05-13 Doug Evans <dje@google.com>
13054
13055 * linux-x86-low.c: Don't include assert.h.
13056 (x86_siginfo_fixup): Use fatal, not assert.
13057 (x86_arch_setup): Fix comment.
13058
d0722149
DE
130592009-05-12 Doug Evans <dje@google.com>
13060
13061 Biarch support for i386/amd64 gdbserver.
13062 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13063 Add linux-x86-low.c.
13064 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13065 (linux-x86-low.o): Add.
13066 * linux-x86-64-low.c: Delete.
13067 * linux-i386-low.c: Delete.
13068 * linux-x86-low.c: New file.
13069 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13070 linux-x86-low.o.
13071 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13072 linux-x86-low.o.
13073 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13074 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13075 (linux_child_pid_to_exec_file): New function.
13076 (elf_64_header_p, elf_64_file_p): New functions.
13077 (siginfo_fixup): New function.
13078 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13079 give target a chance to convert layout.
13080 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13081 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13082
fdeb2a12
DE
130832009-05-07 Doug Evans <dje@google.com>
13084
13085 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13086 (regsets_store_inferior_registers): Ditto.
13087
a6dbe5df
PA
130882009-05-06 Pedro Alves <pedro@codesourcery.com>
13089
13090 PR server/10048
13091
13092 * linux-low.c (must_set_ptrace_flags): Delete.
13093 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13094 of the global.
13095 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13096 `lwp->must_set_ptrace_flags' instead.
ba42693b 13097 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
13098 (linux_wait_1): ... not here.
13099
5091eb23
DE
131002009-04-30 Doug Evans <dje@google.com>
13101
9f767825
DE
13102 * inferiors.c (started_inferior_callback): New function.
13103 (attached_inferior_callback): New function.
13104 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13105 * server.c (print_started_pid, print_attached_pid): New functions.
13106 (detach_or_kill_for_exit): New function.
13107 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13108 * server.h (have_started_inferiors_p): Declare.
13109 (have_attached_inferiors_p): Declare.
13110
5091eb23
DE
13111 * inferiors.c (remove_process): Fix memory leak, free process.
13112 * linux-low.c (linux_remove_process): New function.
13113 (linux_kill): Call it instead of remove_process.
13114 (linux_detach, linux_wait_1): Ditto.
13115
155c8968
PA
131162009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13117
13118 * configure.srv: Add x86 Windows CE target.
13119
7fe519cb
UW
131202009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13121
13122 * inferiors.c (get_thread_process): Make global.
13123 * server.h (get_thread_process): Add prototype.
13124 * thread-db.c (find_one_thread): Use get_thread_process
13125 instead of current_process.
13126 (thread_db_get_tls_address): Do not crash if called when
13127 thread layer is not yet initialized.
13128
5472f405
UW
131292009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13130
13131 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13132 * spu-low.c (current_tid): Rename to ...
13133 (current_ptid): ... this.
13134 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13135 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13136 ptid_get_lwp (current_ptid) instead of current_tid.
13137 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13138 instead of current_tid. Use find_process_pid to verify pid
13139 argument is valid. Pass proper argument to remove_process.
13140 (spu_thread_alive): Compare current_ptid instead of current_tid.
13141 (spu_resume): Likewise.
13142
55ac2b99
PA
131432009-04-02 Pedro Alves <pedro@codesourcery.com>
13144
13145 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13146 variable.
13147
95954743
PA
131482009-04-01 Pedro Alves <pedro@codesourcery.com>
13149
13150 Implement the multiprocess extensions, and add linux multiprocess
13151 support.
13152
13153 * server.h (ULONGEST): Declare.
13154 (struct ptid, ptid_t): New.
13155 (minus_one_ptid, null_ptid): Declare.
13156 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13157 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13158 (struct inferior_list_entry): Change `id' type from unsigned from
13159 to ptid_t.
13160 (struct sym_cache, struct breakpoint, struct
13161 process_info_private): Forward declare.
13162 (struct process_info): Declare.
13163 (current_process): Declare.
13164 (all_processes): Declare.
13165 (initialize_inferiors): Declare.
13166 (add_thread): Adjust to use ptid_t.
13167 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13168 (add_process, remove_process, find_thread_pid): Declare.
13169 (find_inferior_id): Adjust to use ptid_t.
13170 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13171 (multi_process): Declare.
13172 (push_event): Adjust to use ptid_t.
13173 (read_ptid, write_ptid): Declare.
13174 (prepare_resume_reply): Adjust to use ptid_t.
13175 (clear_symbol_cache): Declare.
13176 * inferiors.c (all_processes): New.
13177 (null_ptid, minus_one_ptid): New.
13178 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13179 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13180 (add_thread): Change unsigned long to ptid. Remove gdb_id
13181 parameter. Adjust.
13182 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13183 (gdb_id_to_thread): Rename to ...
13184 (find_thread_pid): ... this. Change unsigned long to ptid.
13185 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13186 (loaded_dll, pull_pid_from_list): Adjust.
13187 (add_process, remove_process, find_process_pid)
13188 (get_thread_process, current_process, initialize_inferiors): New.
13189 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13190 (struct target_waitstatus) <related_pid>: Ditto.
13191 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13192 return type to int.
13193 (struct target_ops) <join>: Add `pid' argument.
13194 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13195 (struct target_ops) <wait>: Add `ptid' field. Change return type
13196 to ptid.
13197 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13198 (mywait): Add `ptid' argument. Change return type to ptid_t.
13199 (target_pid_to_str): Declare.
13200 * target.c (set_desired_inferior): Adjust to use ptids.
13201 (mywait): Add new `ptid' argument. Adjust.
13202 (target_pid_to_str): New.
13203 * mem-break.h (free_all_breakpoints): Declare.
13204 * mem-break.c (breakpoints): Delelete.
13205 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13206 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13207 to use per-process breakpoint list.
13208 (free_all_breakpoints): New.
13209 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13210 (symbol_cache, all_symbols_looked_up): Delete.
13211 (hexchars): New.
13212 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13213 read_ptid): New.
13214 (prepare_resume_reply): Change ptid argument's type from unsigned
13215 long to ptid_t. Adjust. Implement W;process and X;process.
13216 (free_sym_cache, clear_symbol_cache): New.
13217 (look_up_one_symbol): Adjust to per-process symbol cache. *
13218 * server.c (cont_thread, general_thread, step_thread): Change type
13219 to ptid_t.
13220 (attached): Delete.
13221 (multi_process): New.
13222 (last_ptid): Change type to ptid_t.
13223 (struct vstop_notif) <ptid>: Change type to ptid_t.
13224 (queue_stop_reply, push_event): Change `ptid' argument's type to
13225 ptid_t.
13226 (discard_queued_stop_replies): Add `pid' argument.
13227 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13228 changes. Don't reference the `attached' global.
13229 (attach_inferior): Adjust to mywait interface changes.
13230 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13231 features. Handle and report "multiprocess+". Handle
13232 "qAttached:PID".
13233 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13234 changes.
13235 (handle_v_kill): New.
13236 (handle_v_stopped): Adjust to use target_pid_to_str.
13237 (handle_v_requests): Allow multiple attaches and runs when
13238 multiprocess extensions are in effect. Handle "vKill".
13239 (myresume): Adjust to use ptids.
13240 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13241 (handle_status): Adjust to discard_queued_stop_replies interface
13242 change.
13243 (first_thread_of, kill_inferior_callback)
13244 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13245 (main): Call initialize_inferiors. Adjust to use ptids, killing
13246 and detaching from all inferiors. Handle multiprocess packet
13247 variants.
13248 * linux-low.h: Include gdb_proc_service.h.
13249 (struct process_info_private): New.
13250 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13251 <lwpid_of>: Use ptid_get_lwp.
13252 (get_lwp_thread): Adjust.
13253 (struct lwp_info): Add `dead' member.
13254 (find_lwp_pid): Declare.
13255 * linux-low.c (thread_db_active): Delete.
13256 (new_inferior): Adjust comment.
13257 (inferior_pid): Delete.
13258 (linux_add_process): New.
13259 (handle_extended_wait): Adjust.
13260 (add_lwp): Change unsigned long to ptid.
13261 (linux_create_inferior): Add process to processes table. Adjust
13262 to use ptids. Don't set new_inferior here.
13263 (linux_attach_lwp): Rename to ...
13264 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13265 it. Adjust to use ptids.
13266 (linux_attach_lwp): New.
13267 (linux_attach): Add process to processes table. Don't set
13268 new_inferior here.
13269 (struct counter): New.
13270 (second_thread_of_pid_p, last_thread_of_process_p): New.
13271 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13272 multiple processes.
13273 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13274 processes. Remove process from process table.
13275 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13276 to multiple processes.
13277 (any_thread_of): New.
13278 (linux_detach): Add `pid' argument, and handle it. Remove process
13279 from processes table.
13280 (linux_join): Add `pid' argument. Handle it.
13281 (linux_thread_alive): Change unsighed long argument to ptid_t.
13282 Consider dead lwps as not being alive.
13283 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13284 threads we're not interested in.
13285 (same_lwp, find_lwp_pid): New.
13286 (linux_wait_for_lwp): Change `pid' argument's type from int to
13287 ptid_t. Adjust.
13288 (linux_wait_for_event): Rename to ...
13289 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13290 from int to ptid_t. Adjust.
13291 (linux_wait_for_event): New.
13292 (linux_wait_1): Add `ptid' argument. Change return type to
13293 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13294 that exit from the process table.
13295 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13296 Adjust.
13297 (mark_lwp_dead): New.
13298 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13299 stopping all threads, mark its main lwp as dead.
13300 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13301 ptids.
13302 (fetch_register, usr_store_inferior_registers)
13303 (regsets_fetch_inferior_registers)
13304 (regsets_store_inferior_registers, linux_read_memory)
13305 (linux_write_memory): Inline `inferior_pid'.
13306 (linux_look_up_symbols): Adjust to use per-process
13307 `thread_db_active'.
13308 (linux_request_interrupt): Adjust to use ptids.
13309 (linux_read_auxv): Inline `inferior_pid'.
13310 (initialize_low): Don't reference thread_db_active.
13311 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13312 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13313 (ps_getpid): Return the pid of the current inferior.
13314 * thread-db.c (proc_handle, thread_agent): Delete.
13315 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13316 per-process data.
13317 (find_one_thread): Change argument type to ptid_t. Adjust to
13318 per-process data.
13319 (maybe_attach_thread): Adjust to per-process data and ptids.
13320 (thread_db_find_new_threads): Ditto.
13321 (thread_db_init): Ditto.
13322 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13323 processes table. Adjust to use ptids.
13324 (spu_kill, spu_detach): Adjust interface. Remove process from
13325 processes table.
13326 (spu_join, spu_thread_alive): Adjust interface.
13327 (spu_wait): Adjust interface. Remove process from processes
13328 table. Adjust to use ptids.
13329 * win32-low.c (current_inferior_tid): Delete.
13330 (current_inferior_ptid): New.
13331 (debug_event_ptid): New.
13332 (thread_rec): Take a ptid. Adjust.
13333 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13334 (child_delete_thread): Ditto.
13335 (do_initial_child_stuff): Add `attached' argument. Add process to
13336 processes table.
13337 (child_fetch_inferior_registers, child_store_inferior_registers):
13338 Adjust.
13339 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13340 (win32_attach): Pass 1 to do_initial_child_stuff.
13341 (win32_kill): Adjust interface. Remove process from processes
13342 table.
13343 (win32_detach): Ditto.
13344 (win32_join): Adjust interface.
13345 (win32_thread_alive): Take a ptid.
13346 (win32_resume): Adjust to use ptids.
13347 (get_child_debug_event): Ditto.
13348 (win32_wait): Adjust interface. Remove exiting process from
13349 processes table.
13350
bd99dc85
PA
133512009-04-01 Pedro Alves <pedro@codesourcery.com>
13352
13353 Non-stop mode support.
13354
13355 * server.h (non_stop): Declare.
13356 (gdb_client_data, handler_func): Declare.
13357 (delete_file_handler, add_file_handler, start_event_loop):
13358 Declare.
13359 (handle_serial_event, handle_target_event, push_event)
13360 (putpkt_notif): Declare.
13361 * target.h (enum resume_kind): New.
13362 (struct thread_resume): Replace `step' field by `kind' field.
13363 (TARGET_WNOHANG): Define.
13364 (struct target_ops) <wait>: Add `options' argument.
13365 <supports_non_stop, async, start_non_stop>: New fields.
13366 (target_supports_non_stop, target_async): New.
13367 (start_non_stop): Declare.
13368 (mywait): Add `options' argument.
13369 * target.c (mywait): Add `options' argument. Print child exit
13370 notifications here.
13371 (start_non_stop): New.
13372 * server.c (non_stop, own_buf, mem_buf): New globals.
13373 (struct vstop_notif): New.
13374 (notif_queue): New global.
13375 (queue_stop_reply, push_event, discard_queued_stop_replies)
13376 (send_next_stop_reply): New.
13377 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13378 interface changes.
13379 (attach_inferior): In non-stop mode, don't wait for the target
13380 here.
13381 (handle_general_set): Handle QNonStop.
13382 (handle_query): When handling qC, return the current general
13383 thread, instead of the first thread of the list.
13384 (handle_query): If the backend supports non-stop mode, include
13385 QNonStop+ in the qSupported query response.
13386 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13387 and non-stop mode.
13388 (handle_v_attach, handle_v_run): Handle non-stop mode.
13389 (handle_v_stopped): New.
13390 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13391 (myresume): Adjust to use resume_kind. Handle non-stop.
13392 (queue_stop_reply_callback): New.
13393 (handle_status): Handle non-stop mode.
13394 (main): Clear non_stop flag on reconnection. Use the event-loop.
13395 Refactor serial protocol handling from here ...
13396 (process_serial_event): ... to this new function. When GDB
13397 selects any thread, select one here. In non-stop mode, wait until
13398 GDB acks all pending events before exiting.
13399 (handle_serial_event, handle_target_event): New.
13400 * remote-utils.c (remote_open): Install remote_desc in the event
13401 loop.
13402 (remote_close): Remove remote_desc from the event loop.
13403 (putpkt_binary): Rename to...
13404 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13405 (putpkt_binary): New as wrapper around putpkt_binary_1.
13406 (putpkt_notif): New.
13407 (prepare_resume_reply): In non-stop mode, don't change the
13408 general_thread.
13409 * event-loop.c: New.
13410 * Makefile.in (OBJ): Add event-loop.o.
13411 (event-loop.o): New rule.
13412
13413 * linux-low.h (pid_of): Moved here.
13414 (lwpid_of): New.
13415 (get_lwp_thread): Use lwpid_of.
13416 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13417 * linux-low.c (pid_of): Delete.
13418 (inferior_pid): Use lwpid_of.
13419 (linux_event_pipe): New.
13420 (target_is_async_p): New.
13421 (delete_lwp): New.
13422 (handle_extended_wait): Use lwpid_of.
13423 (add_lwp): Don't set lwpid field.
13424 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13425 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13426 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13427 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13428 first. Adjust to linux_wait_for_event interface changes. Use
13429 lwpid_of.
13430 (linux_detach): Don't delete the main lwp here.
13431 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13432 (status_pending_p): Don't consider explicitly suspended lwps.
13433 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13434 pointer. Add OPTIONS argument. Change return type to int. Use
13435 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13436 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13437 pointer. Add status pointer argument. Return a pid instead of a
13438 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13439 changes. In non-stop mode, don't switch to a random thread.
13440 (linux_wait): Rename to...
13441 (linux_wait_1): ... this. Add target_options argument, and handle
13442 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13443 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13444 clean exit and signal exit code. Don't stop all threads in
13445 non-stop mode. In all-stop mode, only stop all threads when
13446 reporting a stop to GDB. Handle explicit thread stop requests.
13447 (async_file_flush, async_file_mark): New.
13448 (linux_wait): New.
13449 (send_sigstop): Use lwpid_of.
13450 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13451 interface changes. In non-stop mode, don't switch to a random
13452 thread.
13453 (linux_resume_one_lwp): Use lwpid_of.
13454 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13455 (linux_resume_one_thread): ... this. Handle resume_stop. In
13456 non-stop mode, don't look for pending flag in all threads.
13457 (resume_status_pending_p): Don't consider explicitly suspended
13458 threads.
13459 (my_waitpid): Reimplement. Emulate __WALL.
13460 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13461 Use lwpid_of.
13462 (sigchld_handler, linux_supports_non_stop, linux_async)
13463 (linux_start_non_stop): New.
13464 (linux_target_ops): Register linux_supports_non_stop, linux_async
13465 and linux_start_non_stop.
13466 (initialize_low): Install SIGCHLD handler.
13467 * thread-db.c (thread_db_create_event, find_one_thread)
13468 (thread_db_get_tls_address): Use lwpid_of.
13469 * win32-low.c (win32_detach): Adjust to use resume_kind.
13470 (win32_wait): Add `options' argument.
13471 * spu-low.c (spu_resume): Adjust to use resume_kind.
13472 (spu_wait): Add `options' argument.
13473
5b1c542e
PA
134742009-04-01 Pedro Alves <pedro@codesourcery.com>
13475
13476 Decouple target code from remote protocol.
13477
13478 * target.h (enum target_waitkind): New.
13479 (struct target_waitstatus): New.
13480 (struct target_ops) <wait>: Return an unsigned long. Take a
13481 target_waitstatus pointer instead of a char pointer.
13482 (mywait): Likewise.
13483 * target.c (mywait): Change prototype to return an unsigned long.
13484 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13485 * server.h (thread_from_wait, old_thread_from_wait): Delete
13486 declarations.
13487 (prepare_resume_reply): Change prototype to take a
13488 target_waitstatus.
13489 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13490 (last_status, last_ptid): New.
13491 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13492 pid instead of a signal.
13493 (attach_inferior): Remove "status" and "signal" parameters.
13494 Adjust.
13495 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13496 not as an address.
13497 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13498 (handle_v_requests, myresume): Remove "status" and "signal"
13499 parameters. Adjust.
13500 (handle_status): New.
13501 (main): Delete local `status'. Adjust.
13502 * remote-utils.c: Include target.h.
13503 (prepare_resume_reply): Change prototype to take a
13504 target_waitstatus. Adjust.
13505
13506 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13507 interface.
13508 * spu-low.c (spu_wait): Adjust.
13509 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13510 Delete.
13511 (win32_wait): Adjust.
13512
2bd7c093
PA
135132009-04-01 Pedro Alves <pedro@codesourcery.com>
13514
13515 * target.h (struct thread_resume): Delete leave_stopped member.
13516 (struct target_ops): Add a `n' argument to the `resume' callback.
13517 * server.c (start_inferior): Adjust.
13518 (handle_v_cont, myresume): Adjust.
13519 * linux-low.c (check_removed_breakpoint): Adjust to resume
13520 interface change, and to removed leave_stopped field.
13521 (resume_ptr): Delete.
13522 (struct thread_resume_array): New.
13523 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13524 resume interface change.
13525 (linux_continue_one_thread, linux_queue_one_thread)
13526 (resume_status_pending_p): Check if the resume field is NULL
13527 instead of checking the leave_stopped member.
13528 (linux_resume): Adjust to the target resume interface change.
13529 * spu-low.c (spu_resume): Adjust to the target resume interface
13530 change.
13531 * win32-low.c (win32_detach, win32_resume): Ditto.
13532
c35fafde
PA
135332009-04-01 Pedro Alves <pedro@codesourcery.com>
13534
13535 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13536 flag.
13537 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13538 pending.
13539 (linux_continue_one_thread): Only preserve the stepping flag if
13540 there's a pending breakpoint.
13541
0a59d50b
PA
135422009-03-31 Pedro Alves <pedro@codesourcery.com>
13543
13544 * server.c (main): After the inferior having exited, call
13545 remote_close before exiting gdbserver.
13546
f04c6d38
TJB
135472009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13548
13549 Fix size of FPSCR in Power 7 processors.
13550 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13551 (PPC_FEATURE_HAS_DFP): New #define.
13552 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13553 size of the FPSCR.
13554
78e5cee6
PA
135552009-03-23 Pedro Alves <pedro@codesourcery.com>
13556
13557 * server.c (handle_query) Whitespace and formatting.
13558
1b3f6016
PA
135592009-03-22 Pedro Alves <pedro@codesourcery.com>
13560
13561 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13562 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13563 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13564 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13565 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13566 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13567 Makefile.in, configure.ac: Fix whitespace throughout.
13568 * configure: Regenerate.
13569
a07b2135
PA
135702009-03-22 Pedro Alves <pedro@codesourcery.com>
13571
13572 * inferiors.c (find_inferior): Make it safe for the callback
13573 function to delete the currently iterated inferior.
13574
67cc2626
PA
135752009-03-22 Pedro Alves <pedro@codesourcery.com>
13576
13577 * Makefile.in (linuw_low_h): Move higher.
13578 (thread-db.o): Depend on $(linux_low_h).
13579
54a0b537
PA
135802009-03-17 Pedro Alves <pedro@codesourcery.com>
13581
13582 Rename "process" to "lwp" throughout.
13583
13584 * linux-low.c (all_processes): Rename to...
13585 (all_lwps): ... this.
13586 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13587 (add_process): Rename to ...
13588 (add_lwp): ... this. Adjust.
13589 (linux_create_inferior): Adjust.
13590 (linux_attach_lwp): Adjust.
13591 (linux_attach): Adjust.
13592 (linux_kill_one_process): Rename to ...
13593 (linux_kill_one_lwp): ... this. Adjust.
13594 (linux_kill): Adjust.
13595 (linux_detach_one_process): Rename to ...
13596 (linux_detach_one_lwp): ... this. Adjust.
13597 (linux_detach): Adjust.
13598 (check_removed_breakpoint): Adjust.
13599 (status_pending_p): Adjust.
13600 (linux_wait_for_process): Rename to ...
13601 (linux_wait_for_lwp): ... this. Adjust.
13602 (linux_wait_for_event): Adjust.
13603 (send_sigstop): Adjust.
13604 (wait_for_sigstop): Adjust.
13605 (stop_all_processes): Rename to ...
13606 (stop_all_lwps): ... this.
13607 (linux_resume_one_process): Rename to ...
13608 (linux_resume_one_lwp): ... this. Adjust.
13609 (linux_set_resume_request, linux_continue_one_thread)
13610 (linux_queue_one_thread, resume_status_pending_p)
13611 (usr_store_inferior_registers, regsets_store_inferior_registers)
13612 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13613 Adjust.
13614 * linux-low.h (get_process): Rename to ...
13615 (get_lwp): ... this. Adjust.
13616 (get_thread_process): Rename to ...
13617 (get_thread_lwp): ... this. Adjust.
13618 (get_process_thread): Rename to ...
13619 (get_lwp_thread): ... this. Adjust.
13620 (struct process_info): Rename to ...
13621 (struct lwp_info): ... this.
13622 (all_processes): Rename to ...
13623 (all_lwps): ... this.
13624 * proc-service.c (ps_lgetregs): Adjust.
13625 * thread-db.c (thread_db_create_event, find_one_thread)
13626 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13627
0b16c5cf
PA
136282009-03-14 Pedro Alves <pedro@codesourcery.com>
13629
13630 * server.c (handle_query): Handle "qAttached".
13631
32de4b9d
NS
136322009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13633
13634 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13635 GPLv3, update license URL.
13636
2aecd87f
DE
136372009-03-01 Doug Evans <dje@google.com>
13638
93efd302 13639 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13640 (server_h): Add gdb_signals.h.
13641 (signals.o): Update.
13642 * server.h (target_signal_from_host,target_signal_to_host_p)
13643 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13644
86b1f9c5
PM
136452009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13646
13647 * remote-utils.c (getpkt): Also generate remote-debug
13648 information if noack_mode is set.
13649
4aa995e1
PA
136502009-02-06 Pedro Alves <pedro@codesourcery.com>
13651
13652 * server.c (handle_query): Report qXfer:siginfo:read and
13653 qXfer:siginfo:write as supported and handle them.
13654 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13655 * linux-low.c (linux_xfer_siginfo): New.
13656 (linux_target_ops): Set it.
13657
62709adf
PA
136582009-01-26 Pedro Alves <pedro@codesourcery.com>
13659
13660 * server.c (gdbserver_usage): Mention --remote-debug.
13661 (main): Accept '--remote-debug' switch.
13662
aef93bd7
DE
136632009-01-18 Doug Evans <dje@google.com>
13664
13665 * regcache.c (new_register_cache): No need to check result of xcalloc.
13666 * server.c (handle_search_memory): Back out calls to xmalloc,
13667 result is checked and error is returned to user upon failure.
13668 (handle_query): Ditto. Add more checks for result of malloc.
13669 (handle_v_cont): Check result of malloc, report error back to
13670 user upon failure.
13671 (handle_v_run): Ditto. Call freeargv.
13672 * server.h (freeargv): Declare.
13673 * utils.c (freeargv): New fn.
13674
54363045
DE
136752009-01-15 Doug Evans <dje@google.com>
13676
f626972c
DE
13677 * gdbreplay.c (perror_with_name): Make arg const char *.
13678 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13679 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13680 * utils.c (perror_with_name): Make arg const char *.
54363045 13681
18aae699
PA
136822009-01-14 Pedro Alves <pedro@codesourcery.com>
13683
13684 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13685 when handling a EXIT_PROCESS_DEBUG_EVENT.
13686
ff703abe
JB
136872009-01-06 Joel Brobecker <brobecker@adacore.com>
13688
13689 * gdbreplay.c (gdbreplay_version): Update copyright year.
13690 * server.c (gdbserver_version): Likewise.
13691
f21cc1a2 136922009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13693
13694 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13695 (handle_extended_wait): Improve comment.
0e21c1ec 13696
bca929d3
DE
136972008-12-13 Doug Evans <dje@google.com>
13698
13699 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13700 * server.h (ATTR_MALLOC): New macro.
13701 (xmalloc,xcalloc,xstrdup): Declare.
13702 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13703 * inferiors.c: Ditto.
13704 * linux-low.c: Ditto.
13705 * mem-break.c: Ditto.
13706 * regcache.c: Ditto.
13707 * remote-utils.c: Ditto.
13708 * server.c: Ditto.
13709 * target.c: Ditto.
13710 * win32-low.c: Ditto.
13711
97438e3f
DE
137122008-12-12 Doug Evans <dje@google.com>
13713
896c7fbb
DE
13714 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13715 in debugging printf.
13716
97438e3f
DE
13717 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13718
e3b886f8
DE
137192008-12-09 Doug Evans <dje@google.com>
13720
13721 * linux-low.h (struct process_info): Delete member tid, unused.
13722 * thread-db.c (find_one_thread): Update.
13723 (maybe_attach_thread): Update.
13724
07e059b5
VP
137252008-12-02 Pedro Alves <pedro@codesourcery.com>
13726
889bf7c5
PA
13727 * target.h (struct target_ops): Add qxfer_osdata member.
13728 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13729 and dirent.h.
13730 (linux_qxfer_osdata): New functions.
13731 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13732 callback.
13733 * server.c (handle_query): Handle "qXfer:osdata:read:".
13734 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13735 (buffer_xml_printf): New functions.
13736 * server.h (struct buffer): New.
13737 (buffer_grow_str, buffer_grow_str0): New macros.
13738 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13739 (buffer_xml_printf): Declare.
07e059b5 13740
4cab47ab
DE
137412008-11-24 Doug Evans <dje@google.com>
13742
13743 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13744
f142445f
DJ
137452008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13746
13747 * server.c (handle_v_run): Always use the supplied argument list.
13748
d0107bb6 137492008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13750
d0107bb6
BW
13751 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13752 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13753
2c4ad781
TJB
137542008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13755
13756 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13757 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13758 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13759 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13760 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13761 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13762 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13763 XML target descriptions.
13764 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13765 when inferior is running on an ISA 2.05 or later processor. Add
13766 special case to return offset for full 64-bit slot of FPSCR when
13767 in 32-bits.
13768
dfb64f85
DJ
137692008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13770
13771 * Makefile.in (SFILES, clean): Added sparc64 files.
13772 (reg-sparc64.o, reg-sparc64.c): New.
13773 * configure.srv (sparc*-*-linux*): New configuration.
13774 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13775 syscall arguments for SPARC.
13776 (regsets_store_inferior_registers): Likewise.
13777 * linux-sparc-low.c: New file.
13778
66b6e1dd
DE
137792008-10-21 Doug Evans <dje@google.com>
13780
13781 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13782 (READLINE_DIR,READLINE_DEP): Delete.
13783 (INTERNAL_CFLAGS): Update.
13784 (LINTFLAGS): Update.
13785
9b710a42
PA
137862008-10-10 Pedro Alves <pedro@codesourcery.com>
13787
13788 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13789 whole argv from the last run, not just argv[0].
13790
5822d809
PA
137912008-09-08 Pedro Alves <pedro@codesourcery.com>
13792
13793 * regcache.c (new_register_cache): Return NULL if the register
13794 cache size isn't known yet.
13795 (free_register_cache): Avoid dereferencing a NULL regcache.
13796
74aac56f
DJ
137972008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13798
13799 * configure.srv: Merge MIPS and MIPS64.
13800
400b20f5
MR
138012008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13802
13803 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13804
677c5bb1
LM
138052008-08-18 Luis Machado <luisgpm@br.ibm.com>
13806
13807 * Makefile.in: Add required vsx dependencies.
13808
13809 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13810 Declare init_registers_powerpc_vsx32l.
13811 Declare init_registers_powerpc_vsx64l.
13812 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13813 (ppc_arch_setup): Check for VSX in hwcap.
13814 (ppc_fill_vsxregset): New function.
13815 (ppc_store_vsxregset): New function.
13816 Add new VSX entry in regset_info target_regsets.
13817
13818 * configure.srv: Add new VSX dependencies.
13819
a6f3e723
SL
138202008-08-12 Pedro Alves <pedro@codesourcery.com>
13821
13822 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13823 (remote_open): Set or clear transport_is_reliable.
13824 (putpkt_binary): Don't expect acks in noack mode.
13825 (getpkt): Don't send ack/nac in noack mode.
13826 * server.c (handle_general_set): Handle QStartNoAckMode.
13827 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13828 qSupported.
13829 (main): Reset noack_mode on every connection.
13830 * server.h (noack_mode): Declare.
13831
a417dc56
RW
138322008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13833
13834 * Makefile.in (GDBREPLAY_OBS): New variable.
13835 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13836
3221518c
UW
138372008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13838 Daniel Jacobowitz <dan@codesourcery.com>
13839
13840 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13841 (usr_store_inferior_registers): Likewise.
13842 (regsets_store_inferior_registers): Likewise.
13843
ec56be1b
PA
138442008-07-31 Rolf Jansen <rj@surtec.com>
13845 Pedro Alves <pedro@codesourcery.com>
13846
13847 * configure.ac: Check for memmem declaration.
13848 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13849 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13850 (disable_packet_qfThreadInfo): Unconditionally compile.
13851 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13852 * configure, config.in: Regenerate.
13853
2fe5e3ff
DE
138542008-07-28 Doug Kwan <dougkwan@google.com>
13855
13856 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13857 (linux_write_memory): Remove declaration of errno.
13858
836acd6d
UW
138592008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13860
13861 * linux-low.c (handle_extended_wait): Do not use "status"
13862 variable uninitialized.
13863
aeba519e
PA
138642008-07-07 Pedro Alves <pedro@codesourcery.com>
13865
13866 * server.c (handle_v_attach): Inhibit reporting dll changes.
13867
db42f210
PA
138682008-06-27 Pedro Alves <pedro@codesourcery.com>
13869
13870 * remote-utils.c (prepare_resume_reply): If requested, don't
13871 output "thread:TID" in the T stop reply.
13872
13873 * server.c (disable_packet_vCont, disable_packet_Tthread)
13874 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13875 (handle_query): If requested, disable support for qC, qfThreadInfo
13876 and qsThreadInfo.
13877 (handle_v_requests): If requested, disable support for vCont.
13878 (gdbserver_show_disableable): New.
13879 (main): Handle --disable-packet and --disable-packet=LIST.
13880
13881 * server.h (disable_packet_vCont, disable_packet_Tthread)
13882 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13883
8e4c5421
CD
138842008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13885
13886 * server.c (gdbserver_usage): Mention --version.
13887
6e23a804
DJ
138882008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13889
13890 * Makefile.in (gdbreplay.o): New rule.
13891
90aa6a40
JM
138922008-06-06 Joseph Myers <joseph@codesourcery.com>
13893
13894 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13895 message, not gdbserver.
13896
c16158bc 138972008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13898 Nathan Sidwell <nathan@codesourcery.com>
13899 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13900
13901 * acinclude.m4: Include ../../config/acx.m4.
13902 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13903 * configure, config.in: Regenerate.
13904 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13905 * server.c (gdbserver_version): Print PKGVERSION.
13906 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13907 (main): Adjust gdbserver_usage calls.
13908 * gdbreplay.c (version, host_name): Add declarations.
13909 (gdbreplay_version, gdbreplay_usage): New.
13910 (main): Accept --version and --help options.
13911
aeb75bf5
DJ
139122008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13913
13914 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13915 (arm_breakpoint_at): Handle Thumb.
13916 (the_low_target): Add comment.
13917
76b233dd
UW
139182008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13919
13920 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13921
08388c79
DE
139222008-05-09 Doug Evans <dje@google.com>
13923
a3c83fae
DE
13924 * server.h (decode_search_memory_packet): Declare.
13925 * remote-utils.c (decode_search_memory_packet): New fn.
13926 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13927 (handle_search_memory): New fn.
13928 (handle_query): Process qSearch:memory packets.
13929
bb9c3d36
UW
139302008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13931
13932 * regcache.c (registers_length): Remove.
13933 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13934 full register packet.
13935 * regcache.h (registers_length): Remove prototype.
13936 * server.h (PBUFSIZ): Define to 16384.
13937
7284e1be
UW
139382008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13939
13940 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13941 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13942 powerpc-64l.o, and powerpc-altivec64l.o.
13943 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13944 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13945 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13946 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13947 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13948 to srv_xmlfiles.
13949
13950 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13951 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13952 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13953 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13954 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13955 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13956 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13957 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13958 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13959 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13960 (clean): Update.
13961
13962 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13963 (init_registers_powerpc_32l): ... this new prototype.
13964 (init_registers_powerpc_32): Remove, replace by ...
13965 (init_registers_powerpc_altivec32l): ... this new prototype.
13966 (init_registers_powerpc_e500): Remove, replace by ...
13967 (init_registers_powerpc_e500l): ... this new prototype.
13968 (init_registers_ppc64): Remove, replace by ...
13969 (init_registers_powerpc_64l): ... this new prototype.
13970 (init_registers_powerpc_64): Remove, replace by ...
13971 (init_registers_powerpc_altivec64l): ... this new prototype.
13972 (ppc_num_regs): Set to 73.
13973 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13974 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13975 (ppc_cannot_store_register): Handle orig_r3 and trap.
13976 (ppc_arch_setup): Update init_registers_... calls.
13977 (ppc_fill_gregset): Handle orig_r3 and trap.
13978
13979 * inferiors.c (clear_inferiors): Reset current_inferior.
13980
fdc59709
PB
139812008-04-23 Paolo Bonzini <bonzini@gnu.org>
13982
889bf7c5
PA
13983 * acinclude.m4: Add override.m4.
13984 * configure: Regenerate.
fdc59709 13985
c9b2f845
UW
139862008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13987
13988 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13989 initial call to init_register_ppc64.
13990
550512b8
UW
139912008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13992
43aaf8b6
PA
13993 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13994 single powerpc*-*-linux* case.
550512b8
UW
13995 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13996
b6430ec3
UW
139972008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13998
13999 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 14000 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
14001 from reg_xmlfiles.
14002 * linux-ppc-low.c: Include <elf.h>.
14003 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14004 (ppc_hwcap): New global variable.
14005 (ppc_regmap): Remove __SPE__ #ifdef sections.
14006 (ppc_regmap_e500): New global variable.
14007 (ppc_cannot_store_register): Update __SPE__ special case.
14008 (ppc_get_hwcap): New function.
14009 (ppc_arch_setup): Use it to determine whether inferior supports
14010 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14011 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14012 Do not access registers if target does not support AltiVec.
14013 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14014 Do not access registers if target does not support SPE.
14015 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14016
52fa2412
UW
140172008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14018
14019 * linux-low.c (disabled_regsets, num_regsets): New.
14020 (use_regsets_p): Delete.
14021 (linux_wait_for_process): Clear disabled_regsets.
14022 (regsets_fetch_inferior_registers): Check and set it.
14023 (regsets_store_inferior_registers): Likewise.
14024 (linux_fetch_registers, linux_store_registers): Do not use
14025 use_regsets_p.
14026 (initialize_low): Allocate disabled_regsets.
14027
e28b3332
DJ
140282008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14029
14030 * Makefile.in (LIBOBJS): New.
14031 (OBS): Use LIBOBJS.
14032 (memmem.o): New rule.
14033 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14034 * configure: Regenerated.
14035
4536995d
UW
140362008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14037
14038 * server.c (handle_query): Never return "unsupported" for
14039 qXfer:features:read queries.
14040
221c031f
UW
140412008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14042
14043 * server.c (get_features_xml): Fix inverted condition.
14044 (handle_query): Always support qXfer:feature:read.
14045
ccd213ac
DJ
140462008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14047
14048 * server.c (wrapper_argv): New.
14049 (start_inferior): Handle wrapper_argv. If set, expect an extra
14050 trap.
14051 (gdbserver_usage): Document --wrapper.
14052 (main): Parse --wrapper.
14053
6fe305f7
UW
140542008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14055
14056 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14057 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14058 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14059 (ppc_set_pc): Likewise.
14060 (ppc_arch_setup): New function.
14061 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14062 of collect_register.
889bf7c5 14063 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 14064
5b0a002e
UW
140652008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14066
14067 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14068 instead of linux-ppc64-low.o.
14069 * linux-ppc64-low.c: Remove file.
14070 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14071 (linux-ppc64-low.o): Remove rule.
14072
14073 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14074 (init_registers_powerpc_64): Likewise.
14075 (ppc_regmap): Conditionally define depending on __powerpc64__.
14076 (ppc_cannot_store_register): Do not special-case "fpscr" when
14077 compiled on __powerpc64__.
14078 (ppc_collect_ptrace_register): New function.
14079 (ppc_supply_ptrace_register): New function.
14080 (ppc_breakpoint): Change type to "unsigned int".
14081 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14082 (the_low_target): Conditionally provide initializers for the
889bf7c5 14083 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
14084 collect_ptrace_register and supply_ptrace_register members.
14085
9b4b61c8
UW
140862008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14087
14088 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14089 * server.c (gdbserver_xmltarget): Define.
14090 (get_features_xml): Use it to replace "target.xml" and arch_string.
14091
14092 * configure.srv: Remove srv_xmltarget. Add XML files that were
14093 mentioned there to srv_xmlfiles instead. Remove conditional tests
14094 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14095 srv_xmlfiles and srv_regobj to include all possible choices.
14096 * configure.ac (srv_xmltarget): Remove.
14097 (srv_xmlfiles): Do not add "target.xml".
14098 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14099 checks for supplementary target information.
14100 * configure: Regenerate.
14101 * Makefile.in (XML_TARGET): Remove.
14102 (target.xml): Remove rule.
14103 (clean): Do not clean up target.xml.
14104 (.PRECIOUS): Do not mention target.xml.
14105
14106 * target.h (struct target_ops): Remove arch_string member.
14107 * linux-low.c (linux_arch_string): Remove.
14108 (linux_target_ops): Remove arch_string initializer.
14109 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14110 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14111 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14112 * spu-low.c (spu_arch_string): Remove.
14113 (spu_target_ops): Remove arch_string initializer.
14114 * win32-low.c (win32_arch_string): Remove.
14115 (win32_target_ops): Remove arch_string initializer.
14116 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14117 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14118 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14119
ee1a7ae4
UW
141202008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14121
14122 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14123 by collect_ptrace_register and supply_ptrace_register hooks.
14124 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14125 instead of checking for the_low_target.left_pad_xfer.
14126 (usr_store_inferior_registers): Use collect_ptrace_register callback
14127 instead of checking for the_low_target.left_pad_xfer.
14128
14129 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14130 (s390_supply_ptrace_register): Likewise.
14131 (s390_fill_gregset): Call s390_collect_ptrace_register.
14132 (the_low_target): Update.
14133
14134 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14135 (ppc_supply_ptrace_register): Likewise.
14136 (the_low_target): Update.
14137
14138 * linux-i386-low.c (the_low_target): Update.
14139 * linux-x86-64-low.c (the_low_target): Update.
14140
d61ddec4
UW
141412008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14142
14143 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14144 reg-s390.o and reg-s390x.o.
14145
14146 * linux-low.c (new_inferior): New global variable.
14147 (linux_create_inferior, linux_attach): Set it.
14148 (linux_wait_for_process): Call the_low_target.arch_setup after the
14149 target has stopped for the first time.
14150 (initialize_low): Do not call the_low_target.arch_setup.
14151
14152 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14153 (s390_set_pc): Likewise.
14154 (s390_arch_setup): New function.
14155 (the_low_target): Use s390_arch_setup as arch_setup routine.
14156
14157 * regcache.c (realloc_register_cache): New function.
14158 (set_register_cache): Call it for each existing regcache.
14159
d05b4ac3
UW
141602008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14161
14162 * server.h (init_registers): Remove prototype.
14163
14164 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14165 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14166 instead of init_registers ().
14167 * linux-arm-low.c (init_registers_arm): Add prototype.
14168 (init_registers_arm_with_iwmmxt): Likewise.
14169 (the_low_target): Add initializer for arch_setup field.
14170 * linux-cris-low.c (init_registers_cris): Add prototype.
14171 (the_low_target): Add initializer for arch_setup field.
14172 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14173 (the_low_target): Add initializer for arch_setup field.
14174 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14175 (the_low_target): Add initializer for arch_setup field.
14176 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14177 (the_low_target): Add initializer for arch_setup field.
14178 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14179 (the_low_target): Add initializer for arch_setup field.
14180 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14181 (the_low_target): Add initializer for arch_setup field.
14182 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14183 (init_registers_mips64_linux): Likewise.
14184 (the_low_target): Add initializer for arch_setup field.
14185 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14186 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14187 (the_low_target): Add initializer for arch_setup field.
14188 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14189 (init_registers_powerpc_64): Likewise.
14190 (the_low_target): Add initializer for arch_setup field.
14191 * linux-s390-low.c (init_registers_s390): Add prototype.
14192 (init_registers_s390x): Likewise.
14193 (the_low_target): Add initializer for arch_setup field.
14194 * linux-sh-low.c (init_registers_sh): Add prototype.
14195 (the_low_target): Add initializer for arch_setup field.
14196 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14197 (the_low_target): Add initializer for arch_setup field.
14198 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14199 (the_low_target): Add initializer for arch_setup field.
14200
14201 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14202 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14203 instead of init_registers ().
14204 * win32-arm-low.c (init_registers_arm): Add prototype.
14205 (the_low_target): Add initializer for arch_setup field.
14206 * win32-i386-low.c (init_registers_i386): Add prototype.
14207 (the_low_target): Add initializer for arch_setup field.
14208
14209 * spu-low.c (init_registers_spu): Add prototype.
14210 (initialize_low): Call initialie_registers_spu () instead of
14211 initialize_registers ().
14212
fd96d250
PA
142132008-02-19 Pedro Alves <pedro@codesourcery.com>
14214
14215 * server.c (handle_v_requests): When handling the vRun and vAttach
14216 packets, if already debugging a process, don't kill it. Return an
14217 error instead.
14218
d41b6bb4
DJ
142192008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14220
14221 * server.c (handle_query): Correct length check.
14222
5ac588cf
PA
142232008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14224
14225 * win32-low.c (do_initial_child_stuff): Add process handle
14226 parameter. Set current_process_handle and current_process_id from the
14227 parameters. Clear globals.
14228 (win32_create_inferior): Don't set current_process_handle and
14229 current_process_id here. Instead pass them on the call to
14230 do_initial_child_stuff.
14231 (win32_attach): Likewise.
14232 (win32_clear_inferiors): New.
14233 (win32_kill): Don't close the current process handle or the
14234 current thread handle here. Instead call win32_clear_inferiors.
14235 (win32_detach): Don't open a new handle to the process. Call
14236 win32_clear_inferiors.
14237 (win32_join): Don't rely on current_process_handle; open a new
14238 handle using the process id.
14239 (win32_wait): Call win32_clear_inferiors when the inferior process
14240 has exited.
14241
ecd7ecbc
DJ
142422008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14243
14244 * server.c (monitor_show_help): Add "exit".
14245
1525d545
MG
142462008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14247
ecd7ecbc 14248 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
14249 (clean): Add reg-xtensa.c.
14250 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
14251 * configure.srv (xtensa*-*-linux*) New target.
14252 * linux-xtensa-low.c: New.
14253 * xtensa-xtregs.c: New.
1525d545 14254
59a016f0
PA
142552008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14256
14257 * hostio.c: Don't include errno.h.
14258 (errno_to_fileio_errno): Move to hostio-errno.
14259 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14260 error number outputting to the target->hostio_last_error callback.
14261 (hostio_packet_error): Use FILEIO_EINVAL directly.
14262 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14263 calls to hostio_error.
14264 * hostio-errno.c: New.
14265 * server.h (hostio_last_error_from_errno): Declare.
14266 * target.h (target_ops): Add hostio_last_error member.
14267 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14268 as hostio_last_error handler.
889bf7c5 14269 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
14270 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14271 (wince_hostio_last_error): New functions.
14272 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14273 as hostio_last_error handler.
14274 (win32_target_ops) [!_WIN32_WCE]: Register
14275 hostio_last_error_from_errno as hostio_last_error handler.
14276 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14277 (hostio-errno.o): New rule.
14278 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14279 * configure.srv (srv_hostio_err_objs): New variable. Default to
14280 hostio-errno.o.
14281 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14282 * configure: Regenerate.
14283
2d717e4f
DJ
142842008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14285
14286 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14287 (linux_kill, linux_detach): Clean up the process list.
14288 * remote-utils.c (remote_open): Improve port number parsing.
14289 (putpkt_binary, input_interrupt): Only send interrupts if the target
14290 is running.
14291 * server.c (extended_protocol): Make static.
14292 (attached): Define earlier.
14293 (exit_requested, response_needed, program_argv): New variables.
14294 (target_running): New.
14295 (start_inferior): Clear attached here.
14296 (attach_inferior): Set attached here.
14297 (require_running): Define.
14298 (handle_query): Use require_running and target_running. Implement
14299 "monitor exit".
14300 (handle_v_attach, handle_v_run): New.
14301 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14302 (gdbserver_usage): Update.
14303 (main): Redo argument parsing. Handle --debug and --multi. Handle
14304 --attach along with other options or after the port. Save
14305 program_argv. Support no initial program. Resynchronize
14306 communication with GDB after an error. Handle "monitor exit".
14307 Use require_running and target_running. Always allow the extended
14308 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14309 restart in extended mode.
14310 * README: Refer to the GDB manual. Update --attach usage.
14311
7407e2de
AS
143122007-12-20 Andreas Schwab <schwab@suse.de>
14313
14314 * linux-low.c (STACK_SIZE): Define.
14315 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14316 (linux_test_for_tracefork): Likewise.
14317
b65d95c5
DJ
143182007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14319
14320 * linux-low.c (linux_wait_for_event): Update messages. Do not
14321 reinsert auto-delete breakpoints.
14322 * mem-break.c (struct breakpoint): Change return type of handler to
14323 int.
14324 (set_breakpoint_at): Update handler type.
14325 (reinsert_breakpoint_handler): Return 1 instead of calling
14326 delete_breakpoint.
14327 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14328 setting a new one.
14329 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14330 * mem-break.h (set_breakpoint_at): Update handler type.
14331 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14332 * win32-low.c (auto_delete_breakpoint): New.
14333 (get_child_debug_event): Use it.
14334
4e799345
DJ
143352007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14336
14337 * configure.ac: Check for pread and pwrite.
14338 * hostio.c (handle_pread): Fall back to lseek and read.
14339 (handle_pwrite): Fall back to lseek and write.
14340 * config.in, configure: Regenerated.
14341
27524b67
DJ
143422007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14343
14344 * server.c (myresume): Add own_buf argument.
14345 (main): Update calls.
14346
a20d5e98
DJ
143472007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14348
14349 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14350 * remote-utils.c (remote_open): Do not call disable_async_io.
14351 (block_async_io): Delete.
14352 (unblock_async_io): Make static.
14353 (initialize_async_io): New.
14354 * server.c (handle_v_cont): Handle async I/O here.
14355 (myresume): Likewise. Move other common resume tasks here...
14356 (main): ... from here. Call initialize_async_io. Disable async
14357 I/O before the main loop.
14358 * server.h (initialize_async_io): Declare.
14359 (block_async_io, unblock_async_io): Delete prototypes.
14360 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14361
b79d787e
DJ
143622007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14363
14364 * remote-utils.c (readchar): Allow binary data in received messages.
14365
d97903b2
PA
143662007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14367
14368 * win32-low.c (attaching): New global.
14369 (win32_create_inferior): Clear the `attaching' global.
14370 (win32_attach): Set the `attaching' global.
14371 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14372 attaching. Only set a breakpoint at the entry point if not
14373 attaching.
14374
311de423
PA
143752007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14376
14377 * server.c (main): Don't report dll events on the initial
14378 connection on attaches.
14379
6c2d16d2
PA
143802007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14381
14382 * server.c (main): Relax numerical bases supported for the pid of
14383 the --attach command line argument.
14384
5ca906e6
PA
143852007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14386
14387 * win32-low.c (win32_attach): Call OpenProcess before
14388 DebugActiveProcess, not after. Add last error output to error
14389 call.
14390
9c6c8194
PA
143912007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14392
14393 * win32-low.c (win32_get_thread_context)
14394 (win32_set_thread_context): New functions.
14395 (thread_rec): Use win32_get_thread_context.
14396 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14397 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14398 field.
14399
4d5d1aaa
PA
144002007-12-03 Leo Zayas
14401 Pedro Alves <pedro_alves@portugalmail.pt>
14402
14403 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14404 global variables.
14405 (child_add_thread): Minor cleanup.
14406 (child_continue): Resume artificially suspended threads before
14407 calling ContinueDebugEvent.
14408 (suspend_one_thread): New.
14409 (fake_breakpoint_event): New.
14410 (get_child_debug_event): Change return type to int. Check here if
14411 gdb sent an interrupt request. If a soft interrupt was requested,
14412 fake a breakpoint event. Return 0 if there is no event to handle,
14413 and 1 otherwise.
14414 (win32_wait): Don't check here if gdb sent an interrupt request.
14415 Ensure there is a valid event to handle.
14416 (win32_request_interrupt): Add soft interruption method as last
14417 resort.
14418
c436e841
PA
144192007-12-03 Leo Zayas
14420 Pedro Alves <pedro_alves@portugalmail.pt>
14421
14422 * win32-low.h (win32_thread_info): Add descriptions to the
14423 structure members. Replace `suspend_count' counter by a
14424 `suspended' flag.
14425 * win32-low.c (thread_rec): Update condition of when to get the
14426 context from the inferior. Rely on ContextFlags being set if it
14427 has already been retrieved. Only suspend the inferior thread if
14428 we haven't already. Warn if that fails.
14429 (continue_one_thread): s/suspend_count/suspended/. Only call
14430 ResumeThread once. Warn if that fails.
14431
e7b5fa67
PA
144322007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14433
14434 * win32-low.c (win32_wait): Don't read from the inferior when it
14435 has already exited.
14436
a385171d
PA
144372007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14438
14439 * Makefile.in (win32_low_h): New variable.
14440 (win32-low.o): Add dependency on $(win32_low_h).
14441 (win32-arm-low.o, win32-i386-low.o): New rules.
14442
f80c84b3
DJ
144432007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14444
14445 * hostio.c: Correct copyright year.
14446
a6b151f1
DJ
144472007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14448
14449 * Makefile.in (OBS): Add hostio.o.
14450 (hostio.o): New rule.
14451 * server.h (handle_vFile): Declare.
14452 * hostio.c: New file.
14453 * server.c (handle_v_requests): Take packet_len and new_packet_len
14454 for binary packets. Call handle_vFile.
14455 (main): Update call to handle_v_requests.
14456
f9387fc3
DJ
144572007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14458
14459 * linux-low.c: Include <sched.h>.
14460
51c2684e
DJ
144612007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14462
14463 * linux-low.c (linux_tracefork_grandchild): New.
14464 (linux_tracefork_child): Use clone.
14465 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14466
75f83163
JB
144672007-10-31 Joel Brobecker <brobecker@adacore.com>
14468
14469 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14470
da5898ce
DJ
144712007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14472
14473 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14474
24a09b5f
DJ
144752007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14476
14477 * inferiors.c (change_inferior_id): Delete.
14478 (add_pid_to_list, pull_pid_from_list): New.
14479 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14480 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14481 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14482 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14483 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14484 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14485 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14486 (using_threads): Always set to 1.
14487 (handle_extended_wait): New.
14488 (add_process): Do not set TID.
14489 (linux_create_inferior): Set must_set_ptrace_flags.
14490 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14491 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14492 (linux_thread_alive): Rename TID argument to LWPID.
14493 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14494 (linux_wait_for_event): Do not use TID or check using_threads. Update
14495 call to dead_thread_notify. Call handle_extended_wait.
14496 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14497 (send_sigstop): Delete sigstop_sent.
14498 (wait_for_sigstop): Avoid TID.
14499 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14500 (linux_test_for_tracefork): New.
14501 (linux_lookup_signals): Use thread_db_active and
14502 linux_supports_tracefork_flag.
14503 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14504 * linux-low.h (get_process_thread): Avoid TID.
14505 (struct process_ifo): Move thread_known and tid to the end. Remove
14506 sigstop_sent.
14507 (linux_attach_lwp, thread_db_init): Update prototypes.
14508 * server.h (change_inferior_id): Delete prototype.
14509 (add_pid_to_list, pull_pid_from_list): New prototypes.
14510 * thread-db.c (thread_db_use_events): New.
14511 (find_first_thread): Rename to...
14512 (find_one_thread): ...this. Update callers and messages. Do not
14513 call fatal. Check thread_db_use_events. Do not call
14514 change_inferior_id or new_thread_notify.
14515 (maybe_attach_thread): Update. Do not call new_thread_notify.
14516 (thread_db_init): Set thread_db_use_events. Check use_events.
14517 * utils.c (fatal, warning): Correct message prefix.
14518
30ed0a8f
DJ
145192007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14520
14521 * Makefile.in (clean): Remove new files.
14522 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14523 (powerpc-64.o, powerpc-64.c): New rules.
14524 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14525 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14526 with SPE.
14527 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14528 SPE targets.
14529 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14530 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14531 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14532 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14533 (target_regsets): Add AltiVec and SPE register sets.
14534 * configure.ac: Check for AltiVec and SPE.
14535 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14536 (ppc_fill_vrregset, ppc_store_vrregset): New.
14537 (target_regsets): Add AltiVec register set.
14538 * configure: Regenerated.
14539
fd462a61
DJ
145402007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14541
14542 * linux-low.c (O_LARGEFILE): Define.
14543 (linux_read_memory): Use /proc/PID/mem.
14544 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14545 * configure, config.in: Regenerated.
14546
69f223ed
DJ
145472007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14548
14549 * linux-low.c (linux_wait_for_event): Do not pass signals while
14550 single-stepping.
14551
aec18585
PA
145522007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14553
14554 * win32-low.c (create_process): New.
14555 (win32_create_inferior): Use create_process instead of
14556 CreateProcess. If create_process failed retry appending an ".exe"
14557 suffix. Store the GetLastError result immediatelly after
14558 create_process calls and use it on the call to error.
14559
34d86ddd
PA
145602007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14561
14562 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14563
5a0e3bd0
JB
145642007-08-23 Joel Brobecker <brobecker@adacore.com>
14565
14566 * configure.ac: Switch license to GPLv3.
14567
f88c79e6
MS
145682007-08-01 Michael Snyder <msnyder@access-company.com>
14569
14570 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14571
6b3d9b83
PA
145722007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14573
14574 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14575 typedef.
14576 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14577 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14578 CloseToolhelp32Snapshot.
14579 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14580 CloseToolhelp32Snapshot.
14581
c588c53c
MS
145822007-07-27 Michael Snyder <michael.snyder@access-company.com>
14583
14584 * server.c (main): Check for inferior exit before main loop.
14585
aa0403d9
PA
145862007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14587
14588 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14589 instead of on tmp_desc.
14590
255e7678
DJ
145912007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14592 Daniel Jacobowitz <dan@codesourcery.com>
14593
14594 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14595 (add_thread): Minor cleanups.
14596 (clear_inferiors): Move lower in the file. Clear the DLL
14597 list.
14598 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14599 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14600 (xml_escape_text): New.
14601 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14602 for qSupported.
14603 (handle_v_cont): Report errors.
14604 (gdbserver_version): Update.
14605 (main): Correct size of own_buf. Do not report initial DLL events.
14606 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14607 (unloaded_dll, xml_escape_text): New.
14608 * win32-low.c (enum target_waitkind): Update comments.
14609 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14610 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14611 (win32_EnumProcessModules, win32_GetModuleInformation)
14612 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14613 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14614 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14615 (win32_Module32First, win32_Module32Next, load_toolhelp)
14616 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14617 (get_child_debug_event): Handle DLL events.
14618 (win32_wait): Likewise.
14619
0d37add9
DJ
146202007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14621
14622 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14623 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14624
45e2715e
PA
146252007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14626
14627 * win32-low.c (handle_output_debug_string): Ignore event if not
14628 waiting.
14629
c5674cf1
PA
146302007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14631
14632 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14633
2bbe3cc1
DJ
146342007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14635
14636 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14637
ae13219e
DJ
146382007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14639
14640 * inferiors.c (change_inferior_id): Add comment.
14641 * linux-low.c (check_removed_breakpoint): Add an early
14642 prototype. Improve debug output.
14643 (linux_attach): Doc update.
14644 (linux_detach_one_process, linux_detach): Clean up before releasing
14645 each process.
14646 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14647 * linux-low.h (struct process_info): Doc improvement.
14648 * mem-break.c (delete_all_breakpoints): New.
14649 * mem-break.h (delete_all_breakpoints): New prototype.
14650 * thread-db.c (find_first_thread): New.
14651 (thread_db_create_event): Call it instead of
14652 thread_db_find_new_threads. Clean up unused variables.
14653 (maybe_attach_thread): Remove first thread handling.
14654 (thread_db_find_new_threads): Use find_first_thread.
14655 (thread_db_get_tls_address): Likewise.
14656
4105de34
DJ
146572007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14658
14659 * thread-db.c (thread_db_find_new_threads): Add prototype.
14660 (thread_db_create_event): Check for the main thread before adding
14661 a new thread.
14662 (maybe_attach_thread): Only enable event reporting if TID == 0.
14663 (thread_db_get_tls_address): Check for new threads.
14664
2b876972
DJ
146652007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14666
14667 * linux-low.c (linux_create_inferior): Try execv before execvp.
14668 * spu-low.c (spu_create_inferior): Likewise.
14669
7a245884
DJ
146702007-06-13 Mike Frysinger <vapier@gentoo.org>
14671
14672 * linux-low.c (linux_create_inferior): Change execv to execvp.
14673 * spu-low.c (spu_create_inferior): Likewies.
14674
117ce543
DJ
146752007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14676
14677 * Makefile.in (clean): Clean new files instead of deleted ones.
14678 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14679 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14680 rules.
14681 * configure.srv: Specify XML files and new regformats for MIPS and
14682 MIPS64 GNU/Linux.
14683 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14684 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14685 an entry for the restart register.
14686 (mips_cannot_fetch_register, mips_cannot_store_register)
14687 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14688 register names to match the XML descriptions.
14689 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14690 restart register instead of $0.
14691
0e7f50da
UW
146922007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14693 Markus Deuling <deuling@de.ibm.com>
14694
14695 * remote-utils.c (decode_xfer_write): New function.
14696 * server.h (decode_xfer_write): Add prototype.
14697 * server.c (handle_query): Add PACKET_LEN argument. Support
14698 qXfer:spu:read and qXfer:spu:write packets.
14699 (main): Pass packet_len to handle_query.
14700 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14701 * target.h (target_ops): Add qxfer_spu.
14702
374c1d38
UW
147032007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14704
14705 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14706 accessing non-seekable spufs files.
14707
bb63802a
UW
147082007-05-16 Markus Deuling <deuling@de.ibm.com>
14709
889bf7c5 14710 * server.c (handle_query): Add reply for qC packet.
bb63802a 14711
7390519e
PA
147122007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14713 Leo Zayas <lerele@champenstudios@com>
14714
14715 * server.h (check_remote_input_interrupt_request): New function.
14716 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14717 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14718 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14719 (check_remote_input_interrupt_request): New function.
14720 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14721 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14722 winapi_GenerateConsoleCtrlEvent): New typedefs.
14723 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14724 to 250 ms.
14725 (win32_wait): Check for remote interrupt request
14726 with check_remote_input_interrupt_request.
14727 (win32_request_interrupt): New function.
14728 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14729
34b34921
PA
147302007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14731
14732 * win32-low.c (debug_registers_changed,
14733 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14734 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14735 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14736 (thread_rec): Get context using the low target.
14737 (child_add_thread): Call thread_added on the low target,
14738 which does the same thing.
14739 (regptr): Delete.
14740 (do_initial_child_stuff): Remove debug registers references.
14741 Set context using the low target. Resume threads after
14742 setting the contexts.
14743 (child_continue): Remove dead variable. Remove debug
14744 registers references.
14745 (child_fetch_inferior_registers): Go through the low target.
14746 (do_child_store_inferior_registers): Remove.
14747 (child_store_inferior_registers): Go through the low target.
14748 (win32_resume): Remove debug registers references.
14749 Set context using the low target.
14750 (handle_exception): Change return type to void. Don't record
14751 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14752 first chance exception.
889bf7c5 14753 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14754 goto loop. Always return after waiting for debug event.
14755 (win32_wait): Convert to switch statement. Handle spurious
14756 events.
14757
14758 * win32-i386-low.c (debug_registers_changed,
14759 debug_registers_used): New.
14760 (initial_stuff): Rename to ...
14761 (i386_initial_stuff): ... this. Clear debug registers
14762 state variables.
14763 (store_debug_registers): Delete.
14764 (i386_get_thread_context): New.
14765 (load_debug_registers): Delete.
14766 (i386_set_thread_context): New.
14767 (i386_thread_added): New.
14768 (single_step): Rename to ...
14769 (i386_single_step): ... this.
14770 (do_fetch_inferior_registers): Rename to ...
14771 (i386_fetch_inferior_register): ... this.
14772 (i386_store_inferior_register): New.
14773 (the_low_target): Adapt to new interface.
14774
14775 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14776 (arm_get_thread_context): New.
14777 (arm_set_thread_context): New.
14778 (regptr): New.
14779 (do_fetch_inferior_registers): Rename to ...
14780 (arm_fetch_inferior_register): ... this.
14781 (arm_store_inferior_register): New.
14782 (arm_wince_breakpoint): Reimplement as unsigned long.
14783 (arm_wince_breakpoint_len): Define.
14784 (the_low_target): Adapt to new interface.
14785
14786 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14787 load_debug_registers. Add get_thread_context, set_thread_context,
14788 thread_added and store_inferior_register. Rename
14789 fetch_inferior_registers to fetch_inferior_register.
14790 (regptr): Remove declaration.
14791
dd6953e1
PA
147922007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14793
14794 * linux-low.c (linux_detach): Change return type to int. Return 0.
14795 * spu-low.c (spu_detach): Likewise.
14796
444d6139
PA
147972007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14798
14799 * target.h (target_ops): Change return type of detach to int.
14800 Add join.
14801 (join_inferior): New.
14802 * server.c (main): Don't skip detach support on mingw32.
14803 If the inferior doesn't support detaching return error.
14804 Call join_inferior instead of using waitpid.
14805 * linux-low.c (linux_join): New.
14806 (linux_target_op): Add linux_join.
14807 * spu-low.c (spu_join): New.
14808 (spu_target_ops): Add spu_join.
14809 * win32-low.c (win32_detach): Adapt to new interface.
14810 Reopen current_process_handle before detaching. Issue a child
14811 resume before detaching.
14812 (win32_join): New.
14813 (win32_target_op): Add win32_join.
14814
1d5315fe
PA
148152007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14816
14817 * win32-low.c (win32-attach): Fix return value.
14818 * target.h (target_ops): Describe ATTACH return values.
14819
bf914831
PA
148202007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14821
14822 * win32-low.c (GETPROCADDRESS): Define.
14823 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14824 (winapi_DebugSetProcessKillOnExit): Likewise.
14825 (win32_create_inferior): Force usage of ansi CreateProcessA.
14826 (win32_attach): Use GETPROCADDRESS.
14827 (win32_detach): Likewise.
14828
f72f3e60
PA
148292007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14830
14831 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14832
ed50f18f
PA
148332007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14834
14835 * win32-low.c: Commit leftover changes from 2007-03-29.
14836
0c2ead7e
DJ
148372007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14838
14839 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14840 fields short instead of int. Add explicit padding.
14841 (i387_cache_to_fsave): Remove unnecessary casts.
14842 (i387_fsave_to_cache): Doc fix.
14843 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14844
73725ff3
DJ
148452007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14846
14847 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14848 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14849
d99f33d8
PA
148502007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14851
14852 * configure.srv (arm*-*-mingw32ce*): Move near the other
14853 arm targets.
14854
68070c10
PA
148552007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14856
2482afc6 14857 * configure.ac: Add errno checking.
68070c10
PA
14858 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14859 sys/file.h and malloc.h.
14860 (AC_CHECK_DECLS): Add perror.
14861 (srv_mingwce): Handle.
2482afc6 14862 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14863 win32-i386-low.o to srv_tgtobj.
14864 (i[34567]86-*-mingw*): Likewise.
14865 (arm*-*-mingw32ce*): Add case.
14866 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14867 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14868 [__MINGW32CE__] (strerror): New function.
14869 [__MINGW32CE__] (errno): Define to GetLastError.
14870 [__MINGW32CE__] (COUNTOF): New macro.
14871 (remote_open): Remove extra close call.
14872 * mem-break.c (delete_breakpoint_at): New function.
14873 * mem-break.h (delete_breakpoint_at): Declare.
14874 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14875 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14876 [USE_WIN32API] (read, write): Add char* casts.
14877 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14878 * server.h: Include wincecompat.h on Windows CE.
14879 [HAVE_ERRNO_H]: Check.
14880 (perror): Declare if not declared.
14881 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14882 (perror_with_name): Remove errno declaration.
14883 * wincecompat.h: New.
14884 * wincecompat.c: New.
14885 * win32-low.h: New.
14886 * win32-arm-low.c: New.
14887 * win32-i386-low.c: New.
14888 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14889 (OUTMSG2): Make it safe.
14890 (_T): New macro.
14891 (COUNTOF): New macro.
14892 (NUM_REGS): Get it from the low target.
14893 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14894 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14895 (thread_rec): Let low target handle debug registers.
14896 (child_add_thread): Likewise.
14897 (child_init_thread_list): Likewise.
14898 (continue_one_thread): Likewise.
14899 (regptr): New.
14900 (do_child_fetch_inferior_registers): Move to ...
14901 * win32-i386-low.c: ... here, and rename to ...
14902 (do_fetch_inferior_registers): ... this.
889bf7c5 14903 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14904 Go through the low target.
14905 (do_child_store_inferior_registers): Use regptr.
14906 (strwinerror): New function.
14907 (win32_create_inferior): Handle Windows CE.
14908 Use strwinerror instead of strerror on Windows error
14909 codes. Add program to the error output.
14910 Don't close the main thread handle on Windows CE.
14911 (win32_attach): Use coredll.dll on Windows CE.
14912 (win32_kill): Close current process and current
14913 thread handles.
14914 (win32_detach): Use coredll.dll on Windows CE.
14915 (win32_resume): Let low target handle debug registers, and
14916 step request.
14917 (handle_exception): Add/Remove initial breakpoint. Avoid
14918 non-existant WSTOPSIG on Windows CE.
14919 (win32_read_inferior_memory): Cast to remove warning.
14920 (win32_arch_string): Go through the low target.
14921 (initialize_low): Call set_breakpoint_data with the low
14922 target's breakpoint.
14923 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14924 FOP_REGNUM, mappings): Move to ...
14925 * win32-i386-low.c: ... here.
14926 * win32-low.c (win32_thread_info): Move to ...
14927 * win32-low.h: ... here.
14928 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14929 win32-arm-low.c and wincecompat.c.
14930 (all:): Add $EXEEXT.
14931 (install-only:): Likewise.
14932 (gdbserver:): Likewise.
14933 (gdbreplay:): Likewise.
14934 * config.in: Regenerate.
14935 * configure: Regenerate.
14936
41093d81
PA
149372007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14938
14939 * win32-low.c: Rename typedef thread_info to
14940 win32_thread_info throughout.
14941
544afa54
PA
149422007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14943
14944 * win32-i386-low.c: Rename to ...
14945 * win32-low.c: ... this.
14946 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14947 * Makefile.in: Likewise.
14948
bce7165d
PA
149492007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14950
14951 * remote-utils.c (monitor_output): Constify msg parameter.
14952 * server.h (monitor_output): Likewise.
14953 * win32-i386-low.c (handle_output_debug_string): New.
14954 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14955 handle_output_debug_string.
14956 (get_child_debug_event): Likewise.
14957
506c7aa0
DJ
149582007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14959
14960 * server.c (main): Correct strtoul check.
14961
42c81e2a
DJ
149622007-03-27 Jon Ringle <jon@ringle.org>
14963
14964 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14965
9453113a
DJ
149662007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14967
14968 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14969
64a69107
DJ
149702007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14971
14972 * terminal.h: Check HAVE_SGTTY_H.
14973
149742007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14975
14976 * remote-utils.c (remote_open): Print out the assigned port number.
14977
c74d0ad8
DJ
149782007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14979
14980 * remote-utils.c (monitor_output): New function.
14981 * server.c (debug_threads): Define here.
14982 (monitor_show_help): New function.
14983 (handle_query): Handle qRcmd.
14984 (main): Do not handle 'd' packet.
14985 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14986 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14987 of debug_threads.
14988
de7c3b4a
PA
149892007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14990
14991 * Makefile.in (EXEEXT): New.
14992 (clean): Use $(EXEEXT).
14993
ef57601b
PA
149942007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14995
14996 * target.h (target_ops): Rename send_signal to request_interrupt,
14997 and remove enum target_signal parameter.
14998 * linux-low.c (linux_request_interrupt): Rename from
14999 linux_send_signal, and always send SIGINT.
15000 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15001 and always send SIGINT.
15002 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15003 of send_signal.
15004 (input_interrupt): Likewise.
15005
820f2bda
PA
150062007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15007
15008 * server.c (get_features_xml): Check if target implemented
15009 arch_string.
15010 * win32-i386-low.c (win32_arch_string): New.
15011 (win32_target_ops): Add win32_arch_string as arch_string member.
15012
ab39bf24
UW
150132007-02-22 Markus Deuling <deuling@de.ibm.com>
15014
15015 * spu-low.c (spu_arch_string): New.
15016 (spu_target_ops): Add spu_arch_string.
15017
61ff6e04
DJ
150182007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15019
15020 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15021 * configure.ac: Do not check for terminal.h.
15022 * configure, config.in: Regenerated.
15023
fb1e4ffc
DJ
150242007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15025
15026 * Makefile.in (OBS): Add $(XML_BUILTIN).
15027 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15028 (clean): Update.
15029 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15030 (arm-with-iwmmxt.c): New.
15031 * config.in, configure: Regenerate.
15032 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15033 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15034 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15035 (arm*-*-linux*): Add iWMMXt and regset support.
15036 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15037 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15038 (arm_store_wmmxregset, target_regsets): New.
15039 * server.c (get_features_xml): Take annex argument. Check builtin
15040 XML documents.
15041 (handle_query): Handle multiple annexes.
15042
0f48aa01
DJ
150432007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15044
15045 * remote-utils.c [USE_WIN32API] (read, write): Define.
15046 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15047 write.
15048
23181151
DJ
150492007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15050
15051 * linux-i386-low.c (the_low_target): Set arch_string.
15052 * linux-x86-64-low.c (the_low_target): Likewise.
15053 * linux-low.c (linux_arch_string): New.
15054 (linux_target_ops): Add it.
15055 * linux-low.h (struct linux_target_ops): Add arch_string.
15056 * server.c (write_qxfer_response): Use const void * for DATA.
15057 (get_features_xml): New.
15058 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15059 * target.h (struct target_ops): Add arch_string method.
15060
9d606399
DJ
150612007-01-03 Denis Pilat <denis.pilat@st.com>
15062 Daniel Jacobowitz <dan@codesourcery.com>
15063
15064 * linux-low.c (linux_kill): Handle being called with no threads.
15065 * win32-i386-low.c (win32_kill): Likewise.
15066 (get_child_debug_event): Clear current_process_handle.
15067
150682006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
15069 Daniel Jacobowitz <dan@codesourcery.com>
15070
15071 * remote-utils.c (remote_open): Check the type of specified
15072 serial port devices before opening them.
15073 * server.c (main): Kill the inferior if an error occurs during
15074 the first remote_open.
15075
a5e13d24
DJ
150762006-12-05 Markus Deuling <deuling@de.ibm.com>
15077
15078 * README: Update supported targets.
15079
186947f7
DJ
150802006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15081
15082 * Makefile.in (clean): Remove reg-mips64.c.
15083 (reg-mips64.c, reg-mips64.o): New rules.
15084 * configure.srv: Handle mips64. Include regset support for mips.
15085 * linux-mips-low.c (union mips_register): New.
15086 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15087 (mips_breakpoint, mips_breakpoint_at): Use int.
15088 (mips_collect_register, mips_supply_register)
15089 (mips_collect_register_32bit, mips_supply_register_32bit)
15090 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15091 (mips_store_fpregset, target_regsets): New.
15092 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15093
a13e2c95
UW
150942006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15095
15096 * configure.srv: Add target "spu*-*-*".
15097 * Makefile.in (clean): Remove reg-spu.c.
15098 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15099 * spu-low.c: New file.
15100
cb7283db
DJ
151012006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15102
15103 * configure.ac: Correct td_thr_tls_get_addr test.
15104 * configure: Regenerated.
15105
89be2091
DJ
151062006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15107
15108 * linux-low.c (linux_wait_for_event): Reformat. Use the
15109 pass_signals array.
15110 * remote-utils.c (decode_address_to_semicolon): New.
15111 * server.c (pass_signals, handle_general_set): New.
15112 (handle_query): Mention QPassSignals for qSupported.
15113 (main): Call handle_general_set.
15114 * server.h (pass_signals, decode_address_to_semicolon): New.
15115
000ef4f0
DJ
151162006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15117
15118 * server.c (handle_query): Correct error handling for read_auxv.
15119
b7149293
UW
151202005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15121
15122 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15123 and srv_linux_thread_db to yes.
15124 * linux-s390-low.c (s390_fill_gregset): New function.
15125 (target_regsets): Define data structure.
15126
dae5f5cf
DJ
151272006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15128
15129 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15130 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15131 * config.in, configure: Regenerated.
15132 * inferiors.c (gdb_id_to_thread): New function.
15133 (gdb_id_to_thread_id): Use it.
15134 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15135 * linux-low.h (struct process_info): Add th member.
15136 (thread_db_get_tls_address): New prototype.
15137 * remote-utils.c (decode_address): Make non-static.
15138 * server.c (handle_query): Handle qGetTLSAddr.
15139 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15140 * target.h (struct target_ops): Add get_tls_address.
15141 * thread-db.c (maybe_attach_thread): Save the thread handle.
15142 (thread_db_get_tls_address): New.
15143
32ca6d61
DJ
151442006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15145
15146 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15147 (linux_resume_one_process): Take a siginfo_t *. Update all
15148 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15149 (struct pending_signals): Add a siginfo_t.
15150 (linux_wait_for_process): Always set last_status.
15151 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15152 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15153 * linux-low.h (struct process_info): Add last_status.
15154
5ffff7c1
DJ
151552006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15156
15157 * remote-utils.c (try_rle): New function.
15158 (putpkt_binary): Use it.
15159
8695c747
DJ
151602006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15161
15162 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15163 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15164 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15165 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15166 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15167 point registers.
15168
290fadea
RS
151692006-08-08 Richard Sandiford <richard@codesourcery.com>
15170
15171 * server.c (terminal_fd): New variable.
15172 (old_foreground_pgrp): Likewise.
15173 (restore_old_foreground_pgrp): New function.
15174 (start_inferior): Record the terminal file descriptor in terminal_fd
15175 and its original foreground group in old_foreground_pgrp. Register
15176 restore_old_foreground_pgrp with atexit().
15177
9f2e1e63
DJ
151782006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15179
15180 * server.c (handle_query): Correct qPart to qXfer.
15181
b80864fb
DJ
151822006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15183
15184 * configure.ac: Check for more headers which are missing on
15185 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15186 * configure.srv: Add Cygwin and mingw32.
15187 * remote-utils.c: Don't include headers unconditionally which
15188 are missing on mingw32. Include <winsock.h> for mingw32.
15189 (remote_open): Adjust for mingw32 support. Flush
15190 standard error after writing to it.
15191 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15192 (unblock_async_io, enable_async_io, disable_async_io)
15193 (readchar, getpkt): Update for Winsock support.
15194 (prepare_resume_reply): Expect a protocol signal number.
15195 * server.c: Disable <sys/wait.h> on mingw32.
15196 (start_inferior): Adjust for mingw32 support. Flush
15197 standard error after writing to it.
15198 (attach_inferior): Likewise. Use protocol signal
15199 numbers.
15200 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15201 and names.
15202 * win32-i386-low.c: New file.
15203 * Makefile.in (XM_CLIBS): Set.
15204 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15205 (win32-i386-low.o): New dependency rule.
15206 * linux-low.c (linux_wait): Use target signal numbers.
15207 * target.h (struct target_ops): Doc fix.
15208 * server.h (target_signal_to_name): New prototype.
15209 * gdbreplay.c: Don't include headers unconditionally which
15210 are missing on mingw32. Include <winsock.h> for mingw32.
15211 (remote_close, remote_open): Adjust for Winsock support.
15212 * configure, config.in: Regenerated.
15213
0876f84a
DJ
152142006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15215
15216 * server.c (decode_xfer_read, write_qxfer_response): New.
15217 (handle_query): Take a packet length argument. Handle
15218 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15219 the qSupported response.
15220 (main): Update call to handle_query.
15221
01f9e8fa
DJ
152222006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15223
15224 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15225 (putpkt_binary): Renamed from putpkt and adjusted for binary
15226 data.
15227 (putpkt): New wrapper for putpkt_binary.
15228 (readchar): Don't mask off the high bit.
15229 (decode_X_packet): New function.
15230 * server.c (main): Call putpkt_binary if a handler sets the packet
15231 length. Save the length of the incoming packet. Handle 'X'.
15232 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15233
be2a5f71
DJ
152342006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15235
15236 * server.c (handle_query): Handle qSupported.
15237
ea025f5f
DJ
152382006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15239
15240 * remote-utils.c (all_symbols_looked_up): New variable.
15241 (look_up_one_symbol): Check it.
15242 * server.h (look_up_one_symbol): New declaration.
15243 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15244
9308fc88
DJ
152452006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15246
15247 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 15248 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
15249 (PTRACE_GET_THREAD_AREA): Define.
15250 (ps_get_thread_area): New function.
15251
52fb6437
NS
152522006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15253
15254 * configure.srv (m68k*-*-uclinux*): New target.
15255 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15256 (linux_resume_one_process): Remove extraneous cast.
15257 (linux_read_offsets): New.
15258 (linux_target_op): Add linux_read_offsets on mmuless systems.
15259 * server.c (handle_query): Add qOffsets logic.
15260 * target.h (struct target_ops): Add read_offsets.
15261
21b0f40c
DJ
152622006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15263
15264 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15265 (PTRACE_GET_THREAD_AREA): Define.
15266 (ps_get_thread_area): New function.
15267 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15268 (linux-x86-64-low.o): Update.
15269
0050a760
DJ
152702006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15271
15272 * configure.ac: Remove checks for prfpregset_t.
15273 * gdb_proc_service.h: New file.
15274 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15275 new "gdb_proc_service.h".
15276 * proc-service.c: Likewise.
15277 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15278 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15279 * Makefile.in (gdb_proc_service_h): Updated.
15280 * configure, config.in: Regenerated.
15281
b92a518e
DJ
152822006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15283
15284 * remote-utils.c (prepare_resume_reply): Move declaration
15285 of gdb_id_from_wait to the top of the block.
15286
545587ee
DJ
152872006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15288
15289 * linux-low.c (regsets_store_inferior_registers): Read the regset
15290 from the target before filling it.
15291
9db87ebd
DJ
152922006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15293
15294 * server.c (attach_inferior): Return SIGTRAP for a successful
15295 attach.
15296
dd24457d
DJ
152972006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15298
15299 * Makefile.in (OBS): Add version.o.
15300 (STAGESTUFF): Delete.
15301 (version.o): Add dependencies.
15302 (version.c): Replace rule.
15303 (clean): Remove version.c.
15304 * server.c (gdbserver_version): New.
15305 (gdbserver_usage): Use printf.
15306 (main): Handle --version and --help.
15307 * server.h (version, host_name): Add declarations.
15308
6f0f660e
EZ
153092005-12-23 Eli Zaretskii <eliz@gnu.org>
15310
889bf7c5
PA
15311 * linux-arm-low.c:
15312 * linux-arm-low.c:
15313 * inferiors.c:
15314 * i387-fp.h:
15315 * i387-fp.c:
15316 * gdbreplay.c:
15317 * regcache.c:
15318 * proc-service.c:
15319 * mem-break.h:
15320 * mem-break.c:
15321 * linux-x86-64-low.c:
15322 * linux-sh-low.c:
15323 * linux-s390-low.c:
15324 * linux-ppc64-low.c:
15325 * linux-ppc-low.c:
15326 * linux-mips-low.c:
15327 * linux-m68k-low.c:
15328 * linux-m32r-low.c:
15329 * linux-low.h:
15330 * linux-low.c:
15331 * linux-ia64-low.c:
15332 * linux-i386-low.c:
15333 * linux-crisv32-low.c:
15334 * thread-db.c:
15335 * terminal.h:
15336 * target.h:
15337 * target.c:
15338 * server.h:
15339 * server.c:
15340 * remote-utils.c:
15341 * regcache.h:
15342 * utils.c:
15343 * Makefile.in:
15344 * configure.ac:
6f0f660e
EZ
15345 * gdbserver.1: Add (C) after Copyright. Update the FSF
15346 address.
15347
9d1fb177
DJ
153482005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15349
15350 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15351 (arm_breakpoint_at): Recognize both breakpoints.
15352 (the_low_target): Use the correct breakpoint instruction.
15353
011a70c2
DJ
153542005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15355
15356 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15357 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15358 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15359 (the_low_target): Update.
15360
7fb85e41
AS
153612005-10-25 Andreas Schwab <schwab@suse.de>
15362
15363 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15364
15365 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15366 (ia64_num_regs): Reduce to 462.
15367
3db0444b
DJ
153682005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15369
15370 * acinclude.m4: Correct quoting.
15371 * aclocal.m4: Regenerated.
15372
15373 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15374 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15375 (thread_db_init): Call thread_db_err_str.
15376 * configure.ac: Check for TD_VERSION.
15377 * config.in, configure: Regenerated.
15378
bee0189a
DJ
153792005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15380
15381 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15382
e9d25b98
DJ
153832005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15384
15385 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15386 is not available. Define HAVE_PTRACE_GETREGS if it is.
15387 * config.in, configure: Regenerated.
15388 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15389 * linux-i386-low.c, linux-m68k-low.c: Update to use
15390 HAVE_PTRACE_GETREGS.
15391 * linux-low.c (regsets_fetch_inferior_registers)
15392 (regsets_store_inferior_registers): Only return 0 if we processed
15393 GENERAL_REGS.
15394 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15395 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15396
a06660f7
DJ
153972005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15398
15399 * inferiors.c (struct thread_info): Add gdb_id.
15400 (add_thread): Add gdb_id argument.
15401 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15402 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15403 calls to add_thread.
15404 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15405 * server.c (handle_query): Use thread_to_gdb_id.
15406 (handle_v_cont, main): Use gdb_id_to_thread_id.
15407 * server.h (add_thread): Update prototype.
15408 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15409 prototypes.
15410
5a1f5858
DJ
154112005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15412
15413 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15414 left-padded registers.
15415 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15416 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15417
e122f1f5
SE
154182005-07-01 Steve Ellcey <sje@cup.hp.com>
15419
15420 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15421 * configure: Regenerate.
15422 * config.in: Regenerate.
15423 * server.h (NEED_DECLARATION_STRERROR):
15424 Replace with !HAVE_DECL_STRERROR.
15425
d592fa2f
DJ
154262005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15427
15428 * linux-low.c (linux_wait, linux_send_signal): Don't test
15429 an unsigned long variable for > 0 if it could be MAX_ULONG.
15430 * server.c (myresume): Likewise.
15431 * target.c (set_desired_inferior): Likewise.
15432
ccbd4912
MK
154332005-06-13 Mark Kettenis <kettenis@gnu.org>
15434
15435 * configure.ac: Simplify and improve check for socklen_t.
15436 * configure, config.in: Regenerate.
15437
f450004a
DJ
154382005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15439
15440 * acconfig.h: Remove.
15441 * configure.ac: Add a test for socklen_t. Use three-argument
15442 AC_DEFINE throughout.
15443 * config.in: Regenerated using autoheader 2.59.
15444 * configure: Regenerated.
15445
15446 * gdbreplay.c (socklen_t): Provide a default.
15447 (remote_open): Use socklen_t.
15448 * remote-utils.c (socklen_t): Provide a default.
15449 (remote_open): Use socklen_t.
15450 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15451 unsigned char.
15452
15453 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15454 char for buffers.
15455 * linux-low.c (linux_read_memory, linux_write_memory)
15456 (linux_read_auxv): Likewise.
15457 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15458 (check_mem_write): Likewise.
15459 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15460 Likewise.
15461 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15462 (registers_from_string, register_data): Likewise.
15463 * server.c (handle_query, main): Likewise.
15464 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15465 (decode_M_packet): Likewise.
15466 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15467 * target.h (struct target_ops): Update read_memory, write_memory,
15468 and read_auxv.
15469 (read_inferior_memory, write_inferior_memory): Update.
15470 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15471 to unsigned char *.
15472 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15473 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15474 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15475 linux-s390-low.c, linux-sh-low.c: Update for changes in
15476 read_inferior_memory and the_low_target->breakpoint.
15477
eee84df1
DJ
154782005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15479
15480 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15481 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15482 * configure.srv: Add powerpc64-*-linux*.
15483 * linux-ppc64-low.c: New file.
15484
45b134e5
OF
154852005-05-23 Orjan Friberg <orjanf@axis.com>
15486
15487 * linux-cris-low.c: New file with support for CRIS.
15488 * linux-crisv32-low.c: Ditto for CRISv32.
15489 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15490 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15491 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15492 reg-crisv32.o, and reg-crisv32.c to make rules.
15493 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15494 recognized targets.
15495
48d93c75
UW
154962005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15497
15498 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15499 of sizeof (PTRACE_XFER_TYPE).
15500 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15501
e013ee27
OF
155022005-05-12 Orjan Friberg <orjanf@axis.com>
15503
889bf7c5 15504 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15505 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15506 pointers for hardware watchpoint support.
15507 * linux-low.h (struct linux_target_ops): Ditto.
15508 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15509 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15510 to linux_target_ops.
15511 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15512 reply packet.
15513 * server.c (main): Recognize 'Z' and 'z' packets.
15514
b0ded00b
UW
155152005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15516
15517 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15518 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15519 (the_low_target): Add new members.
15520
8643e2ad
DJ
155212005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15522
15523 * proc-service.c (ps_lgetregs): Search all_processes instead of
15524 all_threads.
15525
fc620387
DJ
155262005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15527
15528 * server.c (start_inferior): Change return type to int.
15529 (attach_inferior): Change sigptr to int *.
15530 (handle_v_cont, handle_v_requests): Change signal to int *.
15531 (main): Change signal to int.
15532
155332005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15534
15535 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15536 * configure.srv: Add m32r*-*-linux*.
15537 * linux-m32r-low.c: New file.
15538
e0e76420
DJ
155392005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15540
15541 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15542
a1928bad
DJ
155432005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15544
15545 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15546 Take unsigned long arguments for PIDs.
15547 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15548 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15549 (wait_for_sigstop, linux_resume_one_process)
15550 (regsets_fetch_inferior_registers, linux_send_signal)
15551 (linux_read_auxv): Likewise. Update the types of variables holding
15552 PIDs. Update format string specifiers.
15553 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15554 * remote-utils.c (prepare_resume_reply): Likewise.
15555 * server.c (cont_thread, general_thread, step_thread)
15556 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15557 unsigned long.
15558 (handle_query): Update format specifiers.
15559 (handle_v_cont, main): Use strtoul for thread IDs.
15560 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15561 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15562 (general_thread, step_thread, thread_from_wait)
15563 (old_thread_from_wait): Update.
15564 * target.h (struct thread_resume): Use unsigned long for THREAD.
15565 (struct target_ops): Use unsigned long for arguments to attach and
15566 thread_alive.
15567
dcdb98d2
DJ
155682005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15569
15570 * acinclude.m4: Include bfd/bfd.m4 directly.
15571 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15572 <agriffis@toolchain.org>.
15573 * aclocal.m4, configure: Regenerated.
15574
bec39cab
AC
155752005-01-07 Andrew Cagney <cagney@gnu.org>
15576
15577 * configure.ac: Rename configure.in, require autoconf 2.59.
15578 * configure: Re-generate.
15579
434c4c77
DJ
155802004-12-08 Daniel Jacobowitz <dan@debian.org>
15581
15582 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15583 LIBS when finished.
15584 * aclocal.m4: Regenerated.
15585 * configure: Regenerated.
15586
db1d3e1b
AS
155872004-11-21 Andreas Schwab <schwab@suse.de>
15588
15589 * linux-m68k-low.c (m68k_num_gregs): Define.
15590 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15591 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15592 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15593 (m68k_breakpoint_at): New. Add to the_low_target.
15594
15595 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15596 srv_linux_thread_db to yes.
15597
43360365
JB
155982004-10-20 Joel Brobecker <brobecker@gnat.com>
15599
15600 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15601 (ARCH_SET_FS): Likewise.
15602 (ARCH_GET_FS): Likewise.
15603 (ARCH_GET_GS): Likewise.
15604
fd500816
DJ
156052004-10-16 Daniel Jacobowitz <dan@debian.org>
15606
15607 * linux-i386-low.c (ps_get_thread_area): New.
15608 * linux-x86-64-low.c (ps_get_thread_area): New.
15609 * linux-low.c: Include <sys/syscall.h>.
15610 (linux_kill_one_process): Don't kill the first thread here.
15611 (linux_kill): Kill the first thread here.
15612 (kill_lwp): New function.
15613 (send_sigstop, linux_send_signal): Use it.
15614 * proc-service.c: Clean up #ifdefs.
15615 (fpregset_info): Delete.
15616 (ps_lgetregs): Update and enable implementation.
15617 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15618 implementations.
15619 * remote-utils.c (struct sym_cache, symbol_cache): New.
15620 (input_interrupt): Print a clearer message.
15621 (async_io_enabled): New variable.
15622 (enable_async_io, disable_async_io): Use it. Update comments.
15623 (look_up_one_symbol): Use the symbol cache.
15624 * thread-db.c (thread_db_look_up_symbols): New function.
15625 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15626
f6de3c42
DJ
156272004-10-16 Daniel Jacobowitz <dan@debian.org>
15628
15629 * configure.in: Test for -rdynamic.
15630 * configure: Regenerated.
15631 * Makefile (INTERNAL_LDFLAGS): New.
15632 (gdbserver, gdbreplay): Use it.
15633
2c0fc042
AC
156342004-09-02 Andrew Cagney <cagney@gnu.org>
15635
15636 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15637
075b3282
DJ
156382004-03-23 Daniel Jacobowitz <drow@mvista.com>
15639
15640 * linux-low.c (linux_wait): Clear all_processes list also.
15641
fa6a77dc
DJ
156422004-03-12 Daniel Jacobowitz <drow@mvista.com>
15643
15644 * linux-low.c: Include <errno.h>. Remove extern declaration of
15645 errno.
15646
6d782a97
DJ
156472004-03-12 Daniel Jacobowitz <drow@mvista.com>
15648
15649 * gdbreplay.c, server.h, utils.c: Update copyright years.
15650
3a7fb99b
DJ
156512004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15652
15653 * server.c (main): Print child status or termination signal from
15654 variable 'signal', not 'sig'.
15655
c3e735a6
DJ
156562004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15657
15658 * linux-low.c (linux_read_memory): Change return type to
15659 int. Check for and return error from ptrace().
15660 * target.c (read_inferior_memory): Change return type to int. Pass
15661 back return status from the_target->read_memory().
15662 * target.h (struct target_ops): Adapt *read_memory() prototype.
15663 Update comment.
15664 (read_inferior_memory): Adapt prototype.
15665 * server.c (main): Return an error packet if
15666 read_inferior_memory() returns an error.
15667
a59d1c82
DJ
156682004-03-04 Daniel Jacobowitz <drow@mvista.com>
15669
15670 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15671 Unify with other clean targets.
15672
dc3f8883
DJ
156732004-02-29 Daniel Jacobowitz <drow@mvista.com>
15674
15675 * server.c (handle_v_cont): Call set_desired_inferior.
15676
89a208da
DJ
156772004-02-29 Daniel Jacobowitz <drow@mvista.com>
15678
15679 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15680
62ea82f5
DJ
156812004-02-29 Daniel Jacobowitz <drow@mvista.com>
15682
15683 * linux-low.c (linux_wait): Unblock async I/O.
15684 (linux_resume): Block and enable async I/O.
15685 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15686 * server.h (block_async_io, unblock_async_io): Add prototypes.
15687
6910d122
DJ
156882004-02-29 Daniel Jacobowitz <drow@mvista.com>
15689
15690 * remote-utils.c (remote_open): Print a status notice after
15691 opening a TCP port.
15692 * server.c (attach_inferior): Print a status notice after
15693 attaching.
15694
156952004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15696
15697 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15698
c89dc5d4
DJ
156992004-02-26 Daniel Jacobowitz <drow@mvista.com>
15700
15701 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15702 error packet.
15703 * server.c, target.h: Update copyright years.
15704
4b8dad4a
RM
157052004-02-25 Roland McGrath <roland@redhat.com>
15706
15707 * target.h (struct target_ops): New member `read_auxv'.
15708 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15709 * linux-low.c (linux_read_auxv): New function.
15710 (linux_target_ops): Initialize `read_auxv' member to that.
15711
d7446758
JB
157122004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15713
15714 Committed by Jim Blandy <jimb@redhat.com>.
15715
15716 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15717 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15718 instead of GPR_SIZE to distiguish s390 and s390x targets.
15719
5544ad89
DJ
157202004-01-31 Daniel Jacobowitz <drow@mvista.com>
15721
15722 * linux-low.c: Update copyright year.
15723 (check_removed_breakpoint): Clear pending_is_breakpoint.
15724 (linux_set_resume_request, linux_queue_one_thread)
15725 (resume_status_pending_p): New functions.
15726 (linux_continue_one_thread): Use process->resume.
15727 (linux_resume): Only resume threads if there are no pending events.
15728 * linux-low.h (struct process_info): Add resume request
15729 pointer.
15730
2a68b70e
DJ
157312004-01-30 Daniel Jacobowitz <drow@mvista.com>
15732
15733 * regcache.c (new_register_cache): Clear the allocated register
15734 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15735
64386c31
DJ
157362003-10-13 Daniel Jacobowitz <drow@mvista.com>
15737
15738 * linux-low.c (linux_resume): Take a struct thread_resume *
15739 argument.
15740 (linux_wait): Update call.
15741 (resume_ptr): New static variable.
15742 (linux_continue_one_thread): Renamed from
15743 linux_continue_one_process. Use resume_ptr.
15744 (linux_resume): Use linux_continue_one_thread.
15745 * server.c (handle_v_cont, handle_v_requests): New functions.
15746 (myresume): New function.
15747 (main): Handle 'v' case.
15748 * target.h (struct thread_resume): New type.
15749 (struct target_ops): Change argument of "resume" to struct
15750 thread_resume *.
15751 (myresume): Delete macro.
15752
c938e9b0
L
157532003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15754
15755 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15756 (uninstall): Support DESTDIR.
15757
7f313d07
BC
15758Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15759
15760 * configure.srv: Add xscale*linux copy of arm*linux entry.
15761
3b2fc2ea
DJ
157622003-07-24 Daniel Jacobowitz <drow@mvista.com>
15763
15764 * linux-arm-low.c (arm_reinsert_addr): New function.
15765 (the_low_target): Add arm_reinsert_addr.
15766
1c0a559e
MK
157672003-07-08 Mark Kettenis <kettenis@gnu.org>
15768
15769 * mem-break.c: Remove whitespace at end of file.
15770
43d5792c
DJ
157712003-06-28 Daniel Jacobowitz <drow@mvista.com>
15772
15773 * configure.in: Check whether we need to prototype strerror.
15774 * server.h: Optionally prototype strerror.
15775 * gdbreplay.c (perror_with_name): Use strerror.
15776 * linux-low.c (linux_attach_lwp): Use strerror.
15777 * utils.c (perror_with_name): Use strerror.
15778 * config.in, configure: Regenerated.
15779
c8a86edf
DJ
157802003-06-28 Daniel Jacobowitz <drow@mvista.com>
15781
15782 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15783 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15784
73d37363
DJ
157852003-06-20 Daniel Jacobowitz <drow@mvista.com>
15786
15787 * Makefile.in (SFILES): Update.
15788 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15789 low-sun3.c: Remove files.
15790
6ad8ae5c
DJ
157912003-06-17 Daniel Jacobowitz <drow@mvista.com>
15792
15793 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15794 (linux_detach_one_process, linux_detach): New functions.
15795 (linux_target_ops): Add linux_detach.
15796 * server.c (main): Handle 'D' packet.
15797 * target.h (struct target_ops): Add "detach" member.
15798 (detach_inferior): Define.
15799
1581182a
MK
158002003-06-13 Mark Kettenis <kettenis@gnu.org>
15801
15802 From Kelley Cook <kelleycook@wideopenwest.com>:
15803 * configure.srv: Accept i[34567]86 variants.
15804
e5379b03
DJ
158052003-06-05 Daniel Jacobowitz <drow@mvista.com>
15806
15807 * linux-low.c (linux_wait_for_event): Correct comment typos.
15808 (linux_resume_one_process): Call check_removed_breakpoint.
15809 (linux_send_signal): New function.
15810 (linux_target_ops): Add linux_send_signal.
15811 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15812 of kill.
15813 * target.h (struct target_ops): Add send_signal.
15814
2ff29de4
JB
158152003-05-29 Jim Blandy <jimb@redhat.com>
15816
15817 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15818 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15819 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15820 away part of the register's value.
15821
254787d4
DJ
158222003-03-26 Daniel Jacobowitz <drow@mvista.com>
15823
15824 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15825 (linux_wait_for_event, linux_init_signals): Likewise.
15826
94e10508
DJ
158272003-03-17 Daniel Jacobowitz <drow@mvista.com>
15828
15829 * configure.in: Check for stdlib.h.
15830 * configure: Regenerated.
15831 * config.in: Regenerated.
15832
4c0711e0
DJ
158332003-01-04 Andreas Schwab <schwab@suse.de>
15834
15835 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15836
ef66e766
AC
158372003-01-02 Andrew Cagney <ac131313@redhat.com>
15838
15839 * Makefile.in: Remove obsolete code.
15840
a1358604
DJ
158412002-11-20 Daniel Jacobowitz <drow@mvista.com>
15842
15843 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15844 defined(PT_FPR0_HI).
15845
23ce3b1c
DJ
158462002-11-17 Stuart Hughes <seh@zee2.com>
15847
15848 * linux-arm-low.c (arm_num_regs): Increase.
15849 (arm_regmap): Include status register.
15850
158512002-11-17 Daniel Jacobowitz <drow@mvista.com>
15852
15853 * linux-low.c (register_addr): Remove incorrect -1 check.
15854
a9fa9f7d
DJ
158552002-08-29 Daniel Jacobowitz <drow@mvista.com>
15856
15857 * linux-low.c (linux_create_inferior): Call setpgid. Return
15858 the new PID.
15859 (unstopped_p, linux_signal_pid): Remove.
15860 (linux_target_ops): Remove linux_signal_pid.
15861 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15862 global instead of target method.
15863 * target.h (struct target_ops): Remove signal_pid. Update comment
15864 for create_inferior.
15865 * server.c (signal_pid): New variable.
15866 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15867 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15868 (attach_inferior): Set signal_pid.
15869
17574093
DJ
158702002-08-23 Daniel Jacobowitz <drow@mvista.com>
15871
15872 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15873
158742002-08-20 Jim Blandy <jimb@redhat.com>
15875
15876 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15877 default for this.
15878
158792002-08-01 Andrew Cagney <cagney@redhat.com>
15880
15881 * Makefile.in: Make chill references obsolete.
15882
158832002-07-24 Kevin Buettner <kevinb@redhat.com>
15884
15885 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15886 * configure: Regenerate.
15887 * config.in: Regenerate.
15888
158892002-07-09 David O'Brien <obrien@FreeBSD.org>
15890
15891 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15892 (perror_with_name, remote_close, remote_open, expect, play): Static.
15893
158942002-07-04 Michal Ludvig <mludvig@suse.cz>
15895
4b8dad4a 15896 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15897 byte offsets instead of an array of indexes.
15898 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15899
159002002-06-13 Daniel Jacobowitz <drow@mvista.com>
15901
15902 * regcache.c: Add comment.
15903
159042002-06-11 Daniel Jacobowitz <drow@mvista.com>
15905
15906 * thread-db.c: New file.
15907 * proc-service.c: New file.
15908 * acinclude.m4: New file.
15909 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15910 proc-service.o, and thread-db.o.
15911 (linux-low.o): Add USE_THREAD_DB.
15912 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15913 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15914 * aclocal.m4: Regenerated.
15915 * config.in: Regenerated.
15916 * configure: Regenerated.
15917 * configure.in: Check for proc_service.h, sys/procfs.h,
15918 thread_db.h, and linux/elf.h headrs.
15919 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15920 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15921 Check for -lthread_db and thread support.
15922 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15923 PowerPC, and SuperH.
15924 * i387-fp.c: Constify arguments.
15925 * i387-fp.h: Likewise.
15926 * inferiors.c: (struct thread_info): Renamed from
15927 `struct inferior_info'. Remove PID member. Use generic inferior
15928 list header. All uses updated.
15929 (inferiors, signal_pid): Removed.
15930 (all_threads): New variable.
15931 (get_thread): Define.
15932 (add_inferior_to_list): New function.
15933 (for_each_inferior): New function.
15934 (change_inferior_id): New function.
15935 (add_inferior): Removed.
15936 (remove_inferior): New function.
15937 (add_thread): New function.
15938 (free_one_thread): New function.
15939 (remove_thread): New function.
15940 (clear_inferiors): Use for_each_inferior and free_one_thread.
15941 (find_inferior): New function.
15942 (find_inferior_id): New function.
15943 (inferior_target_data): Update argument type.
15944 (set_inferior_target_data): Likewise.
15945 (inferior_regcache_data): Likewise.
15946 (set_inferior_regcache_data): Likewise.
15947 * linux-low.c (linux_bp_reinsert): Remove.
15948 (all_processes, stopping_threads, using_thrads)
15949 (struct pending_signals, debug_threads, pid_of): New.
15950 (inferior_pid): Replace with macro.
15951 (struct inferior_linux_data): Remove.
15952 (get_stop_pc, add_process): New functions.
15953 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15954 Use add_process and add_thread.
15955 (linux_attach_lwp): New function, based on old linux_attach. Use
15956 add_process and add_thread. Set stop_expected for new threads.
15957 (linux_attach): New function.
15958 (linux_kill_one_process): New function.
15959 (linux_kill): Kill all LWPs.
15960 (linux_thread_alive): Use find_inferior_id.
15961 (check_removed_breakpoints, status_pending_p): New functions.
15962 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15963 Update. Use WNOHANG. Wait for cloned processes also. Update process
15964 struct for the found process.
15965 (linux_wait_for_event): New function.
15966 (linux_wait): Use it. Support LWPs.
15967 (send_sigstop, wait_for_sigstop, stop_all_processes)
15968 (linux_resume_one_process, linux_continue_one_process): New functions.
15969 (linux_resume): Support LWPs.
15970 (REGISTER_RAW_SIZE): Remove.
15971 (fetch_register): Use register_size instead. Call supply_register.
15972 (usr_store_inferior_registers): Likewise. Call collect_register.
15973 Fix recursive case.
15974 (regsets_fetch_inferior_registers): Improve error message.
15975 (regsets_store_inferior_registers): Add debugging.
15976 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15977 (unstopped_p, linux_signal_pid): New functions.
15978 (linux_target_ops): Add linux_signal_pid.
15979 (linux_init_signals): New function.
15980 (initialize_low): Call it. Initialize using_threads.
15981 * regcache.c (inferior_regcache_data): Add valid
15982 flag.
15983 (get_regcache): Fetch registers lazily. Add fetch argument
15984 and update all callers.
15985 (regcache_invalidate_one, regcache_invalidate): New
15986 functions.
15987 (new_register_cache): Renamed from create_register_cache.
15988 Return the new regcache.
15989 (free_register_cache): Change argument to a void *.
15990 (registers_to_string, registers_from_string): Call get_regcache
15991 with fetch flag set.
15992 (register_data): Make static. Pass fetch flag to get_regcache.
15993 (supply_register): Call get_regcache with fetch flag clear.
15994 (collect_register): Call get_regcache with fetch flag set.
15995 (collect_register_as_string): New function.
15996 * regcache.h: Update.
15997 * remote-utils.c (putpkt): Flush after debug output and use
15998 stderr.
15999 Handle input interrupts while waiting for an ACK.
16000 (input_interrupt): Use signal_pid method.
16001 (getpkt): Flush after debug output and use stderr.
16002 (outreg): Use collect_register_as_string.
16003 (new_thread_notify, dead_thread_notify): New functions.
16004 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16005 and general_thread.
16006 (look_up_one_symbol): Flush after debug output.
16007 * server.c (step_thread, server_waiting): New variables.
16008 (start_inferior): Don't use signal_pid. Update call to mywait.
16009 (attach_inferior): Update call to mywait.
16010 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16011 (main): Don't fetch/store registers explicitly. Use
16012 set_desired_inferior. Support proposed ``Hs'' packet. Update
16013 calls to mywait.
16014 * server.h: Update.
16015 (struct inferior_list, struct_inferior_list_entry): New.
16016 * target.c (set_desired_inferior): New.
16017 (write_inferior_memory): Constify.
16018 (mywait): New function.
16019 * target.h: Update.
16020 (struct target_ops): New signal_pid method.
16021 (mywait): Removed macro, added prototype.
16022
16023 * linux-low.h (regset_func): Removed.
16024 (regset_fill_func, regset_store_func): New.
16025 (enum regset_type): New.
16026 (struct regset_info): Add type field. Use new operation types.
16027 (struct linux_target_ops): stop_pc renamed to get_pc.
16028 Add decr_pc_after_break and breakpoint_at.
16029 (get_process, get_thread_proess, get_process_thread)
16030 (strut process_info, all_processes, linux_attach_lwp)
16031 (thread_db_init): New.
16032
16033 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16034 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16035 (the_low_target): Add new members.
16036 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16037 (i386_store_fpxregset): Constify.
16038 (target_regsets): Add new kind identifier.
16039 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16040 (i386_set_pc): Add debugging.
16041 (i386_breakpoint_at): New function.
16042 (the_low_target): Add new members.
16043 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16044 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16045 (mips_breakpoint_at): New.
16046 (the_low_target): Add new members.
16047 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16048 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16049 (the_low_target): Add new members.
16050 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16051 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16052 (the_low_target): Add new members.
16053 * linux-x86-64-low.c (target_regsets): Add new kind
16054 identifier.
16055
160562002-05-15 Daniel Jacobowitz <drow@mvista.com>
16057
16058 From Martin Pool <mbp@samba.org>:
16059 * server.c (gdbserver_usage): New function.
16060 (main): Call it.
16061
160622002-05-14 Daniel Jacobowitz <drow@mvista.com>
16063
16064 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16065 stop_at -> stop_pc.
16066
160672002-05-04 Andrew Cagney <ac131313@redhat.com>
16068
16069 * Makefile.in: Remove obsolete code.
16070
160712002-04-24 Michal Ludvig <mludvig@suse.cz>
16072
16073 * linux-low.c (regsets_fetch_inferior_registers),
16074 (regsets_store_inferior_registers): Removed cast to int from
16075 ptrace() calls.
16076 * regcache.h: Added declaration of struct inferior_info.
16077
160782002-04-20 Daniel Jacobowitz <drow@mvista.com>
16079
16080 * inferiors.c (struct inferior_info): Add regcache_data.
16081 (add_inferior): Call create_register_cache.
16082 (clear_inferiors): Call free_register_cache.
16083 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16084 * regcache.c (struct inferior_regcache_data): New.
16085 (registers): Remove.
16086 (get_regcache): New function.
16087 (create_register_cache, free_register_cache): New functions.
16088 (set_register_cache): Don't initialize the register cache here.
16089 (registers_to_string, registers_from_string, register_data): Call
16090 get_regcache.
16091 * regcache.h: Add prototypes.
16092 * server.h: Likewise.
16093
160942002-04-20 Daniel Jacobowitz <drow@mvista.com>
16095
16096 * mem-break.c: New file.
16097 * mem-break.h: New file.
16098 * Makefile.in: Add mem-break.o rule; update server.h
16099 dependencies.
16100 * inferiors.c (struct inferior_info): Add target_data
16101 member.
16102 (clear_inferiors): Free target_data member if set.
16103 (inferior_target_data, set_inferior_target_data): New functions.
16104 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16105 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16106 * linux-low.c (linux_bp_reinsert): New variable.
16107 (struct inferior_linux_data): New.
16108 (linux_create_inferior): Use set_inferior_target_data.
16109 (linux_attach): Likewise. Call add_inferior.
16110 (linux_wait_for_one_inferior): New function.
16111 (linux_wait): Call it.
16112 (linux_write_memory): Add const.
16113 (initialize_low): Call set_breakpoint_data.
16114 * linux-low.h (struct linux_target_ops): Add breakpoint
16115 handling members.
16116 * server.c (attach_inferior): Remove extra add_inferior
16117 call.
16118 * server.h: Include mem-break.h. Update inferior.c
16119 prototypes.
16120 * target.c (read_inferior_memory)
16121 (write_inferior_memory): New functions.
16122 * target.h (read_inferior_memory)
16123 (write_inferior_memory): Change macros to prototypes.
16124 (struct target_ops): Update comments. Add const to write_memory
16125 definition.
16126
161272002-04-11 Daniel Jacobowitz <drow@mvista.com>
16128
16129 * linux-low.c (usr_store_inferior_registers): Support
16130 registers which are allowed to fail to store.
16131 * linux-low.h (linux_target_ops): Likewise.
16132 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16133 (ppc_cannot_store_register): FPSCR may not be storable.
16134
161352002-04-09 Daniel Jacobowitz <drow@mvista.com>
16136
16137 * server.h: Include <string.h> if HAVE_STRING_H.
16138 * ChangeLog: Correct paths in last ChangeLog entry.
16139
161402002-04-09 Daniel Jacobowitz <drow@mvista.com>
16141
16142 * linux-low.h: Remove obsolete prototypes.
16143 (struct linux_target_ops): New.
16144 (extern the_low_target): New.
16145 * linux-low.c (num_regs, regmap): Remove declarations.
16146 (register_addr): Use the_low_target explicitly.
16147 (fetch_register): Likewise.
16148 (usr_fetch_inferior_registers): Likewise.
16149 (usr_store_inferior_registers): Likewise.
16150 * linux-arm-low.c (num_regs): Remove.
16151 (arm_num_regs): Define.
16152 (arm_regmap): Renamed from regmap, made static.
16153 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16154 made static.
16155 (arm_cannot_store_register): Renamed from cannot_store_register,
16156 made static.
16157 (the_low_target): New.
16158 * linux-i386-low.c (num_regs): Remove.
16159 (i386_num_regs): Define.
16160 (i386_regmap): Renamed from regmap, made static.
16161 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16162 made static.
16163 (i386_cannot_store_register): Renamed from cannot_store_register,
16164 made static.
16165 (the_low_target): New.
16166 * linux-ia64-low.c (num_regs): Remove.
16167 (ia64_num_regs): Define.
16168 (ia64_regmap): Renamed from regmap, made static.
16169 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16170 made static.
16171 (ia64_cannot_store_register): Renamed from cannot_store_register,
16172 made static.
16173 (the_low_target): New.
16174 * linux-m68k-low.c (num_regs): Remove.
16175 (m68k_num_regs): Define.
16176 (m68k_regmap): Renamed from regmap, made static.
16177 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16178 made static.
16179 (m68k_cannot_store_register): Renamed from cannot_store_register,
16180 made static.
16181 (the_low_target): New.
16182 * linux-mips-low.c (num_regs): Remove.
16183 (mips_num_regs): Define.
16184 (mips_regmap): Renamed from regmap, made static.
16185 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16186 made static.
16187 (mips_cannot_store_register): Renamed from cannot_store_register,
16188 made static.
16189 (the_low_target): New.
16190 * linux-ppc-low.c (num_regs): Remove.
16191 (ppc_num_regs): Define.
16192 (ppc_regmap): Renamed from regmap, made static.
16193 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16194 made static.
16195 (ppc_cannot_store_register): Renamed from cannot_store_register,
16196 made static.
16197 (the_low_target): New.
16198 * linux-s390-low.c (num_regs): Remove.
16199 (s390_num_regs): Define.
16200 (s390_regmap): Renamed from regmap, made static.
16201 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16202 made static.
16203 (s390_cannot_store_register): Renamed from cannot_store_register,
16204 made static.
16205 (the_low_target): New.
16206 * linux-sh-low.c (num_regs): Remove.
16207 (sh_num_regs): Define.
16208 (sh_regmap): Renamed from regmap, made static.
16209 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16210 made static.
16211 (sh_cannot_store_register): Renamed from cannot_store_register,
16212 made static.
16213 (the_low_target): New.
16214 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16215 (the_low_target): New.
16216
162172002-04-09 Daniel Jacobowitz <drow@mvista.com>
16218
16219 * Makefile.in: Add stamp-h target.
16220 * configure.in: Create stamp-h.
16221 * configure: Regenerated.
16222
162232002-04-09 Daniel Jacobowitz <drow@mvista.com>
16224
16225 * inferiors.c: New file.
16226 * target.c: New file.
16227 * target.h: New file.
16228 * Makefile.in: Add target.o and inferiors.o. Update
16229 dependencies.
16230 * linux-low.c (inferior_pid): New static variable,
16231 moved from server.c.
16232 (linux_create_inferior): Renamed from create_inferior.
16233 Call add_inferior. Return 0 on success instead of a PID.
16234 (linux_attach): Renamed from myattach.
16235 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16236 (linux_thread_alive): Renamed from mythread_alive.
16237 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16238 child dies.
16239 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16240 (regsets_store_inferior_registers): Correct error message.
16241 Add missing ``return 0''.
16242 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16243 (linux_store_registers): Renamed from store_inferior_registers.
16244 (linux_read_memory): Renamed from read_inferior_memory.
16245 (linux_write_memory): Renamed from write_inferior_memory.
16246 (linux_target_ops): New structure.
16247 (initialize_low): Call set_target_ops ().
16248 * remote-utils.c (unhexify): New function.
16249 (hexify): New function.
16250 (input_interrupt): Send signals to ``signal_pid''.
16251 * server.c (inferior_pid): Remove.
16252 (start_inferior): Update create_inferior call.
16253 (attach_inferior): Call add_inferior.
16254 (handle_query): New function.
16255 (main): Call handle_query for `q' packets.
16256 * server.h: Include "target.h". Remove obsolete prototypes.
16257 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16258
162592002-04-09 Daniel Jacobowitz <drow@mvista.com>
16260
16261 * Makefile.in: Add WARN_CFLAGS. Update configury
16262 dependencies.
16263 * configure.in: Check for <string.h>
16264 * configure: Regenerate.
16265 * config.in: Regenerate.
16266 * gdbreplay.c: Include needed system headers.
16267 (remote_open): Remove strchr prototype.
16268 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16269 * regcache.c (supply_register): Change buf argument to const void *.
16270 (supply_register_by_name): Likewise.
16271 (collect_register): Change buf argument to void *.
16272 (collect_register_by_name): Likewise.
16273 * regcache.h: Add missing prototypes.
16274 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16275 * server.c (handle_query): New function.
16276 (attached): New static variable, moved out of main.
16277 (main): Quiet longjmp clobber warnings.
16278 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16279 * utils.c (error): Remove NORETURN.
16280 (fatal): Likewise.