btrace: honour scheduler-locking for all-stop targets
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
d78908cf
WW
12015-09-16 Wei-cheng Wang <cole945@gmail.com>
2
3 * tracepoint.c (eval_result_type): Change prototype.
4 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5
d57e0d50
PA
62015-09-15 Pedro Alves <palves@redhat.com>
7
8 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
9 Check whether to report exec events instead of checking whether
10 multiprocess is enabled.
11
5a676acc
PA
122015-09-15 Pedro Alves <palves@redhat.com>
13
14 PR remote/18965
15 * remote-utils.c (prepare_resume_reply): Merge
16 TARGET_WAITKIND_VFORK_DONE switch case with the
17 TARGET_WAITKIND_FORKED case.
18
7c5d0fad
YQ
192015-09-15 Yao Qi <yao.qi@linaro.org>
20
21 * server.c (handle_query): Check string comparison using
22 "else if" instead of "if".
23
750ce8d1
YQ
242015-09-15 Yao Qi <yao.qi@linaro.org>
25
26 * server.c (vCont_supported): New global variable.
27 (handle_query): Set vCont_supported to 1 if "vContSupported+"
28 matches. Append ";vContSupported+" to own_buf.
29 (handle_v_requests): Append ";s;S" to own_buf if target supports
30 hardware single step or vCont_supported is false.
31 (capture_main): Set vCont_supported to zero.
32
70b90b91
YQ
332015-09-15 Yao Qi <yao.qi@linaro.org>
34
35 * linux-low.c (linux_supports_conditional_breakpoints): Rename
36 it to ...
37 (linux_supports_hardware_single_step): ... New function.
38 (linux_target_ops): Update.
39 * lynx-low.c (lynx_target_ops): Set field
40 supports_hardware_single_step to target_can_do_hardware_single_step.
41 * nto-low.c (nto_target_ops): Likewise.
42 * spu-low.c (spu_target_ops): Likewise.
43 * win32-low.c (win32_target_ops): Likewise.
44 * target.c (target_can_do_hardware_single_step): New function.
45 * target.h (struct target_ops) <supports_conditional_breakpoints>:
46 Remove. <supports_hardware_single_step>: New field.
47 (target_supports_conditional_breakpoints): Remove.
48 (target_supports_hardware_single_step): New macro.
49 (target_can_do_hardware_single_step): Declare.
50 * server.c (handle_query): Use target_supports_hardware_single_step
51 instead of target_supports_conditional_breakpoints.
52
ade90bde
YQ
532015-09-15 Yao Qi <yao.qi@linaro.org>
54
55 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
56 function.
57 (struct linux_target_ops the_low_target): Install
58 aarch64_linux_siginfo_fixup.
59
94585166
DB
602015-09-11 Don Breazeal <donb@codesourcery.com>
61 Luis Machado <lgustavo@codesourcery.com>
62
63 * linux-low.c (linux_mourn): Static declaration.
64 (linux_arch_setup): Move in front of
65 handle_extended_wait.
66 (linux_arch_setup_thread): New function.
67 (handle_extended_wait): Handle exec events. Call
68 linux_arch_setup_thread. Make event_lwp argument a
69 pointer-to-a-pointer.
70 (check_zombie_leaders): Do not check stopped threads.
71 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
72 (linux_low_filter_event): Add lwp and thread for exec'ing
73 non-leader thread if leader thread has been deleted.
74 Refactor code into linux_arch_setup_thread and call it.
75 Pass child lwp pointer by reference to handle_extended_wait.
76 (linux_wait_for_event_filtered): Update comment.
77 (linux_wait_1): Prevent clobbering exec event status.
78 (linux_supports_exec_events): New function.
79 (linux_target_ops) <supports_exec_events>: Initialize new member.
80 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
81 new member.
82 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
83 * server.c (report_exec_events): New global variable.
84 (handle_query): Handle qSupported query for exec-events feature.
85 (captured_main): Initialize report_exec_events.
86 * server.h (report_exec_events): Declare new global variable.
87 * target.h (struct target_ops) <supports_exec_events>: New
88 member.
89 (target_supports_exec_events): New macro.
90 * win32-low.c (win32_target_ops) <supports_exec_events>:
91 Initialize new member.
92
0568462b
MM
932015-09-09 Markus Metzger <markus.t.metzger@intel.com>
94
95 * linux-low.c (linux_low_enable_btrace): Remove.
96 (linux_target_ops): Replace linux_low_enable_btrace with
97 linux_enable_btrace.
98
39edd165
YQ
992015-09-03 Yao Qi <yao.qi@linaro.org>
100
101 * linux-aarch64-low.c (aarch64_insert_point): Call
102 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
103 returns true.
104
1db33b5a
UW
1052015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
106
107 * linux-low.c (check_stopped_by_breakpoint): Use
108 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
109
ab290430
PA
1102015-08-27 Pedro Alves <palves@redhat.com>
111
112 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
113
8d749320
SM
1142015-08-26 Simon Marchi <simon.marchi@ericsson.com>
115
6711b7f8
SM
116 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
117 the XNEW-family equivalent.
8d749320
SM
118 (compile_bytecodes): Likewise.
119 * dll.c (loaded_dll): Likewise.
120 * event-loop.c (append_callback_event): Likewise.
121 (create_file_handler): Likewise.
122 (create_file_event): Likewise.
123 * hostio.c (handle_open): Likewise.
124 * inferiors.c (add_thread): Likewise.
125 (add_process): Likewise.
126 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
127 * linux-arm-low.c (arm_new_process): Likewise.
128 (arm_new_thread): Likewise.
129 * linux-low.c (add_to_pid_list): Likewise.
130 (linux_add_process): Likewise.
131 (handle_extended_wait): Likewise.
132 (add_lwp): Likewise.
133 (enqueue_one_deferred_signal): Likewise.
134 (enqueue_pending_signal): Likewise.
135 (linux_resume_one_lwp_throw): Likewise.
136 (linux_resume_one_thread): Likewise.
137 (linux_read_memory): Likewise.
138 (linux_write_memory): Likewise.
139 * linux-mips-low.c (mips_linux_new_process): Likewise.
140 (mips_linux_new_thread): Likewise.
141 (mips_add_watchpoint): Likewise.
142 * linux-x86-low.c (initialize_low_arch): Likewise.
143 * lynx-low.c (lynx_add_process): Likewise.
144 * mem-break.c (set_raw_breakpoint_at): Likewise.
145 (set_breakpoint): Likewise.
146 (add_condition_to_breakpoint): Likewise.
147 (add_commands_to_breakpoint): Likewise.
148 (clone_agent_expr): Likewise.
149 (clone_one_breakpoint): Likewise.
150 * regcache.c (new_register_cache): Likewise.
151 * remote-utils.c (look_up_one_symbol): Likewise.
152 * server.c (queue_stop_reply): Likewise.
153 (start_inferior): Likewise.
154 (queue_stop_reply_callback): Likewise.
155 (handle_target_event): Likewise.
156 * spu-low.c (fetch_ppc_memory): Likewise.
157 (store_ppc_memory): Likewise.
158 * target.c (set_target_ops): Likewise.
159 * thread-db.c (thread_db_load_search): Likewise.
160 (try_thread_db_load_1): Likewise.
161 * tracepoint.c (add_tracepoint): Likewise.
162 (add_tracepoint_action): Likewise.
163 (create_trace_state_variable): Likewise.
164 (cmd_qtdpsrc): Likewise.
165 (cmd_qtro): Likewise.
166 (add_while_stepping_state): Likewise.
167 * win32-low.c (child_add_thread): Likewise.
168 (get_image_name): Likewise.
169
ed8b7b42
YQ
1702015-08-25 Yao Qi <yao.qi@linaro.org>
171
172 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
173
db3cb7cb
YQ
1742015-08-25 Yao Qi <yao.qi@linaro.org>
175
176 * Makefile.in (aarch64-linux.o): New rule.
177 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
178 srv_tgtobj.
179 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
180 (aarch64_init_debug_reg_state): Make it extern.
181 (aarch64_linux_prepare_to_resume): Remove.
182
f6011a1c
YQ
1832015-08-25 Yao Qi <yao.qi@linaro.org>
184
185 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
186 lwp_arch_private_info and ptid_of_lwp.
187
88e2cf7e
YQ
1882015-08-25 Yao Qi <yao.qi@linaro.org>
189
190 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
191 Find proc_info by find_process_pid. All callers updated.
192
5e35436e
YQ
1932015-08-25 Yao Qi <yao.qi@linaro.org>
194
195 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
196 Remove.
197 (debug_reg_change_callback): Remove.
198 (aarch64_notify_debug_reg_change): Remove.
199
4a8a7965
YQ
2002015-08-25 Yao Qi <yao.qi@linaro.org>
201
202 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
203 Call current_lwp_ptid.
204
32a271ee
YQ
2052015-08-25 Yao Qi <yao.qi@linaro.org>
206
207 * linux-aarch64-low.c (debug_reg_change_callback): Use
208 debug_printf.
209
0d51c8d7
YQ
2102015-08-25 Yao Qi <yao.qi@linaro.org>
211
212 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
213
31a43dd5
YQ
2142015-08-25 Yao Qi <yao.qi@linaro.org>
215
216 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
217
8ee52567
YQ
2182015-08-25 Yao Qi <yao.qi@linaro.org>
219
220 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
221 the code.
222
ff3f0f45
YQ
2232015-08-25 Yao Qi <yao.qi@linaro.org>
224
225 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
226 Remove.
227 (debug_reg_change_callback): Remove argument entry and add argument
228 lwp. Remove local variable thread. Don't print thread id in the
229 debugging output. Don't check whether pid of thread equals to pid.
230 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
231 iterate_over_lwps instead find_inferior.
232
3d40fbb5
PA
2332015-08-24 Pedro Alves <palves@redhat.com>
234
235 * inferiors.c (get_first_process): New function.
236 * inferiors.h (get_first_process): New declaration.
237 * remote-utils.c (read_ptid): Default to the first process in the
238 list, instead of to the current thread's process.
239
438e1e42
PA
2402015-08-24 Pedro Alves <palves@redhat.com>
241
242 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
243 * event-loop.c: Likewise.
244 * remote-utils.c: Likewise.
245 * tracepoint.c: Likewise.
246
a8c6d4fc
PA
2472015-08-24 Pedro Alves <palves@redhat.com>
248
249 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
250 ptid_get_lwp.
251
99b0bb12
PA
2522015-08-21 Pedro Alves <palves@redhat.com>
253
254 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
255 instead of literal 1.
256
f8904751
PA
2572015-08-21 Pedro Alves <palves@redhat.com>
258
259 * tdesc.c (default_description): Explicitly zero-initialize.
260
465a859e
PA
2612015-08-21 Pedro Alves <palves@redhat.com>
262
263 PR gdb/18749
264 * inferiors.c (remove_thread): Discard any pending stop reply for
265 this thread.
266 * server.c (remove_all_on_match_pid): Rename to ...
267 (remove_all_on_match_ptid): ... this. Work with a filter ptid
268 instead of a pid.
269 (discard_queued_stop_replies): Change parameter to a ptid. Now
270 extern.
271 (handle_v_kill, kill_inferior_callback, captured_main)
272 (process_serial_event): Adjust.
273 * server.h (discard_queued_stop_replies): Declare.
274
f0db101d
PA
2752015-08-21 Pedro Alves <palves@redhat.com>
276
277 * linux-low.c (wait_for_sigstop): Always switch to no thread
278 selected if the previously current thread dies.
279 * lynx-low.c (lynx_request_interrupt): Use the first thread's
280 process instead of the current thread's.
281 * remote-utils.c (input_interrupt): Don't check if there's no
282 current thread.
283 * server.c (gdb_read_memory, gdb_write_memory): If setting the
284 current thread to the general thread fails, error out.
285 (handle_qxfer_auxv, handle_qxfer_libraries)
286 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
287 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
288 (handle_query): Check if there's a thread selected instead of
289 checking whether there's any thread in the thread list.
290 (handle_qxfer_threads, handle_qxfer_btrace)
291 (handle_qxfer_btrace_conf): Don't error out early if there's no
292 thread in the thread list.
293 (handle_v_cont, myresume): Don't set the current thread to the
294 continue thread.
295 (process_serial_event) <Hg handling>: Also set thread_id if the
296 previous general thread is still alive.
297 (process_serial_event) <g/G handling>: If setting the current
298 thread to the general thread fails, error out.
299 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
300 thread's lwp instead of the current thread's.
301 * target.c (set_desired_thread): If the desired thread was not
302 found, leave the current thread pointing to NULL. Return an int
303 (boolean) indicating success.
304 * target.h (set_desired_thread): Change return type to int.
305
40045d91
MF
3062015-08-20 Max Filippov <jcmvbkbc@gmail.com>
307
308 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
309 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
310 #includes.
311 (ps_get_thread_area): New function.
312
45face3b
GB
3132015-08-19 Gary Benson <gbenson@redhat.com>
314
315 * hostio.c (handle_pread): Do not attempt to read more data
316 than hostio_reply_with_data can fit in a packet.
317
16d5f642
JB
3182015-08-18 Joel Brobecker <brobecker@adacore.com>
319
320 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
321
a738da3a
MF
3222015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
323
324 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
325
33ebda9d
PA
3262015-08-06 Pedro Alves <palves@redhat.com>
327
328 * tracepoint.c (expr_eval_result): Now an int.
329
a44892be
PA
3302015-08-06 Pedro Alves <palves@redhat.com>
331
332 * gdbthread.h (struct regcache): Forward declare.
333 (struct thread_info) <regcache_data>: Now a struct regcache
334 pointer.
335 * inferiors.c (inferior_regcache_data)
336 (set_inferior_regcache_data): Now work with struct regcache
337 pointers.
338 * inferiors.h (struct regcache): Forward declare.
339 (inferior_regcache_data, set_inferior_regcache_data): Now work
340 with struct regcache pointers.
341 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
342 (free_register_cache_thread): Remove struct regcache pointer
343 casts.
344
608a1e46
PA
3452015-08-06 Pedro Alves <palves@redhat.com>
346
347 * server.c (captured_main): On error, print the exception message
348 to stderr, and if run_once is set, throw a quit.
349
f0ce0d3a
PA
3502015-08-06 Pedro Alves <palves@redhat.com>
351
352 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
353 the current thread.
354
bf47e248
PA
3552015-08-06 Pedro Alves <palves@redhat.com>
356
357 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
358 reading beyond the passed in buffer length.
359
b6b9ffcc
PL
3602015-08-06 Pierre Langlois <pierre.langlois@arm.com>
361
362 * tracepoint.c (symbol_list) <required>: Remove.
363
863d01bd
PA
3642015-08-06 Pedro Alves <palves@redhat.com>
365
366 * linux-low.c (handle_extended_wait): Set the fork child's suspend
367 count if stopping and suspending threads.
368 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
369 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
370 (linux_detach): Complete an ongoing step-over.
371 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
372 throughout.
373 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
374 (linux_wait_1): If passing a signal to the inferior after
375 finishing a step-over, unsuspend and re-resume all lwps. If we
376 see a single-step event but the thread should be continuing, don't
377 pass the trap to gdb.
378 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
379 internal_error instead of gdb_assert.
380 (enqueue_pending_signal): New function.
381 (check_ptrace_stopped_lwp_gone): Add debug output.
382 (start_step_over): Use internal_error instead of gdb_assert.
383 (complete_ongoing_step_over): New function.
384 (linux_resume_one_thread): Don't resume a suspended thread.
385 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
386 it stepping.
387
00db26fa
PA
3882015-08-06 Pedro Alves <palves@redhat.com>
389
390 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
391 (linux_thread_alive): Use lwp_is_marked_dead.
392 (extended_event_reported): Delete.
393 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
394 instead of extended_event_reported.
395 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
396 as well.
397 (lwp_is_marked_dead): New function.
398 (lwp_running): Use lwp_is_marked_dead.
399 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
400 comment.
401
ad071a30
PA
4022015-08-06 Pedro Alves <palves@redhat.com>
403
404 * linux-low.c (linux_wait_1): Move fork event output out of the
405 !report_to_gdb check. Pass event_child->waitstatus to
406 target_waitstatus_to_string instead of ourstatus.
407
524b57e6
YQ
4082015-08-04 Yao Qi <yao.qi@linaro.org>
409
410 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
411 if current_thread is 32 bit.
412
6085d6f6
YQ
4132015-08-04 Yao Qi <yao.qi@linaro.org>
414
415 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
416 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
417 * server.c (extended_protocol): Remove "static".
418 * server.h (extended_protocol): Declare it.
419
8a7e4587
YQ
4202015-08-04 Yao Qi <yao.qi@linaro.org>
421
422 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
423 both aarch64 and aarch32.
424 (aarch64_set_pc): Likewise.
425
3b53ae99
YQ
4262015-08-04 Yao Qi <yao.qi@linaro.org>
427
428 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
429 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
430 arm-with-neon.xml to srv_xmlfiles.
431 * linux-aarch64-low.c: Include linux-aarch32-low.h.
432 (is_64bit_tdesc): New function.
433 (aarch64_linux_read_description): New function.
434 (aarch64_arch_setup): Call aarch64_linux_read_description.
435 (regs_info): Rename to regs_info_aarch64.
436 (aarch64_regs_info): Return right regs_info.
437 (initialize_low_arch): Call initialize_low_arch_aarch32.
438
bd9e6534
YQ
4392015-08-04 Yao Qi <yao.qi@linaro.org>
440
441 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
442 * linux-aarch32-low.c: New file.
443 * linux-aarch32-low.h: New file.
444 * linux-arm-low.c (arm_fill_gregset): Move it to
445 linux-aarch32-low.c.
446 (arm_store_gregset): Likewise.
447 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
448 (arm_store_vfpregset): Call arm_store_vfpregset_num.
449 (arm_arch_setup): Check if PTRACE_GETREGSET works.
450 (regs_info): Rename to regs_info_arm.
451 (arm_regs_info): Return regs_info_aarch32 if
452 have_ptrace_getregset is 1 and target description is
453 arm_with_neon or arm_with_vfpv3.
454 (initialize_low_arch): Don't call init_registers_arm_with_neon.
455 Call initialize_low_arch_aarch32 instead.
456
ded48a5e
YQ
4572015-08-04 Yao Qi <yao.qi@linaro.org>
458
459 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
460 * linux-low.c: ... here.
461 * linux-low.h (have_ptrace_getregset): Declare it.
462
96e9210f
PA
4632015-08-04 Pedro Alves <palves@redhat.com>
464
465 * thread-db.c (struct thread_db): Use new typedefs.
466 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
467 CHK calls.
468 (disable_thread_event_reporting): Cast result of dlsym to
469 destination function pointer type.
470 (thread_db_mourn): Use td_ta_delete_ftype.
471
af60a1ef
SL
4722015-08-03 Sandra Loosemore <sandra@codesourcery.com>
473
474 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
475 arch variant.
476 (CDX_BREAKPOINT): Define for R2.
477 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
478 (the_low_target): Add comments.
479
e8b41681
YQ
4802015-07-30 Yao Qi <yao.qi@linaro.org>
481
482 * linux-arm-low.c (arm_hwcap): Remove it.
483 (arm_read_description): New local variable arm_hwcap. Don't
484 set arm_hwcap to zero.
485
89abb039
YQ
4862015-07-30 Yao Qi <yao.qi@linaro.org>
487
488 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
489 Use regcache->tdesc instead.
490 (arm_store_wmmxregset): Likewise.
491 (arm_fill_vfpregset): Likewise.
492 (arm_store_vfpregset): Likewise.
493
deca266c
YQ
4942015-07-30 Yao Qi <yao.qi@linaro.org>
495
496 * linux-arm-low.c: Include arch/arm.h.
497 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
498 (arm_store_gregset): Likewise.
499
aa58a496
SM
5002015-07-29 Simon Marchi <simon.marchi@ericsson.com>
501
502 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
503 ptrace's 4th parameter.
504
50904b25
YQ
5052015-07-27 Yao Qi <yao.qi@linaro.org>
506
507 * configure.srv (case aarch64*-*-linux*): Don't set
508 srv_linux_usrregs.
509
5826e159
PA
5102015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
511
512 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
513 sys/ptrace.h.
514 * linux-arm-low.c: Likewise.
515 * linux-cris-low.c: Likewise.
516 * linux-crisv32-low.c: Likewise.
517 * linux-low.c: Likewise.
518 * linux-m68k-low.c: Likewise.
519 * linux-mips-low.c: Likewise.
520 * linux-nios2-low.c: Likewise.
521 * linux-s390-low.c: Likewise.
522 * linux-sparc-low.c: Likewise.
523 * linux-tic6x-low.c: Likewise.
524 * linux-tile-low.c: Likewise.
525 * linux-x86-low.c: Likewise.
526
54019719
PA
5272015-07-24 Pedro Alves <palves@redhat.com>
528
529 * config.in: Regenerate.
530 * configure: Regenerate.
531
eb7aa561
PA
5322015-07-24 Pedro Alves <palves@redhat.com>
533
534 * acinclude.m4: Include ../ptrace.m4.
535 * configure.ac: Call GDB_AC_PTRACE.
536 * config.in, configure: Regenerate.
537
55d7b841
YQ
5382015-07-24 Yao Qi <yao.qi@linaro.org>
539
540 * linux-low.c (linux_create_inferior): Remove setting to
541 proc->priv->new_inferior.
542 (linux_attach): Likewise.
543 (linux_low_filter_event): Likewise.
544 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
545
c06cbd92
YQ
5462015-07-24 Yao Qi <yao.qi@linaro.org>
547
548 * linux-low.c (linux_arch_setup): New function.
549 (linux_low_filter_event): If proc->tdesc is NULL and
550 proc->attached is true, call the_low_target.arch_setup.
551 Otherwise, keep status pending, and return.
552 (linux_resume_one_lwp_throw): Don't call get_pc if
553 thread->while_stepping isn't NULL. Don't call
554 get_thread_regcache if proc->tdesc is NULL.
555 (need_step_over_p): Return 0 if proc->tdesc is NULL.
556 (linux_target_ops): Install arch_setup.
557 * server.c (start_inferior): Call the_target->arch_setup.
558 * target.h (struct target_ops) <arch_setup>: New field.
559 (target_arch_setup): New marco.
560 * lynx-low.c (lynx_target_ops): Update.
561 * nto-low.c (nto_target_ops): Update.
562 * spu-low.c (spu_target_ops): Update.
563 * win32-low.c (win32_target_ops): Update.
564
5ae3ebba
YQ
5652015-07-24 Yao Qi <yao.qi@linaro.org>
566
567 * linux-low.c (linux_add_process): Don't set
568 proc->priv->new_inferior.
569 (linux_create_inferior): Set proc->priv->new_inferior to 1.
570 (linux_attach): Likewise.
571
eb97750b
YQ
5722015-07-24 Yao Qi <yao.qi@linaro.org>
573
574 * server.c (start_inferior): Code refactor.
575
51aee833
YQ
5762015-07-24 Yao Qi <yao.qi@linaro.org>
577
578 * server.c (process_serial_event): Set general_thread.
579
af1b22f3
YQ
5802015-07-21 Yao Qi <yao.qi@linaro.org>
581
582 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
583 aarch64_linux_get_debug_reg_capacity.
584
554717a3
YQ
5852015-07-17 Yao Qi <yao.qi@linaro.org>
586
587 * Makefile.in (aarch64-linux-hw-point.o): New rule.
588 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
589 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
590 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
591 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
592 (AARCH64_HWP_ALIGNMENT): Likewise.
593 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
594 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
595 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
596 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
597 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
598 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
599 (struct aarch64_debug_reg_state): Likewise.
600 (struct arch_lwp_info): Likewise.
601 (aarch64_align_watchpoint): Likewise.
602 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
603 (aarch64_watchpoint_length): Likewise.
604 (aarch64_point_encode_ctrl_reg): Likewise
605 (aarch64_point_is_aligned): Likewise.
606 (aarch64_align_watchpoint): Likewise.
607 (aarch64_linux_set_debug_regs):
608 (aarch64_dr_state_insert_one_point): Likewise.
609 (aarch64_dr_state_remove_one_point): Likewise.
610 (aarch64_handle_breakpoint): Likewise.
611 (aarch64_handle_aligned_watchpoint): Likewise.
612 (aarch64_handle_unaligned_watchpoint): Likewise.
613 (aarch64_handle_watchpoint): Likewise.
614
c67ca4de
YQ
6152015-07-17 Yao Qi <yao.qi@linaro.org>
616
617 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
618 and don't aarch64_get_debug_reg_state. All callers update.
619 (aarch64_handle_aligned_watchpoint): Likewise.
620 (aarch64_handle_unaligned_watchpoint): Likewise.
621 (aarch64_handle_watchpoint): Likewise.
622 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
623 (aarch64_remove_point): Likewise.
624
25abf979
YQ
6252015-07-17 Yao Qi <yao.qi@linaro.org>
626
627 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
628 debug_printf.
629 (aarch64_handle_unaligned_watchpoint): Likewise.
630
db1ff28b
JK
6312015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
632
633 Revert the previous 3 commits:
634 Move gdb_regex* to common/
635 Move linux_find_memory_regions_full & co.
636 gdbserver build-id attribute generator
637
700ca40f
JK
6382015-07-15 Aleksandar Ristovski <aristovski@qnx.com
639 Jan Kratochvil <jan.kratochvil@redhat.com>
640
641 gdbserver build-id attribute generator.
642 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
643 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
644 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
645 (find_phdr): New.
646 (get_dynamic): Use find_pdhr to traverse program headers.
647 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
648 (compare_mapping_entry_range, struct find_memory_region_callback_data)
649 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
650 (get_hex_build_id): New.
651 (linux_qxfer_libraries_svr4): Add optional build-id attribute
652 to reply XML document.
653
9904185c
JK
6542015-07-15 Aleksandar Ristovski <aristovski@qnx.com
655 Jan Kratochvil <jan.kratochvil@redhat.com>
656
657 * target.c: Include target/target-utils.h and fcntl.h.
658 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
659 (target_fileio_read_stralloc): New functions.
660
6e5b4429
JK
6612015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
662
663 * Makefile.in (OBS): Add gdb_regex.o.
664 (gdb_regex.o): New.
665 * config.in: Rebuilt.
666 * configure: Rebuilt.
667
ddc98fbf
JK
6682015-07-15 Aleksandar Ristovski <aristovski@qnx.com
669 Jan Kratochvil <jan.kratochvil@redhat.com>
670
671 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
672 * Makefile.in (OBS): Add target-utils.o.
673 (linux-maps.o, target-utils.o): New.
674 * configure.srv (srv_linux_obj): Add linux-maps.o.
675
e57bb7a0
PL
6762015-07-15 Pierre Langlois <pierre.langlois@arm.com>
677
678 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
679 function, return 1.
680 (the_low_target): Install it.
681
586b02a9
PA
6822015-07-14 Pedro Alves <palves@redhat.com>
683
684 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
685 Instead, ignore ECHILD, and throw an error for other errnos.
686
58c1b36c
PA
6872015-07-10 Pedro Alves <palves@redhat.com>
688
689 * event-loop.c (struct callback_event) <data>: Change type to
690 gdb_client_data instance instead of gdb_client_data pointer.
691 (append_callback_event): Adjust.
692
421530db
PL
6932015-07-10 Pierre Langlois <pierre.langlois@arm.com>
694
695 * linux-aarch64-low.c: Add comments for each linux_target_ops
696 method. Remove comments already covered in target_ops and
697 linux_target_ops definitions.
698 (the_low_target): Add comments for each unimplemented method.
699
c2d65f38
YQ
7002015-07-09 Yao Qi <yao.qi@linaro.org>
701
702 * linux-aarch64-low.c (aarch64_regmap): Remove.
703 (aarch64_usrregs_info): Remove.
704 (regs_info): Set field usrregs to NULL.
705
b20a6524
MM
7062015-07-02 Markus Metzger <markus.t.metzger@intel.com>
707
708 * linux-low.c: Include "rsp-low.h"
709 (linux_low_encode_pt_config, linux_low_encode_raw): New.
710 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
711 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
712 (handle_btrace_enable_pt): New.
713 (handle_btrace_general_set): Support "pt".
714 (handle_btrace_conf_general_set): Support "pt:size".
715
96c97461
PL
7162015-06-29 Pierre Langlois <pierre.langlois@arm.com>
717
718 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
719 Z_PACKET_SW_BP.
720
37d66942
PL
7212015-06-29 Pierre Langlois <pierre.langlois@arm.com>
722
723 * linux-aarch64-low.c: Remove comment about endianness.
724 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
725 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
726 memcmp.
727
dc06243f
GB
7282015-06-24 Gary Benson <gbenson@redhat.com>
729
730 * linux-i386-ipa.c (stdint.h): Do not include.
731 * lynx-i386-low.c (stdint.h): Likewise.
732 * lynx-ppc-low.c (stdint.h): Likewise.
733 * mem-break.c (stdint.h): Likewise.
734 * thread-db.c (stdint.h): Likewise.
735 * tracepoint.c (stdint.h): Likewise.
736 * win32-low.c (stdint.h): Likewise.
737
124e13d9
SM
7382015-06-18 Simon Marchi <simon.marchi@ericsson.com>
739
740 * server.c (write_qxfer_response): Update call to
741 remote_escape_output.
742
909c2cda
JK
7432015-06-15 Aleksandar Ristovski <aristovski@qnx.com
744 Jan Kratochvil <jan.kratochvil@redhat.com>
745
746 Merge multiple hex conversions.
747 * gdbreplay.c (tohex): Rename to 'fromhex'.
748 (logchar): Use fromhex.
749
24c05f46
JK
7502015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
751
752 * server.c (handle_qxfer_libraries): Set `version' attribute for
753 <library-list>.
754
14d2069a
GB
7552015-06-10 Gary Benson <gbenson@redhat.com>
756
757 * target.h (struct target_ops) <multifs_open>: New field.
758 <multifs_unlink>: Likewise.
759 <multifs_readlink>: Likewise.
760 * linux-low.c (nat/linux-namespaces.h): New include.
761 (linux_target_ops): Initialize the_target->multifs_open,
762 the_target->multifs_unlink and the_target->multifs_readlink.
763 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
764 * hostio.c (hostio_fs_pid): New static variable.
765 (hostio_handle_new_gdb_connection): New function.
766 (handle_setfs): Likewise.
767 (handle_open): Use the_target->multifs_open as appropriate.
768 (handle_unlink): Use the_target->multifs_unlink as appropriate.
769 (handle_readlink): Use the_target->multifs_readlink as
770 appropriate.
771 (handle_vFile): Handle vFile:setfs packets.
772 * server.c (handle_query): Call hostio_handle_new_gdb_connection
773 after target_handle_new_gdb_connection.
774
4b8b5e72
GB
7752015-06-10 Gary Benson <gbenson@redhat.com>
776
777 * configure.ac (AC_CHECK_FUNCS): Add setns.
778 * config.in: Regenerate.
779 * configure: Likewise.
780 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
781 (linux-namespaces.o): New rule.
782 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
783
3ac2e371
GB
7842015-06-09 Gary Benson <gbenson@redhat.com>
785
786 * hostio.c (handle_open): Process mode argument with
787 fileio_to_host_mode.
788
ca9b78ce
YQ
7892015-06-01 Yao Qi <yao.qi@linaro.org>
790
791 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
792 * linux-x86-low.c: Likewise.
793
bfacd19d
DB
7942015-05-28 Don Breazeal <donb@codesourcery.com>
795
796 * linux-low.c (handle_extended_wait): Initialize
797 thread_info.last_resume_kind for new fork children.
798
452003ef
PA
7992015-05-15 Pedro Alves <palves@redhat.com>
800
801 * target.h (target_handle_new_gdb_connection): Rewrite using if
802 wrapped in do/while.
803
1041a03c
JB
8042015-05-14 Joel Brobecker <brobecker@adacore.com>
805
806 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
807 * configure, config.in: Regenerate.
808 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
809 Declare typedef.
810
c269dbdb
DB
8112015-05-12 Don Breazeal <donb@codesourcery.com>
812
813 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
814 PTRACE_EVENT_VFORK_DONE.
815 (linux_low_ptrace_options, extended_event_reported): Add vfork
816 events.
817 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
818 and "vforkdone" for RSP 'T' Stop Reply Packet.
819 * server.h (report_vfork_events): Declare
820 global variable.
821
3a8a0396
DB
8222015-05-12 Don Breazeal <donb@codesourcery.com>
823
824 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
825 (the_low_target) <new_fork>: Initialize new member.
826 * linux-arm-low.c (arm_new_fork): New function.
827 (the_low_target) <new_fork>: Initialize new member.
828 * linux-low.c (handle_extended_wait): Call new target function
829 new_fork.
830 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
831 * linux-mips-low.c (mips_add_watchpoint): New function
832 extracted from mips_insert_point.
833 (the_low_target) <new_fork>: Initialize new member.
834 (mips_linux_new_fork): New function.
835 (mips_insert_point): Call mips_add_watchpoint.
836 * linux-x86-low.c (x86_linux_new_fork): New function.
837 (the_low_target) <new_fork>: Initialize new member.
838
de0d863e
DB
8392015-05-12 Don Breazeal <donb@codesourcery.com>
840
841 * linux-low.c (handle_extended_wait): Implement return value,
842 rename argument 'event_child' to 'event_lwp', handle
843 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
844 (linux_low_ptrace_options): New function.
845 (linux_low_filter_event): Call linux_low_ptrace_options,
846 use different argument fo linux_enable_event_reporting,
847 use return value from handle_extended_wait.
848 (extended_event_reported): New function.
849 (linux_wait_1): Call extended_event_reported and set
850 status to report fork events.
851 (linux_write_memory): Add pid to debug message.
852 (reset_lwp_ptrace_options_callback): New function.
853 (linux_handle_new_gdb_connection): New function.
854 (linux_target_ops): Initialize new structure member.
855 * linux-low.h (struct lwp_info) <waitstatus>: New member.
856 * lynx-low.c: Initialize new structure member.
857 * remote-utils.c (prepare_resume_reply): Implement stop reason
858 "fork" for "T" stop message.
859 * server.c (handle_query): Call handle_new_gdb_connection.
860 * server.h (report_fork_events): Declare global flag.
861 * target.h (struct target_ops) <handle_new_gdb_connection>:
862 New member.
863 (target_handle_new_gdb_connection): New macro.
864 * win32-low.c: Initialize new structure member.
865
ddcbc397
DB
8662015-05-12 Don Breazeal <donb@codesourcery.com>
867
868 * mem-break.c (APPEND_TO_LIST): Define macro.
869 (clone_agent_expr): New function.
870 (clone_one_breakpoint): New function.
871 (clone_all_breakpoints): New function.
872 * mem-break.h: Declare new functions.
873
89245bc0
DB
8742015-05-12 Don Breazeal <donb@codesourcery.com>
875
876 * linux-low.c (linux_supports_fork_events): New function.
877 (linux_supports_vfork_events): New function.
878 (linux_target_ops): Initialize new structure members.
879 (initialize_low): Call linux_check_ptrace_features.
880 * lynx-low.c (lynx_target_ops): Initialize new structure
881 members.
882 * server.c (report_fork_events, report_vfork_events):
883 New global flags.
884 (handle_query): Add new features to qSupported packet and
885 response.
886 (captured_main): Initialize new global variables.
887 * target.h (struct target_ops) <supports_fork_events>:
888 New member.
889 <supports_vfork_events>: New member.
890 (target_supports_fork_events): New macro.
891 (target_supports_vfork_events): New macro.
892 * win32-low.c (win32_target_ops): Initialize new structure
893 members.
894
835205d0
GB
8952015-05-12 Gary Benson <gbenson@redhat.com>
896
897 * server.c (handle_qxfer_exec_file): Use current process
898 if annex is empty.
899
21e94bd9
SL
9002015-05-08 Sandra Loosemore <sandra@codesourcery.com>
901
902 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
903 Remove HAVE_PTRACE_GETREGS conditionals.
904 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
905 instead of PTRACE_GETREGS and PTRACE_SETREGS.
906
45614f15
YQ
9072015-05-08 Yao Qi <yao.qi@linaro.org>
908
909 * linux-low.c (linux_supports_conditional_breakpoints): New
910 function.
911 (linux_target_ops): Install new target method.
912 * lynx-low.c (lynx_target_ops): Install NULL hook for
913 supports_conditional_breakpoints.
914 * nto-low.c (nto_target_ops): Likewise.
915 * spu-low.c (spu_target_ops): Likewise.
916 * win32-low.c (win32_target_ops): Likewise.
917 * server.c (handle_query): Check
918 target_supports_conditional_breakpoints.
919 * target.h (struct target_ops) <supports_conditional_breakpoints>:
920 New field.
921 (target_supports_conditional_breakpoints): New macro.
922
80ad801e
PA
9232015-05-06 Pedro Alves <palves@redhat.com>
924
925 PR server/18081
926 * server.c (start_inferior): If the process exits, mourn it.
927
819843c7
GB
9282015-04-21 Gary Benson <gbenson@redhat.com>
929
930 * hostio.c (fileio_open_flags_to_host): Factored out to
931 fileio_to_host_openflags in common/fileio.c. Single use
932 updated.
933
a2d5a9d7
MF
9342015-04-17 Max Filippov <jcmvbkbc@gmail.com>
935
936 * linux-xtensa-low.c (xtensa_fill_gregset)
937 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
938 XCHAL_HAVE_LOOP.
939
deb44829
MF
9402015-04-17 Max Filippov <jcmvbkbc@gmail.com>
941
942 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
943 (regs_info): Replace usrregs pointer with NULL.
944
e57f1de3
GB
9452015-04-17 Gary Benson <gbenson@redhat.com>
946
947 * target.h (struct target_ops) <pid_to_exec_file>: New field.
948 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
949 * server.c (handle_qxfer_exec_file): New function.
950 (qxfer_packets): Add exec-file entry.
951 (handle_query): Report qXfer:exec-file:read as supported packet.
952
62828379
RN
9532015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
954
955 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
956
b88bb450
GB
9572015-04-09 Gary Benson <gbenson@redhat.com>
958
959 * hostio-errno.c (errno_to_fileio_error): Remove function.
960 Update caller to use remote_fileio_to_fio_error.
961
c8f4bfdd
YQ
9622015-04-09 Yao Qi <yao.qi@linaro.org>
963
964 * linux-low.c (linux_insert_point): Call
965 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
966 (linux_remove_point): Call remove_memory_breakpoint if type is
967 raw_bkpt_type_sw.
968 * linux-x86-low.c (x86_insert_point): Don't call
969 insert_memory_breakpoint.
970 (x86_remove_point): Don't call remove_memory_breakpoint.
971
41f98f02
PA
9722015-04-01 Pedro Alves <palves@redhat.com>
973 Cleber Rosa <crosa@redhat.com>
974
975 * server.c (gdbserver_usage): Reorganize and extend the usage
976 message.
977
2bf6fb9d
PA
9782015-03-24 Pedro Alves <palves@redhat.com>
979
980 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
981 output. Also dump TRAP_TRACE.
982 (linux_low_filter_event): In debug output, distinguish a
983 resume_stop SIGSTOP from a delayed SIGSTOP.
984
369f6daa
GB
9852015-03-24 Gary Benson <gbenson@redhat.com>
986
987 * linux-x86-low.c (x86_linux_new_thread): Moved to
988 nat/x86-linux.c.
989 (x86_linux_prepare_to_resume): Likewise.
990
8e5d4070
GB
9912015-03-24 Gary Benson <gbenson@redhat.com>
992
993 * Makefile.in (x86-linux-dregs.o): New rule.
994 * configure.srv: Add x86-linux-dregs.o to relevant targets.
995 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
996 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
997 (x86_linux_dr_get): Likewise.
998 (x86_linux_dr_set): Likewise.
999 (update_debug_registers_callback): Likewise.
1000 (x86_linux_dr_set_addr): Likewise.
1001 (x86_linux_dr_get_addr): Likewise.
1002 (x86_linux_dr_set_control): Likewise.
1003 (x86_linux_dr_get_control): Likewise.
1004 (x86_linux_dr_get_status): Likewise.
1005 (x86_linux_update_debug_registers): Likewise.
1006
2b95d440
GB
10072015-03-24 Gary Benson <gbenson@redhat.com>
1008
1009 * linux-x86-low.c (x86_linux_update_debug_registers):
1010 New function, factored out from...
1011 (x86_linux_prepare_to_resume): ...this.
1012
14b0bc68
GB
10132015-03-24 Gary Benson <gbenson@redhat.com>
1014
1015 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1016 (x86_linux_dr_set): Likewise.
1017 (update_debug_registers_callback): Likewise.
1018 (x86_linux_dr_set_addr): Likewise.
1019 (x86_linux_dr_get_addr): Likewise.
1020 (x86_linux_dr_set_control): Likewise.
1021 (x86_linux_dr_get_control): Likewise.
1022 (x86_linux_dr_get_status): Likewise.
1023 (x86_linux_prepare_to_resume): Likewise.
1024
5dfe6ca8
GB
10252015-03-24 Gary Benson <gbenson@redhat.com>
1026
1027 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1028 Use perror_with_name. Pass string through gettext.
1029 (x86_linux_dr_set): Likewise.
1030
d33472ad
GB
10312015-03-24 Gary Benson <gbenson@redhat.com>
1032
1033 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1034 (x86_linux_dr_set_addr): ...this.
1035 (x86_dr_low_get_addr): Rename to...
1036 (x86_linux_dr_get_addr): ...this.
1037 (x86_dr_low_set_control): Rename to...
1038 (x86_linux_dr_set_control): ...this.
1039 (x86_dr_low_get_control): Rename to...
1040 (x86_linux_dr_get_control): ...this.
1041 (x86_dr_low_get_status): Rename to...
1042 (x86_linux_dr_get_status): ...this.
1043 (x86_dr_low): Update with new function names.
1044
4b134ca1
GB
10452015-03-24 Gary Benson <gbenson@redhat.com>
1046
1047 * Makefile.in (x86-linux.o): New rule.
1048 * configure.srv: Add x86-linux.o to relevant targets.
1049 * linux-low.c (lwp_set_arch_private_info): New function.
1050 (lwp_arch_private_info): Likewise.
1051 * linux-x86-low.c: Include nat/x86-linux.h.
1052 (arch_lwp_info): Removed structure.
1053 (update_debug_registers_callback):
1054 Use lwp_set_debug_registers_changed.
1055 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1056 and lwp_set_debug_registers_changed.
1057 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1058
34c703da
GB
10592015-03-24 Gary Benson <gbenson@redhat.com>
1060
1061 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1062 * linux-arm-low.c (arm_new_thread): Likewise.
1063 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1064 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1065 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1066 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1067
cff068da
GB
10682015-03-24 Gary Benson <gbenson@redhat.com>
1069
1070 * linux-low.c (ptid_of_lwp): New function.
1071 (lwp_is_stopped): Likewise.
1072 (lwp_stop_reason): Likewise.
1073 * linux-x86-low.c (update_debug_registers_callback):
1074 Use lwp_is_stopped.
1075 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1076 lwp_stop_reason.
1077
b2f7c7e8
GB
10782015-03-24 Gary Benson <gbenson@redhat.com>
1079
1080 * linux-low.h (linux_stop_lwp): Remove declaration.
1081
6d4ee8c6
GB
10822015-03-24 Gary Benson <gbenson@redhat.com>
1083
1084 * linux-low.h: Include nat/linux-nat.h.
1085 * linux-low.c (iterate_over_lwps_args): New structure.
1086 (iterate_over_lwps_filter): New function.
1087 (iterate_over_lwps): Likewise.
1088 * linux-x86-low.c (update_debug_registers_callback):
1089 Update signature to what iterate_over_lwps expects.
1090 Remove PID check that iterate_over_lwps now performs.
1091 (x86_dr_low_set_addr): Use iterate_over_lwps.
1092 (x86_dr_low_set_control): Likewise.
1093
70a0bb6b
GB
10942015-03-24 Gary Benson <gbenson@redhat.com>
1095
1096 * linux-x86-low.c (x86_debug_reg_state): New function.
1097 (x86_linux_prepare_to_resume): Use the above.
1098
7b669087
GB
10992015-03-24 Gary Benson <gbenson@redhat.com>
1100
1101 * linux-low.c (current_lwp_ptid): New function.
1102 * linux-x86-low.c: Include nat/linux-nat.h.
1103 (x86_dr_low_get_addr): Use current_lwp_ptid.
1104 (x86_dr_low_get_control): Likewise.
1105 (x86_dr_low_get_status): Likewise.
1106
eef49a3d
PA
11072015-03-20 Pedro Alves <palves@redhat.com>
1108
1109 * tracepoint.c (cmd_qtstatus): Make "str" const.
1110
b2333d22
PA
11112015-03-20 Pedro Alves <palves@redhat.com>
1112
1113 * server.c (handle_general_set): Make "req_str" const.
1114
23f238d3
PA
11152015-03-19 Pedro Alves <palves@redhat.com>
1116
1117 * linux-low.c (linux_resume_one_lwp): Rename to ...
1118 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1119 instead call perror_with_name.
1120 (check_ptrace_stopped_lwp_gone): New function.
1121 (linux_resume_one_lwp): Reimplement as wrapper around
1122 linux_resume_one_lwp_throw that swallows errors if the LWP is
1123 gone.
1124
91baf43f
PA
11252015-03-19 Pedro Alves <palves@redhat.com>
1126
1127 * linux-low.c (count_events_callback, select_event_lwp_callback):
1128 No longer check whether the thread has resume_stop as last resume
1129 kind.
1130
8bf3b159
PA
11312015-03-19 Pedro Alves <palves@redhat.com>
1132
1133 * linux-low.c (count_events_callback, select_event_lwp_callback):
1134 Use the lwp's status_pending_p field, not the thread's.
1135
b90fc188
PA
11362015-03-19 Pedro Alves <palves@redhat.com>
1137
1138 * linux-low.c (select_event_lwp_callback): Update comments to
1139 no longer mention SIGTRAP.
1140
464b0089
GB
11412015-03-18 Gary Benson <gbenson@redhat.com>
1142
1143 * server.c (handle_query): Do not report vFile:fstat as supported.
1144
aa9e327f
GB
11452015-03-11 Gary Benson <gbenson@redhat.com>
1146
1147 * hostio.c (sys/types.h): New include.
1148 (sys/stat.h): Likewise.
1149 (common-remote-fileio.h): Likewise.
1150 (handle_fstat): New function.
1151 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 1152
791c0056
GB
11532015-03-11 Gary Benson <gbenson@redhat.com>
1154
1155 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1156 struct stat.st_blocks and struct stat.st_blksize.
1157 * configure: Regenerate.
1158 * config.in: Likewise.
1159 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1160 (OBS): Add common-remote-fileio.o.
1161 (common-remote-fileio.o): New rule.
1162
9a9df970
PA
11632015-03-09 Pedro Alves <palves@redhat.com>
1164
1165 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1166 'struct sockaddr' pointer in 'accept' call.
1167
9eb1356e
PA
11682015-03-09 Pedro Alves <palves@redhat.com>
1169
1170 Revert:
1171 2015-03-07 Pedro Alves <palves@redhat.com>
1172 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1173 or <winsock2.h> here. Instead include "gdb_socket.h".
1174 (remote_open): Use union gdb_sockaddr_u.
1175 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1176 or <winsock2.h> here. Instead include "gdb_socket.h".
1177 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1178 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1179 or <sys/un.h>.
1180 (init_named_socket, gdb_agent_helper_thread): Use union
1181 gdb_sockaddr_u.
1182
aac331e4
PA
11832015-03-07 Pedro Alves <palves@redhat.com>
1184
1185 * configure.ac (build_warnings): Move
1186 -Wdeclaration-after-statement to the C-specific set.
1187 * configure: Regenerate.
1188
366c75fc
PA
11892015-03-07 Pedro Alves <palves@redhat.com>
1190
1191 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1192 or <winsock2.h> here. Instead include "gdb_socket.h".
1193 (remote_open): Use union gdb_sockaddr_u.
1194 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1195 or <winsock2.h> here. Instead include "gdb_socket.h".
1196 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1197 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1198 or <sys/un.h>.
1199 (init_named_socket, gdb_agent_helper_thread): Use union
1200 gdb_sockaddr_u.
1201
492d29ea
PA
12022015-03-07 Pedro Alves <palves@redhat.com>
1203
1204 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1205 instead.
1206
60a191ed
YQ
12072015-03-06 Yao Qi <yao.qi@linaro.org>
1208
1209 * linux-aarch64-low.c (aarch64_insert_point): Use
1210 show_debug_regs as a boolean.
1211 (aarch64_remove_point): Likewise.
1212
f5771b1d
PA
12132015-03-05 Pedro Alves <palves@redhat.com>
1214
1215 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1216 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1217 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1218 * nto-low.c (nto_target_ops): Likewise.
1219 * spu-low.c (spu_target_ops): Likewise.
1220 * win32-low.c (win32_target_ops): Likewise.
1221
3e572f71
PA
12222015-03-04 Pedro Alves <palves@redhat.com>
1223
72f4393d 1224 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
1225 Decide whether a breakpoint triggered based on the SIGTRAP's
1226 siginfo.si_code.
72f4393d
L
1227 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1228 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
1229 (linux_low_filter_event): Check for breakpoints before checking
1230 watchpoints.
1231 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1232 siginfo.si_code.
72f4393d
L
1233 (linux_stopped_by_sw_breakpoint)
1234 (linux_supports_stopped_by_sw_breakpoint)
1235 (linux_stopped_by_hw_breakpoint)
1236 (linux_supports_stopped_by_hw_breakpoint): New functions.
1237 (linux_target_ops): Install new target methods.
3e572f71 1238
1ec68e26
PA
12392015-03-04 Pedro Alves <palves@redhat.com>
1240
1241 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1242 * server.c (swbreak_feature, hwbreak_feature): New globals.
1243 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1244 (captured_main): Clear swbreak_feature and hwbreak_feature.
1245 * server.h (swbreak_feature, hwbreak_feature): Declare.
1246 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1247 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1248 supports_stopped_by_hw_breakpoint>: New fields.
1249 (target_supports_stopped_by_sw_breakpoint)
1250 (target_stopped_by_sw_breakpoint)
1251 (target_supports_stopped_by_hw_breakpoint)
1252 (target_stopped_by_hw_breakpoint): Declare.
1253
15c66dd6
PA
12542015-03-04 Pedro Alves <palves@redhat.com>
1255
1256 enum lwp_stop_reason -> enum target_stop_reason
1257 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1258 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1259 (linux_wait_1, stuck_in_jump_pad_callback)
1260 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1261 (linux_stopped_by_watchpoint):
1262 * linux-low.h (enum lwp_stop_reason): Delete.
1263 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1264 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1265
98fc70d6
YQ
12662015-03-04 Yao Qi <yao.qi@linaro.org>
1267
1268 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1269
dd2ac174
GB
12702015-03-03 Gary Benson <gbenson@redhat.com>
1271
1272 * hostio.c (handle_vFile): Fix prefix lengths.
1273
d68e53f4
MM
12742015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1275
1276 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1277 ptr_bits.
1278
bf2d68ab
AA
12792015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1280
1281 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1282 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1283 (clean): Add "rm -f" for above C files.
1284 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1285 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1286 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1287 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1288 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1289 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1290 (init_registers_s390x_vx_linux64)
1291 (init_registers_s390x_tevx_linux64)
1292 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1293 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1294 declarations.
1295 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1296 (s390_store_vxrs_high): New functions.
1297 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1298 NT_S390_VXRS_HIGH.
1299 (s390_arch_setup): Add logic for selecting one of the new target
1300 descriptions. Activate the new vector regsets if applicable.
1301 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1302 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1303 and init_registers_s390x_tevx_linux64.
1304
c966a859
PA
13052015-03-01 Pedro Alves <palves@redhat.com>
1306
1307 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1308 parameter.
1309
4180215b
PA
13102015-02-27 Pedro Alves <palves@redhat.com>
1311
1312 * linux-x86-low.c (u_debugreg_offset): New function.
1313 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1314
749bab01
PA
13152015-02-27 Pedro Alves <palves@redhat.com>
1316
1317 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1318 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1319 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1320 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1321 (ps_lsetfpregs, ps_getpid)
1322 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1323 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1324 (ps_lsetxregs, ps_plog): Declare.
1325
3c14e5a3
PA
13262015-02-27 Pedro Alves <palves@redhat.com>
1327
1328 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1329 IP_AGENT_EXPORT_FUNC.
1330 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1331 IP_AGENT_EXPORT_FUNC.
1332 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1333 (IP_AGENT_EXPORT): Delete.
1334 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1335 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1336 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1337 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1338 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1339 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1340 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1341 (traceframe_read_count, traceframe_write_count)
1342 (traceframes_created, trace_state_variables, get_raw_reg)
1343 (get_trace_state_variable_value, set_trace_state_variable_value)
1344 (ust_loaded, helper_thread_id, cmd_buf): Use
1345 IPA_SYM_EXPORTED_NAME.
1346 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1347 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1348 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1349 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1350 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1351 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1352 EXTERN_C_PUSH/EXTERN_C_POP.
1353 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1354 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1355 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1356 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1357 (traceframe_write_count, traceframe_read_count)
1358 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1359 (about_to_request_buffer_space, get_trace_state_variable_value)
1360 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1361 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1362 EXTERN_C_PUSH/EXTERN_C_POP.
1363 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1364 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1365 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1366 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1367 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1368 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1369 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1370 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1371 Define.
1372 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1373 (IP_AGENT_EXPORT_VAR_DECL): Define.
1374 (tracing): Declare.
1375 (gdb_agent_get_raw_reg): Declare.
1376
fe978cb0
PA
13772015-02-27 Tom Tromey <tromey@redhat.com>
1378 Pedro Alves <palves@redhat.com>
1379
1380 Rename symbols whose names are reserved C++ keywords throughout.
1381
3bc3d82a
PA
13822015-02-27 Pedro Alves <palves@redhat.com>
1383
1384 * Makefile.in (COMPILER): New, get it from autoconf.
1385 (CXX): Get from autoconf instead.
1386 (COMPILE.pre): Use COMPILER.
1387 (CC-LD): Rename to ...
1388 (CC_LD): ... this. Use COMPILER.
1389 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1390 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1391 * acinclude.m4: Include build-with-cxx.m4.
1392 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1393 Disable -Werror by default if building in C++ mode.
1394 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1395 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1396 the C++ compiler. Save/restore CXXFLAGS too.
1397 * configure: Regenerate.
1398
07697489
PA
13992015-02-27 Pedro Alves <palves@redhat.com>
1400
1401 * acinclude.m4: Include libiberty.m4.
1402 * configure.ac: Call libiberty_INIT.
1403 * config.in, configure: Regenerate.
1404
9beb7c4e
PA
14052015-02-26 Pedro Alves <palves@redhat.com>
1406
1407 * linux-low.c (linux_wait_1): When incrementing the PC past a
1408 program breakpoint always use the_low_target.breakpoint_len as
1409 increment, rather than the maximum between that and
1410 the_low_target.decr_pc_after_break.
1411
8090aef2
PA
14122015-02-23 Pedro Alves <palves@redhat.com>
1413
1414 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1415 thread was doing a step-over; always adjust the PC if
1416 we stepped over a permanent breakpoint.
1417 (linux_wait_1): If we stepped over breakpoint that was on top of a
1418 permanent breakpoint, manually advance the PC past it.
1419
bc9540e8
PA
14202015-02-23 Pedro Alves <palves@redhat.com>
1421
1422 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1423 modes.
1424 (x86_fill_gregset, x86_store_gregset): Use it when handling
1425 $orig_eax.
1426
2db9a427
PA
14272015-02-20 Pedro Alves <palves@redhat.com>
1428
1429 * thread-db.c: Include "nat/linux-procfs.h".
1430 (thread_db_init): Skip listing new threads if the kernel supports
1431 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1432
afa8d396
PA
14332015-02-20 Pedro Alves <palves@redhat.com>
1434
1435 * linux-low.c (status_pending_p_callback): Use ptid_match.
1436
c9587f88
AT
14372015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1438
1439 PR breakpoints/16812
1440 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1441 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1442 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1443
b05ec7a5
AT
14442015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1445
1446 PR breakpoints/15956
1447 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1448
d33501a5
MM
14492015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1450
1451 * linux-low.c (linux_low_btrace_conf): Print size.
1452 * server.c (handle_btrace_conf_general_set): New.
1453 (hanle_general_set): Call handle_btrace_conf_general_set.
1454 (handle_query): Report Qbtrace-conf:bts:size as supported.
1455
f4abbc16
MM
14562015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1457
1458 * linux-low.c (linux_low_enable_btrace): Update parameters.
1459 (linux_low_btrace_conf): New.
1460 (linux_target_ops)<to_btrace_conf>: Initialize.
1461 * server.c (current_btrace_conf): New.
1462 (handle_btrace_enable): Rename to ...
1463 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
1464 to target_enable_btrace. Update comment. Update users.
1465 (handle_qxfer_btrace_conf): New.
1466 (qxfer_packets): Add btrace-conf entry.
1467 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1468 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1469 (target_ops)<read_btrace_conf>: New.
1470 (target_enable_btrace): Update parameters.
1471 (target_read_btrace_conf): New.
1472
043c3577
MM
14732015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1474
1475 * server.c (handle_btrace_general_set): Remove call to
1476 target_supports_btrace.
1477 (supported_btrace_packets): New.
1478 (handle_query): Call supported_btrace_packets.
1479 * target.h: include btrace-common.h.
1480 (btrace_target_info): Removed.
1481 (supports_btrace, target_supports_btrace): Update parameters.
1482
734b0e4b
MM
14832015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1484
1485 * Makefile.in (SFILES): Add common/btrace-common.c.
1486 (OBS): Add common/btrace-common.o.
1487 (btrace-common.o): Add build rules.
1488 * linux-low: Include btrace-common.h.
1489 (linux_low_read_btrace): Use struct btrace_data. Call
1490 btrace_data_init and btrace_data_fini.
1491
d6c146e9
PA
14922015-02-06 Pedro Alves <palves@redhat.com>
1493
1494 * thread-db.c (find_new_threads_callback): Add debug output.
1495
20ba1ce6
PA
14962015-02-04 Pedro Alves <palves@redhat.com>
1497
1498 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1499 (resume_stopped_resumed_lwps): New function.
1500 (linux_wait_for_event_filtered): Use it.
1501
8cc73a39
SDJ
15022015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1503
1504 * Makefile.in (SFILES): Add linux-personality.c.
1505 (linux-personality.o): New rule.
1506 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1507 list of objects to be built.
1508 * linux-low.c: Include nat/linux-personality.h.
1509 (linux_create_inferior): Remove code to disable address space
1510 randomization (moved to ../nat/linux-personality.c). Create
1511 cleanup to disable address space randomization.
1512
fb23d554
SDJ
15132015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1514
1515 * Makefile.in (posix-strerror.o): New rule.
1516 (mingw-strerror.o): Likewise.
1517 * configure: Regenerated.
1518 * configure.ac: Source file ../common/common.host. Initialize new
1519 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1520
cdf43629
YQ
15212015-01-14 Yao Qi <yao@codesourcery.com>
1522
1523 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1524 (ppc-linux.o): New rule.
1525 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1526 * configure.ac: AC_CHECK_FUNCS(getauxval).
1527 * config.in: Re-generated.
1528 * configure: Re-generated.
1529 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1530 ppc64_64bit_inferior_p
1531
514c5338
YQ
15322015-01-14 Yao Qi <yao@codesourcery.com>
1533
1534 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1535 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1536 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1537 (PT_ORIG_R3, PT_TRAP): Likewise.
1538 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1539 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1540 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1541
3368c1e5
JB
15422015-01-10 Joel Brobecker <brobecker@adacore.com>
1543
1544 * i387-fp.c (i387_cache_to_xsave): In look over
1545 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1546 zmmh_low_space field by use of zmmh_high_space.
1547
582511be
PA
15482015-01-09 Pedro Alves <palves@redhat.com>
1549
1550 * linux-low.c (step_over_bkpt): Move higher up in the file.
1551 (handle_extended_wait): Don't store the stop_pc here.
1552 (get_stop_pc): Adjust comments and rename to ...
1553 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1554 stopped for a software breakpoint or hardware breakpoint.
1555 (thread_still_has_status_pending_p): New function.
1556 (status_pending_p_callback): Use
1557 thread_still_has_status_pending_p. If the event is no longer
1558 interesting, resume the LWP.
1559 (handle_tracepoints): Add assert.
1560 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1561 (wstatus_maybe_breakpoint): New function.
1562 (cancel_breakpoint): Delete function.
1563 (check_stopped_by_watchpoint): New function, factored out from
1564 linux_low_filter_event.
1565 (lp_status_maybe_breakpoint): Delete function.
1566 (linux_low_filter_event): Remove filter_ptid argument.
1567 Leave thread group exits pending here. Store the LWP's stop PC.
1568 Always leave events pending.
1569 (linux_wait_for_event_filtered): Pull all events out of the
1570 kernel, and leave them all pending.
1571 (count_events_callback, select_event_lwp_callback): Consider all
1572 events.
1573 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1574 (select_event_lwp): Only give preference to the stepping LWP in
1575 all-stop mode. Adjust comments.
1576 (ignore_event): New function.
1577 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1578 references to cancel_breakpoints. Adjust to renames. Also give
1579 equal priority to all LWPs that have had events in non-stop mode.
1580 If reporting a software breakpoint event, unadjust the LWP's PC.
1581 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1582 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1583 Adjust.
1584 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1585 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1586 (linux_stopped_by_watchpoint): Adjust.
1587 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1588 * linux-low.h (enum lwp_stop_reason): New.
1589 (struct lwp_info) <stop_pc>: Adjust comment.
1590 <stopped_by_watchpoint>: Delete field.
1591 <stop_reason>: New field.
1592 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1593 * mem-break.c (software_breakpoint_inserted_here)
1594 (hardware_breakpoint_inserted_here): New function.
1595 * mem-break.h (software_breakpoint_inserted_here)
1596 (hardware_breakpoint_inserted_here): Declare.
1597 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1598 (cancel_breakpoints): Delete.
1599 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1600 (upload_fast_traceframes): Remove references to
1601 cancel_breakpoints.
1602
a33e3959
PA
16032015-01-09 Pedro Alves <palves@redhat.com>
1604
1605 * thread-db.c (find_new_threads_callback): Ignore thread if the
1606 kernel thread ID is -1.
1607
8784d563
PA
16082015-01-09 Pedro Alves <palves@redhat.com>
1609
1610 * linux-low.c (linux_attach_fail_reason_string): Move to
1611 nat/linux-ptrace.c, and rename.
1612 (linux_attach_lwp): Update comment.
1613 (attach_proc_task_lwp_callback): New function.
1614 (linux_attach): Adjust to rename and use
1615 linux_proc_attach_tgid_threads.
1616 (linux_attach_fail_reason_string): Delete declaration.
1617
76f2b779
JB
16182015-01-01 Joel Brobecker <brobecker@adacore.com>
1619
1620 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1621 * server.c (gdbserver_version): Likewise.
1622
fafcc06a
SDJ
16232014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1624
1625 * remote-utils.c: Include ctype.h.
1626 (input_interrupt): Explicitly handle the case when the char
1627 received is the NUL byte. Improve the printing of non-ASCII
1628 characters.
1629
beed38b8
JB
16302014-12-16 Joel Brobecker <brobecker@adacore.com>
1631
1632 * linux-low.c (linux_low_filter_event): Update call to
1633 linux_enable_event_reporting following the addition of
1634 a new parameter to that function.
1635
bf330350
CU
16362014-12-16 Catalin Udma <catalin.udma@freescale.com>
1637
1638 PR server/17457
1639 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1640 (AARCH64_FPCR_REGNO): Likewise.
1641 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1642 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1643 (aarch64_store_fpregset): Likewise.
1644
5227d625
JB
16452014-12-15 Joel Brobecker <brobecker@adacore.com>
1646
1647 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1648 Remove FIXME comment about assumption about N.
1649
f93b65a0
JB
16502014-12-13 Joel Brobecker <brobecker@adacore.com>
1651
1652 * configure.ac: If large-file support is disabled in GDBserver,
1653 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1654 * configure: Regenerate.
1655
e5a9158d
AA
16562014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1657
1658 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1659 warning upon ENODATA from ptrace.
1660 * linux-s390-low.c (s390_store_tdb): New.
1661 (s390_regsets): Add regset for NT_S390_TDB.
1662
feea5f36
AA
16632014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1664
1665 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1666 without a fill_function.
1667 * linux-s390-low.c (s390_fill_last_break): Remove.
1668 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1669 (s390_arch_setup): Use regset's size instead of fill_function for
1670 loop end condition.
1671
098dbe61
AA
16722014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1673
1674 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1675 the regset's store function when ptrace returned an error.
1676 * regcache.c (get_thread_regcache): Invalidate register cache
1677 before fetching inferior's registers.
1678
28eef672
AA
16792014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1680
1681 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1682 while-loop as for-loop.
1683 (regsets_store_inferior_registers): Likewise.
1684
bdca27a2
YQ
16852014-11-28 Yao Qi <yao@codesourcery.com>
1686
1687 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1688 * config.in, configure: Re-generate.
1689 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1690 is defined.
1691
9c232dda
YQ
16922014-11-21 Yao Qi <yao@codesourcery.com>
1693
1694 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1695 (AC_CHECK_HEADERS): Remove malloc.h.
1696 * configure: Re-generated.
1697 * config.in: Re-generated.
1698 * server.h: Don't include alloca.h and malloc.h.
1699 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1700 Don't include malloc.h.
1701
43968415
JB
17022014-11-17 Joel Brobecker <brobecker@adacore.com>
1703
1704 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1705 corresponding ERRNO check in same block.
1706
40e91bc7
PA
17072014-11-12 Pedro Alves <palves@redhat.com>
1708
1709 * server.c (cont_thread): Update comment.
1710 (start_inferior, attach_inferior): No longer clear cont_thread.
1711 (handle_v_cont): No longer set cont_thread.
1712 (captured_main): Clear cont_thread each time a GDB connects.
1713
c2c118cf
PA
17142014-11-12 Pedro Alves <palves@redhat.com>
1715
1716 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1717 thread, and don't resume all threads if the Hc thread has exited.
1718
78708b7c
PA
17192014-11-12 Pedro Alves <palves@redhat.com>
1720
1721 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1722 the process group instead of to a specific LWP.
1723
a2abc7de
PA
17242014-10-15 Pedro Alves <palves@redhat.com>
1725
1726 PR server/17487
1727 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1728 parameter.
1729 (arm_set_thread_context): Delete.
1730 (the_low_target): Adjust.
1731 * win32-i386-low.c (debug_registers_changed)
1732 (debug_registers_used): Delete.
1733 (update_debug_registers_callback): New function.
1734 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1735 needing to update their debug registers.
1736 (win32_get_current_dr): New function.
1737 (x86_dr_low_get_addr, x86_dr_low_get_control)
1738 (x86_dr_low_get_status): Fetch the debug register from the thread
1739 record's context.
1740 (i386_initial_stuff): Adjust.
1741 (i386_get_thread_context): Remove current_event parameter. Don't
1742 clear debug_registers_changed nor copy DR values to
1743 debug_reg_state.
1744 (i386_set_thread_context): Delete.
1745 (i386_prepare_to_resume): New function.
1746 (i386_thread_added): Mark the thread as needing to update irs
1747 debug registers.
1748 (the_low_target): Remove i386_set_thread_context and install
1749 i386_prepare_to_resume.
1750 * win32-low.c (win32_get_thread_context): Adjust.
1751 (win32_set_thread_context): Use SetThreadContext
1752 directly.
1753 (win32_prepare_to_resume): New function.
1754 (win32_require_context): New function, factored out from ...
1755 (thread_rec): ... this.
1756 (continue_one_thread): Call win32_prepare_to_resume on each thread
1757 we're about to continue.
1758 (win32_resume): Call win32_prepare_to_resume on the event thread.
1759 * win32-low.h (struct win32_thread_info)
1760 <debug_registers_changed>: New field.
1761 (struct win32_target_ops): Change prototype of set_thread_context,
1762 delete set_thread_context and add prepare_to_resume.
1763 (win32_require_context): New declaration.
1764
a442d071
GB
17652014-10-08 Gary Benson <gbenson@redhat.com>
1766
1767 * server.h: Do not include common-exceptions.h.
1768
6f1947e8
GB
17692014-10-08 Gary Benson <gbenson@redhat.com>
1770
1771 * server.h: Do not include cleanups.h.
1772
63b434a4
JH
17732014-09-30 James Hogan <james.hogan@imgtec.com>
1774
1775 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1776 mips64-dsp-linux.c.
1777
c4d9ceb6
YQ
17782014-09-23 Yao Qi <yao@codesourcery.com>
1779
1780 * linux-low.c (lp_status_maybe_breakpoint): New function.
1781 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1782 (count_events_callback): Likewise.
1783 (select_event_lwp_callback): Likewise.
1784 (cancel_breakpoints_callback): Likewise.
1785
89a5711c
DB
17862014-09-19 Don Breazeal <donb@codesourcery.com>
1787
1788 * linux-low.c (handle_extended_wait): Call
1789 linux_ptrace_get_extended_event.
1790 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1791 linux_is_extended_waitstatus.
1792
bffc0964
JB
17932014-09-16 Joel Brobecker <brobecker@adacore.com>
1794
1795 * Makefile.in (CPPFLAGS): Define.
1796 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1797 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1798
0bfdf32f
GB
17992014-09-16 Gary Benson <gbenson@redhat.com>
1800
1801 * inferiors.h (current_inferior): Renamed as...
1802 (current_thread): New variable. All uses updated.
1803 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1804 (maybe_move_out_of_jump_pad): Likewise.
1805 (cancel_breakpoint): Likewise.
1806 (linux_low_filter_event): Likewise.
1807 (wait_for_sigstop): Likewise.
1808 (linux_resume_one_lwp): Likewise.
1809 (need_step_over_p): Likewise.
1810 (start_step_over): Likewise.
1811 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1812 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1813 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1814 and save_inferior as saved_thread.
1815 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1816 saved_thread.
1817 (regcache_invalidate_thread): Likewise.
1818 * remote-utils.c (prepare_resume_reply): Likewise.
1819 * thread-db.c (thread_db_get_tls_address): Likewise.
1820 (disable_thread_event_reporting): Likewise.
1821 (remove_thread_event_breakpoints): Likewise.
1822 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1823 as saved_thread.
1824 * target.h (set_desired_inferior): Renamed as...
1825 (set_desired_thread): New declaration. All uses updated.
1826 * server.c (myresume): Updated comment to reference thread instead
1827 of inferior.
1828 (handle_serial_event): Likewise.
1829 (handle_target_event): Likewise.
1830
361c8ade
GB
18312014-09-12 Tom Tromey <tromey@redhat.com>
1832 Gary Benson <gbenson@redhat.com>
1833
1834 * regcache.h: Include common-regcache.h.
1835 (regcache_read_pc): Don't declare.
1836 * regcache.c (get_thread_regcache_for_ptid): New function.
1837
bd9269f7
GB
18382014-09-11 Tom Tromey <tromey@redhat.com>
1839 Gary Benson <gbenson@redhat.com>
1840
1841 * symbol.c: New file.
1842 * Makefile.in (SFILES): Add symbol.c.
1843 (OBS): Add symbol.o.
1844
f8c1d06b
GB
18452014-09-11 Gary Benson <gbenson@redhat.com>
1846
1847 * target.c (target_stop_ptid, target_continue_ptid): New
1848 functions.
1849
721ec300
GB
18502014-09-11 Tom Tromey <tromey@redhat.com>
1851 Gary Benson <gbenson@redhat.com>
1852
1853 * target.h: Include target/target.h.
1854 * target.c (target_read_memory, target_read_uint32)
1855 (target_write_memory): New functions.
1856
c5e92cca
GB
18572014-09-11 Gary Benson <gbenson@redhat.com>
1858
1859 * server.h (debug_hw_points): Don't declare.
1860 * server.c (debug_hw_points): Don't define. Replace all uses
1861 with show_debug_regs.
1862 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1863 all uses with show_debug_regs.
1864
2e4bb98a
EBM
18652014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1866
1867 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1868 endianness into account.
1869 (ppc_supply_ptrace_register): Likewise.
1870
ac740bc7
JH
18712014-09-03 James Hogan <james.hogan@imgtec.com>
1872
1873 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1874 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1875
97ea6506
GB
18762014-09-03 Gary Benson <gbenson@redhat.com>
1877
1878 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1879 ALL_DEBUG_ADDRESS_REGISTERS.
1880
df7e5265
GB
18812014-09-02 Gary Benson <gbenson@redhat.com>
1882
1883 * i386-low.h: Renamed as...
1884 * x86-low.h: New file. All type, function and variable name
1885 prefixes changed from "i386_" to "x86_". All references updated.
1886 * i386-low.c: Renamed as...
1887 * x86-low.c: New file. All type, function and variable name
1888 prefixes changed from "i386_" to "x86_". All references updated.
1889
ed859da7
GB
18902014-09-02 Gary Benson <gbenson@redhat.com>
1891
1892 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1893 (x86_linux_new_thread): Likewise.
1894
860789c7
GB
18952014-08-29 Gary Benson <gbenson@redhat.com>
1896
1897 * server.h (setjmp.h): Do not include.
1898 (toplevel): Do not declare.
1899 (common-exceptions.h): Include.
1900 (cleanups.h): Likewise.
1901 * server.c (toplevel): Do not define.
1902 (exit_code): New static global.
1903 (detach_or_kill_for_exit_cleanup): New function.
1904 (main): New function. Original main renamed to...
1905 (captured_main): New function.
1906 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1907
ff55e1b5
GB
19082014-08-29 Gary Benson <gbenson@redhat.com>
1909
1910 * Makefile.in (SFILES): Add common/common-exceptions.c.
1911 (OBS): Add common-exceptions.o.
1912 (common-exceptions.o): New rule.
1913 * utils.c (prepare_to_throw_exception): New function.
1914
e9bcb658
GB
19152014-08-29 Gary Benson <gbenson@redhat.com>
1916
1917 * config.in: Regenerate.
1918 * configure: Likewise.
1919
e3180625
GB
19202014-08-29 Gary Benson <gbenson@redhat.com>
1921
1922 * Makefile.in (SFILES): Add common/cleanups.c.
1923 (OBS): cleanups.o.
1924 (cleanups.o): New rule.
1925
e3d6ba5d
GB
19262014-08-29 Gary Benson <gbenson@redhat.com>
1927
1928 * utils.c (internal_vwarning): New function.
1929
7096e886
GB
19302014-08-28 Gary Benson <gbenson@redhat.com>
1931
1932 * utils.h (fatal): Remove declaration.
1933 * utils.c (fatal): Remove function.
1934
14ce3192
GB
19352014-08-28 Gary Benson <gbenson@redhat.com>
1936
1937 * tracepoint.c (gdb_agent_init): Replace fatal with
1938 perror_with_name.
1939 (initialize_tracepoint): Likewise.
1940
50278d59
GB
19412014-08-28 Gary Benson <gbenson@redhat.com>
1942
1943 * remote-utils.c (remote_prepare): Replace fatal with error.
1944
aa96c426
GB
19452014-08-28 Gary Benson <gbenson@redhat.com>
1946
1947 * linux-low.c (linux_async): Replace fatal with warning.
1948 Tidy up and return.
1949 (linux_start_non_stop): Return -1 if linux_async failed.
1950
f7160e97
GB
19512014-08-28 Gary Benson <gbenson@redhat.com>
1952
1953 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1954 gdb_assert.
1955 (i386_dr_low_get_addr): Remove vague comment.
1956 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1957 gdb_assert.
1958
38e08fca
GB
19592014-08-28 Gary Benson <gbenson@redhat.com>
1960
1961 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1962 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1963 internal_error.
1964 (linux_resume_one_lwp): Likewise.
1965 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1966 gdb_assert.
1967 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1968 with internal_error.
1969 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1970 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1971 (find_register_by_name): Replace fatal with internal_error.
1972 (find_regno): Likewise.
1973 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1974 * thread-db.c (thread_db_create_event): Likewise.
1975 (thread_db_load_search): Likewise.
1976 (try_thread_db_load_1): Likewise.
1977 * tracepoint.c (get_jump_space_head): Replace fatal with
1978 internal_error.
1979 (claim_trampoline_space): Likewise.
1980 (have_fast_tracepoint_trampoline_buffer): Likewise.
1981 (cmd_qtstart): Likewise.
1982 (stop_tracing): Likewise.
1983 (fast_tracepoint_collecting): Likewise.
1984 (target_malloc): Likewise.
1985 (download_tracepoint): Likewise.
1986 (download_trace_state_variables): Replace check with gdb_assert.
1987 (upload_fast_traceframes): Replace fatal with internal_error.
1988
34abf635
GB
19892014-08-19 Tom Tromey <tromey@redhat.com>
1990 Gary Benson <gbenson@redhat.com>
1991
1992 * Makefile.in (SFILES): Add common/common-debug.c.
1993 (OBS): Add common-debug.o.
1994 (common-debug.o): New rule.
1995 * debug.h (debug_printf): Don't declare.
1996 * debug.c (debug_printf): Renamed and rewritten as...
1997 (debug_vprintf): New function.
1998
f6e94d78
GB
19992014-08-19 Gary Benson <gbenson@redhat.com>
2000
2001 * utils.h: Do not include print-utils.h.
2002
9239eeab
GB
20032014-08-19 Tom Tromey <tromey@redhat.com>
2004 Gary Benson <gbenson@redhat.com>
2005
2006 * server.h: Add static assertion.
2007 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2008
ef87c8bb
GB
20092014-08-19 Tom Tromey <tromey@redhat.com>
2010 Gary Benson <gbenson@redhat.com>
2011
2012 * Makefile.in (SFILES): Add common/errors.c.
2013 (OBS): Add errors.o.
2014 (IPA_OBS): Add errors-ipa.o.
2015 (errors.o): New rule.
2016 (errors-ipa.o): Likewise.
2017 * utils.h (perror_with_name, error, warning): Don't declare.
2018 * utils.c (warning): Renamed and rewritten as...
2019 (vwarning): New function.
2020 (error): Renamed and rewritten as...
2021 (verror): New function.
2022 (internal_error): Renamed and rewritten as...
2023 (internal_verror): New function.
2024
bb974a24
GB
20252014-08-07 Gary Benson <gbenson@redhat.com>
2026
2027 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2028 * configure: Regenerate.
2029 * config.in: Likewise.
2030 * server.h: Do not include errno.h.
2031 * event-loop.c: Likewise.
2032 * hostio-errno.c: Likewise.
2033 * linux-low.c: Likewise.
2034 * remote-utils.c: Likewise.
2035 * spu-low.c: Likewise.
2036 * utils.c: Likewise.
2037 * gdbreplay.c: Unconditionally include errno.h.
2038
6d3d12eb
GB
20392014-08-07 Gary Benson <gbenson@redhat.com>
2040
2041 * server.h: Do not include string.h.
2042 * event-loop.c: Likewise.
2043 * linux-low.c: Likewise.
2044 * regcache.c: Likewise.
2045 * remote-utils.c: Likewise.
2046 * spu-low.c: Likewise.
2047 * utils.c: Likewise.
2048
dccbb609
GB
20492014-08-07 Gary Benson <gbenson@redhat.com>
2050
2051 * server.h: Do not include gdb_assert.h.
2052
e76df0d0
GB
20532014-08-07 Gary Benson <gbenson@redhat.com>
2054
2055 * server.h: Do not include common-utils.h.
2056
4cb9c816
GB
20572014-08-07 Gary Benson <gbenson@redhat.com>
2058
2059 * server.h: Do not include ptid.h.
2060 * notif.h: Likewise.
2061
3995eeee
GB
20622014-08-07 Gary Benson <gbenson@redhat.com>
2063
2064 * server.h: Do not include gdb_locale.h.
2065
cb9f1a9b
GB
20662014-08-07 Gary Benson <gbenson@redhat.com>
2067
2068 * server.h: Do not include gdb/signals.h.
2069 * win32-low.c: Likewise.
2070
a5fceff8
GB
20712014-08-07 Gary Benson <gbenson@redhat.com>
2072
2073 * server.h: Do not include pathmax.h.
2074
b9391142
GB
20752014-08-07 Gary Benson <gbenson@redhat.com>
2076
2077 * server.h: Do not include libiberty.h.
2078 * linux-bfin-low.c: Likewise.
2079
0e443c87
GB
20802014-08-07 Gary Benson <gbenson@redhat.com>
2081
2082 * server.h: Do not include ansidecl.h.
2083
8ebb3f56
GB
20842014-08-07 Gary Benson <gbenson@redhat.com>
2085
2086 * linux-x86-low.c: Do not include stddef.h.
2087 * lynx-ppc-low.c: Likewise.
2088 * tracepoint.c: Likewise.
2089
8980bdf6
GB
20902014-08-07 Gary Benson <gbenson@redhat.com>
2091
2092 * server.h: Do not include stdarg.h.
2093 * nto-low.c: Likewise.
2094
d7096f71
GB
20952014-08-07 Gary Benson <gbenson@redhat.com>
2096
2097 * server.h: Do not include stdlib.h.
2098 * inferiors.c: Likewise.
2099 * linux-low.c: Likewise.
2100 * regcache.c: Likewise.
2101 * spu-low.c: Likewise.
2102 * tracepoint.c: Likewise.
2103 * utils.c: Likewise.
2104
d02f550d
GB
21052014-08-07 Gary Benson <gbenson@redhat.com>
2106
2107 * server.h: Do not include stdio.h.
2108 * linux-low.c: Likewise.
2109 * remote-utils.c: Likewise.
2110 * spu-low.c: Likewise.
2111 * utils.c: Likewise.
2112 * wincecompat.c: Likewise.
2113
87f6c4e3
GB
21142014-08-06 Gary Benson <gbenson@redhat.com>
2115
2116 * regcache.c (init_register_cache): Move conditionals inside if.
2117
7089dca4
GB
21182014-08-06 Gary Benson <gbenson@redhat.com>
2119
2120 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2121
462f517e
GB
21222014-07-31 Gary Benson <gbenson@redhat.com>
2123
2124 * ax.h: Do not include server.h.
2125 * gdbthread.h: Likewise.
2126 * lynx-low.h: Likewise.
2127 * notif.h: Likewise.
2128
976411d6
GB
21292014-07-30 Gary Benson <gbenson@redhat.com>
2130
2131 * server.h: Include common-defs.h.
2132 Do not include config.h or build-gnulib-gdbserver/config.h.
2133
d41f6d8e
GB
21342014-07-30 Gary Benson <gbenson@redhat.com>
2135
2136 * hostio-errno.c: Move server.h to top of includes list.
2137 * inferiors.c: Likewise.
2138 * linux-x86-low.c: Likewise.
2139 * notif.c: Include server.h.
2140
314c6a35
TT
21412014-07-24 Tom Tromey <tromey@redhat.com>
2142 Gary Benson <gbenson@redhat.com>
2143
2144 * server.h (CORE_ADDR): Now unsigned.
2145
69ff6be5
PA
21462014-07-16 Pedro Alves <palves@redhat.com>
2147
2148 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2149
ce9e3fe7
PA
21502014-07-15 Pedro Alves <palves@redhat.com>
2151
2152 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2153 copy.
2154
e76126e8
PA
21552014-07-11 Pedro Alves <palves@redhat.com>
2156
2157 * linux-low.c (kill_wait_lwp): New function, based on
2158 kill_one_lwp_callback, but use my_waitpid directly.
2159 (kill_one_lwp_callback, linux_kill): Use it.
2160
8e9db26e
PA
21612014-06-23 Pedro Alves <palves@redhat.com>
2162
2163 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2164 before setting DR0..DR3.
2165
698b3e08
GB
21662014-06-20 Gary Benson <gbenson@redhat.com>
2167
2168 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2169 * configure: Regenerated.
2170 * config.in: Likewise.
2171
125f8a3d
GB
21722014-06-20 Gary Benson <gbenson@redhat.com>
2173
2174 * Makefile.in (SFILES): Update locations for files moved
2175 from common to nat.
2176 (object file files): Reordered.
2177
42995dbd
GB
21782014-06-20 Gary Benson <gbenson@redhat.com>
2179
2180 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2181 (i386_dr_low_set_addr): Likewise.
2182 (i386_dr_low_get_addr): Likewise.
2183 (i386_dr_low_can_set_control): Likewise.
2184 (i386_dr_low_set_control): Likewise.
2185 (i386_dr_low_get_control): Likewise.
2186 (i386_dr_low_get_status): Likewise.
2187 (i386_get_debug_register_length): Likewise.
2188 * linux-x86-low.c (i386_dr_low_set_addr):
2189 Changed signature. Made static.
2190 (i386_dr_low_get_addr): Likewise.
2191 (i386_dr_low_set_control): Likewise.
2192 (i386_dr_low_get_control): Likewise.
2193 (i386_dr_low_get_status): Likewise.
2194 (i386_dr_low): New global variable.
2195 * win32-i386-low.c (i386_dr_low_set_addr):
2196 Changed signature. Made static.
2197 (i386_dr_low_get_addr): Likewise.
2198 (i386_dr_low_set_control): Likewise.
2199 (i386_dr_low_get_control): Likewise.
2200 (i386_dr_low_get_status): Likewise.
2201 (i386_dr_low): New global variable.
2202
e1d2394b
MS
22032014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2204
2205 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2206 * Makefile.in (AR, AR_FLAGS): Define.
2207 * configure: Regenerate.
2208
3a8ee006
GB
22092014-06-19 Gary Benson <gbenson@redhat.com>
2210
2211 * Makefile.in (i386-dregs.o): New rule.
2212 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2213 * i386-low.c (target.h): Remove include.
2214 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2215 (DR_CONTROL_SHIFT): Likewise.
2216 (DR_CONTROL_SIZE): Likewise.
2217 (DR_RW_EXECUTE): Likewise.
2218 (DR_RW_WRITE): Likewise.
2219 (DR_RW_READ): Likewise.
2220 (DR_RW_IORW): Likewise.
2221 (DR_LEN_1): Likewise.
2222 (DR_LEN_2): Likewise.
2223 (DR_LEN_4): Likewise.
2224 (DR_LEN_8): Likewise.
2225 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2226 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2227 (DR_ENABLE_SIZE): Likewise.
2228 (DR_LOCAL_SLOWDOWN): Likewise.
2229 (DR_GLOBAL_SLOWDOWN): Likewise.
2230 (DR_CONTROL_RESERVED): Likewise.
2231 (I386_DR_CONTROL_MASK): Likewise.
2232 (I386_DR_VACANT): Likewise.
2233 (I386_DR_LOCAL_ENABLE): Likewise.
2234 (I386_DR_GLOBAL_ENABLE): Likewise.
2235 (I386_DR_DISABLE): Likewise.
2236 (I386_DR_SET_RW_LEN): Likewise.
2237 (I386_DR_GET_RW_LEN): Likewise.
2238 (I386_DR_WATCH_HIT): Likewise.
2239 (i386_wp_op_t): Likewise.
2240 (i386_show_dr): Likewise.
2241 (i386_length_and_rw_bits): Likewise.
2242 (i386_insert_aligned_watchpoint): Likewise.
2243 (i386_remove_aligned_watchpoint): Likewise.
2244 (i386_handle_nonaligned_watchpoint): Likewise.
2245 i386_update_inferior_debug_regs(): Likewise.
2246 (i386_dr_insert_watchpoint): Likewise.
2247 (i386_dr_remove_watchpoint): Likewise.
2248 (i386_dr_region_ok_for_watchpoint): Likewise.
2249 (i386_dr_stopped_data_address): Likewise.
2250 (i386_dr_stopped_by_watchpoint): Likewise.
2251
8f26655c
GB
22522014-06-19 Gary Benson <gbenson@redhat.com>
2253
2254 * i386-low.c (i386_dr_show): Renamed to
2255 i386_show_dr and made static. All uses updated.
2256 (i386_dr_length_and_rw_bits): Renamed to
2257 i386_length_and_rw_bits and made static.
2258 All uses updated.
2259 (i386_dr_insert_aligned_watchpoint): Renamed to
2260 i386_insert_aligned_watchpoint and made static.
2261 All uses updated.
2262 (i386_dr_remove_aligned_watchpoint): Renamed to
2263 i386_remove_aligned_watchpoint and made static.
2264 All uses updated.
2265 (i386_dr_update_inferior_debug_regs): Renamed to
2266 i386_update_inferior_debug_regs and made static.
2267 All uses updated.
2268
b9228891
GB
22692014-06-18 Gary Benson <gbenson@redhat.com>
2270
5171def3
GB
2271 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2272 (i386_dr_low_can_set_control): Likewise.
2273 (i386_get_debug_register_length): Likewise.
2274 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2275 (i386_dr_low_can_set_control): Likewise.
2276 (i386_get_debug_register_length): Likewise.
2277
22782014-06-17 Gary Benson <gbenson@redhat.com>
2279
b9228891
GB
2280 * i386-low.h (i386-dregs.h): New include.
2281 (DR_FIRSTADDR): Now in i386-dregs.h.
2282 (DR_LASTADDR): Likewise.
2283 (DR_NADDR): Likewise.
2284 (DR_STATUS): Likewise.
2285 (DR_CONTROL): Likewise.
2286 (i386_debug_reg_state): Likewise.
2287 (i386_dr_insert_watchpoint): Likewise.
2288 (i386_dr_remove_watchpoint): Likewise.
2289 (i386_dr_region_ok_for_watchpoint): Likewise.
2290 (i386_dr_stopped_data_address): Likewise.
2291 (i386_dr_stopped_by_watchpoint): Likewise.
2292 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2293
4be83cc2
GB
22942014-06-18 Gary Benson <gbenson@redhat.com>
2295
2296 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2297 i386_dr_insert_watchpoint.
2298 (i386_low_remove_watchpoint): Renamed to
2299 i386_dr_remove_watchpoint.
2300 (i386_low_region_ok_for_watchpoint): Renamed to
2301 i386_dr_region_ok_for_watchpoint.
2302 (i386_low_stopped_data_address): Renamed to
2303 i386_dr_stopped_data_address.
2304 (i386_low_stopped_by_watchpoint): Renamed to
2305 i386_dr_stopped_by_watchpoint.
2306 * i386-low.c (i386_show_dr): Renamed to
2307 i386_dr_show and made nonstatic. All uses updated.
2308 (i386_length_and_rw_bits): Renamed to
2309 i386_dr_length_and_rw_bits and made nonstatic.
2310 All uses updated.
2311 (i386_insert_aligned_watchpoint): Renamed to
2312 i386_dr_insert_aligned_watchpoint and made nonstatic.
2313 All uses updated.
2314 (i386_remove_aligned_watchpoint): Renamed to
2315 i386_dr_remove_aligned_watchpoint and made nonstatic.
2316 All uses updated.
2317 (i386_update_inferior_debug_regs): Renamed to
2318 i386_dr_update_inferior_debug_regs and made nonstatic.
2319 All uses updated.
2320 (i386_low_insert_watchpoint): Renamed to
2321 i386_dr_insert_watchpoint. All uses updated.
2322 (i386_low_remove_watchpoint): Renamed to
2323 i386_dr_remove_watchpoint. All uses updated.
2324 (i386_low_region_ok_for_watchpoint): Renamed to
2325 i386_dr_region_ok_for_watchpoint. All uses updated.
2326 (i386_low_stopped_data_address): Renamed to
2327 i386_dr_stopped_data_address. All uses updated.
2328 (i386_low_stopped_by_watchpoint): Renamed to
2329 i386_dr_stopped_by_watchpoint. All uses updated.
2330
131aa0d4
GB
23312014-06-18 Gary Benson <gbenson@redhat.com>
2332
2333 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2334 (i386_dr_low_can_set_control): Likewise.
2335 (i386_insert_aligned_watchpoint): New check.
2336
d9305f7f
GB
23372014-06-18 Gary Benson <gbenson@redhat.com>
2338
2339 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2340 Renamed to state.
2341
e927c9fc
GB
23422014-06-18 Gary Benson <gbenson@redhat.com>
2343
2344 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2345 instead of fatal and error.
2346 (i386_handle_nonaligned_watchpoint): Likewise.
2347
1b6d4134
GB
23482014-06-18 Gary Benson <gbenson@redhat.com>
2349
2350 * i386-low.c (i386_get_debug_register_length): New macro.
2351 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2352 (i386_show_dr): Use debug_printf instead of fprintf. Use
2353 phex to format values.
2354
6e62758f
GB
23552014-06-18 Gary Benson <gbenson@redhat.com>
2356
2357 * i386-low.h: Comment changes.
2358 * i386-low.c: Likewise.
2359
fc6e2f03
GB
23602014-06-18 Gary Benson <gbenson@redhat.com>
2361
2362 * i386-low.c: Whitespace changes.
2363
f9d1eeed
TT
23642014-06-12 Tom Tromey <tromey@redhat.com>
2365
2366 * utils.c (freeargv): Remove.
2367
0b04e523
TT
23682014-06-12 Tom Tromey <tromey@redhat.com>
2369
2370 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2371 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2372 (parse_debug_format_options): Likewise.
2373 (gdbserver_usage): Likewise.
2374 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2375 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2376 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2377 against libiberty.
2378 ($(LIBGNU)): Depend on libiberty.
2379 (all-lib): Recurse into all subdirs.
2380 (install-only): Invoke "install" target in subdirs.
2381 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2382 targets.
2383 * configure: Rebuild.
2384 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2385 for vasprintf, vsnprintf, or gettimeofday.
2386 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2387 srv_tgtobj.
2388
270c9937
JB
23892014-06-05 Joel Brobecker <brobecker@adacore.com>
2390
2391 * development.sh: Delete.
2392 * Makefile.in (config.status): Adjust dependency on development.sh.
2393 * configure.ac: Adjust development.sh source call.
2394 * configure: Regenerate.
2395
0a261ed8
PA
23962014-06-02 Pedro Alves <palves@redhat.com>
2397
2398 * ax.c (gdb_free_agent_expr): New function.
2399 * ax.h (gdb_free_agent_expr): New declaration.
2400 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2401 list.
2402 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2403 static.
2404 (clear_breakpoint_conditions_and_commands): New function.
2405 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2406 (clear_breakpoint_conditions_and_commands): New declaration.
2407
e9dae05e
RR
24082014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2409
2410 * linux-aarch64-low.c (asm/ptrace.h): Include.
2411
5876f503
JK
24122014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2413
2414 Fix TLS access for -static -pthread.
2415 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2416 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2417 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2418
802e8e6d
PA
24192014-05-20 Pedro Alves <palves@redhat.com>
2420
2421 * linux-aarch64-low.c (aarch64_insert_point)
2422 (aarch64_remove_point): No longer check whether the type is
2423 supported here. Adjust to new interface.
2424 (the_low_target): Install aarch64_supports_z_point_type as
2425 supports_z_point_type method.
2426 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2427 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2428 instead of a Z packet char. Adjust.
2429 (arm_supports_z_point_type): New function.
2430 (arm_insert_point, arm_remove_point): Adjust to new interface.
2431 (the_low_target): Install arm_supports_z_point_type.
2432 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2433 (cris_insert_point, cris_remove_point): Adjust to new interface.
2434 Don't check whether the type is supported here.
2435 (the_low_target): Install cris_supports_z_point_type.
2436 * linux-low.c (linux_supports_z_point_type): New function.
2437 (linux_insert_point, linux_remove_point): Adjust to new interface.
2438 * linux-low.h (struct linux_target_ops) <insert_point,
2439 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2440 raw_breakpoint pointer parameter.
2441 <supports_z_point_type>: New method.
2442 * linux-mips-low.c (mips_supports_z_point_type): New function.
2443 (mips_insert_point, mips_remove_point): Adjust to new interface.
2444 Use mips_supports_z_point_type.
2445 (the_low_target): Install mips_supports_z_point_type.
2446 * linux-ppc-low.c (the_low_target): Install NULL as
2447 supports_z_point_type method.
2448 * linux-s390-low.c (the_low_target): Install NULL as
2449 supports_z_point_type method.
2450 * linux-sparc-low.c (the_low_target): Install NULL as
2451 supports_z_point_type method.
2452 * linux-x86-low.c (x86_supports_z_point_type): New function.
2453 (x86_insert_point): Adjust to new insert_point interface. Use
2454 insert_memory_breakpoint. Adjust to new
2455 i386_low_insert_watchpoint interface.
2456 (x86_remove_point): Adjust to remove_point interface. Use
2457 remove_memory_breakpoint. Adjust to new
2458 i386_low_remove_watchpoint interface.
2459 (the_low_target): Install x86_supports_z_point_type.
2460 * lynx-low.c (lynx_target_ops): Install NULL as
2461 supports_z_point_type callback.
2462 * nto-low.c (nto_supports_z_point_type): New.
2463 (nto_insert_point, nto_remove_point): Adjust to new interface.
2464 (nto_target_ops): Install nto_supports_z_point_type.
2465 * mem-break.c: Adjust intro comment.
2466 (struct raw_breakpoint) <raw_type, size>: New fields.
2467 <inserted>: Update comment.
2468 <shlib_disabled>: Delete field.
2469 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2470 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2471 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2472 (raw_bkpt_type_to_target_hw_bp_type): New function.
2473 (find_enabled_raw_code_breakpoint_at): New function.
2474 (find_raw_breakpoint_at): New type and size parameters. Use them.
2475 (insert_memory_breakpoint): New function, based off
2476 set_raw_breakpoint_at.
2477 (remove_memory_breakpoint): New function.
2478 (set_raw_breakpoint_at): Reimplement.
2479 (set_breakpoint): New, based on set_breakpoint_at.
2480 (set_breakpoint_at): Reimplement.
2481 (delete_raw_breakpoint): Go through the_target->remove_point
2482 instead of assuming memory breakpoints.
2483 (find_gdb_breakpoint_at): Delete.
2484 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2485 (find_gdb_breakpoint): New function.
2486 (set_gdb_breakpoint_at): Delete.
2487 (z_type_supported): New function.
2488 (set_gdb_breakpoint_1): New function, loosely based off
2489 set_gdb_breakpoint_at.
2490 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2491 (delete_gdb_breakpoint_at): Delete.
2492 (delete_gdb_breakpoint_1): New function, loosely based off
2493 delete_gdb_breakpoint_at.
2494 (delete_gdb_breakpoint): New function.
2495 (clear_gdb_breakpoint_conditions): Rename to ...
2496 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2497 breakpoint.
2498 (add_condition_to_breakpoint): Make static.
2499 (add_breakpoint_condition): Take a struct breakpoint pointer
2500 instead of an address. Adjust.
2501 (gdb_condition_true_at_breakpoint): Rename to ...
2502 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2503 z_type parameter.
2504 (gdb_condition_true_at_breakpoint): Reimplement.
2505 (add_breakpoint_commands): Take a struct breakpoint pointer
2506 instead of an address. Adjust.
2507 (gdb_no_commands_at_breakpoint): Rename to ...
2508 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2509 parameter. Return true if no breakpoint was found. Change debug
2510 output.
2511 (gdb_no_commands_at_breakpoint): Reimplement.
2512 (run_breakpoint_commands): Rename to ...
2513 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2514 and change return type to boolean.
2515 (run_breakpoint_commands): New function.
2516 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2517 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2518 breakpoint. Go through the_target->remove_point instead of
2519 assuming memory breakpoint.
2520 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2521 software and hardware breakpoints.
2522 (reinsert_raw_breakpoint): Go through the_target->insert_point
2523 instead of assuming memory breakpoint.
2524 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2525 software and hardware breakpoints.
2526 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2527 Check both software and hardware breakpoints.
2528 (validate_inserted_breakpoint): Assert the breakpoint is a
2529 software breakpoint. Set the inserted flag to -1 instead of
2530 setting shlib_disabled.
2531 (delete_disabled_breakpoints): Adjust.
2532 (validate_breakpoints): Only validate software breakpoints.
2533 Adjust to inserted flag change.
2534 (check_mem_read, check_mem_write): Skip breakpoint types other
2535 than software breakpoints. Adjust to inserted flag change.
2536 * mem-break.h (enum raw_bkpt_type): New enum.
2537 (raw_breakpoint, struct process_info): Forward declare.
2538 (Z_packet_to_target_hw_bp_type): Delete declaration.
2539 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2540 (set_gdb_breakpoint, delete_gdb_breakpoint)
2541 (clear_breakpoint_conditions): New declarations.
2542 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2543 (breakpoint_inserted_here): Update comment.
2544 (add_breakpoint_condition, add_breakpoint_commands): Replace
2545 address parameter with a breakpoint pointer parameter.
2546 (gdb_breakpoint_here): Update comment.
2547 (delete_gdb_breakpoint_at): Delete.
2548 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2549 * server.c (process_point_options): Take a struct breakpoint
2550 pointer instead of an address. Adjust.
2551 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2552 delete_gdb_breakpoint.
2553 * spu-low.c (spu_target_ops): Install NULL as
2554 supports_z_point_type method.
2555 * target.h: Include mem-break.h.
2556 (struct target_ops) <prepare_to_access_memory>: Update comment.
2557 <supports_z_point_type>: New field.
2558 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2559 instead of a char. Also take a raw breakpoint pointer.
2560 * win32-arm-low.c (the_low_target): Install NULL as
2561 supports_z_point_type.
2562 * win32-i386-low.c (i386_supports_z_point_type): New function.
2563 (i386_insert_point, i386_remove_point): Adjust to new interface.
2564 (the_low_target): Install i386_supports_z_point_type.
2565 * win32-low.c (win32_supports_z_point_type): New function.
2566 (win32_insert_point, win32_remove_point): Adjust to new interface.
2567 (win32_target_ops): Install win32_supports_z_point_type.
2568 * win32-low.h (struct win32_target_ops):
2569 <supports_z_point_type>: New method.
2570 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2571 instead of a char. Also take a raw breakpoint pointer.
2572
932539e3
PA
25732014-05-20 Pedro Alves <palves@redhat.com>
2574
2575 * mem-break.h: Include break-common.h.
2576 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2577 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2578 (Z_packet_to_target_hw_bp_type): New declaration.
2579 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2580 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2581 (Z_PACKET_ACCESS_WP): Delete macros.
2582 (Z_packet_to_hw_type): Delete function.
2583 * i386-low.h: Don't include break-common.h here.
2584 (Z_packet_to_hw_type): Delete declaration.
2585 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2586 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2587 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2588 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2589 * linux-aarch64-low.c: Don't include break-common.h here.
2590 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2591 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2592 (Z_packet_to_target_hw_bp_type): Delete function.
2593 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2594 function.
2595 (mips_insert_point, mips_remove_point): Use
2596 Z_packet_to_target_hw_bp_type.
2597
4ff0d3d8
PA
25982014-05-20 Pedro Alves <palves@redhat.com>
2599
2600 * linux-aarch64-low.c: Include break-common.h.
2601 (enum target_point_type): Delete.
2602 (Z_packet_to_point_type): Rename to ...
2603 (Z_packet_to_target_hw_bp_type): ... this, and return a
2604 target_hw_bp_type instead.
2605 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2606 instead of an enum target_point_type.
2607 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2608 breakpoint type.
2609 (aarch64_dr_state_insert_one_point)
2610 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2611 (aarch64_handle_aligned_watchpoint)
2612 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2613 Take an enum target_hw_bp_type instead of an enum
2614 target_point_type.
2615 (aarch64_supports_z_point_type): New function.
2616 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2617 use Z_packet_to_target_hw_bp_type.
2618
786dc519
JB
26192014-05-20 Joel Brobecker <brobecker@adacore.com>
2620
2621 * configure.ac: Only use -Werror by default when DEVELOPMENT
2622 is true.
2623 * configure: Regenerate.
2624
9e0aa64f
JK
26252014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2626
2627 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2628 * linux-x86-low.c (X86_64_USER_REGS): New.
2629 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2630
2b577b92
YQ
26312014-04-28 Yao Qi <yao@codesourcery.com>
2632
2633 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2634 name.
2635
94611da2
PA
26362014-04-25 Pedro Alves <palves@redhat.com>
2637
2638 PR server/16255
2639 * linux-low.c (linux_attach_fail_reason_string): New function.
2640 (linux_attach_lwp): Delete.
2641 (linux_attach_lwp_1): Rename to ...
2642 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2643 argument. Remove "initial" parameter. Return int instead of
2644 void. Don't error or warn here.
2645 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2646 failure to attach to the tgid. Call warning when failing to
2647 attach to an lwp.
2648 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2649 argument. Remove "initial" parameter. Return int instead of
2650 void. Don't error or warn here.
2651 (linux_attach_fail_reason_string): New declaration.
2652 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2653 interface change. Use linux_attach_fail_reason_string.
2654
01f9f808
MS
26552014-04-24 Michael Sturm <michael.sturm@mintel.com>
2656 Walfred Tedeschi <walfred.tedeschi@intel.com>
2657
2658 * Makefile.in: Added rules to handle new files
2659 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2660 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2661 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2662 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2663 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2664 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2665 x32-avx512-linux.o.
2666 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2667 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2668 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2669 i386/x32-avx512.xml.
2670 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2671 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2672 i386/x32-avx512-linux.xml.
2673 * i387-fp.c (num_avx512_k_registers): New constant for number
2674 of K registers.
2675 (num_avx512_zmmh_low_registers): New constant for number of
2676 lower ZMM registers (0-15).
2677 (num_avx512_zmmh_high_registers): New constant for number of
2678 higher ZMM registers (16-31).
2679 (num_avx512_ymmh_registers): New contant for number of higher
2680 YMM registers (ymm16-31 added by avx521 on x86_64).
2681 (num_avx512_xmm_registers): New constant for number of higher
2682 XMM registers (xmm16-31 added by AVX512 on x86_64).
2683 (struct i387_xsave): Add space for AVX512 registers.
2684 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2685 Add code to handle AVX512 registers.
2686 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2687 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2688 prototypei from generated file.
2689 (tdesc_amd64_avx512_linux): Likewise.
2690 (init_registers_x32_avx512_linux): Likewise.
2691 (tdesc_x32_avx512_linux): Likewise.
2692 (init_registers_i386_avx512_linux): Likewise.
2693 (tdesc_i386_avx512_linux): Likewise.
2694 (x86_64_regmap): Add AVX512 registers.
2695 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2696 mask.
2697 (initialize_low_arch): Add code to initialize AVX512 registers.
2698
51aa91f9
PA
26992014-04-23 Pedro Alves <palves@redhat.com>
2700
2701 * mem-break.c (find_gdb_breakpoint_at): Make static.
2702 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2703
a4165e94
PA
27042014-04-23 Pedro Alves <palves@redhat.com>
2705
2706 * i386-low.c: Don't include break-common.h here.
2707 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2708 prototype to take target_hw_bp_type as argument instead of a Z
2709 packet char.
2710 * i386-low.h: Include break-common.h here.
2711 (Z_packet_to_hw_type): Declare.
2712 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2713 prototypes.
2714 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2715 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2716 (x86_remove_point): Convert the packet number to a
2717 target_hw_bp_type before calling i386_low_remove_watchpoint.
2718 * win32-i386-low.c (i386_insert_point): Convert the packet number
2719 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2720 (i386_remove_point): Convert the packet number to a
2721 target_hw_bp_type before calling i386_low_remove_watchpoint.
2722
b8acf843
PA
27232014-04-23 Pedro Alves <palves@redhat.com>
2724
2725 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2726
d708bcd1
PA
27272014-04-10 Pedro Alves <palves@redhat.com>
2728
2729 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2730 Check if the condition or command is NULL before checking if the
2731 breakpoint is known. On success, return true.
2732 * mem-break.h (add_breakpoint_condition): Document return.
2733 (add_breakpoint_commands): Add describing comment.
2734 * server.c (skip_to_semicolon): New function.
2735 (process_point_options): Use it.
2736
2eec7d5b
PA
27372014-04-09 Pedro Alves <palves@redhat.com>
2738
2739 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2740 to lwpid_of.
2741
fa96cb38
PA
27422014-02-27 Pedro Alves <palves@redhat.com>
2743
2744 PR 12702
2745 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2746 macros.
2747 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2748 output.
2749 (last_thread_of_process_p): Take a PID argument instead of a
2750 thread pointer.
2751 (linux_wait_for_lwp): Delete.
2752 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2753 functions.
2754 (linux_low_filter_event): New function, party factored out from
2755 linux_wait_for_event.
2756 (linux_wait_for_event): Rename to ...
2757 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2758 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2759 sigsuspend. Check for zombie leaders.
2760 (linux_wait_for_event): Reimplement as wrapper around
2761 linux_wait_for_event_filtered.
2762 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2763 a normal or signal exit is seen, it's the whole process exiting.
2764 (wait_for_sigstop): No longer a for_each_inferior callback.
2765 Rewrite on top of linux_wait_for_event_filtered.
2766 (stop_all_lwps): Call wait_for_sigstop directly.
2767 * server.c (resume, handle_target_event): Handle
2768 TARGET_WAITKIND_NO_RESUMED.
2769
d763de10
JB
27702014-02-26 Joel Brobecker <brobecker@adacore.com>
2771
2772 * win32-low.c (psapi_get_dll_name,
2773 * win32_CreateToolhelp32Snapshot): Delete.
2774 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2775 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2776 Delete.
2777 (handle_load_dll): Add function description.
2778 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2779
850a0f76
JB
27802014-02-26 Joel Brobecker <brobecker@adacore.com>
2781
2782 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2783 Add comment.
2784 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2785 base address when calling win32_add_one_solib.
2786 (handle_load_dll): Delete local variable load_addr.
2787 Remove 0x1000 offset applied to DLL base address when calling
2788 win32_add_one_solib.
2789 (handle_unload_dll): Add comment.
2790
f25b3fc3
JB
27912014-02-26 Joel Brobecker <brobecker@adacore.com>
2792
2793 * win32-low.c (win32_add_all_dlls): Renames
2794 win32_ensure_ntdll_loaded. Rewrite function documentation.
2795 Adjust implementation to always load all DLLs.
2796 Add 0x1000 offset to DLL base address when calling
2797 win32_add_one_solib.
2798 (child_initialization_done): New static global.
2799 (do_initial_child_stuff): Set child_initialization_done to
2800 zero during child initialization, and 1 after. Replace call
2801 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2802 Add comment.
2803 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2804 (handle_unload_dll): Add function documentation.
2805 (get_child_debug_event): Ignore load and unload DLL events
2806 during child initialization.
2807
d86d4aaf
DE
28082014-02-20 Doug Evans <dje@google.com>
2809
3bc32da3 2810 Remove global all_lwps.
d86d4aaf
DE
2811 * inferiors.h (ptid_of): Move here from linux-low.h.
2812 (pid_of, lwpid_of): Ditto.
2813 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2814 parameter is a struct thread_info * now.
2815 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2816 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2817 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2818 directly.
2819 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2820 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2821 * linux-arm-low.c (update_registers_callback): Update, "entry"
2822 parameter is a struct thread_info * now.
2823 Fetch lwpid from current_inferior directly.
2824 (arm_insert_point): Pass &all_threads to find_inferior instead of
2825 &all_lwps.
2826 (arm_remove_point): Ditto.
2827 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2828 (arm_prepare_to_resume): Fetch pid from thread.
2829 (arm_read_description): Fetch lwpid from current_inferior directly.
2830 * linux-low.c (all_lwps): Delete.
2831 (delete_lwp): Delete call to remove_inferior.
2832 (handle_extended_wait): Fetch lwpid from thread.
2833 (add_lwp): Don't set lwp->entry.id. Remove call to
2834 add_inferior_to_list.
2835 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2836 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2837 (kill_one_lwp_callback): Ditto.
2838 (linux_kill): Don't dereference NULL pointer.
2839 Fetch ptid,lwpid from thread.
2840 (get_detach_signal): Fetch ptid from thread.
2841 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2842 Simplify call to regcache_invalidate_thread.
2843 (delete_lwp_callback): Update, "entry" parameter is a
2844 struct thread_info * now. Fetch pid from thread.
2845 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2846 (status_pending_p_callback): Update, "entry" parameter is a
2847 struct thread_info * now. Fetch ptid from thread.
2848 (find_lwp_pid): Update, "entry" parameter is a
2849 struct thread_info * now.
2850 (linux_wait_for_lwp): Fetch pid from thread.
2851 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2852 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2853 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2854 (dequeue_one_deferred_signal): Ditto.
2855 (cancel_breakpoint): Fetch ptid from current_inferior.
2856 (linux_wait_for_event): Pass &all_threads to find_inferior,
2857 not &all_lwps. Fetch ptid, lwpid from thread.
2858 (count_events_callback): Update, "entry" parameter is a
2859 struct thread_info * now.
2860 (select_singlestep_lwp_callback): Ditto.
2861 (select_event_lwp_callback): Ditto.
2862 (cancel_breakpoints_callback): Ditto.
2863 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2864 not &all_lwps.
2865 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2866 (unsuspend_one_lwp): Update, "entry" parameter is a
2867 struct thread_info * now.
2868 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2869 not &all_lwps.
2870 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2871 Fetch lwpid from thread, not lwp.
2872 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2873 Pass &all_threads to find_inferior, not &all_lwps.
2874 (send_sigstop): Fetch lwpid from thread, not lwp.
2875 (send_sigstop_callback): Update, "entry" parameter is a
2876 struct thread_info * now.
2877 (suspend_and_send_sigstop_callback): Ditto.
2878 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2879 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2880 struct thread_info * now.
2881 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2882 from thread, lwp.
2883 (lwp_running): Update, "entry" parameter is a
2884 struct thread_info * now.
2885 (stop_all_lwps): Fetch ptid from thread.
2886 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2887 (linux_resume_one_lwp): Fetch lwpid from thread.
2888 (linux_set_resume_request): Update, "entry" parameter is a
2889 struct thread_info * now. Fetch pid, lwpid from thread.
2890 (resume_status_pending_p): Update, "entry" parameter is a
2891 struct thread_info * now.
2892 (need_step_over_p): Ditto. Fetch lwpid from thread.
2893 (start_step_over): Fetch lwpid from thread.
2894 (linux_resume_one_thread): Update, "entry" parameter is a
2895 struct thread_info * now. Fetch lwpid from thread.
2896 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2897 (proceed_one_lwp): Update, "entry" parameter is a
2898 struct thread_info * now. Fetch lwpid from thread.
2899 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2900 struct thread_info * now.
2901 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2902 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2903 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2904 directly.
2905 (regsets_store_inferior_registers): Ditto.
2906 (fetch_register, store_register): Ditto.
2907 (linux_read_memory, linux_write_memory): Ditto.
2908 (linux_request_interrupt): Ditto.
2909 (linux_read_auxv): Ditto.
2910 (linux_xfer_siginfo): Ditto.
2911 (linux_qxfer_spu): Ditto.
2912 (linux_qxfer_libraries_svr4): Ditto.
2913 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2914 moved to inferiors.h.
2915 (get_lwp): Delete.
2916 (get_thread_lwp): Update.
2917 (struct lwp_info): Delete member "entry". Simplify comment for
2918 member "thread".
2919 (all_lwps): Delete.
2920 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2921 current_inferior directly.
2922 (update_watch_registers_callback): Update, "entry" parameter is a
2923 struct thread_info * now. Fetch pid from thread.
2924 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2925 (mips_insert_point): Fetch lwpid from current_inferior.
2926 Pass &all_threads to find_inferior, not &all_lwps.
2927 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2928 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2929 directly.
2930 (mips_stopped_data_address): Ditto.
2931 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2932 directly.
2933 * linux-tile-low.c (tile_arch_setup): Ditto.
2934 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2935 (update_debug_registers_callback): Update, "entry" parameter is a
2936 struct thread_info * now. Fetch pid from thread.
2937 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2938 Pass &all_threads to find_inferior, not &all_lwps.
2939 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2940 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2941 Pass &all_threads to find_inferior, not &all_lwps.
2942 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2943 (i386_dr_low_get_status): Ditto.
2944 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2945 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2946 (x86_linux_read_description): Ditto.
2947 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2948
3b8361aa
DE
29492014-02-20 Doug Evans <dje@google.com>
2950
2951 * inferiors.c (get_first_inferior): Fix buglet.
2952
f7667f0d
DE
29532014-02-19 Doug Evans <dje@google.com>
2954
2955 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2956 * inferiors.c (add_thread): Change result type to struct thread_info *.
2957 All callers updated.
2958 (add_lwp): Call add_thread here instead of in callers.
2959 All callers updated.
2960 * linux-low.h (get_lwp_thread): Rewrite.
2961 (struct lwp_info): New member "thread".
2962
b3312d80
DE
29632014-02-19 Doug Evans <dje@google.com>
2964
2965 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2966 All callers updated.
2967
ecc6f45c
DE
29682014-02-19 Doug Evans <dje@google.com>
2969
2970 * inferiors.c (add_thread): Fix whitespace.
2971
649ebbca
DE
29722014-02-19 Doug Evans <dje@google.com>
2973
2974 * dll.c (clear_dlls): Replace accessing list implemention details
2975 with API function.
2976 * gdbthread.h (get_first_thread): Declare.
2977 * inferiors.c (for_each_inferior_with_data): New function.
2978 (get_first_thread): New function.
2979 (find_thread_ptid): Simplify.
2980 (get_first_inferior): New function.
2981 (clear_list): Delete.
2982 (one_inferior_p): New function.
2983 (clear_inferior_list): New function.
2984 (clear_inferiors): Update.
2985 * inferiors.h (for_each_inferior_with_data): Declare.
2986 (clear_inferior_list): Declare.
2987 (one_inferior_p): Declare.
2988 (get_first_inferior): Declare.
2989 * linux-low.c (linux_wait_for_event): Replace accessing list
2990 implemention details with API function.
2991 * server.c (target_running): Ditto.
2992 (accumulate_file_name_length): New function.
2993 (emit_dll_description): New function.
2994 (handle_qxfer_libraries): Replace accessing list implemention
2995 details with API function.
2996 (handle_qxfer_threads_worker): New function.
2997 (handle_qxfer_threads_proper): Replace accessing list implemention
2998 details with API function.
2999 (handle_query): Ditto.
3000 (visit_actioned_threads_callback_ftype): New typedef.
3001 (visit_actioned_threads_data): New struct.
3002 (visit_actioned_threads): Rewrite to be find_inferior callback.
3003 (resume): Call find_inferior.
3004 (handle_status): Replace accessing list implemention
3005 details with API function.
3006 (process_serial_event): Replace accessing list implemention details
3007 with API function.
3008 * target.c (set_desired_inferior): Replace accessing list implemention
3009 details with API function.
3010 * tracepoint.c (same_process_p): New function.
3011 (gdb_agent_about_to_close): Replace accessing list implemention
3012 details with API function.
3013 * win32-low.c (child_delete_thread): Replace accessing list
3014 implemention details with API function.
3015 (match_dll_by_basename): New function.
3016 (dll_is_loaded_by_basename): New function.
3017 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3018 details call to dll_is_loaded_by_basename.
3019
80894984
DE
30202014-02-19 Doug Evans <dje@google.com>
3021
3022 * dll.h (struct dll_info): Add comment.
3023 * gdbthread.h (struct thread_info): Add comment.
3024 (current_ptid): Simplify.
3025 * inferiors.c (add_process): Update.
3026 (remove_process): Update.
3027 * inferiors.h (struct process_info): Rename member "head" to "entry".
3028 * linux-low.c (delete_lwp): Update.
3029 (add_lwp): Update.
3030 (last_thread_of_process_p): Update.
3031 (kill_one_lwp_callback, linux_kill): Update.
3032 (status_pending_p_callback): Update.
3033 (wait_for_sigstop): Update. Simplify read of ptid.
3034 (start_step_over): Update.
3035 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3036 (get_lwp_thread): Update.
3037 (struct lwp_info): Rename member "head" to "entry".
3038 * regcache.h (inferior_list_entry): Delete.
3039 * server.c (kill_inferior_callback): Update.
3040 (detach_or_kill_inferior_callback): Update.
3041 (print_started_pid): Update.
3042 (print_attached_pid): Update.
3043 (process_serial_event): Simplify read of ptid.
3044 * thread-db.c (thread_db_create_event): Update.
3045 (thread_db_get_tls_address): Update.
3046 * win32-low.c (current_inferior_ptid): Simplify.
3047
46917d26
TT
30482014-02-19 Tom Tromey <tromey@redhat.com>
3049
3050 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3051 argument.
3052 (target_supports_btrace): Update.
3053
0759a81e
YQ
30542014-02-14 Yao Qi <yao@codesourcery.com>
3055
3056 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3057 (rsp-low-ipa.o): New target.
3058
a7191e8b
TT
30592014-02-12 Tom Tromey <tromey@redhat.com>
3060
3061 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3062 convert_ascii_to_int.
3063 * regcache.c (registers_to_string): Likewise.
3064 * remote-utils.c (decode_M_packet): Likewise.
3065 * server.c (process_serial_event): Likewise.
3066
ff0e980e
TT
30672014-02-12 Tom Tromey <tromey@redhat.com>
3068
3069 * server.c (handle_query, handle_v_run): Use hex2bin, not
3070 unhexify.
3071 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3072
e9371aff
TT
30732014-02-12 Tom Tromey <tromey@redhat.com>
3074
3075 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3076 convert_int_to_ascii.
3077 * regcache.c (registers_to_string, collect_register_as_string):
3078 Likewise.
3079 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3080 Likewise.
3081 * server.c (process_serial_event): Likewise.
3082 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3083 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3084
971dc0b8
TT
30852014-02-12 Tom Tromey <tromey@redhat.com>
3086
3087 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3088 bin2hex, not hexify.
3089 * tracepoint.c (cmd_qtstatus): Likewise.
3090
0a822afb
TT
30912014-02-12 Tom Tromey <tromey@redhat.com>
3092
3093 * remote-utils.c (monitor_output): Pass explicit length to
3094 hexify.
3095
9c3d6531
TT
30962014-02-12 Tom Tromey <tromey@redhat.com>
3097
3098 * tracepoint.c: Include rsp-low.h.
3099 * server.c: Include rsp-low.h.
3100 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3101 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3102 declare.
3103 * remote-utils.c: Include rsp-low.h.
3104 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3105 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3106 (convert_int_to_ascii, convert_ascii_to_int): Move to
3107 common/rsp-low.c.
3108 * regcache.c: Include rsp-low.h.
3109 * ax.c: Include rsp-low.h.
3110 * Makefile.in (SFILES): Add common/rsp-low.c.
3111 (OBS): Add rsp-low.o.
3112 (rsp-low.o): New target.
3113
01fd3ea5
TT
31142014-02-12 Tom Tromey <tromey@redhat.com>
3115
3116 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3117 Include print-utils.h.
3118 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3119 (plongest, thirty_two, phex_nz): Remove.
3120 * Makefile.in (SFILES): Add common/print-utils.c.
3121 (OBS): Add print-utils.o.
3122 (print-utils-ipa.o): New target.
3123 (print-utils.o): New target.
3124 (IPA_OBJS): Add print-utils-ipa.o.
3125
e99dc820
TT
31262014-02-06 Tom Tromey <tromey@redhat.com>
3127
3128 * Makefile.in (SFILES): Fix indentation.
3129
ee1e2d4f
DE
31302014-02-05 Doug Evans <dje@google.com>
3131
3132 * linux-low.c (linux_wait_for_event): Improve comment.
3133 (linux_wait_1): Keep current_inferior in sync with event_child.
3134
f5a02773
DE
31352014-01-22 Doug Evans <dje@google.com>
3136
3137 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3138
87ce2a04
DE
31392014-01-22 Doug Evans <dje@google.com>
3140
3141 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3142 * configure: Regenerate.
3143 * config.in: Regenerate.
3144 * Makefile.in (SFILES): Add debug.c.
3145 (OBS): Add debug.o.
3146 * debug.c: New file.
3147 * debug.h: New file.
3148 * linux-aarch64-low.c (*): Update all debugging printfs to use
3149 debug_printf instead of fprintf.
3150 * linux-arm-low.c (*): Ditto.
3151 * linux-cris-low.c (*): Ditto.
3152 * linux-crisv32-low.c (*): Ditto.
3153 * linux-m32r-low.c (*): Ditto.
3154 * linux-sparc-low.c (*): Ditto.
3155 * linux-x86.c (*): Ditto.
3156 * linux-low.c (*): Ditto.
3157 (linux_wait_1): Add calls to debug_enter, debug_exit.
3158 (linux_wait): Remove redundant debugging printf.
3159 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3160 (linux_resume, unstop_all_lwps): Ditto.
3161 * mem-break.c (*): Update all debugging printfs to use
3162 debug_printf instead of fprintf.
3163 * remote-utils.c (*): Ditto.
3164 * thread-db.c (*): Ditto.
3165 * server.c #include <ctype.h>, "gdb_vecs.h".
3166 (debug_threads): Moved to debug.c.
3167 (*): Update all debugging printfs to use debug_printf instead of
3168 fprintf.
3169 (start_inferior): Replace call to fflush with call to debug_flush.
3170 (monitor_show_help): Mention set debug-format.
3171 (parse_debug_format_options): New function.
3172 (handle_monitor_command): Handle "monitor set debug-format".
3173 (gdbserver_usage): Mention --debug-format.
3174 (main): Parse --debug-format.
3175 * server.h (debug_threads): Declaration moved to debug.h.
3176 #include "debug.h".
3177 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3178 trace_debug_1 that uses debug_printf.
3179 (tracepoint_look_up_symbols): Update all debugging printfs to use
3180 debug_printf instead of fprintf.
3181
e671835b
BS
31822014-01-20 Baruch Siach <baruch@tkos.co.il>
3183
3184 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3185 sys/ptrace.h.
3186
b5737fa9
PA
31872014-01-17 Pedro Alves <palves@redhat.com>
3188
ea38d2a9 3189 PR build/16445
c7faa97a
PA
3190 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3191 defined after including gdb_proc_service.h.
b5737fa9 3192
40ed484e
DE
31932014-01-16 Doug Evans <dje@google.com>
3194
3195 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3196 (match_dll): Use it.
3197
969c39fb
MM
31982014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3199
3200 * target.h (target_ops) <read_btrace>: Change parameters and
3201 return type to allow error reporting.
3202 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3203 trace reading errors on.
3204 * linux-low.c (linux_low_read_btrace): Pass trace reading
3205 errors on.
3206 (linux_low_disable_btrace): New.
3207
ab7f45ba
DE
32082014-01-15 Doug Evans <dje@google.com>
3209
3210 * inferiors.c (thread_id_to_gdb_id): Delete.
3211 * inferiors.h (thread_id_to_gdb_id): Delete.
3212
66af0f44
EZ
32132014-01-13 Eli Zaretskii <eliz@gnu.org>
3214
3215 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3216 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3217 versions.
3218
9939e131
PA
32192014-01-08 Pedro Alves <palves@redhat.com>
3220
3221 * server.c (handle_status): Don't discard previous queued stop
3222 replies or thread's pending status here.
3223 (main) <disconnection>: Do it here instead.
3224
b7ea362b
PA
32252014-01-08 Pedro Alves <palves@redhat.com>
3226
3227 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3228 * server.c (visit_actioned_threads, handle_pending_status): New
3229 function.
3230 (handle_v_cont): Factor out parts to ...
3231 (resume): ... this new function. If in all-stop, and a thread
3232 being resumed has a pending status, report it without actually
3233 resuming.
3234 (myresume): Adjust to use the new 'resume' function.
3235 (clear_pending_status_callback, set_pending_status_callback)
3236 (find_status_pending_thread_callback): New functions.
3237 (handle_status): Handle the case of multiple threads having
3238 interesting statuses to report. Report threads' real last signal
3239 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3240 with an interesting thread to report the status for, instead of
3241 always reporting the status of the first thread.
3242
28498c42
JB
32432014-01-01 Joel Brobecker <brobecker@adacore.com>
3244
3245 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3246 * gdbreplay.c (gdbreplay_version): Likewise.
3247
f45c82da
YZ
32482013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3249
3250 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3251 iov.iov_len with the real length in use.
3252
379a5e2d
JB
32532013-12-13 Joel Brobecker <brobecker@adacore.com>
3254
3255 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3256 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3257 for all targets that use win32-low.c.
3258 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3259 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3260
4210d83e
PA
32612013-12-13 Pedro Alves <palves@redhat.com>
3262
3263 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3264 if equal to TARGET_WAITKIND_LOADED.
3265 * win32-low.c (cached_status): New static global.
3266 (win32_wait): Add declaration.
3267 (do_initial_child_stuff): Flush all initial pending debug events
3268 up to the initial breakpoint.
3269 (win32_wait): If CACHED_STATUS was set, return that instead
3270 of doing a real wait. Remove the code resuming the execution
3271 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3272 during the initial phase. Also remove the code changing
3273 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3274 TARGET_WAITKIND_STOPPED.
3275
e7f0d979
YQ
32762013-12-11 Yao Qi <yao@codesourcery.com>
3277
3278 * notif.c (handle_notif_ack): Return 0 if no notification
3279 matches.
3280
ebcf782c
DE
32812013-11-20 Doug Evans <dje@google.com>
3282
3283 * linux-low.c (linux_set_resume_request): Fix comment.
3284
20ad9378
DE
32852013-11-20 Doug Evans <dje@google.com>
3286
3287 * linux-low.c (resume_status_pending_p): Tweak comment.
3288
a196ebeb
WT
32892013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3290
3291 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3292 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3293 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3294 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3295 (srv_amd64_regobj): Add amd64-mpx.o.
3296 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3297 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3298 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3299 * i387-fp.c (num_pl_bnd_register) Added constant.
3300 (num_pl_bnd_cfg_registers) Added constant.
3301 (struct i387_xsave) Added reserved area and MPX fields.
3302 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3303 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3304 function.
3305 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3306 (init_registers_amd64_mpx_linux): Declare new function.
3307 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3308 (x86_64_regmap): Add MPX registers.
3309 (x86_linux_read_description): Add MPX case.
3310 (initialize_low_arch): Initialize MPX targets.
3311
0080a2f6
TT
33122013-11-18 Tom Tromey <tromey@redhat.com>
3313
3314 * configure: Rebuild.
3315 * configure.ac: Don't check for stdlib.h.
3316 * gdbreplay.c: Unconditionally include stdlib.h.
3317
2978b111
TT
33182013-11-18 Tom Tromey <tromey@redhat.com>
3319
3320 * config.in: Rebuild.
3321 * configure: Rebuild.
3322 * configure.ac: Don't use AC_HEADER_DIRENT.
3323
a3d08894
TT
33242013-11-18 Tom Tromey <tromey@redhat.com>
3325
3326 * server.h: Don't check HAVE_STRING_H.
3327 * gdbreplay.c: Don't check HAVE_STRING_H.
3328 * configure: Rebuild.
3329
0a5dd17d
TT
33302013-11-18 Tom Tromey <tromey@redhat.com>
3331
3332 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3333 LIBGNU.
3334
1bd2f0ba
TT
33352013-11-08 Tom Tromey <tromey@redhat.com>
3336
3337 * configure, config.in: Rebuild.
3338 * configure.ac: Remove unused configury.
3339
3266f10b
TT
33402013-11-08 Tom Tromey <tromey@redhat.com>
3341
3342 * acinclude.m4: Include common.m4, codeset.m4.
3343 * configure, config.in: Rebuild.
3344 * configure.ac: Use GDB_AC_COMMON.
3345
6682d959
AA
33462013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3347
3348 * linux-s390-low.c (HWCAP_S390_TE): New define.
3349 (s390_arch_setup): Consider the TE field in the HWCAP for
3350 determining 'have_regset_tdb'.
3351
fd0a4d76
SDJ
33522013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3353
3354 PR gdb/16014
3355 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3356 call to sizeof.
3357
1a3d890b
PA
33582013-10-02 Pedro Alves <palves@redhat.com>
3359
3360 * server.c (process_serial_event): Don't output "GDBserver
3361 exiting" if GDB is connected through stdio.
3362 * target.c (mywait): Likewise, be silent if GDB is connected
3363 through stdio.
3364
97ad4581
JB
33652013-10-01 Joel Brobecker <brobecker@adacore.com>
3366
3367 * lynx-low.c (lynx_add_threads_after_attach): New function.
3368 (lynx_attach): Remove call to add_thread. Add call to
3369 lynx_add_threads_after_attach instead.
3370
5b4e221c
MF
33712013-09-28 Mike Frysinger <vapier@gentoo.org>
3372
3373 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3374 * config.in, configure: Regenerated.
3375
ee47b2f8
YQ
33762013-09-18 Yao Qi <yao@codesourcery.com>
3377
3378 PR server/15959
3379 * server.c (start_inferior): Clear 'resume_info'.
3380
d6707650 33812013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3382
d6707650
JW
3383 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3384 for each register.
3385
9243dd0e 33862013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3387
9243dd0e
JW
3388 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3389 linux-tile-low.o to srv_tgtobj.
3390
c623a6ef
WN
33912013-09-16 Will Newton <will.newton@linaro.org>
3392
3393 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3394 out regs.
3395
fb71d39e
PA
33962013-09-06 Pedro Alves <palves@redhat.com>
3397
3398 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3399 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3400 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3401 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3402 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3403 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3404
8e7e9910
PA
34052013-09-06 Pedro Alves <palves@redhat.com>
3406
3407 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3408 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3409
7c3a12ca
PA
34102013-09-06 Pedro Alves <palves@redhat.com>
3411
3412 * linux-amd64-ipa.c: Include tracepoint.h.
3413 * linux-i386-ipa.c: Include tracepoint.h.
3414
8eb3d7b6
RW
34152013-09-06 Ricard Wanderlof <ricardw@axis.com>
3416
3417 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3418 (ps_get_thread_area): New function.
3419
eddddb9d
RW
34202013-09-06 Ricard Wanderlof <ricardw@axis.com>
3421
3422 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3423 (initialize_low_arch): Call init_registers_crisv32 rather than
3424 init_register_crisv32.
3425
533b0600
PA
34262013-09-05 Pedro Alves <palves@redhat.com>
3427
3428 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3429 to ...
3430 * hostio.h: ... this new file.
3431 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3432 win32-low.c: Include hostio.h.
3433
0ce3d3b5
PA
34342013-09-05 Pedro Alves <palves@redhat.com>
3435
3436 * server.h (gdb_client_data, handler_func, callback_handler_func)
3437 (delete_file_handler, add_file_handler, append_callback_event)
3438 (delete_callback_event, start_event_loop, initialize_event_loop):
3439 Move to event-loop.h and include it.
3440 * event-loop.h: New file.
3441
799cdc37
PA
34422013-09-05 Pedro Alves <palves@redhat.com>
3443
3444 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3445 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3446 (loaded_dll, unloaded_dll): Move to ...
3447 * dll.h: ... this new file.
3448 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3449
6a6bbd9d
PA
34502013-09-05 Pedro Alves <palves@redhat.com>
3451
3452 * server.h (current_process, get_thread_process, all_processes)
3453 (add_inferior_to_list, for_each_inferior, current_inferior)
3454 (remove_inferior, add_process, remove_process, find_process_pid)
3455 (have_started_inferiors_p, have_attached_inferiors_p)
3456 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3457 (clear_inferiors, find_inferior, find_inferior_id)
3458 (inferior_target_data, set_inferior_target_data)
3459 (inferior_regcache_data, set_inferior_regcache_data): Move to
3460 inferiors.h, and include it.
3461 * inferiors.h: New file.
3462
f699aaba
PA
34632013-09-05 Pedro Alves <palves@redhat.com>
3464
3465 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3466 Move ...
72f4393d 3467 * ax.h: ... here.
f699aaba 3468
c144c7a0
PA
34692013-09-05 Pedro Alves <palves@redhat.com>
3470
3471 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3472 tracepoint.h.
3473 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3474 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3475 (handle_tracepoint_general_set, handle_tracepoint_query)
3476 (tracepoint_finished_step, tracepoint_was_hit)
3477 (release_while_stepping_state_list, current_traceframe)
3478 (in_readonly_region, traceframe_read_mem)
3479 (fetch_traceframe_registers, traceframe_read_sdata)
3480 (traceframe_read_info, struct fast_tpoint_collect_status)
3481 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3482 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3483 (supply_fast_tracepoint_registers)
3484 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3485 (ipa_tdesc, claim_trampoline_space)
3486 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3487 (agent_mem_read, agent_get_trace_state_variable_value)
3488 (agent_set_trace_state_variable_value, agent_tsv_read)
3489 (agent_mem_read_string, get_raw_reg_func_addr)
3490 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3491 * tracepoint.h: ... this new file.
3492
ff42e6ab
PA
34932013-09-05 Pedro Alves <palves@redhat.com>
3494
3495 * server.h (perror_with_name, error, fatal, warning, paddress)
3496 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3497 include it.
3498 * utils.h: New file.
3499
541af0f4
PA
35002013-09-05 Pedro Alves <palves@redhat.com>
3501
3502 * server.h (remote_debug, noack_mode, transport_is_reliable)
3503 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3504 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3505 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3506 (write_enn, initialize_async_io, enable_async_io)
3507 (disable_async_io, check_remote_input_interrupt_request)
3508 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3509 (dead_thread_notify, prepare_resume_reply)
3510 (decode_address_to_semicolon, decode_address, decode_m_packet)
3511 (decode_M_packet, decode_X_packet, decode_xfer_write)
3512 (decode_search_memory_packet, unhexify, hexify)
3513 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3514 (look_up_one_symbol, relocate_instruction)
3515 (monitor_output): Move to remote-utils.h, and include it.
3516 * remote-utils.h: New file.
3517
eebdf26b
PA
35182013-09-05 Pedro Alves <palves@redhat.com>
3519
3520 * server.h (_): Delete.
3521
3aafd2ff
PA
35222013-09-02 Pedro Alves <palves@redhat.com>
3523
3524 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3525 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3526 allocated.
3527 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3528
cee83bcb
PM
35292013-09-02 Pierre Muller <muller@sourceware.org>
3530
3531 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3532 or WriteProcessMemory complete successfully and handle
3533 ERROR_PARTIAL_COPY error.
3534
9a13b2fa
PA
35352013-09-02 Pedro Alves <palves@redhat.com>
3536
3537 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3538 error instead of EIO.
3539
602e3198
JK
35402013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3541
3542 PR server/15604
3543 * linux-low.c: Include filestuff.h.
3544 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3545 * lynx-low.c: Include filestuff.h.
3546 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3547 * server.c: Include filestuff.h.
3548 (main): Call notice_open_fds.
3549 * spu-low.c: Include filestuff.h.
3550 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3551
96d7229d
LM
35522013-08-22 Luis Machado <lgustavo@codesourcery.com>
3553
3554 * Makefile.in: Explain why ../target and ../nat are not
3555 listed as include file search paths.
3556 (linux-waitpid.o): New object file rule.
3557 * configure.srv (srv_native_linux_obj): New variable.
3558 Replace all occurrences of linux native object files with
3559 $srv_native_linux_obj.
3560 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3561 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3562 (linux_enable_event_reporting): Remove declaration.
3563 (my_waitpid): Moved to common/linux-waitpid.c.
3564 (linux_wait_for_event): Pass ptid when calling
3565 linux_enable_event_reporting.
3566 (linux_supports_tracefork_flag): Remove.
3567 (linux_enable_event_reporting): Likewise.
3568 (linux_tracefork_grandchild): Remove.
3569 (STACK_SIZE): Moved to common/linux-ptrace.c.
3570 (linux_tracefork_child): Remove.
3571 (linux_test_for_tracefork): Remove.
3572 (linux_look_up_symbols): Call linux_supports_traceclone.
3573 (initialize_low): Remove call to linux_test_for_tracefork.
3574 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3575 common/linux-ptrace.h.
3576 (PTRACE_TYPE_ARG4): Likewise.
3577 Include linux-ptrace.h.
3578
32940073
PA
35792013-08-21 Pedro Alves <palves@redhat.com>
3580
3581 * config.in: Renegerate.
3582
33b60d58 35832013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 3584
33b60d58
LM
3585 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3586 (SFILES): Remove $(srcdir)/common/target-common.c and
3587 add $(srcdir)/target/waitstatus.c.
3588 (OBS): Remove target-common.o and add waitstatus.o.
3589 (server_h): Remove $(srcdir)/../common/target-common.h and
3590 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3591 and $(srcdir)/../target/waitstatus.h.
3592 (target-common.o): Remove.
3593 (waitstatus.o): New target object file.
3594 * target.h: Do not include target-common.h and
3595 include target/resume.h, target/wait.h and
3596 target/waitstatus.h.
3597
b8e1b30e
LM
35982013-08-13 Luis Machado <lgustavo@codesourcery.com>
3599
3600 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3601 to PTRACE_TYPE_ARG3.
3602 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3603 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3604 PTRACE_TYPE_ARG4.
3605 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3606 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3607
7a60ad40
YQ
36082013-07-27 Jie Zhang <jie@codesourcery.com>
3609 Daniel Jacobowitz <dan@codesourcery.com>
3610 Yao Qi <yao@codesourcery.com>
3611
3612 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3613 (mips-linux-watch.o): New rule.
3614 (mips_linux_watch_h): New variable.
3615 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3616 srv_tgtobj.
3617 * linux-mips-low.c: Include mips-linux-watch.h.
3618 (struct arch_process_info, struct arch_lwp_info): New.
3619 (update_watch_registers_callback): New function.
3620 (mips_linux_new_process, mips_linux_new_thread) New functions.
3621 (mips_linux_prepare_to_resume, mips_insert_point): New
3622 functions.
3623 (mips_remove_point, mips_stopped_by_watchpoint): New
3624 functions.
3625 (rsp_bp_type_to_target_hw_bp_type): New function.
3626 (mips_stopped_data_address): New function.
3627 (the_low_target): Add watchpoint support functions.
3628
de6f69ad
YQ
36292013-07-27 Yao Qi <yao@codesourcery.com>
3630
3631 * i386-low.c: Include break-common.h.
3632 (enum target_hw_bp_type): Remove.
3633
3360c0bf
LM
36342013-07-24 Luis Machado <lgustavo@codesourcery.com>
3635
3636 * Makefile.in (SFILES): /common/target-common.c.
3637 (OBS): Add target-common.o.
3638 (server_h): Add $(srcdir)/../common/target-common.h.
3639 (target-common.o): New target.
3640 * server.c (queue_stop_reply_callback): Free
3641 status string after use.
3642 * target.c (target_waitstatus_to_string): Remove.
3643 * target.h: Include target-common.h.
3644 (resume_kind): Likewise.
3645 (target_waitkind): Likewise.
3646 (target_waitstatus): Likewise.
3647 (TARGET_WNOHANG): Likewise.
3648
bd885420
YQ
36492013-07-04 Yao Qi <yao@codesourcery.com>
3650
3651 * Makefile.in (host_alias): Use @host_noncanonical@.
3652 (target_alias): Use @target_noncanonical@.
3653 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3654 ACX_NONCANONICAL_HOST.
3655 * configure: Regenerated.
3656
3657 Revert:
3658 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3659
3660 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3661 * configure: Rebuild.
3662 * Makefile.in (version_host, version_target): Get from configure.
3663 (version.c): Use $(version_host) and $(version_target).
3664
17ef446e
PA
36652013-07-03 Pedro Alves <palves@redhat.com>
3666
3667 * Makefile.in (config.status): Depend on development.sh.
3668 * acinclude.m4: Include libmcheck.m4.
3669 * configure: Regenerate.
3670
7a9a7487
MG
36712013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3672
3673 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3674 attribute inside the parentheses.
3675 (winapi_DebugSetProcessKillOnExit): Ditto.
3676 (winapi_DebugBreakProcess): Ditto.
3677 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 3678
49b64de6
MG
36792013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3680
3681 * notif.h (notif_event): Add a dummy member to avoid compiler
3682 errors.
3683
d5749ee7
PA
36842013-07-01 Pedro Alves <palves@redhat.com>
3685
3686 * hostio.c (HOSTIO_PATH_MAX): Define.
3687 (require_filename, handle_open, handle_unlink, handle_readlink):
3688 Use it.
3689
d8d2a3ee
PA
36902013-07-01 Pedro Alves <palves@redhat.com>
3691
3692 * server.h: Include "pathmax.h".
3693 * linux-low.c: Don't include sys/param.h.
3694 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3695 MAXPATHLEN.
3696 * win32-low.c: Don't include sys/param.h.
3697 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3698
bc7dea8d
PA
36992013-07-01 Pedro Alves <palves@redhat.com>
3700
3701 * event-loop.c: Don't check HAVE_UNISTD_H before including
3702 <unistd.h>.
3703 * gdbreplay.c: Likewise.
3704 * remote-utils.c: Likewise.
3705 * server.c: Likewise.
3706 * configure.ac: Don't check for unistd.h.
3707 * configure: Regenerate.
3708
d6c2da54
TT
37092013-06-28 Tom Tromey <tromey@redhat.com>
3710
3711 * Makefile.in (version.c): Use version.in, not
3712 common/version.in.
3713
257b6bec
MG
37142013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3715
3716 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3717 * configure: Rebuild.
3718 * Makefile.in (version_host, version_target): Get from configure.
3719 (version.c): Use $(version_host) and $(version_target).
3720
86ebe149
DK
37212013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3722
3723 Fix trace-status to output user name without trailing colon.
3724 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3725
f30aa5af
DK
37262013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3727
3728 Fix trace-status to output proper start-time and stop-time.
3729 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3730 output start time and stop time in hex as gdb expects.
3731
28a93511
YQ
37322013-06-26 Pedro Alves <pedro@codesourcery.com>
3733
3734 * tracepoint.c (build_traceframe_info_xml): Output trace state
3735 variables present in the trace buffer.
3736
01208463
TT
37372013-06-24 Tom Tromey <tromey@redhat.com>
3738
3739 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3740 create-version.sh.
3741 (version.o): Remove.
3742 * gdbreplay.c: Include version.h.
3743 (version, host_name): Don't declare.
3744 * server.h: Include version.h.
3745 (version, host_name): Don't declare.
3746
760256f9
PA
37472013-06-12 Pedro Alves <palves@redhat.com>
3748
3749 * linux-x86-low.c (linux_is_elf64): Delete global.
3750 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3751 with local linux_pid_exe_is_elf_64_file use.
3752
030031ee
PA
37532013-06-11 Pedro Alves <palves@redhat.com>
3754
3755 * linux-low.c (regset_disabled, disable_regset): New functions.
3756 (regsets_fetch_inferior_registers)
3757 (regsets_store_inferior_registers): Use them.
3758 (initialize_regsets_info); Don't allocate the disabled_regsets
3759 array here.
3760 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3761 comment.
3762
5da6eb0a
PA
37632013-06-11 Pedro Alves <palves@redhat.com>
3764
3765 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3766 xmalloc.
3767
7e5aaa09
PA
37682013-06-11 Pedro Alves <palves@redhat.com>
3769
3770 * linux-x86-low.c (initialize_low_arch): Call
3771 init_registers_x32_avx_linux.
3772
d878444c
JK
37732013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3774
3775 Fix compatibility with Android Bionic.
3776 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3777 it is not empty.
3778
3aee8918
PA
37792013-06-07 Pedro Alves <palves@redhat.com>
3780
5f2b57b5 3781 PR server/14823
3aee8918
PA
3782 * Makefile.in (OBS): Add tdesc.o.
3783 (IPA_OBJS): Add tdesc-ipa.o.
3784 (tdesc-ipa.o): New rule.
3785 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3786 interface.
3787 * linux-low.c (new_inferior): Delete.
3788 (disabled_regsets, num_regsets): Delete.
3789 (linux_add_process): Adjust to set the new per-process
3790 new_inferior flag.
3791 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3792 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3793 was a stop. When calling arch_setup, switch the current inferior
3794 to the thread that got an event.
3795 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3796 (regsets_fetch_inferior_registers)
3797 (regsets_store_inferior_registers): New regsets_info parameter.
3798 Adjust to use it.
3799 (linux_register_in_regsets): New regs_info parameter. Adjust to
3800 use it.
3801 (register_addr, fetch_register, store_register): New usrregs_info
3802 parameter. Adjust to use it.
3803 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3804 parameter regs_info. Adjust to use it.
3805 (linux_fetch_registers): Get the current inferior's regs_info, and
3806 adjust to use it.
3807 (linux_store_registers): Ditto.
3808 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3809 (initialize_low): Don't initialize the target_regsets here. Call
3810 initialize_low_arch.
3811 * linux-low.h (target_regsets): Delete declaration.
3812 (struct regsets_info): New.
3813 (struct usrregs_info): New.
3814 (struct regs_info): New.
3815 (struct process_info_private) <new_inferior>: New field.
3816 (struct linux_target_ops): Delete the num_regs, regmap, and
3817 regset_bitmap fields. New field regs_info.
3818 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3819 * i387-fp.c (num_xmm_registers): Delete.
3820 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3821 calls to new interface.
3822 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3823 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3824 Infer the number of xmm registers from the regcache's target
3825 description.
3826 * i387-fp.h (num_xmm_registers): Delete.
3827 * inferiors.c (add_thread): Don't install the thread's regcache
3828 here.
3829 * proc-service.c (gregset_info): Fetch the current inferior's
3830 regs_info. Adjust to use it.
3831 * regcache.c: Include tdesc.h.
3832 (register_bytes, reg_defs, num_registers)
3833 (gdbserver_expedite_regs): Delete.
3834 (get_thread_regcache): If the thread doesn't have a regcache yet,
3835 create one, instead of aborting gdbserver.
3836 (regcache_invalidate_one): Rename to ...
3837 (regcache_invalidate_thread): ... this.
3838 (regcache_invalidate_one): New.
3839 (regcache_invalidate): Only invalidate registers of the current
3840 process.
3841 (init_register_cache): Add target_desc parameter, and use it.
3842 (new_register_cache): Ditto. Assert the target description has a
3843 non zero registers_size.
3844 (regcache_cpy): Add assertions. Adjust.
3845 (realloc_register_cache, set_register_cache): Delete.
3846 (registers_to_string, registers_from_string): Adjust.
3847 (find_register_by_name, find_regno, find_register_by_number)
3848 (register_cache_size): Add target_desc parameter, and use it.
3849 (free_register_cache_thread, free_register_cache_thread_one)
3850 (regcache_release, register_cache_size): New.
3851 (register_size): Add target_desc parameter, and use it.
3852 (register_data, supply_register, supply_register_zeroed)
3853 (supply_regblock, supply_register_by_name, collect_register)
3854 (collect_register_as_string, collect_register_by_name): Adjust.
3855 * regcache.h (struct target_desc): Forward declare.
3856 (struct regcache) <tdesc>: New field.
3857 (init_register_cache, new_register_cache): Add target_desc
3858 parameter.
3859 (regcache_invalidate_thread): Declare.
3860 (regcache_invalidate_one): Delete declaration.
3861 (regcache_release): Declare.
3862 (find_register_by_number, register_cache_size, register_size)
3863 (find_regno): Add target_desc parameter.
3864 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3865 declarations.
3866 * remote-utils.c: Include tdesc.h.
3867 (outreg, prepare_resume_reply): Adjust.
3868 * server.c: Include tdesc.h.
3869 (gdbserver_xmltarget): Delete declaration.
3870 (get_features_xml, process_serial_event): Adjust.
3871 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3872 declare.
3873 (struct process_info) <tdesc>: New field.
3874 (ipa_tdesc): Declare.
3875 * tdesc.c: New file.
3876 * tdesc.h: New file.
3877 * tracepoint.c: Include tdesc.h.
3878 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3879 (get_context_regcache): Adjust to pass ipa_tdesc down.
3880 (do_action_at_tracepoint): Adjust to get the register cache size
3881 from the context regcache's description.
3882 (traceframe_walk_blocks): Adjust to get the register cache size
3883 from the current trace frame's description.
3884 (traceframe_get_pc): Adjust to get current trace frame's
3885 description and pass it down.
3886 (gdb_collect): Adjust to get the register cache size from the
3887 IPA's description.
3888 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3889 (gdbserver_xmltarget): Delete.
3890 (initialize_low_tracepoint): Set the ipa's target description.
3891 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3892 (initialize_low_tracepoint): Set the ipa's target description.
3893 * linux-x86-low.c: Include tdesc.h.
3894 [__x86_64__] (is_64bit_tdesc): New.
3895 (ps_get_thread_area, x86_get_thread_area): Use it.
3896 (i386_cannot_store_register): Rename to ...
3897 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3898 (i386_cannot_fetch_register): Rename to ...
3899 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3900 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3901 to new interface.
3902 (target_regsets): Rename to ...
3903 (x86_regsets): ... this.
3904 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3905 interface.
3906 (x86_siginfo_fixup): Use is_64bit_tdesc.
3907 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3908 (tdesc_x32_avx_linux, tdesc_x32_linux)
3909 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3910 Declare.
3911 (x86_linux_update_xmltarget): Delete.
3912 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3913 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3914 (AMD64_LINUX_USER64_CS): New.
3915 (x86_linux_read_description): New, based on
3916 x86_linux_update_xmltarget.
3917 (same_process_callback): New.
3918 (x86_arch_setup_process_callback): New.
3919 (x86_linux_update_xmltarget): New.
3920 (x86_regsets_info): New.
3921 (amd64_linux_regs_info): New.
3922 (i386_linux_usrregs_info): New.
3923 (i386_linux_regs_info): New.
3924 (x86_linux_regs_info): New.
3925 (x86_arch_setup): Reimplement.
3926 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3927 (x86_emit_ops): Ditto.
3928 (the_low_target): Adjust. Install x86_linux_regs_info,
3929 x86_cannot_fetch_register, and x86_cannot_store_register.
3930 (initialize_low_arch): New.
3931 * linux-ia64-low.c (tdesc_ia64): Declare.
3932 (ia64_fetch_register): Adjust.
3933 (ia64_usrregs_info, regs_info): New globals.
3934 (ia64_regs_info): New function.
3935 (the_low_target): Adjust.
3936 (initialize_low_arch): New function.
3937 * linux-sparc-low.c (tdesc_sparc64): Declare.
3938 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3939 Adjust.
3940 (sparc_arch_setup): New function.
3941 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3942 (the_low_target): Adjust.
3943 (initialize_low_arch): New function.
3944 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3945 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3946 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3947 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3948 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3949 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3950 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3951 (tdesc_powerpc_isa205_vsx64l): Declare.
3952 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3953 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3954 (ppc_set_pc, ppc_get_hwcap): Adjust.
3955 (ppc_usrregs_info): Forward declare.
3956 (!__powerpc64__) ppc_regmap_adjusted: New global.
3957 (ppc_arch_setup): Adjust to the current process'es target
3958 description.
3959 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3960 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3961 (ppc_store_evrregset): Adjust.
3962 (target_regsets): Rename to ...
3963 (ppc_regsets): ... this, and make static.
3964 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3965 (ppc_regs_info): New function.
3966 (the_low_target): Adjust.
3967 (initialize_low_arch): New function.
3968 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3969 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3970 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3971 (tdesc_s390x_linux64v2): Declare.
3972 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3973 (s390_fill_gregset, s390_store_last_break): Adjust.
3974 (target_regsets): Rename to ...
3975 (s390_regsets): ... this, and make static.
3976 (s390_get_pc, s390_set_pc): Adjust.
3977 (s390_get_hwcap): New target_desc parameter, and use it.
3978 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3979 (s390_arch_setup): Adjust to set the current process'es target
3980 description. Don't adjust the regmap.
3981 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3982 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3983 (regs_info_3264): New globals.
3984 (s390_regs_info): New function.
3985 (the_low_target): Adjust.
3986 (initialize_low_arch): New function.
3987 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3988 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3989 [__mips64] (init_registers_mips_linux)
3990 (init_registers_mips_dsp_linux): Delete defines.
3991 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3992 (have_dsp): New global.
3993 (mips_read_description): New, based on mips_arch_setup.
3994 (mips_arch_setup): Reimplement.
3995 (get_usrregs_info): New function.
3996 (mips_cannot_fetch_register, mips_cannot_store_register)
3997 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3998 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3999 (target_regsets): Rename to ...
4000 (mips_regsets): ... this, and make static.
4001 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4002 (dsp_regs_info, regs_info): New globals.
4003 (mips_regs_info): New function.
4004 (the_low_target): Adjust.
4005 (initialize_low_arch): New function.
4006 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4007 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4008 Declare.
4009 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4010 (arm_read_description): New, with bits factored from
4011 arm_arch_setup.
4012 (arm_arch_setup): Reimplement.
4013 (target_regsets): Rename to ...
4014 (arm_regsets): ... this, and make static.
4015 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4016 (arm_regs_info): New function.
4017 (the_low_target): Adjust.
4018 (initialize_low_arch): New function.
4019 * linux-m68k-low.c (tdesc_m68k): Declare.
4020 (target_regsets): Rename to ...
4021 (m68k_regsets): ... this, and make static.
4022 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4023 (m68k_regs_info): New function.
4024 (m68k_arch_setup): New function.
4025 (the_low_target): Adjust.
4026 (initialize_low_arch): New function.
4027 * linux-sh-low.c (tdesc_sharch): Declare.
4028 (target_regsets): Rename to ...
4029 (sh_regsets): ... this, and make static.
4030 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4031 (sh_regs_info, sh_arch_setup): New functions.
4032 (the_low_target): Adjust.
4033 (initialize_low_arch): New function.
4034 * linux-bfin-low.c (tdesc_bfin): Declare.
4035 (bfin_arch_setup): New function.
4036 (bfin_usrregs_info, regs_info): New globals.
4037 (bfin_regs_info): New function.
4038 (the_low_target): Adjust.
4039 (initialize_low_arch): New function.
4040 * linux-cris-low.c (tdesc_cris): Declare.
4041 (cris_arch_setup): New function.
4042 (cris_usrregs_info, regs_info): New globals.
4043 (cris_regs_info): New function.
4044 (the_low_target): Adjust.
4045 (initialize_low_arch): New function.
4046 * linux-cris-low.c (tdesc_crisv32): Declare.
4047 (cris_arch_setup): New function.
4048 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4049 (cris_regs_info): New function.
4050 (the_low_target): Adjust.
4051 (initialize_low_arch): New function.
4052 * linux-m32r-low.c (tdesc_m32r): Declare.
4053 (m32r_arch_setup): New function.
4054 (m32r_usrregs_info, regs_info): New globals.
4055 (m32r_regs_info): Adjust.
4056 (initialize_low_arch): New function.
4057 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4058 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4059 (tic6x_usrregs_info): Forward declare.
4060 (tic6x_read_description): New function, based on ...
4061 (tic6x_arch_setup): ... this. Reimplement.
4062 (target_regsets): Rename to ...
4063 (tic6x_regsets): ... this, and make static.
4064 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4065 (tic6x_regs_info): New function.
4066 (the_low_target): Adjust.
4067 (initialize_low_arch): New function.
4068 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4069 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4070 (target_regsets): Rename to ...
4071 (xtensa_regsets): ... this, and make static.
4072 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4073 globals.
4074 (xtensa_arch_setup, xtensa_regs_info): New functions.
4075 (the_low_target): Adjust.
4076 (initialize_low_arch): New function.
4077 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4078 (nios2_arch_setup): Set the current process'es tdesc.
4079 (target_regsets): Rename to ...
4080 (nios2_regsets): ... this.
4081 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4082 (nios2_regs_info): New function.
4083 (the_low_target): Adjust.
4084 (initialize_low_arch): New function.
a261b8f5
PA
4085 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4086 (aarch64_arch_setup): Set the current process'es tdesc.
4087 (target_regsets): Rename to ...
4088 (aarch64_regsets): ... this.
4089 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4090 (aarch64_regs_info): New function.
4091 (the_low_target): Adjust.
4092 (initialize_low_arch): New function.
3aee8918
PA
4093 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4094 globals.
4095 (target_regsets): Rename to ...
4096 (tile_regsets): ... this.
4097 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4098 (tile_regs_info): New function.
4099 (tile_arch_setup): Set the current process'es tdesc.
4100 (the_low_target): Adjust.
4101 (initialize_low_arch): New function.
4102 * spu-low.c (tdesc_spu): Declare.
4103 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4104 * win32-arm-low.c (tdesc_arm): Declare.
4105 (arm_arch_setup): New function.
4106 (the_low_target): Install arm_arch_setup instead of
4107 init_registers_arm.
4108 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4109 (init_windows_x86): Rename to ...
4110 (i386_arch_setup): ... this. Set `win32_tdesc'.
4111 (the_low_target): Adjust.
4112 * win32-low.c (win32_tdesc): New global.
4113 (child_add_thread): Don't create the thread cache here.
4114 (do_initial_child_stuff): Set the new process'es tdesc.
4115 * win32-low.h (struct target_desc): Forward declare.
4116 (win32_tdesc): Declare.
4117 * lynx-i386-low.c (tdesc_i386): Declare global.
4118 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4119 * lynx-low.c (lynx_tdesc): New global.
4120 (lynx_add_process): Set the new process'es tdesc.
4121 * lynx-low.h (struct target_desc): Forward declare.
4122 (lynx_tdesc): Declare global.
4123 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4124 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4125 * nto-low.c (nto_tdesc): New global.
4126 (do_attach): Set the new process'es tdesc.
4127 * nto-low.h (struct target_desc): Forward declare.
4128 (nto_tdesc): Declare.
4129 * nto-x86-low.c (tdesc_i386): Declare.
4130 (nto_x86_arch_setup): Set `nto_tdesc'.
4131
b1fbec62
GB
41322013-06-04 Gary Benson <gbenson@redhat.com>
4133
4134 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4135 to qSupported response when appropriate.
4136 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4137 with nonzero-length annex.
4138 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4139 arguments supplied in annex.
4140
d1ec4ce7
DE
41412013-05-31 Doug Evans <dje@google.com>
4142
ac44adcb 4143 PR server/15594
d1ec4ce7
DE
4144 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4145 64 bits in 64-cross-32 environment.
4146
9b25f2d3
PA
41472013-05-28 Pedro Alves <palves@redhat.com>
4148
4149 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4150 (aarch64-without-fpu.c): Delete rule.
4151 * configure.srv (aarch64*-*-linux*): Remove references to
4152 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4153 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4154 declaration.
4155
6740dc9c
PA
41562013-05-24 Pedro Alves <palves@redhat.com>
4157
4158 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4159 instead of strchr/decode_address. Error if the range isn't split
4160 with a ','. Don't assume there's be a ':' in the action.
4161
c2d6af84
PA
41622013-05-23 Yao Qi <yao@codesourcery.com>
4163 Pedro Alves <palves@redhat.com>
4164
4165 * linux-low.c (lwp_in_step_range): New function.
4166 (linux_wait_1): If the thread was range stepping and stopped
4167 outside the stepping range, report the stop to GDB. Otherwise,
4168 continue stepping. Add range stepping debug output.
4169 (linux_set_resume_request): Copy the step range from the resume
4170 request to the lwp.
4171 (linux_supports_range_stepping): New.
4172 (linux_target_ops) <supports_range_stepping>: Set to
4173 linux_supports_range_stepping.
4174 * linux-low.h (struct linux_target_ops)
4175 <supports_range_stepping>: New field.
4176 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4177 * linux-x86-low.c (x86_supports_range_stepping): New.
4178 (the_low_target) <supports_range_stepping>: Set to
4179 x86_supports_range_stepping.
4180 * server.c (handle_v_cont): Handle 'r' action.
4181 (handle_v_requests): Append ";r" if the target supports range
4182 stepping.
4183 * target.h (struct thread_resume) <step_range_start,
4184 step_range_end>: New fields.
4185 (struct target_ops) <supports_range_stepping>:
4186 New field.
4187 (target_supports_range_stepping): New macro.
4188
58794e1a
JB
41892013-05-17 Joel Brobecker <brobecker@adacore.com>
4190
4191 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4192 confusion in comment.
4193
d631c5a7
JB
41942013-05-17 Joel Brobecker <brobecker@adacore.com>
4195
4196 * lynx-low.c (struct process_info_private): New type.
4197 (lynx_add_process): New function.
4198 (lynx_create_inferior, lynx_attach): Replace calls to
4199 add_process by calls to lynx_add_process.
4200 (lynx_resume): If PTID is null, then try using
4201 current_process()->private->last_wait_event_ptid.
4202 Add comments.
4203 (lynx_clear_inferiors): Delete. The contents of that function
4204 has been inlined in lynx_mourn;
4205 (lynx_wait_1): Save the ptid in the process's private data.
4206 (lynx_mourn): Free the process' private data. Replace call
4207 to lynx_clear_inferiors by call to clear_inferiors.
4208
96f7a20f
YQ
42092013-05-17 Yao Qi <yao@codesourcery.com>
4210
4211 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4212 the right place.
4213
db0dfaa0
LM
42142013-05-16 Luis Machado <lgustavo@codesourcery.com>
4215
4216 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4217 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4218 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4219 PT_TEXT_END_ADDR guards. Update comments.
4220 (linux_target_op) <read_offsets>: Conditionally define to
4221 linux_read_offsets if the target is UCLIBC and if it defines
4222 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4223
68f5f838
SL
42242013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4225 Andrew Jenner <andrew@codesourcery.com>
4226
4227 * Makefile.in (SFILES): Add linux-nios2-low.c.
4228 (clean): Add action to delete nios2-linux.c.
4229 (nios2-linux.c): New rule.
4230 * configure.srv: Add nios2*-*-linux*.
4231 * linux-nios2-low.c: New.
4232
1ebff1fd
HAQ
42332013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4234
4235 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4236
f6150862
HZ
42372013-04-25 Hui Zhu <hui@codesourcery.com>
4238
4239 PR gdb/15186
f6150862
HZ
4240 * ax.c (ax_printf): Add fflush.
4241
614c279d
TT
42422013-04-22 Tom Tromey <tromey@redhat.com>
4243
4244 * Makefile.in (SFILES): Add filestuff.c.
4245 (OBS): Add filestuff.o.
4246 (filestuff.o): New target.
4247 * config.in, configure: Rebuild.
4248 * configure.ac: Check for fdwalk, pipe2.
4249
7d4e5717
PA
42502013-04-17 Pedro Alves <palves@redhat.com>
4251
4252 * configure.ac (USE_THREAD_DB): Delete variable.
4253 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4254 Don't AC_SUBST USE_THREAD_DB.
4255 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4256 * config.in, configure: Regenerate.
4257
d5c93e41
PA
42582013-04-16 Pedro Alves <palves@redhat.com>
4259
4260 * linux-low.h (struct lwp_info) <thread_known>: Move under
4261 the USE_THREAD_DB #ifdef.
4262
04f5fe89
PA
42632013-04-16 Pedro Alves <palves@redhat.com>
4264
4265 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4266 (linux-low.o): Delete rule.
4267 * linux-low.h: Always include "gdb_thread_db.h" instead of
4268 conditionally including thread_db.h.
4269 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4270 HAVE_THREAD_DB_H.
4271
480b27bf
JK
42722013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4273
4274 * Makefile.in (install-only): Fix make install regression.
4275
43662968
JK
42762013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4277
4278 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4279 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4280 installation.
4281 * gdbserver.1: Remove.
4282
3e74e146
PA
42832013-03-22 Pedro Alves <palves@redhat.com>
4284
4285 * linux-low.c (handle_extended_wait): Don't call
4286 linux_enable_event_reporting.
4287
a8347a2a
TT
42882013-03-15 Tony Theodore <tonyt@logyst.com>
4289
4290 PR build/9098:
4291 * Makefile.in (SHELL): Use @SHELL@.
4292
eeb56fa7
SDJ
42932013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4294
4295 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4296 compiler warning.
4297
4fa7e2ff
JB
42982013-03-13 Joel Brobecker <brobecker@adacore.com>
4299
4300 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4301 Remove extraneous NULL element.
4302
8ddb1965
YQ
43032013-03-13 Yao Qi <yao@codesourcery.com>
4304
4305 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4306 'V' block in trace frame.
4307
9accd112
MM
43082013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4309
4310 * target.h (struct target_ops): Add btrace ops.
4311 (target_supports_btrace): New macro.
4312 (target_enable_btrace): New macro.
4313 (target_disable_btrace): New macro.
4314 (target_read_btrace): New macro.
4315 * gdbthread.h (struct thread_info): Add btrace field.
4316 * server.c: Include btrace-common.h.
4317 (handle_btrace_general_set): New function.
4318 (handle_btrace_enable): New function.
4319 (handle_btrace_disable): New function.
4320 (handle_general_set): Call handle_btrace_general_set.
4321 (handle_qxfer_btrace): New function.
4322 (struct qxfer qxfer_packets[]): Add btrace entry.
4323 * inferiors.c (remove_thread): Disable btrace.
4324 * linux-low: Include linux-btrace.h.
4325 (linux_low_enable_btrace): New function.
4326 (linux_low_read_btrace): New function.
4327 (linux_target_ops): Add btrace ops.
4328 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4329 Add srv_linux_btrace=yes.
4330 (x86_64-*-linux*): Add linux-btrace.o.
4331 Add srv_linux_btrace=yes.
4332 * configure.ac: Define HAVE_LINUX_BTRACE.
4333 * config.in: Regenerated.
4334 * configure: Regenerated.
4335
5cc22e4c
MM
43362013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4337
4338 * server.c (handle_qxfer): Preserve error message if -3 is
4339 returned.
4340 (qxfer): Document the -3 return value.
4341
7c97f91e
MM
43422013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4343
4344 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4345 (linux_btrace_h): New variable.
4346 (linux-btrace.o): New rule.
4347
be9a119c 43482013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
4349 Hafiz Abid Qadeer <abidh@codesourcery.com>
4350
4351 * tracepoint.c (trace_buffer_size): New global.
4352 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4353 (init_trace_buffer): Change to one-argument function. Allocate
4354 trace buffer memory.
4355 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4356 handle QTBuffer:size packet.
4357 (cmd_bigqtbuffer_size): New function.
4358 (initialize_tracepoint): Call init_trace_buffer with
4359 DEFAULT_TRACE_BUFFER_SIZE.
4360 * server.c (handle_query): Add QTBuffer:size in the
4361 supported packets.
4362
e64f7499
YQ
43632013-03-07 Yao Qi <yao@codesourcery.com>
4364
4365 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4366 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4367 of -1.
4368 (cmd_qtsp): Adjust condition. Do post increment.
4369 Set cur_action and cur_step_action back to 0.
4370
f0ae6fc3
PA
43712013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4372
4373 PR server/15236
4374 * linux-low.c (linux_write_memory): Return early success if LEN is
4375 zero.
4376
b5b0b0af
CV
43772013-03-05 Corinna Vinschen <vinschen@redhat.de>
4378
334ad4a8 4379 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 4380
589bc927
TT
43812013-02-28 Tom Tromey <tromey@redhat.com>
4382
4383 * configure.ac: Invoke AC_SYS_LARGEFILE.
4384 * configure, config.in: Rebuild.
4385
dfe07582
CV
43862013-02-28 Corinna Vinschen <vinschen@redhat.com>
4387
4388 * win32-low.c: Throughout, fix format strings and casts of
4389 printf-like functions to avoid type related warnings on all
4390 platforms.
4391 (get_child_debug_event): Print dwDebugEventCode as hex since
4392 that's how it's usually documented.
4393
736cd585
YQ
43942013-02-28 Yao Qi <yao@codesourcery.com>
4395
4396 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4397 pulongest.
4398
e1f58301
JW
43992013-02-27 Jiong Wang <jiwang@tilera.com>
4400
4401 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4402 (reg-tilegx32.c): New rule.
4403 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4404 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4405 different register info initializer according to elf class.
4406 (init_registers_tilgx32): New function. The tilegx32 register info
4407 initializer.
4408 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4409 (tile_store_gregset): Likewise.
4410
d171ca78
YQ
44112013-02-27 Yao Qi <yao@codesourcery.com>
4412
4413 * server.c (process_point_options): Print debug message when
4414 debug_threads is true.
4415
282bbdf3
YQ
44162013-02-26 Yao Qi <yao@codesourcery.com>
4417
4418 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4419
aca22551
PA
44202013-02-19 Pedro Alves <palves@redhat.com>
4421 Kai Tietz <ktietz@redhat.com>
4422
4423 PR gdb/15161
4424
4425 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4426 instead of strtoul to extract address from packet.
4427 (process_serial_event) <'z'>: Likewise.
4428
4f3cee1c
YQ
44292013-02-18 Yao Qi <yao@codesourcery.com>
4430
4431 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4432
8e1d55a3
PA
44332013-02-14 Pedro Alves <palves@redhat.com>
4434
4435 Plug memory leak.
4436
4437 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4438 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4439
458820da
PA
44402013-02-14 Pedro Alves <palves@redhat.com>
4441
4442 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4443
baea0dae
PA
44442013-02-14 Pedro Alves <palves@redhat.com>
4445
4446 * tracepoint.c (save_string): Delete.
4447 (add_tracepoint_action): Use savestring instead of save_string.
4448
0b1afbb3
PA
44492013-02-12 Pedro Alves <palves@redhat.com>
4450
4451 * linux-xtensa-low.c: Ditto.
4452 * xtensa-xtregs.c: Ditto.
4453
8a4ac37e
PA
44542013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4455
4456 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4457 thread_db.
4458
148de6bb
MS
44592013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4460
4461 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4462 aarch64_num_wp_regs and aarch64_num_bp_regs to
4463 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4464
55fac6e0
MS
44652013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4466
4467 * linux-aarch64-low.c (ps_get_thread_area): Replace
4468 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4469
176eb98c
MS
44702013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4471 Marcus Shawcroft <marcus.shawcroft@arm.com>
4472 Nigel Stephens <nigel.stephens@arm.com>
4473 Yufeng Zhang <yufeng.zhang@arm.com>
4474
4475 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4476 (aarch64.c, aarch64-without-fpu.c): New targets.
4477 * configure.srv (aarch64*-*-linux*): New.
4478 * linux-aarch64-low.c: New file.
4479
56f7af9c
MS
44802013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4481
43aaf8b6 4482 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
4483 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4484 (dequeue_one_deferred_signal, linux_resume_one_thread)
4485 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4486 (linux_tracefork_grandchild, linux_test_for_tracefork)
4487 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4488 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4489 where the argument is 0.
4490
60f662b0
YQ
44912013-01-25 Yao Qi <yao@codesourcery.com>
4492
4493 * event-loop.c: Include "queue.h".
4494 (gdb_event_p): New typedef.
4495 (struct gdb_event) <next_event>: Remove.
4496 (event_queue): Change to QUEUE(gdb_event_p).
4497 (async_queue_event): Remove.
4498 (gdb_event_xfree): New.
4499 (initialize_event_loop): New.
4500 (process_event): Use API from QUEUE.
4501 (wait_for_event): Likewise.
4502 * server.c (main): Call initialize_event_loop.
4503 * server.h (initialize_event_loop): Declare.
4504
5ae4861a
YQ
45052013-01-18 Yao Qi <yao@codesourcery.com>
4506
4507 * ax.h (struct eval_agent_expr_context): New.
4508 (gdb_eval_agent_expr): Update declaration.
4509 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4510 TFRAME. Add new argument CTX.
4511 * server.h (struct eval_agent_expr_context): Declare.
4512 (agent_mem_read, agent_tsv_read): Update declaration.
4513 (agent_mem_read_string): Likewise.
4514 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4515 (add_traceframe_block): Add new argument TPOINT.
4516 Increase TPOINT->traceframe_usage.
4517 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4518 eval_tracepoint_agent_expr.
4519 (condition_true_at_tracepoint): Likewise.
4520 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4521 (agent_mem_read_string, agent_tsv_read): Likewise.
4522
85e00e85
YQ
45232013-01-16 Yao Qi <yao@codesourcery.com>
4524
4525 * linux-low.c (linux_resume_one_lwp): Don't check
4526 'lwp->bp_reinsert != 0'.
4527
4039cf45
JB
45282013-01-07 Joel Brobecker <brobecker@adacore.com>
4529 Pedro Alves <palves@redhat.com>
4530
4531 * lynx-low.c (ptrace_request_to_str): Define a temporary
4532 macro and use it to simplify this function's implementation.
4533
9044dee2
JB
45342013-01-07 Joel Brobecker <brobecker@adacore.com>
4535
4536 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4537 sets errno.
4538
e6352c8f
JB
45392013-01-07 Joel Brobecker <brobecker@adacore.com>
4540
4541 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4542
50681a27
JB
45432013-01-07 Joel Brobecker <brobecker@adacore.com>
4544
4545 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4546
3f6e77ef
JB
45472013-01-07 Joel Brobecker <brobecker@adacore.com>
4548
4549 * lynx-low.c (lynx_resume): Use the resume_info parameter
4550 to determine the ptid for the lynx_ptrace call, unless
4551 it is equal to minus_one_ptid, in which case we use the
4552 ptid of the current_inferior.
4553 (lynx_wait_1): After having received a thread create/exit
4554 event, resume the inferior's execution using the signaling
4555 thread's ptid, rather than the old ptid.
4556
7fda33ae
JB
45572013-01-07 Joel Brobecker <brobecker@adacore.com>
4558
4559 * lynx-low.c (lynx_resume): Delete variable ret.
4560
b9786c74
JB
45612013-01-01 Joel Brobecker <brobecker@adacore.com>
4562
4563 * gdbreplay.c (gdbreplay_version): Update copyright year.
4564 * server.c (gdbserver_version): Likewise.
4565
8b93d60f
JB
45662012-12-17 Joel Brobecker <brobecker@adacore.com>
4567
4568 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4569 new thread.
4570
037335a7
JB
45712012-12-17 Joel Brobecker <brobecker@adacore.com>
4572
4573 * lynx-low.c (ptrace_request_to_str): Add handling for
4574 PTRACE_GETTRACESIG.
4575
52d4cbd8
JB
45762012-12-17 Joel Brobecker <brobecker@adacore.com>
4577
4578 * lynx-low.c (lynx_attach): Delete variable new_process.
4579
ab8f6ca9
JB
45802012-12-17 Joel Brobecker <brobecker@adacore.com>
4581
4582 * lynx-low.c (lynx_create_inferior): Delete variable
4583 new_process.
4584
78cbc024
JB
45852012-12-17 Joel Brobecker <brobecker@adacore.com>
4586
4587 * lynx-low.c (ptrace_request_to_str): Do not handle
4588 PTRACE_GETTHREADLIST if this macro does not exist.
4589
14a00470
YQ
45902012-12-15 Yao Qi <yao@codesourcery.com>
4591
4592 * Makefile.in (OBS): Add notif.o.
4593 * notif.c, notif.h: New.
4594 * server.c: Include "notif.h".
4595 (struct vstop_notif) <next>: Remove.
4596 <base>: New field.
4597 (queue_stop_reply): Update.
4598 (push_event, send_next_stop_reply): Remove.
4599 (discard_queued_stop_replies): Update.
4600 (notif_stop): New variable.
4601 (handle_v_stopped): Remove.
4602 (handle_v_requests): Don't call handle_v_stopped. Call
4603 handle_ack_notif instead.
4604 (queue_stop_reply_callback): Call notif_event_enque instead
4605 of queue_stop_reply.
4606 (handle_status): Don't call send_next_stop_reply, call
4607 notif_write_event instead.
4608 (kill_inferior_callback): Likewise.
4609 (detach_or_kill_inferior_callback): Likewise.
4610 (main): Call initialize_notif.
4611 (process_serial_event): Call QUEUE_is_empty.
4612 (handle_target_event): Call notif_push instead of push event.
4613 * server.h (push_event): Remove declaration.
4614
61c125b9
TT
46152012-12-10 Tom Tromey <tromey@redhat.com>
4616
4617 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4618 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4619 macros.
4620 (.c.o): Rewrite.
4621 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4622 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4623 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4624 (amd64-linux-ipa.o, ax.o): Rewrite.
4625 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4626 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4627 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4628 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4629 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4630 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4631 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4632 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4633 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4634 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4635 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4636 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4637 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4638 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4639 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4640 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4641 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4642 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4643 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4644 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4645 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4646 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4647 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4648 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4649 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4650 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4651 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4652 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4653 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4654 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4655 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4656 (reg-tilegx.o): Remove.
4657 (all_object_files): New macro.
4658 Include .deps files.
4659 * aclocal.m4, configure: Rebuild.
4660 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4661 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4662 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4663
e90e9ad9
TT
46642012-12-05 Tom Tromey <tromey@redhat.com>
4665
4666 PR gdb/14917:
4667 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4668
02d403bf 46692012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
4670
4671 * configure.ac: Check for linux/perf_event.h.
4672 * config.in: Regenerated.
4673 * configure: Regenerated.
4674
0270a750
PA
46752012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4676
4677 * hostio.c (handle_readlink): Decrease buffer size
4678 parameter passed to readlink by one byte.
4679
8c29b58e
YQ
46802012-11-26 Yao Qi <yao@codesourcery.com>
4681
4682 * configure.ac (build_warnings): Append '-Wempty-body'.
4683 * configure: Regenerated.
4684 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4685 body.
4686
8bdce1ff
PM
46872012-11-15 Pierre Muller <muller@sourceware.org>
4688
4689 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4690 * config.in: Regenerate.
4691 * configure: Regenerate.
4692 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4693 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4694 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4695 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4696 header.
4697 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4698 instead of <sys/wait.h> header.
4699 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4700
02d403bf 47012012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
4702
4703 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4704 (various make rules): Remove -DGDBSERVER
4705
fbd5db48
YQ
47062012-11-09 Yao Qi <yao@codesourcery.com>
4707
4708 * spu-low.c (current_ptid): Move it to ..
4709 * gdbthread.h: ... here. New.
4710 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4711 * server.c (myresume, process_serial_event): Likewise.
4712 * thread-db.c (thread_db_find_new_threads): Likewise.
4713 * tracepoint.c (run_inferior_command): Likewise.
4714
b3dc46ff
AB
47152012-10-01 Andrew Burgess <aburgess@broadcom.com>
4716
4717 * server.c (handle_search_memory_1): Include access length in
4718 warning message.
4719
07c04788
HPN
47202012-09-05 Michael Brandt <michael.brandt@axis.com>
4721
4722 * linux-crisv32-low.c: Fix compile errors.
4723
918d227b
YQ
47242012-09-04 Yao Qi <yao@codesourcery.com>
4725
4726 * tracepoint.c (cmd_qtsv): Adjust debug message.
4727 Don't check CUR_TPOINT.
4728
18c1b81a
YQ
47292012-08-28 Yao Qi <yao@codesourcery.com>
4730
4731 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4732 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4733 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4734 Remove declarations of xmalloc, xreallloc, xstrdup and
4735 freeargv.
4736 * Makefile.in (libiberty_h): New.
4737 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4738 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4739
dc82f37b
YQ
47402012-08-23 Yao Qi <yao@codesourcery.com>
4741
4742 * server.h: Remove declaration of 'xsnprintf'.
4743
406b1477
KS
47442012-08-22 Keith Seitz <keiths@redhat.com>
4745
4746 * server.h: Include build-gnulib-gbserver/config.h.
4747 * gdbreplay.c: Likewise.
4748
e6712ff1
DE
47492012-08-08 Doug Evans <dje@google.com>
4750
4751 * Makefile.in (SFILES): Add gdb_vecs.c.
4752 (OBS): Add gdb_vecs.o.
4753 (gdb_vecs_h, host_defs_h): New variables.
4754 (thread-db.o): Add $(gdb_vecs_h) dependency.
4755 (gdb_vecs.o): New rule.
4756 * thread-db.c: #include "gdb_vecs.h".
4757 (thread_db_load_search): Use a vector to iterate over path elements.
4758 Handle text appearing after "$pdir".
4759
4760 * configure.ac: Add check for strstr.
4761 * config.in: Regenerate.
4762 * configure: Regenerate.
4763
7c3270ae
UW
47642012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4765
4766 * hostio.c (handle_pread): If pread fails, fall back to attempting
4767 lseek/read.
4768 (handle_pwrite): Likewise for pwrite.
4769
b62e2b27
UW
47702012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4771
4772 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4773 between unsupported TYPE and unimplementable ADDR/LEN combination.
4774 (arm_insert_point): Act on new return value.
4775
78a99e91
PA
47762012-07-31 Pedro Alves <palves@redhat.com>
4777
4778 * server.c (process_point_options): Only skip tokens if we find
4779 one that is unrecognized. Don't treat 'X' specially while
4780 skipping unrecognized tokens.
4781
fcf303ab
UW
47822012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4783
4784 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4785 to 4-byte-align HW breakpoint addresses for Thumb.
4786
7255706c
YQ
47872012-07-27 Yao Qi <yao@codesourcery.com>
4788
4789 PR remote/14161.
4790
4791 * server.h: Declare gdb_agent_about_to_close.
4792 * target.c (kill_inferior): Include "agent.h".
4793 New. Send command 'kill'.
4794 * target.h (kill_inferior): Removed macro.
4795 * tracepoint.c (gdb_agent_about_to_close): New.
4796 (gdb_agent_helper_thread): Handle command 'close'.
4797 Wait endlessly until the inferior stops.
4798 Install gdb_agent_remove_socket to atexit hook.
4799 (agent_socket_name): New static variable.
4800 (gdb_agent_socket_init): Replace local variable 'name' with
4801 'agent_socket_name'.
4802 (gdb_agent_remove_socket): New.
4803
5a3f286f
YQ
48042012-07-27 Yao Qi <yao@codesourcery.com>
4805
4806 * server.c (process_point_options): Stop at 'X' when parsing.
4807
961bd387
ME
48082012-07-19 Michael Eager <eager@eagercon.com>
4809
a261b8f5 4810 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
4811 to hw_execute.
4812 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4813 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4814 hardware breakpoint.
4815
aa7c7447
JK
48162012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4817
4818 * gdbserver/linux-low.c (initialize_low): Call
4819 linux_ptrace_init_warnings.
4820
7f216e7c
DE
48212012-07-02 Doug Evans <dje@google.com>
4822
4823 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4824 pointer to int.
4825
d3ce09f5
SS
48262012-07-02 Stan Shebs <stan@codesourcery.com>
4827
4828 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4829 (ax.o): Add it to build rule.
4830 (ax-ipa.o): Ditto.
4831 (OBS): Add format.o.
4832 (IPA_OBS): Add format.o.
4833 * server.c (handle_query): Claim support for breakpoint commands.
4834 (process_point_options): Add command case.
4835 (process_serial_event): Leave running if there are printfs in
4836 effect.
4837 * mem-break.h (any_persistent_commands): Declare.
4838 (add_breakpoint_commands): Declare.
4839 (gdb_no_commands_at_breakpoint): Declare.
4840 (run_breakpoint_commands): Declare.
4841 * mem-break.c (struct point_command_list): New struct.
4842 (struct breakpoint): New field command_list.
4843 (any_persistent_commands): New function.
4844 (add_commands_to_breakpoint): New function.
4845 (add_breakpoint_commands): New function.
4846 (gdb_no_commands_at_breakpoint): New function.
4847 (run_breakpoint_commands): New function.
4848 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4849 locally.
4850 * ax.c: Include format.h.
4851 (ax_printf): New function.
4852 (gdb_eval_agent_expr): Add printf opcode.
4853
2f8f6aed
YQ
48542012-06-13 Yao Qi <yao@codesourcery.com>
4855
4856 * server.c (start_inferior): Remove duplicated writes to fields
4857 'last_resume_kind' and 'last_status' of 'current_inferior'.
4858
0c9070b3
YQ
48592012-06-12 Yao Qi <yao@codesourcery.com>
4860 Pedro Alves <palves@redhat.com>
4861
4862 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4863 comment.
4864 * server.c (handle_v_cont): Extend comment.
4865
c52daf70
YQ
48662012-06-11 Yao Qi <yao@codesourcery.com>
4867
4868 * linux-low.c (linux_attach): Add 'static'.
4869
d38bbb0a
YQ
48702012-06-06 Yao Qi <yao@codesourcery.com>
4871
4872 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4873
89dc0afd
JK
48742012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4875
4876 Fix gcc -flto compilation warning.
4877 * server.c (main): Make variable multi_mode and attach volatile.
4878
75f62ce7
TJB
48792012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4880
4881 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4882 if the platform doesn't know about it.
4883
65f479b6
PA
48842012-05-30 Jeff Kenton <jkenton@tilera.com>
4885
4886 * Makefile.in (SFILES): Add linux-tile-low.c.
4887 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4888 * configure.srv: Handle tilegx-*-linux*.
4889 * linux-tile-low.c: New file.
4890
0c5bf5a9
JK
48912012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4892
4893 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4894
a493e3e2
PA
48952012-05-24 Pedro Alves <palves@redhat.com>
4896
4897 PR gdb/7205
4898
43aaf8b6 4899 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 4900
2ea28649
PA
49012012-05-24 Pedro Alves <palves@redhat.com>
4902
4903 PR gdb/7205
4904
4905 Replace target_signal with gdb_signal throughout.
4906
8d409d16
MR
49072012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4908
4909 * linux-low.c (linux_store_registers): Avoid the copying sequence
4910 when no data has been retrieved by ptrace.
4911
23512c01
MGD
49122012-05-22 Will Deacon <will.deacon@arm.com>
4913
4914 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4915 Include asm/ptrace.h.
4916 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4917 already defined.
4918
4934b29e
MR
49192012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4920
4921 * linux-low.c (linux_store_registers): Don't re-retrieve data
4922 with ptrace that has already been obtained from /proc. Always
4923 copy any data retrieved with ptrace to the buffer supplied.
4924
bde24c0a
PA
49252012-05-11 Yao Qi <yao@codesourcery.com>
4926 Pedro Alves <palves@redhat.com>
4927
4928 * linux-low.c (enum stopping_threads_kind): New.
4929 (stopping_threads): Change type to `enum stopping_threads_kind'.
4930 (handle_extended_wait): If stopping and suspending threads, leave
4931 the new_lwp suspended too.
4932 (linux_wait_for_event): Adjust.
4933 (stop_all_lwps): Set `stopping_threads' to
4934 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4935 whether we're suspending threads or just stopping them. Assert no
4936 recursion happens.
4937
623b6bdf
YQ
49382012-04-29 Yao Qi <yao@codesourcery.com>
4939
4940 * server.h: Move some code to ...
4941 * gdbthread.h: ... here. New.
4942 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4943 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4944 (nto-low.o, win32-low.o): Likewise.
4945 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4946 * regcache.c, remote-utils.c, server.c: Likewise.
4947 * target.c, tracepoint.c, win32-low.c: Likewise.
4948
f15f9948
TJB
49492012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4950
4951 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4952 (PTRACE_ARG4_TYPE): Likewise.
4953 (PTRACE_XFER_TYPE): Likewise.
4954 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4955 ptrace to PTRACE_ARG3_TYPE.
4956 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4957 (PTRACE_ARG4_TYPE): Likewise.
4958 (PTRACE_XFER_TYPE): Likewise.
4959 (linux_detach_one_lwp): Cast fourth argument of
4960 ptrace to long then PTRACE_ARG4_TYPE.
4961 (regsets_fetch_inferior_registers): Cast third argument of
4962 ptrace to long then PTRACE_ARG3_TYPE.
4963 (regsets_store_inferior_registers): Likewise.
4964
38ea300a
PA
49652012-04-20 Pedro Alves <palves@redhat.com>
4966
4967 * configure: Regenerate.
4968
c971b7fa
PA
49692012-04-19 Pedro Alves <palves@redhat.com>
4970
43aaf8b6 4971 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 4972 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
4973 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4974 (all, install-only, uninstall, clean-info, all-lib, clean): No
4975 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4976 (maintainer-clean realclean distclean): Use subdir_do.
4977 (subdir_do): New.
4978 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 4979 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
4980 * acinclude.m4: Include acx_configure_dir.m4.
4981 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4982 calls. Call AC_PROG_RANLIB. Configure gnulib using
4983 ACX_CONFIGURE_DIR.
4984 (GNULIB): New.
4985 (GNULIB_STDINT_H): Adjust.
4986 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4987 * gdbreplay.c: Include build-gnulib/config.h.
4988 * server.h: Likewise.
4989 * aclocal.m4: Regenerate.
4990 * config.in: Regenerate.
4991 * configure: Regenerate.
c971b7fa 4992
809277f8
PA
49932012-04-19 Pedro Alves <palves@redhat.com>
4994
4995 * Makefile.in (LIBGNU, INCGNU): Adjust.
4996 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4997 (all, install-only, uninstall, clean-info, all-lib, clean)
4998 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4999 * configure.ac: Adjust AC_OUTPUT output.
5000 * aclocal.m4: Regenerate.
5001 * configure: Regenerate.
5002
fd9bb8b8
PA
50032012-04-19 Pedro Alves <palves@redhat.com>
5004
5005 * Makefile.in (generated_files): New.
5006 (server_h): Remove the explicit dependency on config.h, and depend
5007 on $generated_files.
5008
1c298c66
PA
50092012-04-19 Pedro Alves <palves@redhat.com>
5010
5011 * Makefile.in (INCGNU): Add -Ignulib.
5012
57c4b50b
PA
50132012-04-19 Pedro Alves <palves@redhat.com>
5014
5015 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5016 (INCGNU): ... this, and spell out -I here.
5017 (GNULIB_LIB): Rename to ...
5018 (LIBGNU): ... this.
5019 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5020
1030e047
PA
50212012-04-19 Pedro Alves <palves@redhat.com>
5022
5023 * config.in: Regenerate.
5024
447d4319
PA
50252012-04-19 Pedro Alves <palves@redhat.com>
5026
5027 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5028 * server.h (memmem): Remove declaration.
5029 * config.in: Regenerate.
5030 * configure: Regenerate.
5031
aad9eab9
YQ
50322012-04-19 Yao Qi <yao@codesourcery.com>
5033
5034 * Makefile.in (SFILES): Add common/vec.c.
5035 (OBS): Add vec.o.
5036 (vec.o): New rule.
5037
3e10640f
YQ
50382012-04-19 Yao Qi <yao@codesourcery.com>
5039
5040 * remote-utils.c (prepare_resume_reply): Replace with macro
5041 target_core_of_thread.
5042 * server.c (handle_qxfer_threads_proper): Likewise.
5043 * target.h (traget_core_of_thread): New macro.
5044
71622373
PA
50452012-04-18 Pedro Alves <palves@redhat.com>
5046
5047 * aclocal.m4: Regenerate.
5048 * configure: Regenerate.
5049
80d26939
YQ
50502012-04-16 Yao Qi <yao@codesourcery.com>
5051
5052 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5053 duplicated on address.
5054
42476b70
YQ
50552012-04-16 Yao Qi <yao@codesourcery.com>
5056
5057 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5058 (struct tracepoint_action_ops) <send>: New field.
5059 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5060 (agent_expr_send, x_tracepoint_action_send): New.
5061 (l_tracepoint_action_send): New.
5062 (cmd_qtdp): Download and install tracepoint
5063 according to `use_agent'.
5064 (run_inferior_command): Add one more parameter `len'.
5065 Update callers.
5066 (tracepoint_send_agent): New.
5067 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5068
7bc83639
YQ
50692012-04-16 Yao Qi <yao@codesourcery.com>
5070
5071 * tracepoint.c (download_tracepoints): Moved to ...
5072 (cmd_qtstart): ... here.
5073
5f18041e
YQ
50742012-04-14 Yao Qi <yao@codesourcery.com>
5075
5076 * tracepoint.c: Include inttypes.h.
5077 (struct collect_memory_action): Use sized types.
5078 (struct tracepoint): Likewise.
5079 (cmd_qtdp, stop_tracing): Update print specifiers.
5080 (cmd_qtp, response_tracepoint): Likewise.
5081 (collect_data_at_tracepoint): Likewise.
5082 (collect_data_at_step): Likewise.
5083
55a8c076
YQ
50842012-04-14 Yao Qi <yao@codesourcery.com>
5085
5086 Import gnulib module inttypes.
5087 * aclocal.m4, config.in, configure: Regenerated.
5088
dc750257
YQ
50892012-04-14 Yao Qi <yao@codesourcery.com>
5090
5091 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5092 Makefile and config.status at last.
5093
0ab5faf9
YQ
50942012-04-13 Yao Qi <yao@codesourcery.com>
5095
5096 * tracepoint.c: Include stdint.h unconditionally.
5097
18f5fd81
TJB
50982012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5099
5100 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5101 on BFD_HAVE_SYS_PROCFS_TYPE.
5102 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5103 * configure: Regenerate.
5104 * config.in: Likewise.
5105
4d47af5c
L
51062012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5107
5108 * Makefile.in (clean): Also remove x32.c x32-linux.c
5109 x32-avx.c x32-avx-linux.c.
5110 (x32.o): New target.
5111 (x32.c): Likewise.
5112 (x32-linux.o): Likewise.
5113 (x32-linux.c): Likewise.
5114 (x32-avx.o): Likewise.
5115 (x32-avx.c): Likewise.
5116 (x32-avx-linux.o): Likewise.
5117 (x32-avx-linux.c): Likewise.
5118
5119 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5120 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5121 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5122 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5123 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5124 i386/x32-avx-linux.xml.
5125
5126 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5127 (init_registers_x32_avx_linux): Likwise.
5128 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5129 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5130
ecedbe58
PA
51312012-04-13 Pedro Alves <palves@redhat.com>
5132
5133 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5134 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5135 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5136 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5137 the sub-make.
5138
c92b5177
L
51392012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5140
5141 * linux-x86-low.c (compat_x32_clock_t): New.
5142 (compat_x32_siginfo_t): Likewise.
5143 (compat_x32_siginfo_from_siginfo): Likewise.
5144 (siginfo_from_compat_x32_siginfo): Likewise.
5145 (linux_is_elf64): Likewise.
5146 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5147 and siginfo_from_compat_x32_siginfo for x32.
5148 (x86_arch_setup): Set linux_is_elf64.
5149
214d508e
L
51502012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5151
5152 PR gdb/13969
5153 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5154 e_machine field.
5155 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5156 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5157 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5158 compatible with process.
5159
c9a1864a
YQ
51602012-04-12 Yao Qi <yao@codesourcery.com>
5161
5162 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5163 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5164 (install-only, install-info, clean): Handle sub dir gnulib.
5165 (all-lib, am--refresh): New targets.
5166 (memmem.o): Remove target.
5167 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5168 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5169 (AC_REPLACE_FUNCS): Remove memmem.
5170 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5171 (AC_OUTPUT): Generate Makefile in gnulib/.
5172 * aclocal.m4, config.in, configure: Regenerated.
5173
367ba2c2
MR
51742012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5175
5176 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5177
9d236627
PA
51782012-04-05 Pedro Alves <palves@redhat.com>
5179
5180 -Werror=strict-aliasing
5181
5182 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5183 pointer.
5184
111217b3
PA
51852012-04-04 Pedro Alves <palves@redhat.com>
5186
5187 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5188 (sparc_store_gregset_from_stack, sparc_store_gregset)
5189 (sparc_breakpoint_at): Fix formatting.
5190
8365dcf5
TJB
51912012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5192
5193 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5194 are available.
5195 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5196 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5197 * config.in: Regenerate.
5198 * configure: Likewise.
5199
689cc2ae
PA
52002012-03-29 Pedro Alves <palves@redhat.com>
5201
5202 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5203 Correct ptrace arguments.
5204
c14dfd32
PA
52052012-03-28 Pedro Alves <palves@redhat.com>
5206
5207 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5208 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5209 (IA64_FR1_REGNUM): New defines.
5210 (ia64_fetch_register): New.
5211 (the_low_target): Install it.
5212 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5213 field.
5214 * linux-low.c (linux_fetch_registers): Try the
5215 the_low_target.fetch_register hook first.
5216
5217 * linux-arm-low.c (the_low_target): Adjust.
5218 * linux-bfin-low.c (the_low_target): Adjust.
5219 * linux-cris-low.c (the_low_target): Adjust.
5220 * linux-crisv32-low.c (the_low_target): Adjust.
5221 * linux-m32r-low.c (the_low_target): Adjust.
5222 * linux-m68k-low.c (the_low_target): Adjust.
5223 * linux-mips-low.c (the_low_target): Adjust.
5224 * linux-ppc-low.c (the_low_target): Adjust.
5225 * linux-s390-low.c (the_low_target): Adjust.
5226 * linux-sh-low.c (the_low_target): Adjust.
5227 * linux-sparc-low.c (the_low_target): Adjust.
5228 * linux-tic6x-low.c (the_low_target): Adjust.
5229 * linux-x86-low.c (the_low_target): Adjust.
5230 * linux-xtensa-low.c (the_low_target): Adjust.
5231
63c88e13
PA
52322012-03-26 Pedro Alves <palves@redhat.com>
5233
5234 * server.c (handle_qxfer_libraries): Don't bail early if
5235 the_target->qxfer_libraries_svr4 is not NULL.
5236
fb723180
PA
52372012-03-26 Pedro Alves <palves@redhat.com>
5238
5239 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5240
0afae3cf
PA
52412012-03-23 Pedro Alves <palves@redhat.com>
5242
5243 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5244 "library-list-svr4" element's start tag when the the DSO list is
5245 empty.
5246
485f1ee4
PA
52472012-03-23 Pedro Alves <palves@redhat.com>
5248
5249 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5250 a variable whose type size is the same as the inferior's pointer
5251 size.
5252
a5362b9a
TS
52532012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5254
5255 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5256 struct siginfo.
5257 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5258 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5259 * linux-low.h: Include <signal.h>.
5260 (struct siginfo): Remove forward declaration.
5261 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5262 struct siginfo.
5263
d226c142
MF
52642012-03-21 Mike Frysinger <vapier@gentoo.org>
5265
5266 * .gitignore: Ignore more files.
5267
122f36ef
PA
52682012-03-19 Pedro Alves <palves@redhat.com>
5269 Jan Kratochvil <jan.kratochvil@redhat.com>
5270
5271 * server.c (cont_thread, general_thread): Add describing comments.
5272 (start_inferior): Clear `cont_thread'.
5273 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5274 of a process.
5275
fc3e5175
YQ
52762012-03-15 Yao Qi <yao@codesourcery.com>
5277
5278 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5279 handling to ...
5280 (cmd_qtdp): ... here.
5281
8d0d92cd
YQ
52822012-03-15 Yao Qi <yao@codesourcery.com>
5283
5284 * tracepoint.c (struct tracepoint_action_ops): New.
5285 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5286 (m_tracepoint_action_download): New.
5287 (r_tracepoint_action_download): New.
5288 (x_tracepoint_action_download): New.
5289 (l_tracepoint_action_download): New.
5290 (add_tracepoint_action): Install `action->ops' according type.
5291 (download_tracepoint_1): Move code `download' function pointer
5292 of various tracepoint_action_ops.
5293
87b0bb13
JK
52942012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5295
5296 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5297 linux_ptrace_attach_warnings.
5298
5f572dec
JK
52992012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5300
5301 * Makefile.in (linux-ptrace.o): New.
5302 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5303 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5304 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5305 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5306 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5307 of these targets.
5308 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5309
f4647387
YQ
53102012-03-08 Yao Qi <yao@codesourcery.com>
5311 Pedro Alves <palves@redhat.com>
5312
5313 Fix PR server/13392.
5314 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5315 offset of JMP insn.
5316 * tracepoint.c (remove_tracepoint): New.
5317 (cmd_qtdp): Call remove_tracepoint when failed to install.
5318
9b224c5e
PA
53192012-03-07 Pedro Alves <palves@redhat.com>
5320
5321 * linux-low.c (get_detach_signal): New.
5322 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5323 Pass on pending signals to PTRACE_DETACH. Check the result of the
5324 ptrace call.
5325 * server.c (program_signals, program_signals_p): New.
5326 (handle_general_set): Handle QProgramSignals.
5327 * server.h (program_signals, program_signals_p): Declare.
5328
e237a7e2
JK
53292012-03-05 Pedro Alves <palves@redhat.com>
5330 Jan Kratochvil <jan.kratochvil@redhat.com>
5331
5332 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5333 New comment why.
5334
5808517f
YQ
53352012-03-03 Yao Qi <yao@codesourcery.com>
5336
5337 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5338 agent_look_up_symbols.
5339
58b4daa5
YQ
53402012-03-03 Yao Qi <yao@codesourcery.com>
5341
5342 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5343 (linux-x86-low.o): Likewise.
5344 * server.h: Remove in_process_agent_loaded.
5345 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5346 common/agent.c.
5347 Update callers.
5348
8ffcbaaf
YQ
53492012-03-03 Yao Qi <yao@codesourcery.com>
5350
5351 * tracepoint.c (gdb_agent_capability): New global.
5352 (in_process_agent_loaded_ust): Renamed to
5353 `in_process_agent_supports_ust'.
5354 Update callers.
5355 (in_process_agent_supports_ust): Call agent_capability_check.
5356 (clear_installed_tracepoints): Assert that agent supports
5357 agent.
5358
d1feda86
YQ
53592012-03-03 Yao Qi <yao@codesourcery.com>
5360
5361 * linux-low.c (linux_supports_agent): New.
5362 (linux_target_ops): Initialize field `supports_agent' with
5363 linux_supports_agent.
5364 * target.h (struct target_ops) <supports_agent>: New.
5365 (target_supports_agent): New macro.
5366 * server.c (handle_general_set): Handle packet 'QAgent'.
5367 (handle_query): Send `QAgent+'.
5368 * Makefile.in (server.o): Depends on agent.h.
5369
2fa291ac
YQ
53702012-03-03 Yao Qi <yao@codesourcery.com>
5371
5372 * Makefile.in (OBS): Add agent.o.
5373 Add new rule for agent.o.
5374 Track dependence of tracepoint.c on agent.h.
5375 * tracepoint.c (run_inferior_command_1):
5376 (run_inferior_command): Call agent_run_command.
5377 (gdb_ust_connect_sync_socket): Deleted. Move it to
5378 common/agent.c.
5379 (resume_thread, stop_thread): Likewise.
5380 (gdb_ust_socket_init): Renamed to ...
5381 (gdb_agent_socket_init): ... New.
5382 (gdb_ust_thread): Renamed to ...
5383 (gdb_agent_helper_thread): ... New.
5384 (gdb_ust_init): Move some code to ...
5385 (gdb_agent_init): ... here. New.
5386 [HAVE_UST]: Call gdb_ust_init.
5387 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5388 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5389 * config.in, configure: Regenerated.
5390
05044653
PA
53912012-03-02 Pedro Alves <palves@redhat.com>
5392
5393 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5394 * linux-low.c (struct simple_pid_list): New.
5395 (stopped_pids): New a struct simple_pid_list pointer.
5396 (add_to_pid_list, pull_pid_from_list): New.
5397 (handle_extended_wait): Don't assume the first signal new children
5398 report is SIGSTOP. Adjust call to pull_pid_from_list.
5399 (linux_wait_for_lwp): Adjust.
5400
8d00225b
YQ
54012012-03-02 Yao Qi <yao@codesourcery.com>
5402
5403 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5404 debug log.
5405
19560ba5
YQ
54062012-03-02 Yao Qi <yao@codesourcery.com>
5407
5408 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5409 `stop_pc' and `tpoint'. Update caller.
5410
1faeff08
MR
54112012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5412
5413 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5414 * linux-low.c (use_linux_regsets): New macro.
5415 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5416 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5417 (linux_register_in_regsets): New function.
5418 (usr_fetch_inferior_registers): Skip registers covered by
5419 regsets.
5420 (usr_store_inferior_registers): Likewise.
5421 (usr_fetch_inferior_registers): New macro.
5422 (usr_store_inferior_registers): Likewise.
5423 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5424 (linux_store_registers): Likewise.
5425 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5426 prototype.
5427 (init_registers_mips64_dsp_linux): Likewise.
5428 (init_registers_mips_linux): New macro.
5429 (init_registers_mips_dsp_linux): Likewise.
5430 (mips_dsp_num_regs): Likewise.
5431 (DSP_BASE, DSP_CONTROL): New fallback macros.
5432 (mips_base_regs): New macro.
5433 (mips_regmap): Use it. Fix the size.
5434 (mips_dsp_regmap): New variable.
5435 (mips_dsp_regset_bitmap): Likewise.
5436 (mips_arch_setup): New function.
5437 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5438 than mips_regmap.
5439 (mips_cannot_store_register): Likewise.
5440 (the_low_target): Update .arch_setup, .num_regs and .regmap
5441 initializers. Add .regset_bitmap initializer.
5442 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5443 initializer.
5444 * linux-bfin-low.c (the_low_target): Likewise.
5445 * linux-cris-low.c (the_low_target): Likewise.
5446 * linux-crisv32-low.c (the_low_target): Likewise.
5447 * linux-ia64-low.c (the_low_target): Likewise.
5448 * linux-m32r-low.c (the_low_target): Likewise.
5449 * linux-m68k-low.c (the_low_target): Likewise.
5450 * linux-ppc-low.c (the_low_target): Likewise.
5451 * linux-s390-low.c (the_low_target): Likewise.
5452 * linux-sh-low.c (the_low_target): Likewise.
5453 * linux-sparc-low.c (the_low_target): Likewise.
5454 * linux-tic6x-low.c (the_low_target): Likewise.
5455 * linux-x86-low.c (the_low_target): Likewise.
5456 * linux-xtensa-low.c (the_low_target): Likewise.
5457 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5458 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5459 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5460 srv_xmlfiles.
5461 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5462 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5463
c03e6ccc
YQ
54642012-02-29 Yao Qi <yao@codesourcery.com>
5465 Pedro Alves <palves@redhat.com>
5466
5467 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5468 `step_over_finished' is true.
5469
644cebc9
PA
54702012-02-27 Pedro Alves <palves@redhat.com>
5471
5472 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5473 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5474
c14d7ab2
PA
54752012-02-27 Pedro Alves <palves@redhat.com>
5476
5477 PR server/9684
5478 * linux-low.c (pid_is_stopped): New.
5479 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5480
412c89dd
LM
54812012-02-25 Luis Machado <lgustavo@codesourcery.com>
5482
5483 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5484 of conditions.
5485
b745defe
MR
54862012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5487
5488 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5489
9f3a5c85
LM
54902012-02-24 Luis Machado <lgustavo@codesourcery>
5491
5492 * server.c (handle_query): Advertise support for target-side
5493 breakpoint condition evaluation.
5494 (process_point_options): New function.
5495 (process_serial_event): When inserting a breakpoint, check for
5496 a target-side condition that should be evaluated.
5497
5498 * mem-break.c: Include regcache.h and ax.h.
5499 (point_cond_list_t): New data structure.
5500 (breakpoint) <cond_list>: New field.
5501 (find_gdb_breakpoint_at): Make non-static.
5502 (delete_gdb_breakpoint_at): Clear any target-side
5503 conditions.
5504 (clear_gdb_breakpoint_conditions): New function.
5505 (add_condition_to_breakpoint): Likewise.
5506 (add_breakpoint_condition): Likewise.
5507 (gdb_condition_true_at_breakpoint): Likewise.
5508 (gdb_breakpoint_here): Return result directly instead
5509 of going through a local variable.
5510
5511 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5512 (clear_gdb_breakpoint_conditions): Likewise.
5513 (add_breakpoint_condition): Likewise.
5514 (gdb_condition_true_at_breakpoint): Likewise.
5515
5516 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5517 (need_step_over_p): Take target-side breakpoint condition into
5518 consideration.
5519
5e1dc496
LM
55202012-02-24 Luis Machado <lgustavo@codesourcery>
5521
5522 * server.h: Include tracepoint.h.
5523 (agent_mem_read, agent_get_trace_state_variable_value,
5524 agent_set_trace_state_variable_value,
5525 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5526 get_set_tsv_func_addr): New prototypes.
5527
5528 * ax.h: New include file.
5529 * ax.c: New source file.
5530
5531 * tracepoint.c: Include ax.h.
5532 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5533 agent_expr, eval_result_type): Move to ax.h.
5534 (parse_agent_expr): Rename to ...
5535 (gdb_parse_agent_expr): ... this, make it non-static and move
5536 to ax.h.
5537 (unparse_agent_expr) Rename to ...
5538 (gdb_unparse_agent_expr): ... this, make it non-static and move
5539 to ax.h.
5540 (eval_agent_expr): Rename to ...
5541 (eval_tracepoint_agent_expr): ... this.
5542 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5543 forward declarations.
5544 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5545 (agent_get_trace_state_variable_value): New function.
5546 (agent_set_trace_state_variable_value): New function.
5547 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5548 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5549 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5550 (condition_true_at_tracepoint): Likewise.
5551 (parse_agent_expr): Rename to ...
5552 (gdb_parse_agent_expr): ... this and move to ax.c.
5553 (unparse_agent_expr): Rename to ...
5554 (gdb_unparse_agent_expr): ... this and move to ax.c.
5555 (gdb_agent_op_name): Move to ax.c.
5556 (eval_agent_expr): Rename to ...
5557 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5558 and move to ax.c.
5559 (eval_tracepoint_agent_expr): New function.
5560 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 5561 non-static.
5e1dc496
LM
5562 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5563 ax.c.
5564 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5565 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5566 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5567 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5568 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5569 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5570 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5571 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5572 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5573 (compile_bytecodes): Remove forward declaration.
5574 (is_goto_target): Move to ax.c.
5575 (compile_bytecodes): Move to ax.c and call
5576 agent_get_trace_state_variable_value (...) and
5577 agent_set_trace_state_variable_value (...).
5578
5579 * Makefile.in: Update ax.c and IPA dependencies.
5580
277e4e52
PA
55812012-02-24 Pedro Alves <palves@redhat.com>
5582
5583 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5584 (cmd_bigqtbuffer_circular): ... this. Only handle
5585 'QTBuffer:circular:'.
5586 (handle_tracepoint_general_set): Adjust.
5587
bf4c19f7
YQ
55882012-02-16 Yao Qi <yao@codesourcery.com>
5589
5590 * inferiors.c: Move code to ...
5591 * dll.c: .... here. New.
5592 * server.h: Declare clear_dlls.
5593 * Makefile.in (SFILES): Add dll.c.
5594 (OBS): Add dll.o
5595 (dll.o): New rule.
5596
d73f2619
YQ
55972012-02-11 Yao Qi <yao@codesourcery.com>
5598
5599 * server.c: (handle_monitor_command): Add a new parameter
5600 `own_buf'.
5601 (handle_query): Update caller.
5602
f8255c2a
JB
56032012-02-09 Joel Brobecker <brobecker@adacore.com>
5604
5605 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5606 * configure, config.in: Regenerate.
5607 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5608 is not defined.
5609
da84f473
PA
56102012-02-02 Pedro Alves <palves@redhat.com>
5611
5612 Try SIGKILL first, then PTRACE_KILL.
5613 * linux-low.c (linux_kill_one_lwp): New.
5614 (linux_kill_one_lwp): Rename to ...
5615 (kill_one_lwp_callback): ... this. Use the new
5616 linux_kill_one_lwp.
5617
e886a173
PA
56182012-02-02 Pedro Alves <palves@redhat.com>
5619
5620 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5621 inferior.
5622
be07f1a2
PA
56232012-01-27 Pedro Alves <palves@redhat.com>
5624
5625 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5626 (elf_64_file_p): Make static.
5627 (linux_pid_exe_is_elf_64_file): New.
5628 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5629 Delete declarations.
5630 (linux_pid_exe_is_elf_64_file): Declare.
5631 * linux-x86-low.c (x86_arch_setup): Use
5632 linux_pid_exe_is_elf_64_file.
5633
d8301ad1
JK
56342012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5635
5636 * linux-low.c (linux_wait_for_event_1): Rename to ...
5637 (linux_wait_for_event): ... here and merge it with former
5638 linux_wait_for_event - new variable wait_ptid, use it.
5639 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5640
01b17894
PA
56412012-01-23 Pedro Alves <palves@redhat.com>
5642
5643 * server.c (main): Avoid yet another case of infinite loop while
5644 detaching/killing after a longjmp.
5645
e825046f
JK
56462012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5647
5648 Code cleanup.
5649 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5650
b9e7b9c3
UW
56512012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5652
5653 * hostio.c (handle_readlink): New function.
5654 (handle_vFile): Call it to handle "vFile:readlink" packets.
5655
901f9912
UW
56562012-01-20 Pedro Alves <palves@redhat.com>
5657 Ulrich Weigand <ulrich.weigand@linaro.org>
5658
5659 * server.c (handle_v_requests): Only support vAttach and vRun to
5660 start multiple processes when in extended protocol mode.
5661
fc1ab1a0
PA
56622012-01-17 Pedro Alves <palves@redhat.com>
5663
5664 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5665 memalign plus mprotect to allocate the scratch buffer.
5666
7d5d4e98
PA
56672012-01-13 Pedro Alves <palves@redhat.com>
5668
5669 * server.c (attach_inferior): Clear `cont_thread'.
5670
f128d5e9
PA
56712012-01-13 Pedro Alves <palves@redhat.com>
5672
5673 * server.c (main): Avoid infinite loop while detaching/killing
5674 after a longjmp.
5675
06db92f0
DE
56762012-01-09 Doug Evans <dje@google.com>
5677
5678 * server.c (start_inferior): Set last_ptid in --wrapper case.
5679
32d92999
YQ
56802012-01-06 Yao Qi <yao@codesourcery.com>
5681
5682 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5683 defined.
5684 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5685
5e0a92a9
YQ
56862012-01-04 Yao Qi <yao@codesourcery.com>
5687
5688 * tracepoint.c (cmd_qtdp): Print debug message
5689 for static tracepoint.
5690
ae639e8c
YQ
56912012-01-04 Yao Qi <yao@codesourcery.com>
5692
5693 * tracepoint.c (trace_vdebug): Differentiate debug message
5694 between gdbserver and IPA.
5695
f72429c5
YQ
56962012-01-03 Yao Qi <yao@codesourcery.com>
5697
5698 * tracepoint.c (tracepoint_was_hit): Don't collect for
5699 static tracepoint.
5700
12c3e59c
JB
57012012-01-02 Joel Brobecker <brobecker@adacore.com>
5702
5703 * terminal.h: Reformat copyright header.
5704
67827812
JB
57052012-01-02 Joel Brobecker <brobecker@adacore.com>
5706
5707 * server.c (gdbserver_version): Update copyright year.
5708 * gdbreplay.c (gdbreplay_version): Likewise.
5709
3e52c33d
JK
57102011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5711
5712 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5713
5714 Revert:
5715 2011-12-18 Hui Zhu <teawater@gmail.com>
5716 * linux-low.c (linux_create_inferior): Save return value to ret.
5717
66f1260e
HZ
57182011-12-18 Hui Zhu <teawater@gmail.com>
5719
5720 * linux-low.c (linux_create_inferior): Save return value to ret.
5721
e77616d7
DE
57222011-12-16 Doug Evans <dje@google.com>
5723
e7b06c57
DE
5724 * linux-low.c (linux_create_inferior): If stdio connection,
5725 redirect stdin from /dev/null, stdout to stderr.
5726 * remote-utils.c (remote_is_stdio): New static global.
5727 (remote_connection_is_stdio): New function.
5728 (remote_prepare): Handle stdio connection.
5729 (remote_open): Ditto.
5730 (remote_close): Don't close stdin for stdio connections.
5731 (read_prim,write_prim): New functions. Replace all calls to
5732 read/write to these.
5733 * server.c (main): Watch for "-" argument. Move call to
5734 remote_prepare before start_inferior.
5735 * server.h (STDIO_CONNECTION_NAME): New macro.
5736 (remote_connection_is_stdio): Declare.
5737
e77616d7
DE
5738 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5739 in debugging output.
5740
82067193
YQ
57412011-12-15 Yao Qi <yao@codesourcery.com>
5742
5743 * tracepoint.c: Include sys/syscall.h.
5744 (gdb_ust_thread): Remove preprocessor conditional.
5745
82bfbe7e
PA
57462011-12-14 Pedro Alves <pedro@codesourcery.com>
5747
5748 * linux-low.c (linux_detach_one_lwp): Call
5749 the_low_target.prepare_to_resume before detaching.
5750
712c6575
YQ
57512011-12-14 Yao Qi <yao@codesourcery.com>
5752
5753 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5754 of write.
5755
d54d1edf
YQ
57562011-12-14 Yao Qi <yao@codesourcery.com>
5757
5758 * i386-low.c (i386_low_stopped_data_address): Initialize local
5759 variable `control'.
5760
6210a125
PA
57612011-12-13 Pedro Alves <pedro@codesourcery.com>
5762
5763 PR remote/13492
5764
5765 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5766 DR_CONTROL unless necessary. Extend comments.
5767 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5768 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5769
2ece8244
YQ
57702011-12-13 Yao Qi <yao@codesourcery.com>
5771
5772 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5773 macros.
5774 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5775
784867a5
JK
57762011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5777
5778 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5779 Print new debug message for such case.
5780
6bf36717
JK
57812011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5782
5783 Fix overlapping memcpy.
5784 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5785 the read_inferior_memory transfer.
5786 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5787 write_inferior_memory transfer.
5788 (set_fast_tracepoint_jump): New variable buf. Use it for the
5789 read_inferior_memory and write_inferior_memory transfers.
5790 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5791 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5792 Use it for the write_inferior_memory transfer.
5793 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5794 buffers.
5795
50275556
MR
57962011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5797
5798 * linux-low.c (fetch_register, store_register): Make code
5799 consistent, fix formatting.
5800
7325beb4
MR
58012011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5802
5803 * linux-low.c (usr_store_inferior_registers): Factor out code
5804 to handle individual registers into...
5805 (store_register): ... this new function.
5806
c642a434
UW
58072011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5808
5809 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5810 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5811 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5812 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5813 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5814 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5815 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5816 (srv_xmlfiles): Add new XML files.
5817
5818 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5819 and <sys/uio.h>.
5820 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5821 (init_registers_s390_linux32v1): Add prototype.
5822 (init_registers_s390_linux32v2): Likewise.
5823 (init_registers_s390_linux64v1): Likewise.
5824 (init_registers_s390_linux64v2): Likewise.
5825 (init_registers_s390x_linux64v1): Likewise.
5826 (init_registers_s390x_linux64v2): Likewise.
5827 (s390_num_regs): Increment to 52.
5828 (s390_regmap): Add orig_r2 register.
5829 (s390_num_regs_3264): Increment to 68.
5830 (s390_regmap_3264): Add orig_r2 register.
5831 (s390_collect_ptrace_register): Handle orig_r2 register.
5832 (s390_supply_ptrace_register): Likewise.
5833 (s390_fill_last_break): New function.
5834 (s390_store_last_break): Likewise.
5835 (s390_fill_system_call): New function.
5836 (s390_store_system_call): Likewise.
5837 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5838 register sets.
5839 (s390_check_regset): New function.
5840 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5841 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5842 Update target_regsets for available register sets.
5843
2268b414
JK
58442011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5845 Jan Kratochvil <jan.kratochvil@redhat.com>
5846
5847 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5848 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5849 New.
5850 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5851 * linux-low.h (struct process_info_private): New member r_debug.
5852 * server.c (handle_qxfer_libraries): Call
5853 the_target->qxfer_libraries_svr4.
5854 (handle_qxfer_libraries_svr4): New function.
5855 (qxfer_packets): New entry "libraries-svr4".
5856 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5857 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5858 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5859 PACKET_qXfer_libraries_svr4.
5860
d6db1fab
UW
58612011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5862
5863 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5864 PSW address/mask between 8-byte and 16-byte formats.
5865 (s390_supply_ptrace_register): Likewise.
5866 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5867 basic addressing mode bit.
5868
242f5f1c
SS
58692011-11-24 Stan Shebs <stan@codesourcery.com>
5870
5871 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5872
f196051f
SS
58732011-11-17 Stan Shebs <stan@codesourcery.com>
5874
5875 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5876 (tracing_start_time): New global.
5877 (tracing_stop_time): New global.
5878 (tracing_user_name): New global.
5879 (tracing_notes): New global.
5880 (tracing_stop_note): New global.
5881 (cmd_qtstart): Set traceframe_usage, start_time.
5882 (stop_tracing): Set stop_time.
5883 (cmd_qtstatus): Report additional status.
5884 (cmd_qtp): New function.
5885 (handle_tracepoint_query): Call it.
5886 (cmd_qtnotes): New function.
5887 (handle_tracepoint_general_set): Call it.
5888 (get_timestamp): Rename from tsv_get_timestamp.
5889
405f8e94
SS
58902011-11-14 Stan Shebs <stan@codesourcery.com>
5891 Kwok Cheung Yeung <kcy@codesourcery.com>
5892
5893 * linux-x86-low.c (small_jump_insn): New.
5894 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5895 trampoline and error message, build a trampoline and issue a small
5896 jump instruction to it.
5897 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5898 trampoline and error message.
5899 (x86_get_min_fast_tracepoint_insn_len): New.
5900 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5901 * linux-low.h (struct linux_target_ops): Add arguments to
5902 install_fast_tracepoint_jump_pad operation, add new operation.
5903 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5904 arguments.
5905 (linux_get_min_fast_tracepoint_insn_len): New function.
5906 (linux_target_op): Add new operation.
5907 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5908 (gdb_trampoline_buffer_end): Ditto.
5909 (gdb_trampoline_buffer_error): Ditto.
5910 (struct ipa_sym_addresses): Add fields for new IPA variables.
5911 (symbol_list): Add entries for new IPA variables.
5912 (struct tracepoint): Add fields to hold the address range of the
5913 trampoline used by the tracepoint.
5914 (trampoline_buffer_head): New static variable.
5915 (trampoline_buffer_tail): Ditto.
5916 (claim_trampoline_space): New function.
5917 (have_fast_tracepoint_trampoline_buffer): New function.
5918 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5919 structure.
5920 (install_fast_tracepoint): Ditto, also add error buffer argument.
5921 (cmd_qtminftpilen): New function.
5922 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5923 (fast_tracepoint_from_trampoline_address): New function.
5924 (fast_tracepoint_collecting): Handle trampoline as part of jump
5925 pad space.
5926 (set_trampoline_buffer_space): New function.
5927 (initialize_tracepoint): Initialize new IPA variables.
5928 * target.h (struct target_ops): Add arguments to
5929 install_fast_tracepoint_jump_pad operation, add new
5930 get_min_fast_tracepoint_insn_len operation.
5931 (target_get_min_fast_tracepoint_insn_len): New.
5932 (install_fast_tracepoint_jump_pad): Add arguments.
5933 * server.h (IPA_BUFSIZ): Define.
5934 * linux-i386-ipa.c: Include extra header files.
5935 (initialize_fast_tracepoint_trampoline_buffer): New function.
5936 (initialize_low_tracepoint): Call it.
5937 * server.h (set_trampoline_buffer_space): Declare.
5938 (claim_trampoline_space): Ditto.
5939 (have_fast_tracepoint_trampoline_buffer): Ditto.
5940
1e4d1764
YQ
59412011-11-14 Yao Qi <yao@codesourcery.com>
5942
5943 * server.c (handle_query): Handle InstallInTrace for qSupported.
5944 * tracepoint.c (add_tracepoint): Sort list.
5945 (install_tracepoint, download_tracepoint): New.
5946 (cmd_qtdp): Call them to install and download tracepoints.
5947 (sort_tracepoints): Removed.
5948 (cmd_qtstart): Update.
5949
5c73ff4e
YQ
59502011-11-14 Yao Qi <yao@codesourcery.com>
5951
5952 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5953 * mem-break.h: Declare.
5954 * tracepoint.c (cmd_qtstart): Move some code to ...
5955 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5956 New.
5957 (download_tracepoints): Move some code to ...
5958 (download_tracepoint_1): ... here. New.
5959
86a30030
YQ
59602011-11-08 Yao Qi <yao@codesourcery.com>
5961
5962 * remote-utils.c (relocate_instruction): A comment fix.
5963
8d26e50c
JB
59642011-11-07 Joel Brobecker <brobecker@adacore.com>
5965
5966 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5967 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5968 dr_status_mirror and dr_control_mirror from debug_reg_state.
5969 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5970 (i386_initial_stuff): Remove use of deleted globals.
5971 (i386_get_thread_context, i386_set_thread_context,
5972 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5973 from debug_reg_state.
5974
a59306a3
YQ
59752011-11-05 Yao Qi <yao@codesourcery.com>
5976
5977 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5978 address as TPOINT's.
5979
3065dfb6
SS
59802011-11-02 Stan Shebs <stan@codesourcery.com>
5981
5982 * tracepoint.c (agent_mem_read_string): New function.
5983 (eval_agent_expr): Call it for tracenz.
5984 * server.c (handle_query): Report support for tracenz.
5985
fd0d8c7c
YQ
59862011-11-02 Yao Qi <yao@codesourcery.com>
5987
5988 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5989
609086b1
YQ
59902011-11-02 Yao Qi <yao@codesourcery.com>
5991
5992 * target.h: Fix a typo in comment.
5993
b9fd1791
PA
59942011-10-31 Pedro Alves <pedro@codesourcery.com>
5995
5996 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5997 clobber the breakpoints' shadows with fast tracepoint jumps.
5998 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5999 * target.c (write_inferior_memory): Also pass MYADDR down to
6000 check_mem_write.
6001
03583c20
UW
60022011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6003
6004 * configure.ac: Check support for personality routine.
6005 * configure: Regenerate.
6006 * config.in: Likewise.
6007 * linux-low.c: Include <sys/personality.h>.
6008 Define ADDR_NO_RANDOMIZE if necessary.
6009 (linux_create_inferior): Disable address space randomization when
6010 forking inferior, if requested.
6011 (linux_supports_disable_randomization): New function.
6012 (linux_target_ops): Install it.
6013 * server.h (disable_randomization): Declare.
6014 * server.c (disable_randomization): New global variable.
6015 (handle_general_set): Handle QDisableRandomization.
6016 (handle_query): Likewise for qSupported.
6017 (main): Support --disable-randomization and --no-disable-randomization
6018 command line arguments.
6019 * target.h (struct target_ops): Add supports_disable_randomization.
6020 (target_supports_disable_randomization): New macro.
6021
723b724b
MF
60222011-09-29 Mike Frysinger <vapier@gentoo.org>
6023
6024 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6025 ifdef check.
6026 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6027 [!PT_GETDSBT] (target_loadmap): New definition.
6028 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6029 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6030 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6031 and PT_GETDSBT to LINUX_LOADMAP.
6032 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6033 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6034
55329a5c 60352011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
6036
6037 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6038 (arm_linux_hwbp_cap): New static variable.
6039 (arm_linux_get_hwbp_cap): Replace by ...
6040 (arm_linux_init_hwbp_cap): ... this new function.
6041 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6042 (arm_linux_get_hw_watchpoint_count): Likewise.
6043 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6044 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6045 (arm_prepare_to_resume): Use perror_with_name instead of error.
6046
55329a5c 60472011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
6048
6049 * linux-arm-low.c: Include <signal.h>.
6050 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6051 (struct arm_linux_hwbp_cap): New data type.
6052 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6053 (struct arm_linux_hw_breakpoint): New data type.
6054 (MAX_BPTS, MAX_WPTS): Define.
6055 (struct arch_process_info, struct arch_lwp_info): New data types.
6056 (arm_linux_get_hwbp_cap): New function.
6057 (arm_linux_get_hw_breakpoint_count): Likewise.
6058 (arm_linux_get_hw_watchpoint_count): Likewise.
6059 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6060 (arm_hwbp_control_initialize): Likewise.
6061 (arm_hwbp_control_is_enabled): Likewise.
6062 (arm_hwbp_control_is_initialized): Likewise.
6063 (arm_hwbp_control_disable): Likewise.
6064 (arm_linux_hw_breakpoint_equal): Likewise.
6065 (arm_linux_hw_point_initialize): Likewise.
6066 (struct update_registers_data): New data structure.
6067 (update_registers_callback: New function.
6068 (arm_insert_point): Likewise.
6069 (arm_remove_point): Likewise.
6070 (arm_stopped_by_watchpoint): Likewise.
6071 (arm_stopped_data_address): Likewise.
6072 (arm_new_process): Likewise.
6073 (arm_new_thread): Likewise.
6074 (arm_prepare_to_resume): Likewise.
6075 (the_low_target): Register arm_insert_point, arm_remove_point,
6076 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6077 arm_new_thread, and arm_prepare_to_resume.
6078
6b9801d4
SS
60792011-09-15 Stan Shebs <stan@codesourcery.com>
6080
6081 * server.h (struct emit_ops): Add compare-goto fields.
6082 * tracepoint.c (gdb_agent_op_sizes): New table.
6083 (emit_eq_goto): New function.
6084 (emit_ne_goto): New function.
6085 (emit_lt_goto): New function.
6086 (emit_le_goto): New function.
6087 (emit_gt_goto): New function.
6088 (emit_ge_goto): New function.
6089 (is_goto_target): New function.
6090 (compile_bytecodes): Recognize special cases of compare-goto
6091 combinations and call specialized emitters for them.
6092 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6093 (amd64_emit_ne_goto): New function.
6094 (amd64_emit_lt_goto): New function.
6095 (amd64_emit_le_goto): New function.
6096 (amd64_emit_gt_goto): New function.
6097 (amd64_emit_ge_goto): New function.
6098 (amd64_emit_ops): Add the new functions.
6099 (i386_emit_eq_goto): New function.
6100 (i386_emit_ne_goto): New function.
6101 (i386_emit_lt_goto): New function.
6102 (i386_emit_le_goto): New function.
6103 (i386_emit_gt_goto): New function.
6104 (i386_emit_ge_goto): New function.
6105 (i386_emit_ops): Add the new functions.
6106
bf15cbda
SS
61072011-09-08 Stan Shebs <stan@codesourcery.com>
6108
6109 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6110 (i386_emit_epilogue): Restore %ebx.
6111
943ca1dd
JZ
61122011-08-31 Jie Zhang <jzhang918@gmail.com>
6113
6114 * server.c (step_thread): Remove definition.
6115 (process_serial_event): Don't handle Hs.
6116 * server.h (step_thread): Remove declaration.
6117 * target.c (set_desired_inferior): Remove use of step_thread.
6118
e3deef73
LM
61192011-08-24 Luis Machado <lgustavo@codesourcery.com>
6120
6121 * linux-low.c: Include linux-procfs.h.
6122 (linux_attach_lwp_1): Update comments.
6123 (linux_attach): Scan for existing threads when attaching to a
6124 process that is the tgid.
6125 * Makefile.in: Update dependencies.
6126
13da1c97
LM
61272011-08-24 Luis Machado <lgustavo@codesourcery.com>
6128
6129 * configure.srv: Add linux-procfs.o dependencies.
6130
881127c9
YQ
61312011-08-14 Yao Qi <yao@codesourcery.com>
6132
6133 * target.h (struct target_ops): Fix indent.
6134 * win32-low.c (win32_target_ops): Fix comment.
6135
58dbd541
YQ
61362011-08-14 Andrew Jenner <andrew@codesourcery.com>
6137 Yao Qi <yao@codesourcery.com>
6138
6139 * Makefile.in (clean): Remove tic6x-*.c files.
6140 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6141 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6142 (tic6x-c64xp-linux.c): Likewise.
6143 * configure.srv: Add support for tic6x-*-uclinux.
6144 * linux-tic6x-low.c: New.
6145 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6146
78d85199
YQ
61472011-08-14 Andrew Stubbs <ams@codesourcery.com>
6148 Yao Qi <yao@codesourcery.com>
6149
6150 * target.h (struct target_ops): Add read_loadmap.
6151 * linux-low.c (struct target_loadseg): New type.
6152 (struct target_loadmap): New type.
6153 (linux_read_loadmap): New function.
6154 (linux_target_ops): Add linux_read_loadmap.
6155 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
6156 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6157 to NULL.
78d85199 6158
a959a88d
EZ
61592011-08-05 Eli Zaretskii <eliz@gnu.org>
6160
6161 * win32-low.c: Include <stdint.h>.
6162
1ced966e
PA
61632011-07-22 Pedro Alves <pedro@codesourcery.com>
6164
6165 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6166 to the inferior here.
6167 (i386_remove_aligned_watchpoint): Ditto.
6168 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6169 fit part of the watchpoint in the debug registers.
6170 (i386_update_inferior_debug_regs): New.
6171 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6172 registers, and only update the inferior on success.
6173 (i386_low_remove_watchpoint): Ditto.
6174
d26e3629
KY
61752011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6176
6177 * linux-low.c (compare_ints, unique, list_threads, show_process,
6178 linux_core_of_thread): Delete.
6179 (linux_target_ops): Change linux_core_of_thread to
6180 linux_common_core_of_thread.
6181 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6182 * utils.c (malloc_failure): Change type of argument.
6183 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6184 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6185 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6186 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6187 (IPA_OBJS): Add common-utils-ipa.o.
6188 (ptid_h, linux_osdata_h): New macros.
6189 (server_h): Add common/common-utils.h, common/xml-utils.h,
6190 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6191 common/ptid.h.
6192 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6193 ptid.o, buffer.o): New rules.
6194 (linux-low.o): Add common/linux-osdata.h as a dependency.
6195 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6196 * configure.ac: Add AC_HEADER_DIRENT check.
6197 * config.in: Regenerate.
6198 * configure: Regenerate.
6199 * remote-utils.c (xml_escape_text): Delete.
6200 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6201 buffer_xml_printf): Move to common/buffer.c.
6202 * server.c (main): Remove call to initialize_inferiors.
6203 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6204 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6205 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6206 internal_error, gdb_assert, gdb_assert_fail): Delete.
6207 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6208 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6209 common/buffer.h.
6210 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6211 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6212 initialize_inferiors): Delete.
6213
2275a1a7
PA
62142011-07-20 Pedro Alves <pedro@codesourcery.com>
6215
6216 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6217 symbol error.
6218
0a5b1e09
PA
62192011-05-31 Pedro Alves <pedro@codesourcery.com>
6220
6221 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6222 assertion.
6223 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6224
6938fd34
YQ
62252011-05-26 Yao Qi <yao@codesourcery.com>
6226
6227 * Makefile.in (thread-db.o): Track dependence to
6228 common/gdb_thread_db.h.
6229 * thread-db.c: include gdb_thread_db.h from right place.
6230
b481f9e0
TT
62312011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6232
6233 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6234 __FILE__ and __LINE__ to internal_error.
6235
98a5dd13
DE
62362011-05-13 Doug Evans <dje@google.com>
6237
6238 * thread-db.c (try_thread_db_load_from_sdir): New function.
6239 (try_thread_db_load_from_dir): New function.
6240 (thread_db_load_search): Handle $sdir, ignore $pdir.
6241 Remove trying of system directories if search of
6242 libthread-db-search-path fails, that is now done via $sdir.
6243
d248b706
KY
62442011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6245
6246 * server.c (handle_query): Add EnableDisableTracepoints to the list
6247 of supported features.
43aaf8b6 6248 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 6249 tracepoints.
43aaf8b6
PA
6250 (cmd_qtenable_disable): New.
6251 (cmd_qtstart): Install tracepoints even if disabled.
6252 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6253 receiving a QTEnable or QTDisable packet.
6254 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6255 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6256 tracepoints.
6257 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 6258
84e578fb
DE
62592011-05-10 Doug Evans <dje@google.com>
6260
6261 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6262
71f55dd8
DE
62632011-05-04 Doug Evans <dje@google.com>
6264
6265 * linux-low.c (linux_join): Skip process lookup.
6266 * spu-low.c (spu_join): Ditto.
6267 * server.c (join_inferiors_callback): Delete.
6268 (process_serial_event): For 'D' packet (detach) call join_inferior
6269 directly.
6270
4d393d60
JM
62712011-05-04 Joseph Myers <joseph@codesourcery.com>
6272
6273 * README: Don't mention xscale*-*-linux*.
6274 * configure.srv (xscale*-*-linux*): Don't handle target.
6275
b00ad6ff
NF
62762011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6277
6278 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6279 casting pointers.
6280 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6281 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6282 (i386_emit_void_call_2): Likewise.
6283
af96c192
YQ
62842011-04-26 Yao Qi <yao@codesourcery.com>
6285
43aaf8b6
PA
6286 * linux-low.c: Move common macros to linux-ptrace.h.
6287 Include linux-ptrace.h.
af96c192
YQ
6288 * Makefile.in (linux_ptrace_h): New.
6289 (linux-low.o): Depends on linux-ptrace.h.
6290
03f2bd59
JK
62912011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6292
6293 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6294 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6295 (remote_prepare): New function with most of the TCP code from ...
6296 (remote_open): ... here. Detect PORT here unconditionally. Move also
6297 setting transport_is_reliable.
6298 * server.c (run_once): New variable.
6299 (gdbserver_usage): Document it.
6300 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6301 the first run if RUN_ONCE.
6302 * server.h (run_once, remote_prepare): New declarations.
6303
7a9dd1b2
TT
63042011-04-19 Tom Tromey <tromey@redhat.com>
6305
6306 * win32-low.c (handle_load_dll): Remove duplicate "the".
6307
81239425
PM
63082011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6309
6310 Remove support for old Cygwin 1.5 versions.
6311 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6312 function to avoid warning.
6313 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6314 warning.
6315
9e0627f1
PM
63162011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6317
6318 * gdbserver/server.h (Macro _): Define it if not available.
6319
588eebee
MS
63202011-03-14 Michael Snyder <msnyder@vmware.com>
6321
348af9f7 6322 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 6323
43f70d4c
JB
63242011-03-10 Joel Brobecker <brobecker@adacore.com>
6325
6326 * Makefile.in (maintainer-clean realclean distclean): Remove
6327 "make ... subdir_do" command.
6328
348af9f7
MS
63292011-03-10 Michael Snyder <msnyder@vmware.com>
6330
6331 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6332
6333 * server.c (handle_v_run): Free alloced buffer on early return.
6334
e637a4f5
YQ
63352011-03-09 Yao Qi <yao@codesourcery.com>
6336
6337 Revert:
6338 2011-03-04 Yao Qi <yao@codesourcery.com>
6339
6340 * Makefile.in: Remove GNU make feature --directory.
6341
6342 2011-03-05 Yao Qi <yao@codesourcery.com>
6343
6344 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6345 (subdir_do): New make target. Copied from gdb/Makefile.
6346 (maintainer-clean, realclean, distclean, clean): Call corresponding
6347 make targets in common/Makefile.
6348
6349 2011-02-11 Yao Qi <yao@codesourcery.com>
6350
6351 * configure.ac: Call AC_PROG_RANLIB.
6352 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6353 * configure: Regenerate.
6354
e6edda56
JK
63552011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6356
6357 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6358
e5141119
JB
63592011-03-06 Yao Qi <yao@codesourcery.com>
6360
6361 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6362
64794aa4
JB
63632011-03-05 Yao Qi <yao@codesourcery.com>
6364
6365 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6366 (subdir_do): New make target. Copied from gdb/Makefile.
6367 (maintainer-clean, realclean, distclean, clean): Call corresponding
6368 make targets in common/Makefile.
6369
7a762829
YQ
63702011-03-04 Yao Qi <yao@codesourcery.com>
6371
6372 * Makefile.in: Remove GNU make feature --directory.
6373
348af9f7
MS
63742011-03-04 Michael Snyder <msnyder@vmware.com>
6375
6376 * server.c (queue_stop_reply): Call xmalloc not malloc.
6377
63782011-03-02 Michael Snyder <msnyder@vmware.com>
6379
6380 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6381
9f72fee2
MS
63822011-02-28 Michael Snyder <msnyder@vmware.com>
6383
588eebee
MS
6384 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6385 (cmd_qtframe): Ditto.
6386 (cmd_qtbuffer): Ditto.
6387 (cmd_bigqtbuffer): Ditto.
6388
9f72fee2
MS
6389 * utils.c (decimal2str): Initialize 'width' to nine, then
6390 don't mess with it.
6391
8040bd49
UW
63922011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6393
6394 * hostio.c (require_data): Free *data, not data.
6395
7e52cbd0
JK
63962011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6397
6398 * hostio.c (require_data): Use free, not xfree.
6399
9130f83e
MS
64002011-02-27 Michael Snyder <msnyder@vmware.com>
6401
4b812f4e
MS
6402 * server.c (handle_query): Discard unused value.
6403
9130f83e
MS
6404 * hostio.c (require_data): Free malloc memory before returning
6405 error.
6406
69d37113
MS
64072011-02-26 Michael Snyder <msnyder@vmware.com>
6408
6409 * linux-low.c (list_threads): Call closedir for dirent.
6410
35f5825a
MS
64112011-02-27 Michael Snyder <msnyder@vmware.com>
6412
2a589cef
MS
6413 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6414 a case statement falls through.
6415
0adea5f7
MS
6416 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6417
35f5825a
MS
6418 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6419 in comparison.
6420
238f1c74
MS
64212011-02-26 Michael Snyder <msnyder@vmware.com>
6422
6423 * utils.c (decimal2str): Eliminate dead code and dead param.
6424 (pulongest): Drop dead param from call to decimal2str.
6425 (plongest): Ditto.
6426
633ff500
JB
64272011-02-24 Joel Brobecker <brobecker@adacore.com>
6428
6429 Revert the following patch (not approved yet):
6430 2011-02-21 Hui Zhu <teawater@gmail.com>
6431 * tracepoint.c (tp_printf): New function.
6432 (eval_agent_expr): Handle gdb_agent_op_printf.
6433
f9c6ff72
HZ
64342011-02-21 Hui Zhu <teawater@gmail.com>
6435
6436 * tracepoint.c (tp_printf): New function.
6437 (eval_agent_expr): Handle gdb_agent_op_printf.
6438
94d5e490
TT
64392011-02-18 Tom Tromey <tromey@redhat.com>
6440
6441 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6442 (tracepoint.o): Likewise.
6443 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6444 (gdb_agent_op_names): Likewise.
6445
c7f96d2b
TT
64462011-02-18 Tom Tromey <tromey@redhat.com>
6447
6448 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6449 gdb_agent_op_rot>: New constants.
6450 (gdb_agent_op_names): Add pick and roll.
6451 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6452 cases.
6453
0feedb2c
JK
64542011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6455
6456 * aclocal.m4: Regenerated with aclocal-1.11.1.
6457
b3b9301e
PA
64582011-02-14 Pedro Alves <pedro@codesourcery.com>
6459
6460 * server.c (handle_qxfer_traceframe_info): New.
6461 (qxfer_packets): Register "traceframe-info".
6462 (handle_query): Report support for qXfer:traceframe-info:read+.
6463 * tracepoint.c (match_blocktype): New.
6464 (traceframe_find_block_type): Rename to ...
6465 (traceframe_walk_blocks): ... this. Add callback filter argument,
6466 and use it.
6467 (traceframe_find_block_type): New, reimplemented on top of
6468 traceframe_walk_blocks.
6469 (build_traceframe_info_xml): New.
6470 (traceframe_read_info): New.
6471 * server.h (traceframe_read_info): Declare.
6472
4f3e6fb7
YQ
64732011-02-11 Yao Qi <yao@codesourcery.com>
6474
6475 * configure.ac: Call AC_PROG_RANLIB.
6476 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6477 * configure: Regenerate.
6478
764880b7
PA
64792011-02-07 Pedro Alves <pedro@codesourcery.com>
6480
6481 * server.c (gdb_read_memory): Change return semantics to allow
6482 partial transfers.
6483 (handle_search_memory_1): Adjust.
6484 (process_serial_event) <'m' packet>: Handle partial transfers.
6485 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6486
1c79eb8a
PA
64872011-01-28 Pedro Alves <pedro@codesourcery.com>
6488
6489 * regcache.c (init_register_cache): Initialize
6490 regcache->register_status.
6491 (free_register_cache): Release regcache->register_status.
6492 (regcache_cpy): Copy register_status.
6493 (registers_to_string): Print 'x's for unavailable registers.
6494 (supply_register): Mark the register's status valid or
6495 unavailable, depending on whether a buffer was passed in or not.
6496 (supply_register_zeroed): New.
6497 (supply_regblock): Mark the registers' status valid or
6498 unavailable, depending on whether a buffer was passed in or not.
6499 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6500 (struct regcache): New `register_status' field.
6501 (supply_register_zeroed): Declare.
6502 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6503 supply_register_zeroed, rather than passing a NULL buffer to
6504 supply_register.
6505 * tracepoint.c (fetch_traceframe_registers): Update comment.
6506
85724a0e
PA
65072011-01-28 Pedro Alves <pedro@codesourcery.com>
6508
6509 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6510 buffer explicit.
6511
d08aafef
PA
65122011-01-25 Pedro Alves <pedro@codesourcery.com>
6513
6514 * server.h (decode_xfer_write): Change prototype.
6515 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6516 and don't extract the annex here.
6517 * server.c (decode_xfer_read): Remove `annex' parameter,
6518 and don't extract the annex here.
6519 (decode_xfer): New.
6520 (struct qxfer): New.
6521 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6522 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6523 (handle_qxfer_statictrace): New functions, abstracted out from
6524 handle_query, and made to use the struct qxfer interface.
6525 (handle_threads_qxfer_proper): Rename to ...
6526 (handle_qxfer_threads_proper): ... this.
6527 (handle_threads_qxfer): Rename to ...
6528 (handle_qxfer_threads): ... this. Adjust.
6529 (qxfer_packets): New array.
6530 (handle_qxfer): New function.
6531 (handle_query): Use handle_qxfer.
6532
493e2a69
MS
65332011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6534
6535 * gdbreplay.c: Shorten lines of >= 80 columns.
6536 * linux-low.c: Ditto.
6537 * linux-ppc-low.c: Ditto.
6538 * linux-s390-low.c: Ditto.
6539 * linux-sparc-low.c: Ditto.
6540 * linux-x86-low.c: Ditto.
6541 * linux-xtensa-low.c: Ditto.
6542 * mem-break.c: Ditto.
6543 * nto-low.c: Ditto.
6544 * regcache.h: Ditto.
6545 * remote-utils.c: Ditto.
6546 * server.c: Ditto.
6547 * server.h: Ditto.
6548 * thread-db.c: Ditto.
6549 * tracepoint.c: Ditto.
6550 * utils.c: Ditto.
6551 * win32-low.h: Ditto.
6552
44944448
JB
65532011-01-05 Joel Brobecker <brobecker@adacore.com>
6554
6555 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6556 update.
6557
71ce852c
JB
65582011-01-01 Joel Brobecker <brobecker@adacore.com>
6559
6560 * server.c (gdbserver_version): Update copyright year in version
6561 output.
6562 * gdbreplay.c (gdbreplay_version): Ditto.
6563
eb826dc6
MF
65642010-12-29 Jie Zhang <jie.zhang@analog.com>
6565
6566 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6567 * linux-bfin-low.c: New file.
6568 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6569 PT_DATA_ADDR for BFIN targets.
6570 * Makefile.in (SFILES): Add linux-bfin-low.c.
6571 (clean): Remove reg-bfin.c.
6572 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6573 * README: Mention supported Blackfin targets.
6574
39ab222a
MF
65752010-12-23 Mike Frysinger <vapier@gentoo.org>
6576
6577 * .gitignore: New file.
6578
a1f2ce7d
MF
65792010-11-16 Mike Frysinger <vapier@gentoo.org>
6580
6581 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6582
f474844c
JZ
65832010-10-22 Jie Zhang <jie@codesourcery.com>
6584
6585 * Makefile.in: Add FLAGS_TO_PASS variable.
6586 (install): Remove dependency of install-only and recursively
6587 invoke make for install-only.
6588
f1048712
DE
65892010-10-04 Doug Evans <dje@google.com>
6590
6591 * Makefile.in (uninstall): Use $(DESTDIR).
6592
b53a1623
PA
65932010-09-24 Pedro Alves <pedro@codesourcery.com>
6594
e6ee044d
PA
6595 PR gdb/11842
6596
b53a1623
PA
6597 * linux-x86-low.c (compat_siginfo_from_siginfo)
6598 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6599 si_code is < 0. Check for si_code == SI_TIMER before checking for
6600 si_code < 0.
6601
fa1bd1e4
JB
66022010-09-13 Joel Brobecker <brobecker@adacore.com>
6603
6604 * lynx-i386-low.c: New file.
6605 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6606
47fac8f8
JB
66072010-09-13 Joel Brobecker <brobecker@adacore.com>
6608
6609 * lynx-low.c (ptrace_request_to_str): Remove handling for
6610 request values that have been removed in LynxOS 5.x.
6611
1adfc54d
JB
66122010-09-13 Joel Brobecker <brobecker@adacore.com>
6613
6614 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6615 <ptrace.h>
6616
c2a66c29
NS
66172010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6618
6619 * configure.ac: Add --enable-inprocess-agent option.
6620 * configure: Rebuilt.
6621
32fcada3
YQ
66222010-09-06 Yao Qi <yao@codesourcery.com>
6623
6624 * linux-low.c (linux_kill): Remove unused variable.
6625 (linux_stabilize_threads): Likewise.
6626 * server.c (start_inferior): Likewise.
6627 (queue_stop_reply_callback): Likewise.
6628 * tracepoint.c (do_action_at_tracepoint): Likewise.
6629
0cccb683
YQ
66302010-09-06 Yao Qi <yao@codesourcery.com>
6631
6632 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6633 on return.
6634
423ec54c
JK
66352010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6636
6637 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6638
12ac6819
PA
66392010-09-06 Pedro Alves <pedro@codesourcery.com>
6640
6641 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6642 "$(IPA_DEPFILES)".
6643
8ed54b31
JB
66442010-09-01 Joel Brobecker <brobecker@adacore.com>
6645
6646 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6647 gdbserver/lynx-ppc-low.c: New files.
6648 * Makefile.in (lynx_low_h): New variable.
6649 (lynx-low.o, lynx-ppc-low.o): New rules.
6650 * configure.ac: On LynxOS, link with -lnetinet.
6651 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6652 * configure: regenerate.
6653
bb0116a4
JB
66542010-09-01 Joel Brobecker <brobecker@adacore.com>
6655
6656 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6657 * configure.ac: Add check for vasprintf and vsnprintf.
6658 * configure, config.in: Regenerate.
6659 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6660
a778ab81 66612010-09-01 Joel Brobecker <brobecker@adacore.com>
6662
6663 * gdbreplay.c: Move include of alloca.h up, next to include of
6664 malloc.h.
6665 * server.h: Add include of malloc.h.
6666 * mem-break.c: Remove include of malloc.h.
6667 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6668
8b034a19 66692010-09-01 Joel Brobecker <brobecker@adacore.com>
6670
6671 * Makefile.in (memmem.o): Build with -Wno-error.
6672
66732010-09-01 Joel Brobecker <brobecker@adacore.com>
6674
6675 * utils.c (xsnprintf): Make non-static.
6676 * server.h: Add xsnprintf declaration.
6677 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6678 replace calls to snprintf by calls to xsnprintf throughout.
6679
66802010-09-01 Joel Brobecker <brobecker@adacore.com>
6681
6682 * configure.ac: Add configure check for alloca.
6683 * configure, config.in: Regenerate.
6684 * server.h: Include alloca.h if it exists.
6685 * gdbreplay.c: Include alloca.h if it exists.
6686
1a981360
PA
66872010-08-28 Pedro Alves <pedro@codesourcery.com>
6688
6689 * linux-low.c (__SIGRTMIN): Define if not already defined.
6690 (linux_create_inferior): Check for __ANDROID__ rather than
6691 __SIGRTMIN.
6692 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6693 are already deferred.
6694 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6695 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6696 stopped and already has a pending signal to report.
6697 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6698 a pending signal to report or is moving out of a jump pad.
6699 (linux_init_signals): Check for __ANDROID__ rather than
6700 __SIGRTMIN.
6701
b4d51a55
PA
67022010-08-28 Pedro Alves <pedro@codesourcery.com>
6703
6704 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6705 debug_threads check. Avoid a linear search when not doing debug
6706 output.
6707
ec48365d
PA
67082010-08-27 Pedro Alves <pedro@codesourcery.com>
6709
6710 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6711 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6712 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6713 (process_event): Change local fd's type to gdb_fildes_t.
6714 (create_file_handler): Adjust prototype.
6715 (delete_file_handler): Adjust prototype.
6716 (handle_file_event): Adjust prototype. Use pfildes.
6717 (create_file_event): Adjsut prototype.
6718 * remote-utils.c (remote_desc, listen_desc): Change type to
6719 gdb_fildes_t.
6720 * server.h: New gdb_fildes_t typedef.
6721 [USE_WIN32API]: Include winsock2.h.
6722 (delete_file_handler, add_file_handler): Adjust prototypes.
6723 (pfildes): Declare.
6724 * utils.c (pfildes): New.
6725
854d88f0
PA
67262010-08-27 Pedro Alves <pedro@codesourcery.com>
6727
6728 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6729 * configure: Regenerate.
6730
0146f85b
PA
67312010-08-27 Pedro Alves <pedro@codesourcery.com>
6732
6733 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6734 (linux_done_accessing_memory): ... this.
6735 (linux_target_ops): Adjust.
6736 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6737 * nto-low.c (nto_target_ops): Adjust comment.
6738 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6739 * spu-low.c (spu_target_ops): Adjust comment.
6740 * target.h (target_ops): Rename unprepare_to_access_memory field
6741 to done_accessing_memory.
6742 (unprepare_to_access_memory): Rename to ...
6743 (done_accessing_memory): ... this.
6744
90d74c30
PA
67452010-08-26 Pedro Alves <pedro@codesourcery.com>
6746
6747 * linux-low.c (linux_prepare_to_access_memory): New.
6748 (linux_unprepare_to_access_memory): New.
6749 (linux_target_ops): Install them.
6750 * server.c (read_memory): Rename to ...
6751 (gdb_read_memory): ... this. Use
6752 prepare_to_access_memory/prepare_to_access_memory.
6753 (write_memory): Rename to ...
6754 (gdb_write_memory): ... this. Use
6755 prepare_to_access_memory/prepare_to_access_memory.
6756 (handle_search_memory_1): Adjust.
6757 (process_serial_event): Adjust.
6758 * target.h (struct target_ops): New fields
6759 prepare_to_access_memory and unprepare_to_access_memory.
6760 (prepare_to_access_memory, unprepare_to_access_memory): New.
6761 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6762 prepare_to_access_memory/prepare_to_access_memory.
6763 * nto-low.c (nto_target_ops): Adjust.
6764 * spu-low.c (spu_target_ops): Adjust.
6765 * win32-low.c (win32_target_ops): Adjust.
6766
fd467969
PA
67672010-08-26 Pedro Alves <pedro@codesourcery.com>
6768
6769 * Makefile.in (WARN_CFLAGS): Get it from configure.
6770 (WERROR_CFLAGS): New.
6771 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6772 * configure.ac: Introduce --enable-werror, which adds -Werror to
6773 the compiler command line. Enabled by default. Disable with
6774 --disable-werror. Add -Wdeclaration-after-statement
6775 Wpointer-arith and -Wformat-nonliteral to warning flags.
6776 * configure: Regenerate.
6777
331e2f5f
PA
67782010-08-26 Pedro Alves <pedro@codesourcery.com>
6779
6780 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6781
e581f2b4
PA
67822010-08-26 Pedro Alves <pedro@codesourcery.com>
6783
6784 * gdbreplay.c (remote_error): New.
6785 (gdbchar): New.
6786 (expect): Use gdbchar. Check for error reading from GDB.
6787 Clarify sync error output.
6788 (play): Check for errors writing to GDB.
6789 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6790 * remote-utils.c (getpkt): Check for errors writing to the remote
6791 descriptor.
6792
3c11dd79
PA
67932010-08-25 Pedro Alves <pedro@codesourcery.com>
6794
6795 * linux-low.c (linux_wait_1): Move non-debugging code out of
6796 `debug_threads' control.
6797
d20a8ad9
PA
67982010-08-25 Pedro Alves <pedro@codesourcery.com>
6799
6800 * linux-low.c (linux_wait_1): Don't set last_status here.
6801 * server.c (push_event, queue_stop_reply_callback): Assert we're
6802 not pushing a TARGET_WAITKIND_IGNORE event.
6803 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6804 (myresume, handle_target_event): Set the thread's last_resume_kind
6805 and last_status from the target returned status.
6806
964e4306
PA
68072010-08-25 Pedro Alves <pedro@codesourcery.com>
6808
6809 PR threads/10729
6810
6811 * linux-x86-low.c (update_debug_registers_callback): New.
6812 (i386_dr_low_set_addr): Use it.
6813 (i386_dr_low_get_addr): New.
6814 (i386_dr_low_set_control): Use update_debug_registers_callback.
6815 (i386_dr_low_get_control): New.
6816 (i386_dr_low_get_status): Adjust.
6817 * linux-low.c (linux_stop_lwp): New.
6818 * linux-low.h (linux_stop_lwp): Declare.
6819
6820 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6821 argument instead of a i386_debug_reg_state.
6822 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6823 a i386_debug_reg_state.
6824 (i386_insert_aligned_watchpoint): Adjust.
6825 (i386_remove_aligned_watchpoint): Adjust.
6826 (i386_low_stopped_data_address): Read the debug registers from the
6827 inferior instead of from the mirrors.
6828 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6829 (i386_dr_low_get_addr): Declare.
6830 (i386_dr_low_get_control): Declare.
6831 (i386_dr_low_get_status): Change prototype.
6832
6833 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6834 (i386_dr_low_get_addr): New.
6835 (i386_dr_low_get_control): New.
6836 (i386_dr_low_get_status): Adjust prototype. Return
6837 dr_status_mirror.
6838 (i386_initial_stuff): Clear dr_status_mirror and
6839 dr_control_mirror.
6840 (i386_get_thread_context): Adjust.
6841 (i386_set_thread_context): Adjust.
6842 (i386_thread_added): Adjust.
6843
5f21a75b
PA
68442010-08-24 Pedro Alves <pedro@codesourcery.com>
6845
6846 * linux-low.h (linux_thread_area): Delete declaration.
6847
3e4c1235
TS
68482010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6849
6850 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6851 after its termination.
6852
1971b033
PA
68532010-08-09 Pedro Alves <pedro@codesourcery.com>
6854
6855 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6856 (gdb_wants_all_stopped): Delete.
6857 (linux_wait_1): Don't call them.
6858 * server.c (handle_v_cont): Tag all threads as want-stopped.
6859 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6860 stopped as "client-wants-stopped".
6861
310444ac
PA
68622010-07-31 Pedro Alves <pedro@codesourcery.com>
6863
6864 * Makefile.in (signals_h): New.
6865 (server_h): Depend on it.
6866 (server.o): Don't depend on $(signals_def).
6867 (signals.o): Depend on $(signals_def).
6868
a19cae16
JK
68692010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6870
6871 * Makefile.in (signals_def): New.
6872 (server_h): Append include/gdb/signals.h and signals_def.
6873 (server.o): Append signals_def.
6874
30d50328
JK
68752010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6876
6877 * server.c (handle_target_event): Use target_signal_to_host for
6878 resume_info.sig initialization.
6879 * target.h (struct thread_resume) <sig>: New comment.
6880
5c3216e2
OS
68812010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6882
c6f46ca0
OS
6883 * server.c (handle_query): strcpy() the returned string from paddress()
6884 instead of sprintf().
5c3216e2
OS
6885 * utils.c (paddress): Return phex_nz().
6886
6bd31874
JB
68872010-07-07 Joel Brobecker <brobecker@adacore.com>
6888
6889 * server.c (handle_v_cont): Call mourn_inferior if process
6890 just exited.
6891 (myresume): Likewise.
6892
0fb4aa4b
PA
68932010-07-01 Pedro Alves <pedro@codesourcery.com>
6894
6895 Static tracepoints, and integration with UST.
6896
6897 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6898 * mem-break.c (uninsert_all_breakpoints)
6899 (reinsert_all_breakpoints): New.
6900 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6901 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6902 (gdb_agent_ust_loaded, helper_thread_id)
6903 (gdb_agent_helper_thread_id): New macros.
6904 (struct ipa_sym_addresses): Add addr_ust_loaded,
6905 addr_helper_thread_id, addr_cmd_buf.
6906 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6907 (in_process_agent_loaded_ust): New.
6908 (write_e_ust_not_loaded): New.
6909 (maybe_write_ipa_ust_not_loaded): New.
6910 (struct collect_static_trace_data_action): New.
6911 (enum tracepoint_type) <static_tracepoint>: New.
6912 (struct tracepoint) <handle>: Mention static tracepoints.
6913 (struct static_tracepoint_ctx): New.
6914 (CMD_BUF_SIZE): New.
6915 (add_tracepoint_action): Handle static tracepoint actions.
6916 (unprobe_marker_at): New.
6917 (clear_installed_tracepoints): Handle static tracepoints.
6918 (cmd_qtdp): Handle static tracepoints.
6919 (probe_marker_at): New.
6920 (cmd_qtstart): Handle static tracepoints.
6921 (response_tracepoint): Handle static tracepoints.
6922 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6923 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6924 (get_context_regcache): Handle static tracepoints.
6925 (do_action_at_tracepoint): Handle static tracepoint actions.
6926 (traceframe_find_block_type): Handle static trace data blocks.
6927 (traceframe_read_sdata): New.
6928 (download_tracepoints): Download static tracepoint actions.
6929 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6930 (GDB_PROBE_NAME): New.
6931 (ust_ops): New.
6932 (GET_UST_SYM): New.
6933 (USTF): New.
6934 (dlsym_ust): New.
6935 (ust_marker_to_static_tracepoint): New.
6936 (gdb_probe): New.
6937 (collect_ust_data_at_tracepoint): New.
6938 (gdb_ust_probe): New.
6939 (UNIX_PATH_MAX, SOCK_DIR): New.
6940 (gdb_ust_connect_sync_socket): New.
6941 (resume_thread, stop_thread): New.
6942 (run_inferior_command): New.
6943 (init_named_socket): New.
6944 (gdb_ust_socket_init): New.
6945 (cstr_to_hexstr): New.
6946 (next_st): New.
6947 (first_marker, next_marker): New.
6948 (response_ust_marker): New.
6949 (cmd_qtfstm, cmd_qtsstm): New.
6950 (unprobe_marker_at, probe_marker_at): New.
6951 (cmd_qtstmat, gdb_ust_thread): New.
6952 (gdb_ust_init): New.
6953 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6954 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6955 (ST_REGENTRY): New.
6956 (x86_64_st_collect_regmap): New.
6957 (X86_64_NUM_ST_COLLECT_GREGS): New.
6958 (AMD64_RIP_REGNUM): New.
6959 (supply_static_tracepoint_registers): New.
6960 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6961 (ST_REGENTRY): New.
6962 (i386_st_collect_regmap): New.
6963 (i386_NUM_ST_COLLECT_GREGS): New.
6964 (supply_static_tracepoint_registers): New.
6965 * server.c (handle_query): Handle qXfer:statictrace:read.
6966 <qSupported>: Report support for StaticTracepoints, and
6967 qXfer:statictrace:read features.
6968 * server.h (traceframe_read_sdata)
6969 (supply_static_tracepoint_registers): Declare.
6970 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6971 (unpack_varlen_hex): Include in IPA build.
6972 * Makefile.in (ustlibs, ustinc): New.
6973 (IPA_OBJS): Add remote-utils-ipa.o.
6974 ($(IPA_LIB)): Link -ldl and -lpthread.
6975 (UST_CFLAGS): New.
6976 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6977 * config.in, configure: Regenerate.
6978
9e4344e5
PA
69792010-06-20 Ian Lance Taylor <iant@google.com>
6980 Pedro Alves <pedro@codesourcery.com>
6981
6982 * linux-x86-low.c (always_true): Delete.
6983 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6984 trying to fool the compiler with always_true.
6985
c6beb2cb
PA
69862010-06-20 Pedro Alves <pedro@codesourcery.com>
6987
6988 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6989 conditions in gdbserver.
6990
d2ed6730
UW
69912010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6992
6993 * spu-low.c (spu_read_memory): Wrap around local store limit.
6994 (spu_write_memory): Likewise.
6995
4e29fb54
PA
69962010-06-15 Pedro Alves <pedro@codesourcery.com>
6997
6998 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6999 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7000 LONGEST uses.
7001 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7002 uses.
7003 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7004 uses with LONGEST uses.
7005
6a271cae
PA
70062010-06-14 Stan Shebs <stan@codesourcery.com>
7007 Pedro Alves <pedro@codesourcery.com>
7008
7009 Bytecode compiler.
7010
7011 * linux-x86-low.c: Include limits.h.
7012 (add_insns): New.
7013 (always_true): New.
7014 (EMIT_ASM): New.
7015 (EMIT_ASM32): New.
7016 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7017 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7018 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7019 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7020 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7021 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7022 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7023 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7024 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7025 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7026 (amd64_emit_void_call_2): New.
7027 (amd64_emit_ops): New.
7028 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7029 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7030 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7031 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7032 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7033 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7034 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7035 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7036 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7037 (i386_emit_stack_adjust, i386_emit_int_call_1)
7038 (i386_emit_void_call_2): New.
7039 (i386_emit_ops): New.
7040 (x86_emit_ops): New.
7041 (the_low_target): Install x86_emit_ops.
7042 * server.h (struct emit_ops): New.
7043 (get_raw_reg_func_addr): Declare.
7044 (current_insn_ptr, emit_error): Declare.
7045 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7046 (set_trace_state_variable_value): New defines.
7047 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7048 addr_get_trace_state_variable_value and
7049 addr_set_trace_state_variable_value.
7050 (symbol_list): New fields for get_raw_reg,
7051 get_trace_state_variable_value and set_trace_state_variable_value.
7052 (condfn): New typedef.
7053 (struct tracepoint): New field `compiled_cond'.
7054 (do_action_at_tracepoint): Clear compiled_cond.
7055 (get_trace_state_variable_value, set_trace_state_variable_value):
7056 Export in the IPA.
7057 (condition_true_at_tracepoint): If there's a compiled condition,
7058 run that.
7059 (current_insn_ptr, emit_error): New globals.
7060 (struct bytecode_address): New.
7061 (get_raw_reg_func_addr): New.
7062 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7063 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7064 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7065 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7066 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7067 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7068 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7069 (compile_tracepoint_condition, compile_bytecodes): New.
7070 * target.h (emit_ops): Forward declare.
7071 (struct target_ops): New field emit_ops.
7072 (target_emit_ops): New.
7073 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7074 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7075 * linux-low.c (linux_emit_ops): New.
7076 (linux_target_ops): Install it.
7077 * linux-low.h (struct linux_target_ops): New field emit_ops.
7078
92b72907
UW
70792010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7080
7081 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7082 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7083
fa593d66
PA
70842010-06-01 Pedro Alves <pedro@codesourcery.com>
7085 Stan Shebs <stan@codesourcery.com>
7086
7087 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7088 (all): Depend on $(extra_libraries).
7089 (install-only): Install the IPA.
7090 (IPA_OBJS, IPA_LIB): New.
7091 (clean): Remove the IPA lib.
7092 (IPAGENT_CFLAGS): New.
7093 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7094 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7095 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7096 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7097 * configure.ac: Check for atomic builtins support in the compiler.
7098 (IPA_DEPFILES, extra_libraries): Define.
7099 * configure.srv (ipa_obj): Add description.
7100 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7101 (i[34567]86-*-linux*): Set ipa_obj.
7102 (x86_64-*-linux*): Set ipa_obj.
7103 * linux-low.c (stabilizing_threads): New.
7104 (supports_fast_tracepoints): New.
7105 (linux_detach): Stabilize threads before detaching.
7106 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7107 the lwp is either not stabilizing, or is moving out of a jump pad.
7108 (linux_fast_tracepoint_collecting): New.
7109 (maybe_move_out_of_jump_pad): New.
7110 (enqueue_one_deferred_signal): New.
7111 (dequeue_one_deferred_signal): New.
7112 (linux_wait_for_event_1): If moving out of a jump pad, defer
7113 pending signals to later.
7114 (linux_stabilize_threads): New.
7115 (linux_wait_1): Check if threads need moving out of jump pads, and
7116 do it if so.
7117 (stuck_in_jump_pad_callback): New.
7118 (move_out_of_jump_pad_callback): New.
7119 (lwp_running): New.
7120 (linux_resume_one_lwp): Handle moving out of jump pads.
7121 (linux_set_resume_request): Dequeue deferred signals.
7122 (need_step_over_p): Also step over fast tracepoint jumps.
7123 (start_step_over): Also uninsert fast tracepoint jumps.
7124 (finish_step_over): Also reinsert fast tracepoint jumps.
7125 (linux_install_fast_tracepoint_jump): New.
7126 (linux_target_ops): Install linux_stabilize_threads and
7127 linux_install_fast_tracepoint_jump_pad.
7128 * linux-low.h (linux_target_ops) <get_thread_area,
7129 install_fast_tracepoint_jump_pad>: New fields.
7130 (struct lwp_info) <collecting_fast_tracepoint,
7131 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7132 (linux_get_thread_area): Declare.
7133 * linux-x86-low.c (jump_insn): New.
7134 (x86_get_thread_area): New.
7135 (append_insns): New.
7136 (push_opcode): New.
7137 (amd64_install_fast_tracepoint_jump_pad): New.
7138 (i386_install_fast_tracepoint_jump_pad): New.
7139 (x86_install_fast_tracepoint_jump_pad): New.
7140 (the_low_target): Install x86_get_thread_area and
7141 x86_install_fast_tracepoint_jump_pad.
7142 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7143 (struct fast_tracepoint_jump): New.
7144 (fast_tracepoint_jump_insn): New.
7145 (fast_tracepoint_jump_shadow): New.
7146 (find_fast_tracepoint_jump_at): New.
7147 (fast_tracepoint_jump_here): New.
7148 (delete_fast_tracepoint_jump): New.
7149 (set_fast_tracepoint_jump): New.
7150 (uninsert_fast_tracepoint_jumps_at): New.
7151 (reinsert_fast_tracepoint_jumps_at): New.
7152 (set_breakpoint_at): Use write_inferior_memory.
7153 (uninsert_raw_breakpoint): Use write_inferior_memory.
7154 (check_mem_read): Mask out fast tracepoint jumps.
7155 (check_mem_write): Mask out fast tracepoint jumps.
7156 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7157 (set_fast_tracepoint_jump): Declare.
7158 (delete_fast_tracepoint_jump)
7159 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7160 (reinsert_fast_tracepoint_jumps_at): Declare.
7161 * regcache.c: Don't compile many functions when building the
7162 in-process agent library.
7163 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7164 the register buffer in the heap.
7165 (free_register_cache): If the register buffer isn't owned by the
7166 regcache, don't free it.
7167 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7168 pre-existing register caches.
7169 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7170 type.
7171 (convert_ascii_to_int): : Constify `from' parameter type.
7172 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7173 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7174 the needed buffer in-place.
7175 (relocate_instruction): New.
7176 * server.c (handle_query) <qSymbols>: If the target supports
7177 tracepoints, give it a chance of looking up symbols. Report
7178 support for fast tracepoints.
7179 (handle_status): Stabilize threads.
7180 (process_serial_event): Adjust.
7181 * server.h (struct fast_tracepoint_jump): Forward declare.
7182 (struct process_info) <fast_tracepoint_jumps>: New field.
7183 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7184 (decode_X_packet, decode_M_packet): Adjust.
7185 (relocate_instruction): Declare.
7186 (in_process_agent_loaded): Declare.
7187 (tracepoint_look_up_symbols): Declare.
7188 (struct fast_tpoint_collect_status): Declare.
7189 (fast_tracepoint_collecting): Declare.
7190 (force_unlock_trace_buffer): Declare.
7191 (handle_tracepoint_bkpts): Declare.
7192 (initialize_low_tracepoint)
7193 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7194 * target.h (struct target_ops) <stabilize_threads,
7195 install_fast_tracepoint_jump_pad>: New fields.
7196 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7197 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7198 [HAVE_STDINT_H]: Include stdint.h.
7199 (trace_debug_1): Rename to ...
7200 (trace_vdebug): ... this.
7201 (trace_debug): Rename to ...
7202 (trace_debug_1): ... this. Add `level' parameter.
7203 (trace_debug): New.
7204 (ATTR_USED, ATTR_NOINLINE): New.
7205 (IP_AGENT_EXPORT): New.
7206 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7207 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7208 (about_to_request_buffer_space, trace_buffer_is_full)
7209 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7210 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7211 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7212 (traceframe_write_count, traceframes_created)
7213 (trace_state_variables)
7214 New renaming defines.
7215 (struct ipa_sym_addresses): New.
7216 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7217 (symbol_list): New.
7218 (ipa_sym_addrs): New.
7219 (all_tracepoint_symbols_looked_up): New.
7220 (in_process_agent_loaded): New.
7221 (write_e_ipa_not_loaded): New.
7222 (maybe_write_ipa_not_loaded): New.
7223 (tracepoint_look_up_symbols): New.
7224 (debug_threads) [IN_PROCESS_AGENT]: New.
7225 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7226 (UNKNOWN_SIDE_EFFECTS): New.
7227 (stop_tracing): New.
7228 (flush_trace_buffer): New.
7229 (stop_tracing_bkpt): New.
7230 (flush_trace_buffer_bkpt): New.
7231 (read_inferior_integer): New.
7232 (read_inferior_uinteger): New.
7233 (read_inferior_data_pointer): New.
7234 (write_inferior_data_pointer): New.
7235 (write_inferior_integer): New.
7236 (write_inferior_uinteger): New.
7237 (struct collect_static_trace_data_action): Delete.
7238 (enum tracepoint_type): New.
7239 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
7240 <actions_str, step_actions, step_actions_str>: Only include in
7241 GDBserver.
fa593d66
PA
7242 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7243 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7244 (tracepoints): Use IP_AGENT_EXPORT.
7245 (last_tracepoint): Don't include in the IPA.
7246 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7247 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7248 (alloced_trace_state_variables): New.
7249 (trace_state_variables): Use IP_AGENT_EXPORT.
7250 (traceframe_t): Delete unused variable.
7251 (circular_trace_buffer): Don't include in the IPA.
7252 (trace_buffer_start): Delete.
7253 (struct trace_buffer_control): New.
7254 (trace_buffer_free): Delete.
7255 (struct ipa_trace_buffer_control): New.
7256 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7257 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7258 New.
7259 (trace_buffer_ctrl): New.
7260 (TRACE_BUFFER_CTRL_CURR): New.
7261 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7262 Reimplement as macros.
7263 (trace_buffer_wrap): Delete.
7264 (traceframe_write_count, traceframe_read_count)
7265 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7266 (struct tracepoint_hit_ctx) <type>: New field.
7267 (struct fast_tracepoint_ctx): New.
7268 (memory_barrier): New.
7269 (cmpxchg): New.
7270 (record_tracepoint_error): Update atomically in the IPA.
7271 (clear_inferior_trace_buffer): New.
7272 (about_to_request_buffer_space): New.
7273 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7274 updating the same buffer.
7275 (add_tracepoint): Default the tracepoint's type to trap
7276 tracepoint, and orig_size to -1.
7277 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7278 internal variables.
7279 (create_trace_state_variable): New parameter `gdb'. Handle it.
7280 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7281 (cmd_qtdp): Handle fast tracepoints.
7282 (cmd_qtdv): Adjust.
7283 (max_jump_pad_size): New.
7284 (gdb_jump_pad_head): New.
7285 (get_jump_space_head): New.
7286 (claim_jump_space): New.
7287 (sort_tracepoints): New.
7288 (MAX_JUMP_SIZE): New.
7289 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7290 IPA.
7291 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7292 support. Upload fast traceframes, and delete internal IPA
7293 breakpoints.
7294 (stop_tracing_handler): New.
7295 (flush_trace_buffer_handler): New.
7296 (cmd_qtstop): Upload fast tracepoints.
7297 (response_tracepoint): Handle fast tracepoints.
7298 (tracepoint_finished_step): Upload fast traceframes. Set the
7299 tracepoint hit context's tracepoint type.
7300 (handle_tracepoint_bkpts): New.
7301 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7302 type. Add comment about fast tracepoints.
7303 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7304 non-existing action_str field.
7305 (get_context_regcache): Handle fast tracepoints.
7306 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7307 to the regcache.
7308 (fast_tracepoint_from_jump_pad_address): New.
7309 (fast_tracepoint_from_ipa_tpoint_address): New.
7310 (collecting_t): New.
7311 (force_unlock_trace_buffer): New.
7312 (fast_tracepoint_collecting): New.
7313 (collecting): New.
7314 (gdb_collect): New.
7315 (write_inferior_data_ptr): New.
7316 (target_tp_heap): New.
7317 (target_malloc): New.
7318 (download_agent_expr): New.
7319 (UALIGN): New.
7320 (download_tracepoints): New.
7321 (download_trace_state_variables): New.
7322 (upload_fast_traceframes): New.
7323 (IPA_FIRST_TRACEFRAME): New.
7324 (IPA_NEXT_TRACEFRAME_1): New.
7325 (IPA_NEXT_TRACEFRAME): New.
7326 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7327 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7328 (gdb_jump_pad_buffer_end): New.
7329 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7330 (initialize_tracepoint): Adjust.
7331 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7332 buffer. Initialize the low module.
7333 * utils.c (PREFIX, TOOLNAME): New.
7334 (malloc_failure): Use PREFIX.
7335 (error): In the IPA, an error causes an exit.
7336 (fatal, warning): Use PREFIX.
7337 (internal_error): Use TOOLNAME.
7338 (NUMCELLS): Increase to 10.
7339 * configure, config.in: Regenerate.
7340
d149dd1d
PA
73412010-06-01 Pedro Alves <pedro@codesourcery.com>
7342
7343 * server.c (handle_query) <qSupported>: Do two passes over the
7344 qSupported string to avoid nesting strtok.
7345
f6528abd
JK
73462010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7347
7348 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7349 (CDEPS): New.
7350 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7351 -Wl,--dynamic-list.
7352 * configure: Regenerate.
7353 * proc-service.list: New.
7354
ca2a87a0
JK
73552010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7356
7357 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7358 New comment.
7359
363a6e9f
OS
73602010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7361
7362 * gdbreplay.c (remote_open): Check error return from socket() call by
7363 its equality to -1 not by it being negative.
7364 * remote-utils.c (remote_open): Likewise.
7365
d23b6cb1
PA
73662010-05-23 Pedro Alves <pedro@codesourcery.com>
7367
7368 * config.h: Regenerate.
7369
28d3cf85
MK
73702010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7371
7372 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7373 doesn't provide PTRACE_GET_THREAD_AREA.
7374
fea36a59
MK
73752010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7376
7377 * linux-m68k-low.c: Include <asm/ptrace.h>
7378 (ps_get_thread_area): Implement.
7379
24b066ba
DE
73802010-05-03 Doug Evans <dje@google.com>
7381
7382 * event-loop.c (struct callback_event): New struct.
7383 (callback_list): New global.
7384 (append_callback_event, delete_callback_event): New functions.
7385 (process_callback): New function.
7386 (start_event_loop): Call it.
7387 * remote-utils.c (NOT_SCHEDULED): Define.
7388 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7389 moved out of readchar.
7390 (readchar): Rewrite. Call reschedule before returning.
7391 (reset_readchar): New function.
7392 (remote_close): Call it.
7393 (process_remaining, reschedule): New functions.
7394 * server.h (callback_handler_func): New typedef.
7395 (append_callback_event, delete_callback_event): Declare.
7396
9836d6ea
PA
73972010-05-03 Pedro Alves <pedro@codesourcery.com>
7398
7399 * proc-service.c (ps_pglobal_lookup): Use
7400 thread_db_look_up_one_symbol.
7401 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7402 parameter. Use it instead of all_symbols_looked_up.
7403 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7404 field.
7405 (all_symbols_looked_up): Don't declare.
7406 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7407 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7408 field.
7409 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7410 Set all_symbols_looked_up here.
7411 (thread_db_look_up_one_symbol): New.
7412 (thread_db_get_tls_address): Adjust.
7413 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7414 thread_db object on the heap, and tentatively set it in the
7415 process structure.
7416 (thread_db_init): Don't set all_symbols_looked_up here.
7417 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7418
7984d532
PA
74192010-05-03 Pedro Alves <pedro@codesourcery.com>
7420
7421 * linux-low.c (linux_kill, linux_detach): Adjust.
7422 (status_pending_p_callback): Remove redundant statement. Check
7423 for !TARGET_WAITIKIND_IGNORE, instead of
7424 TARGET_WAITKIND_STOPPED.
7425 (handle_tracepoints): Make sure LWP is locked. Adjust.
7426 (linux_wait_for_event_1): Adjust.
7427 (linux_cancel_breakpoints): New.
7428 (unsuspend_one_lwp): New.
7429 (unsuspend_all_lwps): New.
7430 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7431 (send_sigstop_callback): Change return type to int, add new
7432 `except' parameter and handle it.
7433 (suspend_and_send_sigstop_callback): New.
7434 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7435 pass them down. If SUSPEND, also increment the lwp's suspend
7436 count.
7437 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7438 (need_step_over_p): Don't consider suspended LWPs.
7439 (start_step_over): Adjust.
7440 (proceed_one_lwp): Change return type to int, add new `except'
7441 parameter and handle it.
7442 (unsuspend_and_proceed_one_lwp): New.
7443 (proceed_all_lwps): Use find_inferior instead of
7444 for_each_inferior.
7445 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7446 also decrement the suspend count of LWPs. Pass `except' down,
7447 instead of hacking its suspend count.
7448 (linux_pause_all): Add `freeze' parameter. Adjust.
7449 (linux_unpause_all): New.
7450 (linux_target_ops): Install linux_unpause_all.
7451 * server.c (handle_status): Adjust.
7452 * target.h (struct target_ops): New fields `unpause_all' and
7453 `cancel_breakpoints'. Add new parameter to `pause_all'.
7454 (pause_all): Add new `freeze' parameter.
7455 (unpause_all): New.
7456 (cancel_breakpoints): New.
7457 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7458 cancel breakpoints.
7459 (cmd_qtstart): Pause threads.
7460 (stop_tracing): Pause threads, and cancel breakpoints.
7461 * win32-low.c (win32_target_ops): Adjust.
7462
e471f25b
PA
74632010-05-03 Pedro Alves <pedro@codesourcery.com>
7464
7465 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7466 the inferior right away from here...
7467 (linux_wait_1): ... to here, and adjust to check the thread's
7468 last_resume_kind instead of the lwp's step or stop_expected flags.
7469
1915ef4f
PA
74702010-05-02 Pedro Alves <pedro@codesourcery.com>
7471
7472 * README: Use consistent `GDB' and `GDBserver' spellings.
7473
f9e39928
PA
74742010-05-02 Pedro Alves <pedro@codesourcery.com>
7475
7476 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7477 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7478 (linux_detach_one_lwp): Assume the lwp is stopped.
7479 (any_thread_of): Delete.
7480 (linux_detach): Stop all lwps here. Don't blindly delete all
7481 breakpoints.
7482 (delete_lwp_callback): New.
7483 (linux_mourn): Delete all lwps of the process that is gone.
7484 (linux_wait_1): Don't delete the last lwp of the process here.
7485 * mem-break.h (mark_breakpoints_out): Declare.
7486 * mem-break.c (mark_breakpoints_out): New.
7487 (free_all_breakpoints): Use it.
7488 * server.c (handle_target_event): If the process is gone, mark
7489 breakpoints out.
7490 * thread-db.c (struct thread_db) <create_bp>: New field.
7491 (thread_db_enable_reporting): Fix prototype. Store a thread event
7492 breakpoint reference in the thread_db struct.
7493 (thread_db_load_search): Clear the thread_db object.
7494 (try_thread_db_load_1): Ditto.
7495 (switch_to_process): New.
7496 (disable_thread_event_reporting): Use it.
7497 (remove_thread_event_breakpoints): New.
7498 (thread_db_detach, thread_db_mourn): Use it.
7499
1e7fc18c
PA
75002010-05-01 Pedro Alves <pedro@codesourcery.com>
7501
7502 * linux-low.c (linux_enable_event_reporting): New.
7503 (linux_wait_for_event_1, handle_extended_wait): Use it.
7504
02fc4de7
PA
75052010-04-30 Pedro Alves <pedro@codesourcery.com>
7506
7507 * linux-low.c (linux_kill_one_lwp, linux_kill)
7508 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7509 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7510 SIGSTOP even if the LWP is stopped.
7511 (send_sigstop_callback): New.
7512 (stop_all_lwps): Use send_sigstop_callback instead.
7513 (linux_resume_one_thread): Adjust.
7514 (proceed_one_lwp): Still proceed an LWP that the client has
7515 requested to stop, if we haven't reported it as stopped yet. Make
7516 sure that LWPs the client want stopped, have a pending SIGSTOP.
7517
bc3b5632
DE
75182010-04-26 Doug Evans <dje@google.com>
7519
ae1ada35
DE
7520 * server.c (handle_general_set): Make static.
7521
bc3b5632
DE
7522 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7523 Print received char after testing for error/eof instead of before.
7524 (input_interrupt): Tweak comment.
7525
65730243
DE
75262010-04-23 Doug Evans <dje@google.com>
7527
7528 * server.c (start_inferior): Print inferior argv if --debug.
7529
a8ae7dc0
AR
75302010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7531
7532 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7533 * nto-x86-low.c: Include server.h
7534
1c07cc19
PM
75352010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7536
7537 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7538 be consistent with other sources of this directory.
7539 (init_registers_amd64): Correct name of source file of this function
7540 in the comment.
7541
e0a61e09
PM
75422010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7543
7544 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7545 64-bit executables.
7546
54709339
PM
75472010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7548
7549 * win32-i386-low.c: Add 64-bit support.
7550 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7551 (init_registers_amd64): Declare.
7552 (mappings): Add 64-bit version of array.
7553 (init_windows_x86): New function.
7554 (the_low_target): Change init_arch field to init_windows_x86.
7555
e8f0053d
PM
75562010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7557
7558 * win32-low.c: Adapt to support also 64-bit architecture.
7559 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7560 (get_image_name): Use SIZE_T type for local variable `done'.
7561 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7562 (toolhelp_get_dll_name): Idem.
7563 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7564 Use uintptr_t typecast to avoid warning.
7565 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7566 (handle_exception): Use phex_nz to avoid warning.
7567 (win32_wait): Remove unused local variable `process'.
7568
c481e77e
PM
75692010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7570
7571 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7572 `amd64-avx.o'.
7573
12ea4b69
PM
75742010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7575
7576 * configure.ac: Use `ws2_32' library for srv_mingw.
7577 * configure: Regenerate.
7578 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7579 * remote-utils.c: Likewise.
7580
f6d1620c
L
75812010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7582
7583 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7584 if __x86_64__ is defined.
7585
8e642873
PM
75862010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7587
7588 * configure: Regenerate.
7589
711e434b
PM
75902010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7591
7592 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7593 * target.h (target_ops): New get_tib_address field.
7594 * win32-low.h (win32_thread_info): Add thread_local_base field.
7595 * win32-low.c (child_add_thread): Add tlb argument.
7596 Set thread_local_base field to TLB.
7597 (get_child_debug_event): Adapt to child_add_thread change.
7598 (win32_get_tib_address): New function.
7599 (win32_target_ops): Set get_tib_address field to
7600 win32_get_tib_address.
7601 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7602
505106cd
PA
76032010-04-12 Pedro Alves <pedro@codesourcery.com>
7604
505106cd
PA
7605 * linux-low.c (linux_mourn): Also remove the process.
7606 * server.c (handle_target_event): Don't remove the process here.
7607 * nto-low.c (nto_mourn): New.
7608 (nto_target_ops): Install it.
7609 * spu-low.c (spu_mourn): New.
7610 (spu_target_ops): Install it.
7611 * win32-low.c (win32_mourn): New.
7612 (win32_target_ops): Install it.
7613
e8470a06
PA
76142010-04-12 Pedro Alves <pedro@codesourcery.com>
7615
7616 * server.h (buffer_xml_printf): Remove redundant `;'.
7617
45ba0d02
PA
76182010-04-12 Pedro Alves <pedro@codesourcery.com>
7619
7620 * regcache.c (set_register_cache): Invalidate regcaches before
7621 changing the register cache layout.
7622 (regcache_invalidate_one): Allow a NULL regcache.
7623 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7624 regcaches before changing the register cache layout or the target
7625 regsets.
7626
59e04013
L
76272010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7628
7629 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7630 variable warning on Linux/x86-64.
7631
8336d594
PA
76322010-04-11 Pedro Alves <pedro@codesourcery.com>
7633
7634 GDBserver disconnected tracing support.
7635
7636 * linux-low.c (linux_remove_process): Delete.
7637 (add_lwp): Don't set last_resume_kind here.
7638 (linux_kill): Use `mourn'.
7639 (linux_detach): Use `thread_db_detach', and `mourn'.
7640 (linux_mourn): New.
7641 (linux_attach_lwp_1): Adjust comment.
7642 (linux_attach): last_resume_kind moved the thread_info; adjust.
7643 (status_pending_p_callback): Adjust.
7644 (linux_wait_for_event_1): Adjust.
7645 (count_events_callback, select_singlestep_lwp_callback)
7646 (select_event_lwp_callback, cancel_breakpoints_callback)
7647 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7648 (proceed_one_lwp): Adjust.
7649 (linux_async): Add debug output.
7650 (linux_thread_stopped): New.
7651 (linux_pause_all): New.
7652 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7653 linux_pause_all.
7654 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7655 (thread_db_free): Delete declaration.
7656 (thread_db_detach, thread_db_mourn): Declare.
7657 * thread-db.c (thread_db_init): Use thread_db_mourn.
7658 (thread_db_free): Delete, split in two.
7659 (disable_thread_event_reporting): New.
7660 (thread_db_detach): New.
7661 (thread_db_mourn): New.
7662
7663 * server.h (struct thread_info) <last_resume_kind>: New field.
7664 <attached>: Add comment.
7665 <gdb_detached>: New field.
7666 (handler_func): Change return type to int.
7667 (handle_serial_event, handle_target_event): Ditto.
7668 (gdb_connected): Declare.
7669 (tracing): Delete.
7670 (disconnected_tracing): Declare.
7671 (stop_tracing): Declare.
7672
7673 * server.c (handle_query) <qSupported>: Report support for
7674 disconnected tracing.
7675 (queue_stop_reply_callback): Account for running threads.
7676 (gdb_wants_thread_stopped): New.
7677 (gdb_wants_all_threads_stopped): New.
7678 (gdb_reattached_process): New.
7679 (handle_status): Clear the `gdb_detached' flag of all processes.
7680 In all-stop, stop all threads.
7681 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7682 (process_serial_event): If the remote connection breaks, or if an
7683 exit was forced with "monitor exit", force an event loop exit.
7684 Handle disconnected tracing on detach.
7685 (handle_serial_event): Adjust.
7686 (handle_target_event): If GDB isn't connected, forward events back
7687 to the inferior, unless the last process exited, in which case,
7688 exit gdbserver. Adjust interface.
7689
7690 * remote-utils.c (remote_open): Don't block in accept. Instead
7691 register an event loop source on the listen socket file
7692 descriptor. Refactor bits into ...
7693 (listen_desc): ... this new global.
7694 (gdb_connected): ... this new function.
7695 (enable_async_notification): ... this new function.
7696 (handle_accept_event): ... this new function.
7697 (remote_close): Clear remote_desc.
7698
7699 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7700
7701 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7702 New fields.
7703 (mourn_inferior): Define.
7704 (target_process_qsupported): Avoid the dangling else problem.
7705 (thread_stopped): Define.
7706 (pause_all): Define.
7707 (target_waitstatus_to_string): Declare.
7708 * target.c (target_waitstatus_to_string): New.
7709
7710 * tracepoint.c (tracing): Make extern.
7711 (disconnected_tracing): New.
7712 (stop_tracing): Make extern. Handle tracing stops due to GDB
7713 disconnecting.
7714 (cmd_qtdisconnected): New.
7715 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7716 (handle_tracepoint_general_set): Handle QTDisconnected.
7717
7718 * event-loop.c (event_handler_func): Change return type to int.
7719 (process_event): Bail out if the event handler wants the event
7720 loop to stop.
7721 (handle_file_event): Ditto.
7722 (start_event_loop): Bail out if the event handler wants the event
7723 loop to stop.
7724
7725 * nto-low.c (nto_target_ops): Adjust.
7726 * spu-low.c (spu_wait): Don't remove the process here.
7727 (spu_target_ops): Adjust.
7728 * win32-low.c (win32_wait): Don't remove the process here.
7729 (win32_target_ops): Adjust.
7730
5d267c4c
PA
77312010-04-11 Pedro Alves <pedro@codesourcery.com>
7732
7733 * regcache.c (realloc_register_cache): Invalidate inferior's
7734 regcache before recreating it.
7735
623ccd72
PA
77362010-04-09 Pedro Alves <pedro@codesourcery.com>
7737
7738 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7739
219f2f23
PA
77402010-04-09 Stan Shebs <stan@codesourcery.com>
7741 Pedro Alves <pedro@codesourcery.com>
7742
7743 * server.h (LONGEST): New.
7744 (struct thread_info) <while_stepping>: New field.
7745 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7746 Declare.
7747 (initialize_tracepoint, handle_tracepoint_general_set)
7748 (handle_tracepoint_query, tracepoint_finished_step)
7749 (tracepoint_was_hit, release_while_stepping_state_list):
7750 (current_traceframe): Declare.
7751 * server.c (handle_general_set): Handle tracepoint packets.
7752 (read_memory): New.
7753 (write_memory): New.
7754 (handle_search_memory_1): Use read_memory.
7755 (handle_query): Report support for conditional tracepoints, trace
7756 state variables, and tracepoint sources. Handle tracepoint
7757 queries.
7758 (main): Initialize the tracepoints module.
7759 (process_serial_event): Handle traceframe reads/writes.
7760
7761 * linux-low.c (handle_tracepoints): New.
7762 (linux_wait_1): Call it.
7763 (linux_resume_one_lwp): Handle while-stepping.
7764 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7765 (linux_target_ops): Install them.
7766 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7767 New field.
7768 * linux-x86-low.c (x86_supports_tracepoints): New.
7769 (the_low_target). Install it.
7770
7771 * mem-break.h (delete_breakpoint): Declare.
7772 * mem-break.c (delete_breakpoint): Make external.
7773
7774 * target.h (struct target_ops): Add `supports_tracepoints',
7775 `read_pc', and `write_pc' fields.
7776 (target_supports_tracepoints): Define.
7777 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7778 (phex_nz): New.
7779
7780 * regcache.h (struct regcache) <registers_owned>: New field.
7781 (init_register_cache, regcache_cpy): Declare.
7782 (regcache_read_pc, regcache_write_pc): Declare.
7783 (register_cache_size): Declare.
7784 (supply_regblock): Declare.
7785 * regcache.c (init_register_cache): New.
7786 (new_register_cache): Use it.
7787 (regcache_cpy): New.
7788 (register_cache_size): New.
7789 (supply_regblock): New.
7790 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 7791
219f2f23
PA
7792 * tracepoint.c: New.
7793
7794 * Makefile.in (OBS): Add tracepoint.o.
7795 (tracepoint.o): New rule.
7796
3a13a53b
L
77972010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7798
7799 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7800 (i386-mmx.o): New.
7801 (i386-mmx.c): Likewise.
7802 (i386-mmx-linux.o): Likewise.
7803 (i386-mmx-linux.c): Likewise.
7804
7805 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7806 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7807 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7808 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7809
7810 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7811 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7812 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7813
1570b33e
L
78142010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7815
7816 * Makefile.in (clean): Updated.
7817 (i386-avx.o): New.
7818 (i386-avx.c): Likewise.
7819 (i386-avx-linux.o): Likewise.
7820 (i386-avx-linux.c): Likewise.
7821 (amd64-avx.o): Likewise.
7822 (amd64-avx.c): Likewise.
7823 (amd64-avx-linux.o): Likewise.
7824 (amd64-avx-linux.c): Likewise.
7825
7826 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7827 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7828 (srv_amd64_regobj): Add amd64-avx.o.
7829 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7830 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7831 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7832 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7833 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7834 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7835 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7836
7837 * i387-fp.c: Include "i386-xstate.h".
7838 (i387_xsave): New.
7839 (i387_cache_to_xsave): Likewise.
7840 (i387_xsave_to_cache): Likewise.
7841 (x86_xcr0): Likewise.
7842
7843 * i387-fp.h (i387_cache_to_xsave): Likewise.
7844 (i387_xsave_to_cache): Likewise.
7845 (x86_xcr0): Likewise.
7846
7847 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7848 * linux-crisv32-low.c (target_regsets): Likewise.
7849 * linux-m68k-low.c (target_regsets): Likewise.
7850 * linux-mips-low.c (target_regsets): Likewise.
7851 * linux-ppc-low.c (target_regsets): Likewise.
7852 * linux-s390-low.c (target_regsets): Likewise.
7853 * linux-sh-low.c (target_regsets): Likewise.
7854 * linux-sparc-low.c (target_regsets): Likewise.
7855 * linux-xtensa-low.c (target_regsets): Likewise.
7856
7857 * linux-low.c: Include <sys/uio.h>.
7858 (regsets_fetch_inferior_registers): Support nt_type.
7859 (regsets_store_inferior_registers): Likewise.
7860 (linux_process_qsupported): New.
7861 (linux_target_ops): Add linux_process_qsupported.
7862
7863 * linux-low.h (regset_info): Add nt_type.
7864 (linux_target_ops): Add process_qsupported.
7865
7866 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7867 and <sys/uio.h>.
7868 (init_registers_i386_avx_linux): New.
7869 (init_registers_amd64_avx_linux): Likewise.
7870 (xmltarget_i386_linux_no_xml): Likewise.
7871 (xmltarget_amd64_linux_no_xml): Likewise.
7872 (PTRACE_GETREGSET): Likewise.
7873 (PTRACE_SETREGSET): Likewise.
7874 (x86_fill_xstateregset): Likewise.
7875 (x86_store_xstateregset): Likewise.
7876 (use_xml): Likewise.
7877 (x86_linux_update_xmltarget): Likewise.
7878 (x86_linux_process_qsupported): Likewise.
7879 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7880 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7881 init_registers_i386_linux here. Call
7882 x86_linux_update_xmltarget.
7883 (the_low_target): Add x86_linux_process_qsupported.
7884
7885 * server.c (handle_query): Call target_process_qsupported.
7886
7887 * target.h (target_ops): Add process_qsupported.
7888 (target_process_qsupported): New.
7889
fc7238bb
PA
78902010-04-03 Pedro Alves <pedro@codesourcery.com>
7891
7892 * inferiors.c (add_thread): Set last_status kind to
7893 TARGET_WAITKIND_IGNORE.
7894 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7895 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7896 (linux_wait_1): Move `thread' local definition to block that uses
7897 it. Don't NULL initialize `event_child'.
7898 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7899 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7900 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7901
bdabb078
PA
79022010-04-01 Pedro Alves <pedro@codesourcery.com>
7903
7904 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7905 an extended waitstatus, or by a watchpoint.
7906 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7907 thread was stepping or has been stopped by a watchpoint.
7908
d3bbe7a0
PA
79092010-04-01 Pedro Alves <pedro@codesourcery.com>
7910
7911 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7912 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7913 of another, then delete the previous, and validate all
7914 breakpoints.
7915 (validate_inserted_breakpoint): New.
7916 (delete_disabled_breakpoints): New.
7917 (validate_breakpoints): New.
7918 (check_mem_read): Validate breakpoints before trusting their
7919 shadow. Delete disabled breakpoints.
7920 (check_mem_write): Validate breakpoints before trusting they
7921 should be inserted. Delete disabled breakpoints.
7922 * mem-break.h (validate_breakpoints):
7923 * server.c (handle_query): Validate breakpoints when we see a
7924 qSymbol query.
7925
8b07ae33
PA
79262010-04-01 Pedro Alves <pedro@codesourcery.com>
7927
7928 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7929 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7930 if we could tell there's a GDB breakpoint at stop_pc.
7931 (need_step_over_p): Don't do a step over if we find a GDB
7932 breakpoint at the resume PC.
7933
7934 * mem-break.c (struct raw_breakpoint): New.
7935 (enum bkpt_type): New type `gdb_breakpoint'.
7936 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7937 fields. New field `raw'.
7938 (find_raw_breakpoint_at): New.
7939 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7940 breakpoint instead.
7941 (set_breakpoint_at): Adjust.
7942 (delete_raw_breakpoint): New.
7943 (release_breakpoint): New.
7944 (delete_breakpoint): Rename to...
7945 (delete_breakpoint_1): ... this. Add proc parameter. Use
7946 release_breakpoint. Return ENOENT.
7947 (delete_breakpoint): Reimplement.
7948 (find_breakpoint_at): Delete.
7949 (find_gdb_breakpoint_at): New.
7950 (delete_breakpoint_at): Delete.
7951 (set_gdb_breakpoint_at): New.
7952 (delete_gdb_breakpoint_at): New.
7953 (gdb_breakpoint_here): New.
7954 (set_reinsert_breakpoint): Use release_breakpoint.
7955 (uninsert_breakpoint): Rename to ...
7956 (uninsert_raw_breakpoint): ... this.
7957 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7958 (reinsert_raw_breakpoint): Change parameter type to
7959 raw_breakpoint.
7960 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7961 instead.
7962 (check_breakpoints): Adjust. Use release_breakpoint.
7963 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7964 (breakpoint_inserted_here): Ditto.
7965 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7966 Don't trust the breakpoint's shadow if it is not inserted.
7967 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7968 (delete_all_breakpoints): Adjust.
7969 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7970 use delete_breakpoint_1.
7971
7972 * mem-break.h (breakpoints_supported): Delete declaration.
7973 (set_gdb_breakpoint_at): Declare.
7974 (gdb_breakpoint_here): Declare.
7975 (delete_breakpoint_at): Delete.
7976 (delete_gdb_breakpoint_at): Declare.
7977
7978 * server.h (struct raw_breakpoint): Forward declare.
7979 (struct process_info): New field `raw_breakpoints'.
7980
7981 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7982 breakpoints.
7983
6bf5e0ba
PA
79842010-03-24 Pedro Alves <pedro@codesourcery.com>
7985
7986 * linux-low.c (status_pending_p_callback): Fix comment.
7987 (linux_wait_for_event_1): Move most of the internal breakpoint
7988 handling from here...
7989 (linux_wait_1): ... to here.
7990 (count_events_callback): New.
7991 (select_singlestep_lwp_callback): New.
7992 (select_event_lwp_callback): New.
7993 (cancel_breakpoints_callback): New.
7994 (select_event_lwp): New.
7995 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7996 priority to all LWPs that have had events that should be reported
7997 to the client. Cancel breakpoints when about to reporting the
7998 event to the client, not while stopping lwps. No longer cancel
7999 finished single-steps here.
8000 (cancel_finished_single_step): Delete.
8001 (cancel_finished_single_steps): Delete.
8002
414a389f
PA
80032010-03-24 Pedro Alves <pedro@codesourcery.com>
8004
8005 * mem-break.c (enum bkpt_type): New.
8006 (struct breakpoint): New field `type'.
8007 (set_breakpoint_at): Change return type to struct breakpoint
8008 pointer. Set type to `other_breakpoint' by default.
8009 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8010 in the breakpoint list.
8011 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8012 (reinsert_breakpoint): Rename to ...
8013 (reinsert_raw_breakpoint): ... this.
8014 (reinsert_breakpoints_at): Adjust.
8015 * mem-break.h (struct breakpoint): Declare.
8016 (set_breakpoint_at): Change return type to struct breakpoint
8017 pointer.
8018
2280c721
PA
80192010-03-24 Pedro Alves <pedro@codesourcery.com>
8020
8021 * server.c (handle_query): Assign, not compare.
8022
d50171e4
PA
80232010-03-24 Pedro Alves <pedro@codesourcery.com>
8024
8025 Teach linux gdbserver to step-over-breakpoints.
8026
8027 * linux-low.c (can_hardware_single_step): New.
8028 (supports_breakpoints): New.
8029 (handle_extended_wait): If stopping threads, read the stop pc of
8030 the new cloned LWP.
8031 (get_pc): New.
8032 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8033 low target doesn't support retrieving the PC.
8034 (add_lwp): Set last_resume_kind to resume_continue.
8035 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8036 (linux_attach): Don't clear stop_expected. Set the lwp's
8037 last_resume_kind to resume_stop.
8038 (linux_detach_one_lwp): Don't check for removed breakpoints.
8039 (check_removed_breakpoint): Delete.
8040 (status_pending_p): Rename to ...
8041 (status_pending_p_callback): ... this. Don't check for removed
8042 breakpoints. Don't consider threads that are stopped from GDB's
8043 perspective.
8044 (linux_wait_for_lwp): Always read the stop_pc here.
8045 (cancel_breakpoint): New.
8046 (step_over_bkpt): New global.
8047 (linux_wait_for_event_1): Implement stepping over breakpoints.
8048 (gdb_wants_lwp_stopped): New.
8049 (gdb_wants_all_stopped): New.
8050 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8051 single-step traps here. Store the thread's last reported target
8052 wait status.
8053 (send_sigstop): Don't clear stop_expected. Always set it,
8054 instead.
8055 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8056 (cancel_finished_single_step): New.
8057 (cancel_finished_single_steps): New.
8058 (wait_for_sigstop): Don't cancel finished single-step traps here.
8059 (linux_resume_one_lwp): Don't check for removed breakpoints.
8060 Don't set `step' on non-hardware step archs.
8061 (linux_set_resume_request): Ignore resume_stop requests if already
8062 stopping or stopped. Set the lwp's last_resume_kind.
8063 (resume_status_pending_p): Don't check for removed breakpoints.
8064 (need_step_over_p): New.
8065 (start_step_over): New.
8066 (finish_step_over): New.
8067 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8068 requests. Clear the thread's last reported target waitstatus.
8069 Don't use the `suspended' flag. Don't consider pending breakpoints.
8070 (linux_resume): Start a step-over if necessary.
8071 (proceed_one_lwp): New.
8072 (proceed_all_lwps): New.
8073 (unstop_all_lwps): New.
8074 * linux-low.h (struct lwp_info): Rewrite comment for the
8075 `suspended' flag. Add the `stop_pc' field. Delete the
8076 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8077 Add `'last_resume_kind' and `need_step_over' fields.
8078 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8079 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8080 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8081 (set_raw_breakpoint_at): New.
8082 (set_breakpoint_at): Rewrite to use it.
8083 (reinsert_breakpoint_handler): Delete.
8084 (set_reinsert_breakpoint): New.
8085 (reinsert_breakpoint_by_bp): Delete.
8086 (delete_reinsert_breakpoints): New.
8087 (uninsert_breakpoint): Rewrite.
8088 (uninsert_breakpoints_at): New.
8089 (reinsert_breakpoint): Rewrite.
8090 (reinsert_breakpoints_at): New.
8091 (check_breakpoints): Rewrite.
8092 (breakpoint_here): New.
8093 (breakpoint_inserted_here): New.
8094 (check_mem_read): Adjust.
8095 * mem-break.h (breakpoints_supported, breakpoint_here)
8096 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8097 (reinsert_breakpoint_by_bp): Delete declaration.
8098 (delete_reinsert_breakpoints): Declare.
8099 (reinsert_breakpoint): Delete declaration.
8100 (reinsert_breakpoints_at): Declare.
8101 (uninsert_breakpoint): Delete declaration.
8102 (uninsert_breakpoints_at): Declare.
8103 (check_breakpoints): Adjust prototype.
8104 * server.h: Adjust include order.
8105 (struct thread_info): Declare here. Add a `last_status' field.
8106
30ba68cb
MS
81072010-03-23 Michael Snyder <msnyder@vmware.com>
8108
8109 * server.c (crc32): New function.
8110 (handle_query): Add handling for 'qCRC:' request.
8111
b9a881c2
PA
81122010-03-23 Pedro Alves <pedro@codesourcery.com>
8113
8114 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8115 lwp had been stopped by a watchpoint.
8116
e92d13d5
PA
81172010-03-16 Pedro Alves <pedro@codesourcery.com>
8118
8119 * server.h (internal_error): Declare.
8120 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8121 * utils.c (internal_error): New function.
8122
64daa791
AS
81232010-03-15 Andreas Schwab <schwab@redhat.com>
8124
8125 * configure.srv: Fix typo setting srv_regobj.
8126
f52cd8cd
PA
81272010-03-15 Pedro Alves <pedro@codesourcery.com>
8128
8129 * linux-low.c (fetch_register): Avoid passing a non string literal
8130 format to `error'.
8131 (usr_store_inferior_registers): Ditto.
8132
93ae6fdc
PA
81332010-03-14 Pedro Alves <pedro@codesourcery.com>
8134
8135 * linux-low.c (linux_write_memory): Bail out early if peeking
8136 memory failed.
8137
c3adc08c
PA
81382010-03-14 Pedro Alves <pedro@codesourcery.com>
8139
8140 * linux-low.h (struct lwp_info): New fields
8141 `stopped_by_watchpoint' and `stopped_data_address'.
8142 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8143 here, and cache them in the lwp object.
8144 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8145 directly.
8146 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8147 field.
8148 (linux_stopped_by_watchpoint): Rewrite.
8149 (linux_stopped_data_address): Rewrite.
8150
bce522a2
PA
81512010-03-06 Simo Melenius <simo.melenius@iki.fi>
8152
8153 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8154 switching the current inferior, not before.
8155
90884b2b
L
81562010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8157
8158 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8159 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8160 i386-linux.c and amd64-linux.c.
8161 (reg-i386.o): Removed.
8162 (reg-i386.c): Likewise.
8163 (reg-i386-linux.o): Likewise.
8164 (reg-i386-linux.c): Likewise.
8165 (reg-x86-64.o): Likewise.
8166 (reg-x86-64.c): Likewise.
8167 (reg-x86-64-linux.o): Likewise.
8168 (reg-x86-64-linux.c): Likewise.
8169 (i386.o): New.
8170 (i386.c): Likewise.
8171 (i386-linux.o): Likewise.
8172 (i386-linux.c): Likewise.
8173 (amd64.o): Likewise.
8174 (amd64.c): Likewise.
8175 (amd64-linux.o): Likewise.
8176 (amd64-linux.c): Likewise.
8177
8178 * configure.srv (srv_i386_regobj): New.
8179 (srv_i386_linux_regobj): Likewise.
8180 (srv_amd64_regobj): Likewise.
8181 (srv_amd64_linux_regobj): Likewise.
8182 (srv_i386_32bit_xmlfiles): Likewise.
8183 (srv_i386_64bit_xmlfiles): Likewise.
8184 (srv_i386_xmlfiles): Likewise.
8185 (srv_amd64_xmlfiles): Likewise.
8186 (srv_i386_linux_xmlfiles): Likewise.
8187 (srv_amd64_linux_xmlfiles): Likewise.
8188 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8189 srv_xmlfiles to $srv_i386_xmlfiles.
8190 (i[34567]86-*-mingw32ce*): Likewise.
8191 (i[34567]86-*-mingw*): Likewise.
8192 (i[34567]86-*-nto*): Likewise.
8193 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8194 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8195 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8196 (x86_64-*-linux*): Likewise.
8197
8198 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8199 (init_registers_amd64_linux): New.
8200 (x86_arch_setup): Replace init_registers_x86_64_linux with
8201 init_registers_amd64_linux.
8202
193f13e6
MK
82032010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8204
8205 * configure.ac: Check for libdl. If it is not available link against
8206 static libthread_db.
8207 * configure: Regenerate.
8208
85d721b8
PA
82092010-02-22 Pedro Alves <pedro@codesourcery.com>
8210
8211 PR9605
8212
8213 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8214 handing a read watchpoint.
8215 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8216
6076632b
DE
82172010-02-12 Doug Evans <dje@google.com>
8218
8219 * linux-low.c (linux_supports_tracefork_flag): Document.
8220 (linux_look_up_symbols): Add comment.
8221
3327ccf7
L
82222010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8223
8224 * regcache.c (supply_register): Clear regcache if buf is NULL.
8225
0718675c 82262010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 8227 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
8228
8229 * inferiors.c (find_inferior): Add function documentation.
8230 (unloaded_dll): Handle the case where the unloaded dll has not
8231 been previously registered in the dll list.
8232
177321bd
DJ
82332010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8234
8235 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8236 (thumb2_breakpoint): New.
8237 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8238
2b009048
DJ
82392010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8240
8241 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8242 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8243 breakpoints.
8244
3be029c7
PA
82452010-01-21 Pedro Alves <pedro@codesourcery.com>
8246
8247 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8248
18f5de3b
JK
82492010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8250
8251 * linux-s390-low.c (s390_collect_ptrace_register)
8252 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8253
3743bb4f
DE
82542010-01-21 Doug Evans <dje@google.com>
8255
14ce3065
DE
8256 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8257 (PTRACE_ARG4_TYPE): New macro.
8258 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8259 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8260 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8261 (usr_store_inferior_registers): Ditto.
8262 (linux_read_memory, linux_write_memory): Ditto.
8263 (linux_test_for_tracefork): Ditto.
8264
3743bb4f
DE
8265 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8266 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8267
8b315be5
PA
82682010-01-21 Pedro Alves <pedro@codesourcery.com>
8269
8270 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8271 target.
8272
85492558
PA
82732010-01-21 Pedro Alves <pedro@codesourcery.com>
8274
8275 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8276 prototype to take a regcache. Adjust.
8277
442ea881
PA
82782010-01-20 Pedro Alves <pedro@codesourcery.com>
8279
8280 * regcache.h (struct thread_info): Forward declare.
8281 (struct regcache): New.
8282 (new_register_cache): Adjust prototype.
8283 (get_thread_regcache): Declare.
8284 (free_register_cache): Adjust prototype.
8285 (registers_to_string, registers_from_string): Ditto.
8286 (supply_register, supply_register_by_name, collect_register)
8287 (collect_register_as_string, collect_register_by_name): Ditto.
8288 * regcache.c (struct inferior_regcache_data): Delete.
8289 (get_regcache): Rename to ...
8290 (get_thread_regcache): ... this. Adjust. Switch inferior before
8291 fetching registers.
8292 (regcache_invalidate_one): Adjust.
8293 (regcache_invalidate): Fix prototype.
8294 (new_register_cache): Return the new register cache.
8295 (free_register_cache): Change prototype.
8296 (realloc_register_cache): Adjust.
8297 (registers_to_string): Change prototype to take a regcache. Adjust.
8298 (registers_from_string): Ditto.
8299 (register_data): Ditto.
8300 (supply_register): Ditto.
8301 (supply_register_by_name): Ditto.
8302 (collect_register): Ditto.
8303 (collect_register_as_string): Ditto.
8304 (collect_register_by_name): Ditto.
8305 * server.c (process_serial_event): Adjust.
8306 * linux-low.h (regset_fill_func, regset_store_func): Change
8307 prototype.
8308 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8309 Change prototype.
8310 * linux-low.c (get_stop_pc): Adjust.
8311 (check_removed_breakpoint): Adjust.
8312 (linux_wait_for_event): Adjust.
8313 (linux_resume_one_lwp): Adjust.
8314 (fetch_register): Add regcache parameter. Adjust.
8315 (usr_store_inferior_registers): Ditto.
8316 (regsets_fetch_inferior_registers): Ditto.
8317 (regsets_store_inferior_registers): Ditto.
8318 (linux_fetch_registers, linux_store_registers): Ditto.
8319 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8320 regcache. Adjust.
43aaf8b6
PA
8321 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8322 Ditto.
442ea881
PA
8323 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8324 prototype to take a regcache.
8325 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8326 * remote-utils.c (convert_ascii_to_int, outreg)
8327 (prepare_resume_reply): Change prototype to take a regcache.
8328 Adjust.
8329 * target.h (struct target_ops) <fetch_registers, store_registers>:
8330 Change prototype to take a regcache.
8331 (fetch_inferior_registers, store_inferior_registers): Change
8332 prototype to take a regcache. Adjust.
8333 * proc-service.c (ps_lgetregs): Adjust.
8334 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8335 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8336 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8337 take a regcache. Adjust.
8338 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8339 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8340 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8341 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8342 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8343 (cris_cannot_fetch_register):
8344 (cris_breakpoint_at): Change prototype to take a regcache.
8345 Adjust.
8346 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8347 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8348 to take a regcache. Adjust.
8349 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8350 Adjust.
8351 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8352 take a regcache. Adjust.
8353 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8354 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8355 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8356 * linux-mips-low.c (mips_get_pc):
8357 (mips_set_pc): Change prototype to take a regcache. Adjust.
8358 (mips_reinsert_addr): Adjust.
8359 (mips_collect_register): Change prototype to take a regcache.
8360 Adjust.
8361 (mips_supply_register):
8362 (mips_collect_register_32bit, mips_supply_register_32bit)
8363 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8364 (mips_store_fpregset): Ditto.
43aaf8b6
PA
8365 * linux-ppc-low.c (ppc_supply_ptrace_register)
8366 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
8367 (parse_spufs_run): Adjust.
8368 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8369 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8370 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8371 take a regcache. Adjust.
8372 * linux-s390-low.c (s390_collect_ptrace_register)
8373 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8374 (s390_set_pc): Change prototype to take a regcache. Adjust.
8375 (s390_arch_setup): Adjust.
8376 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8377 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8378 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8379 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8380 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8381 regcache. Adjust.
8382 (sparc_breakpoint_at): Adjust.
8383 * linux-xtensa-low.c (xtensa_fill_gregset):
8384 (xtensa_store_gregset):
8385 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8386 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8387 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8388 prototype to take a regcache. Adjust.
8389 * win32-arm-low.c (arm_fetch_inferior_register)
8390 (arm_store_inferior_register): Change prototype to take a
8391 regcache. Adjust.
8392 * win32-i386-low.c (i386_fetch_inferior_register)
8393 (i386_store_inferior_register): Change prototype to take a
8394 regcache. Adjust.
8395 * win32-low.c (child_fetch_inferior_registers)
8396 (child_store_inferior_registers): Change prototype to take a
8397 regcache. Adjust.
8398 (win32_wait): Adjust.
8399 (win32_fetch_inferior_registers): Change prototype to take a
8400 regcache. Adjust.
8401 (win32_store_inferior_registers): Adjust.
8402 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8403 store_inferior_register>: Change prototype to take a regcache.
8404
60c3d7b0
DE
84052010-01-20 Doug Evans <dje@google.com>
8406
8407 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8408 #ifdef.
8409 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 8410 (W_STOPCODE): Provide definition if missing.
60c3d7b0 8411
dc146f7c
VP
84122010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8413
8414 * linux-low.c (linux_core_of_thread): New.
8415 (compare_ints, show_process, list_threads): New.
8416 (linux_qxfer_osdata): Report threads and cores.
8417 (linux_target_op): Register linux_core_of_thread.
8418 * remote-utils.c (prepare_resume_reply): Report the core.
8419 (buffer_xml_printf): Support %d specifier.
8420 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8421 New.
8422 (handle_query): Handle qXfer:threads. Announce availability
8423 thereof.
8424 * target.h (struct target_ops): New field core_of_thread.
8425
7803799a
UW
84262010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8427
8428 * Makefile.in (clean): Remove new generated files.
8429 (reg-s390.o, reg-s390.c): Remove rules.
8430 (reg-s390x.o, reg-s390x.c): Likewise.
8431 (s390-linux32.o, s390-linux32.c): Add rules.
8432 (s390-linux64.o, s390-linux64.c): Likewise.
8433 (s390x-linux64.o, s390x-linux64.c): Likewise.
8434 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8435 * linux-s390-low.c: Include <elf.h>.
8436 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8437 (init_registers_s390): Remove prototype.
8438 (init_registers_s390x): Likewise.
8439 (init_registers_s390_linux32): Add prototype.
8440 (init_registers_s390_linux64): Likewise.
8441 (init_registers_s390x_linux64): Likewise.
8442 (s390_num_regs_3264): New define.
8443 (s390_regmap_3264): New global variable.
8444 (s390_cannot_fetch_register): Remove obsolete check.
8445 (s390_cannot_store_register): Likewise.
8446 (s390_collect_ptrace_register): Handle upper/lower register halves.
8447 (s390_supply_ptrace_register): Likewise.
8448 (s390_fill_gregset): Update to register number changes.
8449 (s390_get_hwcap): New routine.
8450 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8451 Install appropriate regmap and register set.
8452
6e7ffa39
JB
84532010-01-01 Joel Brobecker <brobecker@adacore.com>
8454
8455 * server.c (gdbserver_version): Update copyright year to 2010.
8456 * gdbreplay.c (gdbreplay_version): Likewise.
8457
957f3f49
DE
84582009-12-28 Doug Evans <dje@google.com>
8459
8460 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8461 elf/external.h. Include <elf.h> instead but only if necessary.
8462
ca5c370d
PA
84632009-12-28 Pedro Alves <pedro@codesourcery.com>
8464
8465 * linux-low.c (linux_remove_process): Remove `detaching'
8466 parameter. Don't release/detach from thread_db here.
8467 (linux_kill): Release/detach from thread_db here, ...
8468 (linux_detach): ... and here, before actually detaching.
8469 (linux_wait_1): ... and here, when a process exits.
8470 * thread-db.c (any_thread_of): New.
8471 (thread_db_free): Switch the current inferior to a thread of the
8472 passed in process.
8473
4ee62156
DE
84742009-12-21 Doug Evans <dje@google.com>
8475
d90e6a88
DE
8476 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8477
c5f62d5f
DE
8478 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8479 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8480 warning ifndef __NR_tkill. Move setting of errno there too.
8481 Delete unnecessary resetting of errno after syscall.
8482 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8483
10e86dd7
DE
8484 * configure.ac: Check for dladdr.
8485 * config.in: Regenerate.
8486 * configure: Regenerate.
8487 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8488 (try_thread_db_load): Update.
8489
4ee62156
DE
8490 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8491
00f515da
DE
84922009-12-18 Doug Evans <dje@google.com>
8493
e9464885
DE
8494 * event-loop.c: Include unistd.h if it exists.
8495
07d4f67e
DE
8496 * linux-low.c (my_waitpid): Move definition away from being in
8497 between linux_tracefork_child/linux_test_for_tracefork.
8498
00f515da
DE
8499 * gdb_proc_service.h (psaddr_t): Fix type.
8500 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8501 signature to match glibc.
8502
1de1badb
DE
85032009-12-16 Doug Evans <dje@google.com>
8504
8505 * linux-low.c (linux_read_memory): Fix argument to read.
8506
aeeb81d1
PA
85072009-11-26 Pedro Alves <pedro@codesourcery.com>
8508
8509 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8510 events, don't leave current_inferior pointing at null.
8511
10357975
PA
85122009-11-26 Pedro Alves <pedro@codesourcery.com>
8513
8514 * win32-low.c (LOG): Delete.
8515 (OUTMSG): Output to stderr.
8516 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8517 on compile time LOG macro.
8518 (win32_wait): Fix debug output.
8519
cf6e3471
PA
85202009-11-26 Pedro Alves <pedro@codesourcery.com>
8521
8522 * win32-low.c (win32_add_one_solib): If the dll name is
8523 "ntdll.dll", prepend the system directory to the dll path.
8524
0c85e18e
MK
85252009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8526
8527 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8528
9ac544ce 85292009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 8530 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
8531
8532 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8533 * configure.ac: Check for __mcoldfire__ and set
8534 gdb_cv_m68k_is_coldfire.
8535 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8536 reg-cf.o and reg-m68k.o.
8537 * configure: Regenerated.
8538
fd7dd3e6
PA
85392009-11-16 Pedro Alves <pedro@codesourcery.com>
8540
8541 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8542 Pass it to thread_db_free.
8543 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8544 proper `detaching' argument to linux_remove_process.
8545 * linux-low.h (thread_db_free): Add `detaching' parameter.
8546 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8547 to thread_db_free.
8548 (thread_db_free): Add `detaching' parameter. Only
8549 call td_ta_clear_event if detaching from process.
8550
75aa492e
MK
85512009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8552
8553 * thread-db.c (thread_db_free): Fix typo.
8554
21e1bee4
PP
85552009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8556
8557 PR gdb/10838
8558 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8559
8838b45e
NS
85602009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8561
8562 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8563 with an i686 compiler.
8564 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8565 needed.
8566 * configure: Rebuilt.
8567
8a35fb51
SL
85682009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8569
8570 PR gdb/10783
8571
8572 * server.c (handle_search_memory_1): Correct read_addr initialization
8573 in loop for searching subsequent chunks.
8574
96f15937
PP
85752009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8576
8577 * configure.ac: New --with-libthread-db option.
8578 * thread-db.c: Allow direct dependence on libthread_db.
8579 (thread_db_free): Adjust.
8580 * config.in: Regenerate.
8581 * configure: Likewise.
889bf7c5 8582
5f7d1694
PP
85832009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8584
8585 PR gdb/10757
8586 * thread-db.c (attach_thread): New function.
8587 (maybe_attach_thread): Return success/failure.
8588 (find_new_threads_callback): Adjust.
889bf7c5
PA
8589 (thread_db_find_new_threads): Loop until no new threads.
8590
88e3b899
PA
85912009-10-13 Pedro Alves <pedro@codesourcery.com>
8592
8593 * proc-service.c (ps_lgetregs): Formatting.
8594
cdbfd419
PP
85952009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8596
8597 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8598 * configure.ac: Adjust.
8599 * linux-low.h (struct process_info_private): Move members to struct
8600 thread_db.
8601 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8602 * linux-low.c (linux_remove_process): Adjust.
8603 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8604 * server.c (handle_query): Move code ...
8605 (handle_monitor_command): ... here. New function.
8606 * target.h (struct target_ops): New member.
8607 * thread-db.c (struct thread_db): New.
8608 (libthread_db_search_path): New variable.
8609 (thread_db_create_event, thread_db_enable_reporting)
8610 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8611 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8612 (try_thread_db_load_1, dladdr_to_soname): New functions.
8613 (try_thread_db_load, thread_db_load_search): New functions.
8614 (thread_db_init): Search for libthread_db.
8615 (thread_db_free): New function.
8616 (thread_db_handle_monitor_command): Likewise.
8617 * config.in: Regenerate.
8618 * configure: Regenerate.
889bf7c5 8619
4168d2d6
UW
86202009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8621
8622 * spu-low.c (spu_kill): Wait for inferior to terminate.
8623 Call clear_inferiors.
8624 (spu_detach): Call clear_inferiors.
8625
81ecdfbb
RW
86262009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8627
8628 * aclocal.m4: Regenerate.
8629 * config.in: Likewise.
8630 * configure: Likewise.
8631
0b9ff2c0
UW
86322009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8633
8634 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8635 (parse_spufs_run): New function.
8636 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8637 (ppc_breakpoint_at): Handle SPU breakpoints.
8638
efcbbd14
UW
86392009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8640
8641 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8642 (SPUFS_MAGIC): Define.
8643 (spu_enumerate_spu_ids): New function.
8644 (linux_qxfer_spu): New function.
8645 (linux_target_ops): Install linux_qxfer_spu.
8646
f4d9bade
UW
86472009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8648
8649 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8650 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8651 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8652 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8653 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8654 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8655 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8656 (init_registers_powerpc_cell32l): Add prototype.
8657 (init_registers_powerpc_cell64l): Likewise.
8658 (ppc_arch_setup): Detect Cell/B.E. architecture.
8659
96e946ca
RW
86602009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8661
8662 * Makefile.in (datarootdir): New variable.
8663
58d6951d
DJ
86642009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8665
8666 * linux-low.c (linux_write_memory): Update debugging output.
8667 * Makefile.in (clean): Add new descriptions.
8668 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8669 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8670 * configure.srv: Add new files for arm*-*-linux*.
8671 * linux-arm-low.c: Add new declarations.
8672 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8673 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8674 (HWCAP_VFPv3D16): New.
8675 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8676 instead of __IWMMXT__.
8677 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8678 (arm_arch_setup): New.
8679 (target_regsets): Remove #ifdef. Add VFP regset.
8680 (the_low_target): Use arm_arch_setup.
8681
12b42a12
DJ
86822009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8683
8684 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8685 the main thread again.
8686
ac8c974e
AR
86872009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8688
8689 Adding Neutrino gdbserver.
8690 * configure: Regenerated.
8691 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8692 * configure.srv (i[34567]86-*-nto*): New target.
8693 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8694 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8695 (nto_comctrl) [__QNX__]: New function.
8696 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8697
4424e0c3 86982009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
8699
8700 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8701 srv_tgtobj.
8702
912cf4ba
PA
87032009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8704 Pedro Alves <pedro@codesourcery.com>
8705
8706 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8707 don't support CONTEXT_EXTENDED_REGISTERS.
8708 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8709 (the_low_target): Install them.
8710 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8711 failing with ERROR_PIPE_NOT_CONNECTED.
8712
aa5ca48f
DE
87132009-06-30 Doug Evans <dje@google.com>
8714 Pierre Muller <muller@ics.u-strasbg.fr>
8715
8716 Add h/w watchpoint support to x86-linux, win32-i386.
8717 * Makefile.in (SFILES): Add i386-low.c
8718 (i386_low_h): Define.
8719 (i386-low.o): Add dependencies.
8720 (linux-x86-low.o): Add i386-low.h dependency.
8721 (win32-i386-low.o): Ditto.
8722 * i386-low.c: New file.
8723 * i386-low.h: New file.
8724 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8725 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8726 * linux-low.c (linux_add_process): Initialize arch_private.
8727 (linux_remove_process): Free arch_private.
8728 (add_lwp): Initialize arch_private.
8729 (delete_lwp): Free arch_private.
8730 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8731 provided.
8732 * linux-low.h (process_info_private): New member arch_private.
8733 (lwp_info): New member arch_private.
8734 (linux_target_ops): New members new_process, new_thread,
8735 prepare_to_resume.
8736 (ptid_of): New macro.
8737 * linux-x86-low.c: Include stddef.h, i386-low.h.
8738 (arch_process_info): New struct.
8739 (arch_lwp_info): New struct.
8740 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8741 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8742 (i386_dr_low_get_status): New function.
8743 (x86_insert_point, x86_remove_point): New functions.
8744 (x86_stopped_by_watchpoint): New function.
8745 (x86_stopped_data_address): New function.
8746 (x86_linux_new_process, x86_linux_new_thread): New functions.
8747 (x86_linux_prepare_to_resume): New function.
8748 (the_low_target): Add entries for insert_point, remove_point,
8749 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8750 prepare_to_resume.
8751 * server.c (debug_hw_points): New global.
8752 (monitor_show_help): Document set debug-hw-points.
8753 (handle_query): Process "set debug-hw-points".
8754 * server.h (debug_hw_points): Declare.
8755 (paddress): Declare.
8756 * utils.c (NUMCELLS, CELLSIZE): New macros.
8757 (get_sell, xsnprintf, paddress): New functions.
8758 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8759 remove_point, stopped_by_watchpoint, stopped_data_address.
8760 * win32-i386-low.c: Include i386-low.h.
8761 (debug_reg_state): Replaces dr.
8762 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8763 (i386_dr_low_get_status): New function.
8764 (i386_insert_point, i386_remove_point): New functions.
8765 (i386_stopped_by_watchpoint): New function.
8766 (i386_stopped_data_address): New function.
8767 (i386_initial_stuff): Update.
8768 (get_thread_context,set_thread_context,i386_thread_added): Update.
8769 (the_low_target): Add entries for insert_point,
8770 remove_point, stopped_by_watchpoint, stopped_data_address.
8771 * win32-low.c (win32_insert_watchpoint): New function.
8772 (win32_remove_watchpoint): New function.
8773 (win32_stopped_by_watchpoint): New function.
8774 (win32_stopped_data_address): New function.
8775 (win32_target_ops): Add entries for insert_watchpoint,
8776 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8777 * win32-low.h (win32_target_ops): New members insert_point,
8778 remove_point, stopped_by_watchpoint, stopped_data_address.
8779
d993e290
PA
87802009-06-25 Pedro Alves <pedro@codesourcery.com>
8781
8782 * server.c (process_serial_event): Re-return unsupported, not
8783 error, if the type isn't recognized. Re-allow supporting only
8784 insert or remove packets. Also call require_running for
8785 breakpoints. Add missing break statement to default case. Tidy.
8786 * target.h (struct target_ops): Rename insert_watchpoint to
8787 insert_point, and remove_watchpoint to remove_point.
8788
8789 * linux-low.h (struct linux_target_ops): Likewise.
8790 * linux-low.c (linux_insert_watchpoint): Rename to ...
8791 (linux_insert_point): ... this. Adjust.
8792 (linux_remove_watchpoint): Rename to ...
8793 (linux_remove_point): ... this. Adjust.
8794 (linux_target_ops): Adjust.
8795 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8796 (cris_insert_point): ... this.
8797 (cris_remove_watchpoint): Rename to ...
8798 (cris_remove_point): ... this.
8799 (the_low_target): Adjust.
8800
0f54c268
PM
88012009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8802
8803 * server.c (handle_v_kill): Pass signal_pid to
8804 kill_inferior if multi_process is zero.
8805
c6314022
AR
88062009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8807
8808 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8809 * target.h (target_ops): Comment for *_watchpoint to make it clear
8810 the functions can get types '0' and '1'.
8811
4463ce24
AR
88122009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8813
8814 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8815 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8816 * regcache.c (get_regcache): Likewise.
8817 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8818 * win32-low.c (child_fetch_inferior_registers): Remove check for
8819 regno 0.
8820
cf8fd78b
PA
88212009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8822 Pedro Alves <pedro@codesourcery.com>
8823
8824 * target.h (struct target_ops) <supports_multi_process>: New
8825 callback.
8826 (target_supports_multi_process): New.
8827 * server.c (handle_query): Even if GDB reports support, only
8828 enable multi-process if the target also supports it. Report
8829 multi-process support only if the target backend supports it.
8830 * linux-low.c (linux_supports_multi_process): New function.
8831 (linux_target_ops): Install it as target_supports_multi_process
8832 callback.
8833
47c0c975
DE
88342009-05-24 Doug Evans <dje@google.com>
8835
e09875d4
DE
8836 Global renaming of find_thread_pid to find_thread_ptid.
8837 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8838 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8839 All callers updated.
8840
e27d73f6
DE
8841 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8842 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8843 directly.
8844
47c0c975
DE
8845 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8846 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8847 (linux_resume_one_lwp): Ditto.
8848
2acc282a
DE
88492009-05-23 Doug Evans <dje@google.com>
8850
8851 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8852 from struct inferior_list_entry * to struct lwp_info *.
8853 All callers updated.
8854
9f1036c1
DE
88552009-05-13 Doug Evans <dje@google.com>
8856
8857 * linux-x86-low.c: Don't include assert.h.
8858 (x86_siginfo_fixup): Use fatal, not assert.
8859 (x86_arch_setup): Fix comment.
8860
d0722149
DE
88612009-05-12 Doug Evans <dje@google.com>
8862
8863 Biarch support for i386/amd64 gdbserver.
8864 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8865 Add linux-x86-low.c.
8866 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8867 (linux-x86-low.o): Add.
8868 * linux-x86-64-low.c: Delete.
8869 * linux-i386-low.c: Delete.
8870 * linux-x86-low.c: New file.
8871 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8872 linux-x86-low.o.
8873 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8874 linux-x86-low.o.
8875 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8876 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8877 (linux_child_pid_to_exec_file): New function.
8878 (elf_64_header_p, elf_64_file_p): New functions.
8879 (siginfo_fixup): New function.
8880 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8881 give target a chance to convert layout.
8882 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8883 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8884
fdeb2a12
DE
88852009-05-07 Doug Evans <dje@google.com>
8886
8887 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8888 (regsets_store_inferior_registers): Ditto.
8889
a6dbe5df
PA
88902009-05-06 Pedro Alves <pedro@codesourcery.com>
8891
8892 PR server/10048
8893
8894 * linux-low.c (must_set_ptrace_flags): Delete.
8895 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8896 of the global.
8897 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8898 `lwp->must_set_ptrace_flags' instead.
ba42693b 8899 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
8900 (linux_wait_1): ... not here.
8901
5091eb23
DE
89022009-04-30 Doug Evans <dje@google.com>
8903
9f767825
DE
8904 * inferiors.c (started_inferior_callback): New function.
8905 (attached_inferior_callback): New function.
8906 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8907 * server.c (print_started_pid, print_attached_pid): New functions.
8908 (detach_or_kill_for_exit): New function.
8909 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8910 * server.h (have_started_inferiors_p): Declare.
8911 (have_attached_inferiors_p): Declare.
8912
5091eb23
DE
8913 * inferiors.c (remove_process): Fix memory leak, free process.
8914 * linux-low.c (linux_remove_process): New function.
8915 (linux_kill): Call it instead of remove_process.
8916 (linux_detach, linux_wait_1): Ditto.
8917
155c8968
PA
89182009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8919
8920 * configure.srv: Add x86 Windows CE target.
8921
7fe519cb
UW
89222009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8923
8924 * inferiors.c (get_thread_process): Make global.
8925 * server.h (get_thread_process): Add prototype.
8926 * thread-db.c (find_one_thread): Use get_thread_process
8927 instead of current_process.
8928 (thread_db_get_tls_address): Do not crash if called when
8929 thread layer is not yet initialized.
8930
5472f405
UW
89312009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8932
8933 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8934 * spu-low.c (current_tid): Rename to ...
8935 (current_ptid): ... this.
8936 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8937 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8938 ptid_get_lwp (current_ptid) instead of current_tid.
8939 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8940 instead of current_tid. Use find_process_pid to verify pid
8941 argument is valid. Pass proper argument to remove_process.
8942 (spu_thread_alive): Compare current_ptid instead of current_tid.
8943 (spu_resume): Likewise.
8944
55ac2b99
PA
89452009-04-02 Pedro Alves <pedro@codesourcery.com>
8946
8947 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8948 variable.
8949
95954743
PA
89502009-04-01 Pedro Alves <pedro@codesourcery.com>
8951
8952 Implement the multiprocess extensions, and add linux multiprocess
8953 support.
8954
8955 * server.h (ULONGEST): Declare.
8956 (struct ptid, ptid_t): New.
8957 (minus_one_ptid, null_ptid): Declare.
8958 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8959 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8960 (struct inferior_list_entry): Change `id' type from unsigned from
8961 to ptid_t.
8962 (struct sym_cache, struct breakpoint, struct
8963 process_info_private): Forward declare.
8964 (struct process_info): Declare.
8965 (current_process): Declare.
8966 (all_processes): Declare.
8967 (initialize_inferiors): Declare.
8968 (add_thread): Adjust to use ptid_t.
8969 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8970 (add_process, remove_process, find_thread_pid): Declare.
8971 (find_inferior_id): Adjust to use ptid_t.
8972 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8973 (multi_process): Declare.
8974 (push_event): Adjust to use ptid_t.
8975 (read_ptid, write_ptid): Declare.
8976 (prepare_resume_reply): Adjust to use ptid_t.
8977 (clear_symbol_cache): Declare.
8978 * inferiors.c (all_processes): New.
8979 (null_ptid, minus_one_ptid): New.
8980 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8981 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8982 (add_thread): Change unsigned long to ptid. Remove gdb_id
8983 parameter. Adjust.
8984 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8985 (gdb_id_to_thread): Rename to ...
8986 (find_thread_pid): ... this. Change unsigned long to ptid.
8987 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8988 (loaded_dll, pull_pid_from_list): Adjust.
8989 (add_process, remove_process, find_process_pid)
8990 (get_thread_process, current_process, initialize_inferiors): New.
8991 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8992 (struct target_waitstatus) <related_pid>: Ditto.
8993 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8994 return type to int.
8995 (struct target_ops) <join>: Add `pid' argument.
8996 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8997 (struct target_ops) <wait>: Add `ptid' field. Change return type
8998 to ptid.
8999 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9000 (mywait): Add `ptid' argument. Change return type to ptid_t.
9001 (target_pid_to_str): Declare.
9002 * target.c (set_desired_inferior): Adjust to use ptids.
9003 (mywait): Add new `ptid' argument. Adjust.
9004 (target_pid_to_str): New.
9005 * mem-break.h (free_all_breakpoints): Declare.
9006 * mem-break.c (breakpoints): Delelete.
9007 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9008 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9009 to use per-process breakpoint list.
9010 (free_all_breakpoints): New.
9011 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9012 (symbol_cache, all_symbols_looked_up): Delete.
9013 (hexchars): New.
9014 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9015 read_ptid): New.
9016 (prepare_resume_reply): Change ptid argument's type from unsigned
9017 long to ptid_t. Adjust. Implement W;process and X;process.
9018 (free_sym_cache, clear_symbol_cache): New.
9019 (look_up_one_symbol): Adjust to per-process symbol cache. *
9020 * server.c (cont_thread, general_thread, step_thread): Change type
9021 to ptid_t.
9022 (attached): Delete.
9023 (multi_process): New.
9024 (last_ptid): Change type to ptid_t.
9025 (struct vstop_notif) <ptid>: Change type to ptid_t.
9026 (queue_stop_reply, push_event): Change `ptid' argument's type to
9027 ptid_t.
9028 (discard_queued_stop_replies): Add `pid' argument.
9029 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9030 changes. Don't reference the `attached' global.
9031 (attach_inferior): Adjust to mywait interface changes.
9032 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9033 features. Handle and report "multiprocess+". Handle
9034 "qAttached:PID".
9035 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9036 changes.
9037 (handle_v_kill): New.
9038 (handle_v_stopped): Adjust to use target_pid_to_str.
9039 (handle_v_requests): Allow multiple attaches and runs when
9040 multiprocess extensions are in effect. Handle "vKill".
9041 (myresume): Adjust to use ptids.
9042 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9043 (handle_status): Adjust to discard_queued_stop_replies interface
9044 change.
9045 (first_thread_of, kill_inferior_callback)
9046 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9047 (main): Call initialize_inferiors. Adjust to use ptids, killing
9048 and detaching from all inferiors. Handle multiprocess packet
9049 variants.
9050 * linux-low.h: Include gdb_proc_service.h.
9051 (struct process_info_private): New.
9052 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9053 <lwpid_of>: Use ptid_get_lwp.
9054 (get_lwp_thread): Adjust.
9055 (struct lwp_info): Add `dead' member.
9056 (find_lwp_pid): Declare.
9057 * linux-low.c (thread_db_active): Delete.
9058 (new_inferior): Adjust comment.
9059 (inferior_pid): Delete.
9060 (linux_add_process): New.
9061 (handle_extended_wait): Adjust.
9062 (add_lwp): Change unsigned long to ptid.
9063 (linux_create_inferior): Add process to processes table. Adjust
9064 to use ptids. Don't set new_inferior here.
9065 (linux_attach_lwp): Rename to ...
9066 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9067 it. Adjust to use ptids.
9068 (linux_attach_lwp): New.
9069 (linux_attach): Add process to processes table. Don't set
9070 new_inferior here.
9071 (struct counter): New.
9072 (second_thread_of_pid_p, last_thread_of_process_p): New.
9073 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9074 multiple processes.
9075 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9076 processes. Remove process from process table.
9077 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9078 to multiple processes.
9079 (any_thread_of): New.
9080 (linux_detach): Add `pid' argument, and handle it. Remove process
9081 from processes table.
9082 (linux_join): Add `pid' argument. Handle it.
9083 (linux_thread_alive): Change unsighed long argument to ptid_t.
9084 Consider dead lwps as not being alive.
9085 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9086 threads we're not interested in.
9087 (same_lwp, find_lwp_pid): New.
9088 (linux_wait_for_lwp): Change `pid' argument's type from int to
9089 ptid_t. Adjust.
9090 (linux_wait_for_event): Rename to ...
9091 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9092 from int to ptid_t. Adjust.
9093 (linux_wait_for_event): New.
9094 (linux_wait_1): Add `ptid' argument. Change return type to
9095 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9096 that exit from the process table.
9097 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9098 Adjust.
9099 (mark_lwp_dead): New.
9100 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9101 stopping all threads, mark its main lwp as dead.
9102 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9103 ptids.
9104 (fetch_register, usr_store_inferior_registers)
9105 (regsets_fetch_inferior_registers)
9106 (regsets_store_inferior_registers, linux_read_memory)
9107 (linux_write_memory): Inline `inferior_pid'.
9108 (linux_look_up_symbols): Adjust to use per-process
9109 `thread_db_active'.
9110 (linux_request_interrupt): Adjust to use ptids.
9111 (linux_read_auxv): Inline `inferior_pid'.
9112 (initialize_low): Don't reference thread_db_active.
9113 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9114 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9115 (ps_getpid): Return the pid of the current inferior.
9116 * thread-db.c (proc_handle, thread_agent): Delete.
9117 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9118 per-process data.
9119 (find_one_thread): Change argument type to ptid_t. Adjust to
9120 per-process data.
9121 (maybe_attach_thread): Adjust to per-process data and ptids.
9122 (thread_db_find_new_threads): Ditto.
9123 (thread_db_init): Ditto.
9124 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9125 processes table. Adjust to use ptids.
9126 (spu_kill, spu_detach): Adjust interface. Remove process from
9127 processes table.
9128 (spu_join, spu_thread_alive): Adjust interface.
9129 (spu_wait): Adjust interface. Remove process from processes
9130 table. Adjust to use ptids.
9131 * win32-low.c (current_inferior_tid): Delete.
9132 (current_inferior_ptid): New.
9133 (debug_event_ptid): New.
9134 (thread_rec): Take a ptid. Adjust.
9135 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9136 (child_delete_thread): Ditto.
9137 (do_initial_child_stuff): Add `attached' argument. Add process to
9138 processes table.
9139 (child_fetch_inferior_registers, child_store_inferior_registers):
9140 Adjust.
9141 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9142 (win32_attach): Pass 1 to do_initial_child_stuff.
9143 (win32_kill): Adjust interface. Remove process from processes
9144 table.
9145 (win32_detach): Ditto.
9146 (win32_join): Adjust interface.
9147 (win32_thread_alive): Take a ptid.
9148 (win32_resume): Adjust to use ptids.
9149 (get_child_debug_event): Ditto.
9150 (win32_wait): Adjust interface. Remove exiting process from
9151 processes table.
9152
bd99dc85
PA
91532009-04-01 Pedro Alves <pedro@codesourcery.com>
9154
9155 Non-stop mode support.
9156
9157 * server.h (non_stop): Declare.
9158 (gdb_client_data, handler_func): Declare.
9159 (delete_file_handler, add_file_handler, start_event_loop):
9160 Declare.
9161 (handle_serial_event, handle_target_event, push_event)
9162 (putpkt_notif): Declare.
9163 * target.h (enum resume_kind): New.
9164 (struct thread_resume): Replace `step' field by `kind' field.
9165 (TARGET_WNOHANG): Define.
9166 (struct target_ops) <wait>: Add `options' argument.
9167 <supports_non_stop, async, start_non_stop>: New fields.
9168 (target_supports_non_stop, target_async): New.
9169 (start_non_stop): Declare.
9170 (mywait): Add `options' argument.
9171 * target.c (mywait): Add `options' argument. Print child exit
9172 notifications here.
9173 (start_non_stop): New.
9174 * server.c (non_stop, own_buf, mem_buf): New globals.
9175 (struct vstop_notif): New.
9176 (notif_queue): New global.
9177 (queue_stop_reply, push_event, discard_queued_stop_replies)
9178 (send_next_stop_reply): New.
9179 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9180 interface changes.
9181 (attach_inferior): In non-stop mode, don't wait for the target
9182 here.
9183 (handle_general_set): Handle QNonStop.
9184 (handle_query): When handling qC, return the current general
9185 thread, instead of the first thread of the list.
9186 (handle_query): If the backend supports non-stop mode, include
9187 QNonStop+ in the qSupported query response.
9188 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9189 and non-stop mode.
9190 (handle_v_attach, handle_v_run): Handle non-stop mode.
9191 (handle_v_stopped): New.
9192 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9193 (myresume): Adjust to use resume_kind. Handle non-stop.
9194 (queue_stop_reply_callback): New.
9195 (handle_status): Handle non-stop mode.
9196 (main): Clear non_stop flag on reconnection. Use the event-loop.
9197 Refactor serial protocol handling from here ...
9198 (process_serial_event): ... to this new function. When GDB
9199 selects any thread, select one here. In non-stop mode, wait until
9200 GDB acks all pending events before exiting.
9201 (handle_serial_event, handle_target_event): New.
9202 * remote-utils.c (remote_open): Install remote_desc in the event
9203 loop.
9204 (remote_close): Remove remote_desc from the event loop.
9205 (putpkt_binary): Rename to...
9206 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9207 (putpkt_binary): New as wrapper around putpkt_binary_1.
9208 (putpkt_notif): New.
9209 (prepare_resume_reply): In non-stop mode, don't change the
9210 general_thread.
9211 * event-loop.c: New.
9212 * Makefile.in (OBJ): Add event-loop.o.
9213 (event-loop.o): New rule.
9214
9215 * linux-low.h (pid_of): Moved here.
9216 (lwpid_of): New.
9217 (get_lwp_thread): Use lwpid_of.
9218 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9219 * linux-low.c (pid_of): Delete.
9220 (inferior_pid): Use lwpid_of.
9221 (linux_event_pipe): New.
9222 (target_is_async_p): New.
9223 (delete_lwp): New.
9224 (handle_extended_wait): Use lwpid_of.
9225 (add_lwp): Don't set lwpid field.
9226 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9227 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9228 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9229 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9230 first. Adjust to linux_wait_for_event interface changes. Use
9231 lwpid_of.
9232 (linux_detach): Don't delete the main lwp here.
9233 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9234 (status_pending_p): Don't consider explicitly suspended lwps.
9235 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9236 pointer. Add OPTIONS argument. Change return type to int. Use
9237 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9238 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9239 pointer. Add status pointer argument. Return a pid instead of a
9240 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9241 changes. In non-stop mode, don't switch to a random thread.
9242 (linux_wait): Rename to...
9243 (linux_wait_1): ... this. Add target_options argument, and handle
9244 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9245 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9246 clean exit and signal exit code. Don't stop all threads in
9247 non-stop mode. In all-stop mode, only stop all threads when
9248 reporting a stop to GDB. Handle explicit thread stop requests.
9249 (async_file_flush, async_file_mark): New.
9250 (linux_wait): New.
9251 (send_sigstop): Use lwpid_of.
9252 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9253 interface changes. In non-stop mode, don't switch to a random
9254 thread.
9255 (linux_resume_one_lwp): Use lwpid_of.
9256 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9257 (linux_resume_one_thread): ... this. Handle resume_stop. In
9258 non-stop mode, don't look for pending flag in all threads.
9259 (resume_status_pending_p): Don't consider explicitly suspended
9260 threads.
9261 (my_waitpid): Reimplement. Emulate __WALL.
9262 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9263 Use lwpid_of.
9264 (sigchld_handler, linux_supports_non_stop, linux_async)
9265 (linux_start_non_stop): New.
9266 (linux_target_ops): Register linux_supports_non_stop, linux_async
9267 and linux_start_non_stop.
9268 (initialize_low): Install SIGCHLD handler.
9269 * thread-db.c (thread_db_create_event, find_one_thread)
9270 (thread_db_get_tls_address): Use lwpid_of.
9271 * win32-low.c (win32_detach): Adjust to use resume_kind.
9272 (win32_wait): Add `options' argument.
9273 * spu-low.c (spu_resume): Adjust to use resume_kind.
9274 (spu_wait): Add `options' argument.
9275
5b1c542e
PA
92762009-04-01 Pedro Alves <pedro@codesourcery.com>
9277
9278 Decouple target code from remote protocol.
9279
9280 * target.h (enum target_waitkind): New.
9281 (struct target_waitstatus): New.
9282 (struct target_ops) <wait>: Return an unsigned long. Take a
9283 target_waitstatus pointer instead of a char pointer.
9284 (mywait): Likewise.
9285 * target.c (mywait): Change prototype to return an unsigned long.
9286 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9287 * server.h (thread_from_wait, old_thread_from_wait): Delete
9288 declarations.
9289 (prepare_resume_reply): Change prototype to take a
9290 target_waitstatus.
9291 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9292 (last_status, last_ptid): New.
9293 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9294 pid instead of a signal.
9295 (attach_inferior): Remove "status" and "signal" parameters.
9296 Adjust.
9297 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9298 not as an address.
9299 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9300 (handle_v_requests, myresume): Remove "status" and "signal"
9301 parameters. Adjust.
9302 (handle_status): New.
9303 (main): Delete local `status'. Adjust.
9304 * remote-utils.c: Include target.h.
9305 (prepare_resume_reply): Change prototype to take a
9306 target_waitstatus. Adjust.
9307
9308 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9309 interface.
9310 * spu-low.c (spu_wait): Adjust.
9311 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9312 Delete.
9313 (win32_wait): Adjust.
9314
2bd7c093
PA
93152009-04-01 Pedro Alves <pedro@codesourcery.com>
9316
9317 * target.h (struct thread_resume): Delete leave_stopped member.
9318 (struct target_ops): Add a `n' argument to the `resume' callback.
9319 * server.c (start_inferior): Adjust.
9320 (handle_v_cont, myresume): Adjust.
9321 * linux-low.c (check_removed_breakpoint): Adjust to resume
9322 interface change, and to removed leave_stopped field.
9323 (resume_ptr): Delete.
9324 (struct thread_resume_array): New.
9325 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9326 resume interface change.
9327 (linux_continue_one_thread, linux_queue_one_thread)
9328 (resume_status_pending_p): Check if the resume field is NULL
9329 instead of checking the leave_stopped member.
9330 (linux_resume): Adjust to the target resume interface change.
9331 * spu-low.c (spu_resume): Adjust to the target resume interface
9332 change.
9333 * win32-low.c (win32_detach, win32_resume): Ditto.
9334
c35fafde
PA
93352009-04-01 Pedro Alves <pedro@codesourcery.com>
9336
9337 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9338 flag.
9339 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9340 pending.
9341 (linux_continue_one_thread): Only preserve the stepping flag if
9342 there's a pending breakpoint.
9343
0a59d50b
PA
93442009-03-31 Pedro Alves <pedro@codesourcery.com>
9345
9346 * server.c (main): After the inferior having exited, call
9347 remote_close before exiting gdbserver.
9348
f04c6d38
TJB
93492009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9350
9351 Fix size of FPSCR in Power 7 processors.
9352 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9353 (PPC_FEATURE_HAS_DFP): New #define.
9354 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9355 size of the FPSCR.
9356
78e5cee6
PA
93572009-03-23 Pedro Alves <pedro@codesourcery.com>
9358
9359 * server.c (handle_query) Whitespace and formatting.
9360
1b3f6016
PA
93612009-03-22 Pedro Alves <pedro@codesourcery.com>
9362
9363 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9364 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9365 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9366 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9367 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9368 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9369 Makefile.in, configure.ac: Fix whitespace throughout.
9370 * configure: Regenerate.
9371
a07b2135
PA
93722009-03-22 Pedro Alves <pedro@codesourcery.com>
9373
9374 * inferiors.c (find_inferior): Make it safe for the callback
9375 function to delete the currently iterated inferior.
9376
67cc2626
PA
93772009-03-22 Pedro Alves <pedro@codesourcery.com>
9378
9379 * Makefile.in (linuw_low_h): Move higher.
9380 (thread-db.o): Depend on $(linux_low_h).
9381
54a0b537
PA
93822009-03-17 Pedro Alves <pedro@codesourcery.com>
9383
9384 Rename "process" to "lwp" throughout.
9385
9386 * linux-low.c (all_processes): Rename to...
9387 (all_lwps): ... this.
9388 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9389 (add_process): Rename to ...
9390 (add_lwp): ... this. Adjust.
9391 (linux_create_inferior): Adjust.
9392 (linux_attach_lwp): Adjust.
9393 (linux_attach): Adjust.
9394 (linux_kill_one_process): Rename to ...
9395 (linux_kill_one_lwp): ... this. Adjust.
9396 (linux_kill): Adjust.
9397 (linux_detach_one_process): Rename to ...
9398 (linux_detach_one_lwp): ... this. Adjust.
9399 (linux_detach): Adjust.
9400 (check_removed_breakpoint): Adjust.
9401 (status_pending_p): Adjust.
9402 (linux_wait_for_process): Rename to ...
9403 (linux_wait_for_lwp): ... this. Adjust.
9404 (linux_wait_for_event): Adjust.
9405 (send_sigstop): Adjust.
9406 (wait_for_sigstop): Adjust.
9407 (stop_all_processes): Rename to ...
9408 (stop_all_lwps): ... this.
9409 (linux_resume_one_process): Rename to ...
9410 (linux_resume_one_lwp): ... this. Adjust.
9411 (linux_set_resume_request, linux_continue_one_thread)
9412 (linux_queue_one_thread, resume_status_pending_p)
9413 (usr_store_inferior_registers, regsets_store_inferior_registers)
9414 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9415 Adjust.
9416 * linux-low.h (get_process): Rename to ...
9417 (get_lwp): ... this. Adjust.
9418 (get_thread_process): Rename to ...
9419 (get_thread_lwp): ... this. Adjust.
9420 (get_process_thread): Rename to ...
9421 (get_lwp_thread): ... this. Adjust.
9422 (struct process_info): Rename to ...
9423 (struct lwp_info): ... this.
9424 (all_processes): Rename to ...
9425 (all_lwps): ... this.
9426 * proc-service.c (ps_lgetregs): Adjust.
9427 * thread-db.c (thread_db_create_event, find_one_thread)
9428 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9429
0b16c5cf
PA
94302009-03-14 Pedro Alves <pedro@codesourcery.com>
9431
9432 * server.c (handle_query): Handle "qAttached".
9433
32de4b9d
NS
94342009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9435
9436 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9437 GPLv3, update license URL.
9438
2aecd87f
DE
94392009-03-01 Doug Evans <dje@google.com>
9440
93efd302 9441 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
9442 (server_h): Add gdb_signals.h.
9443 (signals.o): Update.
9444 * server.h (target_signal_from_host,target_signal_to_host_p)
9445 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9446
86b1f9c5
PM
94472009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9448
9449 * remote-utils.c (getpkt): Also generate remote-debug
9450 information if noack_mode is set.
9451
4aa995e1
PA
94522009-02-06 Pedro Alves <pedro@codesourcery.com>
9453
9454 * server.c (handle_query): Report qXfer:siginfo:read and
9455 qXfer:siginfo:write as supported and handle them.
9456 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9457 * linux-low.c (linux_xfer_siginfo): New.
9458 (linux_target_ops): Set it.
9459
62709adf
PA
94602009-01-26 Pedro Alves <pedro@codesourcery.com>
9461
9462 * server.c (gdbserver_usage): Mention --remote-debug.
9463 (main): Accept '--remote-debug' switch.
9464
aef93bd7
DE
94652009-01-18 Doug Evans <dje@google.com>
9466
9467 * regcache.c (new_register_cache): No need to check result of xcalloc.
9468 * server.c (handle_search_memory): Back out calls to xmalloc,
9469 result is checked and error is returned to user upon failure.
9470 (handle_query): Ditto. Add more checks for result of malloc.
9471 (handle_v_cont): Check result of malloc, report error back to
9472 user upon failure.
9473 (handle_v_run): Ditto. Call freeargv.
9474 * server.h (freeargv): Declare.
9475 * utils.c (freeargv): New fn.
9476
54363045
DE
94772009-01-15 Doug Evans <dje@google.com>
9478
f626972c
DE
9479 * gdbreplay.c (perror_with_name): Make arg const char *.
9480 * server.h (target_signal_to_name): Make return type const char *.
0842e787 9481 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 9482 * utils.c (perror_with_name): Make arg const char *.
54363045 9483
18aae699
PA
94842009-01-14 Pedro Alves <pedro@codesourcery.com>
9485
9486 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9487 when handling a EXIT_PROCESS_DEBUG_EVENT.
9488
ff703abe
JB
94892009-01-06 Joel Brobecker <brobecker@adacore.com>
9490
9491 * gdbreplay.c (gdbreplay_version): Update copyright year.
9492 * server.c (gdbserver_version): Likewise.
9493
f21cc1a2 94942009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
9495
9496 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 9497 (handle_extended_wait): Improve comment.
0e21c1ec 9498
bca929d3
DE
94992008-12-13 Doug Evans <dje@google.com>
9500
9501 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9502 * server.h (ATTR_MALLOC): New macro.
9503 (xmalloc,xcalloc,xstrdup): Declare.
9504 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9505 * inferiors.c: Ditto.
9506 * linux-low.c: Ditto.
9507 * mem-break.c: Ditto.
9508 * regcache.c: Ditto.
9509 * remote-utils.c: Ditto.
9510 * server.c: Ditto.
9511 * target.c: Ditto.
9512 * win32-low.c: Ditto.
9513
97438e3f
DE
95142008-12-12 Doug Evans <dje@google.com>
9515
896c7fbb
DE
9516 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9517 in debugging printf.
9518
97438e3f
DE
9519 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9520
e3b886f8
DE
95212008-12-09 Doug Evans <dje@google.com>
9522
9523 * linux-low.h (struct process_info): Delete member tid, unused.
9524 * thread-db.c (find_one_thread): Update.
9525 (maybe_attach_thread): Update.
9526
07e059b5
VP
95272008-12-02 Pedro Alves <pedro@codesourcery.com>
9528
889bf7c5
PA
9529 * target.h (struct target_ops): Add qxfer_osdata member.
9530 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9531 and dirent.h.
9532 (linux_qxfer_osdata): New functions.
9533 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9534 callback.
9535 * server.c (handle_query): Handle "qXfer:osdata:read:".
9536 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9537 (buffer_xml_printf): New functions.
9538 * server.h (struct buffer): New.
9539 (buffer_grow_str, buffer_grow_str0): New macros.
9540 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9541 (buffer_xml_printf): Declare.
07e059b5 9542
4cab47ab
DE
95432008-11-24 Doug Evans <dje@google.com>
9544
9545 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9546
f142445f
DJ
95472008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9548
9549 * server.c (handle_v_run): Always use the supplied argument list.
9550
d0107bb6 95512008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 9552
d0107bb6
BW
9553 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9554 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 9555
2c4ad781
TJB
95562008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9557
9558 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9559 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9560 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9561 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9562 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9563 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9564 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9565 XML target descriptions.
9566 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9567 when inferior is running on an ISA 2.05 or later processor. Add
9568 special case to return offset for full 64-bit slot of FPSCR when
9569 in 32-bits.
9570
dfb64f85
DJ
95712008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9572
9573 * Makefile.in (SFILES, clean): Added sparc64 files.
9574 (reg-sparc64.o, reg-sparc64.c): New.
9575 * configure.srv (sparc*-*-linux*): New configuration.
9576 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9577 syscall arguments for SPARC.
9578 (regsets_store_inferior_registers): Likewise.
9579 * linux-sparc-low.c: New file.
9580
66b6e1dd
DE
95812008-10-21 Doug Evans <dje@google.com>
9582
9583 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9584 (READLINE_DIR,READLINE_DEP): Delete.
9585 (INTERNAL_CFLAGS): Update.
9586 (LINTFLAGS): Update.
9587
9b710a42
PA
95882008-10-10 Pedro Alves <pedro@codesourcery.com>
9589
9590 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9591 whole argv from the last run, not just argv[0].
9592
5822d809
PA
95932008-09-08 Pedro Alves <pedro@codesourcery.com>
9594
9595 * regcache.c (new_register_cache): Return NULL if the register
9596 cache size isn't known yet.
9597 (free_register_cache): Avoid dereferencing a NULL regcache.
9598
74aac56f
DJ
95992008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9600
9601 * configure.srv: Merge MIPS and MIPS64.
9602
400b20f5
MR
96032008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9604
9605 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9606
677c5bb1
LM
96072008-08-18 Luis Machado <luisgpm@br.ibm.com>
9608
9609 * Makefile.in: Add required vsx dependencies.
9610
9611 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9612 Declare init_registers_powerpc_vsx32l.
9613 Declare init_registers_powerpc_vsx64l.
9614 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9615 (ppc_arch_setup): Check for VSX in hwcap.
9616 (ppc_fill_vsxregset): New function.
9617 (ppc_store_vsxregset): New function.
9618 Add new VSX entry in regset_info target_regsets.
9619
9620 * configure.srv: Add new VSX dependencies.
9621
a6f3e723
SL
96222008-08-12 Pedro Alves <pedro@codesourcery.com>
9623
9624 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9625 (remote_open): Set or clear transport_is_reliable.
9626 (putpkt_binary): Don't expect acks in noack mode.
9627 (getpkt): Don't send ack/nac in noack mode.
9628 * server.c (handle_general_set): Handle QStartNoAckMode.
9629 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9630 qSupported.
9631 (main): Reset noack_mode on every connection.
9632 * server.h (noack_mode): Declare.
9633
a417dc56
RW
96342008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9635
9636 * Makefile.in (GDBREPLAY_OBS): New variable.
9637 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9638
3221518c
UW
96392008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9640 Daniel Jacobowitz <dan@codesourcery.com>
9641
9642 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9643 (usr_store_inferior_registers): Likewise.
9644 (regsets_store_inferior_registers): Likewise.
9645
ec56be1b
PA
96462008-07-31 Rolf Jansen <rj@surtec.com>
9647 Pedro Alves <pedro@codesourcery.com>
9648
9649 * configure.ac: Check for memmem declaration.
9650 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9651 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9652 (disable_packet_qfThreadInfo): Unconditionally compile.
9653 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9654 * configure, config.in: Regenerate.
9655
2fe5e3ff
DE
96562008-07-28 Doug Kwan <dougkwan@google.com>
9657
9658 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9659 (linux_write_memory): Remove declaration of errno.
9660
836acd6d
UW
96612008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9662
9663 * linux-low.c (handle_extended_wait): Do not use "status"
9664 variable uninitialized.
9665
aeba519e
PA
96662008-07-07 Pedro Alves <pedro@codesourcery.com>
9667
9668 * server.c (handle_v_attach): Inhibit reporting dll changes.
9669
db42f210
PA
96702008-06-27 Pedro Alves <pedro@codesourcery.com>
9671
9672 * remote-utils.c (prepare_resume_reply): If requested, don't
9673 output "thread:TID" in the T stop reply.
9674
9675 * server.c (disable_packet_vCont, disable_packet_Tthread)
9676 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9677 (handle_query): If requested, disable support for qC, qfThreadInfo
9678 and qsThreadInfo.
9679 (handle_v_requests): If requested, disable support for vCont.
9680 (gdbserver_show_disableable): New.
9681 (main): Handle --disable-packet and --disable-packet=LIST.
9682
9683 * server.h (disable_packet_vCont, disable_packet_Tthread)
9684 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9685
8e4c5421
CD
96862008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9687
9688 * server.c (gdbserver_usage): Mention --version.
9689
6e23a804
DJ
96902008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9691
9692 * Makefile.in (gdbreplay.o): New rule.
9693
90aa6a40
JM
96942008-06-06 Joseph Myers <joseph@codesourcery.com>
9695
9696 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9697 message, not gdbserver.
9698
c16158bc 96992008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
9700 Nathan Sidwell <nathan@codesourcery.com>
9701 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
9702
9703 * acinclude.m4: Include ../../config/acx.m4.
9704 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9705 * configure, config.in: Regenerate.
9706 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9707 * server.c (gdbserver_version): Print PKGVERSION.
9708 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9709 (main): Adjust gdbserver_usage calls.
9710 * gdbreplay.c (version, host_name): Add declarations.
9711 (gdbreplay_version, gdbreplay_usage): New.
9712 (main): Accept --version and --help options.
9713
aeb75bf5
DJ
97142008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9715
9716 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9717 (arm_breakpoint_at): Handle Thumb.
9718 (the_low_target): Add comment.
9719
76b233dd
UW
97202008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9721
9722 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9723
08388c79
DE
97242008-05-09 Doug Evans <dje@google.com>
9725
a3c83fae
DE
9726 * server.h (decode_search_memory_packet): Declare.
9727 * remote-utils.c (decode_search_memory_packet): New fn.
9728 * server.c (handle_search_memory_1): New fn.
08388c79
DE
9729 (handle_search_memory): New fn.
9730 (handle_query): Process qSearch:memory packets.
9731
bb9c3d36
UW
97322008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9733
9734 * regcache.c (registers_length): Remove.
9735 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9736 full register packet.
9737 * regcache.h (registers_length): Remove prototype.
9738 * server.h (PBUFSIZ): Define to 16384.
9739
7284e1be
UW
97402008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9741
9742 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9743 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9744 powerpc-64l.o, and powerpc-altivec64l.o.
9745 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9746 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9747 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9748 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9749 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9750 to srv_xmlfiles.
9751
9752 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9753 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9754 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9755 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9756 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9757 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9758 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9759 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9760 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9761 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9762 (clean): Update.
9763
9764 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9765 (init_registers_powerpc_32l): ... this new prototype.
9766 (init_registers_powerpc_32): Remove, replace by ...
9767 (init_registers_powerpc_altivec32l): ... this new prototype.
9768 (init_registers_powerpc_e500): Remove, replace by ...
9769 (init_registers_powerpc_e500l): ... this new prototype.
9770 (init_registers_ppc64): Remove, replace by ...
9771 (init_registers_powerpc_64l): ... this new prototype.
9772 (init_registers_powerpc_64): Remove, replace by ...
9773 (init_registers_powerpc_altivec64l): ... this new prototype.
9774 (ppc_num_regs): Set to 73.
9775 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9776 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9777 (ppc_cannot_store_register): Handle orig_r3 and trap.
9778 (ppc_arch_setup): Update init_registers_... calls.
9779 (ppc_fill_gregset): Handle orig_r3 and trap.
9780
9781 * inferiors.c (clear_inferiors): Reset current_inferior.
9782
fdc59709
PB
97832008-04-23 Paolo Bonzini <bonzini@gnu.org>
9784
889bf7c5
PA
9785 * acinclude.m4: Add override.m4.
9786 * configure: Regenerate.
fdc59709 9787
c9b2f845
UW
97882008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9789
9790 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9791 initial call to init_register_ppc64.
9792
550512b8
UW
97932008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9794
43aaf8b6
PA
9795 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9796 single powerpc*-*-linux* case.
550512b8
UW
9797 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9798
b6430ec3
UW
97992008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9800
9801 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 9802 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
9803 from reg_xmlfiles.
9804 * linux-ppc-low.c: Include <elf.h>.
9805 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9806 (ppc_hwcap): New global variable.
9807 (ppc_regmap): Remove __SPE__ #ifdef sections.
9808 (ppc_regmap_e500): New global variable.
9809 (ppc_cannot_store_register): Update __SPE__ special case.
9810 (ppc_get_hwcap): New function.
9811 (ppc_arch_setup): Use it to determine whether inferior supports
9812 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9813 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9814 Do not access registers if target does not support AltiVec.
9815 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9816 Do not access registers if target does not support SPE.
9817 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9818
52fa2412
UW
98192008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9820
9821 * linux-low.c (disabled_regsets, num_regsets): New.
9822 (use_regsets_p): Delete.
9823 (linux_wait_for_process): Clear disabled_regsets.
9824 (regsets_fetch_inferior_registers): Check and set it.
9825 (regsets_store_inferior_registers): Likewise.
9826 (linux_fetch_registers, linux_store_registers): Do not use
9827 use_regsets_p.
9828 (initialize_low): Allocate disabled_regsets.
9829
e28b3332
DJ
98302008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9831
9832 * Makefile.in (LIBOBJS): New.
9833 (OBS): Use LIBOBJS.
9834 (memmem.o): New rule.
9835 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9836 * configure: Regenerated.
9837
4536995d
UW
98382008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9839
9840 * server.c (handle_query): Never return "unsupported" for
9841 qXfer:features:read queries.
9842
221c031f
UW
98432008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9844
9845 * server.c (get_features_xml): Fix inverted condition.
9846 (handle_query): Always support qXfer:feature:read.
9847
ccd213ac
DJ
98482008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9849
9850 * server.c (wrapper_argv): New.
9851 (start_inferior): Handle wrapper_argv. If set, expect an extra
9852 trap.
9853 (gdbserver_usage): Document --wrapper.
9854 (main): Parse --wrapper.
9855
6fe305f7
UW
98562008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9857
9858 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9859 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9860 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9861 (ppc_set_pc): Likewise.
9862 (ppc_arch_setup): New function.
9863 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9864 of collect_register.
889bf7c5 9865 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 9866
5b0a002e
UW
98672008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9868
9869 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9870 instead of linux-ppc64-low.o.
9871 * linux-ppc64-low.c: Remove file.
9872 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9873 (linux-ppc64-low.o): Remove rule.
9874
9875 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9876 (init_registers_powerpc_64): Likewise.
9877 (ppc_regmap): Conditionally define depending on __powerpc64__.
9878 (ppc_cannot_store_register): Do not special-case "fpscr" when
9879 compiled on __powerpc64__.
9880 (ppc_collect_ptrace_register): New function.
9881 (ppc_supply_ptrace_register): New function.
9882 (ppc_breakpoint): Change type to "unsigned int".
9883 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9884 (the_low_target): Conditionally provide initializers for the
889bf7c5 9885 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
9886 collect_ptrace_register and supply_ptrace_register members.
9887
9b4b61c8
UW
98882008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9889
9890 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9891 * server.c (gdbserver_xmltarget): Define.
9892 (get_features_xml): Use it to replace "target.xml" and arch_string.
9893
9894 * configure.srv: Remove srv_xmltarget. Add XML files that were
9895 mentioned there to srv_xmlfiles instead. Remove conditional tests
9896 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9897 srv_xmlfiles and srv_regobj to include all possible choices.
9898 * configure.ac (srv_xmltarget): Remove.
9899 (srv_xmlfiles): Do not add "target.xml".
9900 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9901 checks for supplementary target information.
9902 * configure: Regenerate.
9903 * Makefile.in (XML_TARGET): Remove.
9904 (target.xml): Remove rule.
9905 (clean): Do not clean up target.xml.
9906 (.PRECIOUS): Do not mention target.xml.
9907
9908 * target.h (struct target_ops): Remove arch_string member.
9909 * linux-low.c (linux_arch_string): Remove.
9910 (linux_target_ops): Remove arch_string initializer.
9911 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9912 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9913 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9914 * spu-low.c (spu_arch_string): Remove.
9915 (spu_target_ops): Remove arch_string initializer.
9916 * win32-low.c (win32_arch_string): Remove.
9917 (win32_target_ops): Remove arch_string initializer.
9918 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9919 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9920 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9921
ee1a7ae4
UW
99222008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9923
9924 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9925 by collect_ptrace_register and supply_ptrace_register hooks.
9926 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9927 instead of checking for the_low_target.left_pad_xfer.
9928 (usr_store_inferior_registers): Use collect_ptrace_register callback
9929 instead of checking for the_low_target.left_pad_xfer.
9930
9931 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9932 (s390_supply_ptrace_register): Likewise.
9933 (s390_fill_gregset): Call s390_collect_ptrace_register.
9934 (the_low_target): Update.
9935
9936 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9937 (ppc_supply_ptrace_register): Likewise.
9938 (the_low_target): Update.
9939
9940 * linux-i386-low.c (the_low_target): Update.
9941 * linux-x86-64-low.c (the_low_target): Update.
9942
d61ddec4
UW
99432008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9944
9945 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9946 reg-s390.o and reg-s390x.o.
9947
9948 * linux-low.c (new_inferior): New global variable.
9949 (linux_create_inferior, linux_attach): Set it.
9950 (linux_wait_for_process): Call the_low_target.arch_setup after the
9951 target has stopped for the first time.
9952 (initialize_low): Do not call the_low_target.arch_setup.
9953
9954 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9955 (s390_set_pc): Likewise.
9956 (s390_arch_setup): New function.
9957 (the_low_target): Use s390_arch_setup as arch_setup routine.
9958
9959 * regcache.c (realloc_register_cache): New function.
9960 (set_register_cache): Call it for each existing regcache.
9961
d05b4ac3
UW
99622008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9963
9964 * server.h (init_registers): Remove prototype.
9965
9966 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9967 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9968 instead of init_registers ().
9969 * linux-arm-low.c (init_registers_arm): Add prototype.
9970 (init_registers_arm_with_iwmmxt): Likewise.
9971 (the_low_target): Add initializer for arch_setup field.
9972 * linux-cris-low.c (init_registers_cris): Add prototype.
9973 (the_low_target): Add initializer for arch_setup field.
9974 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9975 (the_low_target): Add initializer for arch_setup field.
9976 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9977 (the_low_target): Add initializer for arch_setup field.
9978 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9979 (the_low_target): Add initializer for arch_setup field.
9980 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9981 (the_low_target): Add initializer for arch_setup field.
9982 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9983 (the_low_target): Add initializer for arch_setup field.
9984 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9985 (init_registers_mips64_linux): Likewise.
9986 (the_low_target): Add initializer for arch_setup field.
9987 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9988 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9989 (the_low_target): Add initializer for arch_setup field.
9990 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9991 (init_registers_powerpc_64): Likewise.
9992 (the_low_target): Add initializer for arch_setup field.
9993 * linux-s390-low.c (init_registers_s390): Add prototype.
9994 (init_registers_s390x): Likewise.
9995 (the_low_target): Add initializer for arch_setup field.
9996 * linux-sh-low.c (init_registers_sh): Add prototype.
9997 (the_low_target): Add initializer for arch_setup field.
9998 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9999 (the_low_target): Add initializer for arch_setup field.
10000 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10001 (the_low_target): Add initializer for arch_setup field.
10002
10003 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10004 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10005 instead of init_registers ().
10006 * win32-arm-low.c (init_registers_arm): Add prototype.
10007 (the_low_target): Add initializer for arch_setup field.
10008 * win32-i386-low.c (init_registers_i386): Add prototype.
10009 (the_low_target): Add initializer for arch_setup field.
10010
10011 * spu-low.c (init_registers_spu): Add prototype.
10012 (initialize_low): Call initialie_registers_spu () instead of
10013 initialize_registers ().
10014
fd96d250
PA
100152008-02-19 Pedro Alves <pedro@codesourcery.com>
10016
10017 * server.c (handle_v_requests): When handling the vRun and vAttach
10018 packets, if already debugging a process, don't kill it. Return an
10019 error instead.
10020
d41b6bb4
DJ
100212008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10022
10023 * server.c (handle_query): Correct length check.
10024
5ac588cf
PA
100252008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10026
10027 * win32-low.c (do_initial_child_stuff): Add process handle
10028 parameter. Set current_process_handle and current_process_id from the
10029 parameters. Clear globals.
10030 (win32_create_inferior): Don't set current_process_handle and
10031 current_process_id here. Instead pass them on the call to
10032 do_initial_child_stuff.
10033 (win32_attach): Likewise.
10034 (win32_clear_inferiors): New.
10035 (win32_kill): Don't close the current process handle or the
10036 current thread handle here. Instead call win32_clear_inferiors.
10037 (win32_detach): Don't open a new handle to the process. Call
10038 win32_clear_inferiors.
10039 (win32_join): Don't rely on current_process_handle; open a new
10040 handle using the process id.
10041 (win32_wait): Call win32_clear_inferiors when the inferior process
10042 has exited.
10043
ecd7ecbc
DJ
100442008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10045
10046 * server.c (monitor_show_help): Add "exit".
10047
1525d545
MG
100482008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10049
ecd7ecbc 10050 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
10051 (clean): Add reg-xtensa.c.
10052 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
10053 * configure.srv (xtensa*-*-linux*) New target.
10054 * linux-xtensa-low.c: New.
10055 * xtensa-xtregs.c: New.
1525d545 10056
59a016f0
PA
100572008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10058
10059 * hostio.c: Don't include errno.h.
10060 (errno_to_fileio_errno): Move to hostio-errno.
10061 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10062 error number outputting to the target->hostio_last_error callback.
10063 (hostio_packet_error): Use FILEIO_EINVAL directly.
10064 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10065 calls to hostio_error.
10066 * hostio-errno.c: New.
10067 * server.h (hostio_last_error_from_errno): Declare.
10068 * target.h (target_ops): Add hostio_last_error member.
10069 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10070 as hostio_last_error handler.
889bf7c5 10071 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
10072 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10073 (wince_hostio_last_error): New functions.
10074 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10075 as hostio_last_error handler.
10076 (win32_target_ops) [!_WIN32_WCE]: Register
10077 hostio_last_error_from_errno as hostio_last_error handler.
10078 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10079 (hostio-errno.o): New rule.
10080 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10081 * configure.srv (srv_hostio_err_objs): New variable. Default to
10082 hostio-errno.o.
10083 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10084 * configure: Regenerate.
10085
2d717e4f
DJ
100862008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10087
10088 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10089 (linux_kill, linux_detach): Clean up the process list.
10090 * remote-utils.c (remote_open): Improve port number parsing.
10091 (putpkt_binary, input_interrupt): Only send interrupts if the target
10092 is running.
10093 * server.c (extended_protocol): Make static.
10094 (attached): Define earlier.
10095 (exit_requested, response_needed, program_argv): New variables.
10096 (target_running): New.
10097 (start_inferior): Clear attached here.
10098 (attach_inferior): Set attached here.
10099 (require_running): Define.
10100 (handle_query): Use require_running and target_running. Implement
10101 "monitor exit".
10102 (handle_v_attach, handle_v_run): New.
10103 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10104 (gdbserver_usage): Update.
10105 (main): Redo argument parsing. Handle --debug and --multi. Handle
10106 --attach along with other options or after the port. Save
10107 program_argv. Support no initial program. Resynchronize
10108 communication with GDB after an error. Handle "monitor exit".
10109 Use require_running and target_running. Always allow the extended
10110 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10111 restart in extended mode.
10112 * README: Refer to the GDB manual. Update --attach usage.
10113
7407e2de
AS
101142007-12-20 Andreas Schwab <schwab@suse.de>
10115
10116 * linux-low.c (STACK_SIZE): Define.
10117 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10118 (linux_test_for_tracefork): Likewise.
10119
b65d95c5
DJ
101202007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10121
10122 * linux-low.c (linux_wait_for_event): Update messages. Do not
10123 reinsert auto-delete breakpoints.
10124 * mem-break.c (struct breakpoint): Change return type of handler to
10125 int.
10126 (set_breakpoint_at): Update handler type.
10127 (reinsert_breakpoint_handler): Return 1 instead of calling
10128 delete_breakpoint.
10129 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10130 setting a new one.
10131 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10132 * mem-break.h (set_breakpoint_at): Update handler type.
10133 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10134 * win32-low.c (auto_delete_breakpoint): New.
10135 (get_child_debug_event): Use it.
10136
4e799345
DJ
101372007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10138
10139 * configure.ac: Check for pread and pwrite.
10140 * hostio.c (handle_pread): Fall back to lseek and read.
10141 (handle_pwrite): Fall back to lseek and write.
10142 * config.in, configure: Regenerated.
10143
27524b67
DJ
101442007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10145
10146 * server.c (myresume): Add own_buf argument.
10147 (main): Update calls.
10148
a20d5e98
DJ
101492007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10150
10151 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10152 * remote-utils.c (remote_open): Do not call disable_async_io.
10153 (block_async_io): Delete.
10154 (unblock_async_io): Make static.
10155 (initialize_async_io): New.
10156 * server.c (handle_v_cont): Handle async I/O here.
10157 (myresume): Likewise. Move other common resume tasks here...
10158 (main): ... from here. Call initialize_async_io. Disable async
10159 I/O before the main loop.
10160 * server.h (initialize_async_io): Declare.
10161 (block_async_io, unblock_async_io): Delete prototypes.
10162 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10163
b79d787e
DJ
101642007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10165
10166 * remote-utils.c (readchar): Allow binary data in received messages.
10167
d97903b2
PA
101682007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10169
10170 * win32-low.c (attaching): New global.
10171 (win32_create_inferior): Clear the `attaching' global.
10172 (win32_attach): Set the `attaching' global.
10173 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10174 attaching. Only set a breakpoint at the entry point if not
10175 attaching.
10176
311de423
PA
101772007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10178
10179 * server.c (main): Don't report dll events on the initial
10180 connection on attaches.
10181
6c2d16d2
PA
101822007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10183
10184 * server.c (main): Relax numerical bases supported for the pid of
10185 the --attach command line argument.
10186
5ca906e6
PA
101872007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10188
10189 * win32-low.c (win32_attach): Call OpenProcess before
10190 DebugActiveProcess, not after. Add last error output to error
10191 call.
10192
9c6c8194
PA
101932007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10194
10195 * win32-low.c (win32_get_thread_context)
10196 (win32_set_thread_context): New functions.
10197 (thread_rec): Use win32_get_thread_context.
10198 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10199 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10200 field.
10201
4d5d1aaa
PA
102022007-12-03 Leo Zayas
10203 Pedro Alves <pedro_alves@portugalmail.pt>
10204
10205 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10206 global variables.
10207 (child_add_thread): Minor cleanup.
10208 (child_continue): Resume artificially suspended threads before
10209 calling ContinueDebugEvent.
10210 (suspend_one_thread): New.
10211 (fake_breakpoint_event): New.
10212 (get_child_debug_event): Change return type to int. Check here if
10213 gdb sent an interrupt request. If a soft interrupt was requested,
10214 fake a breakpoint event. Return 0 if there is no event to handle,
10215 and 1 otherwise.
10216 (win32_wait): Don't check here if gdb sent an interrupt request.
10217 Ensure there is a valid event to handle.
10218 (win32_request_interrupt): Add soft interruption method as last
10219 resort.
10220
c436e841
PA
102212007-12-03 Leo Zayas
10222 Pedro Alves <pedro_alves@portugalmail.pt>
10223
10224 * win32-low.h (win32_thread_info): Add descriptions to the
10225 structure members. Replace `suspend_count' counter by a
10226 `suspended' flag.
10227 * win32-low.c (thread_rec): Update condition of when to get the
10228 context from the inferior. Rely on ContextFlags being set if it
10229 has already been retrieved. Only suspend the inferior thread if
10230 we haven't already. Warn if that fails.
10231 (continue_one_thread): s/suspend_count/suspended/. Only call
10232 ResumeThread once. Warn if that fails.
10233
e7b5fa67
PA
102342007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10235
10236 * win32-low.c (win32_wait): Don't read from the inferior when it
10237 has already exited.
10238
a385171d
PA
102392007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10240
10241 * Makefile.in (win32_low_h): New variable.
10242 (win32-low.o): Add dependency on $(win32_low_h).
10243 (win32-arm-low.o, win32-i386-low.o): New rules.
10244
f80c84b3
DJ
102452007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10246
10247 * hostio.c: Correct copyright year.
10248
a6b151f1
DJ
102492007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10250
10251 * Makefile.in (OBS): Add hostio.o.
10252 (hostio.o): New rule.
10253 * server.h (handle_vFile): Declare.
10254 * hostio.c: New file.
10255 * server.c (handle_v_requests): Take packet_len and new_packet_len
10256 for binary packets. Call handle_vFile.
10257 (main): Update call to handle_v_requests.
10258
f9387fc3
DJ
102592007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10260
10261 * linux-low.c: Include <sched.h>.
10262
51c2684e
DJ
102632007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10264
10265 * linux-low.c (linux_tracefork_grandchild): New.
10266 (linux_tracefork_child): Use clone.
10267 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10268
75f83163
JB
102692007-10-31 Joel Brobecker <brobecker@adacore.com>
10270
10271 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10272
da5898ce
DJ
102732007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10274
10275 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10276
24a09b5f
DJ
102772007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10278
10279 * inferiors.c (change_inferior_id): Delete.
10280 (add_pid_to_list, pull_pid_from_list): New.
10281 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10282 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10283 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10284 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10285 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10286 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10287 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10288 (using_threads): Always set to 1.
10289 (handle_extended_wait): New.
10290 (add_process): Do not set TID.
10291 (linux_create_inferior): Set must_set_ptrace_flags.
10292 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10293 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10294 (linux_thread_alive): Rename TID argument to LWPID.
10295 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10296 (linux_wait_for_event): Do not use TID or check using_threads. Update
10297 call to dead_thread_notify. Call handle_extended_wait.
10298 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10299 (send_sigstop): Delete sigstop_sent.
10300 (wait_for_sigstop): Avoid TID.
10301 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10302 (linux_test_for_tracefork): New.
10303 (linux_lookup_signals): Use thread_db_active and
10304 linux_supports_tracefork_flag.
10305 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10306 * linux-low.h (get_process_thread): Avoid TID.
10307 (struct process_ifo): Move thread_known and tid to the end. Remove
10308 sigstop_sent.
10309 (linux_attach_lwp, thread_db_init): Update prototypes.
10310 * server.h (change_inferior_id): Delete prototype.
10311 (add_pid_to_list, pull_pid_from_list): New prototypes.
10312 * thread-db.c (thread_db_use_events): New.
10313 (find_first_thread): Rename to...
10314 (find_one_thread): ...this. Update callers and messages. Do not
10315 call fatal. Check thread_db_use_events. Do not call
10316 change_inferior_id or new_thread_notify.
10317 (maybe_attach_thread): Update. Do not call new_thread_notify.
10318 (thread_db_init): Set thread_db_use_events. Check use_events.
10319 * utils.c (fatal, warning): Correct message prefix.
10320
30ed0a8f
DJ
103212007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10322
10323 * Makefile.in (clean): Remove new files.
10324 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10325 (powerpc-64.o, powerpc-64.c): New rules.
10326 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10327 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10328 with SPE.
10329 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10330 SPE targets.
10331 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10332 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10333 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10334 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10335 (target_regsets): Add AltiVec and SPE register sets.
10336 * configure.ac: Check for AltiVec and SPE.
10337 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10338 (ppc_fill_vrregset, ppc_store_vrregset): New.
10339 (target_regsets): Add AltiVec register set.
10340 * configure: Regenerated.
10341
fd462a61
DJ
103422007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10343
10344 * linux-low.c (O_LARGEFILE): Define.
10345 (linux_read_memory): Use /proc/PID/mem.
10346 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10347 * configure, config.in: Regenerated.
10348
69f223ed
DJ
103492007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10350
10351 * linux-low.c (linux_wait_for_event): Do not pass signals while
10352 single-stepping.
10353
aec18585
PA
103542007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10355
10356 * win32-low.c (create_process): New.
10357 (win32_create_inferior): Use create_process instead of
10358 CreateProcess. If create_process failed retry appending an ".exe"
10359 suffix. Store the GetLastError result immediatelly after
10360 create_process calls and use it on the call to error.
10361
34d86ddd
PA
103622007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10363
10364 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10365
5a0e3bd0
JB
103662007-08-23 Joel Brobecker <brobecker@adacore.com>
10367
10368 * configure.ac: Switch license to GPLv3.
10369
f88c79e6
MS
103702007-08-01 Michael Snyder <msnyder@access-company.com>
10371
10372 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10373
6b3d9b83
PA
103742007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10375
10376 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10377 typedef.
10378 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10379 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10380 CloseToolhelp32Snapshot.
10381 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10382 CloseToolhelp32Snapshot.
10383
c588c53c
MS
103842007-07-27 Michael Snyder <michael.snyder@access-company.com>
10385
10386 * server.c (main): Check for inferior exit before main loop.
10387
aa0403d9
PA
103882007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10389
10390 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10391 instead of on tmp_desc.
10392
255e7678
DJ
103932007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10394 Daniel Jacobowitz <dan@codesourcery.com>
10395
10396 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10397 (add_thread): Minor cleanups.
10398 (clear_inferiors): Move lower in the file. Clear the DLL
10399 list.
10400 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10401 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10402 (xml_escape_text): New.
10403 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10404 for qSupported.
10405 (handle_v_cont): Report errors.
10406 (gdbserver_version): Update.
10407 (main): Correct size of own_buf. Do not report initial DLL events.
10408 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10409 (unloaded_dll, xml_escape_text): New.
10410 * win32-low.c (enum target_waitkind): Update comments.
10411 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10412 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10413 (win32_EnumProcessModules, win32_GetModuleInformation)
10414 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10415 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10416 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10417 (win32_Module32First, win32_Module32Next, load_toolhelp)
10418 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10419 (get_child_debug_event): Handle DLL events.
10420 (win32_wait): Likewise.
10421
0d37add9
DJ
104222007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10423
10424 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10425 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10426
45e2715e
PA
104272007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10428
10429 * win32-low.c (handle_output_debug_string): Ignore event if not
10430 waiting.
10431
c5674cf1
PA
104322007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10433
10434 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10435
2bbe3cc1
DJ
104362007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10437
10438 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10439
ae13219e
DJ
104402007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10441
10442 * inferiors.c (change_inferior_id): Add comment.
10443 * linux-low.c (check_removed_breakpoint): Add an early
10444 prototype. Improve debug output.
10445 (linux_attach): Doc update.
10446 (linux_detach_one_process, linux_detach): Clean up before releasing
10447 each process.
10448 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10449 * linux-low.h (struct process_info): Doc improvement.
10450 * mem-break.c (delete_all_breakpoints): New.
10451 * mem-break.h (delete_all_breakpoints): New prototype.
10452 * thread-db.c (find_first_thread): New.
10453 (thread_db_create_event): Call it instead of
10454 thread_db_find_new_threads. Clean up unused variables.
10455 (maybe_attach_thread): Remove first thread handling.
10456 (thread_db_find_new_threads): Use find_first_thread.
10457 (thread_db_get_tls_address): Likewise.
10458
4105de34
DJ
104592007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10460
10461 * thread-db.c (thread_db_find_new_threads): Add prototype.
10462 (thread_db_create_event): Check for the main thread before adding
10463 a new thread.
10464 (maybe_attach_thread): Only enable event reporting if TID == 0.
10465 (thread_db_get_tls_address): Check for new threads.
10466
2b876972
DJ
104672007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10468
10469 * linux-low.c (linux_create_inferior): Try execv before execvp.
10470 * spu-low.c (spu_create_inferior): Likewise.
10471
7a245884
DJ
104722007-06-13 Mike Frysinger <vapier@gentoo.org>
10473
10474 * linux-low.c (linux_create_inferior): Change execv to execvp.
10475 * spu-low.c (spu_create_inferior): Likewies.
10476
117ce543
DJ
104772007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10478
10479 * Makefile.in (clean): Clean new files instead of deleted ones.
10480 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10481 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10482 rules.
10483 * configure.srv: Specify XML files and new regformats for MIPS and
10484 MIPS64 GNU/Linux.
10485 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10486 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10487 an entry for the restart register.
10488 (mips_cannot_fetch_register, mips_cannot_store_register)
10489 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10490 register names to match the XML descriptions.
10491 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10492 restart register instead of $0.
10493
0e7f50da
UW
104942007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10495 Markus Deuling <deuling@de.ibm.com>
10496
10497 * remote-utils.c (decode_xfer_write): New function.
10498 * server.h (decode_xfer_write): Add prototype.
10499 * server.c (handle_query): Add PACKET_LEN argument. Support
10500 qXfer:spu:read and qXfer:spu:write packets.
10501 (main): Pass packet_len to handle_query.
10502 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10503 * target.h (target_ops): Add qxfer_spu.
10504
374c1d38
UW
105052007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10506
10507 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10508 accessing non-seekable spufs files.
10509
bb63802a
UW
105102007-05-16 Markus Deuling <deuling@de.ibm.com>
10511
889bf7c5 10512 * server.c (handle_query): Add reply for qC packet.
bb63802a 10513
7390519e
PA
105142007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10515 Leo Zayas <lerele@champenstudios@com>
10516
10517 * server.h (check_remote_input_interrupt_request): New function.
10518 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10519 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10520 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10521 (check_remote_input_interrupt_request): New function.
10522 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 10523 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
10524 winapi_GenerateConsoleCtrlEvent): New typedefs.
10525 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10526 to 250 ms.
10527 (win32_wait): Check for remote interrupt request
10528 with check_remote_input_interrupt_request.
10529 (win32_request_interrupt): New function.
10530 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10531
34b34921
PA
105322007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10533
10534 * win32-low.c (debug_registers_changed,
10535 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10536 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10537 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10538 (thread_rec): Get context using the low target.
10539 (child_add_thread): Call thread_added on the low target,
10540 which does the same thing.
10541 (regptr): Delete.
10542 (do_initial_child_stuff): Remove debug registers references.
10543 Set context using the low target. Resume threads after
10544 setting the contexts.
10545 (child_continue): Remove dead variable. Remove debug
10546 registers references.
10547 (child_fetch_inferior_registers): Go through the low target.
10548 (do_child_store_inferior_registers): Remove.
10549 (child_store_inferior_registers): Go through the low target.
10550 (win32_resume): Remove debug registers references.
10551 Set context using the low target.
10552 (handle_exception): Change return type to void. Don't record
10553 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10554 first chance exception.
889bf7c5 10555 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
10556 goto loop. Always return after waiting for debug event.
10557 (win32_wait): Convert to switch statement. Handle spurious
10558 events.
10559
10560 * win32-i386-low.c (debug_registers_changed,
10561 debug_registers_used): New.
10562 (initial_stuff): Rename to ...
10563 (i386_initial_stuff): ... this. Clear debug registers
10564 state variables.
10565 (store_debug_registers): Delete.
10566 (i386_get_thread_context): New.
10567 (load_debug_registers): Delete.
10568 (i386_set_thread_context): New.
10569 (i386_thread_added): New.
10570 (single_step): Rename to ...
10571 (i386_single_step): ... this.
10572 (do_fetch_inferior_registers): Rename to ...
10573 (i386_fetch_inferior_register): ... this.
10574 (i386_store_inferior_register): New.
10575 (the_low_target): Adapt to new interface.
10576
10577 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10578 (arm_get_thread_context): New.
10579 (arm_set_thread_context): New.
10580 (regptr): New.
10581 (do_fetch_inferior_registers): Rename to ...
10582 (arm_fetch_inferior_register): ... this.
10583 (arm_store_inferior_register): New.
10584 (arm_wince_breakpoint): Reimplement as unsigned long.
10585 (arm_wince_breakpoint_len): Define.
10586 (the_low_target): Adapt to new interface.
10587
10588 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10589 load_debug_registers. Add get_thread_context, set_thread_context,
10590 thread_added and store_inferior_register. Rename
10591 fetch_inferior_registers to fetch_inferior_register.
10592 (regptr): Remove declaration.
10593
dd6953e1
PA
105942007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10595
10596 * linux-low.c (linux_detach): Change return type to int. Return 0.
10597 * spu-low.c (spu_detach): Likewise.
10598
444d6139
PA
105992007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10600
10601 * target.h (target_ops): Change return type of detach to int.
10602 Add join.
10603 (join_inferior): New.
10604 * server.c (main): Don't skip detach support on mingw32.
10605 If the inferior doesn't support detaching return error.
10606 Call join_inferior instead of using waitpid.
10607 * linux-low.c (linux_join): New.
10608 (linux_target_op): Add linux_join.
10609 * spu-low.c (spu_join): New.
10610 (spu_target_ops): Add spu_join.
10611 * win32-low.c (win32_detach): Adapt to new interface.
10612 Reopen current_process_handle before detaching. Issue a child
10613 resume before detaching.
10614 (win32_join): New.
10615 (win32_target_op): Add win32_join.
10616
1d5315fe
PA
106172007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10618
10619 * win32-low.c (win32-attach): Fix return value.
10620 * target.h (target_ops): Describe ATTACH return values.
10621
bf914831
PA
106222007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10623
10624 * win32-low.c (GETPROCADDRESS): Define.
10625 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10626 (winapi_DebugSetProcessKillOnExit): Likewise.
10627 (win32_create_inferior): Force usage of ansi CreateProcessA.
10628 (win32_attach): Use GETPROCADDRESS.
10629 (win32_detach): Likewise.
10630
f72f3e60
PA
106312007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10632
10633 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10634
ed50f18f
PA
106352007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10636
10637 * win32-low.c: Commit leftover changes from 2007-03-29.
10638
0c2ead7e
DJ
106392007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10640
10641 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10642 fields short instead of int. Add explicit padding.
10643 (i387_cache_to_fsave): Remove unnecessary casts.
10644 (i387_fsave_to_cache): Doc fix.
10645 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10646
73725ff3
DJ
106472007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10648
10649 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10650 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10651
d99f33d8
PA
106522007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10653
10654 * configure.srv (arm*-*-mingw32ce*): Move near the other
10655 arm targets.
10656
68070c10
PA
106572007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10658
2482afc6 10659 * configure.ac: Add errno checking.
68070c10
PA
10660 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10661 sys/file.h and malloc.h.
10662 (AC_CHECK_DECLS): Add perror.
10663 (srv_mingwce): Handle.
2482afc6 10664 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
10665 win32-i386-low.o to srv_tgtobj.
10666 (i[34567]86-*-mingw*): Likewise.
10667 (arm*-*-mingw32ce*): Add case.
10668 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10669 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10670 [__MINGW32CE__] (strerror): New function.
10671 [__MINGW32CE__] (errno): Define to GetLastError.
10672 [__MINGW32CE__] (COUNTOF): New macro.
10673 (remote_open): Remove extra close call.
10674 * mem-break.c (delete_breakpoint_at): New function.
10675 * mem-break.h (delete_breakpoint_at): Declare.
10676 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10677 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10678 [USE_WIN32API] (read, write): Add char* casts.
10679 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10680 * server.h: Include wincecompat.h on Windows CE.
10681 [HAVE_ERRNO_H]: Check.
10682 (perror): Declare if not declared.
10683 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10684 (perror_with_name): Remove errno declaration.
10685 * wincecompat.h: New.
10686 * wincecompat.c: New.
10687 * win32-low.h: New.
10688 * win32-arm-low.c: New.
10689 * win32-i386-low.c: New.
10690 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10691 (OUTMSG2): Make it safe.
10692 (_T): New macro.
10693 (COUNTOF): New macro.
10694 (NUM_REGS): Get it from the low target.
10695 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10696 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10697 (thread_rec): Let low target handle debug registers.
10698 (child_add_thread): Likewise.
10699 (child_init_thread_list): Likewise.
10700 (continue_one_thread): Likewise.
10701 (regptr): New.
10702 (do_child_fetch_inferior_registers): Move to ...
10703 * win32-i386-low.c: ... here, and rename to ...
10704 (do_fetch_inferior_registers): ... this.
889bf7c5 10705 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
10706 Go through the low target.
10707 (do_child_store_inferior_registers): Use regptr.
10708 (strwinerror): New function.
10709 (win32_create_inferior): Handle Windows CE.
10710 Use strwinerror instead of strerror on Windows error
10711 codes. Add program to the error output.
10712 Don't close the main thread handle on Windows CE.
10713 (win32_attach): Use coredll.dll on Windows CE.
10714 (win32_kill): Close current process and current
10715 thread handles.
10716 (win32_detach): Use coredll.dll on Windows CE.
10717 (win32_resume): Let low target handle debug registers, and
10718 step request.
10719 (handle_exception): Add/Remove initial breakpoint. Avoid
10720 non-existant WSTOPSIG on Windows CE.
10721 (win32_read_inferior_memory): Cast to remove warning.
10722 (win32_arch_string): Go through the low target.
10723 (initialize_low): Call set_breakpoint_data with the low
10724 target's breakpoint.
10725 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10726 FOP_REGNUM, mappings): Move to ...
10727 * win32-i386-low.c: ... here.
10728 * win32-low.c (win32_thread_info): Move to ...
10729 * win32-low.h: ... here.
10730 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10731 win32-arm-low.c and wincecompat.c.
10732 (all:): Add $EXEEXT.
10733 (install-only:): Likewise.
10734 (gdbserver:): Likewise.
10735 (gdbreplay:): Likewise.
10736 * config.in: Regenerate.
10737 * configure: Regenerate.
10738
41093d81
PA
107392007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10740
10741 * win32-low.c: Rename typedef thread_info to
10742 win32_thread_info throughout.
10743
544afa54
PA
107442007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10745
10746 * win32-i386-low.c: Rename to ...
10747 * win32-low.c: ... this.
10748 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10749 * Makefile.in: Likewise.
10750
bce7165d
PA
107512007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10752
10753 * remote-utils.c (monitor_output): Constify msg parameter.
10754 * server.h (monitor_output): Likewise.
10755 * win32-i386-low.c (handle_output_debug_string): New.
10756 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10757 handle_output_debug_string.
10758 (get_child_debug_event): Likewise.
10759
506c7aa0
DJ
107602007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10761
10762 * server.c (main): Correct strtoul check.
10763
42c81e2a
DJ
107642007-03-27 Jon Ringle <jon@ringle.org>
10765
10766 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10767
9453113a
DJ
107682007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10769
10770 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10771
64a69107
DJ
107722007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10773
10774 * terminal.h: Check HAVE_SGTTY_H.
10775
107762007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
10777
10778 * remote-utils.c (remote_open): Print out the assigned port number.
10779
c74d0ad8
DJ
107802007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10781
10782 * remote-utils.c (monitor_output): New function.
10783 * server.c (debug_threads): Define here.
10784 (monitor_show_help): New function.
10785 (handle_query): Handle qRcmd.
10786 (main): Do not handle 'd' packet.
10787 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10788 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10789 of debug_threads.
10790
de7c3b4a
PA
107912007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10792
10793 * Makefile.in (EXEEXT): New.
10794 (clean): Use $(EXEEXT).
10795
ef57601b
PA
107962007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10797
10798 * target.h (target_ops): Rename send_signal to request_interrupt,
10799 and remove enum target_signal parameter.
10800 * linux-low.c (linux_request_interrupt): Rename from
10801 linux_send_signal, and always send SIGINT.
10802 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10803 and always send SIGINT.
10804 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10805 of send_signal.
10806 (input_interrupt): Likewise.
10807
820f2bda
PA
108082007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10809
10810 * server.c (get_features_xml): Check if target implemented
10811 arch_string.
10812 * win32-i386-low.c (win32_arch_string): New.
10813 (win32_target_ops): Add win32_arch_string as arch_string member.
10814
ab39bf24
UW
108152007-02-22 Markus Deuling <deuling@de.ibm.com>
10816
10817 * spu-low.c (spu_arch_string): New.
10818 (spu_target_ops): Add spu_arch_string.
10819
61ff6e04
DJ
108202007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10821
10822 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10823 * configure.ac: Do not check for terminal.h.
10824 * configure, config.in: Regenerated.
10825
fb1e4ffc
DJ
108262007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10827
10828 * Makefile.in (OBS): Add $(XML_BUILTIN).
10829 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10830 (clean): Update.
10831 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10832 (arm-with-iwmmxt.c): New.
10833 * config.in, configure: Regenerate.
10834 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10835 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10836 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10837 (arm*-*-linux*): Add iWMMXt and regset support.
10838 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10839 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10840 (arm_store_wmmxregset, target_regsets): New.
10841 * server.c (get_features_xml): Take annex argument. Check builtin
10842 XML documents.
10843 (handle_query): Handle multiple annexes.
10844
0f48aa01
DJ
108452007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10846
10847 * remote-utils.c [USE_WIN32API] (read, write): Define.
10848 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10849 write.
10850
23181151
DJ
108512007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10852
10853 * linux-i386-low.c (the_low_target): Set arch_string.
10854 * linux-x86-64-low.c (the_low_target): Likewise.
10855 * linux-low.c (linux_arch_string): New.
10856 (linux_target_ops): Add it.
10857 * linux-low.h (struct linux_target_ops): Add arch_string.
10858 * server.c (write_qxfer_response): Use const void * for DATA.
10859 (get_features_xml): New.
10860 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10861 * target.h (struct target_ops): Add arch_string method.
10862
9d606399
DJ
108632007-01-03 Denis Pilat <denis.pilat@st.com>
10864 Daniel Jacobowitz <dan@codesourcery.com>
10865
10866 * linux-low.c (linux_kill): Handle being called with no threads.
10867 * win32-i386-low.c (win32_kill): Likewise.
10868 (get_child_debug_event): Clear current_process_handle.
10869
108702006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
10871 Daniel Jacobowitz <dan@codesourcery.com>
10872
10873 * remote-utils.c (remote_open): Check the type of specified
10874 serial port devices before opening them.
10875 * server.c (main): Kill the inferior if an error occurs during
10876 the first remote_open.
10877
a5e13d24
DJ
108782006-12-05 Markus Deuling <deuling@de.ibm.com>
10879
10880 * README: Update supported targets.
10881
186947f7
DJ
108822006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10883
10884 * Makefile.in (clean): Remove reg-mips64.c.
10885 (reg-mips64.c, reg-mips64.o): New rules.
10886 * configure.srv: Handle mips64. Include regset support for mips.
10887 * linux-mips-low.c (union mips_register): New.
10888 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10889 (mips_breakpoint, mips_breakpoint_at): Use int.
10890 (mips_collect_register, mips_supply_register)
10891 (mips_collect_register_32bit, mips_supply_register_32bit)
10892 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10893 (mips_store_fpregset, target_regsets): New.
10894 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10895
a13e2c95
UW
108962006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10897
10898 * configure.srv: Add target "spu*-*-*".
10899 * Makefile.in (clean): Remove reg-spu.c.
10900 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10901 * spu-low.c: New file.
10902
cb7283db
DJ
109032006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10904
10905 * configure.ac: Correct td_thr_tls_get_addr test.
10906 * configure: Regenerated.
10907
89be2091
DJ
109082006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10909
10910 * linux-low.c (linux_wait_for_event): Reformat. Use the
10911 pass_signals array.
10912 * remote-utils.c (decode_address_to_semicolon): New.
10913 * server.c (pass_signals, handle_general_set): New.
10914 (handle_query): Mention QPassSignals for qSupported.
10915 (main): Call handle_general_set.
10916 * server.h (pass_signals, decode_address_to_semicolon): New.
10917
000ef4f0
DJ
109182006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10919
10920 * server.c (handle_query): Correct error handling for read_auxv.
10921
b7149293
UW
109222005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10923
10924 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10925 and srv_linux_thread_db to yes.
10926 * linux-s390-low.c (s390_fill_gregset): New function.
10927 (target_regsets): Define data structure.
10928
dae5f5cf
DJ
109292006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10930
10931 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10932 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10933 * config.in, configure: Regenerated.
10934 * inferiors.c (gdb_id_to_thread): New function.
10935 (gdb_id_to_thread_id): Use it.
10936 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10937 * linux-low.h (struct process_info): Add th member.
10938 (thread_db_get_tls_address): New prototype.
10939 * remote-utils.c (decode_address): Make non-static.
10940 * server.c (handle_query): Handle qGetTLSAddr.
10941 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10942 * target.h (struct target_ops): Add get_tls_address.
10943 * thread-db.c (maybe_attach_thread): Save the thread handle.
10944 (thread_db_get_tls_address): New.
10945
32ca6d61
DJ
109462006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10947
10948 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10949 (linux_resume_one_process): Take a siginfo_t *. Update all
10950 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10951 (struct pending_signals): Add a siginfo_t.
10952 (linux_wait_for_process): Always set last_status.
10953 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10954 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10955 * linux-low.h (struct process_info): Add last_status.
10956
5ffff7c1
DJ
109572006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10958
10959 * remote-utils.c (try_rle): New function.
10960 (putpkt_binary): Use it.
10961
8695c747
DJ
109622006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10963
10964 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10965 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10966 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10967 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10968 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10969 point registers.
10970
290fadea
RS
109712006-08-08 Richard Sandiford <richard@codesourcery.com>
10972
10973 * server.c (terminal_fd): New variable.
10974 (old_foreground_pgrp): Likewise.
10975 (restore_old_foreground_pgrp): New function.
10976 (start_inferior): Record the terminal file descriptor in terminal_fd
10977 and its original foreground group in old_foreground_pgrp. Register
10978 restore_old_foreground_pgrp with atexit().
10979
9f2e1e63
DJ
109802006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10981
10982 * server.c (handle_query): Correct qPart to qXfer.
10983
b80864fb
DJ
109842006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10985
10986 * configure.ac: Check for more headers which are missing on
10987 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10988 * configure.srv: Add Cygwin and mingw32.
10989 * remote-utils.c: Don't include headers unconditionally which
10990 are missing on mingw32. Include <winsock.h> for mingw32.
10991 (remote_open): Adjust for mingw32 support. Flush
10992 standard error after writing to it.
10993 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10994 (unblock_async_io, enable_async_io, disable_async_io)
10995 (readchar, getpkt): Update for Winsock support.
10996 (prepare_resume_reply): Expect a protocol signal number.
10997 * server.c: Disable <sys/wait.h> on mingw32.
10998 (start_inferior): Adjust for mingw32 support. Flush
10999 standard error after writing to it.
11000 (attach_inferior): Likewise. Use protocol signal
11001 numbers.
11002 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11003 and names.
11004 * win32-i386-low.c: New file.
11005 * Makefile.in (XM_CLIBS): Set.
11006 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11007 (win32-i386-low.o): New dependency rule.
11008 * linux-low.c (linux_wait): Use target signal numbers.
11009 * target.h (struct target_ops): Doc fix.
11010 * server.h (target_signal_to_name): New prototype.
11011 * gdbreplay.c: Don't include headers unconditionally which
11012 are missing on mingw32. Include <winsock.h> for mingw32.
11013 (remote_close, remote_open): Adjust for Winsock support.
11014 * configure, config.in: Regenerated.
11015
0876f84a
DJ
110162006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11017
11018 * server.c (decode_xfer_read, write_qxfer_response): New.
11019 (handle_query): Take a packet length argument. Handle
11020 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11021 the qSupported response.
11022 (main): Update call to handle_query.
11023
01f9e8fa
DJ
110242006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11025
11026 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11027 (putpkt_binary): Renamed from putpkt and adjusted for binary
11028 data.
11029 (putpkt): New wrapper for putpkt_binary.
11030 (readchar): Don't mask off the high bit.
11031 (decode_X_packet): New function.
11032 * server.c (main): Call putpkt_binary if a handler sets the packet
11033 length. Save the length of the incoming packet. Handle 'X'.
11034 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11035
be2a5f71
DJ
110362006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11037
11038 * server.c (handle_query): Handle qSupported.
11039
ea025f5f
DJ
110402006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11041
11042 * remote-utils.c (all_symbols_looked_up): New variable.
11043 (look_up_one_symbol): Check it.
11044 * server.h (look_up_one_symbol): New declaration.
11045 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11046
9308fc88
DJ
110472006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11048
11049 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 11050 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
11051 (PTRACE_GET_THREAD_AREA): Define.
11052 (ps_get_thread_area): New function.
11053
52fb6437
NS
110542006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11055
11056 * configure.srv (m68k*-*-uclinux*): New target.
11057 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11058 (linux_resume_one_process): Remove extraneous cast.
11059 (linux_read_offsets): New.
11060 (linux_target_op): Add linux_read_offsets on mmuless systems.
11061 * server.c (handle_query): Add qOffsets logic.
11062 * target.h (struct target_ops): Add read_offsets.
11063
21b0f40c
DJ
110642006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11065
11066 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11067 (PTRACE_GET_THREAD_AREA): Define.
11068 (ps_get_thread_area): New function.
11069 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11070 (linux-x86-64-low.o): Update.
11071
0050a760
DJ
110722006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11073
11074 * configure.ac: Remove checks for prfpregset_t.
11075 * gdb_proc_service.h: New file.
11076 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11077 new "gdb_proc_service.h".
11078 * proc-service.c: Likewise.
11079 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11080 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11081 * Makefile.in (gdb_proc_service_h): Updated.
11082 * configure, config.in: Regenerated.
11083
b92a518e
DJ
110842006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11085
11086 * remote-utils.c (prepare_resume_reply): Move declaration
11087 of gdb_id_from_wait to the top of the block.
11088
545587ee
DJ
110892006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11090
11091 * linux-low.c (regsets_store_inferior_registers): Read the regset
11092 from the target before filling it.
11093
9db87ebd
DJ
110942006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11095
11096 * server.c (attach_inferior): Return SIGTRAP for a successful
11097 attach.
11098
dd24457d
DJ
110992006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11100
11101 * Makefile.in (OBS): Add version.o.
11102 (STAGESTUFF): Delete.
11103 (version.o): Add dependencies.
11104 (version.c): Replace rule.
11105 (clean): Remove version.c.
11106 * server.c (gdbserver_version): New.
11107 (gdbserver_usage): Use printf.
11108 (main): Handle --version and --help.
11109 * server.h (version, host_name): Add declarations.
11110
6f0f660e
EZ
111112005-12-23 Eli Zaretskii <eliz@gnu.org>
11112
889bf7c5
PA
11113 * linux-arm-low.c:
11114 * linux-arm-low.c:
11115 * inferiors.c:
11116 * i387-fp.h:
11117 * i387-fp.c:
11118 * gdbreplay.c:
11119 * regcache.c:
11120 * proc-service.c:
11121 * mem-break.h:
11122 * mem-break.c:
11123 * linux-x86-64-low.c:
11124 * linux-sh-low.c:
11125 * linux-s390-low.c:
11126 * linux-ppc64-low.c:
11127 * linux-ppc-low.c:
11128 * linux-mips-low.c:
11129 * linux-m68k-low.c:
11130 * linux-m32r-low.c:
11131 * linux-low.h:
11132 * linux-low.c:
11133 * linux-ia64-low.c:
11134 * linux-i386-low.c:
11135 * linux-crisv32-low.c:
11136 * thread-db.c:
11137 * terminal.h:
11138 * target.h:
11139 * target.c:
11140 * server.h:
11141 * server.c:
11142 * remote-utils.c:
11143 * regcache.h:
11144 * utils.c:
11145 * Makefile.in:
11146 * configure.ac:
6f0f660e
EZ
11147 * gdbserver.1: Add (C) after Copyright. Update the FSF
11148 address.
11149
9d1fb177
DJ
111502005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11151
11152 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11153 (arm_breakpoint_at): Recognize both breakpoints.
11154 (the_low_target): Use the correct breakpoint instruction.
11155
011a70c2
DJ
111562005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11157
11158 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11159 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11160 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11161 (the_low_target): Update.
11162
7fb85e41
AS
111632005-10-25 Andreas Schwab <schwab@suse.de>
11164
11165 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11166
11167 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11168 (ia64_num_regs): Reduce to 462.
11169
3db0444b
DJ
111702005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11171
11172 * acinclude.m4: Correct quoting.
11173 * aclocal.m4: Regenerated.
11174
11175 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11176 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11177 (thread_db_init): Call thread_db_err_str.
11178 * configure.ac: Check for TD_VERSION.
11179 * config.in, configure: Regenerated.
11180
bee0189a
DJ
111812005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11182
11183 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11184
e9d25b98
DJ
111852005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11186
11187 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11188 is not available. Define HAVE_PTRACE_GETREGS if it is.
11189 * config.in, configure: Regenerated.
11190 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11191 * linux-i386-low.c, linux-m68k-low.c: Update to use
11192 HAVE_PTRACE_GETREGS.
11193 * linux-low.c (regsets_fetch_inferior_registers)
11194 (regsets_store_inferior_registers): Only return 0 if we processed
11195 GENERAL_REGS.
11196 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11197 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11198
a06660f7
DJ
111992005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11200
11201 * inferiors.c (struct thread_info): Add gdb_id.
11202 (add_thread): Add gdb_id argument.
11203 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11204 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11205 calls to add_thread.
11206 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11207 * server.c (handle_query): Use thread_to_gdb_id.
11208 (handle_v_cont, main): Use gdb_id_to_thread_id.
11209 * server.h (add_thread): Update prototype.
11210 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11211 prototypes.
11212
5a1f5858
DJ
112132005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11214
11215 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11216 left-padded registers.
11217 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11218 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11219
e122f1f5
SE
112202005-07-01 Steve Ellcey <sje@cup.hp.com>
11221
11222 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11223 * configure: Regenerate.
11224 * config.in: Regenerate.
11225 * server.h (NEED_DECLARATION_STRERROR):
11226 Replace with !HAVE_DECL_STRERROR.
11227
d592fa2f
DJ
112282005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11229
11230 * linux-low.c (linux_wait, linux_send_signal): Don't test
11231 an unsigned long variable for > 0 if it could be MAX_ULONG.
11232 * server.c (myresume): Likewise.
11233 * target.c (set_desired_inferior): Likewise.
11234
ccbd4912
MK
112352005-06-13 Mark Kettenis <kettenis@gnu.org>
11236
11237 * configure.ac: Simplify and improve check for socklen_t.
11238 * configure, config.in: Regenerate.
11239
f450004a
DJ
112402005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11241
11242 * acconfig.h: Remove.
11243 * configure.ac: Add a test for socklen_t. Use three-argument
11244 AC_DEFINE throughout.
11245 * config.in: Regenerated using autoheader 2.59.
11246 * configure: Regenerated.
11247
11248 * gdbreplay.c (socklen_t): Provide a default.
11249 (remote_open): Use socklen_t.
11250 * remote-utils.c (socklen_t): Provide a default.
11251 (remote_open): Use socklen_t.
11252 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11253 unsigned char.
11254
11255 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11256 char for buffers.
11257 * linux-low.c (linux_read_memory, linux_write_memory)
11258 (linux_read_auxv): Likewise.
11259 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11260 (check_mem_write): Likewise.
11261 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11262 Likewise.
11263 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11264 (registers_from_string, register_data): Likewise.
11265 * server.c (handle_query, main): Likewise.
11266 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11267 (decode_M_packet): Likewise.
11268 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11269 * target.h (struct target_ops): Update read_memory, write_memory,
11270 and read_auxv.
11271 (read_inferior_memory, write_inferior_memory): Update.
11272 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11273 to unsigned char *.
11274 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11275 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11276 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11277 linux-s390-low.c, linux-sh-low.c: Update for changes in
11278 read_inferior_memory and the_low_target->breakpoint.
11279
eee84df1
DJ
112802005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11281
11282 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11283 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11284 * configure.srv: Add powerpc64-*-linux*.
11285 * linux-ppc64-low.c: New file.
11286
45b134e5
OF
112872005-05-23 Orjan Friberg <orjanf@axis.com>
11288
11289 * linux-cris-low.c: New file with support for CRIS.
11290 * linux-crisv32-low.c: Ditto for CRISv32.
11291 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11292 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 11293 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
11294 reg-crisv32.o, and reg-crisv32.c to make rules.
11295 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11296 recognized targets.
11297
48d93c75
UW
112982005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11299
11300 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11301 of sizeof (PTRACE_XFER_TYPE).
11302 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11303
e013ee27
OF
113042005-05-12 Orjan Friberg <orjanf@axis.com>
11305
889bf7c5 11306 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
11307 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11308 pointers for hardware watchpoint support.
11309 * linux-low.h (struct linux_target_ops): Ditto.
11310 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11311 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11312 to linux_target_ops.
11313 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11314 reply packet.
11315 * server.c (main): Recognize 'Z' and 'z' packets.
11316
b0ded00b
UW
113172005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11318
11319 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11320 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11321 (the_low_target): Add new members.
11322
8643e2ad
DJ
113232005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11324
11325 * proc-service.c (ps_lgetregs): Search all_processes instead of
11326 all_threads.
11327
fc620387
DJ
113282005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11329
11330 * server.c (start_inferior): Change return type to int.
11331 (attach_inferior): Change sigptr to int *.
11332 (handle_v_cont, handle_v_requests): Change signal to int *.
11333 (main): Change signal to int.
11334
113352005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
11336
11337 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11338 * configure.srv: Add m32r*-*-linux*.
11339 * linux-m32r-low.c: New file.
11340
e0e76420
DJ
113412005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11342
11343 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11344
a1928bad
DJ
113452005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11346
11347 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11348 Take unsigned long arguments for PIDs.
11349 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11350 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11351 (wait_for_sigstop, linux_resume_one_process)
11352 (regsets_fetch_inferior_registers, linux_send_signal)
11353 (linux_read_auxv): Likewise. Update the types of variables holding
11354 PIDs. Update format string specifiers.
11355 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11356 * remote-utils.c (prepare_resume_reply): Likewise.
11357 * server.c (cont_thread, general_thread, step_thread)
11358 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11359 unsigned long.
11360 (handle_query): Update format specifiers.
11361 (handle_v_cont, main): Use strtoul for thread IDs.
11362 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11363 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11364 (general_thread, step_thread, thread_from_wait)
11365 (old_thread_from_wait): Update.
11366 * target.h (struct thread_resume): Use unsigned long for THREAD.
11367 (struct target_ops): Use unsigned long for arguments to attach and
11368 thread_alive.
11369
dcdb98d2
DJ
113702005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11371
11372 * acinclude.m4: Include bfd/bfd.m4 directly.
11373 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11374 <agriffis@toolchain.org>.
11375 * aclocal.m4, configure: Regenerated.
11376
bec39cab
AC
113772005-01-07 Andrew Cagney <cagney@gnu.org>
11378
11379 * configure.ac: Rename configure.in, require autoconf 2.59.
11380 * configure: Re-generate.
11381
434c4c77
DJ
113822004-12-08 Daniel Jacobowitz <dan@debian.org>
11383
11384 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11385 LIBS when finished.
11386 * aclocal.m4: Regenerated.
11387 * configure: Regenerated.
11388
db1d3e1b
AS
113892004-11-21 Andreas Schwab <schwab@suse.de>
11390
11391 * linux-m68k-low.c (m68k_num_gregs): Define.
11392 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11393 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11394 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11395 (m68k_breakpoint_at): New. Add to the_low_target.
11396
11397 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11398 srv_linux_thread_db to yes.
11399
43360365
JB
114002004-10-20 Joel Brobecker <brobecker@gnat.com>
11401
11402 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11403 (ARCH_SET_FS): Likewise.
11404 (ARCH_GET_FS): Likewise.
11405 (ARCH_GET_GS): Likewise.
11406
fd500816
DJ
114072004-10-16 Daniel Jacobowitz <dan@debian.org>
11408
11409 * linux-i386-low.c (ps_get_thread_area): New.
11410 * linux-x86-64-low.c (ps_get_thread_area): New.
11411 * linux-low.c: Include <sys/syscall.h>.
11412 (linux_kill_one_process): Don't kill the first thread here.
11413 (linux_kill): Kill the first thread here.
11414 (kill_lwp): New function.
11415 (send_sigstop, linux_send_signal): Use it.
11416 * proc-service.c: Clean up #ifdefs.
11417 (fpregset_info): Delete.
11418 (ps_lgetregs): Update and enable implementation.
11419 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11420 implementations.
11421 * remote-utils.c (struct sym_cache, symbol_cache): New.
11422 (input_interrupt): Print a clearer message.
11423 (async_io_enabled): New variable.
11424 (enable_async_io, disable_async_io): Use it. Update comments.
11425 (look_up_one_symbol): Use the symbol cache.
11426 * thread-db.c (thread_db_look_up_symbols): New function.
11427 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11428
f6de3c42
DJ
114292004-10-16 Daniel Jacobowitz <dan@debian.org>
11430
11431 * configure.in: Test for -rdynamic.
11432 * configure: Regenerated.
11433 * Makefile (INTERNAL_LDFLAGS): New.
11434 (gdbserver, gdbreplay): Use it.
11435
2c0fc042
AC
114362004-09-02 Andrew Cagney <cagney@gnu.org>
11437
11438 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11439
075b3282
DJ
114402004-03-23 Daniel Jacobowitz <drow@mvista.com>
11441
11442 * linux-low.c (linux_wait): Clear all_processes list also.
11443
fa6a77dc
DJ
114442004-03-12 Daniel Jacobowitz <drow@mvista.com>
11445
11446 * linux-low.c: Include <errno.h>. Remove extern declaration of
11447 errno.
11448
6d782a97
DJ
114492004-03-12 Daniel Jacobowitz <drow@mvista.com>
11450
11451 * gdbreplay.c, server.h, utils.c: Update copyright years.
11452
3a7fb99b
DJ
114532004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11454
11455 * server.c (main): Print child status or termination signal from
11456 variable 'signal', not 'sig'.
11457
c3e735a6
DJ
114582004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11459
11460 * linux-low.c (linux_read_memory): Change return type to
11461 int. Check for and return error from ptrace().
11462 * target.c (read_inferior_memory): Change return type to int. Pass
11463 back return status from the_target->read_memory().
11464 * target.h (struct target_ops): Adapt *read_memory() prototype.
11465 Update comment.
11466 (read_inferior_memory): Adapt prototype.
11467 * server.c (main): Return an error packet if
11468 read_inferior_memory() returns an error.
11469
a59d1c82
DJ
114702004-03-04 Daniel Jacobowitz <drow@mvista.com>
11471
11472 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11473 Unify with other clean targets.
11474
dc3f8883
DJ
114752004-02-29 Daniel Jacobowitz <drow@mvista.com>
11476
11477 * server.c (handle_v_cont): Call set_desired_inferior.
11478
89a208da
DJ
114792004-02-29 Daniel Jacobowitz <drow@mvista.com>
11480
11481 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11482
62ea82f5
DJ
114832004-02-29 Daniel Jacobowitz <drow@mvista.com>
11484
11485 * linux-low.c (linux_wait): Unblock async I/O.
11486 (linux_resume): Block and enable async I/O.
11487 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11488 * server.h (block_async_io, unblock_async_io): Add prototypes.
11489
6910d122
DJ
114902004-02-29 Daniel Jacobowitz <drow@mvista.com>
11491
11492 * remote-utils.c (remote_open): Print a status notice after
11493 opening a TCP port.
11494 * server.c (attach_inferior): Print a status notice after
11495 attaching.
11496
114972004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
11498
11499 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11500
c89dc5d4
DJ
115012004-02-26 Daniel Jacobowitz <drow@mvista.com>
11502
11503 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11504 error packet.
11505 * server.c, target.h: Update copyright years.
11506
4b8dad4a
RM
115072004-02-25 Roland McGrath <roland@redhat.com>
11508
11509 * target.h (struct target_ops): New member `read_auxv'.
11510 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11511 * linux-low.c (linux_read_auxv): New function.
11512 (linux_target_ops): Initialize `read_auxv' member to that.
11513
d7446758
JB
115142004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11515
11516 Committed by Jim Blandy <jimb@redhat.com>.
11517
11518 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 11519 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
11520 instead of GPR_SIZE to distiguish s390 and s390x targets.
11521
5544ad89
DJ
115222004-01-31 Daniel Jacobowitz <drow@mvista.com>
11523
11524 * linux-low.c: Update copyright year.
11525 (check_removed_breakpoint): Clear pending_is_breakpoint.
11526 (linux_set_resume_request, linux_queue_one_thread)
11527 (resume_status_pending_p): New functions.
11528 (linux_continue_one_thread): Use process->resume.
11529 (linux_resume): Only resume threads if there are no pending events.
11530 * linux-low.h (struct process_info): Add resume request
11531 pointer.
11532
2a68b70e
DJ
115332004-01-30 Daniel Jacobowitz <drow@mvista.com>
11534
11535 * regcache.c (new_register_cache): Clear the allocated register
11536 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11537
64386c31
DJ
115382003-10-13 Daniel Jacobowitz <drow@mvista.com>
11539
11540 * linux-low.c (linux_resume): Take a struct thread_resume *
11541 argument.
11542 (linux_wait): Update call.
11543 (resume_ptr): New static variable.
11544 (linux_continue_one_thread): Renamed from
11545 linux_continue_one_process. Use resume_ptr.
11546 (linux_resume): Use linux_continue_one_thread.
11547 * server.c (handle_v_cont, handle_v_requests): New functions.
11548 (myresume): New function.
11549 (main): Handle 'v' case.
11550 * target.h (struct thread_resume): New type.
11551 (struct target_ops): Change argument of "resume" to struct
11552 thread_resume *.
11553 (myresume): Delete macro.
11554
c938e9b0
L
115552003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11556
11557 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11558 (uninstall): Support DESTDIR.
11559
7f313d07
BC
11560Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11561
11562 * configure.srv: Add xscale*linux copy of arm*linux entry.
11563
3b2fc2ea
DJ
115642003-07-24 Daniel Jacobowitz <drow@mvista.com>
11565
11566 * linux-arm-low.c (arm_reinsert_addr): New function.
11567 (the_low_target): Add arm_reinsert_addr.
11568
1c0a559e
MK
115692003-07-08 Mark Kettenis <kettenis@gnu.org>
11570
11571 * mem-break.c: Remove whitespace at end of file.
11572
43d5792c
DJ
115732003-06-28 Daniel Jacobowitz <drow@mvista.com>
11574
11575 * configure.in: Check whether we need to prototype strerror.
11576 * server.h: Optionally prototype strerror.
11577 * gdbreplay.c (perror_with_name): Use strerror.
11578 * linux-low.c (linux_attach_lwp): Use strerror.
11579 * utils.c (perror_with_name): Use strerror.
11580 * config.in, configure: Regenerated.
11581
c8a86edf
DJ
115822003-06-28 Daniel Jacobowitz <drow@mvista.com>
11583
11584 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11585 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11586
73d37363
DJ
115872003-06-20 Daniel Jacobowitz <drow@mvista.com>
11588
11589 * Makefile.in (SFILES): Update.
11590 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11591 low-sun3.c: Remove files.
11592
6ad8ae5c
DJ
115932003-06-17 Daniel Jacobowitz <drow@mvista.com>
11594
11595 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11596 (linux_detach_one_process, linux_detach): New functions.
11597 (linux_target_ops): Add linux_detach.
11598 * server.c (main): Handle 'D' packet.
11599 * target.h (struct target_ops): Add "detach" member.
11600 (detach_inferior): Define.
11601
1581182a
MK
116022003-06-13 Mark Kettenis <kettenis@gnu.org>
11603
11604 From Kelley Cook <kelleycook@wideopenwest.com>:
11605 * configure.srv: Accept i[34567]86 variants.
11606
e5379b03
DJ
116072003-06-05 Daniel Jacobowitz <drow@mvista.com>
11608
11609 * linux-low.c (linux_wait_for_event): Correct comment typos.
11610 (linux_resume_one_process): Call check_removed_breakpoint.
11611 (linux_send_signal): New function.
11612 (linux_target_ops): Add linux_send_signal.
11613 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11614 of kill.
11615 * target.h (struct target_ops): Add send_signal.
11616
2ff29de4
JB
116172003-05-29 Jim Blandy <jimb@redhat.com>
11618
11619 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11620 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11621 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11622 away part of the register's value.
11623
254787d4
DJ
116242003-03-26 Daniel Jacobowitz <drow@mvista.com>
11625
11626 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11627 (linux_wait_for_event, linux_init_signals): Likewise.
11628
94e10508
DJ
116292003-03-17 Daniel Jacobowitz <drow@mvista.com>
11630
11631 * configure.in: Check for stdlib.h.
11632 * configure: Regenerated.
11633 * config.in: Regenerated.
11634
4c0711e0
DJ
116352003-01-04 Andreas Schwab <schwab@suse.de>
11636
11637 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11638
ef66e766
AC
116392003-01-02 Andrew Cagney <ac131313@redhat.com>
11640
11641 * Makefile.in: Remove obsolete code.
11642
a1358604
DJ
116432002-11-20 Daniel Jacobowitz <drow@mvista.com>
11644
11645 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11646 defined(PT_FPR0_HI).
11647
23ce3b1c
DJ
116482002-11-17 Stuart Hughes <seh@zee2.com>
11649
11650 * linux-arm-low.c (arm_num_regs): Increase.
11651 (arm_regmap): Include status register.
11652
116532002-11-17 Daniel Jacobowitz <drow@mvista.com>
11654
11655 * linux-low.c (register_addr): Remove incorrect -1 check.
11656
a9fa9f7d
DJ
116572002-08-29 Daniel Jacobowitz <drow@mvista.com>
11658
11659 * linux-low.c (linux_create_inferior): Call setpgid. Return
11660 the new PID.
11661 (unstopped_p, linux_signal_pid): Remove.
11662 (linux_target_ops): Remove linux_signal_pid.
11663 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11664 global instead of target method.
11665 * target.h (struct target_ops): Remove signal_pid. Update comment
11666 for create_inferior.
11667 * server.c (signal_pid): New variable.
11668 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 11669 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
11670 (attach_inferior): Set signal_pid.
11671
17574093
DJ
116722002-08-23 Daniel Jacobowitz <drow@mvista.com>
11673
11674 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11675
116762002-08-20 Jim Blandy <jimb@redhat.com>
11677
11678 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11679 default for this.
11680
116812002-08-01 Andrew Cagney <cagney@redhat.com>
11682
11683 * Makefile.in: Make chill references obsolete.
11684
116852002-07-24 Kevin Buettner <kevinb@redhat.com>
11686
11687 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11688 * configure: Regenerate.
11689 * config.in: Regenerate.
11690
116912002-07-09 David O'Brien <obrien@FreeBSD.org>
11692
11693 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11694 (perror_with_name, remote_close, remote_open, expect, play): Static.
11695
116962002-07-04 Michal Ludvig <mludvig@suse.cz>
11697
4b8dad4a 11698 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
11699 byte offsets instead of an array of indexes.
11700 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11701
117022002-06-13 Daniel Jacobowitz <drow@mvista.com>
11703
11704 * regcache.c: Add comment.
11705
117062002-06-11 Daniel Jacobowitz <drow@mvista.com>
11707
11708 * thread-db.c: New file.
11709 * proc-service.c: New file.
11710 * acinclude.m4: New file.
11711 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11712 proc-service.o, and thread-db.o.
11713 (linux-low.o): Add USE_THREAD_DB.
11714 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11715 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11716 * aclocal.m4: Regenerated.
11717 * config.in: Regenerated.
11718 * configure: Regenerated.
11719 * configure.in: Check for proc_service.h, sys/procfs.h,
11720 thread_db.h, and linux/elf.h headrs.
11721 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11722 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11723 Check for -lthread_db and thread support.
11724 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11725 PowerPC, and SuperH.
11726 * i387-fp.c: Constify arguments.
11727 * i387-fp.h: Likewise.
11728 * inferiors.c: (struct thread_info): Renamed from
11729 `struct inferior_info'. Remove PID member. Use generic inferior
11730 list header. All uses updated.
11731 (inferiors, signal_pid): Removed.
11732 (all_threads): New variable.
11733 (get_thread): Define.
11734 (add_inferior_to_list): New function.
11735 (for_each_inferior): New function.
11736 (change_inferior_id): New function.
11737 (add_inferior): Removed.
11738 (remove_inferior): New function.
11739 (add_thread): New function.
11740 (free_one_thread): New function.
11741 (remove_thread): New function.
11742 (clear_inferiors): Use for_each_inferior and free_one_thread.
11743 (find_inferior): New function.
11744 (find_inferior_id): New function.
11745 (inferior_target_data): Update argument type.
11746 (set_inferior_target_data): Likewise.
11747 (inferior_regcache_data): Likewise.
11748 (set_inferior_regcache_data): Likewise.
11749 * linux-low.c (linux_bp_reinsert): Remove.
11750 (all_processes, stopping_threads, using_thrads)
11751 (struct pending_signals, debug_threads, pid_of): New.
11752 (inferior_pid): Replace with macro.
11753 (struct inferior_linux_data): Remove.
11754 (get_stop_pc, add_process): New functions.
11755 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11756 Use add_process and add_thread.
11757 (linux_attach_lwp): New function, based on old linux_attach. Use
11758 add_process and add_thread. Set stop_expected for new threads.
11759 (linux_attach): New function.
11760 (linux_kill_one_process): New function.
11761 (linux_kill): Kill all LWPs.
11762 (linux_thread_alive): Use find_inferior_id.
11763 (check_removed_breakpoints, status_pending_p): New functions.
11764 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11765 Update. Use WNOHANG. Wait for cloned processes also. Update process
11766 struct for the found process.
11767 (linux_wait_for_event): New function.
11768 (linux_wait): Use it. Support LWPs.
11769 (send_sigstop, wait_for_sigstop, stop_all_processes)
11770 (linux_resume_one_process, linux_continue_one_process): New functions.
11771 (linux_resume): Support LWPs.
11772 (REGISTER_RAW_SIZE): Remove.
11773 (fetch_register): Use register_size instead. Call supply_register.
11774 (usr_store_inferior_registers): Likewise. Call collect_register.
11775 Fix recursive case.
11776 (regsets_fetch_inferior_registers): Improve error message.
11777 (regsets_store_inferior_registers): Add debugging.
11778 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11779 (unstopped_p, linux_signal_pid): New functions.
11780 (linux_target_ops): Add linux_signal_pid.
11781 (linux_init_signals): New function.
11782 (initialize_low): Call it. Initialize using_threads.
11783 * regcache.c (inferior_regcache_data): Add valid
11784 flag.
11785 (get_regcache): Fetch registers lazily. Add fetch argument
11786 and update all callers.
11787 (regcache_invalidate_one, regcache_invalidate): New
11788 functions.
11789 (new_register_cache): Renamed from create_register_cache.
11790 Return the new regcache.
11791 (free_register_cache): Change argument to a void *.
11792 (registers_to_string, registers_from_string): Call get_regcache
11793 with fetch flag set.
11794 (register_data): Make static. Pass fetch flag to get_regcache.
11795 (supply_register): Call get_regcache with fetch flag clear.
11796 (collect_register): Call get_regcache with fetch flag set.
11797 (collect_register_as_string): New function.
11798 * regcache.h: Update.
11799 * remote-utils.c (putpkt): Flush after debug output and use
11800 stderr.
11801 Handle input interrupts while waiting for an ACK.
11802 (input_interrupt): Use signal_pid method.
11803 (getpkt): Flush after debug output and use stderr.
11804 (outreg): Use collect_register_as_string.
11805 (new_thread_notify, dead_thread_notify): New functions.
11806 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11807 and general_thread.
11808 (look_up_one_symbol): Flush after debug output.
11809 * server.c (step_thread, server_waiting): New variables.
11810 (start_inferior): Don't use signal_pid. Update call to mywait.
11811 (attach_inferior): Update call to mywait.
11812 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11813 (main): Don't fetch/store registers explicitly. Use
11814 set_desired_inferior. Support proposed ``Hs'' packet. Update
11815 calls to mywait.
11816 * server.h: Update.
11817 (struct inferior_list, struct_inferior_list_entry): New.
11818 * target.c (set_desired_inferior): New.
11819 (write_inferior_memory): Constify.
11820 (mywait): New function.
11821 * target.h: Update.
11822 (struct target_ops): New signal_pid method.
11823 (mywait): Removed macro, added prototype.
11824
11825 * linux-low.h (regset_func): Removed.
11826 (regset_fill_func, regset_store_func): New.
11827 (enum regset_type): New.
11828 (struct regset_info): Add type field. Use new operation types.
11829 (struct linux_target_ops): stop_pc renamed to get_pc.
11830 Add decr_pc_after_break and breakpoint_at.
11831 (get_process, get_thread_proess, get_process_thread)
11832 (strut process_info, all_processes, linux_attach_lwp)
11833 (thread_db_init): New.
11834
11835 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11836 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11837 (the_low_target): Add new members.
11838 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11839 (i386_store_fpxregset): Constify.
11840 (target_regsets): Add new kind identifier.
11841 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11842 (i386_set_pc): Add debugging.
11843 (i386_breakpoint_at): New function.
11844 (the_low_target): Add new members.
11845 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11846 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11847 (mips_breakpoint_at): New.
11848 (the_low_target): Add new members.
11849 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11850 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11851 (the_low_target): Add new members.
11852 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11853 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11854 (the_low_target): Add new members.
11855 * linux-x86-64-low.c (target_regsets): Add new kind
11856 identifier.
11857
118582002-05-15 Daniel Jacobowitz <drow@mvista.com>
11859
11860 From Martin Pool <mbp@samba.org>:
11861 * server.c (gdbserver_usage): New function.
11862 (main): Call it.
11863
118642002-05-14 Daniel Jacobowitz <drow@mvista.com>
11865
11866 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11867 stop_at -> stop_pc.
11868
118692002-05-04 Andrew Cagney <ac131313@redhat.com>
11870
11871 * Makefile.in: Remove obsolete code.
11872
118732002-04-24 Michal Ludvig <mludvig@suse.cz>
11874
11875 * linux-low.c (regsets_fetch_inferior_registers),
11876 (regsets_store_inferior_registers): Removed cast to int from
11877 ptrace() calls.
11878 * regcache.h: Added declaration of struct inferior_info.
11879
118802002-04-20 Daniel Jacobowitz <drow@mvista.com>
11881
11882 * inferiors.c (struct inferior_info): Add regcache_data.
11883 (add_inferior): Call create_register_cache.
11884 (clear_inferiors): Call free_register_cache.
11885 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11886 * regcache.c (struct inferior_regcache_data): New.
11887 (registers): Remove.
11888 (get_regcache): New function.
11889 (create_register_cache, free_register_cache): New functions.
11890 (set_register_cache): Don't initialize the register cache here.
11891 (registers_to_string, registers_from_string, register_data): Call
11892 get_regcache.
11893 * regcache.h: Add prototypes.
11894 * server.h: Likewise.
11895
118962002-04-20 Daniel Jacobowitz <drow@mvista.com>
11897
11898 * mem-break.c: New file.
11899 * mem-break.h: New file.
11900 * Makefile.in: Add mem-break.o rule; update server.h
11901 dependencies.
11902 * inferiors.c (struct inferior_info): Add target_data
11903 member.
11904 (clear_inferiors): Free target_data member if set.
11905 (inferior_target_data, set_inferior_target_data): New functions.
11906 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11907 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11908 * linux-low.c (linux_bp_reinsert): New variable.
11909 (struct inferior_linux_data): New.
11910 (linux_create_inferior): Use set_inferior_target_data.
11911 (linux_attach): Likewise. Call add_inferior.
11912 (linux_wait_for_one_inferior): New function.
11913 (linux_wait): Call it.
11914 (linux_write_memory): Add const.
11915 (initialize_low): Call set_breakpoint_data.
11916 * linux-low.h (struct linux_target_ops): Add breakpoint
11917 handling members.
11918 * server.c (attach_inferior): Remove extra add_inferior
11919 call.
11920 * server.h: Include mem-break.h. Update inferior.c
11921 prototypes.
11922 * target.c (read_inferior_memory)
11923 (write_inferior_memory): New functions.
11924 * target.h (read_inferior_memory)
11925 (write_inferior_memory): Change macros to prototypes.
11926 (struct target_ops): Update comments. Add const to write_memory
11927 definition.
11928
119292002-04-11 Daniel Jacobowitz <drow@mvista.com>
11930
11931 * linux-low.c (usr_store_inferior_registers): Support
11932 registers which are allowed to fail to store.
11933 * linux-low.h (linux_target_ops): Likewise.
11934 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11935 (ppc_cannot_store_register): FPSCR may not be storable.
11936
119372002-04-09 Daniel Jacobowitz <drow@mvista.com>
11938
11939 * server.h: Include <string.h> if HAVE_STRING_H.
11940 * ChangeLog: Correct paths in last ChangeLog entry.
11941
119422002-04-09 Daniel Jacobowitz <drow@mvista.com>
11943
11944 * linux-low.h: Remove obsolete prototypes.
11945 (struct linux_target_ops): New.
11946 (extern the_low_target): New.
11947 * linux-low.c (num_regs, regmap): Remove declarations.
11948 (register_addr): Use the_low_target explicitly.
11949 (fetch_register): Likewise.
11950 (usr_fetch_inferior_registers): Likewise.
11951 (usr_store_inferior_registers): Likewise.
11952 * linux-arm-low.c (num_regs): Remove.
11953 (arm_num_regs): Define.
11954 (arm_regmap): Renamed from regmap, made static.
11955 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11956 made static.
11957 (arm_cannot_store_register): Renamed from cannot_store_register,
11958 made static.
11959 (the_low_target): New.
11960 * linux-i386-low.c (num_regs): Remove.
11961 (i386_num_regs): Define.
11962 (i386_regmap): Renamed from regmap, made static.
11963 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11964 made static.
11965 (i386_cannot_store_register): Renamed from cannot_store_register,
11966 made static.
11967 (the_low_target): New.
11968 * linux-ia64-low.c (num_regs): Remove.
11969 (ia64_num_regs): Define.
11970 (ia64_regmap): Renamed from regmap, made static.
11971 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11972 made static.
11973 (ia64_cannot_store_register): Renamed from cannot_store_register,
11974 made static.
11975 (the_low_target): New.
11976 * linux-m68k-low.c (num_regs): Remove.
11977 (m68k_num_regs): Define.
11978 (m68k_regmap): Renamed from regmap, made static.
11979 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11980 made static.
11981 (m68k_cannot_store_register): Renamed from cannot_store_register,
11982 made static.
11983 (the_low_target): New.
11984 * linux-mips-low.c (num_regs): Remove.
11985 (mips_num_regs): Define.
11986 (mips_regmap): Renamed from regmap, made static.
11987 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11988 made static.
11989 (mips_cannot_store_register): Renamed from cannot_store_register,
11990 made static.
11991 (the_low_target): New.
11992 * linux-ppc-low.c (num_regs): Remove.
11993 (ppc_num_regs): Define.
11994 (ppc_regmap): Renamed from regmap, made static.
11995 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11996 made static.
11997 (ppc_cannot_store_register): Renamed from cannot_store_register,
11998 made static.
11999 (the_low_target): New.
12000 * linux-s390-low.c (num_regs): Remove.
12001 (s390_num_regs): Define.
12002 (s390_regmap): Renamed from regmap, made static.
12003 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12004 made static.
12005 (s390_cannot_store_register): Renamed from cannot_store_register,
12006 made static.
12007 (the_low_target): New.
12008 * linux-sh-low.c (num_regs): Remove.
12009 (sh_num_regs): Define.
12010 (sh_regmap): Renamed from regmap, made static.
12011 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12012 made static.
12013 (sh_cannot_store_register): Renamed from cannot_store_register,
12014 made static.
12015 (the_low_target): New.
12016 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12017 (the_low_target): New.
12018
120192002-04-09 Daniel Jacobowitz <drow@mvista.com>
12020
12021 * Makefile.in: Add stamp-h target.
12022 * configure.in: Create stamp-h.
12023 * configure: Regenerated.
12024
120252002-04-09 Daniel Jacobowitz <drow@mvista.com>
12026
12027 * inferiors.c: New file.
12028 * target.c: New file.
12029 * target.h: New file.
12030 * Makefile.in: Add target.o and inferiors.o. Update
12031 dependencies.
12032 * linux-low.c (inferior_pid): New static variable,
12033 moved from server.c.
12034 (linux_create_inferior): Renamed from create_inferior.
12035 Call add_inferior. Return 0 on success instead of a PID.
12036 (linux_attach): Renamed from myattach.
12037 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12038 (linux_thread_alive): Renamed from mythread_alive.
12039 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12040 child dies.
12041 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12042 (regsets_store_inferior_registers): Correct error message.
12043 Add missing ``return 0''.
12044 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12045 (linux_store_registers): Renamed from store_inferior_registers.
12046 (linux_read_memory): Renamed from read_inferior_memory.
12047 (linux_write_memory): Renamed from write_inferior_memory.
12048 (linux_target_ops): New structure.
12049 (initialize_low): Call set_target_ops ().
12050 * remote-utils.c (unhexify): New function.
12051 (hexify): New function.
12052 (input_interrupt): Send signals to ``signal_pid''.
12053 * server.c (inferior_pid): Remove.
12054 (start_inferior): Update create_inferior call.
12055 (attach_inferior): Call add_inferior.
12056 (handle_query): New function.
12057 (main): Call handle_query for `q' packets.
12058 * server.h: Include "target.h". Remove obsolete prototypes.
12059 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12060
120612002-04-09 Daniel Jacobowitz <drow@mvista.com>
12062
12063 * Makefile.in: Add WARN_CFLAGS. Update configury
12064 dependencies.
12065 * configure.in: Check for <string.h>
12066 * configure: Regenerate.
12067 * config.in: Regenerate.
12068 * gdbreplay.c: Include needed system headers.
12069 (remote_open): Remove strchr prototype.
12070 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12071 * regcache.c (supply_register): Change buf argument to const void *.
12072 (supply_register_by_name): Likewise.
12073 (collect_register): Change buf argument to void *.
12074 (collect_register_by_name): Likewise.
12075 * regcache.h: Add missing prototypes.
12076 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12077 * server.c (handle_query): New function.
12078 (attached): New static variable, moved out of main.
12079 (main): Quiet longjmp clobber warnings.
12080 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12081 * utils.c (error): Remove NORETURN.
12082 (fatal): Likewise.
This page took 1.574578 seconds and 4 git commands to generate.