Fix gdb.threads/non-ldr-exc-3.exp race
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
750ce8d1
YQ
12015-09-15 Yao Qi <yao.qi@linaro.org>
2
3 * server.c (vCont_supported): New global variable.
4 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5 matches. Append ";vContSupported+" to own_buf.
6 (handle_v_requests): Append ";s;S" to own_buf if target supports
7 hardware single step or vCont_supported is false.
8 (capture_main): Set vCont_supported to zero.
9
70b90b91
YQ
102015-09-15 Yao Qi <yao.qi@linaro.org>
11
12 * linux-low.c (linux_supports_conditional_breakpoints): Rename
13 it to ...
14 (linux_supports_hardware_single_step): ... New function.
15 (linux_target_ops): Update.
16 * lynx-low.c (lynx_target_ops): Set field
17 supports_hardware_single_step to target_can_do_hardware_single_step.
18 * nto-low.c (nto_target_ops): Likewise.
19 * spu-low.c (spu_target_ops): Likewise.
20 * win32-low.c (win32_target_ops): Likewise.
21 * target.c (target_can_do_hardware_single_step): New function.
22 * target.h (struct target_ops) <supports_conditional_breakpoints>:
23 Remove. <supports_hardware_single_step>: New field.
24 (target_supports_conditional_breakpoints): Remove.
25 (target_supports_hardware_single_step): New macro.
26 (target_can_do_hardware_single_step): Declare.
27 * server.c (handle_query): Use target_supports_hardware_single_step
28 instead of target_supports_conditional_breakpoints.
29
ade90bde
YQ
302015-09-15 Yao Qi <yao.qi@linaro.org>
31
32 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
33 function.
34 (struct linux_target_ops the_low_target): Install
35 aarch64_linux_siginfo_fixup.
36
94585166
DB
372015-09-11 Don Breazeal <donb@codesourcery.com>
38 Luis Machado <lgustavo@codesourcery.com>
39
40 * linux-low.c (linux_mourn): Static declaration.
41 (linux_arch_setup): Move in front of
42 handle_extended_wait.
43 (linux_arch_setup_thread): New function.
44 (handle_extended_wait): Handle exec events. Call
45 linux_arch_setup_thread. Make event_lwp argument a
46 pointer-to-a-pointer.
47 (check_zombie_leaders): Do not check stopped threads.
48 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
49 (linux_low_filter_event): Add lwp and thread for exec'ing
50 non-leader thread if leader thread has been deleted.
51 Refactor code into linux_arch_setup_thread and call it.
52 Pass child lwp pointer by reference to handle_extended_wait.
53 (linux_wait_for_event_filtered): Update comment.
54 (linux_wait_1): Prevent clobbering exec event status.
55 (linux_supports_exec_events): New function.
56 (linux_target_ops) <supports_exec_events>: Initialize new member.
57 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
58 new member.
59 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
60 * server.c (report_exec_events): New global variable.
61 (handle_query): Handle qSupported query for exec-events feature.
62 (captured_main): Initialize report_exec_events.
63 * server.h (report_exec_events): Declare new global variable.
64 * target.h (struct target_ops) <supports_exec_events>: New
65 member.
66 (target_supports_exec_events): New macro.
67 * win32-low.c (win32_target_ops) <supports_exec_events>:
68 Initialize new member.
69
0568462b
MM
702015-09-09 Markus Metzger <markus.t.metzger@intel.com>
71
72 * linux-low.c (linux_low_enable_btrace): Remove.
73 (linux_target_ops): Replace linux_low_enable_btrace with
74 linux_enable_btrace.
75
39edd165
YQ
762015-09-03 Yao Qi <yao.qi@linaro.org>
77
78 * linux-aarch64-low.c (aarch64_insert_point): Call
79 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
80 returns true.
81
1db33b5a
UW
822015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
83
84 * linux-low.c (check_stopped_by_breakpoint): Use
85 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
86
ab290430
PA
872015-08-27 Pedro Alves <palves@redhat.com>
88
89 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
90
8d749320
SM
912015-08-26 Simon Marchi <simon.marchi@ericsson.com>
92
6711b7f8
SM
93 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
94 the XNEW-family equivalent.
8d749320
SM
95 (compile_bytecodes): Likewise.
96 * dll.c (loaded_dll): Likewise.
97 * event-loop.c (append_callback_event): Likewise.
98 (create_file_handler): Likewise.
99 (create_file_event): Likewise.
100 * hostio.c (handle_open): Likewise.
101 * inferiors.c (add_thread): Likewise.
102 (add_process): Likewise.
103 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
104 * linux-arm-low.c (arm_new_process): Likewise.
105 (arm_new_thread): Likewise.
106 * linux-low.c (add_to_pid_list): Likewise.
107 (linux_add_process): Likewise.
108 (handle_extended_wait): Likewise.
109 (add_lwp): Likewise.
110 (enqueue_one_deferred_signal): Likewise.
111 (enqueue_pending_signal): Likewise.
112 (linux_resume_one_lwp_throw): Likewise.
113 (linux_resume_one_thread): Likewise.
114 (linux_read_memory): Likewise.
115 (linux_write_memory): Likewise.
116 * linux-mips-low.c (mips_linux_new_process): Likewise.
117 (mips_linux_new_thread): Likewise.
118 (mips_add_watchpoint): Likewise.
119 * linux-x86-low.c (initialize_low_arch): Likewise.
120 * lynx-low.c (lynx_add_process): Likewise.
121 * mem-break.c (set_raw_breakpoint_at): Likewise.
122 (set_breakpoint): Likewise.
123 (add_condition_to_breakpoint): Likewise.
124 (add_commands_to_breakpoint): Likewise.
125 (clone_agent_expr): Likewise.
126 (clone_one_breakpoint): Likewise.
127 * regcache.c (new_register_cache): Likewise.
128 * remote-utils.c (look_up_one_symbol): Likewise.
129 * server.c (queue_stop_reply): Likewise.
130 (start_inferior): Likewise.
131 (queue_stop_reply_callback): Likewise.
132 (handle_target_event): Likewise.
133 * spu-low.c (fetch_ppc_memory): Likewise.
134 (store_ppc_memory): Likewise.
135 * target.c (set_target_ops): Likewise.
136 * thread-db.c (thread_db_load_search): Likewise.
137 (try_thread_db_load_1): Likewise.
138 * tracepoint.c (add_tracepoint): Likewise.
139 (add_tracepoint_action): Likewise.
140 (create_trace_state_variable): Likewise.
141 (cmd_qtdpsrc): Likewise.
142 (cmd_qtro): Likewise.
143 (add_while_stepping_state): Likewise.
144 * win32-low.c (child_add_thread): Likewise.
145 (get_image_name): Likewise.
146
ed8b7b42
YQ
1472015-08-25 Yao Qi <yao.qi@linaro.org>
148
149 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
150
db3cb7cb
YQ
1512015-08-25 Yao Qi <yao.qi@linaro.org>
152
153 * Makefile.in (aarch64-linux.o): New rule.
154 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
155 srv_tgtobj.
156 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
157 (aarch64_init_debug_reg_state): Make it extern.
158 (aarch64_linux_prepare_to_resume): Remove.
159
f6011a1c
YQ
1602015-08-25 Yao Qi <yao.qi@linaro.org>
161
162 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
163 lwp_arch_private_info and ptid_of_lwp.
164
88e2cf7e
YQ
1652015-08-25 Yao Qi <yao.qi@linaro.org>
166
167 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
168 Find proc_info by find_process_pid. All callers updated.
169
5e35436e
YQ
1702015-08-25 Yao Qi <yao.qi@linaro.org>
171
172 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
173 Remove.
174 (debug_reg_change_callback): Remove.
175 (aarch64_notify_debug_reg_change): Remove.
176
4a8a7965
YQ
1772015-08-25 Yao Qi <yao.qi@linaro.org>
178
179 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
180 Call current_lwp_ptid.
181
32a271ee
YQ
1822015-08-25 Yao Qi <yao.qi@linaro.org>
183
184 * linux-aarch64-low.c (debug_reg_change_callback): Use
185 debug_printf.
186
0d51c8d7
YQ
1872015-08-25 Yao Qi <yao.qi@linaro.org>
188
189 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
190
31a43dd5
YQ
1912015-08-25 Yao Qi <yao.qi@linaro.org>
192
193 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
194
8ee52567
YQ
1952015-08-25 Yao Qi <yao.qi@linaro.org>
196
197 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
198 the code.
199
ff3f0f45
YQ
2002015-08-25 Yao Qi <yao.qi@linaro.org>
201
202 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
203 Remove.
204 (debug_reg_change_callback): Remove argument entry and add argument
205 lwp. Remove local variable thread. Don't print thread id in the
206 debugging output. Don't check whether pid of thread equals to pid.
207 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
208 iterate_over_lwps instead find_inferior.
209
3d40fbb5
PA
2102015-08-24 Pedro Alves <palves@redhat.com>
211
212 * inferiors.c (get_first_process): New function.
213 * inferiors.h (get_first_process): New declaration.
214 * remote-utils.c (read_ptid): Default to the first process in the
215 list, instead of to the current thread's process.
216
438e1e42
PA
2172015-08-24 Pedro Alves <palves@redhat.com>
218
219 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
220 * event-loop.c: Likewise.
221 * remote-utils.c: Likewise.
222 * tracepoint.c: Likewise.
223
a8c6d4fc
PA
2242015-08-24 Pedro Alves <palves@redhat.com>
225
226 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
227 ptid_get_lwp.
228
99b0bb12
PA
2292015-08-21 Pedro Alves <palves@redhat.com>
230
231 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
232 instead of literal 1.
233
f8904751
PA
2342015-08-21 Pedro Alves <palves@redhat.com>
235
236 * tdesc.c (default_description): Explicitly zero-initialize.
237
465a859e
PA
2382015-08-21 Pedro Alves <palves@redhat.com>
239
240 PR gdb/18749
241 * inferiors.c (remove_thread): Discard any pending stop reply for
242 this thread.
243 * server.c (remove_all_on_match_pid): Rename to ...
244 (remove_all_on_match_ptid): ... this. Work with a filter ptid
245 instead of a pid.
246 (discard_queued_stop_replies): Change parameter to a ptid. Now
247 extern.
248 (handle_v_kill, kill_inferior_callback, captured_main)
249 (process_serial_event): Adjust.
250 * server.h (discard_queued_stop_replies): Declare.
251
f0db101d
PA
2522015-08-21 Pedro Alves <palves@redhat.com>
253
254 * linux-low.c (wait_for_sigstop): Always switch to no thread
255 selected if the previously current thread dies.
256 * lynx-low.c (lynx_request_interrupt): Use the first thread's
257 process instead of the current thread's.
258 * remote-utils.c (input_interrupt): Don't check if there's no
259 current thread.
260 * server.c (gdb_read_memory, gdb_write_memory): If setting the
261 current thread to the general thread fails, error out.
262 (handle_qxfer_auxv, handle_qxfer_libraries)
263 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
264 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
265 (handle_query): Check if there's a thread selected instead of
266 checking whether there's any thread in the thread list.
267 (handle_qxfer_threads, handle_qxfer_btrace)
268 (handle_qxfer_btrace_conf): Don't error out early if there's no
269 thread in the thread list.
270 (handle_v_cont, myresume): Don't set the current thread to the
271 continue thread.
272 (process_serial_event) <Hg handling>: Also set thread_id if the
273 previous general thread is still alive.
274 (process_serial_event) <g/G handling>: If setting the current
275 thread to the general thread fails, error out.
276 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
277 thread's lwp instead of the current thread's.
278 * target.c (set_desired_thread): If the desired thread was not
279 found, leave the current thread pointing to NULL. Return an int
280 (boolean) indicating success.
281 * target.h (set_desired_thread): Change return type to int.
282
40045d91
MF
2832015-08-20 Max Filippov <jcmvbkbc@gmail.com>
284
285 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
286 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
287 #includes.
288 (ps_get_thread_area): New function.
289
45face3b
GB
2902015-08-19 Gary Benson <gbenson@redhat.com>
291
292 * hostio.c (handle_pread): Do not attempt to read more data
293 than hostio_reply_with_data can fit in a packet.
294
16d5f642
JB
2952015-08-18 Joel Brobecker <brobecker@adacore.com>
296
297 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
298
a738da3a
MF
2992015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
300
301 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
302
33ebda9d
PA
3032015-08-06 Pedro Alves <palves@redhat.com>
304
305 * tracepoint.c (expr_eval_result): Now an int.
306
a44892be
PA
3072015-08-06 Pedro Alves <palves@redhat.com>
308
309 * gdbthread.h (struct regcache): Forward declare.
310 (struct thread_info) <regcache_data>: Now a struct regcache
311 pointer.
312 * inferiors.c (inferior_regcache_data)
313 (set_inferior_regcache_data): Now work with struct regcache
314 pointers.
315 * inferiors.h (struct regcache): Forward declare.
316 (inferior_regcache_data, set_inferior_regcache_data): Now work
317 with struct regcache pointers.
318 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
319 (free_register_cache_thread): Remove struct regcache pointer
320 casts.
321
608a1e46
PA
3222015-08-06 Pedro Alves <palves@redhat.com>
323
324 * server.c (captured_main): On error, print the exception message
325 to stderr, and if run_once is set, throw a quit.
326
f0ce0d3a
PA
3272015-08-06 Pedro Alves <palves@redhat.com>
328
329 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
330 the current thread.
331
bf47e248
PA
3322015-08-06 Pedro Alves <palves@redhat.com>
333
334 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
335 reading beyond the passed in buffer length.
336
b6b9ffcc
PL
3372015-08-06 Pierre Langlois <pierre.langlois@arm.com>
338
339 * tracepoint.c (symbol_list) <required>: Remove.
340
863d01bd
PA
3412015-08-06 Pedro Alves <palves@redhat.com>
342
343 * linux-low.c (handle_extended_wait): Set the fork child's suspend
344 count if stopping and suspending threads.
345 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
346 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
347 (linux_detach): Complete an ongoing step-over.
348 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
349 throughout.
350 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
351 (linux_wait_1): If passing a signal to the inferior after
352 finishing a step-over, unsuspend and re-resume all lwps. If we
353 see a single-step event but the thread should be continuing, don't
354 pass the trap to gdb.
355 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
356 internal_error instead of gdb_assert.
357 (enqueue_pending_signal): New function.
358 (check_ptrace_stopped_lwp_gone): Add debug output.
359 (start_step_over): Use internal_error instead of gdb_assert.
360 (complete_ongoing_step_over): New function.
361 (linux_resume_one_thread): Don't resume a suspended thread.
362 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
363 it stepping.
364
00db26fa
PA
3652015-08-06 Pedro Alves <palves@redhat.com>
366
367 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
368 (linux_thread_alive): Use lwp_is_marked_dead.
369 (extended_event_reported): Delete.
370 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
371 instead of extended_event_reported.
372 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
373 as well.
374 (lwp_is_marked_dead): New function.
375 (lwp_running): Use lwp_is_marked_dead.
376 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
377 comment.
378
ad071a30
PA
3792015-08-06 Pedro Alves <palves@redhat.com>
380
381 * linux-low.c (linux_wait_1): Move fork event output out of the
382 !report_to_gdb check. Pass event_child->waitstatus to
383 target_waitstatus_to_string instead of ourstatus.
384
524b57e6
YQ
3852015-08-04 Yao Qi <yao.qi@linaro.org>
386
387 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
388 if current_thread is 32 bit.
389
6085d6f6
YQ
3902015-08-04 Yao Qi <yao.qi@linaro.org>
391
392 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
393 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
394 * server.c (extended_protocol): Remove "static".
395 * server.h (extended_protocol): Declare it.
396
8a7e4587
YQ
3972015-08-04 Yao Qi <yao.qi@linaro.org>
398
399 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
400 both aarch64 and aarch32.
401 (aarch64_set_pc): Likewise.
402
3b53ae99
YQ
4032015-08-04 Yao Qi <yao.qi@linaro.org>
404
405 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
406 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
407 arm-with-neon.xml to srv_xmlfiles.
408 * linux-aarch64-low.c: Include linux-aarch32-low.h.
409 (is_64bit_tdesc): New function.
410 (aarch64_linux_read_description): New function.
411 (aarch64_arch_setup): Call aarch64_linux_read_description.
412 (regs_info): Rename to regs_info_aarch64.
413 (aarch64_regs_info): Return right regs_info.
414 (initialize_low_arch): Call initialize_low_arch_aarch32.
415
bd9e6534
YQ
4162015-08-04 Yao Qi <yao.qi@linaro.org>
417
418 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
419 * linux-aarch32-low.c: New file.
420 * linux-aarch32-low.h: New file.
421 * linux-arm-low.c (arm_fill_gregset): Move it to
422 linux-aarch32-low.c.
423 (arm_store_gregset): Likewise.
424 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
425 (arm_store_vfpregset): Call arm_store_vfpregset_num.
426 (arm_arch_setup): Check if PTRACE_GETREGSET works.
427 (regs_info): Rename to regs_info_arm.
428 (arm_regs_info): Return regs_info_aarch32 if
429 have_ptrace_getregset is 1 and target description is
430 arm_with_neon or arm_with_vfpv3.
431 (initialize_low_arch): Don't call init_registers_arm_with_neon.
432 Call initialize_low_arch_aarch32 instead.
433
ded48a5e
YQ
4342015-08-04 Yao Qi <yao.qi@linaro.org>
435
436 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
437 * linux-low.c: ... here.
438 * linux-low.h (have_ptrace_getregset): Declare it.
439
96e9210f
PA
4402015-08-04 Pedro Alves <palves@redhat.com>
441
442 * thread-db.c (struct thread_db): Use new typedefs.
443 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
444 CHK calls.
445 (disable_thread_event_reporting): Cast result of dlsym to
446 destination function pointer type.
447 (thread_db_mourn): Use td_ta_delete_ftype.
448
af60a1ef
SL
4492015-08-03 Sandra Loosemore <sandra@codesourcery.com>
450
451 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
452 arch variant.
453 (CDX_BREAKPOINT): Define for R2.
454 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
455 (the_low_target): Add comments.
456
e8b41681
YQ
4572015-07-30 Yao Qi <yao.qi@linaro.org>
458
459 * linux-arm-low.c (arm_hwcap): Remove it.
460 (arm_read_description): New local variable arm_hwcap. Don't
461 set arm_hwcap to zero.
462
89abb039
YQ
4632015-07-30 Yao Qi <yao.qi@linaro.org>
464
465 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
466 Use regcache->tdesc instead.
467 (arm_store_wmmxregset): Likewise.
468 (arm_fill_vfpregset): Likewise.
469 (arm_store_vfpregset): Likewise.
470
deca266c
YQ
4712015-07-30 Yao Qi <yao.qi@linaro.org>
472
473 * linux-arm-low.c: Include arch/arm.h.
474 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
475 (arm_store_gregset): Likewise.
476
aa58a496
SM
4772015-07-29 Simon Marchi <simon.marchi@ericsson.com>
478
479 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
480 ptrace's 4th parameter.
481
50904b25
YQ
4822015-07-27 Yao Qi <yao.qi@linaro.org>
483
484 * configure.srv (case aarch64*-*-linux*): Don't set
485 srv_linux_usrregs.
486
5826e159
PA
4872015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
488
489 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
490 sys/ptrace.h.
491 * linux-arm-low.c: Likewise.
492 * linux-cris-low.c: Likewise.
493 * linux-crisv32-low.c: Likewise.
494 * linux-low.c: Likewise.
495 * linux-m68k-low.c: Likewise.
496 * linux-mips-low.c: Likewise.
497 * linux-nios2-low.c: Likewise.
498 * linux-s390-low.c: Likewise.
499 * linux-sparc-low.c: Likewise.
500 * linux-tic6x-low.c: Likewise.
501 * linux-tile-low.c: Likewise.
502 * linux-x86-low.c: Likewise.
503
54019719
PA
5042015-07-24 Pedro Alves <palves@redhat.com>
505
506 * config.in: Regenerate.
507 * configure: Regenerate.
508
eb7aa561
PA
5092015-07-24 Pedro Alves <palves@redhat.com>
510
511 * acinclude.m4: Include ../ptrace.m4.
512 * configure.ac: Call GDB_AC_PTRACE.
513 * config.in, configure: Regenerate.
514
55d7b841
YQ
5152015-07-24 Yao Qi <yao.qi@linaro.org>
516
517 * linux-low.c (linux_create_inferior): Remove setting to
518 proc->priv->new_inferior.
519 (linux_attach): Likewise.
520 (linux_low_filter_event): Likewise.
521 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
522
c06cbd92
YQ
5232015-07-24 Yao Qi <yao.qi@linaro.org>
524
525 * linux-low.c (linux_arch_setup): New function.
526 (linux_low_filter_event): If proc->tdesc is NULL and
527 proc->attached is true, call the_low_target.arch_setup.
528 Otherwise, keep status pending, and return.
529 (linux_resume_one_lwp_throw): Don't call get_pc if
530 thread->while_stepping isn't NULL. Don't call
531 get_thread_regcache if proc->tdesc is NULL.
532 (need_step_over_p): Return 0 if proc->tdesc is NULL.
533 (linux_target_ops): Install arch_setup.
534 * server.c (start_inferior): Call the_target->arch_setup.
535 * target.h (struct target_ops) <arch_setup>: New field.
536 (target_arch_setup): New marco.
537 * lynx-low.c (lynx_target_ops): Update.
538 * nto-low.c (nto_target_ops): Update.
539 * spu-low.c (spu_target_ops): Update.
540 * win32-low.c (win32_target_ops): Update.
541
5ae3ebba
YQ
5422015-07-24 Yao Qi <yao.qi@linaro.org>
543
544 * linux-low.c (linux_add_process): Don't set
545 proc->priv->new_inferior.
546 (linux_create_inferior): Set proc->priv->new_inferior to 1.
547 (linux_attach): Likewise.
548
eb97750b
YQ
5492015-07-24 Yao Qi <yao.qi@linaro.org>
550
551 * server.c (start_inferior): Code refactor.
552
51aee833
YQ
5532015-07-24 Yao Qi <yao.qi@linaro.org>
554
555 * server.c (process_serial_event): Set general_thread.
556
af1b22f3
YQ
5572015-07-21 Yao Qi <yao.qi@linaro.org>
558
559 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
560 aarch64_linux_get_debug_reg_capacity.
561
554717a3
YQ
5622015-07-17 Yao Qi <yao.qi@linaro.org>
563
564 * Makefile.in (aarch64-linux-hw-point.o): New rule.
565 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
566 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
567 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
568 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
569 (AARCH64_HWP_ALIGNMENT): Likewise.
570 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
571 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
572 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
573 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
574 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
575 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
576 (struct aarch64_debug_reg_state): Likewise.
577 (struct arch_lwp_info): Likewise.
578 (aarch64_align_watchpoint): Likewise.
579 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
580 (aarch64_watchpoint_length): Likewise.
581 (aarch64_point_encode_ctrl_reg): Likewise
582 (aarch64_point_is_aligned): Likewise.
583 (aarch64_align_watchpoint): Likewise.
584 (aarch64_linux_set_debug_regs):
585 (aarch64_dr_state_insert_one_point): Likewise.
586 (aarch64_dr_state_remove_one_point): Likewise.
587 (aarch64_handle_breakpoint): Likewise.
588 (aarch64_handle_aligned_watchpoint): Likewise.
589 (aarch64_handle_unaligned_watchpoint): Likewise.
590 (aarch64_handle_watchpoint): Likewise.
591
c67ca4de
YQ
5922015-07-17 Yao Qi <yao.qi@linaro.org>
593
594 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
595 and don't aarch64_get_debug_reg_state. All callers update.
596 (aarch64_handle_aligned_watchpoint): Likewise.
597 (aarch64_handle_unaligned_watchpoint): Likewise.
598 (aarch64_handle_watchpoint): Likewise.
599 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
600 (aarch64_remove_point): Likewise.
601
25abf979
YQ
6022015-07-17 Yao Qi <yao.qi@linaro.org>
603
604 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
605 debug_printf.
606 (aarch64_handle_unaligned_watchpoint): Likewise.
607
db1ff28b
JK
6082015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
609
610 Revert the previous 3 commits:
611 Move gdb_regex* to common/
612 Move linux_find_memory_regions_full & co.
613 gdbserver build-id attribute generator
614
700ca40f
JK
6152015-07-15 Aleksandar Ristovski <aristovski@qnx.com
616 Jan Kratochvil <jan.kratochvil@redhat.com>
617
618 gdbserver build-id attribute generator.
619 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
620 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
621 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
622 (find_phdr): New.
623 (get_dynamic): Use find_pdhr to traverse program headers.
624 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
625 (compare_mapping_entry_range, struct find_memory_region_callback_data)
626 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
627 (get_hex_build_id): New.
628 (linux_qxfer_libraries_svr4): Add optional build-id attribute
629 to reply XML document.
630
9904185c
JK
6312015-07-15 Aleksandar Ristovski <aristovski@qnx.com
632 Jan Kratochvil <jan.kratochvil@redhat.com>
633
634 * target.c: Include target/target-utils.h and fcntl.h.
635 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
636 (target_fileio_read_stralloc): New functions.
637
6e5b4429
JK
6382015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
639
640 * Makefile.in (OBS): Add gdb_regex.o.
641 (gdb_regex.o): New.
642 * config.in: Rebuilt.
643 * configure: Rebuilt.
644
ddc98fbf
JK
6452015-07-15 Aleksandar Ristovski <aristovski@qnx.com
646 Jan Kratochvil <jan.kratochvil@redhat.com>
647
648 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
649 * Makefile.in (OBS): Add target-utils.o.
650 (linux-maps.o, target-utils.o): New.
651 * configure.srv (srv_linux_obj): Add linux-maps.o.
652
e57bb7a0
PL
6532015-07-15 Pierre Langlois <pierre.langlois@arm.com>
654
655 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
656 function, return 1.
657 (the_low_target): Install it.
658
586b02a9
PA
6592015-07-14 Pedro Alves <palves@redhat.com>
660
661 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
662 Instead, ignore ECHILD, and throw an error for other errnos.
663
58c1b36c
PA
6642015-07-10 Pedro Alves <palves@redhat.com>
665
666 * event-loop.c (struct callback_event) <data>: Change type to
667 gdb_client_data instance instead of gdb_client_data pointer.
668 (append_callback_event): Adjust.
669
421530db
PL
6702015-07-10 Pierre Langlois <pierre.langlois@arm.com>
671
672 * linux-aarch64-low.c: Add comments for each linux_target_ops
673 method. Remove comments already covered in target_ops and
674 linux_target_ops definitions.
675 (the_low_target): Add comments for each unimplemented method.
676
c2d65f38
YQ
6772015-07-09 Yao Qi <yao.qi@linaro.org>
678
679 * linux-aarch64-low.c (aarch64_regmap): Remove.
680 (aarch64_usrregs_info): Remove.
681 (regs_info): Set field usrregs to NULL.
682
b20a6524
MM
6832015-07-02 Markus Metzger <markus.t.metzger@intel.com>
684
685 * linux-low.c: Include "rsp-low.h"
686 (linux_low_encode_pt_config, linux_low_encode_raw): New.
687 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
688 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
689 (handle_btrace_enable_pt): New.
690 (handle_btrace_general_set): Support "pt".
691 (handle_btrace_conf_general_set): Support "pt:size".
692
96c97461
PL
6932015-06-29 Pierre Langlois <pierre.langlois@arm.com>
694
695 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
696 Z_PACKET_SW_BP.
697
37d66942
PL
6982015-06-29 Pierre Langlois <pierre.langlois@arm.com>
699
700 * linux-aarch64-low.c: Remove comment about endianness.
701 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
702 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
703 memcmp.
704
dc06243f
GB
7052015-06-24 Gary Benson <gbenson@redhat.com>
706
707 * linux-i386-ipa.c (stdint.h): Do not include.
708 * lynx-i386-low.c (stdint.h): Likewise.
709 * lynx-ppc-low.c (stdint.h): Likewise.
710 * mem-break.c (stdint.h): Likewise.
711 * thread-db.c (stdint.h): Likewise.
712 * tracepoint.c (stdint.h): Likewise.
713 * win32-low.c (stdint.h): Likewise.
714
124e13d9
SM
7152015-06-18 Simon Marchi <simon.marchi@ericsson.com>
716
717 * server.c (write_qxfer_response): Update call to
718 remote_escape_output.
719
909c2cda
JK
7202015-06-15 Aleksandar Ristovski <aristovski@qnx.com
721 Jan Kratochvil <jan.kratochvil@redhat.com>
722
723 Merge multiple hex conversions.
724 * gdbreplay.c (tohex): Rename to 'fromhex'.
725 (logchar): Use fromhex.
726
24c05f46
JK
7272015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
728
729 * server.c (handle_qxfer_libraries): Set `version' attribute for
730 <library-list>.
731
14d2069a
GB
7322015-06-10 Gary Benson <gbenson@redhat.com>
733
734 * target.h (struct target_ops) <multifs_open>: New field.
735 <multifs_unlink>: Likewise.
736 <multifs_readlink>: Likewise.
737 * linux-low.c (nat/linux-namespaces.h): New include.
738 (linux_target_ops): Initialize the_target->multifs_open,
739 the_target->multifs_unlink and the_target->multifs_readlink.
740 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
741 * hostio.c (hostio_fs_pid): New static variable.
742 (hostio_handle_new_gdb_connection): New function.
743 (handle_setfs): Likewise.
744 (handle_open): Use the_target->multifs_open as appropriate.
745 (handle_unlink): Use the_target->multifs_unlink as appropriate.
746 (handle_readlink): Use the_target->multifs_readlink as
747 appropriate.
748 (handle_vFile): Handle vFile:setfs packets.
749 * server.c (handle_query): Call hostio_handle_new_gdb_connection
750 after target_handle_new_gdb_connection.
751
4b8b5e72
GB
7522015-06-10 Gary Benson <gbenson@redhat.com>
753
754 * configure.ac (AC_CHECK_FUNCS): Add setns.
755 * config.in: Regenerate.
756 * configure: Likewise.
757 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
758 (linux-namespaces.o): New rule.
759 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
760
3ac2e371
GB
7612015-06-09 Gary Benson <gbenson@redhat.com>
762
763 * hostio.c (handle_open): Process mode argument with
764 fileio_to_host_mode.
765
ca9b78ce
YQ
7662015-06-01 Yao Qi <yao.qi@linaro.org>
767
768 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
769 * linux-x86-low.c: Likewise.
770
bfacd19d
DB
7712015-05-28 Don Breazeal <donb@codesourcery.com>
772
773 * linux-low.c (handle_extended_wait): Initialize
774 thread_info.last_resume_kind for new fork children.
775
452003ef
PA
7762015-05-15 Pedro Alves <palves@redhat.com>
777
778 * target.h (target_handle_new_gdb_connection): Rewrite using if
779 wrapped in do/while.
780
1041a03c
JB
7812015-05-14 Joel Brobecker <brobecker@adacore.com>
782
783 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
784 * configure, config.in: Regenerate.
785 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
786 Declare typedef.
787
c269dbdb
DB
7882015-05-12 Don Breazeal <donb@codesourcery.com>
789
790 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
791 PTRACE_EVENT_VFORK_DONE.
792 (linux_low_ptrace_options, extended_event_reported): Add vfork
793 events.
794 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
795 and "vforkdone" for RSP 'T' Stop Reply Packet.
796 * server.h (report_vfork_events): Declare
797 global variable.
798
3a8a0396
DB
7992015-05-12 Don Breazeal <donb@codesourcery.com>
800
801 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
802 (the_low_target) <new_fork>: Initialize new member.
803 * linux-arm-low.c (arm_new_fork): New function.
804 (the_low_target) <new_fork>: Initialize new member.
805 * linux-low.c (handle_extended_wait): Call new target function
806 new_fork.
807 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
808 * linux-mips-low.c (mips_add_watchpoint): New function
809 extracted from mips_insert_point.
810 (the_low_target) <new_fork>: Initialize new member.
811 (mips_linux_new_fork): New function.
812 (mips_insert_point): Call mips_add_watchpoint.
813 * linux-x86-low.c (x86_linux_new_fork): New function.
814 (the_low_target) <new_fork>: Initialize new member.
815
de0d863e
DB
8162015-05-12 Don Breazeal <donb@codesourcery.com>
817
818 * linux-low.c (handle_extended_wait): Implement return value,
819 rename argument 'event_child' to 'event_lwp', handle
820 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
821 (linux_low_ptrace_options): New function.
822 (linux_low_filter_event): Call linux_low_ptrace_options,
823 use different argument fo linux_enable_event_reporting,
824 use return value from handle_extended_wait.
825 (extended_event_reported): New function.
826 (linux_wait_1): Call extended_event_reported and set
827 status to report fork events.
828 (linux_write_memory): Add pid to debug message.
829 (reset_lwp_ptrace_options_callback): New function.
830 (linux_handle_new_gdb_connection): New function.
831 (linux_target_ops): Initialize new structure member.
832 * linux-low.h (struct lwp_info) <waitstatus>: New member.
833 * lynx-low.c: Initialize new structure member.
834 * remote-utils.c (prepare_resume_reply): Implement stop reason
835 "fork" for "T" stop message.
836 * server.c (handle_query): Call handle_new_gdb_connection.
837 * server.h (report_fork_events): Declare global flag.
838 * target.h (struct target_ops) <handle_new_gdb_connection>:
839 New member.
840 (target_handle_new_gdb_connection): New macro.
841 * win32-low.c: Initialize new structure member.
842
ddcbc397
DB
8432015-05-12 Don Breazeal <donb@codesourcery.com>
844
845 * mem-break.c (APPEND_TO_LIST): Define macro.
846 (clone_agent_expr): New function.
847 (clone_one_breakpoint): New function.
848 (clone_all_breakpoints): New function.
849 * mem-break.h: Declare new functions.
850
89245bc0
DB
8512015-05-12 Don Breazeal <donb@codesourcery.com>
852
853 * linux-low.c (linux_supports_fork_events): New function.
854 (linux_supports_vfork_events): New function.
855 (linux_target_ops): Initialize new structure members.
856 (initialize_low): Call linux_check_ptrace_features.
857 * lynx-low.c (lynx_target_ops): Initialize new structure
858 members.
859 * server.c (report_fork_events, report_vfork_events):
860 New global flags.
861 (handle_query): Add new features to qSupported packet and
862 response.
863 (captured_main): Initialize new global variables.
864 * target.h (struct target_ops) <supports_fork_events>:
865 New member.
866 <supports_vfork_events>: New member.
867 (target_supports_fork_events): New macro.
868 (target_supports_vfork_events): New macro.
869 * win32-low.c (win32_target_ops): Initialize new structure
870 members.
871
835205d0
GB
8722015-05-12 Gary Benson <gbenson@redhat.com>
873
874 * server.c (handle_qxfer_exec_file): Use current process
875 if annex is empty.
876
21e94bd9
SL
8772015-05-08 Sandra Loosemore <sandra@codesourcery.com>
878
879 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
880 Remove HAVE_PTRACE_GETREGS conditionals.
881 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
882 instead of PTRACE_GETREGS and PTRACE_SETREGS.
883
45614f15
YQ
8842015-05-08 Yao Qi <yao.qi@linaro.org>
885
886 * linux-low.c (linux_supports_conditional_breakpoints): New
887 function.
888 (linux_target_ops): Install new target method.
889 * lynx-low.c (lynx_target_ops): Install NULL hook for
890 supports_conditional_breakpoints.
891 * nto-low.c (nto_target_ops): Likewise.
892 * spu-low.c (spu_target_ops): Likewise.
893 * win32-low.c (win32_target_ops): Likewise.
894 * server.c (handle_query): Check
895 target_supports_conditional_breakpoints.
896 * target.h (struct target_ops) <supports_conditional_breakpoints>:
897 New field.
898 (target_supports_conditional_breakpoints): New macro.
899
80ad801e
PA
9002015-05-06 Pedro Alves <palves@redhat.com>
901
902 PR server/18081
903 * server.c (start_inferior): If the process exits, mourn it.
904
819843c7
GB
9052015-04-21 Gary Benson <gbenson@redhat.com>
906
907 * hostio.c (fileio_open_flags_to_host): Factored out to
908 fileio_to_host_openflags in common/fileio.c. Single use
909 updated.
910
a2d5a9d7
MF
9112015-04-17 Max Filippov <jcmvbkbc@gmail.com>
912
913 * linux-xtensa-low.c (xtensa_fill_gregset)
914 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
915 XCHAL_HAVE_LOOP.
916
deb44829
MF
9172015-04-17 Max Filippov <jcmvbkbc@gmail.com>
918
919 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
920 (regs_info): Replace usrregs pointer with NULL.
921
e57f1de3
GB
9222015-04-17 Gary Benson <gbenson@redhat.com>
923
924 * target.h (struct target_ops) <pid_to_exec_file>: New field.
925 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
926 * server.c (handle_qxfer_exec_file): New function.
927 (qxfer_packets): Add exec-file entry.
928 (handle_query): Report qXfer:exec-file:read as supported packet.
929
62828379
RN
9302015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
931
932 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
933
b88bb450
GB
9342015-04-09 Gary Benson <gbenson@redhat.com>
935
936 * hostio-errno.c (errno_to_fileio_error): Remove function.
937 Update caller to use remote_fileio_to_fio_error.
938
c8f4bfdd
YQ
9392015-04-09 Yao Qi <yao.qi@linaro.org>
940
941 * linux-low.c (linux_insert_point): Call
942 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
943 (linux_remove_point): Call remove_memory_breakpoint if type is
944 raw_bkpt_type_sw.
945 * linux-x86-low.c (x86_insert_point): Don't call
946 insert_memory_breakpoint.
947 (x86_remove_point): Don't call remove_memory_breakpoint.
948
41f98f02
PA
9492015-04-01 Pedro Alves <palves@redhat.com>
950 Cleber Rosa <crosa@redhat.com>
951
952 * server.c (gdbserver_usage): Reorganize and extend the usage
953 message.
954
2bf6fb9d
PA
9552015-03-24 Pedro Alves <palves@redhat.com>
956
957 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
958 output. Also dump TRAP_TRACE.
959 (linux_low_filter_event): In debug output, distinguish a
960 resume_stop SIGSTOP from a delayed SIGSTOP.
961
369f6daa
GB
9622015-03-24 Gary Benson <gbenson@redhat.com>
963
964 * linux-x86-low.c (x86_linux_new_thread): Moved to
965 nat/x86-linux.c.
966 (x86_linux_prepare_to_resume): Likewise.
967
8e5d4070
GB
9682015-03-24 Gary Benson <gbenson@redhat.com>
969
970 * Makefile.in (x86-linux-dregs.o): New rule.
971 * configure.srv: Add x86-linux-dregs.o to relevant targets.
972 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
973 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
974 (x86_linux_dr_get): Likewise.
975 (x86_linux_dr_set): Likewise.
976 (update_debug_registers_callback): Likewise.
977 (x86_linux_dr_set_addr): Likewise.
978 (x86_linux_dr_get_addr): Likewise.
979 (x86_linux_dr_set_control): Likewise.
980 (x86_linux_dr_get_control): Likewise.
981 (x86_linux_dr_get_status): Likewise.
982 (x86_linux_update_debug_registers): Likewise.
983
2b95d440
GB
9842015-03-24 Gary Benson <gbenson@redhat.com>
985
986 * linux-x86-low.c (x86_linux_update_debug_registers):
987 New function, factored out from...
988 (x86_linux_prepare_to_resume): ...this.
989
14b0bc68
GB
9902015-03-24 Gary Benson <gbenson@redhat.com>
991
992 * linux-x86-low.c (x86_linux_dr_get): Update comments.
993 (x86_linux_dr_set): Likewise.
994 (update_debug_registers_callback): Likewise.
995 (x86_linux_dr_set_addr): Likewise.
996 (x86_linux_dr_get_addr): Likewise.
997 (x86_linux_dr_set_control): Likewise.
998 (x86_linux_dr_get_control): Likewise.
999 (x86_linux_dr_get_status): Likewise.
1000 (x86_linux_prepare_to_resume): Likewise.
1001
5dfe6ca8
GB
10022015-03-24 Gary Benson <gbenson@redhat.com>
1003
1004 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1005 Use perror_with_name. Pass string through gettext.
1006 (x86_linux_dr_set): Likewise.
1007
d33472ad
GB
10082015-03-24 Gary Benson <gbenson@redhat.com>
1009
1010 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1011 (x86_linux_dr_set_addr): ...this.
1012 (x86_dr_low_get_addr): Rename to...
1013 (x86_linux_dr_get_addr): ...this.
1014 (x86_dr_low_set_control): Rename to...
1015 (x86_linux_dr_set_control): ...this.
1016 (x86_dr_low_get_control): Rename to...
1017 (x86_linux_dr_get_control): ...this.
1018 (x86_dr_low_get_status): Rename to...
1019 (x86_linux_dr_get_status): ...this.
1020 (x86_dr_low): Update with new function names.
1021
4b134ca1
GB
10222015-03-24 Gary Benson <gbenson@redhat.com>
1023
1024 * Makefile.in (x86-linux.o): New rule.
1025 * configure.srv: Add x86-linux.o to relevant targets.
1026 * linux-low.c (lwp_set_arch_private_info): New function.
1027 (lwp_arch_private_info): Likewise.
1028 * linux-x86-low.c: Include nat/x86-linux.h.
1029 (arch_lwp_info): Removed structure.
1030 (update_debug_registers_callback):
1031 Use lwp_set_debug_registers_changed.
1032 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1033 and lwp_set_debug_registers_changed.
1034 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1035
34c703da
GB
10362015-03-24 Gary Benson <gbenson@redhat.com>
1037
1038 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1039 * linux-arm-low.c (arm_new_thread): Likewise.
1040 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1041 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1042 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1043 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1044
cff068da
GB
10452015-03-24 Gary Benson <gbenson@redhat.com>
1046
1047 * linux-low.c (ptid_of_lwp): New function.
1048 (lwp_is_stopped): Likewise.
1049 (lwp_stop_reason): Likewise.
1050 * linux-x86-low.c (update_debug_registers_callback):
1051 Use lwp_is_stopped.
1052 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1053 lwp_stop_reason.
1054
b2f7c7e8
GB
10552015-03-24 Gary Benson <gbenson@redhat.com>
1056
1057 * linux-low.h (linux_stop_lwp): Remove declaration.
1058
6d4ee8c6
GB
10592015-03-24 Gary Benson <gbenson@redhat.com>
1060
1061 * linux-low.h: Include nat/linux-nat.h.
1062 * linux-low.c (iterate_over_lwps_args): New structure.
1063 (iterate_over_lwps_filter): New function.
1064 (iterate_over_lwps): Likewise.
1065 * linux-x86-low.c (update_debug_registers_callback):
1066 Update signature to what iterate_over_lwps expects.
1067 Remove PID check that iterate_over_lwps now performs.
1068 (x86_dr_low_set_addr): Use iterate_over_lwps.
1069 (x86_dr_low_set_control): Likewise.
1070
70a0bb6b
GB
10712015-03-24 Gary Benson <gbenson@redhat.com>
1072
1073 * linux-x86-low.c (x86_debug_reg_state): New function.
1074 (x86_linux_prepare_to_resume): Use the above.
1075
7b669087
GB
10762015-03-24 Gary Benson <gbenson@redhat.com>
1077
1078 * linux-low.c (current_lwp_ptid): New function.
1079 * linux-x86-low.c: Include nat/linux-nat.h.
1080 (x86_dr_low_get_addr): Use current_lwp_ptid.
1081 (x86_dr_low_get_control): Likewise.
1082 (x86_dr_low_get_status): Likewise.
1083
eef49a3d
PA
10842015-03-20 Pedro Alves <palves@redhat.com>
1085
1086 * tracepoint.c (cmd_qtstatus): Make "str" const.
1087
b2333d22
PA
10882015-03-20 Pedro Alves <palves@redhat.com>
1089
1090 * server.c (handle_general_set): Make "req_str" const.
1091
23f238d3
PA
10922015-03-19 Pedro Alves <palves@redhat.com>
1093
1094 * linux-low.c (linux_resume_one_lwp): Rename to ...
1095 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1096 instead call perror_with_name.
1097 (check_ptrace_stopped_lwp_gone): New function.
1098 (linux_resume_one_lwp): Reimplement as wrapper around
1099 linux_resume_one_lwp_throw that swallows errors if the LWP is
1100 gone.
1101
91baf43f
PA
11022015-03-19 Pedro Alves <palves@redhat.com>
1103
1104 * linux-low.c (count_events_callback, select_event_lwp_callback):
1105 No longer check whether the thread has resume_stop as last resume
1106 kind.
1107
8bf3b159
PA
11082015-03-19 Pedro Alves <palves@redhat.com>
1109
1110 * linux-low.c (count_events_callback, select_event_lwp_callback):
1111 Use the lwp's status_pending_p field, not the thread's.
1112
b90fc188
PA
11132015-03-19 Pedro Alves <palves@redhat.com>
1114
1115 * linux-low.c (select_event_lwp_callback): Update comments to
1116 no longer mention SIGTRAP.
1117
464b0089
GB
11182015-03-18 Gary Benson <gbenson@redhat.com>
1119
1120 * server.c (handle_query): Do not report vFile:fstat as supported.
1121
aa9e327f
GB
11222015-03-11 Gary Benson <gbenson@redhat.com>
1123
1124 * hostio.c (sys/types.h): New include.
1125 (sys/stat.h): Likewise.
1126 (common-remote-fileio.h): Likewise.
1127 (handle_fstat): New function.
1128 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 1129
791c0056
GB
11302015-03-11 Gary Benson <gbenson@redhat.com>
1131
1132 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1133 struct stat.st_blocks and struct stat.st_blksize.
1134 * configure: Regenerate.
1135 * config.in: Likewise.
1136 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1137 (OBS): Add common-remote-fileio.o.
1138 (common-remote-fileio.o): New rule.
1139
9a9df970
PA
11402015-03-09 Pedro Alves <palves@redhat.com>
1141
1142 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1143 'struct sockaddr' pointer in 'accept' call.
1144
9eb1356e
PA
11452015-03-09 Pedro Alves <palves@redhat.com>
1146
1147 Revert:
1148 2015-03-07 Pedro Alves <palves@redhat.com>
1149 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1150 or <winsock2.h> here. Instead include "gdb_socket.h".
1151 (remote_open): Use union gdb_sockaddr_u.
1152 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1153 or <winsock2.h> here. Instead include "gdb_socket.h".
1154 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1155 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1156 or <sys/un.h>.
1157 (init_named_socket, gdb_agent_helper_thread): Use union
1158 gdb_sockaddr_u.
1159
aac331e4
PA
11602015-03-07 Pedro Alves <palves@redhat.com>
1161
1162 * configure.ac (build_warnings): Move
1163 -Wdeclaration-after-statement to the C-specific set.
1164 * configure: Regenerate.
1165
366c75fc
PA
11662015-03-07 Pedro Alves <palves@redhat.com>
1167
1168 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1169 or <winsock2.h> here. Instead include "gdb_socket.h".
1170 (remote_open): Use union gdb_sockaddr_u.
1171 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1172 or <winsock2.h> here. Instead include "gdb_socket.h".
1173 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1174 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1175 or <sys/un.h>.
1176 (init_named_socket, gdb_agent_helper_thread): Use union
1177 gdb_sockaddr_u.
1178
492d29ea
PA
11792015-03-07 Pedro Alves <palves@redhat.com>
1180
1181 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1182 instead.
1183
60a191ed
YQ
11842015-03-06 Yao Qi <yao.qi@linaro.org>
1185
1186 * linux-aarch64-low.c (aarch64_insert_point): Use
1187 show_debug_regs as a boolean.
1188 (aarch64_remove_point): Likewise.
1189
f5771b1d
PA
11902015-03-05 Pedro Alves <palves@redhat.com>
1191
1192 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1193 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1194 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1195 * nto-low.c (nto_target_ops): Likewise.
1196 * spu-low.c (spu_target_ops): Likewise.
1197 * win32-low.c (win32_target_ops): Likewise.
1198
3e572f71
PA
11992015-03-04 Pedro Alves <palves@redhat.com>
1200
72f4393d 1201 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
1202 Decide whether a breakpoint triggered based on the SIGTRAP's
1203 siginfo.si_code.
72f4393d
L
1204 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1205 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
1206 (linux_low_filter_event): Check for breakpoints before checking
1207 watchpoints.
1208 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1209 siginfo.si_code.
72f4393d
L
1210 (linux_stopped_by_sw_breakpoint)
1211 (linux_supports_stopped_by_sw_breakpoint)
1212 (linux_stopped_by_hw_breakpoint)
1213 (linux_supports_stopped_by_hw_breakpoint): New functions.
1214 (linux_target_ops): Install new target methods.
3e572f71 1215
1ec68e26
PA
12162015-03-04 Pedro Alves <palves@redhat.com>
1217
1218 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1219 * server.c (swbreak_feature, hwbreak_feature): New globals.
1220 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1221 (captured_main): Clear swbreak_feature and hwbreak_feature.
1222 * server.h (swbreak_feature, hwbreak_feature): Declare.
1223 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1224 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1225 supports_stopped_by_hw_breakpoint>: New fields.
1226 (target_supports_stopped_by_sw_breakpoint)
1227 (target_stopped_by_sw_breakpoint)
1228 (target_supports_stopped_by_hw_breakpoint)
1229 (target_stopped_by_hw_breakpoint): Declare.
1230
15c66dd6
PA
12312015-03-04 Pedro Alves <palves@redhat.com>
1232
1233 enum lwp_stop_reason -> enum target_stop_reason
1234 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1235 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1236 (linux_wait_1, stuck_in_jump_pad_callback)
1237 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1238 (linux_stopped_by_watchpoint):
1239 * linux-low.h (enum lwp_stop_reason): Delete.
1240 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1241 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1242
98fc70d6
YQ
12432015-03-04 Yao Qi <yao.qi@linaro.org>
1244
1245 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1246
dd2ac174
GB
12472015-03-03 Gary Benson <gbenson@redhat.com>
1248
1249 * hostio.c (handle_vFile): Fix prefix lengths.
1250
d68e53f4
MM
12512015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1252
1253 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1254 ptr_bits.
1255
bf2d68ab
AA
12562015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1257
1258 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1259 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1260 (clean): Add "rm -f" for above C files.
1261 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1262 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1263 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1264 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1265 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1266 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1267 (init_registers_s390x_vx_linux64)
1268 (init_registers_s390x_tevx_linux64)
1269 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1270 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1271 declarations.
1272 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1273 (s390_store_vxrs_high): New functions.
1274 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1275 NT_S390_VXRS_HIGH.
1276 (s390_arch_setup): Add logic for selecting one of the new target
1277 descriptions. Activate the new vector regsets if applicable.
1278 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1279 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1280 and init_registers_s390x_tevx_linux64.
1281
c966a859
PA
12822015-03-01 Pedro Alves <palves@redhat.com>
1283
1284 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1285 parameter.
1286
4180215b
PA
12872015-02-27 Pedro Alves <palves@redhat.com>
1288
1289 * linux-x86-low.c (u_debugreg_offset): New function.
1290 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1291
749bab01
PA
12922015-02-27 Pedro Alves <palves@redhat.com>
1293
1294 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1295 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1296 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1297 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1298 (ps_lsetfpregs, ps_getpid)
1299 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1300 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1301 (ps_lsetxregs, ps_plog): Declare.
1302
3c14e5a3
PA
13032015-02-27 Pedro Alves <palves@redhat.com>
1304
1305 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1306 IP_AGENT_EXPORT_FUNC.
1307 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1308 IP_AGENT_EXPORT_FUNC.
1309 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1310 (IP_AGENT_EXPORT): Delete.
1311 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1312 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1313 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1314 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1315 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1316 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1317 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1318 (traceframe_read_count, traceframe_write_count)
1319 (traceframes_created, trace_state_variables, get_raw_reg)
1320 (get_trace_state_variable_value, set_trace_state_variable_value)
1321 (ust_loaded, helper_thread_id, cmd_buf): Use
1322 IPA_SYM_EXPORTED_NAME.
1323 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1324 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1325 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1326 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1327 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1328 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1329 EXTERN_C_PUSH/EXTERN_C_POP.
1330 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1331 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1332 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1333 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1334 (traceframe_write_count, traceframe_read_count)
1335 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1336 (about_to_request_buffer_space, get_trace_state_variable_value)
1337 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1338 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1339 EXTERN_C_PUSH/EXTERN_C_POP.
1340 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1341 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1342 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1343 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1344 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1345 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1346 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1347 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1348 Define.
1349 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1350 (IP_AGENT_EXPORT_VAR_DECL): Define.
1351 (tracing): Declare.
1352 (gdb_agent_get_raw_reg): Declare.
1353
fe978cb0
PA
13542015-02-27 Tom Tromey <tromey@redhat.com>
1355 Pedro Alves <palves@redhat.com>
1356
1357 Rename symbols whose names are reserved C++ keywords throughout.
1358
3bc3d82a
PA
13592015-02-27 Pedro Alves <palves@redhat.com>
1360
1361 * Makefile.in (COMPILER): New, get it from autoconf.
1362 (CXX): Get from autoconf instead.
1363 (COMPILE.pre): Use COMPILER.
1364 (CC-LD): Rename to ...
1365 (CC_LD): ... this. Use COMPILER.
1366 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1367 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1368 * acinclude.m4: Include build-with-cxx.m4.
1369 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1370 Disable -Werror by default if building in C++ mode.
1371 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1372 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1373 the C++ compiler. Save/restore CXXFLAGS too.
1374 * configure: Regenerate.
1375
07697489
PA
13762015-02-27 Pedro Alves <palves@redhat.com>
1377
1378 * acinclude.m4: Include libiberty.m4.
1379 * configure.ac: Call libiberty_INIT.
1380 * config.in, configure: Regenerate.
1381
9beb7c4e
PA
13822015-02-26 Pedro Alves <palves@redhat.com>
1383
1384 * linux-low.c (linux_wait_1): When incrementing the PC past a
1385 program breakpoint always use the_low_target.breakpoint_len as
1386 increment, rather than the maximum between that and
1387 the_low_target.decr_pc_after_break.
1388
8090aef2
PA
13892015-02-23 Pedro Alves <palves@redhat.com>
1390
1391 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1392 thread was doing a step-over; always adjust the PC if
1393 we stepped over a permanent breakpoint.
1394 (linux_wait_1): If we stepped over breakpoint that was on top of a
1395 permanent breakpoint, manually advance the PC past it.
1396
bc9540e8
PA
13972015-02-23 Pedro Alves <palves@redhat.com>
1398
1399 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1400 modes.
1401 (x86_fill_gregset, x86_store_gregset): Use it when handling
1402 $orig_eax.
1403
2db9a427
PA
14042015-02-20 Pedro Alves <palves@redhat.com>
1405
1406 * thread-db.c: Include "nat/linux-procfs.h".
1407 (thread_db_init): Skip listing new threads if the kernel supports
1408 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1409
afa8d396
PA
14102015-02-20 Pedro Alves <palves@redhat.com>
1411
1412 * linux-low.c (status_pending_p_callback): Use ptid_match.
1413
c9587f88
AT
14142015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1415
1416 PR breakpoints/16812
1417 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1418 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1419 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1420
b05ec7a5
AT
14212015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1422
1423 PR breakpoints/15956
1424 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1425
d33501a5
MM
14262015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1427
1428 * linux-low.c (linux_low_btrace_conf): Print size.
1429 * server.c (handle_btrace_conf_general_set): New.
1430 (hanle_general_set): Call handle_btrace_conf_general_set.
1431 (handle_query): Report Qbtrace-conf:bts:size as supported.
1432
f4abbc16
MM
14332015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1434
1435 * linux-low.c (linux_low_enable_btrace): Update parameters.
1436 (linux_low_btrace_conf): New.
1437 (linux_target_ops)<to_btrace_conf>: Initialize.
1438 * server.c (current_btrace_conf): New.
1439 (handle_btrace_enable): Rename to ...
1440 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
1441 to target_enable_btrace. Update comment. Update users.
1442 (handle_qxfer_btrace_conf): New.
1443 (qxfer_packets): Add btrace-conf entry.
1444 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1445 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1446 (target_ops)<read_btrace_conf>: New.
1447 (target_enable_btrace): Update parameters.
1448 (target_read_btrace_conf): New.
1449
043c3577
MM
14502015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1451
1452 * server.c (handle_btrace_general_set): Remove call to
1453 target_supports_btrace.
1454 (supported_btrace_packets): New.
1455 (handle_query): Call supported_btrace_packets.
1456 * target.h: include btrace-common.h.
1457 (btrace_target_info): Removed.
1458 (supports_btrace, target_supports_btrace): Update parameters.
1459
734b0e4b
MM
14602015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1461
1462 * Makefile.in (SFILES): Add common/btrace-common.c.
1463 (OBS): Add common/btrace-common.o.
1464 (btrace-common.o): Add build rules.
1465 * linux-low: Include btrace-common.h.
1466 (linux_low_read_btrace): Use struct btrace_data. Call
1467 btrace_data_init and btrace_data_fini.
1468
d6c146e9
PA
14692015-02-06 Pedro Alves <palves@redhat.com>
1470
1471 * thread-db.c (find_new_threads_callback): Add debug output.
1472
20ba1ce6
PA
14732015-02-04 Pedro Alves <palves@redhat.com>
1474
1475 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1476 (resume_stopped_resumed_lwps): New function.
1477 (linux_wait_for_event_filtered): Use it.
1478
8cc73a39
SDJ
14792015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1480
1481 * Makefile.in (SFILES): Add linux-personality.c.
1482 (linux-personality.o): New rule.
1483 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1484 list of objects to be built.
1485 * linux-low.c: Include nat/linux-personality.h.
1486 (linux_create_inferior): Remove code to disable address space
1487 randomization (moved to ../nat/linux-personality.c). Create
1488 cleanup to disable address space randomization.
1489
fb23d554
SDJ
14902015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1491
1492 * Makefile.in (posix-strerror.o): New rule.
1493 (mingw-strerror.o): Likewise.
1494 * configure: Regenerated.
1495 * configure.ac: Source file ../common/common.host. Initialize new
1496 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1497
cdf43629
YQ
14982015-01-14 Yao Qi <yao@codesourcery.com>
1499
1500 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1501 (ppc-linux.o): New rule.
1502 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1503 * configure.ac: AC_CHECK_FUNCS(getauxval).
1504 * config.in: Re-generated.
1505 * configure: Re-generated.
1506 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1507 ppc64_64bit_inferior_p
1508
514c5338
YQ
15092015-01-14 Yao Qi <yao@codesourcery.com>
1510
1511 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1512 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1513 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1514 (PT_ORIG_R3, PT_TRAP): Likewise.
1515 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1516 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1517 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1518
3368c1e5
JB
15192015-01-10 Joel Brobecker <brobecker@adacore.com>
1520
1521 * i387-fp.c (i387_cache_to_xsave): In look over
1522 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1523 zmmh_low_space field by use of zmmh_high_space.
1524
582511be
PA
15252015-01-09 Pedro Alves <palves@redhat.com>
1526
1527 * linux-low.c (step_over_bkpt): Move higher up in the file.
1528 (handle_extended_wait): Don't store the stop_pc here.
1529 (get_stop_pc): Adjust comments and rename to ...
1530 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1531 stopped for a software breakpoint or hardware breakpoint.
1532 (thread_still_has_status_pending_p): New function.
1533 (status_pending_p_callback): Use
1534 thread_still_has_status_pending_p. If the event is no longer
1535 interesting, resume the LWP.
1536 (handle_tracepoints): Add assert.
1537 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1538 (wstatus_maybe_breakpoint): New function.
1539 (cancel_breakpoint): Delete function.
1540 (check_stopped_by_watchpoint): New function, factored out from
1541 linux_low_filter_event.
1542 (lp_status_maybe_breakpoint): Delete function.
1543 (linux_low_filter_event): Remove filter_ptid argument.
1544 Leave thread group exits pending here. Store the LWP's stop PC.
1545 Always leave events pending.
1546 (linux_wait_for_event_filtered): Pull all events out of the
1547 kernel, and leave them all pending.
1548 (count_events_callback, select_event_lwp_callback): Consider all
1549 events.
1550 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1551 (select_event_lwp): Only give preference to the stepping LWP in
1552 all-stop mode. Adjust comments.
1553 (ignore_event): New function.
1554 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1555 references to cancel_breakpoints. Adjust to renames. Also give
1556 equal priority to all LWPs that have had events in non-stop mode.
1557 If reporting a software breakpoint event, unadjust the LWP's PC.
1558 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1559 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1560 Adjust.
1561 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1562 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1563 (linux_stopped_by_watchpoint): Adjust.
1564 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1565 * linux-low.h (enum lwp_stop_reason): New.
1566 (struct lwp_info) <stop_pc>: Adjust comment.
1567 <stopped_by_watchpoint>: Delete field.
1568 <stop_reason>: New field.
1569 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1570 * mem-break.c (software_breakpoint_inserted_here)
1571 (hardware_breakpoint_inserted_here): New function.
1572 * mem-break.h (software_breakpoint_inserted_here)
1573 (hardware_breakpoint_inserted_here): Declare.
1574 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1575 (cancel_breakpoints): Delete.
1576 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1577 (upload_fast_traceframes): Remove references to
1578 cancel_breakpoints.
1579
a33e3959
PA
15802015-01-09 Pedro Alves <palves@redhat.com>
1581
1582 * thread-db.c (find_new_threads_callback): Ignore thread if the
1583 kernel thread ID is -1.
1584
8784d563
PA
15852015-01-09 Pedro Alves <palves@redhat.com>
1586
1587 * linux-low.c (linux_attach_fail_reason_string): Move to
1588 nat/linux-ptrace.c, and rename.
1589 (linux_attach_lwp): Update comment.
1590 (attach_proc_task_lwp_callback): New function.
1591 (linux_attach): Adjust to rename and use
1592 linux_proc_attach_tgid_threads.
1593 (linux_attach_fail_reason_string): Delete declaration.
1594
76f2b779
JB
15952015-01-01 Joel Brobecker <brobecker@adacore.com>
1596
1597 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1598 * server.c (gdbserver_version): Likewise.
1599
fafcc06a
SDJ
16002014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1601
1602 * remote-utils.c: Include ctype.h.
1603 (input_interrupt): Explicitly handle the case when the char
1604 received is the NUL byte. Improve the printing of non-ASCII
1605 characters.
1606
beed38b8
JB
16072014-12-16 Joel Brobecker <brobecker@adacore.com>
1608
1609 * linux-low.c (linux_low_filter_event): Update call to
1610 linux_enable_event_reporting following the addition of
1611 a new parameter to that function.
1612
bf330350
CU
16132014-12-16 Catalin Udma <catalin.udma@freescale.com>
1614
1615 PR server/17457
1616 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1617 (AARCH64_FPCR_REGNO): Likewise.
1618 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1619 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1620 (aarch64_store_fpregset): Likewise.
1621
5227d625
JB
16222014-12-15 Joel Brobecker <brobecker@adacore.com>
1623
1624 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1625 Remove FIXME comment about assumption about N.
1626
f93b65a0
JB
16272014-12-13 Joel Brobecker <brobecker@adacore.com>
1628
1629 * configure.ac: If large-file support is disabled in GDBserver,
1630 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1631 * configure: Regenerate.
1632
e5a9158d
AA
16332014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1634
1635 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1636 warning upon ENODATA from ptrace.
1637 * linux-s390-low.c (s390_store_tdb): New.
1638 (s390_regsets): Add regset for NT_S390_TDB.
1639
feea5f36
AA
16402014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1641
1642 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1643 without a fill_function.
1644 * linux-s390-low.c (s390_fill_last_break): Remove.
1645 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1646 (s390_arch_setup): Use regset's size instead of fill_function for
1647 loop end condition.
1648
098dbe61
AA
16492014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1650
1651 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1652 the regset's store function when ptrace returned an error.
1653 * regcache.c (get_thread_regcache): Invalidate register cache
1654 before fetching inferior's registers.
1655
28eef672
AA
16562014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1657
1658 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1659 while-loop as for-loop.
1660 (regsets_store_inferior_registers): Likewise.
1661
bdca27a2
YQ
16622014-11-28 Yao Qi <yao@codesourcery.com>
1663
1664 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1665 * config.in, configure: Re-generate.
1666 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1667 is defined.
1668
9c232dda
YQ
16692014-11-21 Yao Qi <yao@codesourcery.com>
1670
1671 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1672 (AC_CHECK_HEADERS): Remove malloc.h.
1673 * configure: Re-generated.
1674 * config.in: Re-generated.
1675 * server.h: Don't include alloca.h and malloc.h.
1676 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1677 Don't include malloc.h.
1678
43968415
JB
16792014-11-17 Joel Brobecker <brobecker@adacore.com>
1680
1681 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1682 corresponding ERRNO check in same block.
1683
40e91bc7
PA
16842014-11-12 Pedro Alves <palves@redhat.com>
1685
1686 * server.c (cont_thread): Update comment.
1687 (start_inferior, attach_inferior): No longer clear cont_thread.
1688 (handle_v_cont): No longer set cont_thread.
1689 (captured_main): Clear cont_thread each time a GDB connects.
1690
c2c118cf
PA
16912014-11-12 Pedro Alves <palves@redhat.com>
1692
1693 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1694 thread, and don't resume all threads if the Hc thread has exited.
1695
78708b7c
PA
16962014-11-12 Pedro Alves <palves@redhat.com>
1697
1698 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1699 the process group instead of to a specific LWP.
1700
a2abc7de
PA
17012014-10-15 Pedro Alves <palves@redhat.com>
1702
1703 PR server/17487
1704 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1705 parameter.
1706 (arm_set_thread_context): Delete.
1707 (the_low_target): Adjust.
1708 * win32-i386-low.c (debug_registers_changed)
1709 (debug_registers_used): Delete.
1710 (update_debug_registers_callback): New function.
1711 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1712 needing to update their debug registers.
1713 (win32_get_current_dr): New function.
1714 (x86_dr_low_get_addr, x86_dr_low_get_control)
1715 (x86_dr_low_get_status): Fetch the debug register from the thread
1716 record's context.
1717 (i386_initial_stuff): Adjust.
1718 (i386_get_thread_context): Remove current_event parameter. Don't
1719 clear debug_registers_changed nor copy DR values to
1720 debug_reg_state.
1721 (i386_set_thread_context): Delete.
1722 (i386_prepare_to_resume): New function.
1723 (i386_thread_added): Mark the thread as needing to update irs
1724 debug registers.
1725 (the_low_target): Remove i386_set_thread_context and install
1726 i386_prepare_to_resume.
1727 * win32-low.c (win32_get_thread_context): Adjust.
1728 (win32_set_thread_context): Use SetThreadContext
1729 directly.
1730 (win32_prepare_to_resume): New function.
1731 (win32_require_context): New function, factored out from ...
1732 (thread_rec): ... this.
1733 (continue_one_thread): Call win32_prepare_to_resume on each thread
1734 we're about to continue.
1735 (win32_resume): Call win32_prepare_to_resume on the event thread.
1736 * win32-low.h (struct win32_thread_info)
1737 <debug_registers_changed>: New field.
1738 (struct win32_target_ops): Change prototype of set_thread_context,
1739 delete set_thread_context and add prepare_to_resume.
1740 (win32_require_context): New declaration.
1741
a442d071
GB
17422014-10-08 Gary Benson <gbenson@redhat.com>
1743
1744 * server.h: Do not include common-exceptions.h.
1745
6f1947e8
GB
17462014-10-08 Gary Benson <gbenson@redhat.com>
1747
1748 * server.h: Do not include cleanups.h.
1749
63b434a4
JH
17502014-09-30 James Hogan <james.hogan@imgtec.com>
1751
1752 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1753 mips64-dsp-linux.c.
1754
c4d9ceb6
YQ
17552014-09-23 Yao Qi <yao@codesourcery.com>
1756
1757 * linux-low.c (lp_status_maybe_breakpoint): New function.
1758 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1759 (count_events_callback): Likewise.
1760 (select_event_lwp_callback): Likewise.
1761 (cancel_breakpoints_callback): Likewise.
1762
89a5711c
DB
17632014-09-19 Don Breazeal <donb@codesourcery.com>
1764
1765 * linux-low.c (handle_extended_wait): Call
1766 linux_ptrace_get_extended_event.
1767 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1768 linux_is_extended_waitstatus.
1769
bffc0964
JB
17702014-09-16 Joel Brobecker <brobecker@adacore.com>
1771
1772 * Makefile.in (CPPFLAGS): Define.
1773 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1774 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1775
0bfdf32f
GB
17762014-09-16 Gary Benson <gbenson@redhat.com>
1777
1778 * inferiors.h (current_inferior): Renamed as...
1779 (current_thread): New variable. All uses updated.
1780 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1781 (maybe_move_out_of_jump_pad): Likewise.
1782 (cancel_breakpoint): Likewise.
1783 (linux_low_filter_event): Likewise.
1784 (wait_for_sigstop): Likewise.
1785 (linux_resume_one_lwp): Likewise.
1786 (need_step_over_p): Likewise.
1787 (start_step_over): Likewise.
1788 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1789 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1790 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1791 and save_inferior as saved_thread.
1792 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1793 saved_thread.
1794 (regcache_invalidate_thread): Likewise.
1795 * remote-utils.c (prepare_resume_reply): Likewise.
1796 * thread-db.c (thread_db_get_tls_address): Likewise.
1797 (disable_thread_event_reporting): Likewise.
1798 (remove_thread_event_breakpoints): Likewise.
1799 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1800 as saved_thread.
1801 * target.h (set_desired_inferior): Renamed as...
1802 (set_desired_thread): New declaration. All uses updated.
1803 * server.c (myresume): Updated comment to reference thread instead
1804 of inferior.
1805 (handle_serial_event): Likewise.
1806 (handle_target_event): Likewise.
1807
361c8ade
GB
18082014-09-12 Tom Tromey <tromey@redhat.com>
1809 Gary Benson <gbenson@redhat.com>
1810
1811 * regcache.h: Include common-regcache.h.
1812 (regcache_read_pc): Don't declare.
1813 * regcache.c (get_thread_regcache_for_ptid): New function.
1814
bd9269f7
GB
18152014-09-11 Tom Tromey <tromey@redhat.com>
1816 Gary Benson <gbenson@redhat.com>
1817
1818 * symbol.c: New file.
1819 * Makefile.in (SFILES): Add symbol.c.
1820 (OBS): Add symbol.o.
1821
f8c1d06b
GB
18222014-09-11 Gary Benson <gbenson@redhat.com>
1823
1824 * target.c (target_stop_ptid, target_continue_ptid): New
1825 functions.
1826
721ec300
GB
18272014-09-11 Tom Tromey <tromey@redhat.com>
1828 Gary Benson <gbenson@redhat.com>
1829
1830 * target.h: Include target/target.h.
1831 * target.c (target_read_memory, target_read_uint32)
1832 (target_write_memory): New functions.
1833
c5e92cca
GB
18342014-09-11 Gary Benson <gbenson@redhat.com>
1835
1836 * server.h (debug_hw_points): Don't declare.
1837 * server.c (debug_hw_points): Don't define. Replace all uses
1838 with show_debug_regs.
1839 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1840 all uses with show_debug_regs.
1841
2e4bb98a
EBM
18422014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1843
1844 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1845 endianness into account.
1846 (ppc_supply_ptrace_register): Likewise.
1847
ac740bc7
JH
18482014-09-03 James Hogan <james.hogan@imgtec.com>
1849
1850 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1851 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1852
97ea6506
GB
18532014-09-03 Gary Benson <gbenson@redhat.com>
1854
1855 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1856 ALL_DEBUG_ADDRESS_REGISTERS.
1857
df7e5265
GB
18582014-09-02 Gary Benson <gbenson@redhat.com>
1859
1860 * i386-low.h: Renamed as...
1861 * x86-low.h: New file. All type, function and variable name
1862 prefixes changed from "i386_" to "x86_". All references updated.
1863 * i386-low.c: Renamed as...
1864 * x86-low.c: New file. All type, function and variable name
1865 prefixes changed from "i386_" to "x86_". All references updated.
1866
ed859da7
GB
18672014-09-02 Gary Benson <gbenson@redhat.com>
1868
1869 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1870 (x86_linux_new_thread): Likewise.
1871
860789c7
GB
18722014-08-29 Gary Benson <gbenson@redhat.com>
1873
1874 * server.h (setjmp.h): Do not include.
1875 (toplevel): Do not declare.
1876 (common-exceptions.h): Include.
1877 (cleanups.h): Likewise.
1878 * server.c (toplevel): Do not define.
1879 (exit_code): New static global.
1880 (detach_or_kill_for_exit_cleanup): New function.
1881 (main): New function. Original main renamed to...
1882 (captured_main): New function.
1883 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1884
ff55e1b5
GB
18852014-08-29 Gary Benson <gbenson@redhat.com>
1886
1887 * Makefile.in (SFILES): Add common/common-exceptions.c.
1888 (OBS): Add common-exceptions.o.
1889 (common-exceptions.o): New rule.
1890 * utils.c (prepare_to_throw_exception): New function.
1891
e9bcb658
GB
18922014-08-29 Gary Benson <gbenson@redhat.com>
1893
1894 * config.in: Regenerate.
1895 * configure: Likewise.
1896
e3180625
GB
18972014-08-29 Gary Benson <gbenson@redhat.com>
1898
1899 * Makefile.in (SFILES): Add common/cleanups.c.
1900 (OBS): cleanups.o.
1901 (cleanups.o): New rule.
1902
e3d6ba5d
GB
19032014-08-29 Gary Benson <gbenson@redhat.com>
1904
1905 * utils.c (internal_vwarning): New function.
1906
7096e886
GB
19072014-08-28 Gary Benson <gbenson@redhat.com>
1908
1909 * utils.h (fatal): Remove declaration.
1910 * utils.c (fatal): Remove function.
1911
14ce3192
GB
19122014-08-28 Gary Benson <gbenson@redhat.com>
1913
1914 * tracepoint.c (gdb_agent_init): Replace fatal with
1915 perror_with_name.
1916 (initialize_tracepoint): Likewise.
1917
50278d59
GB
19182014-08-28 Gary Benson <gbenson@redhat.com>
1919
1920 * remote-utils.c (remote_prepare): Replace fatal with error.
1921
aa96c426
GB
19222014-08-28 Gary Benson <gbenson@redhat.com>
1923
1924 * linux-low.c (linux_async): Replace fatal with warning.
1925 Tidy up and return.
1926 (linux_start_non_stop): Return -1 if linux_async failed.
1927
f7160e97
GB
19282014-08-28 Gary Benson <gbenson@redhat.com>
1929
1930 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1931 gdb_assert.
1932 (i386_dr_low_get_addr): Remove vague comment.
1933 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1934 gdb_assert.
1935
38e08fca
GB
19362014-08-28 Gary Benson <gbenson@redhat.com>
1937
1938 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1939 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1940 internal_error.
1941 (linux_resume_one_lwp): Likewise.
1942 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1943 gdb_assert.
1944 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1945 with internal_error.
1946 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1947 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1948 (find_register_by_name): Replace fatal with internal_error.
1949 (find_regno): Likewise.
1950 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1951 * thread-db.c (thread_db_create_event): Likewise.
1952 (thread_db_load_search): Likewise.
1953 (try_thread_db_load_1): Likewise.
1954 * tracepoint.c (get_jump_space_head): Replace fatal with
1955 internal_error.
1956 (claim_trampoline_space): Likewise.
1957 (have_fast_tracepoint_trampoline_buffer): Likewise.
1958 (cmd_qtstart): Likewise.
1959 (stop_tracing): Likewise.
1960 (fast_tracepoint_collecting): Likewise.
1961 (target_malloc): Likewise.
1962 (download_tracepoint): Likewise.
1963 (download_trace_state_variables): Replace check with gdb_assert.
1964 (upload_fast_traceframes): Replace fatal with internal_error.
1965
34abf635
GB
19662014-08-19 Tom Tromey <tromey@redhat.com>
1967 Gary Benson <gbenson@redhat.com>
1968
1969 * Makefile.in (SFILES): Add common/common-debug.c.
1970 (OBS): Add common-debug.o.
1971 (common-debug.o): New rule.
1972 * debug.h (debug_printf): Don't declare.
1973 * debug.c (debug_printf): Renamed and rewritten as...
1974 (debug_vprintf): New function.
1975
f6e94d78
GB
19762014-08-19 Gary Benson <gbenson@redhat.com>
1977
1978 * utils.h: Do not include print-utils.h.
1979
9239eeab
GB
19802014-08-19 Tom Tromey <tromey@redhat.com>
1981 Gary Benson <gbenson@redhat.com>
1982
1983 * server.h: Add static assertion.
1984 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1985
ef87c8bb
GB
19862014-08-19 Tom Tromey <tromey@redhat.com>
1987 Gary Benson <gbenson@redhat.com>
1988
1989 * Makefile.in (SFILES): Add common/errors.c.
1990 (OBS): Add errors.o.
1991 (IPA_OBS): Add errors-ipa.o.
1992 (errors.o): New rule.
1993 (errors-ipa.o): Likewise.
1994 * utils.h (perror_with_name, error, warning): Don't declare.
1995 * utils.c (warning): Renamed and rewritten as...
1996 (vwarning): New function.
1997 (error): Renamed and rewritten as...
1998 (verror): New function.
1999 (internal_error): Renamed and rewritten as...
2000 (internal_verror): New function.
2001
bb974a24
GB
20022014-08-07 Gary Benson <gbenson@redhat.com>
2003
2004 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2005 * configure: Regenerate.
2006 * config.in: Likewise.
2007 * server.h: Do not include errno.h.
2008 * event-loop.c: Likewise.
2009 * hostio-errno.c: Likewise.
2010 * linux-low.c: Likewise.
2011 * remote-utils.c: Likewise.
2012 * spu-low.c: Likewise.
2013 * utils.c: Likewise.
2014 * gdbreplay.c: Unconditionally include errno.h.
2015
6d3d12eb
GB
20162014-08-07 Gary Benson <gbenson@redhat.com>
2017
2018 * server.h: Do not include string.h.
2019 * event-loop.c: Likewise.
2020 * linux-low.c: Likewise.
2021 * regcache.c: Likewise.
2022 * remote-utils.c: Likewise.
2023 * spu-low.c: Likewise.
2024 * utils.c: Likewise.
2025
dccbb609
GB
20262014-08-07 Gary Benson <gbenson@redhat.com>
2027
2028 * server.h: Do not include gdb_assert.h.
2029
e76df0d0
GB
20302014-08-07 Gary Benson <gbenson@redhat.com>
2031
2032 * server.h: Do not include common-utils.h.
2033
4cb9c816
GB
20342014-08-07 Gary Benson <gbenson@redhat.com>
2035
2036 * server.h: Do not include ptid.h.
2037 * notif.h: Likewise.
2038
3995eeee
GB
20392014-08-07 Gary Benson <gbenson@redhat.com>
2040
2041 * server.h: Do not include gdb_locale.h.
2042
cb9f1a9b
GB
20432014-08-07 Gary Benson <gbenson@redhat.com>
2044
2045 * server.h: Do not include gdb/signals.h.
2046 * win32-low.c: Likewise.
2047
a5fceff8
GB
20482014-08-07 Gary Benson <gbenson@redhat.com>
2049
2050 * server.h: Do not include pathmax.h.
2051
b9391142
GB
20522014-08-07 Gary Benson <gbenson@redhat.com>
2053
2054 * server.h: Do not include libiberty.h.
2055 * linux-bfin-low.c: Likewise.
2056
0e443c87
GB
20572014-08-07 Gary Benson <gbenson@redhat.com>
2058
2059 * server.h: Do not include ansidecl.h.
2060
8ebb3f56
GB
20612014-08-07 Gary Benson <gbenson@redhat.com>
2062
2063 * linux-x86-low.c: Do not include stddef.h.
2064 * lynx-ppc-low.c: Likewise.
2065 * tracepoint.c: Likewise.
2066
8980bdf6
GB
20672014-08-07 Gary Benson <gbenson@redhat.com>
2068
2069 * server.h: Do not include stdarg.h.
2070 * nto-low.c: Likewise.
2071
d7096f71
GB
20722014-08-07 Gary Benson <gbenson@redhat.com>
2073
2074 * server.h: Do not include stdlib.h.
2075 * inferiors.c: Likewise.
2076 * linux-low.c: Likewise.
2077 * regcache.c: Likewise.
2078 * spu-low.c: Likewise.
2079 * tracepoint.c: Likewise.
2080 * utils.c: Likewise.
2081
d02f550d
GB
20822014-08-07 Gary Benson <gbenson@redhat.com>
2083
2084 * server.h: Do not include stdio.h.
2085 * linux-low.c: Likewise.
2086 * remote-utils.c: Likewise.
2087 * spu-low.c: Likewise.
2088 * utils.c: Likewise.
2089 * wincecompat.c: Likewise.
2090
87f6c4e3
GB
20912014-08-06 Gary Benson <gbenson@redhat.com>
2092
2093 * regcache.c (init_register_cache): Move conditionals inside if.
2094
7089dca4
GB
20952014-08-06 Gary Benson <gbenson@redhat.com>
2096
2097 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2098
462f517e
GB
20992014-07-31 Gary Benson <gbenson@redhat.com>
2100
2101 * ax.h: Do not include server.h.
2102 * gdbthread.h: Likewise.
2103 * lynx-low.h: Likewise.
2104 * notif.h: Likewise.
2105
976411d6
GB
21062014-07-30 Gary Benson <gbenson@redhat.com>
2107
2108 * server.h: Include common-defs.h.
2109 Do not include config.h or build-gnulib-gdbserver/config.h.
2110
d41f6d8e
GB
21112014-07-30 Gary Benson <gbenson@redhat.com>
2112
2113 * hostio-errno.c: Move server.h to top of includes list.
2114 * inferiors.c: Likewise.
2115 * linux-x86-low.c: Likewise.
2116 * notif.c: Include server.h.
2117
314c6a35
TT
21182014-07-24 Tom Tromey <tromey@redhat.com>
2119 Gary Benson <gbenson@redhat.com>
2120
2121 * server.h (CORE_ADDR): Now unsigned.
2122
69ff6be5
PA
21232014-07-16 Pedro Alves <palves@redhat.com>
2124
2125 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2126
ce9e3fe7
PA
21272014-07-15 Pedro Alves <palves@redhat.com>
2128
2129 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2130 copy.
2131
e76126e8
PA
21322014-07-11 Pedro Alves <palves@redhat.com>
2133
2134 * linux-low.c (kill_wait_lwp): New function, based on
2135 kill_one_lwp_callback, but use my_waitpid directly.
2136 (kill_one_lwp_callback, linux_kill): Use it.
2137
8e9db26e
PA
21382014-06-23 Pedro Alves <palves@redhat.com>
2139
2140 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2141 before setting DR0..DR3.
2142
698b3e08
GB
21432014-06-20 Gary Benson <gbenson@redhat.com>
2144
2145 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2146 * configure: Regenerated.
2147 * config.in: Likewise.
2148
125f8a3d
GB
21492014-06-20 Gary Benson <gbenson@redhat.com>
2150
2151 * Makefile.in (SFILES): Update locations for files moved
2152 from common to nat.
2153 (object file files): Reordered.
2154
42995dbd
GB
21552014-06-20 Gary Benson <gbenson@redhat.com>
2156
2157 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2158 (i386_dr_low_set_addr): Likewise.
2159 (i386_dr_low_get_addr): Likewise.
2160 (i386_dr_low_can_set_control): Likewise.
2161 (i386_dr_low_set_control): Likewise.
2162 (i386_dr_low_get_control): Likewise.
2163 (i386_dr_low_get_status): Likewise.
2164 (i386_get_debug_register_length): Likewise.
2165 * linux-x86-low.c (i386_dr_low_set_addr):
2166 Changed signature. Made static.
2167 (i386_dr_low_get_addr): Likewise.
2168 (i386_dr_low_set_control): Likewise.
2169 (i386_dr_low_get_control): Likewise.
2170 (i386_dr_low_get_status): Likewise.
2171 (i386_dr_low): New global variable.
2172 * win32-i386-low.c (i386_dr_low_set_addr):
2173 Changed signature. Made static.
2174 (i386_dr_low_get_addr): Likewise.
2175 (i386_dr_low_set_control): Likewise.
2176 (i386_dr_low_get_control): Likewise.
2177 (i386_dr_low_get_status): Likewise.
2178 (i386_dr_low): New global variable.
2179
e1d2394b
MS
21802014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2181
2182 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2183 * Makefile.in (AR, AR_FLAGS): Define.
2184 * configure: Regenerate.
2185
3a8ee006
GB
21862014-06-19 Gary Benson <gbenson@redhat.com>
2187
2188 * Makefile.in (i386-dregs.o): New rule.
2189 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2190 * i386-low.c (target.h): Remove include.
2191 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2192 (DR_CONTROL_SHIFT): Likewise.
2193 (DR_CONTROL_SIZE): Likewise.
2194 (DR_RW_EXECUTE): Likewise.
2195 (DR_RW_WRITE): Likewise.
2196 (DR_RW_READ): Likewise.
2197 (DR_RW_IORW): Likewise.
2198 (DR_LEN_1): Likewise.
2199 (DR_LEN_2): Likewise.
2200 (DR_LEN_4): Likewise.
2201 (DR_LEN_8): Likewise.
2202 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2203 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2204 (DR_ENABLE_SIZE): Likewise.
2205 (DR_LOCAL_SLOWDOWN): Likewise.
2206 (DR_GLOBAL_SLOWDOWN): Likewise.
2207 (DR_CONTROL_RESERVED): Likewise.
2208 (I386_DR_CONTROL_MASK): Likewise.
2209 (I386_DR_VACANT): Likewise.
2210 (I386_DR_LOCAL_ENABLE): Likewise.
2211 (I386_DR_GLOBAL_ENABLE): Likewise.
2212 (I386_DR_DISABLE): Likewise.
2213 (I386_DR_SET_RW_LEN): Likewise.
2214 (I386_DR_GET_RW_LEN): Likewise.
2215 (I386_DR_WATCH_HIT): Likewise.
2216 (i386_wp_op_t): Likewise.
2217 (i386_show_dr): Likewise.
2218 (i386_length_and_rw_bits): Likewise.
2219 (i386_insert_aligned_watchpoint): Likewise.
2220 (i386_remove_aligned_watchpoint): Likewise.
2221 (i386_handle_nonaligned_watchpoint): Likewise.
2222 i386_update_inferior_debug_regs(): Likewise.
2223 (i386_dr_insert_watchpoint): Likewise.
2224 (i386_dr_remove_watchpoint): Likewise.
2225 (i386_dr_region_ok_for_watchpoint): Likewise.
2226 (i386_dr_stopped_data_address): Likewise.
2227 (i386_dr_stopped_by_watchpoint): Likewise.
2228
8f26655c
GB
22292014-06-19 Gary Benson <gbenson@redhat.com>
2230
2231 * i386-low.c (i386_dr_show): Renamed to
2232 i386_show_dr and made static. All uses updated.
2233 (i386_dr_length_and_rw_bits): Renamed to
2234 i386_length_and_rw_bits and made static.
2235 All uses updated.
2236 (i386_dr_insert_aligned_watchpoint): Renamed to
2237 i386_insert_aligned_watchpoint and made static.
2238 All uses updated.
2239 (i386_dr_remove_aligned_watchpoint): Renamed to
2240 i386_remove_aligned_watchpoint and made static.
2241 All uses updated.
2242 (i386_dr_update_inferior_debug_regs): Renamed to
2243 i386_update_inferior_debug_regs and made static.
2244 All uses updated.
2245
b9228891
GB
22462014-06-18 Gary Benson <gbenson@redhat.com>
2247
5171def3
GB
2248 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2249 (i386_dr_low_can_set_control): Likewise.
2250 (i386_get_debug_register_length): Likewise.
2251 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2252 (i386_dr_low_can_set_control): Likewise.
2253 (i386_get_debug_register_length): Likewise.
2254
22552014-06-17 Gary Benson <gbenson@redhat.com>
2256
b9228891
GB
2257 * i386-low.h (i386-dregs.h): New include.
2258 (DR_FIRSTADDR): Now in i386-dregs.h.
2259 (DR_LASTADDR): Likewise.
2260 (DR_NADDR): Likewise.
2261 (DR_STATUS): Likewise.
2262 (DR_CONTROL): Likewise.
2263 (i386_debug_reg_state): Likewise.
2264 (i386_dr_insert_watchpoint): Likewise.
2265 (i386_dr_remove_watchpoint): Likewise.
2266 (i386_dr_region_ok_for_watchpoint): Likewise.
2267 (i386_dr_stopped_data_address): Likewise.
2268 (i386_dr_stopped_by_watchpoint): Likewise.
2269 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2270
4be83cc2
GB
22712014-06-18 Gary Benson <gbenson@redhat.com>
2272
2273 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2274 i386_dr_insert_watchpoint.
2275 (i386_low_remove_watchpoint): Renamed to
2276 i386_dr_remove_watchpoint.
2277 (i386_low_region_ok_for_watchpoint): Renamed to
2278 i386_dr_region_ok_for_watchpoint.
2279 (i386_low_stopped_data_address): Renamed to
2280 i386_dr_stopped_data_address.
2281 (i386_low_stopped_by_watchpoint): Renamed to
2282 i386_dr_stopped_by_watchpoint.
2283 * i386-low.c (i386_show_dr): Renamed to
2284 i386_dr_show and made nonstatic. All uses updated.
2285 (i386_length_and_rw_bits): Renamed to
2286 i386_dr_length_and_rw_bits and made nonstatic.
2287 All uses updated.
2288 (i386_insert_aligned_watchpoint): Renamed to
2289 i386_dr_insert_aligned_watchpoint and made nonstatic.
2290 All uses updated.
2291 (i386_remove_aligned_watchpoint): Renamed to
2292 i386_dr_remove_aligned_watchpoint and made nonstatic.
2293 All uses updated.
2294 (i386_update_inferior_debug_regs): Renamed to
2295 i386_dr_update_inferior_debug_regs and made nonstatic.
2296 All uses updated.
2297 (i386_low_insert_watchpoint): Renamed to
2298 i386_dr_insert_watchpoint. All uses updated.
2299 (i386_low_remove_watchpoint): Renamed to
2300 i386_dr_remove_watchpoint. All uses updated.
2301 (i386_low_region_ok_for_watchpoint): Renamed to
2302 i386_dr_region_ok_for_watchpoint. All uses updated.
2303 (i386_low_stopped_data_address): Renamed to
2304 i386_dr_stopped_data_address. All uses updated.
2305 (i386_low_stopped_by_watchpoint): Renamed to
2306 i386_dr_stopped_by_watchpoint. All uses updated.
2307
131aa0d4
GB
23082014-06-18 Gary Benson <gbenson@redhat.com>
2309
2310 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2311 (i386_dr_low_can_set_control): Likewise.
2312 (i386_insert_aligned_watchpoint): New check.
2313
d9305f7f
GB
23142014-06-18 Gary Benson <gbenson@redhat.com>
2315
2316 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2317 Renamed to state.
2318
e927c9fc
GB
23192014-06-18 Gary Benson <gbenson@redhat.com>
2320
2321 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2322 instead of fatal and error.
2323 (i386_handle_nonaligned_watchpoint): Likewise.
2324
1b6d4134
GB
23252014-06-18 Gary Benson <gbenson@redhat.com>
2326
2327 * i386-low.c (i386_get_debug_register_length): New macro.
2328 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2329 (i386_show_dr): Use debug_printf instead of fprintf. Use
2330 phex to format values.
2331
6e62758f
GB
23322014-06-18 Gary Benson <gbenson@redhat.com>
2333
2334 * i386-low.h: Comment changes.
2335 * i386-low.c: Likewise.
2336
fc6e2f03
GB
23372014-06-18 Gary Benson <gbenson@redhat.com>
2338
2339 * i386-low.c: Whitespace changes.
2340
f9d1eeed
TT
23412014-06-12 Tom Tromey <tromey@redhat.com>
2342
2343 * utils.c (freeargv): Remove.
2344
0b04e523
TT
23452014-06-12 Tom Tromey <tromey@redhat.com>
2346
2347 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2348 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2349 (parse_debug_format_options): Likewise.
2350 (gdbserver_usage): Likewise.
2351 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2352 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2353 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2354 against libiberty.
2355 ($(LIBGNU)): Depend on libiberty.
2356 (all-lib): Recurse into all subdirs.
2357 (install-only): Invoke "install" target in subdirs.
2358 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2359 targets.
2360 * configure: Rebuild.
2361 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2362 for vasprintf, vsnprintf, or gettimeofday.
2363 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2364 srv_tgtobj.
2365
270c9937
JB
23662014-06-05 Joel Brobecker <brobecker@adacore.com>
2367
2368 * development.sh: Delete.
2369 * Makefile.in (config.status): Adjust dependency on development.sh.
2370 * configure.ac: Adjust development.sh source call.
2371 * configure: Regenerate.
2372
0a261ed8
PA
23732014-06-02 Pedro Alves <palves@redhat.com>
2374
2375 * ax.c (gdb_free_agent_expr): New function.
2376 * ax.h (gdb_free_agent_expr): New declaration.
2377 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2378 list.
2379 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2380 static.
2381 (clear_breakpoint_conditions_and_commands): New function.
2382 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2383 (clear_breakpoint_conditions_and_commands): New declaration.
2384
e9dae05e
RR
23852014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2386
2387 * linux-aarch64-low.c (asm/ptrace.h): Include.
2388
5876f503
JK
23892014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2390
2391 Fix TLS access for -static -pthread.
2392 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2393 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2394 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2395
802e8e6d
PA
23962014-05-20 Pedro Alves <palves@redhat.com>
2397
2398 * linux-aarch64-low.c (aarch64_insert_point)
2399 (aarch64_remove_point): No longer check whether the type is
2400 supported here. Adjust to new interface.
2401 (the_low_target): Install aarch64_supports_z_point_type as
2402 supports_z_point_type method.
2403 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2404 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2405 instead of a Z packet char. Adjust.
2406 (arm_supports_z_point_type): New function.
2407 (arm_insert_point, arm_remove_point): Adjust to new interface.
2408 (the_low_target): Install arm_supports_z_point_type.
2409 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2410 (cris_insert_point, cris_remove_point): Adjust to new interface.
2411 Don't check whether the type is supported here.
2412 (the_low_target): Install cris_supports_z_point_type.
2413 * linux-low.c (linux_supports_z_point_type): New function.
2414 (linux_insert_point, linux_remove_point): Adjust to new interface.
2415 * linux-low.h (struct linux_target_ops) <insert_point,
2416 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2417 raw_breakpoint pointer parameter.
2418 <supports_z_point_type>: New method.
2419 * linux-mips-low.c (mips_supports_z_point_type): New function.
2420 (mips_insert_point, mips_remove_point): Adjust to new interface.
2421 Use mips_supports_z_point_type.
2422 (the_low_target): Install mips_supports_z_point_type.
2423 * linux-ppc-low.c (the_low_target): Install NULL as
2424 supports_z_point_type method.
2425 * linux-s390-low.c (the_low_target): Install NULL as
2426 supports_z_point_type method.
2427 * linux-sparc-low.c (the_low_target): Install NULL as
2428 supports_z_point_type method.
2429 * linux-x86-low.c (x86_supports_z_point_type): New function.
2430 (x86_insert_point): Adjust to new insert_point interface. Use
2431 insert_memory_breakpoint. Adjust to new
2432 i386_low_insert_watchpoint interface.
2433 (x86_remove_point): Adjust to remove_point interface. Use
2434 remove_memory_breakpoint. Adjust to new
2435 i386_low_remove_watchpoint interface.
2436 (the_low_target): Install x86_supports_z_point_type.
2437 * lynx-low.c (lynx_target_ops): Install NULL as
2438 supports_z_point_type callback.
2439 * nto-low.c (nto_supports_z_point_type): New.
2440 (nto_insert_point, nto_remove_point): Adjust to new interface.
2441 (nto_target_ops): Install nto_supports_z_point_type.
2442 * mem-break.c: Adjust intro comment.
2443 (struct raw_breakpoint) <raw_type, size>: New fields.
2444 <inserted>: Update comment.
2445 <shlib_disabled>: Delete field.
2446 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2447 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2448 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2449 (raw_bkpt_type_to_target_hw_bp_type): New function.
2450 (find_enabled_raw_code_breakpoint_at): New function.
2451 (find_raw_breakpoint_at): New type and size parameters. Use them.
2452 (insert_memory_breakpoint): New function, based off
2453 set_raw_breakpoint_at.
2454 (remove_memory_breakpoint): New function.
2455 (set_raw_breakpoint_at): Reimplement.
2456 (set_breakpoint): New, based on set_breakpoint_at.
2457 (set_breakpoint_at): Reimplement.
2458 (delete_raw_breakpoint): Go through the_target->remove_point
2459 instead of assuming memory breakpoints.
2460 (find_gdb_breakpoint_at): Delete.
2461 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2462 (find_gdb_breakpoint): New function.
2463 (set_gdb_breakpoint_at): Delete.
2464 (z_type_supported): New function.
2465 (set_gdb_breakpoint_1): New function, loosely based off
2466 set_gdb_breakpoint_at.
2467 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2468 (delete_gdb_breakpoint_at): Delete.
2469 (delete_gdb_breakpoint_1): New function, loosely based off
2470 delete_gdb_breakpoint_at.
2471 (delete_gdb_breakpoint): New function.
2472 (clear_gdb_breakpoint_conditions): Rename to ...
2473 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2474 breakpoint.
2475 (add_condition_to_breakpoint): Make static.
2476 (add_breakpoint_condition): Take a struct breakpoint pointer
2477 instead of an address. Adjust.
2478 (gdb_condition_true_at_breakpoint): Rename to ...
2479 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2480 z_type parameter.
2481 (gdb_condition_true_at_breakpoint): Reimplement.
2482 (add_breakpoint_commands): Take a struct breakpoint pointer
2483 instead of an address. Adjust.
2484 (gdb_no_commands_at_breakpoint): Rename to ...
2485 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2486 parameter. Return true if no breakpoint was found. Change debug
2487 output.
2488 (gdb_no_commands_at_breakpoint): Reimplement.
2489 (run_breakpoint_commands): Rename to ...
2490 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2491 and change return type to boolean.
2492 (run_breakpoint_commands): New function.
2493 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2494 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2495 breakpoint. Go through the_target->remove_point instead of
2496 assuming memory breakpoint.
2497 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2498 software and hardware breakpoints.
2499 (reinsert_raw_breakpoint): Go through the_target->insert_point
2500 instead of assuming memory breakpoint.
2501 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2502 software and hardware breakpoints.
2503 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2504 Check both software and hardware breakpoints.
2505 (validate_inserted_breakpoint): Assert the breakpoint is a
2506 software breakpoint. Set the inserted flag to -1 instead of
2507 setting shlib_disabled.
2508 (delete_disabled_breakpoints): Adjust.
2509 (validate_breakpoints): Only validate software breakpoints.
2510 Adjust to inserted flag change.
2511 (check_mem_read, check_mem_write): Skip breakpoint types other
2512 than software breakpoints. Adjust to inserted flag change.
2513 * mem-break.h (enum raw_bkpt_type): New enum.
2514 (raw_breakpoint, struct process_info): Forward declare.
2515 (Z_packet_to_target_hw_bp_type): Delete declaration.
2516 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2517 (set_gdb_breakpoint, delete_gdb_breakpoint)
2518 (clear_breakpoint_conditions): New declarations.
2519 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2520 (breakpoint_inserted_here): Update comment.
2521 (add_breakpoint_condition, add_breakpoint_commands): Replace
2522 address parameter with a breakpoint pointer parameter.
2523 (gdb_breakpoint_here): Update comment.
2524 (delete_gdb_breakpoint_at): Delete.
2525 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2526 * server.c (process_point_options): Take a struct breakpoint
2527 pointer instead of an address. Adjust.
2528 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2529 delete_gdb_breakpoint.
2530 * spu-low.c (spu_target_ops): Install NULL as
2531 supports_z_point_type method.
2532 * target.h: Include mem-break.h.
2533 (struct target_ops) <prepare_to_access_memory>: Update comment.
2534 <supports_z_point_type>: New field.
2535 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2536 instead of a char. Also take a raw breakpoint pointer.
2537 * win32-arm-low.c (the_low_target): Install NULL as
2538 supports_z_point_type.
2539 * win32-i386-low.c (i386_supports_z_point_type): New function.
2540 (i386_insert_point, i386_remove_point): Adjust to new interface.
2541 (the_low_target): Install i386_supports_z_point_type.
2542 * win32-low.c (win32_supports_z_point_type): New function.
2543 (win32_insert_point, win32_remove_point): Adjust to new interface.
2544 (win32_target_ops): Install win32_supports_z_point_type.
2545 * win32-low.h (struct win32_target_ops):
2546 <supports_z_point_type>: New method.
2547 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2548 instead of a char. Also take a raw breakpoint pointer.
2549
932539e3
PA
25502014-05-20 Pedro Alves <palves@redhat.com>
2551
2552 * mem-break.h: Include break-common.h.
2553 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2554 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2555 (Z_packet_to_target_hw_bp_type): New declaration.
2556 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2557 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2558 (Z_PACKET_ACCESS_WP): Delete macros.
2559 (Z_packet_to_hw_type): Delete function.
2560 * i386-low.h: Don't include break-common.h here.
2561 (Z_packet_to_hw_type): Delete declaration.
2562 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2563 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2564 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2565 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2566 * linux-aarch64-low.c: Don't include break-common.h here.
2567 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2568 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2569 (Z_packet_to_target_hw_bp_type): Delete function.
2570 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2571 function.
2572 (mips_insert_point, mips_remove_point): Use
2573 Z_packet_to_target_hw_bp_type.
2574
4ff0d3d8
PA
25752014-05-20 Pedro Alves <palves@redhat.com>
2576
2577 * linux-aarch64-low.c: Include break-common.h.
2578 (enum target_point_type): Delete.
2579 (Z_packet_to_point_type): Rename to ...
2580 (Z_packet_to_target_hw_bp_type): ... this, and return a
2581 target_hw_bp_type instead.
2582 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2583 instead of an enum target_point_type.
2584 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2585 breakpoint type.
2586 (aarch64_dr_state_insert_one_point)
2587 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2588 (aarch64_handle_aligned_watchpoint)
2589 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2590 Take an enum target_hw_bp_type instead of an enum
2591 target_point_type.
2592 (aarch64_supports_z_point_type): New function.
2593 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2594 use Z_packet_to_target_hw_bp_type.
2595
786dc519
JB
25962014-05-20 Joel Brobecker <brobecker@adacore.com>
2597
2598 * configure.ac: Only use -Werror by default when DEVELOPMENT
2599 is true.
2600 * configure: Regenerate.
2601
9e0aa64f
JK
26022014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2603
2604 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2605 * linux-x86-low.c (X86_64_USER_REGS): New.
2606 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2607
2b577b92
YQ
26082014-04-28 Yao Qi <yao@codesourcery.com>
2609
2610 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2611 name.
2612
94611da2
PA
26132014-04-25 Pedro Alves <palves@redhat.com>
2614
2615 PR server/16255
2616 * linux-low.c (linux_attach_fail_reason_string): New function.
2617 (linux_attach_lwp): Delete.
2618 (linux_attach_lwp_1): Rename to ...
2619 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2620 argument. Remove "initial" parameter. Return int instead of
2621 void. Don't error or warn here.
2622 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2623 failure to attach to the tgid. Call warning when failing to
2624 attach to an lwp.
2625 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2626 argument. Remove "initial" parameter. Return int instead of
2627 void. Don't error or warn here.
2628 (linux_attach_fail_reason_string): New declaration.
2629 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2630 interface change. Use linux_attach_fail_reason_string.
2631
01f9f808
MS
26322014-04-24 Michael Sturm <michael.sturm@mintel.com>
2633 Walfred Tedeschi <walfred.tedeschi@intel.com>
2634
2635 * Makefile.in: Added rules to handle new files
2636 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2637 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2638 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2639 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2640 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2641 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2642 x32-avx512-linux.o.
2643 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2644 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2645 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2646 i386/x32-avx512.xml.
2647 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2648 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2649 i386/x32-avx512-linux.xml.
2650 * i387-fp.c (num_avx512_k_registers): New constant for number
2651 of K registers.
2652 (num_avx512_zmmh_low_registers): New constant for number of
2653 lower ZMM registers (0-15).
2654 (num_avx512_zmmh_high_registers): New constant for number of
2655 higher ZMM registers (16-31).
2656 (num_avx512_ymmh_registers): New contant for number of higher
2657 YMM registers (ymm16-31 added by avx521 on x86_64).
2658 (num_avx512_xmm_registers): New constant for number of higher
2659 XMM registers (xmm16-31 added by AVX512 on x86_64).
2660 (struct i387_xsave): Add space for AVX512 registers.
2661 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2662 Add code to handle AVX512 registers.
2663 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2664 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2665 prototypei from generated file.
2666 (tdesc_amd64_avx512_linux): Likewise.
2667 (init_registers_x32_avx512_linux): Likewise.
2668 (tdesc_x32_avx512_linux): Likewise.
2669 (init_registers_i386_avx512_linux): Likewise.
2670 (tdesc_i386_avx512_linux): Likewise.
2671 (x86_64_regmap): Add AVX512 registers.
2672 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2673 mask.
2674 (initialize_low_arch): Add code to initialize AVX512 registers.
2675
51aa91f9
PA
26762014-04-23 Pedro Alves <palves@redhat.com>
2677
2678 * mem-break.c (find_gdb_breakpoint_at): Make static.
2679 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2680
a4165e94
PA
26812014-04-23 Pedro Alves <palves@redhat.com>
2682
2683 * i386-low.c: Don't include break-common.h here.
2684 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2685 prototype to take target_hw_bp_type as argument instead of a Z
2686 packet char.
2687 * i386-low.h: Include break-common.h here.
2688 (Z_packet_to_hw_type): Declare.
2689 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2690 prototypes.
2691 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2692 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2693 (x86_remove_point): Convert the packet number to a
2694 target_hw_bp_type before calling i386_low_remove_watchpoint.
2695 * win32-i386-low.c (i386_insert_point): Convert the packet number
2696 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2697 (i386_remove_point): Convert the packet number to a
2698 target_hw_bp_type before calling i386_low_remove_watchpoint.
2699
b8acf843
PA
27002014-04-23 Pedro Alves <palves@redhat.com>
2701
2702 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2703
d708bcd1
PA
27042014-04-10 Pedro Alves <palves@redhat.com>
2705
2706 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2707 Check if the condition or command is NULL before checking if the
2708 breakpoint is known. On success, return true.
2709 * mem-break.h (add_breakpoint_condition): Document return.
2710 (add_breakpoint_commands): Add describing comment.
2711 * server.c (skip_to_semicolon): New function.
2712 (process_point_options): Use it.
2713
2eec7d5b
PA
27142014-04-09 Pedro Alves <palves@redhat.com>
2715
2716 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2717 to lwpid_of.
2718
fa96cb38
PA
27192014-02-27 Pedro Alves <palves@redhat.com>
2720
2721 PR 12702
2722 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2723 macros.
2724 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2725 output.
2726 (last_thread_of_process_p): Take a PID argument instead of a
2727 thread pointer.
2728 (linux_wait_for_lwp): Delete.
2729 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2730 functions.
2731 (linux_low_filter_event): New function, party factored out from
2732 linux_wait_for_event.
2733 (linux_wait_for_event): Rename to ...
2734 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2735 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2736 sigsuspend. Check for zombie leaders.
2737 (linux_wait_for_event): Reimplement as wrapper around
2738 linux_wait_for_event_filtered.
2739 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2740 a normal or signal exit is seen, it's the whole process exiting.
2741 (wait_for_sigstop): No longer a for_each_inferior callback.
2742 Rewrite on top of linux_wait_for_event_filtered.
2743 (stop_all_lwps): Call wait_for_sigstop directly.
2744 * server.c (resume, handle_target_event): Handle
2745 TARGET_WAITKIND_NO_RESUMED.
2746
d763de10
JB
27472014-02-26 Joel Brobecker <brobecker@adacore.com>
2748
2749 * win32-low.c (psapi_get_dll_name,
2750 * win32_CreateToolhelp32Snapshot): Delete.
2751 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2752 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2753 Delete.
2754 (handle_load_dll): Add function description.
2755 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2756
850a0f76
JB
27572014-02-26 Joel Brobecker <brobecker@adacore.com>
2758
2759 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2760 Add comment.
2761 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2762 base address when calling win32_add_one_solib.
2763 (handle_load_dll): Delete local variable load_addr.
2764 Remove 0x1000 offset applied to DLL base address when calling
2765 win32_add_one_solib.
2766 (handle_unload_dll): Add comment.
2767
f25b3fc3
JB
27682014-02-26 Joel Brobecker <brobecker@adacore.com>
2769
2770 * win32-low.c (win32_add_all_dlls): Renames
2771 win32_ensure_ntdll_loaded. Rewrite function documentation.
2772 Adjust implementation to always load all DLLs.
2773 Add 0x1000 offset to DLL base address when calling
2774 win32_add_one_solib.
2775 (child_initialization_done): New static global.
2776 (do_initial_child_stuff): Set child_initialization_done to
2777 zero during child initialization, and 1 after. Replace call
2778 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2779 Add comment.
2780 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2781 (handle_unload_dll): Add function documentation.
2782 (get_child_debug_event): Ignore load and unload DLL events
2783 during child initialization.
2784
d86d4aaf
DE
27852014-02-20 Doug Evans <dje@google.com>
2786
3bc32da3 2787 Remove global all_lwps.
d86d4aaf
DE
2788 * inferiors.h (ptid_of): Move here from linux-low.h.
2789 (pid_of, lwpid_of): Ditto.
2790 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2791 parameter is a struct thread_info * now.
2792 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2793 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2794 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2795 directly.
2796 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2797 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2798 * linux-arm-low.c (update_registers_callback): Update, "entry"
2799 parameter is a struct thread_info * now.
2800 Fetch lwpid from current_inferior directly.
2801 (arm_insert_point): Pass &all_threads to find_inferior instead of
2802 &all_lwps.
2803 (arm_remove_point): Ditto.
2804 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2805 (arm_prepare_to_resume): Fetch pid from thread.
2806 (arm_read_description): Fetch lwpid from current_inferior directly.
2807 * linux-low.c (all_lwps): Delete.
2808 (delete_lwp): Delete call to remove_inferior.
2809 (handle_extended_wait): Fetch lwpid from thread.
2810 (add_lwp): Don't set lwp->entry.id. Remove call to
2811 add_inferior_to_list.
2812 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2813 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2814 (kill_one_lwp_callback): Ditto.
2815 (linux_kill): Don't dereference NULL pointer.
2816 Fetch ptid,lwpid from thread.
2817 (get_detach_signal): Fetch ptid from thread.
2818 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2819 Simplify call to regcache_invalidate_thread.
2820 (delete_lwp_callback): Update, "entry" parameter is a
2821 struct thread_info * now. Fetch pid from thread.
2822 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2823 (status_pending_p_callback): Update, "entry" parameter is a
2824 struct thread_info * now. Fetch ptid from thread.
2825 (find_lwp_pid): Update, "entry" parameter is a
2826 struct thread_info * now.
2827 (linux_wait_for_lwp): Fetch pid from thread.
2828 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2829 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2830 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2831 (dequeue_one_deferred_signal): Ditto.
2832 (cancel_breakpoint): Fetch ptid from current_inferior.
2833 (linux_wait_for_event): Pass &all_threads to find_inferior,
2834 not &all_lwps. Fetch ptid, lwpid from thread.
2835 (count_events_callback): Update, "entry" parameter is a
2836 struct thread_info * now.
2837 (select_singlestep_lwp_callback): Ditto.
2838 (select_event_lwp_callback): Ditto.
2839 (cancel_breakpoints_callback): Ditto.
2840 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2841 not &all_lwps.
2842 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2843 (unsuspend_one_lwp): Update, "entry" parameter is a
2844 struct thread_info * now.
2845 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2846 not &all_lwps.
2847 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2848 Fetch lwpid from thread, not lwp.
2849 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2850 Pass &all_threads to find_inferior, not &all_lwps.
2851 (send_sigstop): Fetch lwpid from thread, not lwp.
2852 (send_sigstop_callback): Update, "entry" parameter is a
2853 struct thread_info * now.
2854 (suspend_and_send_sigstop_callback): Ditto.
2855 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2856 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2857 struct thread_info * now.
2858 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2859 from thread, lwp.
2860 (lwp_running): Update, "entry" parameter is a
2861 struct thread_info * now.
2862 (stop_all_lwps): Fetch ptid from thread.
2863 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2864 (linux_resume_one_lwp): Fetch lwpid from thread.
2865 (linux_set_resume_request): Update, "entry" parameter is a
2866 struct thread_info * now. Fetch pid, lwpid from thread.
2867 (resume_status_pending_p): Update, "entry" parameter is a
2868 struct thread_info * now.
2869 (need_step_over_p): Ditto. Fetch lwpid from thread.
2870 (start_step_over): Fetch lwpid from thread.
2871 (linux_resume_one_thread): Update, "entry" parameter is a
2872 struct thread_info * now. Fetch lwpid from thread.
2873 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2874 (proceed_one_lwp): Update, "entry" parameter is a
2875 struct thread_info * now. Fetch lwpid from thread.
2876 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2877 struct thread_info * now.
2878 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2879 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2880 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2881 directly.
2882 (regsets_store_inferior_registers): Ditto.
2883 (fetch_register, store_register): Ditto.
2884 (linux_read_memory, linux_write_memory): Ditto.
2885 (linux_request_interrupt): Ditto.
2886 (linux_read_auxv): Ditto.
2887 (linux_xfer_siginfo): Ditto.
2888 (linux_qxfer_spu): Ditto.
2889 (linux_qxfer_libraries_svr4): Ditto.
2890 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2891 moved to inferiors.h.
2892 (get_lwp): Delete.
2893 (get_thread_lwp): Update.
2894 (struct lwp_info): Delete member "entry". Simplify comment for
2895 member "thread".
2896 (all_lwps): Delete.
2897 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2898 current_inferior directly.
2899 (update_watch_registers_callback): Update, "entry" parameter is a
2900 struct thread_info * now. Fetch pid from thread.
2901 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2902 (mips_insert_point): Fetch lwpid from current_inferior.
2903 Pass &all_threads to find_inferior, not &all_lwps.
2904 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2905 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2906 directly.
2907 (mips_stopped_data_address): Ditto.
2908 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2909 directly.
2910 * linux-tile-low.c (tile_arch_setup): Ditto.
2911 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2912 (update_debug_registers_callback): Update, "entry" parameter is a
2913 struct thread_info * now. Fetch pid from thread.
2914 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2915 Pass &all_threads to find_inferior, not &all_lwps.
2916 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2917 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2918 Pass &all_threads to find_inferior, not &all_lwps.
2919 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2920 (i386_dr_low_get_status): Ditto.
2921 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2922 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2923 (x86_linux_read_description): Ditto.
2924 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2925
3b8361aa
DE
29262014-02-20 Doug Evans <dje@google.com>
2927
2928 * inferiors.c (get_first_inferior): Fix buglet.
2929
f7667f0d
DE
29302014-02-19 Doug Evans <dje@google.com>
2931
2932 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2933 * inferiors.c (add_thread): Change result type to struct thread_info *.
2934 All callers updated.
2935 (add_lwp): Call add_thread here instead of in callers.
2936 All callers updated.
2937 * linux-low.h (get_lwp_thread): Rewrite.
2938 (struct lwp_info): New member "thread".
2939
b3312d80
DE
29402014-02-19 Doug Evans <dje@google.com>
2941
2942 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2943 All callers updated.
2944
ecc6f45c
DE
29452014-02-19 Doug Evans <dje@google.com>
2946
2947 * inferiors.c (add_thread): Fix whitespace.
2948
649ebbca
DE
29492014-02-19 Doug Evans <dje@google.com>
2950
2951 * dll.c (clear_dlls): Replace accessing list implemention details
2952 with API function.
2953 * gdbthread.h (get_first_thread): Declare.
2954 * inferiors.c (for_each_inferior_with_data): New function.
2955 (get_first_thread): New function.
2956 (find_thread_ptid): Simplify.
2957 (get_first_inferior): New function.
2958 (clear_list): Delete.
2959 (one_inferior_p): New function.
2960 (clear_inferior_list): New function.
2961 (clear_inferiors): Update.
2962 * inferiors.h (for_each_inferior_with_data): Declare.
2963 (clear_inferior_list): Declare.
2964 (one_inferior_p): Declare.
2965 (get_first_inferior): Declare.
2966 * linux-low.c (linux_wait_for_event): Replace accessing list
2967 implemention details with API function.
2968 * server.c (target_running): Ditto.
2969 (accumulate_file_name_length): New function.
2970 (emit_dll_description): New function.
2971 (handle_qxfer_libraries): Replace accessing list implemention
2972 details with API function.
2973 (handle_qxfer_threads_worker): New function.
2974 (handle_qxfer_threads_proper): Replace accessing list implemention
2975 details with API function.
2976 (handle_query): Ditto.
2977 (visit_actioned_threads_callback_ftype): New typedef.
2978 (visit_actioned_threads_data): New struct.
2979 (visit_actioned_threads): Rewrite to be find_inferior callback.
2980 (resume): Call find_inferior.
2981 (handle_status): Replace accessing list implemention
2982 details with API function.
2983 (process_serial_event): Replace accessing list implemention details
2984 with API function.
2985 * target.c (set_desired_inferior): Replace accessing list implemention
2986 details with API function.
2987 * tracepoint.c (same_process_p): New function.
2988 (gdb_agent_about_to_close): Replace accessing list implemention
2989 details with API function.
2990 * win32-low.c (child_delete_thread): Replace accessing list
2991 implemention details with API function.
2992 (match_dll_by_basename): New function.
2993 (dll_is_loaded_by_basename): New function.
2994 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2995 details call to dll_is_loaded_by_basename.
2996
80894984
DE
29972014-02-19 Doug Evans <dje@google.com>
2998
2999 * dll.h (struct dll_info): Add comment.
3000 * gdbthread.h (struct thread_info): Add comment.
3001 (current_ptid): Simplify.
3002 * inferiors.c (add_process): Update.
3003 (remove_process): Update.
3004 * inferiors.h (struct process_info): Rename member "head" to "entry".
3005 * linux-low.c (delete_lwp): Update.
3006 (add_lwp): Update.
3007 (last_thread_of_process_p): Update.
3008 (kill_one_lwp_callback, linux_kill): Update.
3009 (status_pending_p_callback): Update.
3010 (wait_for_sigstop): Update. Simplify read of ptid.
3011 (start_step_over): Update.
3012 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3013 (get_lwp_thread): Update.
3014 (struct lwp_info): Rename member "head" to "entry".
3015 * regcache.h (inferior_list_entry): Delete.
3016 * server.c (kill_inferior_callback): Update.
3017 (detach_or_kill_inferior_callback): Update.
3018 (print_started_pid): Update.
3019 (print_attached_pid): Update.
3020 (process_serial_event): Simplify read of ptid.
3021 * thread-db.c (thread_db_create_event): Update.
3022 (thread_db_get_tls_address): Update.
3023 * win32-low.c (current_inferior_ptid): Simplify.
3024
46917d26
TT
30252014-02-19 Tom Tromey <tromey@redhat.com>
3026
3027 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3028 argument.
3029 (target_supports_btrace): Update.
3030
0759a81e
YQ
30312014-02-14 Yao Qi <yao@codesourcery.com>
3032
3033 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3034 (rsp-low-ipa.o): New target.
3035
a7191e8b
TT
30362014-02-12 Tom Tromey <tromey@redhat.com>
3037
3038 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3039 convert_ascii_to_int.
3040 * regcache.c (registers_to_string): Likewise.
3041 * remote-utils.c (decode_M_packet): Likewise.
3042 * server.c (process_serial_event): Likewise.
3043
ff0e980e
TT
30442014-02-12 Tom Tromey <tromey@redhat.com>
3045
3046 * server.c (handle_query, handle_v_run): Use hex2bin, not
3047 unhexify.
3048 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3049
e9371aff
TT
30502014-02-12 Tom Tromey <tromey@redhat.com>
3051
3052 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3053 convert_int_to_ascii.
3054 * regcache.c (registers_to_string, collect_register_as_string):
3055 Likewise.
3056 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3057 Likewise.
3058 * server.c (process_serial_event): Likewise.
3059 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3060 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3061
971dc0b8
TT
30622014-02-12 Tom Tromey <tromey@redhat.com>
3063
3064 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3065 bin2hex, not hexify.
3066 * tracepoint.c (cmd_qtstatus): Likewise.
3067
0a822afb
TT
30682014-02-12 Tom Tromey <tromey@redhat.com>
3069
3070 * remote-utils.c (monitor_output): Pass explicit length to
3071 hexify.
3072
9c3d6531
TT
30732014-02-12 Tom Tromey <tromey@redhat.com>
3074
3075 * tracepoint.c: Include rsp-low.h.
3076 * server.c: Include rsp-low.h.
3077 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3078 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3079 declare.
3080 * remote-utils.c: Include rsp-low.h.
3081 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3082 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3083 (convert_int_to_ascii, convert_ascii_to_int): Move to
3084 common/rsp-low.c.
3085 * regcache.c: Include rsp-low.h.
3086 * ax.c: Include rsp-low.h.
3087 * Makefile.in (SFILES): Add common/rsp-low.c.
3088 (OBS): Add rsp-low.o.
3089 (rsp-low.o): New target.
3090
01fd3ea5
TT
30912014-02-12 Tom Tromey <tromey@redhat.com>
3092
3093 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3094 Include print-utils.h.
3095 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3096 (plongest, thirty_two, phex_nz): Remove.
3097 * Makefile.in (SFILES): Add common/print-utils.c.
3098 (OBS): Add print-utils.o.
3099 (print-utils-ipa.o): New target.
3100 (print-utils.o): New target.
3101 (IPA_OBJS): Add print-utils-ipa.o.
3102
e99dc820
TT
31032014-02-06 Tom Tromey <tromey@redhat.com>
3104
3105 * Makefile.in (SFILES): Fix indentation.
3106
ee1e2d4f
DE
31072014-02-05 Doug Evans <dje@google.com>
3108
3109 * linux-low.c (linux_wait_for_event): Improve comment.
3110 (linux_wait_1): Keep current_inferior in sync with event_child.
3111
f5a02773
DE
31122014-01-22 Doug Evans <dje@google.com>
3113
3114 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3115
87ce2a04
DE
31162014-01-22 Doug Evans <dje@google.com>
3117
3118 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3119 * configure: Regenerate.
3120 * config.in: Regenerate.
3121 * Makefile.in (SFILES): Add debug.c.
3122 (OBS): Add debug.o.
3123 * debug.c: New file.
3124 * debug.h: New file.
3125 * linux-aarch64-low.c (*): Update all debugging printfs to use
3126 debug_printf instead of fprintf.
3127 * linux-arm-low.c (*): Ditto.
3128 * linux-cris-low.c (*): Ditto.
3129 * linux-crisv32-low.c (*): Ditto.
3130 * linux-m32r-low.c (*): Ditto.
3131 * linux-sparc-low.c (*): Ditto.
3132 * linux-x86.c (*): Ditto.
3133 * linux-low.c (*): Ditto.
3134 (linux_wait_1): Add calls to debug_enter, debug_exit.
3135 (linux_wait): Remove redundant debugging printf.
3136 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3137 (linux_resume, unstop_all_lwps): Ditto.
3138 * mem-break.c (*): Update all debugging printfs to use
3139 debug_printf instead of fprintf.
3140 * remote-utils.c (*): Ditto.
3141 * thread-db.c (*): Ditto.
3142 * server.c #include <ctype.h>, "gdb_vecs.h".
3143 (debug_threads): Moved to debug.c.
3144 (*): Update all debugging printfs to use debug_printf instead of
3145 fprintf.
3146 (start_inferior): Replace call to fflush with call to debug_flush.
3147 (monitor_show_help): Mention set debug-format.
3148 (parse_debug_format_options): New function.
3149 (handle_monitor_command): Handle "monitor set debug-format".
3150 (gdbserver_usage): Mention --debug-format.
3151 (main): Parse --debug-format.
3152 * server.h (debug_threads): Declaration moved to debug.h.
3153 #include "debug.h".
3154 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3155 trace_debug_1 that uses debug_printf.
3156 (tracepoint_look_up_symbols): Update all debugging printfs to use
3157 debug_printf instead of fprintf.
3158
e671835b
BS
31592014-01-20 Baruch Siach <baruch@tkos.co.il>
3160
3161 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3162 sys/ptrace.h.
3163
b5737fa9
PA
31642014-01-17 Pedro Alves <palves@redhat.com>
3165
ea38d2a9 3166 PR build/16445
c7faa97a
PA
3167 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3168 defined after including gdb_proc_service.h.
b5737fa9 3169
40ed484e
DE
31702014-01-16 Doug Evans <dje@google.com>
3171
3172 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3173 (match_dll): Use it.
3174
969c39fb
MM
31752014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3176
3177 * target.h (target_ops) <read_btrace>: Change parameters and
3178 return type to allow error reporting.
3179 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3180 trace reading errors on.
3181 * linux-low.c (linux_low_read_btrace): Pass trace reading
3182 errors on.
3183 (linux_low_disable_btrace): New.
3184
ab7f45ba
DE
31852014-01-15 Doug Evans <dje@google.com>
3186
3187 * inferiors.c (thread_id_to_gdb_id): Delete.
3188 * inferiors.h (thread_id_to_gdb_id): Delete.
3189
66af0f44
EZ
31902014-01-13 Eli Zaretskii <eliz@gnu.org>
3191
3192 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3193 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3194 versions.
3195
9939e131
PA
31962014-01-08 Pedro Alves <palves@redhat.com>
3197
3198 * server.c (handle_status): Don't discard previous queued stop
3199 replies or thread's pending status here.
3200 (main) <disconnection>: Do it here instead.
3201
b7ea362b
PA
32022014-01-08 Pedro Alves <palves@redhat.com>
3203
3204 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3205 * server.c (visit_actioned_threads, handle_pending_status): New
3206 function.
3207 (handle_v_cont): Factor out parts to ...
3208 (resume): ... this new function. If in all-stop, and a thread
3209 being resumed has a pending status, report it without actually
3210 resuming.
3211 (myresume): Adjust to use the new 'resume' function.
3212 (clear_pending_status_callback, set_pending_status_callback)
3213 (find_status_pending_thread_callback): New functions.
3214 (handle_status): Handle the case of multiple threads having
3215 interesting statuses to report. Report threads' real last signal
3216 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3217 with an interesting thread to report the status for, instead of
3218 always reporting the status of the first thread.
3219
28498c42
JB
32202014-01-01 Joel Brobecker <brobecker@adacore.com>
3221
3222 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3223 * gdbreplay.c (gdbreplay_version): Likewise.
3224
f45c82da
YZ
32252013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3226
3227 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3228 iov.iov_len with the real length in use.
3229
379a5e2d
JB
32302013-12-13 Joel Brobecker <brobecker@adacore.com>
3231
3232 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3233 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3234 for all targets that use win32-low.c.
3235 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3236 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3237
4210d83e
PA
32382013-12-13 Pedro Alves <palves@redhat.com>
3239
3240 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3241 if equal to TARGET_WAITKIND_LOADED.
3242 * win32-low.c (cached_status): New static global.
3243 (win32_wait): Add declaration.
3244 (do_initial_child_stuff): Flush all initial pending debug events
3245 up to the initial breakpoint.
3246 (win32_wait): If CACHED_STATUS was set, return that instead
3247 of doing a real wait. Remove the code resuming the execution
3248 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3249 during the initial phase. Also remove the code changing
3250 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3251 TARGET_WAITKIND_STOPPED.
3252
e7f0d979
YQ
32532013-12-11 Yao Qi <yao@codesourcery.com>
3254
3255 * notif.c (handle_notif_ack): Return 0 if no notification
3256 matches.
3257
ebcf782c
DE
32582013-11-20 Doug Evans <dje@google.com>
3259
3260 * linux-low.c (linux_set_resume_request): Fix comment.
3261
20ad9378
DE
32622013-11-20 Doug Evans <dje@google.com>
3263
3264 * linux-low.c (resume_status_pending_p): Tweak comment.
3265
a196ebeb
WT
32662013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3267
3268 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3269 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3270 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3271 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3272 (srv_amd64_regobj): Add amd64-mpx.o.
3273 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3274 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3275 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3276 * i387-fp.c (num_pl_bnd_register) Added constant.
3277 (num_pl_bnd_cfg_registers) Added constant.
3278 (struct i387_xsave) Added reserved area and MPX fields.
3279 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3280 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3281 function.
3282 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3283 (init_registers_amd64_mpx_linux): Declare new function.
3284 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3285 (x86_64_regmap): Add MPX registers.
3286 (x86_linux_read_description): Add MPX case.
3287 (initialize_low_arch): Initialize MPX targets.
3288
0080a2f6
TT
32892013-11-18 Tom Tromey <tromey@redhat.com>
3290
3291 * configure: Rebuild.
3292 * configure.ac: Don't check for stdlib.h.
3293 * gdbreplay.c: Unconditionally include stdlib.h.
3294
2978b111
TT
32952013-11-18 Tom Tromey <tromey@redhat.com>
3296
3297 * config.in: Rebuild.
3298 * configure: Rebuild.
3299 * configure.ac: Don't use AC_HEADER_DIRENT.
3300
a3d08894
TT
33012013-11-18 Tom Tromey <tromey@redhat.com>
3302
3303 * server.h: Don't check HAVE_STRING_H.
3304 * gdbreplay.c: Don't check HAVE_STRING_H.
3305 * configure: Rebuild.
3306
0a5dd17d
TT
33072013-11-18 Tom Tromey <tromey@redhat.com>
3308
3309 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3310 LIBGNU.
3311
1bd2f0ba
TT
33122013-11-08 Tom Tromey <tromey@redhat.com>
3313
3314 * configure, config.in: Rebuild.
3315 * configure.ac: Remove unused configury.
3316
3266f10b
TT
33172013-11-08 Tom Tromey <tromey@redhat.com>
3318
3319 * acinclude.m4: Include common.m4, codeset.m4.
3320 * configure, config.in: Rebuild.
3321 * configure.ac: Use GDB_AC_COMMON.
3322
6682d959
AA
33232013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3324
3325 * linux-s390-low.c (HWCAP_S390_TE): New define.
3326 (s390_arch_setup): Consider the TE field in the HWCAP for
3327 determining 'have_regset_tdb'.
3328
fd0a4d76
SDJ
33292013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3330
3331 PR gdb/16014
3332 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3333 call to sizeof.
3334
1a3d890b
PA
33352013-10-02 Pedro Alves <palves@redhat.com>
3336
3337 * server.c (process_serial_event): Don't output "GDBserver
3338 exiting" if GDB is connected through stdio.
3339 * target.c (mywait): Likewise, be silent if GDB is connected
3340 through stdio.
3341
97ad4581
JB
33422013-10-01 Joel Brobecker <brobecker@adacore.com>
3343
3344 * lynx-low.c (lynx_add_threads_after_attach): New function.
3345 (lynx_attach): Remove call to add_thread. Add call to
3346 lynx_add_threads_after_attach instead.
3347
5b4e221c
MF
33482013-09-28 Mike Frysinger <vapier@gentoo.org>
3349
3350 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3351 * config.in, configure: Regenerated.
3352
ee47b2f8
YQ
33532013-09-18 Yao Qi <yao@codesourcery.com>
3354
3355 PR server/15959
3356 * server.c (start_inferior): Clear 'resume_info'.
3357
d6707650 33582013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3359
d6707650
JW
3360 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3361 for each register.
3362
9243dd0e 33632013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3364
9243dd0e
JW
3365 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3366 linux-tile-low.o to srv_tgtobj.
3367
c623a6ef
WN
33682013-09-16 Will Newton <will.newton@linaro.org>
3369
3370 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3371 out regs.
3372
fb71d39e
PA
33732013-09-06 Pedro Alves <palves@redhat.com>
3374
3375 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3376 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3377 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3378 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3379 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3380 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3381
8e7e9910
PA
33822013-09-06 Pedro Alves <palves@redhat.com>
3383
3384 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3385 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3386
7c3a12ca
PA
33872013-09-06 Pedro Alves <palves@redhat.com>
3388
3389 * linux-amd64-ipa.c: Include tracepoint.h.
3390 * linux-i386-ipa.c: Include tracepoint.h.
3391
8eb3d7b6
RW
33922013-09-06 Ricard Wanderlof <ricardw@axis.com>
3393
3394 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3395 (ps_get_thread_area): New function.
3396
eddddb9d
RW
33972013-09-06 Ricard Wanderlof <ricardw@axis.com>
3398
3399 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3400 (initialize_low_arch): Call init_registers_crisv32 rather than
3401 init_register_crisv32.
3402
533b0600
PA
34032013-09-05 Pedro Alves <palves@redhat.com>
3404
3405 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3406 to ...
3407 * hostio.h: ... this new file.
3408 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3409 win32-low.c: Include hostio.h.
3410
0ce3d3b5
PA
34112013-09-05 Pedro Alves <palves@redhat.com>
3412
3413 * server.h (gdb_client_data, handler_func, callback_handler_func)
3414 (delete_file_handler, add_file_handler, append_callback_event)
3415 (delete_callback_event, start_event_loop, initialize_event_loop):
3416 Move to event-loop.h and include it.
3417 * event-loop.h: New file.
3418
799cdc37
PA
34192013-09-05 Pedro Alves <palves@redhat.com>
3420
3421 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3422 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3423 (loaded_dll, unloaded_dll): Move to ...
3424 * dll.h: ... this new file.
3425 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3426
6a6bbd9d
PA
34272013-09-05 Pedro Alves <palves@redhat.com>
3428
3429 * server.h (current_process, get_thread_process, all_processes)
3430 (add_inferior_to_list, for_each_inferior, current_inferior)
3431 (remove_inferior, add_process, remove_process, find_process_pid)
3432 (have_started_inferiors_p, have_attached_inferiors_p)
3433 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3434 (clear_inferiors, find_inferior, find_inferior_id)
3435 (inferior_target_data, set_inferior_target_data)
3436 (inferior_regcache_data, set_inferior_regcache_data): Move to
3437 inferiors.h, and include it.
3438 * inferiors.h: New file.
3439
f699aaba
PA
34402013-09-05 Pedro Alves <palves@redhat.com>
3441
3442 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3443 Move ...
72f4393d 3444 * ax.h: ... here.
f699aaba 3445
c144c7a0
PA
34462013-09-05 Pedro Alves <palves@redhat.com>
3447
3448 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3449 tracepoint.h.
3450 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3451 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3452 (handle_tracepoint_general_set, handle_tracepoint_query)
3453 (tracepoint_finished_step, tracepoint_was_hit)
3454 (release_while_stepping_state_list, current_traceframe)
3455 (in_readonly_region, traceframe_read_mem)
3456 (fetch_traceframe_registers, traceframe_read_sdata)
3457 (traceframe_read_info, struct fast_tpoint_collect_status)
3458 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3459 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3460 (supply_fast_tracepoint_registers)
3461 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3462 (ipa_tdesc, claim_trampoline_space)
3463 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3464 (agent_mem_read, agent_get_trace_state_variable_value)
3465 (agent_set_trace_state_variable_value, agent_tsv_read)
3466 (agent_mem_read_string, get_raw_reg_func_addr)
3467 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3468 * tracepoint.h: ... this new file.
3469
ff42e6ab
PA
34702013-09-05 Pedro Alves <palves@redhat.com>
3471
3472 * server.h (perror_with_name, error, fatal, warning, paddress)
3473 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3474 include it.
3475 * utils.h: New file.
3476
541af0f4
PA
34772013-09-05 Pedro Alves <palves@redhat.com>
3478
3479 * server.h (remote_debug, noack_mode, transport_is_reliable)
3480 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3481 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3482 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3483 (write_enn, initialize_async_io, enable_async_io)
3484 (disable_async_io, check_remote_input_interrupt_request)
3485 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3486 (dead_thread_notify, prepare_resume_reply)
3487 (decode_address_to_semicolon, decode_address, decode_m_packet)
3488 (decode_M_packet, decode_X_packet, decode_xfer_write)
3489 (decode_search_memory_packet, unhexify, hexify)
3490 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3491 (look_up_one_symbol, relocate_instruction)
3492 (monitor_output): Move to remote-utils.h, and include it.
3493 * remote-utils.h: New file.
3494
eebdf26b
PA
34952013-09-05 Pedro Alves <palves@redhat.com>
3496
3497 * server.h (_): Delete.
3498
3aafd2ff
PA
34992013-09-02 Pedro Alves <palves@redhat.com>
3500
3501 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3502 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3503 allocated.
3504 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3505
cee83bcb
PM
35062013-09-02 Pierre Muller <muller@sourceware.org>
3507
3508 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3509 or WriteProcessMemory complete successfully and handle
3510 ERROR_PARTIAL_COPY error.
3511
9a13b2fa
PA
35122013-09-02 Pedro Alves <palves@redhat.com>
3513
3514 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3515 error instead of EIO.
3516
602e3198
JK
35172013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3518
3519 PR server/15604
3520 * linux-low.c: Include filestuff.h.
3521 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3522 * lynx-low.c: Include filestuff.h.
3523 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3524 * server.c: Include filestuff.h.
3525 (main): Call notice_open_fds.
3526 * spu-low.c: Include filestuff.h.
3527 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3528
96d7229d
LM
35292013-08-22 Luis Machado <lgustavo@codesourcery.com>
3530
3531 * Makefile.in: Explain why ../target and ../nat are not
3532 listed as include file search paths.
3533 (linux-waitpid.o): New object file rule.
3534 * configure.srv (srv_native_linux_obj): New variable.
3535 Replace all occurrences of linux native object files with
3536 $srv_native_linux_obj.
3537 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3538 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3539 (linux_enable_event_reporting): Remove declaration.
3540 (my_waitpid): Moved to common/linux-waitpid.c.
3541 (linux_wait_for_event): Pass ptid when calling
3542 linux_enable_event_reporting.
3543 (linux_supports_tracefork_flag): Remove.
3544 (linux_enable_event_reporting): Likewise.
3545 (linux_tracefork_grandchild): Remove.
3546 (STACK_SIZE): Moved to common/linux-ptrace.c.
3547 (linux_tracefork_child): Remove.
3548 (linux_test_for_tracefork): Remove.
3549 (linux_look_up_symbols): Call linux_supports_traceclone.
3550 (initialize_low): Remove call to linux_test_for_tracefork.
3551 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3552 common/linux-ptrace.h.
3553 (PTRACE_TYPE_ARG4): Likewise.
3554 Include linux-ptrace.h.
3555
32940073
PA
35562013-08-21 Pedro Alves <palves@redhat.com>
3557
3558 * config.in: Renegerate.
3559
33b60d58 35602013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 3561
33b60d58
LM
3562 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3563 (SFILES): Remove $(srcdir)/common/target-common.c and
3564 add $(srcdir)/target/waitstatus.c.
3565 (OBS): Remove target-common.o and add waitstatus.o.
3566 (server_h): Remove $(srcdir)/../common/target-common.h and
3567 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3568 and $(srcdir)/../target/waitstatus.h.
3569 (target-common.o): Remove.
3570 (waitstatus.o): New target object file.
3571 * target.h: Do not include target-common.h and
3572 include target/resume.h, target/wait.h and
3573 target/waitstatus.h.
3574
b8e1b30e
LM
35752013-08-13 Luis Machado <lgustavo@codesourcery.com>
3576
3577 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3578 to PTRACE_TYPE_ARG3.
3579 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3580 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3581 PTRACE_TYPE_ARG4.
3582 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3583 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3584
7a60ad40
YQ
35852013-07-27 Jie Zhang <jie@codesourcery.com>
3586 Daniel Jacobowitz <dan@codesourcery.com>
3587 Yao Qi <yao@codesourcery.com>
3588
3589 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3590 (mips-linux-watch.o): New rule.
3591 (mips_linux_watch_h): New variable.
3592 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3593 srv_tgtobj.
3594 * linux-mips-low.c: Include mips-linux-watch.h.
3595 (struct arch_process_info, struct arch_lwp_info): New.
3596 (update_watch_registers_callback): New function.
3597 (mips_linux_new_process, mips_linux_new_thread) New functions.
3598 (mips_linux_prepare_to_resume, mips_insert_point): New
3599 functions.
3600 (mips_remove_point, mips_stopped_by_watchpoint): New
3601 functions.
3602 (rsp_bp_type_to_target_hw_bp_type): New function.
3603 (mips_stopped_data_address): New function.
3604 (the_low_target): Add watchpoint support functions.
3605
de6f69ad
YQ
36062013-07-27 Yao Qi <yao@codesourcery.com>
3607
3608 * i386-low.c: Include break-common.h.
3609 (enum target_hw_bp_type): Remove.
3610
3360c0bf
LM
36112013-07-24 Luis Machado <lgustavo@codesourcery.com>
3612
3613 * Makefile.in (SFILES): /common/target-common.c.
3614 (OBS): Add target-common.o.
3615 (server_h): Add $(srcdir)/../common/target-common.h.
3616 (target-common.o): New target.
3617 * server.c (queue_stop_reply_callback): Free
3618 status string after use.
3619 * target.c (target_waitstatus_to_string): Remove.
3620 * target.h: Include target-common.h.
3621 (resume_kind): Likewise.
3622 (target_waitkind): Likewise.
3623 (target_waitstatus): Likewise.
3624 (TARGET_WNOHANG): Likewise.
3625
bd885420
YQ
36262013-07-04 Yao Qi <yao@codesourcery.com>
3627
3628 * Makefile.in (host_alias): Use @host_noncanonical@.
3629 (target_alias): Use @target_noncanonical@.
3630 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3631 ACX_NONCANONICAL_HOST.
3632 * configure: Regenerated.
3633
3634 Revert:
3635 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3636
3637 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3638 * configure: Rebuild.
3639 * Makefile.in (version_host, version_target): Get from configure.
3640 (version.c): Use $(version_host) and $(version_target).
3641
17ef446e
PA
36422013-07-03 Pedro Alves <palves@redhat.com>
3643
3644 * Makefile.in (config.status): Depend on development.sh.
3645 * acinclude.m4: Include libmcheck.m4.
3646 * configure: Regenerate.
3647
7a9a7487
MG
36482013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3649
3650 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3651 attribute inside the parentheses.
3652 (winapi_DebugSetProcessKillOnExit): Ditto.
3653 (winapi_DebugBreakProcess): Ditto.
3654 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 3655
49b64de6
MG
36562013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3657
3658 * notif.h (notif_event): Add a dummy member to avoid compiler
3659 errors.
3660
d5749ee7
PA
36612013-07-01 Pedro Alves <palves@redhat.com>
3662
3663 * hostio.c (HOSTIO_PATH_MAX): Define.
3664 (require_filename, handle_open, handle_unlink, handle_readlink):
3665 Use it.
3666
d8d2a3ee
PA
36672013-07-01 Pedro Alves <palves@redhat.com>
3668
3669 * server.h: Include "pathmax.h".
3670 * linux-low.c: Don't include sys/param.h.
3671 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3672 MAXPATHLEN.
3673 * win32-low.c: Don't include sys/param.h.
3674 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3675
bc7dea8d
PA
36762013-07-01 Pedro Alves <palves@redhat.com>
3677
3678 * event-loop.c: Don't check HAVE_UNISTD_H before including
3679 <unistd.h>.
3680 * gdbreplay.c: Likewise.
3681 * remote-utils.c: Likewise.
3682 * server.c: Likewise.
3683 * configure.ac: Don't check for unistd.h.
3684 * configure: Regenerate.
3685
d6c2da54
TT
36862013-06-28 Tom Tromey <tromey@redhat.com>
3687
3688 * Makefile.in (version.c): Use version.in, not
3689 common/version.in.
3690
257b6bec
MG
36912013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3692
3693 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3694 * configure: Rebuild.
3695 * Makefile.in (version_host, version_target): Get from configure.
3696 (version.c): Use $(version_host) and $(version_target).
3697
86ebe149
DK
36982013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3699
3700 Fix trace-status to output user name without trailing colon.
3701 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3702
f30aa5af
DK
37032013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3704
3705 Fix trace-status to output proper start-time and stop-time.
3706 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3707 output start time and stop time in hex as gdb expects.
3708
28a93511
YQ
37092013-06-26 Pedro Alves <pedro@codesourcery.com>
3710
3711 * tracepoint.c (build_traceframe_info_xml): Output trace state
3712 variables present in the trace buffer.
3713
01208463
TT
37142013-06-24 Tom Tromey <tromey@redhat.com>
3715
3716 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3717 create-version.sh.
3718 (version.o): Remove.
3719 * gdbreplay.c: Include version.h.
3720 (version, host_name): Don't declare.
3721 * server.h: Include version.h.
3722 (version, host_name): Don't declare.
3723
760256f9
PA
37242013-06-12 Pedro Alves <palves@redhat.com>
3725
3726 * linux-x86-low.c (linux_is_elf64): Delete global.
3727 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3728 with local linux_pid_exe_is_elf_64_file use.
3729
030031ee
PA
37302013-06-11 Pedro Alves <palves@redhat.com>
3731
3732 * linux-low.c (regset_disabled, disable_regset): New functions.
3733 (regsets_fetch_inferior_registers)
3734 (regsets_store_inferior_registers): Use them.
3735 (initialize_regsets_info); Don't allocate the disabled_regsets
3736 array here.
3737 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3738 comment.
3739
5da6eb0a
PA
37402013-06-11 Pedro Alves <palves@redhat.com>
3741
3742 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3743 xmalloc.
3744
7e5aaa09
PA
37452013-06-11 Pedro Alves <palves@redhat.com>
3746
3747 * linux-x86-low.c (initialize_low_arch): Call
3748 init_registers_x32_avx_linux.
3749
d878444c
JK
37502013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3751
3752 Fix compatibility with Android Bionic.
3753 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3754 it is not empty.
3755
3aee8918
PA
37562013-06-07 Pedro Alves <palves@redhat.com>
3757
5f2b57b5 3758 PR server/14823
3aee8918
PA
3759 * Makefile.in (OBS): Add tdesc.o.
3760 (IPA_OBJS): Add tdesc-ipa.o.
3761 (tdesc-ipa.o): New rule.
3762 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3763 interface.
3764 * linux-low.c (new_inferior): Delete.
3765 (disabled_regsets, num_regsets): Delete.
3766 (linux_add_process): Adjust to set the new per-process
3767 new_inferior flag.
3768 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3769 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3770 was a stop. When calling arch_setup, switch the current inferior
3771 to the thread that got an event.
3772 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3773 (regsets_fetch_inferior_registers)
3774 (regsets_store_inferior_registers): New regsets_info parameter.
3775 Adjust to use it.
3776 (linux_register_in_regsets): New regs_info parameter. Adjust to
3777 use it.
3778 (register_addr, fetch_register, store_register): New usrregs_info
3779 parameter. Adjust to use it.
3780 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3781 parameter regs_info. Adjust to use it.
3782 (linux_fetch_registers): Get the current inferior's regs_info, and
3783 adjust to use it.
3784 (linux_store_registers): Ditto.
3785 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3786 (initialize_low): Don't initialize the target_regsets here. Call
3787 initialize_low_arch.
3788 * linux-low.h (target_regsets): Delete declaration.
3789 (struct regsets_info): New.
3790 (struct usrregs_info): New.
3791 (struct regs_info): New.
3792 (struct process_info_private) <new_inferior>: New field.
3793 (struct linux_target_ops): Delete the num_regs, regmap, and
3794 regset_bitmap fields. New field regs_info.
3795 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3796 * i387-fp.c (num_xmm_registers): Delete.
3797 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3798 calls to new interface.
3799 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3800 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3801 Infer the number of xmm registers from the regcache's target
3802 description.
3803 * i387-fp.h (num_xmm_registers): Delete.
3804 * inferiors.c (add_thread): Don't install the thread's regcache
3805 here.
3806 * proc-service.c (gregset_info): Fetch the current inferior's
3807 regs_info. Adjust to use it.
3808 * regcache.c: Include tdesc.h.
3809 (register_bytes, reg_defs, num_registers)
3810 (gdbserver_expedite_regs): Delete.
3811 (get_thread_regcache): If the thread doesn't have a regcache yet,
3812 create one, instead of aborting gdbserver.
3813 (regcache_invalidate_one): Rename to ...
3814 (regcache_invalidate_thread): ... this.
3815 (regcache_invalidate_one): New.
3816 (regcache_invalidate): Only invalidate registers of the current
3817 process.
3818 (init_register_cache): Add target_desc parameter, and use it.
3819 (new_register_cache): Ditto. Assert the target description has a
3820 non zero registers_size.
3821 (regcache_cpy): Add assertions. Adjust.
3822 (realloc_register_cache, set_register_cache): Delete.
3823 (registers_to_string, registers_from_string): Adjust.
3824 (find_register_by_name, find_regno, find_register_by_number)
3825 (register_cache_size): Add target_desc parameter, and use it.
3826 (free_register_cache_thread, free_register_cache_thread_one)
3827 (regcache_release, register_cache_size): New.
3828 (register_size): Add target_desc parameter, and use it.
3829 (register_data, supply_register, supply_register_zeroed)
3830 (supply_regblock, supply_register_by_name, collect_register)
3831 (collect_register_as_string, collect_register_by_name): Adjust.
3832 * regcache.h (struct target_desc): Forward declare.
3833 (struct regcache) <tdesc>: New field.
3834 (init_register_cache, new_register_cache): Add target_desc
3835 parameter.
3836 (regcache_invalidate_thread): Declare.
3837 (regcache_invalidate_one): Delete declaration.
3838 (regcache_release): Declare.
3839 (find_register_by_number, register_cache_size, register_size)
3840 (find_regno): Add target_desc parameter.
3841 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3842 declarations.
3843 * remote-utils.c: Include tdesc.h.
3844 (outreg, prepare_resume_reply): Adjust.
3845 * server.c: Include tdesc.h.
3846 (gdbserver_xmltarget): Delete declaration.
3847 (get_features_xml, process_serial_event): Adjust.
3848 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3849 declare.
3850 (struct process_info) <tdesc>: New field.
3851 (ipa_tdesc): Declare.
3852 * tdesc.c: New file.
3853 * tdesc.h: New file.
3854 * tracepoint.c: Include tdesc.h.
3855 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3856 (get_context_regcache): Adjust to pass ipa_tdesc down.
3857 (do_action_at_tracepoint): Adjust to get the register cache size
3858 from the context regcache's description.
3859 (traceframe_walk_blocks): Adjust to get the register cache size
3860 from the current trace frame's description.
3861 (traceframe_get_pc): Adjust to get current trace frame's
3862 description and pass it down.
3863 (gdb_collect): Adjust to get the register cache size from the
3864 IPA's description.
3865 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3866 (gdbserver_xmltarget): Delete.
3867 (initialize_low_tracepoint): Set the ipa's target description.
3868 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3869 (initialize_low_tracepoint): Set the ipa's target description.
3870 * linux-x86-low.c: Include tdesc.h.
3871 [__x86_64__] (is_64bit_tdesc): New.
3872 (ps_get_thread_area, x86_get_thread_area): Use it.
3873 (i386_cannot_store_register): Rename to ...
3874 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3875 (i386_cannot_fetch_register): Rename to ...
3876 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3877 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3878 to new interface.
3879 (target_regsets): Rename to ...
3880 (x86_regsets): ... this.
3881 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3882 interface.
3883 (x86_siginfo_fixup): Use is_64bit_tdesc.
3884 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3885 (tdesc_x32_avx_linux, tdesc_x32_linux)
3886 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3887 Declare.
3888 (x86_linux_update_xmltarget): Delete.
3889 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3890 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3891 (AMD64_LINUX_USER64_CS): New.
3892 (x86_linux_read_description): New, based on
3893 x86_linux_update_xmltarget.
3894 (same_process_callback): New.
3895 (x86_arch_setup_process_callback): New.
3896 (x86_linux_update_xmltarget): New.
3897 (x86_regsets_info): New.
3898 (amd64_linux_regs_info): New.
3899 (i386_linux_usrregs_info): New.
3900 (i386_linux_regs_info): New.
3901 (x86_linux_regs_info): New.
3902 (x86_arch_setup): Reimplement.
3903 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3904 (x86_emit_ops): Ditto.
3905 (the_low_target): Adjust. Install x86_linux_regs_info,
3906 x86_cannot_fetch_register, and x86_cannot_store_register.
3907 (initialize_low_arch): New.
3908 * linux-ia64-low.c (tdesc_ia64): Declare.
3909 (ia64_fetch_register): Adjust.
3910 (ia64_usrregs_info, regs_info): New globals.
3911 (ia64_regs_info): New function.
3912 (the_low_target): Adjust.
3913 (initialize_low_arch): New function.
3914 * linux-sparc-low.c (tdesc_sparc64): Declare.
3915 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3916 Adjust.
3917 (sparc_arch_setup): New function.
3918 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3919 (the_low_target): Adjust.
3920 (initialize_low_arch): New function.
3921 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3922 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3923 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3924 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3925 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3926 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3927 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3928 (tdesc_powerpc_isa205_vsx64l): Declare.
3929 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3930 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3931 (ppc_set_pc, ppc_get_hwcap): Adjust.
3932 (ppc_usrregs_info): Forward declare.
3933 (!__powerpc64__) ppc_regmap_adjusted: New global.
3934 (ppc_arch_setup): Adjust to the current process'es target
3935 description.
3936 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3937 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3938 (ppc_store_evrregset): Adjust.
3939 (target_regsets): Rename to ...
3940 (ppc_regsets): ... this, and make static.
3941 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3942 (ppc_regs_info): New function.
3943 (the_low_target): Adjust.
3944 (initialize_low_arch): New function.
3945 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3946 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3947 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3948 (tdesc_s390x_linux64v2): Declare.
3949 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3950 (s390_fill_gregset, s390_store_last_break): Adjust.
3951 (target_regsets): Rename to ...
3952 (s390_regsets): ... this, and make static.
3953 (s390_get_pc, s390_set_pc): Adjust.
3954 (s390_get_hwcap): New target_desc parameter, and use it.
3955 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3956 (s390_arch_setup): Adjust to set the current process'es target
3957 description. Don't adjust the regmap.
3958 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3959 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3960 (regs_info_3264): New globals.
3961 (s390_regs_info): New function.
3962 (the_low_target): Adjust.
3963 (initialize_low_arch): New function.
3964 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3965 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3966 [__mips64] (init_registers_mips_linux)
3967 (init_registers_mips_dsp_linux): Delete defines.
3968 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3969 (have_dsp): New global.
3970 (mips_read_description): New, based on mips_arch_setup.
3971 (mips_arch_setup): Reimplement.
3972 (get_usrregs_info): New function.
3973 (mips_cannot_fetch_register, mips_cannot_store_register)
3974 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3975 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3976 (target_regsets): Rename to ...
3977 (mips_regsets): ... this, and make static.
3978 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3979 (dsp_regs_info, regs_info): New globals.
3980 (mips_regs_info): New function.
3981 (the_low_target): Adjust.
3982 (initialize_low_arch): New function.
3983 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3984 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3985 Declare.
3986 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3987 (arm_read_description): New, with bits factored from
3988 arm_arch_setup.
3989 (arm_arch_setup): Reimplement.
3990 (target_regsets): Rename to ...
3991 (arm_regsets): ... this, and make static.
3992 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3993 (arm_regs_info): New function.
3994 (the_low_target): Adjust.
3995 (initialize_low_arch): New function.
3996 * linux-m68k-low.c (tdesc_m68k): Declare.
3997 (target_regsets): Rename to ...
3998 (m68k_regsets): ... this, and make static.
3999 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4000 (m68k_regs_info): New function.
4001 (m68k_arch_setup): New function.
4002 (the_low_target): Adjust.
4003 (initialize_low_arch): New function.
4004 * linux-sh-low.c (tdesc_sharch): Declare.
4005 (target_regsets): Rename to ...
4006 (sh_regsets): ... this, and make static.
4007 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4008 (sh_regs_info, sh_arch_setup): New functions.
4009 (the_low_target): Adjust.
4010 (initialize_low_arch): New function.
4011 * linux-bfin-low.c (tdesc_bfin): Declare.
4012 (bfin_arch_setup): New function.
4013 (bfin_usrregs_info, regs_info): New globals.
4014 (bfin_regs_info): New function.
4015 (the_low_target): Adjust.
4016 (initialize_low_arch): New function.
4017 * linux-cris-low.c (tdesc_cris): Declare.
4018 (cris_arch_setup): New function.
4019 (cris_usrregs_info, regs_info): New globals.
4020 (cris_regs_info): New function.
4021 (the_low_target): Adjust.
4022 (initialize_low_arch): New function.
4023 * linux-cris-low.c (tdesc_crisv32): Declare.
4024 (cris_arch_setup): New function.
4025 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4026 (cris_regs_info): New function.
4027 (the_low_target): Adjust.
4028 (initialize_low_arch): New function.
4029 * linux-m32r-low.c (tdesc_m32r): Declare.
4030 (m32r_arch_setup): New function.
4031 (m32r_usrregs_info, regs_info): New globals.
4032 (m32r_regs_info): Adjust.
4033 (initialize_low_arch): New function.
4034 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4035 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4036 (tic6x_usrregs_info): Forward declare.
4037 (tic6x_read_description): New function, based on ...
4038 (tic6x_arch_setup): ... this. Reimplement.
4039 (target_regsets): Rename to ...
4040 (tic6x_regsets): ... this, and make static.
4041 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4042 (tic6x_regs_info): New function.
4043 (the_low_target): Adjust.
4044 (initialize_low_arch): New function.
4045 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4046 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4047 (target_regsets): Rename to ...
4048 (xtensa_regsets): ... this, and make static.
4049 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4050 globals.
4051 (xtensa_arch_setup, xtensa_regs_info): New functions.
4052 (the_low_target): Adjust.
4053 (initialize_low_arch): New function.
4054 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4055 (nios2_arch_setup): Set the current process'es tdesc.
4056 (target_regsets): Rename to ...
4057 (nios2_regsets): ... this.
4058 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4059 (nios2_regs_info): New function.
4060 (the_low_target): Adjust.
4061 (initialize_low_arch): New function.
a261b8f5
PA
4062 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4063 (aarch64_arch_setup): Set the current process'es tdesc.
4064 (target_regsets): Rename to ...
4065 (aarch64_regsets): ... this.
4066 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4067 (aarch64_regs_info): New function.
4068 (the_low_target): Adjust.
4069 (initialize_low_arch): New function.
3aee8918
PA
4070 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4071 globals.
4072 (target_regsets): Rename to ...
4073 (tile_regsets): ... this.
4074 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4075 (tile_regs_info): New function.
4076 (tile_arch_setup): Set the current process'es tdesc.
4077 (the_low_target): Adjust.
4078 (initialize_low_arch): New function.
4079 * spu-low.c (tdesc_spu): Declare.
4080 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4081 * win32-arm-low.c (tdesc_arm): Declare.
4082 (arm_arch_setup): New function.
4083 (the_low_target): Install arm_arch_setup instead of
4084 init_registers_arm.
4085 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4086 (init_windows_x86): Rename to ...
4087 (i386_arch_setup): ... this. Set `win32_tdesc'.
4088 (the_low_target): Adjust.
4089 * win32-low.c (win32_tdesc): New global.
4090 (child_add_thread): Don't create the thread cache here.
4091 (do_initial_child_stuff): Set the new process'es tdesc.
4092 * win32-low.h (struct target_desc): Forward declare.
4093 (win32_tdesc): Declare.
4094 * lynx-i386-low.c (tdesc_i386): Declare global.
4095 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4096 * lynx-low.c (lynx_tdesc): New global.
4097 (lynx_add_process): Set the new process'es tdesc.
4098 * lynx-low.h (struct target_desc): Forward declare.
4099 (lynx_tdesc): Declare global.
4100 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4101 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4102 * nto-low.c (nto_tdesc): New global.
4103 (do_attach): Set the new process'es tdesc.
4104 * nto-low.h (struct target_desc): Forward declare.
4105 (nto_tdesc): Declare.
4106 * nto-x86-low.c (tdesc_i386): Declare.
4107 (nto_x86_arch_setup): Set `nto_tdesc'.
4108
b1fbec62
GB
41092013-06-04 Gary Benson <gbenson@redhat.com>
4110
4111 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4112 to qSupported response when appropriate.
4113 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4114 with nonzero-length annex.
4115 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4116 arguments supplied in annex.
4117
d1ec4ce7
DE
41182013-05-31 Doug Evans <dje@google.com>
4119
ac44adcb 4120 PR server/15594
d1ec4ce7
DE
4121 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4122 64 bits in 64-cross-32 environment.
4123
9b25f2d3
PA
41242013-05-28 Pedro Alves <palves@redhat.com>
4125
4126 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4127 (aarch64-without-fpu.c): Delete rule.
4128 * configure.srv (aarch64*-*-linux*): Remove references to
4129 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4130 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4131 declaration.
4132
6740dc9c
PA
41332013-05-24 Pedro Alves <palves@redhat.com>
4134
4135 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4136 instead of strchr/decode_address. Error if the range isn't split
4137 with a ','. Don't assume there's be a ':' in the action.
4138
c2d6af84
PA
41392013-05-23 Yao Qi <yao@codesourcery.com>
4140 Pedro Alves <palves@redhat.com>
4141
4142 * linux-low.c (lwp_in_step_range): New function.
4143 (linux_wait_1): If the thread was range stepping and stopped
4144 outside the stepping range, report the stop to GDB. Otherwise,
4145 continue stepping. Add range stepping debug output.
4146 (linux_set_resume_request): Copy the step range from the resume
4147 request to the lwp.
4148 (linux_supports_range_stepping): New.
4149 (linux_target_ops) <supports_range_stepping>: Set to
4150 linux_supports_range_stepping.
4151 * linux-low.h (struct linux_target_ops)
4152 <supports_range_stepping>: New field.
4153 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4154 * linux-x86-low.c (x86_supports_range_stepping): New.
4155 (the_low_target) <supports_range_stepping>: Set to
4156 x86_supports_range_stepping.
4157 * server.c (handle_v_cont): Handle 'r' action.
4158 (handle_v_requests): Append ";r" if the target supports range
4159 stepping.
4160 * target.h (struct thread_resume) <step_range_start,
4161 step_range_end>: New fields.
4162 (struct target_ops) <supports_range_stepping>:
4163 New field.
4164 (target_supports_range_stepping): New macro.
4165
58794e1a
JB
41662013-05-17 Joel Brobecker <brobecker@adacore.com>
4167
4168 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4169 confusion in comment.
4170
d631c5a7
JB
41712013-05-17 Joel Brobecker <brobecker@adacore.com>
4172
4173 * lynx-low.c (struct process_info_private): New type.
4174 (lynx_add_process): New function.
4175 (lynx_create_inferior, lynx_attach): Replace calls to
4176 add_process by calls to lynx_add_process.
4177 (lynx_resume): If PTID is null, then try using
4178 current_process()->private->last_wait_event_ptid.
4179 Add comments.
4180 (lynx_clear_inferiors): Delete. The contents of that function
4181 has been inlined in lynx_mourn;
4182 (lynx_wait_1): Save the ptid in the process's private data.
4183 (lynx_mourn): Free the process' private data. Replace call
4184 to lynx_clear_inferiors by call to clear_inferiors.
4185
96f7a20f
YQ
41862013-05-17 Yao Qi <yao@codesourcery.com>
4187
4188 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4189 the right place.
4190
db0dfaa0
LM
41912013-05-16 Luis Machado <lgustavo@codesourcery.com>
4192
4193 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4194 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4195 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4196 PT_TEXT_END_ADDR guards. Update comments.
4197 (linux_target_op) <read_offsets>: Conditionally define to
4198 linux_read_offsets if the target is UCLIBC and if it defines
4199 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4200
68f5f838
SL
42012013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4202 Andrew Jenner <andrew@codesourcery.com>
4203
4204 * Makefile.in (SFILES): Add linux-nios2-low.c.
4205 (clean): Add action to delete nios2-linux.c.
4206 (nios2-linux.c): New rule.
4207 * configure.srv: Add nios2*-*-linux*.
4208 * linux-nios2-low.c: New.
4209
1ebff1fd
HAQ
42102013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4211
4212 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4213
f6150862
HZ
42142013-04-25 Hui Zhu <hui@codesourcery.com>
4215
4216 PR gdb/15186
f6150862
HZ
4217 * ax.c (ax_printf): Add fflush.
4218
614c279d
TT
42192013-04-22 Tom Tromey <tromey@redhat.com>
4220
4221 * Makefile.in (SFILES): Add filestuff.c.
4222 (OBS): Add filestuff.o.
4223 (filestuff.o): New target.
4224 * config.in, configure: Rebuild.
4225 * configure.ac: Check for fdwalk, pipe2.
4226
7d4e5717
PA
42272013-04-17 Pedro Alves <palves@redhat.com>
4228
4229 * configure.ac (USE_THREAD_DB): Delete variable.
4230 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4231 Don't AC_SUBST USE_THREAD_DB.
4232 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4233 * config.in, configure: Regenerate.
4234
d5c93e41
PA
42352013-04-16 Pedro Alves <palves@redhat.com>
4236
4237 * linux-low.h (struct lwp_info) <thread_known>: Move under
4238 the USE_THREAD_DB #ifdef.
4239
04f5fe89
PA
42402013-04-16 Pedro Alves <palves@redhat.com>
4241
4242 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4243 (linux-low.o): Delete rule.
4244 * linux-low.h: Always include "gdb_thread_db.h" instead of
4245 conditionally including thread_db.h.
4246 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4247 HAVE_THREAD_DB_H.
4248
480b27bf
JK
42492013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4250
4251 * Makefile.in (install-only): Fix make install regression.
4252
43662968
JK
42532013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4254
4255 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4256 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4257 installation.
4258 * gdbserver.1: Remove.
4259
3e74e146
PA
42602013-03-22 Pedro Alves <palves@redhat.com>
4261
4262 * linux-low.c (handle_extended_wait): Don't call
4263 linux_enable_event_reporting.
4264
a8347a2a
TT
42652013-03-15 Tony Theodore <tonyt@logyst.com>
4266
4267 PR build/9098:
4268 * Makefile.in (SHELL): Use @SHELL@.
4269
eeb56fa7
SDJ
42702013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4271
4272 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4273 compiler warning.
4274
4fa7e2ff
JB
42752013-03-13 Joel Brobecker <brobecker@adacore.com>
4276
4277 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4278 Remove extraneous NULL element.
4279
8ddb1965
YQ
42802013-03-13 Yao Qi <yao@codesourcery.com>
4281
4282 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4283 'V' block in trace frame.
4284
9accd112
MM
42852013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4286
4287 * target.h (struct target_ops): Add btrace ops.
4288 (target_supports_btrace): New macro.
4289 (target_enable_btrace): New macro.
4290 (target_disable_btrace): New macro.
4291 (target_read_btrace): New macro.
4292 * gdbthread.h (struct thread_info): Add btrace field.
4293 * server.c: Include btrace-common.h.
4294 (handle_btrace_general_set): New function.
4295 (handle_btrace_enable): New function.
4296 (handle_btrace_disable): New function.
4297 (handle_general_set): Call handle_btrace_general_set.
4298 (handle_qxfer_btrace): New function.
4299 (struct qxfer qxfer_packets[]): Add btrace entry.
4300 * inferiors.c (remove_thread): Disable btrace.
4301 * linux-low: Include linux-btrace.h.
4302 (linux_low_enable_btrace): New function.
4303 (linux_low_read_btrace): New function.
4304 (linux_target_ops): Add btrace ops.
4305 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4306 Add srv_linux_btrace=yes.
4307 (x86_64-*-linux*): Add linux-btrace.o.
4308 Add srv_linux_btrace=yes.
4309 * configure.ac: Define HAVE_LINUX_BTRACE.
4310 * config.in: Regenerated.
4311 * configure: Regenerated.
4312
5cc22e4c
MM
43132013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4314
4315 * server.c (handle_qxfer): Preserve error message if -3 is
4316 returned.
4317 (qxfer): Document the -3 return value.
4318
7c97f91e
MM
43192013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4320
4321 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4322 (linux_btrace_h): New variable.
4323 (linux-btrace.o): New rule.
4324
be9a119c 43252013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
4326 Hafiz Abid Qadeer <abidh@codesourcery.com>
4327
4328 * tracepoint.c (trace_buffer_size): New global.
4329 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4330 (init_trace_buffer): Change to one-argument function. Allocate
4331 trace buffer memory.
4332 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4333 handle QTBuffer:size packet.
4334 (cmd_bigqtbuffer_size): New function.
4335 (initialize_tracepoint): Call init_trace_buffer with
4336 DEFAULT_TRACE_BUFFER_SIZE.
4337 * server.c (handle_query): Add QTBuffer:size in the
4338 supported packets.
4339
e64f7499
YQ
43402013-03-07 Yao Qi <yao@codesourcery.com>
4341
4342 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4343 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4344 of -1.
4345 (cmd_qtsp): Adjust condition. Do post increment.
4346 Set cur_action and cur_step_action back to 0.
4347
f0ae6fc3
PA
43482013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4349
4350 PR server/15236
4351 * linux-low.c (linux_write_memory): Return early success if LEN is
4352 zero.
4353
b5b0b0af
CV
43542013-03-05 Corinna Vinschen <vinschen@redhat.de>
4355
334ad4a8 4356 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 4357
589bc927
TT
43582013-02-28 Tom Tromey <tromey@redhat.com>
4359
4360 * configure.ac: Invoke AC_SYS_LARGEFILE.
4361 * configure, config.in: Rebuild.
4362
dfe07582
CV
43632013-02-28 Corinna Vinschen <vinschen@redhat.com>
4364
4365 * win32-low.c: Throughout, fix format strings and casts of
4366 printf-like functions to avoid type related warnings on all
4367 platforms.
4368 (get_child_debug_event): Print dwDebugEventCode as hex since
4369 that's how it's usually documented.
4370
736cd585
YQ
43712013-02-28 Yao Qi <yao@codesourcery.com>
4372
4373 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4374 pulongest.
4375
e1f58301
JW
43762013-02-27 Jiong Wang <jiwang@tilera.com>
4377
4378 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4379 (reg-tilegx32.c): New rule.
4380 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4381 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4382 different register info initializer according to elf class.
4383 (init_registers_tilgx32): New function. The tilegx32 register info
4384 initializer.
4385 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4386 (tile_store_gregset): Likewise.
4387
d171ca78
YQ
43882013-02-27 Yao Qi <yao@codesourcery.com>
4389
4390 * server.c (process_point_options): Print debug message when
4391 debug_threads is true.
4392
282bbdf3
YQ
43932013-02-26 Yao Qi <yao@codesourcery.com>
4394
4395 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4396
aca22551
PA
43972013-02-19 Pedro Alves <palves@redhat.com>
4398 Kai Tietz <ktietz@redhat.com>
4399
4400 PR gdb/15161
4401
4402 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4403 instead of strtoul to extract address from packet.
4404 (process_serial_event) <'z'>: Likewise.
4405
4f3cee1c
YQ
44062013-02-18 Yao Qi <yao@codesourcery.com>
4407
4408 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4409
8e1d55a3
PA
44102013-02-14 Pedro Alves <palves@redhat.com>
4411
4412 Plug memory leak.
4413
4414 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4415 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4416
458820da
PA
44172013-02-14 Pedro Alves <palves@redhat.com>
4418
4419 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4420
baea0dae
PA
44212013-02-14 Pedro Alves <palves@redhat.com>
4422
4423 * tracepoint.c (save_string): Delete.
4424 (add_tracepoint_action): Use savestring instead of save_string.
4425
0b1afbb3
PA
44262013-02-12 Pedro Alves <palves@redhat.com>
4427
4428 * linux-xtensa-low.c: Ditto.
4429 * xtensa-xtregs.c: Ditto.
4430
8a4ac37e
PA
44312013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4432
4433 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4434 thread_db.
4435
148de6bb
MS
44362013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4437
4438 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4439 aarch64_num_wp_regs and aarch64_num_bp_regs to
4440 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4441
55fac6e0
MS
44422013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4443
4444 * linux-aarch64-low.c (ps_get_thread_area): Replace
4445 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4446
176eb98c
MS
44472013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4448 Marcus Shawcroft <marcus.shawcroft@arm.com>
4449 Nigel Stephens <nigel.stephens@arm.com>
4450 Yufeng Zhang <yufeng.zhang@arm.com>
4451
4452 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4453 (aarch64.c, aarch64-without-fpu.c): New targets.
4454 * configure.srv (aarch64*-*-linux*): New.
4455 * linux-aarch64-low.c: New file.
4456
56f7af9c
MS
44572013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4458
43aaf8b6 4459 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
4460 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4461 (dequeue_one_deferred_signal, linux_resume_one_thread)
4462 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4463 (linux_tracefork_grandchild, linux_test_for_tracefork)
4464 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4465 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4466 where the argument is 0.
4467
60f662b0
YQ
44682013-01-25 Yao Qi <yao@codesourcery.com>
4469
4470 * event-loop.c: Include "queue.h".
4471 (gdb_event_p): New typedef.
4472 (struct gdb_event) <next_event>: Remove.
4473 (event_queue): Change to QUEUE(gdb_event_p).
4474 (async_queue_event): Remove.
4475 (gdb_event_xfree): New.
4476 (initialize_event_loop): New.
4477 (process_event): Use API from QUEUE.
4478 (wait_for_event): Likewise.
4479 * server.c (main): Call initialize_event_loop.
4480 * server.h (initialize_event_loop): Declare.
4481
5ae4861a
YQ
44822013-01-18 Yao Qi <yao@codesourcery.com>
4483
4484 * ax.h (struct eval_agent_expr_context): New.
4485 (gdb_eval_agent_expr): Update declaration.
4486 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4487 TFRAME. Add new argument CTX.
4488 * server.h (struct eval_agent_expr_context): Declare.
4489 (agent_mem_read, agent_tsv_read): Update declaration.
4490 (agent_mem_read_string): Likewise.
4491 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4492 (add_traceframe_block): Add new argument TPOINT.
4493 Increase TPOINT->traceframe_usage.
4494 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4495 eval_tracepoint_agent_expr.
4496 (condition_true_at_tracepoint): Likewise.
4497 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4498 (agent_mem_read_string, agent_tsv_read): Likewise.
4499
85e00e85
YQ
45002013-01-16 Yao Qi <yao@codesourcery.com>
4501
4502 * linux-low.c (linux_resume_one_lwp): Don't check
4503 'lwp->bp_reinsert != 0'.
4504
4039cf45
JB
45052013-01-07 Joel Brobecker <brobecker@adacore.com>
4506 Pedro Alves <palves@redhat.com>
4507
4508 * lynx-low.c (ptrace_request_to_str): Define a temporary
4509 macro and use it to simplify this function's implementation.
4510
9044dee2
JB
45112013-01-07 Joel Brobecker <brobecker@adacore.com>
4512
4513 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4514 sets errno.
4515
e6352c8f
JB
45162013-01-07 Joel Brobecker <brobecker@adacore.com>
4517
4518 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4519
50681a27
JB
45202013-01-07 Joel Brobecker <brobecker@adacore.com>
4521
4522 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4523
3f6e77ef
JB
45242013-01-07 Joel Brobecker <brobecker@adacore.com>
4525
4526 * lynx-low.c (lynx_resume): Use the resume_info parameter
4527 to determine the ptid for the lynx_ptrace call, unless
4528 it is equal to minus_one_ptid, in which case we use the
4529 ptid of the current_inferior.
4530 (lynx_wait_1): After having received a thread create/exit
4531 event, resume the inferior's execution using the signaling
4532 thread's ptid, rather than the old ptid.
4533
7fda33ae
JB
45342013-01-07 Joel Brobecker <brobecker@adacore.com>
4535
4536 * lynx-low.c (lynx_resume): Delete variable ret.
4537
b9786c74
JB
45382013-01-01 Joel Brobecker <brobecker@adacore.com>
4539
4540 * gdbreplay.c (gdbreplay_version): Update copyright year.
4541 * server.c (gdbserver_version): Likewise.
4542
8b93d60f
JB
45432012-12-17 Joel Brobecker <brobecker@adacore.com>
4544
4545 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4546 new thread.
4547
037335a7
JB
45482012-12-17 Joel Brobecker <brobecker@adacore.com>
4549
4550 * lynx-low.c (ptrace_request_to_str): Add handling for
4551 PTRACE_GETTRACESIG.
4552
52d4cbd8
JB
45532012-12-17 Joel Brobecker <brobecker@adacore.com>
4554
4555 * lynx-low.c (lynx_attach): Delete variable new_process.
4556
ab8f6ca9
JB
45572012-12-17 Joel Brobecker <brobecker@adacore.com>
4558
4559 * lynx-low.c (lynx_create_inferior): Delete variable
4560 new_process.
4561
78cbc024
JB
45622012-12-17 Joel Brobecker <brobecker@adacore.com>
4563
4564 * lynx-low.c (ptrace_request_to_str): Do not handle
4565 PTRACE_GETTHREADLIST if this macro does not exist.
4566
14a00470
YQ
45672012-12-15 Yao Qi <yao@codesourcery.com>
4568
4569 * Makefile.in (OBS): Add notif.o.
4570 * notif.c, notif.h: New.
4571 * server.c: Include "notif.h".
4572 (struct vstop_notif) <next>: Remove.
4573 <base>: New field.
4574 (queue_stop_reply): Update.
4575 (push_event, send_next_stop_reply): Remove.
4576 (discard_queued_stop_replies): Update.
4577 (notif_stop): New variable.
4578 (handle_v_stopped): Remove.
4579 (handle_v_requests): Don't call handle_v_stopped. Call
4580 handle_ack_notif instead.
4581 (queue_stop_reply_callback): Call notif_event_enque instead
4582 of queue_stop_reply.
4583 (handle_status): Don't call send_next_stop_reply, call
4584 notif_write_event instead.
4585 (kill_inferior_callback): Likewise.
4586 (detach_or_kill_inferior_callback): Likewise.
4587 (main): Call initialize_notif.
4588 (process_serial_event): Call QUEUE_is_empty.
4589 (handle_target_event): Call notif_push instead of push event.
4590 * server.h (push_event): Remove declaration.
4591
61c125b9
TT
45922012-12-10 Tom Tromey <tromey@redhat.com>
4593
4594 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4595 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4596 macros.
4597 (.c.o): Rewrite.
4598 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4599 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4600 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4601 (amd64-linux-ipa.o, ax.o): Rewrite.
4602 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4603 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4604 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4605 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4606 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4607 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4608 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4609 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4610 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4611 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4612 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4613 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4614 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4615 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4616 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4617 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4618 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4619 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4620 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4621 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4622 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4623 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4624 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4625 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4626 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4627 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4628 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4629 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4630 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4631 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4632 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4633 (reg-tilegx.o): Remove.
4634 (all_object_files): New macro.
4635 Include .deps files.
4636 * aclocal.m4, configure: Rebuild.
4637 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4638 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4639 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4640
e90e9ad9
TT
46412012-12-05 Tom Tromey <tromey@redhat.com>
4642
4643 PR gdb/14917:
4644 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4645
02d403bf 46462012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
4647
4648 * configure.ac: Check for linux/perf_event.h.
4649 * config.in: Regenerated.
4650 * configure: Regenerated.
4651
0270a750
PA
46522012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4653
4654 * hostio.c (handle_readlink): Decrease buffer size
4655 parameter passed to readlink by one byte.
4656
8c29b58e
YQ
46572012-11-26 Yao Qi <yao@codesourcery.com>
4658
4659 * configure.ac (build_warnings): Append '-Wempty-body'.
4660 * configure: Regenerated.
4661 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4662 body.
4663
8bdce1ff
PM
46642012-11-15 Pierre Muller <muller@sourceware.org>
4665
4666 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4667 * config.in: Regenerate.
4668 * configure: Regenerate.
4669 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4670 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4671 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4672 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4673 header.
4674 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4675 instead of <sys/wait.h> header.
4676 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4677
02d403bf 46782012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
4679
4680 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4681 (various make rules): Remove -DGDBSERVER
4682
fbd5db48
YQ
46832012-11-09 Yao Qi <yao@codesourcery.com>
4684
4685 * spu-low.c (current_ptid): Move it to ..
4686 * gdbthread.h: ... here. New.
4687 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4688 * server.c (myresume, process_serial_event): Likewise.
4689 * thread-db.c (thread_db_find_new_threads): Likewise.
4690 * tracepoint.c (run_inferior_command): Likewise.
4691
b3dc46ff
AB
46922012-10-01 Andrew Burgess <aburgess@broadcom.com>
4693
4694 * server.c (handle_search_memory_1): Include access length in
4695 warning message.
4696
07c04788
HPN
46972012-09-05 Michael Brandt <michael.brandt@axis.com>
4698
4699 * linux-crisv32-low.c: Fix compile errors.
4700
918d227b
YQ
47012012-09-04 Yao Qi <yao@codesourcery.com>
4702
4703 * tracepoint.c (cmd_qtsv): Adjust debug message.
4704 Don't check CUR_TPOINT.
4705
18c1b81a
YQ
47062012-08-28 Yao Qi <yao@codesourcery.com>
4707
4708 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4709 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4710 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4711 Remove declarations of xmalloc, xreallloc, xstrdup and
4712 freeargv.
4713 * Makefile.in (libiberty_h): New.
4714 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4715 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4716
dc82f37b
YQ
47172012-08-23 Yao Qi <yao@codesourcery.com>
4718
4719 * server.h: Remove declaration of 'xsnprintf'.
4720
406b1477
KS
47212012-08-22 Keith Seitz <keiths@redhat.com>
4722
4723 * server.h: Include build-gnulib-gbserver/config.h.
4724 * gdbreplay.c: Likewise.
4725
e6712ff1
DE
47262012-08-08 Doug Evans <dje@google.com>
4727
4728 * Makefile.in (SFILES): Add gdb_vecs.c.
4729 (OBS): Add gdb_vecs.o.
4730 (gdb_vecs_h, host_defs_h): New variables.
4731 (thread-db.o): Add $(gdb_vecs_h) dependency.
4732 (gdb_vecs.o): New rule.
4733 * thread-db.c: #include "gdb_vecs.h".
4734 (thread_db_load_search): Use a vector to iterate over path elements.
4735 Handle text appearing after "$pdir".
4736
4737 * configure.ac: Add check for strstr.
4738 * config.in: Regenerate.
4739 * configure: Regenerate.
4740
7c3270ae
UW
47412012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4742
4743 * hostio.c (handle_pread): If pread fails, fall back to attempting
4744 lseek/read.
4745 (handle_pwrite): Likewise for pwrite.
4746
b62e2b27
UW
47472012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4748
4749 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4750 between unsupported TYPE and unimplementable ADDR/LEN combination.
4751 (arm_insert_point): Act on new return value.
4752
78a99e91
PA
47532012-07-31 Pedro Alves <palves@redhat.com>
4754
4755 * server.c (process_point_options): Only skip tokens if we find
4756 one that is unrecognized. Don't treat 'X' specially while
4757 skipping unrecognized tokens.
4758
fcf303ab
UW
47592012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4760
4761 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4762 to 4-byte-align HW breakpoint addresses for Thumb.
4763
7255706c
YQ
47642012-07-27 Yao Qi <yao@codesourcery.com>
4765
4766 PR remote/14161.
4767
4768 * server.h: Declare gdb_agent_about_to_close.
4769 * target.c (kill_inferior): Include "agent.h".
4770 New. Send command 'kill'.
4771 * target.h (kill_inferior): Removed macro.
4772 * tracepoint.c (gdb_agent_about_to_close): New.
4773 (gdb_agent_helper_thread): Handle command 'close'.
4774 Wait endlessly until the inferior stops.
4775 Install gdb_agent_remove_socket to atexit hook.
4776 (agent_socket_name): New static variable.
4777 (gdb_agent_socket_init): Replace local variable 'name' with
4778 'agent_socket_name'.
4779 (gdb_agent_remove_socket): New.
4780
5a3f286f
YQ
47812012-07-27 Yao Qi <yao@codesourcery.com>
4782
4783 * server.c (process_point_options): Stop at 'X' when parsing.
4784
961bd387
ME
47852012-07-19 Michael Eager <eager@eagercon.com>
4786
a261b8f5 4787 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
4788 to hw_execute.
4789 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4790 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4791 hardware breakpoint.
4792
aa7c7447
JK
47932012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4794
4795 * gdbserver/linux-low.c (initialize_low): Call
4796 linux_ptrace_init_warnings.
4797
7f216e7c
DE
47982012-07-02 Doug Evans <dje@google.com>
4799
4800 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4801 pointer to int.
4802
d3ce09f5
SS
48032012-07-02 Stan Shebs <stan@codesourcery.com>
4804
4805 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4806 (ax.o): Add it to build rule.
4807 (ax-ipa.o): Ditto.
4808 (OBS): Add format.o.
4809 (IPA_OBS): Add format.o.
4810 * server.c (handle_query): Claim support for breakpoint commands.
4811 (process_point_options): Add command case.
4812 (process_serial_event): Leave running if there are printfs in
4813 effect.
4814 * mem-break.h (any_persistent_commands): Declare.
4815 (add_breakpoint_commands): Declare.
4816 (gdb_no_commands_at_breakpoint): Declare.
4817 (run_breakpoint_commands): Declare.
4818 * mem-break.c (struct point_command_list): New struct.
4819 (struct breakpoint): New field command_list.
4820 (any_persistent_commands): New function.
4821 (add_commands_to_breakpoint): New function.
4822 (add_breakpoint_commands): New function.
4823 (gdb_no_commands_at_breakpoint): New function.
4824 (run_breakpoint_commands): New function.
4825 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4826 locally.
4827 * ax.c: Include format.h.
4828 (ax_printf): New function.
4829 (gdb_eval_agent_expr): Add printf opcode.
4830
2f8f6aed
YQ
48312012-06-13 Yao Qi <yao@codesourcery.com>
4832
4833 * server.c (start_inferior): Remove duplicated writes to fields
4834 'last_resume_kind' and 'last_status' of 'current_inferior'.
4835
0c9070b3
YQ
48362012-06-12 Yao Qi <yao@codesourcery.com>
4837 Pedro Alves <palves@redhat.com>
4838
4839 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4840 comment.
4841 * server.c (handle_v_cont): Extend comment.
4842
c52daf70
YQ
48432012-06-11 Yao Qi <yao@codesourcery.com>
4844
4845 * linux-low.c (linux_attach): Add 'static'.
4846
d38bbb0a
YQ
48472012-06-06 Yao Qi <yao@codesourcery.com>
4848
4849 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4850
89dc0afd
JK
48512012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4852
4853 Fix gcc -flto compilation warning.
4854 * server.c (main): Make variable multi_mode and attach volatile.
4855
75f62ce7
TJB
48562012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4857
4858 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4859 if the platform doesn't know about it.
4860
65f479b6
PA
48612012-05-30 Jeff Kenton <jkenton@tilera.com>
4862
4863 * Makefile.in (SFILES): Add linux-tile-low.c.
4864 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4865 * configure.srv: Handle tilegx-*-linux*.
4866 * linux-tile-low.c: New file.
4867
0c5bf5a9
JK
48682012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4869
4870 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4871
a493e3e2
PA
48722012-05-24 Pedro Alves <palves@redhat.com>
4873
4874 PR gdb/7205
4875
43aaf8b6 4876 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 4877
2ea28649
PA
48782012-05-24 Pedro Alves <palves@redhat.com>
4879
4880 PR gdb/7205
4881
4882 Replace target_signal with gdb_signal throughout.
4883
8d409d16
MR
48842012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4885
4886 * linux-low.c (linux_store_registers): Avoid the copying sequence
4887 when no data has been retrieved by ptrace.
4888
23512c01
MGD
48892012-05-22 Will Deacon <will.deacon@arm.com>
4890
4891 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4892 Include asm/ptrace.h.
4893 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4894 already defined.
4895
4934b29e
MR
48962012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4897
4898 * linux-low.c (linux_store_registers): Don't re-retrieve data
4899 with ptrace that has already been obtained from /proc. Always
4900 copy any data retrieved with ptrace to the buffer supplied.
4901
bde24c0a
PA
49022012-05-11 Yao Qi <yao@codesourcery.com>
4903 Pedro Alves <palves@redhat.com>
4904
4905 * linux-low.c (enum stopping_threads_kind): New.
4906 (stopping_threads): Change type to `enum stopping_threads_kind'.
4907 (handle_extended_wait): If stopping and suspending threads, leave
4908 the new_lwp suspended too.
4909 (linux_wait_for_event): Adjust.
4910 (stop_all_lwps): Set `stopping_threads' to
4911 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4912 whether we're suspending threads or just stopping them. Assert no
4913 recursion happens.
4914
623b6bdf
YQ
49152012-04-29 Yao Qi <yao@codesourcery.com>
4916
4917 * server.h: Move some code to ...
4918 * gdbthread.h: ... here. New.
4919 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4920 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4921 (nto-low.o, win32-low.o): Likewise.
4922 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4923 * regcache.c, remote-utils.c, server.c: Likewise.
4924 * target.c, tracepoint.c, win32-low.c: Likewise.
4925
f15f9948
TJB
49262012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4927
4928 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4929 (PTRACE_ARG4_TYPE): Likewise.
4930 (PTRACE_XFER_TYPE): Likewise.
4931 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4932 ptrace to PTRACE_ARG3_TYPE.
4933 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4934 (PTRACE_ARG4_TYPE): Likewise.
4935 (PTRACE_XFER_TYPE): Likewise.
4936 (linux_detach_one_lwp): Cast fourth argument of
4937 ptrace to long then PTRACE_ARG4_TYPE.
4938 (regsets_fetch_inferior_registers): Cast third argument of
4939 ptrace to long then PTRACE_ARG3_TYPE.
4940 (regsets_store_inferior_registers): Likewise.
4941
38ea300a
PA
49422012-04-20 Pedro Alves <palves@redhat.com>
4943
4944 * configure: Regenerate.
4945
c971b7fa
PA
49462012-04-19 Pedro Alves <palves@redhat.com>
4947
43aaf8b6 4948 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 4949 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
4950 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4951 (all, install-only, uninstall, clean-info, all-lib, clean): No
4952 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4953 (maintainer-clean realclean distclean): Use subdir_do.
4954 (subdir_do): New.
4955 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 4956 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
4957 * acinclude.m4: Include acx_configure_dir.m4.
4958 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4959 calls. Call AC_PROG_RANLIB. Configure gnulib using
4960 ACX_CONFIGURE_DIR.
4961 (GNULIB): New.
4962 (GNULIB_STDINT_H): Adjust.
4963 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4964 * gdbreplay.c: Include build-gnulib/config.h.
4965 * server.h: Likewise.
4966 * aclocal.m4: Regenerate.
4967 * config.in: Regenerate.
4968 * configure: Regenerate.
c971b7fa 4969
809277f8
PA
49702012-04-19 Pedro Alves <palves@redhat.com>
4971
4972 * Makefile.in (LIBGNU, INCGNU): Adjust.
4973 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4974 (all, install-only, uninstall, clean-info, all-lib, clean)
4975 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4976 * configure.ac: Adjust AC_OUTPUT output.
4977 * aclocal.m4: Regenerate.
4978 * configure: Regenerate.
4979
fd9bb8b8
PA
49802012-04-19 Pedro Alves <palves@redhat.com>
4981
4982 * Makefile.in (generated_files): New.
4983 (server_h): Remove the explicit dependency on config.h, and depend
4984 on $generated_files.
4985
1c298c66
PA
49862012-04-19 Pedro Alves <palves@redhat.com>
4987
4988 * Makefile.in (INCGNU): Add -Ignulib.
4989
57c4b50b
PA
49902012-04-19 Pedro Alves <palves@redhat.com>
4991
4992 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4993 (INCGNU): ... this, and spell out -I here.
4994 (GNULIB_LIB): Rename to ...
4995 (LIBGNU): ... this.
4996 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4997
1030e047
PA
49982012-04-19 Pedro Alves <palves@redhat.com>
4999
5000 * config.in: Regenerate.
5001
447d4319
PA
50022012-04-19 Pedro Alves <palves@redhat.com>
5003
5004 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5005 * server.h (memmem): Remove declaration.
5006 * config.in: Regenerate.
5007 * configure: Regenerate.
5008
aad9eab9
YQ
50092012-04-19 Yao Qi <yao@codesourcery.com>
5010
5011 * Makefile.in (SFILES): Add common/vec.c.
5012 (OBS): Add vec.o.
5013 (vec.o): New rule.
5014
3e10640f
YQ
50152012-04-19 Yao Qi <yao@codesourcery.com>
5016
5017 * remote-utils.c (prepare_resume_reply): Replace with macro
5018 target_core_of_thread.
5019 * server.c (handle_qxfer_threads_proper): Likewise.
5020 * target.h (traget_core_of_thread): New macro.
5021
71622373
PA
50222012-04-18 Pedro Alves <palves@redhat.com>
5023
5024 * aclocal.m4: Regenerate.
5025 * configure: Regenerate.
5026
80d26939
YQ
50272012-04-16 Yao Qi <yao@codesourcery.com>
5028
5029 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5030 duplicated on address.
5031
42476b70
YQ
50322012-04-16 Yao Qi <yao@codesourcery.com>
5033
5034 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5035 (struct tracepoint_action_ops) <send>: New field.
5036 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5037 (agent_expr_send, x_tracepoint_action_send): New.
5038 (l_tracepoint_action_send): New.
5039 (cmd_qtdp): Download and install tracepoint
5040 according to `use_agent'.
5041 (run_inferior_command): Add one more parameter `len'.
5042 Update callers.
5043 (tracepoint_send_agent): New.
5044 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5045
7bc83639
YQ
50462012-04-16 Yao Qi <yao@codesourcery.com>
5047
5048 * tracepoint.c (download_tracepoints): Moved to ...
5049 (cmd_qtstart): ... here.
5050
5f18041e
YQ
50512012-04-14 Yao Qi <yao@codesourcery.com>
5052
5053 * tracepoint.c: Include inttypes.h.
5054 (struct collect_memory_action): Use sized types.
5055 (struct tracepoint): Likewise.
5056 (cmd_qtdp, stop_tracing): Update print specifiers.
5057 (cmd_qtp, response_tracepoint): Likewise.
5058 (collect_data_at_tracepoint): Likewise.
5059 (collect_data_at_step): Likewise.
5060
55a8c076
YQ
50612012-04-14 Yao Qi <yao@codesourcery.com>
5062
5063 Import gnulib module inttypes.
5064 * aclocal.m4, config.in, configure: Regenerated.
5065
dc750257
YQ
50662012-04-14 Yao Qi <yao@codesourcery.com>
5067
5068 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5069 Makefile and config.status at last.
5070
0ab5faf9
YQ
50712012-04-13 Yao Qi <yao@codesourcery.com>
5072
5073 * tracepoint.c: Include stdint.h unconditionally.
5074
18f5fd81
TJB
50752012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5076
5077 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5078 on BFD_HAVE_SYS_PROCFS_TYPE.
5079 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5080 * configure: Regenerate.
5081 * config.in: Likewise.
5082
4d47af5c
L
50832012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5084
5085 * Makefile.in (clean): Also remove x32.c x32-linux.c
5086 x32-avx.c x32-avx-linux.c.
5087 (x32.o): New target.
5088 (x32.c): Likewise.
5089 (x32-linux.o): Likewise.
5090 (x32-linux.c): Likewise.
5091 (x32-avx.o): Likewise.
5092 (x32-avx.c): Likewise.
5093 (x32-avx-linux.o): Likewise.
5094 (x32-avx-linux.c): Likewise.
5095
5096 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5097 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5098 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5099 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5100 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5101 i386/x32-avx-linux.xml.
5102
5103 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5104 (init_registers_x32_avx_linux): Likwise.
5105 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5106 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5107
ecedbe58
PA
51082012-04-13 Pedro Alves <palves@redhat.com>
5109
5110 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5111 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5112 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5113 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5114 the sub-make.
5115
c92b5177
L
51162012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5117
5118 * linux-x86-low.c (compat_x32_clock_t): New.
5119 (compat_x32_siginfo_t): Likewise.
5120 (compat_x32_siginfo_from_siginfo): Likewise.
5121 (siginfo_from_compat_x32_siginfo): Likewise.
5122 (linux_is_elf64): Likewise.
5123 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5124 and siginfo_from_compat_x32_siginfo for x32.
5125 (x86_arch_setup): Set linux_is_elf64.
5126
214d508e
L
51272012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5128
5129 PR gdb/13969
5130 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5131 e_machine field.
5132 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5133 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5134 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5135 compatible with process.
5136
c9a1864a
YQ
51372012-04-12 Yao Qi <yao@codesourcery.com>
5138
5139 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5140 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5141 (install-only, install-info, clean): Handle sub dir gnulib.
5142 (all-lib, am--refresh): New targets.
5143 (memmem.o): Remove target.
5144 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5145 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5146 (AC_REPLACE_FUNCS): Remove memmem.
5147 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5148 (AC_OUTPUT): Generate Makefile in gnulib/.
5149 * aclocal.m4, config.in, configure: Regenerated.
5150
367ba2c2
MR
51512012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5152
5153 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5154
9d236627
PA
51552012-04-05 Pedro Alves <palves@redhat.com>
5156
5157 -Werror=strict-aliasing
5158
5159 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5160 pointer.
5161
111217b3
PA
51622012-04-04 Pedro Alves <palves@redhat.com>
5163
5164 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5165 (sparc_store_gregset_from_stack, sparc_store_gregset)
5166 (sparc_breakpoint_at): Fix formatting.
5167
8365dcf5
TJB
51682012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5169
5170 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5171 are available.
5172 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5173 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5174 * config.in: Regenerate.
5175 * configure: Likewise.
5176
689cc2ae
PA
51772012-03-29 Pedro Alves <palves@redhat.com>
5178
5179 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5180 Correct ptrace arguments.
5181
c14dfd32
PA
51822012-03-28 Pedro Alves <palves@redhat.com>
5183
5184 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5185 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5186 (IA64_FR1_REGNUM): New defines.
5187 (ia64_fetch_register): New.
5188 (the_low_target): Install it.
5189 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5190 field.
5191 * linux-low.c (linux_fetch_registers): Try the
5192 the_low_target.fetch_register hook first.
5193
5194 * linux-arm-low.c (the_low_target): Adjust.
5195 * linux-bfin-low.c (the_low_target): Adjust.
5196 * linux-cris-low.c (the_low_target): Adjust.
5197 * linux-crisv32-low.c (the_low_target): Adjust.
5198 * linux-m32r-low.c (the_low_target): Adjust.
5199 * linux-m68k-low.c (the_low_target): Adjust.
5200 * linux-mips-low.c (the_low_target): Adjust.
5201 * linux-ppc-low.c (the_low_target): Adjust.
5202 * linux-s390-low.c (the_low_target): Adjust.
5203 * linux-sh-low.c (the_low_target): Adjust.
5204 * linux-sparc-low.c (the_low_target): Adjust.
5205 * linux-tic6x-low.c (the_low_target): Adjust.
5206 * linux-x86-low.c (the_low_target): Adjust.
5207 * linux-xtensa-low.c (the_low_target): Adjust.
5208
63c88e13
PA
52092012-03-26 Pedro Alves <palves@redhat.com>
5210
5211 * server.c (handle_qxfer_libraries): Don't bail early if
5212 the_target->qxfer_libraries_svr4 is not NULL.
5213
fb723180
PA
52142012-03-26 Pedro Alves <palves@redhat.com>
5215
5216 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5217
0afae3cf
PA
52182012-03-23 Pedro Alves <palves@redhat.com>
5219
5220 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5221 "library-list-svr4" element's start tag when the the DSO list is
5222 empty.
5223
485f1ee4
PA
52242012-03-23 Pedro Alves <palves@redhat.com>
5225
5226 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5227 a variable whose type size is the same as the inferior's pointer
5228 size.
5229
a5362b9a
TS
52302012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5231
5232 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5233 struct siginfo.
5234 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5235 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5236 * linux-low.h: Include <signal.h>.
5237 (struct siginfo): Remove forward declaration.
5238 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5239 struct siginfo.
5240
d226c142
MF
52412012-03-21 Mike Frysinger <vapier@gentoo.org>
5242
5243 * .gitignore: Ignore more files.
5244
122f36ef
PA
52452012-03-19 Pedro Alves <palves@redhat.com>
5246 Jan Kratochvil <jan.kratochvil@redhat.com>
5247
5248 * server.c (cont_thread, general_thread): Add describing comments.
5249 (start_inferior): Clear `cont_thread'.
5250 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5251 of a process.
5252
fc3e5175
YQ
52532012-03-15 Yao Qi <yao@codesourcery.com>
5254
5255 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5256 handling to ...
5257 (cmd_qtdp): ... here.
5258
8d0d92cd
YQ
52592012-03-15 Yao Qi <yao@codesourcery.com>
5260
5261 * tracepoint.c (struct tracepoint_action_ops): New.
5262 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5263 (m_tracepoint_action_download): New.
5264 (r_tracepoint_action_download): New.
5265 (x_tracepoint_action_download): New.
5266 (l_tracepoint_action_download): New.
5267 (add_tracepoint_action): Install `action->ops' according type.
5268 (download_tracepoint_1): Move code `download' function pointer
5269 of various tracepoint_action_ops.
5270
87b0bb13
JK
52712012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5272
5273 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5274 linux_ptrace_attach_warnings.
5275
5f572dec
JK
52762012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5277
5278 * Makefile.in (linux-ptrace.o): New.
5279 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5280 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5281 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5282 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5283 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5284 of these targets.
5285 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5286
f4647387
YQ
52872012-03-08 Yao Qi <yao@codesourcery.com>
5288 Pedro Alves <palves@redhat.com>
5289
5290 Fix PR server/13392.
5291 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5292 offset of JMP insn.
5293 * tracepoint.c (remove_tracepoint): New.
5294 (cmd_qtdp): Call remove_tracepoint when failed to install.
5295
9b224c5e
PA
52962012-03-07 Pedro Alves <palves@redhat.com>
5297
5298 * linux-low.c (get_detach_signal): New.
5299 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5300 Pass on pending signals to PTRACE_DETACH. Check the result of the
5301 ptrace call.
5302 * server.c (program_signals, program_signals_p): New.
5303 (handle_general_set): Handle QProgramSignals.
5304 * server.h (program_signals, program_signals_p): Declare.
5305
e237a7e2
JK
53062012-03-05 Pedro Alves <palves@redhat.com>
5307 Jan Kratochvil <jan.kratochvil@redhat.com>
5308
5309 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5310 New comment why.
5311
5808517f
YQ
53122012-03-03 Yao Qi <yao@codesourcery.com>
5313
5314 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5315 agent_look_up_symbols.
5316
58b4daa5
YQ
53172012-03-03 Yao Qi <yao@codesourcery.com>
5318
5319 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5320 (linux-x86-low.o): Likewise.
5321 * server.h: Remove in_process_agent_loaded.
5322 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5323 common/agent.c.
5324 Update callers.
5325
8ffcbaaf
YQ
53262012-03-03 Yao Qi <yao@codesourcery.com>
5327
5328 * tracepoint.c (gdb_agent_capability): New global.
5329 (in_process_agent_loaded_ust): Renamed to
5330 `in_process_agent_supports_ust'.
5331 Update callers.
5332 (in_process_agent_supports_ust): Call agent_capability_check.
5333 (clear_installed_tracepoints): Assert that agent supports
5334 agent.
5335
d1feda86
YQ
53362012-03-03 Yao Qi <yao@codesourcery.com>
5337
5338 * linux-low.c (linux_supports_agent): New.
5339 (linux_target_ops): Initialize field `supports_agent' with
5340 linux_supports_agent.
5341 * target.h (struct target_ops) <supports_agent>: New.
5342 (target_supports_agent): New macro.
5343 * server.c (handle_general_set): Handle packet 'QAgent'.
5344 (handle_query): Send `QAgent+'.
5345 * Makefile.in (server.o): Depends on agent.h.
5346
2fa291ac
YQ
53472012-03-03 Yao Qi <yao@codesourcery.com>
5348
5349 * Makefile.in (OBS): Add agent.o.
5350 Add new rule for agent.o.
5351 Track dependence of tracepoint.c on agent.h.
5352 * tracepoint.c (run_inferior_command_1):
5353 (run_inferior_command): Call agent_run_command.
5354 (gdb_ust_connect_sync_socket): Deleted. Move it to
5355 common/agent.c.
5356 (resume_thread, stop_thread): Likewise.
5357 (gdb_ust_socket_init): Renamed to ...
5358 (gdb_agent_socket_init): ... New.
5359 (gdb_ust_thread): Renamed to ...
5360 (gdb_agent_helper_thread): ... New.
5361 (gdb_ust_init): Move some code to ...
5362 (gdb_agent_init): ... here. New.
5363 [HAVE_UST]: Call gdb_ust_init.
5364 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5365 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5366 * config.in, configure: Regenerated.
5367
05044653
PA
53682012-03-02 Pedro Alves <palves@redhat.com>
5369
5370 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5371 * linux-low.c (struct simple_pid_list): New.
5372 (stopped_pids): New a struct simple_pid_list pointer.
5373 (add_to_pid_list, pull_pid_from_list): New.
5374 (handle_extended_wait): Don't assume the first signal new children
5375 report is SIGSTOP. Adjust call to pull_pid_from_list.
5376 (linux_wait_for_lwp): Adjust.
5377
8d00225b
YQ
53782012-03-02 Yao Qi <yao@codesourcery.com>
5379
5380 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5381 debug log.
5382
19560ba5
YQ
53832012-03-02 Yao Qi <yao@codesourcery.com>
5384
5385 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5386 `stop_pc' and `tpoint'. Update caller.
5387
1faeff08
MR
53882012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5389
5390 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5391 * linux-low.c (use_linux_regsets): New macro.
5392 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5393 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5394 (linux_register_in_regsets): New function.
5395 (usr_fetch_inferior_registers): Skip registers covered by
5396 regsets.
5397 (usr_store_inferior_registers): Likewise.
5398 (usr_fetch_inferior_registers): New macro.
5399 (usr_store_inferior_registers): Likewise.
5400 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5401 (linux_store_registers): Likewise.
5402 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5403 prototype.
5404 (init_registers_mips64_dsp_linux): Likewise.
5405 (init_registers_mips_linux): New macro.
5406 (init_registers_mips_dsp_linux): Likewise.
5407 (mips_dsp_num_regs): Likewise.
5408 (DSP_BASE, DSP_CONTROL): New fallback macros.
5409 (mips_base_regs): New macro.
5410 (mips_regmap): Use it. Fix the size.
5411 (mips_dsp_regmap): New variable.
5412 (mips_dsp_regset_bitmap): Likewise.
5413 (mips_arch_setup): New function.
5414 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5415 than mips_regmap.
5416 (mips_cannot_store_register): Likewise.
5417 (the_low_target): Update .arch_setup, .num_regs and .regmap
5418 initializers. Add .regset_bitmap initializer.
5419 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5420 initializer.
5421 * linux-bfin-low.c (the_low_target): Likewise.
5422 * linux-cris-low.c (the_low_target): Likewise.
5423 * linux-crisv32-low.c (the_low_target): Likewise.
5424 * linux-ia64-low.c (the_low_target): Likewise.
5425 * linux-m32r-low.c (the_low_target): Likewise.
5426 * linux-m68k-low.c (the_low_target): Likewise.
5427 * linux-ppc-low.c (the_low_target): Likewise.
5428 * linux-s390-low.c (the_low_target): Likewise.
5429 * linux-sh-low.c (the_low_target): Likewise.
5430 * linux-sparc-low.c (the_low_target): Likewise.
5431 * linux-tic6x-low.c (the_low_target): Likewise.
5432 * linux-x86-low.c (the_low_target): Likewise.
5433 * linux-xtensa-low.c (the_low_target): Likewise.
5434 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5435 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5436 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5437 srv_xmlfiles.
5438 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5439 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5440
c03e6ccc
YQ
54412012-02-29 Yao Qi <yao@codesourcery.com>
5442 Pedro Alves <palves@redhat.com>
5443
5444 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5445 `step_over_finished' is true.
5446
644cebc9
PA
54472012-02-27 Pedro Alves <palves@redhat.com>
5448
5449 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5450 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5451
c14d7ab2
PA
54522012-02-27 Pedro Alves <palves@redhat.com>
5453
5454 PR server/9684
5455 * linux-low.c (pid_is_stopped): New.
5456 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5457
412c89dd
LM
54582012-02-25 Luis Machado <lgustavo@codesourcery.com>
5459
5460 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5461 of conditions.
5462
b745defe
MR
54632012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5464
5465 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5466
9f3a5c85
LM
54672012-02-24 Luis Machado <lgustavo@codesourcery>
5468
5469 * server.c (handle_query): Advertise support for target-side
5470 breakpoint condition evaluation.
5471 (process_point_options): New function.
5472 (process_serial_event): When inserting a breakpoint, check for
5473 a target-side condition that should be evaluated.
5474
5475 * mem-break.c: Include regcache.h and ax.h.
5476 (point_cond_list_t): New data structure.
5477 (breakpoint) <cond_list>: New field.
5478 (find_gdb_breakpoint_at): Make non-static.
5479 (delete_gdb_breakpoint_at): Clear any target-side
5480 conditions.
5481 (clear_gdb_breakpoint_conditions): New function.
5482 (add_condition_to_breakpoint): Likewise.
5483 (add_breakpoint_condition): Likewise.
5484 (gdb_condition_true_at_breakpoint): Likewise.
5485 (gdb_breakpoint_here): Return result directly instead
5486 of going through a local variable.
5487
5488 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5489 (clear_gdb_breakpoint_conditions): Likewise.
5490 (add_breakpoint_condition): Likewise.
5491 (gdb_condition_true_at_breakpoint): Likewise.
5492
5493 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5494 (need_step_over_p): Take target-side breakpoint condition into
5495 consideration.
5496
5e1dc496
LM
54972012-02-24 Luis Machado <lgustavo@codesourcery>
5498
5499 * server.h: Include tracepoint.h.
5500 (agent_mem_read, agent_get_trace_state_variable_value,
5501 agent_set_trace_state_variable_value,
5502 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5503 get_set_tsv_func_addr): New prototypes.
5504
5505 * ax.h: New include file.
5506 * ax.c: New source file.
5507
5508 * tracepoint.c: Include ax.h.
5509 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5510 agent_expr, eval_result_type): Move to ax.h.
5511 (parse_agent_expr): Rename to ...
5512 (gdb_parse_agent_expr): ... this, make it non-static and move
5513 to ax.h.
5514 (unparse_agent_expr) Rename to ...
5515 (gdb_unparse_agent_expr): ... this, make it non-static and move
5516 to ax.h.
5517 (eval_agent_expr): Rename to ...
5518 (eval_tracepoint_agent_expr): ... this.
5519 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5520 forward declarations.
5521 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5522 (agent_get_trace_state_variable_value): New function.
5523 (agent_set_trace_state_variable_value): New function.
5524 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5525 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5526 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5527 (condition_true_at_tracepoint): Likewise.
5528 (parse_agent_expr): Rename to ...
5529 (gdb_parse_agent_expr): ... this and move to ax.c.
5530 (unparse_agent_expr): Rename to ...
5531 (gdb_unparse_agent_expr): ... this and move to ax.c.
5532 (gdb_agent_op_name): Move to ax.c.
5533 (eval_agent_expr): Rename to ...
5534 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5535 and move to ax.c.
5536 (eval_tracepoint_agent_expr): New function.
5537 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 5538 non-static.
5e1dc496
LM
5539 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5540 ax.c.
5541 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5542 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5543 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5544 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5545 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5546 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5547 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5548 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5549 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5550 (compile_bytecodes): Remove forward declaration.
5551 (is_goto_target): Move to ax.c.
5552 (compile_bytecodes): Move to ax.c and call
5553 agent_get_trace_state_variable_value (...) and
5554 agent_set_trace_state_variable_value (...).
5555
5556 * Makefile.in: Update ax.c and IPA dependencies.
5557
277e4e52
PA
55582012-02-24 Pedro Alves <palves@redhat.com>
5559
5560 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5561 (cmd_bigqtbuffer_circular): ... this. Only handle
5562 'QTBuffer:circular:'.
5563 (handle_tracepoint_general_set): Adjust.
5564
bf4c19f7
YQ
55652012-02-16 Yao Qi <yao@codesourcery.com>
5566
5567 * inferiors.c: Move code to ...
5568 * dll.c: .... here. New.
5569 * server.h: Declare clear_dlls.
5570 * Makefile.in (SFILES): Add dll.c.
5571 (OBS): Add dll.o
5572 (dll.o): New rule.
5573
d73f2619
YQ
55742012-02-11 Yao Qi <yao@codesourcery.com>
5575
5576 * server.c: (handle_monitor_command): Add a new parameter
5577 `own_buf'.
5578 (handle_query): Update caller.
5579
f8255c2a
JB
55802012-02-09 Joel Brobecker <brobecker@adacore.com>
5581
5582 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5583 * configure, config.in: Regenerate.
5584 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5585 is not defined.
5586
da84f473
PA
55872012-02-02 Pedro Alves <palves@redhat.com>
5588
5589 Try SIGKILL first, then PTRACE_KILL.
5590 * linux-low.c (linux_kill_one_lwp): New.
5591 (linux_kill_one_lwp): Rename to ...
5592 (kill_one_lwp_callback): ... this. Use the new
5593 linux_kill_one_lwp.
5594
e886a173
PA
55952012-02-02 Pedro Alves <palves@redhat.com>
5596
5597 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5598 inferior.
5599
be07f1a2
PA
56002012-01-27 Pedro Alves <palves@redhat.com>
5601
5602 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5603 (elf_64_file_p): Make static.
5604 (linux_pid_exe_is_elf_64_file): New.
5605 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5606 Delete declarations.
5607 (linux_pid_exe_is_elf_64_file): Declare.
5608 * linux-x86-low.c (x86_arch_setup): Use
5609 linux_pid_exe_is_elf_64_file.
5610
d8301ad1
JK
56112012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5612
5613 * linux-low.c (linux_wait_for_event_1): Rename to ...
5614 (linux_wait_for_event): ... here and merge it with former
5615 linux_wait_for_event - new variable wait_ptid, use it.
5616 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5617
01b17894
PA
56182012-01-23 Pedro Alves <palves@redhat.com>
5619
5620 * server.c (main): Avoid yet another case of infinite loop while
5621 detaching/killing after a longjmp.
5622
e825046f
JK
56232012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5624
5625 Code cleanup.
5626 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5627
b9e7b9c3
UW
56282012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5629
5630 * hostio.c (handle_readlink): New function.
5631 (handle_vFile): Call it to handle "vFile:readlink" packets.
5632
901f9912
UW
56332012-01-20 Pedro Alves <palves@redhat.com>
5634 Ulrich Weigand <ulrich.weigand@linaro.org>
5635
5636 * server.c (handle_v_requests): Only support vAttach and vRun to
5637 start multiple processes when in extended protocol mode.
5638
fc1ab1a0
PA
56392012-01-17 Pedro Alves <palves@redhat.com>
5640
5641 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5642 memalign plus mprotect to allocate the scratch buffer.
5643
7d5d4e98
PA
56442012-01-13 Pedro Alves <palves@redhat.com>
5645
5646 * server.c (attach_inferior): Clear `cont_thread'.
5647
f128d5e9
PA
56482012-01-13 Pedro Alves <palves@redhat.com>
5649
5650 * server.c (main): Avoid infinite loop while detaching/killing
5651 after a longjmp.
5652
06db92f0
DE
56532012-01-09 Doug Evans <dje@google.com>
5654
5655 * server.c (start_inferior): Set last_ptid in --wrapper case.
5656
32d92999
YQ
56572012-01-06 Yao Qi <yao@codesourcery.com>
5658
5659 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5660 defined.
5661 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5662
5e0a92a9
YQ
56632012-01-04 Yao Qi <yao@codesourcery.com>
5664
5665 * tracepoint.c (cmd_qtdp): Print debug message
5666 for static tracepoint.
5667
ae639e8c
YQ
56682012-01-04 Yao Qi <yao@codesourcery.com>
5669
5670 * tracepoint.c (trace_vdebug): Differentiate debug message
5671 between gdbserver and IPA.
5672
f72429c5
YQ
56732012-01-03 Yao Qi <yao@codesourcery.com>
5674
5675 * tracepoint.c (tracepoint_was_hit): Don't collect for
5676 static tracepoint.
5677
12c3e59c
JB
56782012-01-02 Joel Brobecker <brobecker@adacore.com>
5679
5680 * terminal.h: Reformat copyright header.
5681
67827812
JB
56822012-01-02 Joel Brobecker <brobecker@adacore.com>
5683
5684 * server.c (gdbserver_version): Update copyright year.
5685 * gdbreplay.c (gdbreplay_version): Likewise.
5686
3e52c33d
JK
56872011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5688
5689 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5690
5691 Revert:
5692 2011-12-18 Hui Zhu <teawater@gmail.com>
5693 * linux-low.c (linux_create_inferior): Save return value to ret.
5694
66f1260e
HZ
56952011-12-18 Hui Zhu <teawater@gmail.com>
5696
5697 * linux-low.c (linux_create_inferior): Save return value to ret.
5698
e77616d7
DE
56992011-12-16 Doug Evans <dje@google.com>
5700
e7b06c57
DE
5701 * linux-low.c (linux_create_inferior): If stdio connection,
5702 redirect stdin from /dev/null, stdout to stderr.
5703 * remote-utils.c (remote_is_stdio): New static global.
5704 (remote_connection_is_stdio): New function.
5705 (remote_prepare): Handle stdio connection.
5706 (remote_open): Ditto.
5707 (remote_close): Don't close stdin for stdio connections.
5708 (read_prim,write_prim): New functions. Replace all calls to
5709 read/write to these.
5710 * server.c (main): Watch for "-" argument. Move call to
5711 remote_prepare before start_inferior.
5712 * server.h (STDIO_CONNECTION_NAME): New macro.
5713 (remote_connection_is_stdio): Declare.
5714
e77616d7
DE
5715 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5716 in debugging output.
5717
82067193
YQ
57182011-12-15 Yao Qi <yao@codesourcery.com>
5719
5720 * tracepoint.c: Include sys/syscall.h.
5721 (gdb_ust_thread): Remove preprocessor conditional.
5722
82bfbe7e
PA
57232011-12-14 Pedro Alves <pedro@codesourcery.com>
5724
5725 * linux-low.c (linux_detach_one_lwp): Call
5726 the_low_target.prepare_to_resume before detaching.
5727
712c6575
YQ
57282011-12-14 Yao Qi <yao@codesourcery.com>
5729
5730 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5731 of write.
5732
d54d1edf
YQ
57332011-12-14 Yao Qi <yao@codesourcery.com>
5734
5735 * i386-low.c (i386_low_stopped_data_address): Initialize local
5736 variable `control'.
5737
6210a125
PA
57382011-12-13 Pedro Alves <pedro@codesourcery.com>
5739
5740 PR remote/13492
5741
5742 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5743 DR_CONTROL unless necessary. Extend comments.
5744 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5745 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5746
2ece8244
YQ
57472011-12-13 Yao Qi <yao@codesourcery.com>
5748
5749 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5750 macros.
5751 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5752
784867a5
JK
57532011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5754
5755 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5756 Print new debug message for such case.
5757
6bf36717
JK
57582011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5759
5760 Fix overlapping memcpy.
5761 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5762 the read_inferior_memory transfer.
5763 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5764 write_inferior_memory transfer.
5765 (set_fast_tracepoint_jump): New variable buf. Use it for the
5766 read_inferior_memory and write_inferior_memory transfers.
5767 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5768 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5769 Use it for the write_inferior_memory transfer.
5770 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5771 buffers.
5772
50275556
MR
57732011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5774
5775 * linux-low.c (fetch_register, store_register): Make code
5776 consistent, fix formatting.
5777
7325beb4
MR
57782011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5779
5780 * linux-low.c (usr_store_inferior_registers): Factor out code
5781 to handle individual registers into...
5782 (store_register): ... this new function.
5783
c642a434
UW
57842011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5785
5786 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5787 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5788 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5789 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5790 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5791 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5792 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5793 (srv_xmlfiles): Add new XML files.
5794
5795 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5796 and <sys/uio.h>.
5797 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5798 (init_registers_s390_linux32v1): Add prototype.
5799 (init_registers_s390_linux32v2): Likewise.
5800 (init_registers_s390_linux64v1): Likewise.
5801 (init_registers_s390_linux64v2): Likewise.
5802 (init_registers_s390x_linux64v1): Likewise.
5803 (init_registers_s390x_linux64v2): Likewise.
5804 (s390_num_regs): Increment to 52.
5805 (s390_regmap): Add orig_r2 register.
5806 (s390_num_regs_3264): Increment to 68.
5807 (s390_regmap_3264): Add orig_r2 register.
5808 (s390_collect_ptrace_register): Handle orig_r2 register.
5809 (s390_supply_ptrace_register): Likewise.
5810 (s390_fill_last_break): New function.
5811 (s390_store_last_break): Likewise.
5812 (s390_fill_system_call): New function.
5813 (s390_store_system_call): Likewise.
5814 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5815 register sets.
5816 (s390_check_regset): New function.
5817 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5818 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5819 Update target_regsets for available register sets.
5820
2268b414
JK
58212011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5822 Jan Kratochvil <jan.kratochvil@redhat.com>
5823
5824 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5825 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5826 New.
5827 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5828 * linux-low.h (struct process_info_private): New member r_debug.
5829 * server.c (handle_qxfer_libraries): Call
5830 the_target->qxfer_libraries_svr4.
5831 (handle_qxfer_libraries_svr4): New function.
5832 (qxfer_packets): New entry "libraries-svr4".
5833 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5834 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5835 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5836 PACKET_qXfer_libraries_svr4.
5837
d6db1fab
UW
58382011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5839
5840 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5841 PSW address/mask between 8-byte and 16-byte formats.
5842 (s390_supply_ptrace_register): Likewise.
5843 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5844 basic addressing mode bit.
5845
242f5f1c
SS
58462011-11-24 Stan Shebs <stan@codesourcery.com>
5847
5848 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5849
f196051f
SS
58502011-11-17 Stan Shebs <stan@codesourcery.com>
5851
5852 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5853 (tracing_start_time): New global.
5854 (tracing_stop_time): New global.
5855 (tracing_user_name): New global.
5856 (tracing_notes): New global.
5857 (tracing_stop_note): New global.
5858 (cmd_qtstart): Set traceframe_usage, start_time.
5859 (stop_tracing): Set stop_time.
5860 (cmd_qtstatus): Report additional status.
5861 (cmd_qtp): New function.
5862 (handle_tracepoint_query): Call it.
5863 (cmd_qtnotes): New function.
5864 (handle_tracepoint_general_set): Call it.
5865 (get_timestamp): Rename from tsv_get_timestamp.
5866
405f8e94
SS
58672011-11-14 Stan Shebs <stan@codesourcery.com>
5868 Kwok Cheung Yeung <kcy@codesourcery.com>
5869
5870 * linux-x86-low.c (small_jump_insn): New.
5871 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5872 trampoline and error message, build a trampoline and issue a small
5873 jump instruction to it.
5874 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5875 trampoline and error message.
5876 (x86_get_min_fast_tracepoint_insn_len): New.
5877 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5878 * linux-low.h (struct linux_target_ops): Add arguments to
5879 install_fast_tracepoint_jump_pad operation, add new operation.
5880 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5881 arguments.
5882 (linux_get_min_fast_tracepoint_insn_len): New function.
5883 (linux_target_op): Add new operation.
5884 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5885 (gdb_trampoline_buffer_end): Ditto.
5886 (gdb_trampoline_buffer_error): Ditto.
5887 (struct ipa_sym_addresses): Add fields for new IPA variables.
5888 (symbol_list): Add entries for new IPA variables.
5889 (struct tracepoint): Add fields to hold the address range of the
5890 trampoline used by the tracepoint.
5891 (trampoline_buffer_head): New static variable.
5892 (trampoline_buffer_tail): Ditto.
5893 (claim_trampoline_space): New function.
5894 (have_fast_tracepoint_trampoline_buffer): New function.
5895 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5896 structure.
5897 (install_fast_tracepoint): Ditto, also add error buffer argument.
5898 (cmd_qtminftpilen): New function.
5899 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5900 (fast_tracepoint_from_trampoline_address): New function.
5901 (fast_tracepoint_collecting): Handle trampoline as part of jump
5902 pad space.
5903 (set_trampoline_buffer_space): New function.
5904 (initialize_tracepoint): Initialize new IPA variables.
5905 * target.h (struct target_ops): Add arguments to
5906 install_fast_tracepoint_jump_pad operation, add new
5907 get_min_fast_tracepoint_insn_len operation.
5908 (target_get_min_fast_tracepoint_insn_len): New.
5909 (install_fast_tracepoint_jump_pad): Add arguments.
5910 * server.h (IPA_BUFSIZ): Define.
5911 * linux-i386-ipa.c: Include extra header files.
5912 (initialize_fast_tracepoint_trampoline_buffer): New function.
5913 (initialize_low_tracepoint): Call it.
5914 * server.h (set_trampoline_buffer_space): Declare.
5915 (claim_trampoline_space): Ditto.
5916 (have_fast_tracepoint_trampoline_buffer): Ditto.
5917
1e4d1764
YQ
59182011-11-14 Yao Qi <yao@codesourcery.com>
5919
5920 * server.c (handle_query): Handle InstallInTrace for qSupported.
5921 * tracepoint.c (add_tracepoint): Sort list.
5922 (install_tracepoint, download_tracepoint): New.
5923 (cmd_qtdp): Call them to install and download tracepoints.
5924 (sort_tracepoints): Removed.
5925 (cmd_qtstart): Update.
5926
5c73ff4e
YQ
59272011-11-14 Yao Qi <yao@codesourcery.com>
5928
5929 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5930 * mem-break.h: Declare.
5931 * tracepoint.c (cmd_qtstart): Move some code to ...
5932 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5933 New.
5934 (download_tracepoints): Move some code to ...
5935 (download_tracepoint_1): ... here. New.
5936
86a30030
YQ
59372011-11-08 Yao Qi <yao@codesourcery.com>
5938
5939 * remote-utils.c (relocate_instruction): A comment fix.
5940
8d26e50c
JB
59412011-11-07 Joel Brobecker <brobecker@adacore.com>
5942
5943 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5944 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5945 dr_status_mirror and dr_control_mirror from debug_reg_state.
5946 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5947 (i386_initial_stuff): Remove use of deleted globals.
5948 (i386_get_thread_context, i386_set_thread_context,
5949 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5950 from debug_reg_state.
5951
a59306a3
YQ
59522011-11-05 Yao Qi <yao@codesourcery.com>
5953
5954 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5955 address as TPOINT's.
5956
3065dfb6
SS
59572011-11-02 Stan Shebs <stan@codesourcery.com>
5958
5959 * tracepoint.c (agent_mem_read_string): New function.
5960 (eval_agent_expr): Call it for tracenz.
5961 * server.c (handle_query): Report support for tracenz.
5962
fd0d8c7c
YQ
59632011-11-02 Yao Qi <yao@codesourcery.com>
5964
5965 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5966
609086b1
YQ
59672011-11-02 Yao Qi <yao@codesourcery.com>
5968
5969 * target.h: Fix a typo in comment.
5970
b9fd1791
PA
59712011-10-31 Pedro Alves <pedro@codesourcery.com>
5972
5973 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5974 clobber the breakpoints' shadows with fast tracepoint jumps.
5975 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5976 * target.c (write_inferior_memory): Also pass MYADDR down to
5977 check_mem_write.
5978
03583c20
UW
59792011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5980
5981 * configure.ac: Check support for personality routine.
5982 * configure: Regenerate.
5983 * config.in: Likewise.
5984 * linux-low.c: Include <sys/personality.h>.
5985 Define ADDR_NO_RANDOMIZE if necessary.
5986 (linux_create_inferior): Disable address space randomization when
5987 forking inferior, if requested.
5988 (linux_supports_disable_randomization): New function.
5989 (linux_target_ops): Install it.
5990 * server.h (disable_randomization): Declare.
5991 * server.c (disable_randomization): New global variable.
5992 (handle_general_set): Handle QDisableRandomization.
5993 (handle_query): Likewise for qSupported.
5994 (main): Support --disable-randomization and --no-disable-randomization
5995 command line arguments.
5996 * target.h (struct target_ops): Add supports_disable_randomization.
5997 (target_supports_disable_randomization): New macro.
5998
723b724b
MF
59992011-09-29 Mike Frysinger <vapier@gentoo.org>
6000
6001 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6002 ifdef check.
6003 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6004 [!PT_GETDSBT] (target_loadmap): New definition.
6005 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6006 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6007 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6008 and PT_GETDSBT to LINUX_LOADMAP.
6009 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6010 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6011
55329a5c 60122011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
6013
6014 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6015 (arm_linux_hwbp_cap): New static variable.
6016 (arm_linux_get_hwbp_cap): Replace by ...
6017 (arm_linux_init_hwbp_cap): ... this new function.
6018 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6019 (arm_linux_get_hw_watchpoint_count): Likewise.
6020 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6021 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6022 (arm_prepare_to_resume): Use perror_with_name instead of error.
6023
55329a5c 60242011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
6025
6026 * linux-arm-low.c: Include <signal.h>.
6027 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6028 (struct arm_linux_hwbp_cap): New data type.
6029 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6030 (struct arm_linux_hw_breakpoint): New data type.
6031 (MAX_BPTS, MAX_WPTS): Define.
6032 (struct arch_process_info, struct arch_lwp_info): New data types.
6033 (arm_linux_get_hwbp_cap): New function.
6034 (arm_linux_get_hw_breakpoint_count): Likewise.
6035 (arm_linux_get_hw_watchpoint_count): Likewise.
6036 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6037 (arm_hwbp_control_initialize): Likewise.
6038 (arm_hwbp_control_is_enabled): Likewise.
6039 (arm_hwbp_control_is_initialized): Likewise.
6040 (arm_hwbp_control_disable): Likewise.
6041 (arm_linux_hw_breakpoint_equal): Likewise.
6042 (arm_linux_hw_point_initialize): Likewise.
6043 (struct update_registers_data): New data structure.
6044 (update_registers_callback: New function.
6045 (arm_insert_point): Likewise.
6046 (arm_remove_point): Likewise.
6047 (arm_stopped_by_watchpoint): Likewise.
6048 (arm_stopped_data_address): Likewise.
6049 (arm_new_process): Likewise.
6050 (arm_new_thread): Likewise.
6051 (arm_prepare_to_resume): Likewise.
6052 (the_low_target): Register arm_insert_point, arm_remove_point,
6053 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6054 arm_new_thread, and arm_prepare_to_resume.
6055
6b9801d4
SS
60562011-09-15 Stan Shebs <stan@codesourcery.com>
6057
6058 * server.h (struct emit_ops): Add compare-goto fields.
6059 * tracepoint.c (gdb_agent_op_sizes): New table.
6060 (emit_eq_goto): New function.
6061 (emit_ne_goto): New function.
6062 (emit_lt_goto): New function.
6063 (emit_le_goto): New function.
6064 (emit_gt_goto): New function.
6065 (emit_ge_goto): New function.
6066 (is_goto_target): New function.
6067 (compile_bytecodes): Recognize special cases of compare-goto
6068 combinations and call specialized emitters for them.
6069 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6070 (amd64_emit_ne_goto): New function.
6071 (amd64_emit_lt_goto): New function.
6072 (amd64_emit_le_goto): New function.
6073 (amd64_emit_gt_goto): New function.
6074 (amd64_emit_ge_goto): New function.
6075 (amd64_emit_ops): Add the new functions.
6076 (i386_emit_eq_goto): New function.
6077 (i386_emit_ne_goto): New function.
6078 (i386_emit_lt_goto): New function.
6079 (i386_emit_le_goto): New function.
6080 (i386_emit_gt_goto): New function.
6081 (i386_emit_ge_goto): New function.
6082 (i386_emit_ops): Add the new functions.
6083
bf15cbda
SS
60842011-09-08 Stan Shebs <stan@codesourcery.com>
6085
6086 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6087 (i386_emit_epilogue): Restore %ebx.
6088
943ca1dd
JZ
60892011-08-31 Jie Zhang <jzhang918@gmail.com>
6090
6091 * server.c (step_thread): Remove definition.
6092 (process_serial_event): Don't handle Hs.
6093 * server.h (step_thread): Remove declaration.
6094 * target.c (set_desired_inferior): Remove use of step_thread.
6095
e3deef73
LM
60962011-08-24 Luis Machado <lgustavo@codesourcery.com>
6097
6098 * linux-low.c: Include linux-procfs.h.
6099 (linux_attach_lwp_1): Update comments.
6100 (linux_attach): Scan for existing threads when attaching to a
6101 process that is the tgid.
6102 * Makefile.in: Update dependencies.
6103
13da1c97
LM
61042011-08-24 Luis Machado <lgustavo@codesourcery.com>
6105
6106 * configure.srv: Add linux-procfs.o dependencies.
6107
881127c9
YQ
61082011-08-14 Yao Qi <yao@codesourcery.com>
6109
6110 * target.h (struct target_ops): Fix indent.
6111 * win32-low.c (win32_target_ops): Fix comment.
6112
58dbd541
YQ
61132011-08-14 Andrew Jenner <andrew@codesourcery.com>
6114 Yao Qi <yao@codesourcery.com>
6115
6116 * Makefile.in (clean): Remove tic6x-*.c files.
6117 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6118 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6119 (tic6x-c64xp-linux.c): Likewise.
6120 * configure.srv: Add support for tic6x-*-uclinux.
6121 * linux-tic6x-low.c: New.
6122 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6123
78d85199
YQ
61242011-08-14 Andrew Stubbs <ams@codesourcery.com>
6125 Yao Qi <yao@codesourcery.com>
6126
6127 * target.h (struct target_ops): Add read_loadmap.
6128 * linux-low.c (struct target_loadseg): New type.
6129 (struct target_loadmap): New type.
6130 (linux_read_loadmap): New function.
6131 (linux_target_ops): Add linux_read_loadmap.
6132 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
6133 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6134 to NULL.
78d85199 6135
a959a88d
EZ
61362011-08-05 Eli Zaretskii <eliz@gnu.org>
6137
6138 * win32-low.c: Include <stdint.h>.
6139
1ced966e
PA
61402011-07-22 Pedro Alves <pedro@codesourcery.com>
6141
6142 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6143 to the inferior here.
6144 (i386_remove_aligned_watchpoint): Ditto.
6145 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6146 fit part of the watchpoint in the debug registers.
6147 (i386_update_inferior_debug_regs): New.
6148 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6149 registers, and only update the inferior on success.
6150 (i386_low_remove_watchpoint): Ditto.
6151
d26e3629
KY
61522011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6153
6154 * linux-low.c (compare_ints, unique, list_threads, show_process,
6155 linux_core_of_thread): Delete.
6156 (linux_target_ops): Change linux_core_of_thread to
6157 linux_common_core_of_thread.
6158 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6159 * utils.c (malloc_failure): Change type of argument.
6160 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6161 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6162 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6163 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6164 (IPA_OBJS): Add common-utils-ipa.o.
6165 (ptid_h, linux_osdata_h): New macros.
6166 (server_h): Add common/common-utils.h, common/xml-utils.h,
6167 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6168 common/ptid.h.
6169 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6170 ptid.o, buffer.o): New rules.
6171 (linux-low.o): Add common/linux-osdata.h as a dependency.
6172 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6173 * configure.ac: Add AC_HEADER_DIRENT check.
6174 * config.in: Regenerate.
6175 * configure: Regenerate.
6176 * remote-utils.c (xml_escape_text): Delete.
6177 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6178 buffer_xml_printf): Move to common/buffer.c.
6179 * server.c (main): Remove call to initialize_inferiors.
6180 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6181 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6182 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6183 internal_error, gdb_assert, gdb_assert_fail): Delete.
6184 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6185 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6186 common/buffer.h.
6187 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6188 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6189 initialize_inferiors): Delete.
6190
2275a1a7
PA
61912011-07-20 Pedro Alves <pedro@codesourcery.com>
6192
6193 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6194 symbol error.
6195
0a5b1e09
PA
61962011-05-31 Pedro Alves <pedro@codesourcery.com>
6197
6198 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6199 assertion.
6200 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6201
6938fd34
YQ
62022011-05-26 Yao Qi <yao@codesourcery.com>
6203
6204 * Makefile.in (thread-db.o): Track dependence to
6205 common/gdb_thread_db.h.
6206 * thread-db.c: include gdb_thread_db.h from right place.
6207
b481f9e0
TT
62082011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6209
6210 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6211 __FILE__ and __LINE__ to internal_error.
6212
98a5dd13
DE
62132011-05-13 Doug Evans <dje@google.com>
6214
6215 * thread-db.c (try_thread_db_load_from_sdir): New function.
6216 (try_thread_db_load_from_dir): New function.
6217 (thread_db_load_search): Handle $sdir, ignore $pdir.
6218 Remove trying of system directories if search of
6219 libthread-db-search-path fails, that is now done via $sdir.
6220
d248b706
KY
62212011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6222
6223 * server.c (handle_query): Add EnableDisableTracepoints to the list
6224 of supported features.
43aaf8b6 6225 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 6226 tracepoints.
43aaf8b6
PA
6227 (cmd_qtenable_disable): New.
6228 (cmd_qtstart): Install tracepoints even if disabled.
6229 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6230 receiving a QTEnable or QTDisable packet.
6231 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6232 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6233 tracepoints.
6234 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 6235
84e578fb
DE
62362011-05-10 Doug Evans <dje@google.com>
6237
6238 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6239
71f55dd8
DE
62402011-05-04 Doug Evans <dje@google.com>
6241
6242 * linux-low.c (linux_join): Skip process lookup.
6243 * spu-low.c (spu_join): Ditto.
6244 * server.c (join_inferiors_callback): Delete.
6245 (process_serial_event): For 'D' packet (detach) call join_inferior
6246 directly.
6247
4d393d60
JM
62482011-05-04 Joseph Myers <joseph@codesourcery.com>
6249
6250 * README: Don't mention xscale*-*-linux*.
6251 * configure.srv (xscale*-*-linux*): Don't handle target.
6252
b00ad6ff
NF
62532011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6254
6255 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6256 casting pointers.
6257 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6258 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6259 (i386_emit_void_call_2): Likewise.
6260
af96c192
YQ
62612011-04-26 Yao Qi <yao@codesourcery.com>
6262
43aaf8b6
PA
6263 * linux-low.c: Move common macros to linux-ptrace.h.
6264 Include linux-ptrace.h.
af96c192
YQ
6265 * Makefile.in (linux_ptrace_h): New.
6266 (linux-low.o): Depends on linux-ptrace.h.
6267
03f2bd59
JK
62682011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6269
6270 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6271 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6272 (remote_prepare): New function with most of the TCP code from ...
6273 (remote_open): ... here. Detect PORT here unconditionally. Move also
6274 setting transport_is_reliable.
6275 * server.c (run_once): New variable.
6276 (gdbserver_usage): Document it.
6277 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6278 the first run if RUN_ONCE.
6279 * server.h (run_once, remote_prepare): New declarations.
6280
7a9dd1b2
TT
62812011-04-19 Tom Tromey <tromey@redhat.com>
6282
6283 * win32-low.c (handle_load_dll): Remove duplicate "the".
6284
81239425
PM
62852011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6286
6287 Remove support for old Cygwin 1.5 versions.
6288 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6289 function to avoid warning.
6290 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6291 warning.
6292
9e0627f1
PM
62932011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6294
6295 * gdbserver/server.h (Macro _): Define it if not available.
6296
588eebee
MS
62972011-03-14 Michael Snyder <msnyder@vmware.com>
6298
348af9f7 6299 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 6300
43f70d4c
JB
63012011-03-10 Joel Brobecker <brobecker@adacore.com>
6302
6303 * Makefile.in (maintainer-clean realclean distclean): Remove
6304 "make ... subdir_do" command.
6305
348af9f7
MS
63062011-03-10 Michael Snyder <msnyder@vmware.com>
6307
6308 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6309
6310 * server.c (handle_v_run): Free alloced buffer on early return.
6311
e637a4f5
YQ
63122011-03-09 Yao Qi <yao@codesourcery.com>
6313
6314 Revert:
6315 2011-03-04 Yao Qi <yao@codesourcery.com>
6316
6317 * Makefile.in: Remove GNU make feature --directory.
6318
6319 2011-03-05 Yao Qi <yao@codesourcery.com>
6320
6321 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6322 (subdir_do): New make target. Copied from gdb/Makefile.
6323 (maintainer-clean, realclean, distclean, clean): Call corresponding
6324 make targets in common/Makefile.
6325
6326 2011-02-11 Yao Qi <yao@codesourcery.com>
6327
6328 * configure.ac: Call AC_PROG_RANLIB.
6329 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6330 * configure: Regenerate.
6331
e6edda56
JK
63322011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6333
6334 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6335
e5141119
JB
63362011-03-06 Yao Qi <yao@codesourcery.com>
6337
6338 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6339
64794aa4
JB
63402011-03-05 Yao Qi <yao@codesourcery.com>
6341
6342 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6343 (subdir_do): New make target. Copied from gdb/Makefile.
6344 (maintainer-clean, realclean, distclean, clean): Call corresponding
6345 make targets in common/Makefile.
6346
7a762829
YQ
63472011-03-04 Yao Qi <yao@codesourcery.com>
6348
6349 * Makefile.in: Remove GNU make feature --directory.
6350
348af9f7
MS
63512011-03-04 Michael Snyder <msnyder@vmware.com>
6352
6353 * server.c (queue_stop_reply): Call xmalloc not malloc.
6354
63552011-03-02 Michael Snyder <msnyder@vmware.com>
6356
6357 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6358
9f72fee2
MS
63592011-02-28 Michael Snyder <msnyder@vmware.com>
6360
588eebee
MS
6361 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6362 (cmd_qtframe): Ditto.
6363 (cmd_qtbuffer): Ditto.
6364 (cmd_bigqtbuffer): Ditto.
6365
9f72fee2
MS
6366 * utils.c (decimal2str): Initialize 'width' to nine, then
6367 don't mess with it.
6368
8040bd49
UW
63692011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6370
6371 * hostio.c (require_data): Free *data, not data.
6372
7e52cbd0
JK
63732011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6374
6375 * hostio.c (require_data): Use free, not xfree.
6376
9130f83e
MS
63772011-02-27 Michael Snyder <msnyder@vmware.com>
6378
4b812f4e
MS
6379 * server.c (handle_query): Discard unused value.
6380
9130f83e
MS
6381 * hostio.c (require_data): Free malloc memory before returning
6382 error.
6383
69d37113
MS
63842011-02-26 Michael Snyder <msnyder@vmware.com>
6385
6386 * linux-low.c (list_threads): Call closedir for dirent.
6387
35f5825a
MS
63882011-02-27 Michael Snyder <msnyder@vmware.com>
6389
2a589cef
MS
6390 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6391 a case statement falls through.
6392
0adea5f7
MS
6393 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6394
35f5825a
MS
6395 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6396 in comparison.
6397
238f1c74
MS
63982011-02-26 Michael Snyder <msnyder@vmware.com>
6399
6400 * utils.c (decimal2str): Eliminate dead code and dead param.
6401 (pulongest): Drop dead param from call to decimal2str.
6402 (plongest): Ditto.
6403
633ff500
JB
64042011-02-24 Joel Brobecker <brobecker@adacore.com>
6405
6406 Revert the following patch (not approved yet):
6407 2011-02-21 Hui Zhu <teawater@gmail.com>
6408 * tracepoint.c (tp_printf): New function.
6409 (eval_agent_expr): Handle gdb_agent_op_printf.
6410
f9c6ff72
HZ
64112011-02-21 Hui Zhu <teawater@gmail.com>
6412
6413 * tracepoint.c (tp_printf): New function.
6414 (eval_agent_expr): Handle gdb_agent_op_printf.
6415
94d5e490
TT
64162011-02-18 Tom Tromey <tromey@redhat.com>
6417
6418 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6419 (tracepoint.o): Likewise.
6420 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6421 (gdb_agent_op_names): Likewise.
6422
c7f96d2b
TT
64232011-02-18 Tom Tromey <tromey@redhat.com>
6424
6425 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6426 gdb_agent_op_rot>: New constants.
6427 (gdb_agent_op_names): Add pick and roll.
6428 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6429 cases.
6430
0feedb2c
JK
64312011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6432
6433 * aclocal.m4: Regenerated with aclocal-1.11.1.
6434
b3b9301e
PA
64352011-02-14 Pedro Alves <pedro@codesourcery.com>
6436
6437 * server.c (handle_qxfer_traceframe_info): New.
6438 (qxfer_packets): Register "traceframe-info".
6439 (handle_query): Report support for qXfer:traceframe-info:read+.
6440 * tracepoint.c (match_blocktype): New.
6441 (traceframe_find_block_type): Rename to ...
6442 (traceframe_walk_blocks): ... this. Add callback filter argument,
6443 and use it.
6444 (traceframe_find_block_type): New, reimplemented on top of
6445 traceframe_walk_blocks.
6446 (build_traceframe_info_xml): New.
6447 (traceframe_read_info): New.
6448 * server.h (traceframe_read_info): Declare.
6449
4f3e6fb7
YQ
64502011-02-11 Yao Qi <yao@codesourcery.com>
6451
6452 * configure.ac: Call AC_PROG_RANLIB.
6453 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6454 * configure: Regenerate.
6455
764880b7
PA
64562011-02-07 Pedro Alves <pedro@codesourcery.com>
6457
6458 * server.c (gdb_read_memory): Change return semantics to allow
6459 partial transfers.
6460 (handle_search_memory_1): Adjust.
6461 (process_serial_event) <'m' packet>: Handle partial transfers.
6462 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6463
1c79eb8a
PA
64642011-01-28 Pedro Alves <pedro@codesourcery.com>
6465
6466 * regcache.c (init_register_cache): Initialize
6467 regcache->register_status.
6468 (free_register_cache): Release regcache->register_status.
6469 (regcache_cpy): Copy register_status.
6470 (registers_to_string): Print 'x's for unavailable registers.
6471 (supply_register): Mark the register's status valid or
6472 unavailable, depending on whether a buffer was passed in or not.
6473 (supply_register_zeroed): New.
6474 (supply_regblock): Mark the registers' status valid or
6475 unavailable, depending on whether a buffer was passed in or not.
6476 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6477 (struct regcache): New `register_status' field.
6478 (supply_register_zeroed): Declare.
6479 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6480 supply_register_zeroed, rather than passing a NULL buffer to
6481 supply_register.
6482 * tracepoint.c (fetch_traceframe_registers): Update comment.
6483
85724a0e
PA
64842011-01-28 Pedro Alves <pedro@codesourcery.com>
6485
6486 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6487 buffer explicit.
6488
d08aafef
PA
64892011-01-25 Pedro Alves <pedro@codesourcery.com>
6490
6491 * server.h (decode_xfer_write): Change prototype.
6492 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6493 and don't extract the annex here.
6494 * server.c (decode_xfer_read): Remove `annex' parameter,
6495 and don't extract the annex here.
6496 (decode_xfer): New.
6497 (struct qxfer): New.
6498 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6499 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6500 (handle_qxfer_statictrace): New functions, abstracted out from
6501 handle_query, and made to use the struct qxfer interface.
6502 (handle_threads_qxfer_proper): Rename to ...
6503 (handle_qxfer_threads_proper): ... this.
6504 (handle_threads_qxfer): Rename to ...
6505 (handle_qxfer_threads): ... this. Adjust.
6506 (qxfer_packets): New array.
6507 (handle_qxfer): New function.
6508 (handle_query): Use handle_qxfer.
6509
493e2a69
MS
65102011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6511
6512 * gdbreplay.c: Shorten lines of >= 80 columns.
6513 * linux-low.c: Ditto.
6514 * linux-ppc-low.c: Ditto.
6515 * linux-s390-low.c: Ditto.
6516 * linux-sparc-low.c: Ditto.
6517 * linux-x86-low.c: Ditto.
6518 * linux-xtensa-low.c: Ditto.
6519 * mem-break.c: Ditto.
6520 * nto-low.c: Ditto.
6521 * regcache.h: Ditto.
6522 * remote-utils.c: Ditto.
6523 * server.c: Ditto.
6524 * server.h: Ditto.
6525 * thread-db.c: Ditto.
6526 * tracepoint.c: Ditto.
6527 * utils.c: Ditto.
6528 * win32-low.h: Ditto.
6529
44944448
JB
65302011-01-05 Joel Brobecker <brobecker@adacore.com>
6531
6532 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6533 update.
6534
71ce852c
JB
65352011-01-01 Joel Brobecker <brobecker@adacore.com>
6536
6537 * server.c (gdbserver_version): Update copyright year in version
6538 output.
6539 * gdbreplay.c (gdbreplay_version): Ditto.
6540
eb826dc6
MF
65412010-12-29 Jie Zhang <jie.zhang@analog.com>
6542
6543 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6544 * linux-bfin-low.c: New file.
6545 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6546 PT_DATA_ADDR for BFIN targets.
6547 * Makefile.in (SFILES): Add linux-bfin-low.c.
6548 (clean): Remove reg-bfin.c.
6549 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6550 * README: Mention supported Blackfin targets.
6551
39ab222a
MF
65522010-12-23 Mike Frysinger <vapier@gentoo.org>
6553
6554 * .gitignore: New file.
6555
a1f2ce7d
MF
65562010-11-16 Mike Frysinger <vapier@gentoo.org>
6557
6558 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6559
f474844c
JZ
65602010-10-22 Jie Zhang <jie@codesourcery.com>
6561
6562 * Makefile.in: Add FLAGS_TO_PASS variable.
6563 (install): Remove dependency of install-only and recursively
6564 invoke make for install-only.
6565
f1048712
DE
65662010-10-04 Doug Evans <dje@google.com>
6567
6568 * Makefile.in (uninstall): Use $(DESTDIR).
6569
b53a1623
PA
65702010-09-24 Pedro Alves <pedro@codesourcery.com>
6571
e6ee044d
PA
6572 PR gdb/11842
6573
b53a1623
PA
6574 * linux-x86-low.c (compat_siginfo_from_siginfo)
6575 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6576 si_code is < 0. Check for si_code == SI_TIMER before checking for
6577 si_code < 0.
6578
fa1bd1e4
JB
65792010-09-13 Joel Brobecker <brobecker@adacore.com>
6580
6581 * lynx-i386-low.c: New file.
6582 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6583
47fac8f8
JB
65842010-09-13 Joel Brobecker <brobecker@adacore.com>
6585
6586 * lynx-low.c (ptrace_request_to_str): Remove handling for
6587 request values that have been removed in LynxOS 5.x.
6588
1adfc54d
JB
65892010-09-13 Joel Brobecker <brobecker@adacore.com>
6590
6591 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6592 <ptrace.h>
6593
c2a66c29
NS
65942010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6595
6596 * configure.ac: Add --enable-inprocess-agent option.
6597 * configure: Rebuilt.
6598
32fcada3
YQ
65992010-09-06 Yao Qi <yao@codesourcery.com>
6600
6601 * linux-low.c (linux_kill): Remove unused variable.
6602 (linux_stabilize_threads): Likewise.
6603 * server.c (start_inferior): Likewise.
6604 (queue_stop_reply_callback): Likewise.
6605 * tracepoint.c (do_action_at_tracepoint): Likewise.
6606
0cccb683
YQ
66072010-09-06 Yao Qi <yao@codesourcery.com>
6608
6609 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6610 on return.
6611
423ec54c
JK
66122010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6613
6614 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6615
12ac6819
PA
66162010-09-06 Pedro Alves <pedro@codesourcery.com>
6617
6618 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6619 "$(IPA_DEPFILES)".
6620
8ed54b31
JB
66212010-09-01 Joel Brobecker <brobecker@adacore.com>
6622
6623 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6624 gdbserver/lynx-ppc-low.c: New files.
6625 * Makefile.in (lynx_low_h): New variable.
6626 (lynx-low.o, lynx-ppc-low.o): New rules.
6627 * configure.ac: On LynxOS, link with -lnetinet.
6628 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6629 * configure: regenerate.
6630
bb0116a4
JB
66312010-09-01 Joel Brobecker <brobecker@adacore.com>
6632
6633 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6634 * configure.ac: Add check for vasprintf and vsnprintf.
6635 * configure, config.in: Regenerate.
6636 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6637
a778ab81 66382010-09-01 Joel Brobecker <brobecker@adacore.com>
6639
6640 * gdbreplay.c: Move include of alloca.h up, next to include of
6641 malloc.h.
6642 * server.h: Add include of malloc.h.
6643 * mem-break.c: Remove include of malloc.h.
6644 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6645
8b034a19 66462010-09-01 Joel Brobecker <brobecker@adacore.com>
6647
6648 * Makefile.in (memmem.o): Build with -Wno-error.
6649
66502010-09-01 Joel Brobecker <brobecker@adacore.com>
6651
6652 * utils.c (xsnprintf): Make non-static.
6653 * server.h: Add xsnprintf declaration.
6654 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6655 replace calls to snprintf by calls to xsnprintf throughout.
6656
66572010-09-01 Joel Brobecker <brobecker@adacore.com>
6658
6659 * configure.ac: Add configure check for alloca.
6660 * configure, config.in: Regenerate.
6661 * server.h: Include alloca.h if it exists.
6662 * gdbreplay.c: Include alloca.h if it exists.
6663
1a981360
PA
66642010-08-28 Pedro Alves <pedro@codesourcery.com>
6665
6666 * linux-low.c (__SIGRTMIN): Define if not already defined.
6667 (linux_create_inferior): Check for __ANDROID__ rather than
6668 __SIGRTMIN.
6669 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6670 are already deferred.
6671 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6672 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6673 stopped and already has a pending signal to report.
6674 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6675 a pending signal to report or is moving out of a jump pad.
6676 (linux_init_signals): Check for __ANDROID__ rather than
6677 __SIGRTMIN.
6678
b4d51a55
PA
66792010-08-28 Pedro Alves <pedro@codesourcery.com>
6680
6681 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6682 debug_threads check. Avoid a linear search when not doing debug
6683 output.
6684
ec48365d
PA
66852010-08-27 Pedro Alves <pedro@codesourcery.com>
6686
6687 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6688 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6689 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6690 (process_event): Change local fd's type to gdb_fildes_t.
6691 (create_file_handler): Adjust prototype.
6692 (delete_file_handler): Adjust prototype.
6693 (handle_file_event): Adjust prototype. Use pfildes.
6694 (create_file_event): Adjsut prototype.
6695 * remote-utils.c (remote_desc, listen_desc): Change type to
6696 gdb_fildes_t.
6697 * server.h: New gdb_fildes_t typedef.
6698 [USE_WIN32API]: Include winsock2.h.
6699 (delete_file_handler, add_file_handler): Adjust prototypes.
6700 (pfildes): Declare.
6701 * utils.c (pfildes): New.
6702
854d88f0
PA
67032010-08-27 Pedro Alves <pedro@codesourcery.com>
6704
6705 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6706 * configure: Regenerate.
6707
0146f85b
PA
67082010-08-27 Pedro Alves <pedro@codesourcery.com>
6709
6710 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6711 (linux_done_accessing_memory): ... this.
6712 (linux_target_ops): Adjust.
6713 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6714 * nto-low.c (nto_target_ops): Adjust comment.
6715 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6716 * spu-low.c (spu_target_ops): Adjust comment.
6717 * target.h (target_ops): Rename unprepare_to_access_memory field
6718 to done_accessing_memory.
6719 (unprepare_to_access_memory): Rename to ...
6720 (done_accessing_memory): ... this.
6721
90d74c30
PA
67222010-08-26 Pedro Alves <pedro@codesourcery.com>
6723
6724 * linux-low.c (linux_prepare_to_access_memory): New.
6725 (linux_unprepare_to_access_memory): New.
6726 (linux_target_ops): Install them.
6727 * server.c (read_memory): Rename to ...
6728 (gdb_read_memory): ... this. Use
6729 prepare_to_access_memory/prepare_to_access_memory.
6730 (write_memory): Rename to ...
6731 (gdb_write_memory): ... this. Use
6732 prepare_to_access_memory/prepare_to_access_memory.
6733 (handle_search_memory_1): Adjust.
6734 (process_serial_event): Adjust.
6735 * target.h (struct target_ops): New fields
6736 prepare_to_access_memory and unprepare_to_access_memory.
6737 (prepare_to_access_memory, unprepare_to_access_memory): New.
6738 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6739 prepare_to_access_memory/prepare_to_access_memory.
6740 * nto-low.c (nto_target_ops): Adjust.
6741 * spu-low.c (spu_target_ops): Adjust.
6742 * win32-low.c (win32_target_ops): Adjust.
6743
fd467969
PA
67442010-08-26 Pedro Alves <pedro@codesourcery.com>
6745
6746 * Makefile.in (WARN_CFLAGS): Get it from configure.
6747 (WERROR_CFLAGS): New.
6748 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6749 * configure.ac: Introduce --enable-werror, which adds -Werror to
6750 the compiler command line. Enabled by default. Disable with
6751 --disable-werror. Add -Wdeclaration-after-statement
6752 Wpointer-arith and -Wformat-nonliteral to warning flags.
6753 * configure: Regenerate.
6754
331e2f5f
PA
67552010-08-26 Pedro Alves <pedro@codesourcery.com>
6756
6757 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6758
e581f2b4
PA
67592010-08-26 Pedro Alves <pedro@codesourcery.com>
6760
6761 * gdbreplay.c (remote_error): New.
6762 (gdbchar): New.
6763 (expect): Use gdbchar. Check for error reading from GDB.
6764 Clarify sync error output.
6765 (play): Check for errors writing to GDB.
6766 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6767 * remote-utils.c (getpkt): Check for errors writing to the remote
6768 descriptor.
6769
3c11dd79
PA
67702010-08-25 Pedro Alves <pedro@codesourcery.com>
6771
6772 * linux-low.c (linux_wait_1): Move non-debugging code out of
6773 `debug_threads' control.
6774
d20a8ad9
PA
67752010-08-25 Pedro Alves <pedro@codesourcery.com>
6776
6777 * linux-low.c (linux_wait_1): Don't set last_status here.
6778 * server.c (push_event, queue_stop_reply_callback): Assert we're
6779 not pushing a TARGET_WAITKIND_IGNORE event.
6780 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6781 (myresume, handle_target_event): Set the thread's last_resume_kind
6782 and last_status from the target returned status.
6783
964e4306
PA
67842010-08-25 Pedro Alves <pedro@codesourcery.com>
6785
6786 PR threads/10729
6787
6788 * linux-x86-low.c (update_debug_registers_callback): New.
6789 (i386_dr_low_set_addr): Use it.
6790 (i386_dr_low_get_addr): New.
6791 (i386_dr_low_set_control): Use update_debug_registers_callback.
6792 (i386_dr_low_get_control): New.
6793 (i386_dr_low_get_status): Adjust.
6794 * linux-low.c (linux_stop_lwp): New.
6795 * linux-low.h (linux_stop_lwp): Declare.
6796
6797 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6798 argument instead of a i386_debug_reg_state.
6799 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6800 a i386_debug_reg_state.
6801 (i386_insert_aligned_watchpoint): Adjust.
6802 (i386_remove_aligned_watchpoint): Adjust.
6803 (i386_low_stopped_data_address): Read the debug registers from the
6804 inferior instead of from the mirrors.
6805 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6806 (i386_dr_low_get_addr): Declare.
6807 (i386_dr_low_get_control): Declare.
6808 (i386_dr_low_get_status): Change prototype.
6809
6810 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6811 (i386_dr_low_get_addr): New.
6812 (i386_dr_low_get_control): New.
6813 (i386_dr_low_get_status): Adjust prototype. Return
6814 dr_status_mirror.
6815 (i386_initial_stuff): Clear dr_status_mirror and
6816 dr_control_mirror.
6817 (i386_get_thread_context): Adjust.
6818 (i386_set_thread_context): Adjust.
6819 (i386_thread_added): Adjust.
6820
5f21a75b
PA
68212010-08-24 Pedro Alves <pedro@codesourcery.com>
6822
6823 * linux-low.h (linux_thread_area): Delete declaration.
6824
3e4c1235
TS
68252010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6826
6827 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6828 after its termination.
6829
1971b033
PA
68302010-08-09 Pedro Alves <pedro@codesourcery.com>
6831
6832 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6833 (gdb_wants_all_stopped): Delete.
6834 (linux_wait_1): Don't call them.
6835 * server.c (handle_v_cont): Tag all threads as want-stopped.
6836 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6837 stopped as "client-wants-stopped".
6838
310444ac
PA
68392010-07-31 Pedro Alves <pedro@codesourcery.com>
6840
6841 * Makefile.in (signals_h): New.
6842 (server_h): Depend on it.
6843 (server.o): Don't depend on $(signals_def).
6844 (signals.o): Depend on $(signals_def).
6845
a19cae16
JK
68462010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6847
6848 * Makefile.in (signals_def): New.
6849 (server_h): Append include/gdb/signals.h and signals_def.
6850 (server.o): Append signals_def.
6851
30d50328
JK
68522010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6853
6854 * server.c (handle_target_event): Use target_signal_to_host for
6855 resume_info.sig initialization.
6856 * target.h (struct thread_resume) <sig>: New comment.
6857
5c3216e2
OS
68582010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6859
c6f46ca0
OS
6860 * server.c (handle_query): strcpy() the returned string from paddress()
6861 instead of sprintf().
5c3216e2
OS
6862 * utils.c (paddress): Return phex_nz().
6863
6bd31874
JB
68642010-07-07 Joel Brobecker <brobecker@adacore.com>
6865
6866 * server.c (handle_v_cont): Call mourn_inferior if process
6867 just exited.
6868 (myresume): Likewise.
6869
0fb4aa4b
PA
68702010-07-01 Pedro Alves <pedro@codesourcery.com>
6871
6872 Static tracepoints, and integration with UST.
6873
6874 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6875 * mem-break.c (uninsert_all_breakpoints)
6876 (reinsert_all_breakpoints): New.
6877 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6878 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6879 (gdb_agent_ust_loaded, helper_thread_id)
6880 (gdb_agent_helper_thread_id): New macros.
6881 (struct ipa_sym_addresses): Add addr_ust_loaded,
6882 addr_helper_thread_id, addr_cmd_buf.
6883 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6884 (in_process_agent_loaded_ust): New.
6885 (write_e_ust_not_loaded): New.
6886 (maybe_write_ipa_ust_not_loaded): New.
6887 (struct collect_static_trace_data_action): New.
6888 (enum tracepoint_type) <static_tracepoint>: New.
6889 (struct tracepoint) <handle>: Mention static tracepoints.
6890 (struct static_tracepoint_ctx): New.
6891 (CMD_BUF_SIZE): New.
6892 (add_tracepoint_action): Handle static tracepoint actions.
6893 (unprobe_marker_at): New.
6894 (clear_installed_tracepoints): Handle static tracepoints.
6895 (cmd_qtdp): Handle static tracepoints.
6896 (probe_marker_at): New.
6897 (cmd_qtstart): Handle static tracepoints.
6898 (response_tracepoint): Handle static tracepoints.
6899 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6900 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6901 (get_context_regcache): Handle static tracepoints.
6902 (do_action_at_tracepoint): Handle static tracepoint actions.
6903 (traceframe_find_block_type): Handle static trace data blocks.
6904 (traceframe_read_sdata): New.
6905 (download_tracepoints): Download static tracepoint actions.
6906 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6907 (GDB_PROBE_NAME): New.
6908 (ust_ops): New.
6909 (GET_UST_SYM): New.
6910 (USTF): New.
6911 (dlsym_ust): New.
6912 (ust_marker_to_static_tracepoint): New.
6913 (gdb_probe): New.
6914 (collect_ust_data_at_tracepoint): New.
6915 (gdb_ust_probe): New.
6916 (UNIX_PATH_MAX, SOCK_DIR): New.
6917 (gdb_ust_connect_sync_socket): New.
6918 (resume_thread, stop_thread): New.
6919 (run_inferior_command): New.
6920 (init_named_socket): New.
6921 (gdb_ust_socket_init): New.
6922 (cstr_to_hexstr): New.
6923 (next_st): New.
6924 (first_marker, next_marker): New.
6925 (response_ust_marker): New.
6926 (cmd_qtfstm, cmd_qtsstm): New.
6927 (unprobe_marker_at, probe_marker_at): New.
6928 (cmd_qtstmat, gdb_ust_thread): New.
6929 (gdb_ust_init): New.
6930 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6931 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6932 (ST_REGENTRY): New.
6933 (x86_64_st_collect_regmap): New.
6934 (X86_64_NUM_ST_COLLECT_GREGS): New.
6935 (AMD64_RIP_REGNUM): New.
6936 (supply_static_tracepoint_registers): New.
6937 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6938 (ST_REGENTRY): New.
6939 (i386_st_collect_regmap): New.
6940 (i386_NUM_ST_COLLECT_GREGS): New.
6941 (supply_static_tracepoint_registers): New.
6942 * server.c (handle_query): Handle qXfer:statictrace:read.
6943 <qSupported>: Report support for StaticTracepoints, and
6944 qXfer:statictrace:read features.
6945 * server.h (traceframe_read_sdata)
6946 (supply_static_tracepoint_registers): Declare.
6947 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6948 (unpack_varlen_hex): Include in IPA build.
6949 * Makefile.in (ustlibs, ustinc): New.
6950 (IPA_OBJS): Add remote-utils-ipa.o.
6951 ($(IPA_LIB)): Link -ldl and -lpthread.
6952 (UST_CFLAGS): New.
6953 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6954 * config.in, configure: Regenerate.
6955
9e4344e5
PA
69562010-06-20 Ian Lance Taylor <iant@google.com>
6957 Pedro Alves <pedro@codesourcery.com>
6958
6959 * linux-x86-low.c (always_true): Delete.
6960 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6961 trying to fool the compiler with always_true.
6962
c6beb2cb
PA
69632010-06-20 Pedro Alves <pedro@codesourcery.com>
6964
6965 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6966 conditions in gdbserver.
6967
d2ed6730
UW
69682010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6969
6970 * spu-low.c (spu_read_memory): Wrap around local store limit.
6971 (spu_write_memory): Likewise.
6972
4e29fb54
PA
69732010-06-15 Pedro Alves <pedro@codesourcery.com>
6974
6975 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6976 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6977 LONGEST uses.
6978 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6979 uses.
6980 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6981 uses with LONGEST uses.
6982
6a271cae
PA
69832010-06-14 Stan Shebs <stan@codesourcery.com>
6984 Pedro Alves <pedro@codesourcery.com>
6985
6986 Bytecode compiler.
6987
6988 * linux-x86-low.c: Include limits.h.
6989 (add_insns): New.
6990 (always_true): New.
6991 (EMIT_ASM): New.
6992 (EMIT_ASM32): New.
6993 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6994 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6995 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6996 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6997 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6998 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6999 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7000 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7001 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7002 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7003 (amd64_emit_void_call_2): New.
7004 (amd64_emit_ops): New.
7005 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7006 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7007 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7008 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7009 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7010 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7011 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7012 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7013 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7014 (i386_emit_stack_adjust, i386_emit_int_call_1)
7015 (i386_emit_void_call_2): New.
7016 (i386_emit_ops): New.
7017 (x86_emit_ops): New.
7018 (the_low_target): Install x86_emit_ops.
7019 * server.h (struct emit_ops): New.
7020 (get_raw_reg_func_addr): Declare.
7021 (current_insn_ptr, emit_error): Declare.
7022 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7023 (set_trace_state_variable_value): New defines.
7024 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7025 addr_get_trace_state_variable_value and
7026 addr_set_trace_state_variable_value.
7027 (symbol_list): New fields for get_raw_reg,
7028 get_trace_state_variable_value and set_trace_state_variable_value.
7029 (condfn): New typedef.
7030 (struct tracepoint): New field `compiled_cond'.
7031 (do_action_at_tracepoint): Clear compiled_cond.
7032 (get_trace_state_variable_value, set_trace_state_variable_value):
7033 Export in the IPA.
7034 (condition_true_at_tracepoint): If there's a compiled condition,
7035 run that.
7036 (current_insn_ptr, emit_error): New globals.
7037 (struct bytecode_address): New.
7038 (get_raw_reg_func_addr): New.
7039 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7040 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7041 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7042 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7043 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7044 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7045 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7046 (compile_tracepoint_condition, compile_bytecodes): New.
7047 * target.h (emit_ops): Forward declare.
7048 (struct target_ops): New field emit_ops.
7049 (target_emit_ops): New.
7050 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7051 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7052 * linux-low.c (linux_emit_ops): New.
7053 (linux_target_ops): Install it.
7054 * linux-low.h (struct linux_target_ops): New field emit_ops.
7055
92b72907
UW
70562010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7057
7058 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7059 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7060
fa593d66
PA
70612010-06-01 Pedro Alves <pedro@codesourcery.com>
7062 Stan Shebs <stan@codesourcery.com>
7063
7064 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7065 (all): Depend on $(extra_libraries).
7066 (install-only): Install the IPA.
7067 (IPA_OBJS, IPA_LIB): New.
7068 (clean): Remove the IPA lib.
7069 (IPAGENT_CFLAGS): New.
7070 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7071 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7072 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7073 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7074 * configure.ac: Check for atomic builtins support in the compiler.
7075 (IPA_DEPFILES, extra_libraries): Define.
7076 * configure.srv (ipa_obj): Add description.
7077 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7078 (i[34567]86-*-linux*): Set ipa_obj.
7079 (x86_64-*-linux*): Set ipa_obj.
7080 * linux-low.c (stabilizing_threads): New.
7081 (supports_fast_tracepoints): New.
7082 (linux_detach): Stabilize threads before detaching.
7083 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7084 the lwp is either not stabilizing, or is moving out of a jump pad.
7085 (linux_fast_tracepoint_collecting): New.
7086 (maybe_move_out_of_jump_pad): New.
7087 (enqueue_one_deferred_signal): New.
7088 (dequeue_one_deferred_signal): New.
7089 (linux_wait_for_event_1): If moving out of a jump pad, defer
7090 pending signals to later.
7091 (linux_stabilize_threads): New.
7092 (linux_wait_1): Check if threads need moving out of jump pads, and
7093 do it if so.
7094 (stuck_in_jump_pad_callback): New.
7095 (move_out_of_jump_pad_callback): New.
7096 (lwp_running): New.
7097 (linux_resume_one_lwp): Handle moving out of jump pads.
7098 (linux_set_resume_request): Dequeue deferred signals.
7099 (need_step_over_p): Also step over fast tracepoint jumps.
7100 (start_step_over): Also uninsert fast tracepoint jumps.
7101 (finish_step_over): Also reinsert fast tracepoint jumps.
7102 (linux_install_fast_tracepoint_jump): New.
7103 (linux_target_ops): Install linux_stabilize_threads and
7104 linux_install_fast_tracepoint_jump_pad.
7105 * linux-low.h (linux_target_ops) <get_thread_area,
7106 install_fast_tracepoint_jump_pad>: New fields.
7107 (struct lwp_info) <collecting_fast_tracepoint,
7108 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7109 (linux_get_thread_area): Declare.
7110 * linux-x86-low.c (jump_insn): New.
7111 (x86_get_thread_area): New.
7112 (append_insns): New.
7113 (push_opcode): New.
7114 (amd64_install_fast_tracepoint_jump_pad): New.
7115 (i386_install_fast_tracepoint_jump_pad): New.
7116 (x86_install_fast_tracepoint_jump_pad): New.
7117 (the_low_target): Install x86_get_thread_area and
7118 x86_install_fast_tracepoint_jump_pad.
7119 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7120 (struct fast_tracepoint_jump): New.
7121 (fast_tracepoint_jump_insn): New.
7122 (fast_tracepoint_jump_shadow): New.
7123 (find_fast_tracepoint_jump_at): New.
7124 (fast_tracepoint_jump_here): New.
7125 (delete_fast_tracepoint_jump): New.
7126 (set_fast_tracepoint_jump): New.
7127 (uninsert_fast_tracepoint_jumps_at): New.
7128 (reinsert_fast_tracepoint_jumps_at): New.
7129 (set_breakpoint_at): Use write_inferior_memory.
7130 (uninsert_raw_breakpoint): Use write_inferior_memory.
7131 (check_mem_read): Mask out fast tracepoint jumps.
7132 (check_mem_write): Mask out fast tracepoint jumps.
7133 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7134 (set_fast_tracepoint_jump): Declare.
7135 (delete_fast_tracepoint_jump)
7136 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7137 (reinsert_fast_tracepoint_jumps_at): Declare.
7138 * regcache.c: Don't compile many functions when building the
7139 in-process agent library.
7140 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7141 the register buffer in the heap.
7142 (free_register_cache): If the register buffer isn't owned by the
7143 regcache, don't free it.
7144 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7145 pre-existing register caches.
7146 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7147 type.
7148 (convert_ascii_to_int): : Constify `from' parameter type.
7149 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7150 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7151 the needed buffer in-place.
7152 (relocate_instruction): New.
7153 * server.c (handle_query) <qSymbols>: If the target supports
7154 tracepoints, give it a chance of looking up symbols. Report
7155 support for fast tracepoints.
7156 (handle_status): Stabilize threads.
7157 (process_serial_event): Adjust.
7158 * server.h (struct fast_tracepoint_jump): Forward declare.
7159 (struct process_info) <fast_tracepoint_jumps>: New field.
7160 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7161 (decode_X_packet, decode_M_packet): Adjust.
7162 (relocate_instruction): Declare.
7163 (in_process_agent_loaded): Declare.
7164 (tracepoint_look_up_symbols): Declare.
7165 (struct fast_tpoint_collect_status): Declare.
7166 (fast_tracepoint_collecting): Declare.
7167 (force_unlock_trace_buffer): Declare.
7168 (handle_tracepoint_bkpts): Declare.
7169 (initialize_low_tracepoint)
7170 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7171 * target.h (struct target_ops) <stabilize_threads,
7172 install_fast_tracepoint_jump_pad>: New fields.
7173 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7174 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7175 [HAVE_STDINT_H]: Include stdint.h.
7176 (trace_debug_1): Rename to ...
7177 (trace_vdebug): ... this.
7178 (trace_debug): Rename to ...
7179 (trace_debug_1): ... this. Add `level' parameter.
7180 (trace_debug): New.
7181 (ATTR_USED, ATTR_NOINLINE): New.
7182 (IP_AGENT_EXPORT): New.
7183 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7184 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7185 (about_to_request_buffer_space, trace_buffer_is_full)
7186 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7187 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7188 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7189 (traceframe_write_count, traceframes_created)
7190 (trace_state_variables)
7191 New renaming defines.
7192 (struct ipa_sym_addresses): New.
7193 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7194 (symbol_list): New.
7195 (ipa_sym_addrs): New.
7196 (all_tracepoint_symbols_looked_up): New.
7197 (in_process_agent_loaded): New.
7198 (write_e_ipa_not_loaded): New.
7199 (maybe_write_ipa_not_loaded): New.
7200 (tracepoint_look_up_symbols): New.
7201 (debug_threads) [IN_PROCESS_AGENT]: New.
7202 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7203 (UNKNOWN_SIDE_EFFECTS): New.
7204 (stop_tracing): New.
7205 (flush_trace_buffer): New.
7206 (stop_tracing_bkpt): New.
7207 (flush_trace_buffer_bkpt): New.
7208 (read_inferior_integer): New.
7209 (read_inferior_uinteger): New.
7210 (read_inferior_data_pointer): New.
7211 (write_inferior_data_pointer): New.
7212 (write_inferior_integer): New.
7213 (write_inferior_uinteger): New.
7214 (struct collect_static_trace_data_action): Delete.
7215 (enum tracepoint_type): New.
7216 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
7217 <actions_str, step_actions, step_actions_str>: Only include in
7218 GDBserver.
fa593d66
PA
7219 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7220 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7221 (tracepoints): Use IP_AGENT_EXPORT.
7222 (last_tracepoint): Don't include in the IPA.
7223 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7224 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7225 (alloced_trace_state_variables): New.
7226 (trace_state_variables): Use IP_AGENT_EXPORT.
7227 (traceframe_t): Delete unused variable.
7228 (circular_trace_buffer): Don't include in the IPA.
7229 (trace_buffer_start): Delete.
7230 (struct trace_buffer_control): New.
7231 (trace_buffer_free): Delete.
7232 (struct ipa_trace_buffer_control): New.
7233 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7234 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7235 New.
7236 (trace_buffer_ctrl): New.
7237 (TRACE_BUFFER_CTRL_CURR): New.
7238 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7239 Reimplement as macros.
7240 (trace_buffer_wrap): Delete.
7241 (traceframe_write_count, traceframe_read_count)
7242 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7243 (struct tracepoint_hit_ctx) <type>: New field.
7244 (struct fast_tracepoint_ctx): New.
7245 (memory_barrier): New.
7246 (cmpxchg): New.
7247 (record_tracepoint_error): Update atomically in the IPA.
7248 (clear_inferior_trace_buffer): New.
7249 (about_to_request_buffer_space): New.
7250 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7251 updating the same buffer.
7252 (add_tracepoint): Default the tracepoint's type to trap
7253 tracepoint, and orig_size to -1.
7254 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7255 internal variables.
7256 (create_trace_state_variable): New parameter `gdb'. Handle it.
7257 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7258 (cmd_qtdp): Handle fast tracepoints.
7259 (cmd_qtdv): Adjust.
7260 (max_jump_pad_size): New.
7261 (gdb_jump_pad_head): New.
7262 (get_jump_space_head): New.
7263 (claim_jump_space): New.
7264 (sort_tracepoints): New.
7265 (MAX_JUMP_SIZE): New.
7266 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7267 IPA.
7268 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7269 support. Upload fast traceframes, and delete internal IPA
7270 breakpoints.
7271 (stop_tracing_handler): New.
7272 (flush_trace_buffer_handler): New.
7273 (cmd_qtstop): Upload fast tracepoints.
7274 (response_tracepoint): Handle fast tracepoints.
7275 (tracepoint_finished_step): Upload fast traceframes. Set the
7276 tracepoint hit context's tracepoint type.
7277 (handle_tracepoint_bkpts): New.
7278 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7279 type. Add comment about fast tracepoints.
7280 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7281 non-existing action_str field.
7282 (get_context_regcache): Handle fast tracepoints.
7283 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7284 to the regcache.
7285 (fast_tracepoint_from_jump_pad_address): New.
7286 (fast_tracepoint_from_ipa_tpoint_address): New.
7287 (collecting_t): New.
7288 (force_unlock_trace_buffer): New.
7289 (fast_tracepoint_collecting): New.
7290 (collecting): New.
7291 (gdb_collect): New.
7292 (write_inferior_data_ptr): New.
7293 (target_tp_heap): New.
7294 (target_malloc): New.
7295 (download_agent_expr): New.
7296 (UALIGN): New.
7297 (download_tracepoints): New.
7298 (download_trace_state_variables): New.
7299 (upload_fast_traceframes): New.
7300 (IPA_FIRST_TRACEFRAME): New.
7301 (IPA_NEXT_TRACEFRAME_1): New.
7302 (IPA_NEXT_TRACEFRAME): New.
7303 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7304 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7305 (gdb_jump_pad_buffer_end): New.
7306 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7307 (initialize_tracepoint): Adjust.
7308 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7309 buffer. Initialize the low module.
7310 * utils.c (PREFIX, TOOLNAME): New.
7311 (malloc_failure): Use PREFIX.
7312 (error): In the IPA, an error causes an exit.
7313 (fatal, warning): Use PREFIX.
7314 (internal_error): Use TOOLNAME.
7315 (NUMCELLS): Increase to 10.
7316 * configure, config.in: Regenerate.
7317
d149dd1d
PA
73182010-06-01 Pedro Alves <pedro@codesourcery.com>
7319
7320 * server.c (handle_query) <qSupported>: Do two passes over the
7321 qSupported string to avoid nesting strtok.
7322
f6528abd
JK
73232010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7324
7325 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7326 (CDEPS): New.
7327 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7328 -Wl,--dynamic-list.
7329 * configure: Regenerate.
7330 * proc-service.list: New.
7331
ca2a87a0
JK
73322010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7333
7334 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7335 New comment.
7336
363a6e9f
OS
73372010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7338
7339 * gdbreplay.c (remote_open): Check error return from socket() call by
7340 its equality to -1 not by it being negative.
7341 * remote-utils.c (remote_open): Likewise.
7342
d23b6cb1
PA
73432010-05-23 Pedro Alves <pedro@codesourcery.com>
7344
7345 * config.h: Regenerate.
7346
28d3cf85
MK
73472010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7348
7349 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7350 doesn't provide PTRACE_GET_THREAD_AREA.
7351
fea36a59
MK
73522010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7353
7354 * linux-m68k-low.c: Include <asm/ptrace.h>
7355 (ps_get_thread_area): Implement.
7356
24b066ba
DE
73572010-05-03 Doug Evans <dje@google.com>
7358
7359 * event-loop.c (struct callback_event): New struct.
7360 (callback_list): New global.
7361 (append_callback_event, delete_callback_event): New functions.
7362 (process_callback): New function.
7363 (start_event_loop): Call it.
7364 * remote-utils.c (NOT_SCHEDULED): Define.
7365 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7366 moved out of readchar.
7367 (readchar): Rewrite. Call reschedule before returning.
7368 (reset_readchar): New function.
7369 (remote_close): Call it.
7370 (process_remaining, reschedule): New functions.
7371 * server.h (callback_handler_func): New typedef.
7372 (append_callback_event, delete_callback_event): Declare.
7373
9836d6ea
PA
73742010-05-03 Pedro Alves <pedro@codesourcery.com>
7375
7376 * proc-service.c (ps_pglobal_lookup): Use
7377 thread_db_look_up_one_symbol.
7378 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7379 parameter. Use it instead of all_symbols_looked_up.
7380 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7381 field.
7382 (all_symbols_looked_up): Don't declare.
7383 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7384 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7385 field.
7386 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7387 Set all_symbols_looked_up here.
7388 (thread_db_look_up_one_symbol): New.
7389 (thread_db_get_tls_address): Adjust.
7390 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7391 thread_db object on the heap, and tentatively set it in the
7392 process structure.
7393 (thread_db_init): Don't set all_symbols_looked_up here.
7394 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7395
7984d532
PA
73962010-05-03 Pedro Alves <pedro@codesourcery.com>
7397
7398 * linux-low.c (linux_kill, linux_detach): Adjust.
7399 (status_pending_p_callback): Remove redundant statement. Check
7400 for !TARGET_WAITIKIND_IGNORE, instead of
7401 TARGET_WAITKIND_STOPPED.
7402 (handle_tracepoints): Make sure LWP is locked. Adjust.
7403 (linux_wait_for_event_1): Adjust.
7404 (linux_cancel_breakpoints): New.
7405 (unsuspend_one_lwp): New.
7406 (unsuspend_all_lwps): New.
7407 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7408 (send_sigstop_callback): Change return type to int, add new
7409 `except' parameter and handle it.
7410 (suspend_and_send_sigstop_callback): New.
7411 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7412 pass them down. If SUSPEND, also increment the lwp's suspend
7413 count.
7414 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7415 (need_step_over_p): Don't consider suspended LWPs.
7416 (start_step_over): Adjust.
7417 (proceed_one_lwp): Change return type to int, add new `except'
7418 parameter and handle it.
7419 (unsuspend_and_proceed_one_lwp): New.
7420 (proceed_all_lwps): Use find_inferior instead of
7421 for_each_inferior.
7422 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7423 also decrement the suspend count of LWPs. Pass `except' down,
7424 instead of hacking its suspend count.
7425 (linux_pause_all): Add `freeze' parameter. Adjust.
7426 (linux_unpause_all): New.
7427 (linux_target_ops): Install linux_unpause_all.
7428 * server.c (handle_status): Adjust.
7429 * target.h (struct target_ops): New fields `unpause_all' and
7430 `cancel_breakpoints'. Add new parameter to `pause_all'.
7431 (pause_all): Add new `freeze' parameter.
7432 (unpause_all): New.
7433 (cancel_breakpoints): New.
7434 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7435 cancel breakpoints.
7436 (cmd_qtstart): Pause threads.
7437 (stop_tracing): Pause threads, and cancel breakpoints.
7438 * win32-low.c (win32_target_ops): Adjust.
7439
e471f25b
PA
74402010-05-03 Pedro Alves <pedro@codesourcery.com>
7441
7442 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7443 the inferior right away from here...
7444 (linux_wait_1): ... to here, and adjust to check the thread's
7445 last_resume_kind instead of the lwp's step or stop_expected flags.
7446
1915ef4f
PA
74472010-05-02 Pedro Alves <pedro@codesourcery.com>
7448
7449 * README: Use consistent `GDB' and `GDBserver' spellings.
7450
f9e39928
PA
74512010-05-02 Pedro Alves <pedro@codesourcery.com>
7452
7453 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7454 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7455 (linux_detach_one_lwp): Assume the lwp is stopped.
7456 (any_thread_of): Delete.
7457 (linux_detach): Stop all lwps here. Don't blindly delete all
7458 breakpoints.
7459 (delete_lwp_callback): New.
7460 (linux_mourn): Delete all lwps of the process that is gone.
7461 (linux_wait_1): Don't delete the last lwp of the process here.
7462 * mem-break.h (mark_breakpoints_out): Declare.
7463 * mem-break.c (mark_breakpoints_out): New.
7464 (free_all_breakpoints): Use it.
7465 * server.c (handle_target_event): If the process is gone, mark
7466 breakpoints out.
7467 * thread-db.c (struct thread_db) <create_bp>: New field.
7468 (thread_db_enable_reporting): Fix prototype. Store a thread event
7469 breakpoint reference in the thread_db struct.
7470 (thread_db_load_search): Clear the thread_db object.
7471 (try_thread_db_load_1): Ditto.
7472 (switch_to_process): New.
7473 (disable_thread_event_reporting): Use it.
7474 (remove_thread_event_breakpoints): New.
7475 (thread_db_detach, thread_db_mourn): Use it.
7476
1e7fc18c
PA
74772010-05-01 Pedro Alves <pedro@codesourcery.com>
7478
7479 * linux-low.c (linux_enable_event_reporting): New.
7480 (linux_wait_for_event_1, handle_extended_wait): Use it.
7481
02fc4de7
PA
74822010-04-30 Pedro Alves <pedro@codesourcery.com>
7483
7484 * linux-low.c (linux_kill_one_lwp, linux_kill)
7485 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7486 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7487 SIGSTOP even if the LWP is stopped.
7488 (send_sigstop_callback): New.
7489 (stop_all_lwps): Use send_sigstop_callback instead.
7490 (linux_resume_one_thread): Adjust.
7491 (proceed_one_lwp): Still proceed an LWP that the client has
7492 requested to stop, if we haven't reported it as stopped yet. Make
7493 sure that LWPs the client want stopped, have a pending SIGSTOP.
7494
bc3b5632
DE
74952010-04-26 Doug Evans <dje@google.com>
7496
ae1ada35
DE
7497 * server.c (handle_general_set): Make static.
7498
bc3b5632
DE
7499 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7500 Print received char after testing for error/eof instead of before.
7501 (input_interrupt): Tweak comment.
7502
65730243
DE
75032010-04-23 Doug Evans <dje@google.com>
7504
7505 * server.c (start_inferior): Print inferior argv if --debug.
7506
a8ae7dc0
AR
75072010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7508
7509 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7510 * nto-x86-low.c: Include server.h
7511
1c07cc19
PM
75122010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7513
7514 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7515 be consistent with other sources of this directory.
7516 (init_registers_amd64): Correct name of source file of this function
7517 in the comment.
7518
e0a61e09
PM
75192010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7520
7521 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7522 64-bit executables.
7523
54709339
PM
75242010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7525
7526 * win32-i386-low.c: Add 64-bit support.
7527 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7528 (init_registers_amd64): Declare.
7529 (mappings): Add 64-bit version of array.
7530 (init_windows_x86): New function.
7531 (the_low_target): Change init_arch field to init_windows_x86.
7532
e8f0053d
PM
75332010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7534
7535 * win32-low.c: Adapt to support also 64-bit architecture.
7536 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7537 (get_image_name): Use SIZE_T type for local variable `done'.
7538 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7539 (toolhelp_get_dll_name): Idem.
7540 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7541 Use uintptr_t typecast to avoid warning.
7542 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7543 (handle_exception): Use phex_nz to avoid warning.
7544 (win32_wait): Remove unused local variable `process'.
7545
c481e77e
PM
75462010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7547
7548 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7549 `amd64-avx.o'.
7550
12ea4b69
PM
75512010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7552
7553 * configure.ac: Use `ws2_32' library for srv_mingw.
7554 * configure: Regenerate.
7555 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7556 * remote-utils.c: Likewise.
7557
f6d1620c
L
75582010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7559
7560 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7561 if __x86_64__ is defined.
7562
8e642873
PM
75632010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7564
7565 * configure: Regenerate.
7566
711e434b
PM
75672010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7568
7569 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7570 * target.h (target_ops): New get_tib_address field.
7571 * win32-low.h (win32_thread_info): Add thread_local_base field.
7572 * win32-low.c (child_add_thread): Add tlb argument.
7573 Set thread_local_base field to TLB.
7574 (get_child_debug_event): Adapt to child_add_thread change.
7575 (win32_get_tib_address): New function.
7576 (win32_target_ops): Set get_tib_address field to
7577 win32_get_tib_address.
7578 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7579
505106cd
PA
75802010-04-12 Pedro Alves <pedro@codesourcery.com>
7581
505106cd
PA
7582 * linux-low.c (linux_mourn): Also remove the process.
7583 * server.c (handle_target_event): Don't remove the process here.
7584 * nto-low.c (nto_mourn): New.
7585 (nto_target_ops): Install it.
7586 * spu-low.c (spu_mourn): New.
7587 (spu_target_ops): Install it.
7588 * win32-low.c (win32_mourn): New.
7589 (win32_target_ops): Install it.
7590
e8470a06
PA
75912010-04-12 Pedro Alves <pedro@codesourcery.com>
7592
7593 * server.h (buffer_xml_printf): Remove redundant `;'.
7594
45ba0d02
PA
75952010-04-12 Pedro Alves <pedro@codesourcery.com>
7596
7597 * regcache.c (set_register_cache): Invalidate regcaches before
7598 changing the register cache layout.
7599 (regcache_invalidate_one): Allow a NULL regcache.
7600 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7601 regcaches before changing the register cache layout or the target
7602 regsets.
7603
59e04013
L
76042010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7605
7606 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7607 variable warning on Linux/x86-64.
7608
8336d594
PA
76092010-04-11 Pedro Alves <pedro@codesourcery.com>
7610
7611 GDBserver disconnected tracing support.
7612
7613 * linux-low.c (linux_remove_process): Delete.
7614 (add_lwp): Don't set last_resume_kind here.
7615 (linux_kill): Use `mourn'.
7616 (linux_detach): Use `thread_db_detach', and `mourn'.
7617 (linux_mourn): New.
7618 (linux_attach_lwp_1): Adjust comment.
7619 (linux_attach): last_resume_kind moved the thread_info; adjust.
7620 (status_pending_p_callback): Adjust.
7621 (linux_wait_for_event_1): Adjust.
7622 (count_events_callback, select_singlestep_lwp_callback)
7623 (select_event_lwp_callback, cancel_breakpoints_callback)
7624 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7625 (proceed_one_lwp): Adjust.
7626 (linux_async): Add debug output.
7627 (linux_thread_stopped): New.
7628 (linux_pause_all): New.
7629 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7630 linux_pause_all.
7631 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7632 (thread_db_free): Delete declaration.
7633 (thread_db_detach, thread_db_mourn): Declare.
7634 * thread-db.c (thread_db_init): Use thread_db_mourn.
7635 (thread_db_free): Delete, split in two.
7636 (disable_thread_event_reporting): New.
7637 (thread_db_detach): New.
7638 (thread_db_mourn): New.
7639
7640 * server.h (struct thread_info) <last_resume_kind>: New field.
7641 <attached>: Add comment.
7642 <gdb_detached>: New field.
7643 (handler_func): Change return type to int.
7644 (handle_serial_event, handle_target_event): Ditto.
7645 (gdb_connected): Declare.
7646 (tracing): Delete.
7647 (disconnected_tracing): Declare.
7648 (stop_tracing): Declare.
7649
7650 * server.c (handle_query) <qSupported>: Report support for
7651 disconnected tracing.
7652 (queue_stop_reply_callback): Account for running threads.
7653 (gdb_wants_thread_stopped): New.
7654 (gdb_wants_all_threads_stopped): New.
7655 (gdb_reattached_process): New.
7656 (handle_status): Clear the `gdb_detached' flag of all processes.
7657 In all-stop, stop all threads.
7658 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7659 (process_serial_event): If the remote connection breaks, or if an
7660 exit was forced with "monitor exit", force an event loop exit.
7661 Handle disconnected tracing on detach.
7662 (handle_serial_event): Adjust.
7663 (handle_target_event): If GDB isn't connected, forward events back
7664 to the inferior, unless the last process exited, in which case,
7665 exit gdbserver. Adjust interface.
7666
7667 * remote-utils.c (remote_open): Don't block in accept. Instead
7668 register an event loop source on the listen socket file
7669 descriptor. Refactor bits into ...
7670 (listen_desc): ... this new global.
7671 (gdb_connected): ... this new function.
7672 (enable_async_notification): ... this new function.
7673 (handle_accept_event): ... this new function.
7674 (remote_close): Clear remote_desc.
7675
7676 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7677
7678 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7679 New fields.
7680 (mourn_inferior): Define.
7681 (target_process_qsupported): Avoid the dangling else problem.
7682 (thread_stopped): Define.
7683 (pause_all): Define.
7684 (target_waitstatus_to_string): Declare.
7685 * target.c (target_waitstatus_to_string): New.
7686
7687 * tracepoint.c (tracing): Make extern.
7688 (disconnected_tracing): New.
7689 (stop_tracing): Make extern. Handle tracing stops due to GDB
7690 disconnecting.
7691 (cmd_qtdisconnected): New.
7692 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7693 (handle_tracepoint_general_set): Handle QTDisconnected.
7694
7695 * event-loop.c (event_handler_func): Change return type to int.
7696 (process_event): Bail out if the event handler wants the event
7697 loop to stop.
7698 (handle_file_event): Ditto.
7699 (start_event_loop): Bail out if the event handler wants the event
7700 loop to stop.
7701
7702 * nto-low.c (nto_target_ops): Adjust.
7703 * spu-low.c (spu_wait): Don't remove the process here.
7704 (spu_target_ops): Adjust.
7705 * win32-low.c (win32_wait): Don't remove the process here.
7706 (win32_target_ops): Adjust.
7707
5d267c4c
PA
77082010-04-11 Pedro Alves <pedro@codesourcery.com>
7709
7710 * regcache.c (realloc_register_cache): Invalidate inferior's
7711 regcache before recreating it.
7712
623ccd72
PA
77132010-04-09 Pedro Alves <pedro@codesourcery.com>
7714
7715 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7716
219f2f23
PA
77172010-04-09 Stan Shebs <stan@codesourcery.com>
7718 Pedro Alves <pedro@codesourcery.com>
7719
7720 * server.h (LONGEST): New.
7721 (struct thread_info) <while_stepping>: New field.
7722 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7723 Declare.
7724 (initialize_tracepoint, handle_tracepoint_general_set)
7725 (handle_tracepoint_query, tracepoint_finished_step)
7726 (tracepoint_was_hit, release_while_stepping_state_list):
7727 (current_traceframe): Declare.
7728 * server.c (handle_general_set): Handle tracepoint packets.
7729 (read_memory): New.
7730 (write_memory): New.
7731 (handle_search_memory_1): Use read_memory.
7732 (handle_query): Report support for conditional tracepoints, trace
7733 state variables, and tracepoint sources. Handle tracepoint
7734 queries.
7735 (main): Initialize the tracepoints module.
7736 (process_serial_event): Handle traceframe reads/writes.
7737
7738 * linux-low.c (handle_tracepoints): New.
7739 (linux_wait_1): Call it.
7740 (linux_resume_one_lwp): Handle while-stepping.
7741 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7742 (linux_target_ops): Install them.
7743 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7744 New field.
7745 * linux-x86-low.c (x86_supports_tracepoints): New.
7746 (the_low_target). Install it.
7747
7748 * mem-break.h (delete_breakpoint): Declare.
7749 * mem-break.c (delete_breakpoint): Make external.
7750
7751 * target.h (struct target_ops): Add `supports_tracepoints',
7752 `read_pc', and `write_pc' fields.
7753 (target_supports_tracepoints): Define.
7754 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7755 (phex_nz): New.
7756
7757 * regcache.h (struct regcache) <registers_owned>: New field.
7758 (init_register_cache, regcache_cpy): Declare.
7759 (regcache_read_pc, regcache_write_pc): Declare.
7760 (register_cache_size): Declare.
7761 (supply_regblock): Declare.
7762 * regcache.c (init_register_cache): New.
7763 (new_register_cache): Use it.
7764 (regcache_cpy): New.
7765 (register_cache_size): New.
7766 (supply_regblock): New.
7767 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 7768
219f2f23
PA
7769 * tracepoint.c: New.
7770
7771 * Makefile.in (OBS): Add tracepoint.o.
7772 (tracepoint.o): New rule.
7773
3a13a53b
L
77742010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7775
7776 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7777 (i386-mmx.o): New.
7778 (i386-mmx.c): Likewise.
7779 (i386-mmx-linux.o): Likewise.
7780 (i386-mmx-linux.c): Likewise.
7781
7782 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7783 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7784 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7785 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7786
7787 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7788 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7789 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7790
1570b33e
L
77912010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7792
7793 * Makefile.in (clean): Updated.
7794 (i386-avx.o): New.
7795 (i386-avx.c): Likewise.
7796 (i386-avx-linux.o): Likewise.
7797 (i386-avx-linux.c): Likewise.
7798 (amd64-avx.o): Likewise.
7799 (amd64-avx.c): Likewise.
7800 (amd64-avx-linux.o): Likewise.
7801 (amd64-avx-linux.c): Likewise.
7802
7803 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7804 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7805 (srv_amd64_regobj): Add amd64-avx.o.
7806 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7807 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7808 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7809 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7810 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7811 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7812 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7813
7814 * i387-fp.c: Include "i386-xstate.h".
7815 (i387_xsave): New.
7816 (i387_cache_to_xsave): Likewise.
7817 (i387_xsave_to_cache): Likewise.
7818 (x86_xcr0): Likewise.
7819
7820 * i387-fp.h (i387_cache_to_xsave): Likewise.
7821 (i387_xsave_to_cache): Likewise.
7822 (x86_xcr0): Likewise.
7823
7824 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7825 * linux-crisv32-low.c (target_regsets): Likewise.
7826 * linux-m68k-low.c (target_regsets): Likewise.
7827 * linux-mips-low.c (target_regsets): Likewise.
7828 * linux-ppc-low.c (target_regsets): Likewise.
7829 * linux-s390-low.c (target_regsets): Likewise.
7830 * linux-sh-low.c (target_regsets): Likewise.
7831 * linux-sparc-low.c (target_regsets): Likewise.
7832 * linux-xtensa-low.c (target_regsets): Likewise.
7833
7834 * linux-low.c: Include <sys/uio.h>.
7835 (regsets_fetch_inferior_registers): Support nt_type.
7836 (regsets_store_inferior_registers): Likewise.
7837 (linux_process_qsupported): New.
7838 (linux_target_ops): Add linux_process_qsupported.
7839
7840 * linux-low.h (regset_info): Add nt_type.
7841 (linux_target_ops): Add process_qsupported.
7842
7843 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7844 and <sys/uio.h>.
7845 (init_registers_i386_avx_linux): New.
7846 (init_registers_amd64_avx_linux): Likewise.
7847 (xmltarget_i386_linux_no_xml): Likewise.
7848 (xmltarget_amd64_linux_no_xml): Likewise.
7849 (PTRACE_GETREGSET): Likewise.
7850 (PTRACE_SETREGSET): Likewise.
7851 (x86_fill_xstateregset): Likewise.
7852 (x86_store_xstateregset): Likewise.
7853 (use_xml): Likewise.
7854 (x86_linux_update_xmltarget): Likewise.
7855 (x86_linux_process_qsupported): Likewise.
7856 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7857 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7858 init_registers_i386_linux here. Call
7859 x86_linux_update_xmltarget.
7860 (the_low_target): Add x86_linux_process_qsupported.
7861
7862 * server.c (handle_query): Call target_process_qsupported.
7863
7864 * target.h (target_ops): Add process_qsupported.
7865 (target_process_qsupported): New.
7866
fc7238bb
PA
78672010-04-03 Pedro Alves <pedro@codesourcery.com>
7868
7869 * inferiors.c (add_thread): Set last_status kind to
7870 TARGET_WAITKIND_IGNORE.
7871 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7872 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7873 (linux_wait_1): Move `thread' local definition to block that uses
7874 it. Don't NULL initialize `event_child'.
7875 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7876 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7877 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7878
bdabb078
PA
78792010-04-01 Pedro Alves <pedro@codesourcery.com>
7880
7881 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7882 an extended waitstatus, or by a watchpoint.
7883 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7884 thread was stepping or has been stopped by a watchpoint.
7885
d3bbe7a0
PA
78862010-04-01 Pedro Alves <pedro@codesourcery.com>
7887
7888 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7889 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7890 of another, then delete the previous, and validate all
7891 breakpoints.
7892 (validate_inserted_breakpoint): New.
7893 (delete_disabled_breakpoints): New.
7894 (validate_breakpoints): New.
7895 (check_mem_read): Validate breakpoints before trusting their
7896 shadow. Delete disabled breakpoints.
7897 (check_mem_write): Validate breakpoints before trusting they
7898 should be inserted. Delete disabled breakpoints.
7899 * mem-break.h (validate_breakpoints):
7900 * server.c (handle_query): Validate breakpoints when we see a
7901 qSymbol query.
7902
8b07ae33
PA
79032010-04-01 Pedro Alves <pedro@codesourcery.com>
7904
7905 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7906 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7907 if we could tell there's a GDB breakpoint at stop_pc.
7908 (need_step_over_p): Don't do a step over if we find a GDB
7909 breakpoint at the resume PC.
7910
7911 * mem-break.c (struct raw_breakpoint): New.
7912 (enum bkpt_type): New type `gdb_breakpoint'.
7913 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7914 fields. New field `raw'.
7915 (find_raw_breakpoint_at): New.
7916 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7917 breakpoint instead.
7918 (set_breakpoint_at): Adjust.
7919 (delete_raw_breakpoint): New.
7920 (release_breakpoint): New.
7921 (delete_breakpoint): Rename to...
7922 (delete_breakpoint_1): ... this. Add proc parameter. Use
7923 release_breakpoint. Return ENOENT.
7924 (delete_breakpoint): Reimplement.
7925 (find_breakpoint_at): Delete.
7926 (find_gdb_breakpoint_at): New.
7927 (delete_breakpoint_at): Delete.
7928 (set_gdb_breakpoint_at): New.
7929 (delete_gdb_breakpoint_at): New.
7930 (gdb_breakpoint_here): New.
7931 (set_reinsert_breakpoint): Use release_breakpoint.
7932 (uninsert_breakpoint): Rename to ...
7933 (uninsert_raw_breakpoint): ... this.
7934 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7935 (reinsert_raw_breakpoint): Change parameter type to
7936 raw_breakpoint.
7937 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7938 instead.
7939 (check_breakpoints): Adjust. Use release_breakpoint.
7940 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7941 (breakpoint_inserted_here): Ditto.
7942 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7943 Don't trust the breakpoint's shadow if it is not inserted.
7944 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7945 (delete_all_breakpoints): Adjust.
7946 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7947 use delete_breakpoint_1.
7948
7949 * mem-break.h (breakpoints_supported): Delete declaration.
7950 (set_gdb_breakpoint_at): Declare.
7951 (gdb_breakpoint_here): Declare.
7952 (delete_breakpoint_at): Delete.
7953 (delete_gdb_breakpoint_at): Declare.
7954
7955 * server.h (struct raw_breakpoint): Forward declare.
7956 (struct process_info): New field `raw_breakpoints'.
7957
7958 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7959 breakpoints.
7960
6bf5e0ba
PA
79612010-03-24 Pedro Alves <pedro@codesourcery.com>
7962
7963 * linux-low.c (status_pending_p_callback): Fix comment.
7964 (linux_wait_for_event_1): Move most of the internal breakpoint
7965 handling from here...
7966 (linux_wait_1): ... to here.
7967 (count_events_callback): New.
7968 (select_singlestep_lwp_callback): New.
7969 (select_event_lwp_callback): New.
7970 (cancel_breakpoints_callback): New.
7971 (select_event_lwp): New.
7972 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7973 priority to all LWPs that have had events that should be reported
7974 to the client. Cancel breakpoints when about to reporting the
7975 event to the client, not while stopping lwps. No longer cancel
7976 finished single-steps here.
7977 (cancel_finished_single_step): Delete.
7978 (cancel_finished_single_steps): Delete.
7979
414a389f
PA
79802010-03-24 Pedro Alves <pedro@codesourcery.com>
7981
7982 * mem-break.c (enum bkpt_type): New.
7983 (struct breakpoint): New field `type'.
7984 (set_breakpoint_at): Change return type to struct breakpoint
7985 pointer. Set type to `other_breakpoint' by default.
7986 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7987 in the breakpoint list.
7988 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7989 (reinsert_breakpoint): Rename to ...
7990 (reinsert_raw_breakpoint): ... this.
7991 (reinsert_breakpoints_at): Adjust.
7992 * mem-break.h (struct breakpoint): Declare.
7993 (set_breakpoint_at): Change return type to struct breakpoint
7994 pointer.
7995
2280c721
PA
79962010-03-24 Pedro Alves <pedro@codesourcery.com>
7997
7998 * server.c (handle_query): Assign, not compare.
7999
d50171e4
PA
80002010-03-24 Pedro Alves <pedro@codesourcery.com>
8001
8002 Teach linux gdbserver to step-over-breakpoints.
8003
8004 * linux-low.c (can_hardware_single_step): New.
8005 (supports_breakpoints): New.
8006 (handle_extended_wait): If stopping threads, read the stop pc of
8007 the new cloned LWP.
8008 (get_pc): New.
8009 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8010 low target doesn't support retrieving the PC.
8011 (add_lwp): Set last_resume_kind to resume_continue.
8012 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8013 (linux_attach): Don't clear stop_expected. Set the lwp's
8014 last_resume_kind to resume_stop.
8015 (linux_detach_one_lwp): Don't check for removed breakpoints.
8016 (check_removed_breakpoint): Delete.
8017 (status_pending_p): Rename to ...
8018 (status_pending_p_callback): ... this. Don't check for removed
8019 breakpoints. Don't consider threads that are stopped from GDB's
8020 perspective.
8021 (linux_wait_for_lwp): Always read the stop_pc here.
8022 (cancel_breakpoint): New.
8023 (step_over_bkpt): New global.
8024 (linux_wait_for_event_1): Implement stepping over breakpoints.
8025 (gdb_wants_lwp_stopped): New.
8026 (gdb_wants_all_stopped): New.
8027 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8028 single-step traps here. Store the thread's last reported target
8029 wait status.
8030 (send_sigstop): Don't clear stop_expected. Always set it,
8031 instead.
8032 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8033 (cancel_finished_single_step): New.
8034 (cancel_finished_single_steps): New.
8035 (wait_for_sigstop): Don't cancel finished single-step traps here.
8036 (linux_resume_one_lwp): Don't check for removed breakpoints.
8037 Don't set `step' on non-hardware step archs.
8038 (linux_set_resume_request): Ignore resume_stop requests if already
8039 stopping or stopped. Set the lwp's last_resume_kind.
8040 (resume_status_pending_p): Don't check for removed breakpoints.
8041 (need_step_over_p): New.
8042 (start_step_over): New.
8043 (finish_step_over): New.
8044 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8045 requests. Clear the thread's last reported target waitstatus.
8046 Don't use the `suspended' flag. Don't consider pending breakpoints.
8047 (linux_resume): Start a step-over if necessary.
8048 (proceed_one_lwp): New.
8049 (proceed_all_lwps): New.
8050 (unstop_all_lwps): New.
8051 * linux-low.h (struct lwp_info): Rewrite comment for the
8052 `suspended' flag. Add the `stop_pc' field. Delete the
8053 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8054 Add `'last_resume_kind' and `need_step_over' fields.
8055 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8056 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8057 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8058 (set_raw_breakpoint_at): New.
8059 (set_breakpoint_at): Rewrite to use it.
8060 (reinsert_breakpoint_handler): Delete.
8061 (set_reinsert_breakpoint): New.
8062 (reinsert_breakpoint_by_bp): Delete.
8063 (delete_reinsert_breakpoints): New.
8064 (uninsert_breakpoint): Rewrite.
8065 (uninsert_breakpoints_at): New.
8066 (reinsert_breakpoint): Rewrite.
8067 (reinsert_breakpoints_at): New.
8068 (check_breakpoints): Rewrite.
8069 (breakpoint_here): New.
8070 (breakpoint_inserted_here): New.
8071 (check_mem_read): Adjust.
8072 * mem-break.h (breakpoints_supported, breakpoint_here)
8073 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8074 (reinsert_breakpoint_by_bp): Delete declaration.
8075 (delete_reinsert_breakpoints): Declare.
8076 (reinsert_breakpoint): Delete declaration.
8077 (reinsert_breakpoints_at): Declare.
8078 (uninsert_breakpoint): Delete declaration.
8079 (uninsert_breakpoints_at): Declare.
8080 (check_breakpoints): Adjust prototype.
8081 * server.h: Adjust include order.
8082 (struct thread_info): Declare here. Add a `last_status' field.
8083
30ba68cb
MS
80842010-03-23 Michael Snyder <msnyder@vmware.com>
8085
8086 * server.c (crc32): New function.
8087 (handle_query): Add handling for 'qCRC:' request.
8088
b9a881c2
PA
80892010-03-23 Pedro Alves <pedro@codesourcery.com>
8090
8091 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8092 lwp had been stopped by a watchpoint.
8093
e92d13d5
PA
80942010-03-16 Pedro Alves <pedro@codesourcery.com>
8095
8096 * server.h (internal_error): Declare.
8097 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8098 * utils.c (internal_error): New function.
8099
64daa791
AS
81002010-03-15 Andreas Schwab <schwab@redhat.com>
8101
8102 * configure.srv: Fix typo setting srv_regobj.
8103
f52cd8cd
PA
81042010-03-15 Pedro Alves <pedro@codesourcery.com>
8105
8106 * linux-low.c (fetch_register): Avoid passing a non string literal
8107 format to `error'.
8108 (usr_store_inferior_registers): Ditto.
8109
93ae6fdc
PA
81102010-03-14 Pedro Alves <pedro@codesourcery.com>
8111
8112 * linux-low.c (linux_write_memory): Bail out early if peeking
8113 memory failed.
8114
c3adc08c
PA
81152010-03-14 Pedro Alves <pedro@codesourcery.com>
8116
8117 * linux-low.h (struct lwp_info): New fields
8118 `stopped_by_watchpoint' and `stopped_data_address'.
8119 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8120 here, and cache them in the lwp object.
8121 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8122 directly.
8123 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8124 field.
8125 (linux_stopped_by_watchpoint): Rewrite.
8126 (linux_stopped_data_address): Rewrite.
8127
bce522a2
PA
81282010-03-06 Simo Melenius <simo.melenius@iki.fi>
8129
8130 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8131 switching the current inferior, not before.
8132
90884b2b
L
81332010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8134
8135 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8136 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8137 i386-linux.c and amd64-linux.c.
8138 (reg-i386.o): Removed.
8139 (reg-i386.c): Likewise.
8140 (reg-i386-linux.o): Likewise.
8141 (reg-i386-linux.c): Likewise.
8142 (reg-x86-64.o): Likewise.
8143 (reg-x86-64.c): Likewise.
8144 (reg-x86-64-linux.o): Likewise.
8145 (reg-x86-64-linux.c): Likewise.
8146 (i386.o): New.
8147 (i386.c): Likewise.
8148 (i386-linux.o): Likewise.
8149 (i386-linux.c): Likewise.
8150 (amd64.o): Likewise.
8151 (amd64.c): Likewise.
8152 (amd64-linux.o): Likewise.
8153 (amd64-linux.c): Likewise.
8154
8155 * configure.srv (srv_i386_regobj): New.
8156 (srv_i386_linux_regobj): Likewise.
8157 (srv_amd64_regobj): Likewise.
8158 (srv_amd64_linux_regobj): Likewise.
8159 (srv_i386_32bit_xmlfiles): Likewise.
8160 (srv_i386_64bit_xmlfiles): Likewise.
8161 (srv_i386_xmlfiles): Likewise.
8162 (srv_amd64_xmlfiles): Likewise.
8163 (srv_i386_linux_xmlfiles): Likewise.
8164 (srv_amd64_linux_xmlfiles): Likewise.
8165 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8166 srv_xmlfiles to $srv_i386_xmlfiles.
8167 (i[34567]86-*-mingw32ce*): Likewise.
8168 (i[34567]86-*-mingw*): Likewise.
8169 (i[34567]86-*-nto*): Likewise.
8170 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8171 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8172 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8173 (x86_64-*-linux*): Likewise.
8174
8175 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8176 (init_registers_amd64_linux): New.
8177 (x86_arch_setup): Replace init_registers_x86_64_linux with
8178 init_registers_amd64_linux.
8179
193f13e6
MK
81802010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8181
8182 * configure.ac: Check for libdl. If it is not available link against
8183 static libthread_db.
8184 * configure: Regenerate.
8185
85d721b8
PA
81862010-02-22 Pedro Alves <pedro@codesourcery.com>
8187
8188 PR9605
8189
8190 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8191 handing a read watchpoint.
8192 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8193
6076632b
DE
81942010-02-12 Doug Evans <dje@google.com>
8195
8196 * linux-low.c (linux_supports_tracefork_flag): Document.
8197 (linux_look_up_symbols): Add comment.
8198
3327ccf7
L
81992010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8200
8201 * regcache.c (supply_register): Clear regcache if buf is NULL.
8202
0718675c 82032010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 8204 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
8205
8206 * inferiors.c (find_inferior): Add function documentation.
8207 (unloaded_dll): Handle the case where the unloaded dll has not
8208 been previously registered in the dll list.
8209
177321bd
DJ
82102010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8211
8212 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8213 (thumb2_breakpoint): New.
8214 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8215
2b009048
DJ
82162010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8217
8218 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8219 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8220 breakpoints.
8221
3be029c7
PA
82222010-01-21 Pedro Alves <pedro@codesourcery.com>
8223
8224 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8225
18f5de3b
JK
82262010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8227
8228 * linux-s390-low.c (s390_collect_ptrace_register)
8229 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8230
3743bb4f
DE
82312010-01-21 Doug Evans <dje@google.com>
8232
14ce3065
DE
8233 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8234 (PTRACE_ARG4_TYPE): New macro.
8235 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8236 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8237 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8238 (usr_store_inferior_registers): Ditto.
8239 (linux_read_memory, linux_write_memory): Ditto.
8240 (linux_test_for_tracefork): Ditto.
8241
3743bb4f
DE
8242 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8243 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8244
8b315be5
PA
82452010-01-21 Pedro Alves <pedro@codesourcery.com>
8246
8247 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8248 target.
8249
85492558
PA
82502010-01-21 Pedro Alves <pedro@codesourcery.com>
8251
8252 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8253 prototype to take a regcache. Adjust.
8254
442ea881
PA
82552010-01-20 Pedro Alves <pedro@codesourcery.com>
8256
8257 * regcache.h (struct thread_info): Forward declare.
8258 (struct regcache): New.
8259 (new_register_cache): Adjust prototype.
8260 (get_thread_regcache): Declare.
8261 (free_register_cache): Adjust prototype.
8262 (registers_to_string, registers_from_string): Ditto.
8263 (supply_register, supply_register_by_name, collect_register)
8264 (collect_register_as_string, collect_register_by_name): Ditto.
8265 * regcache.c (struct inferior_regcache_data): Delete.
8266 (get_regcache): Rename to ...
8267 (get_thread_regcache): ... this. Adjust. Switch inferior before
8268 fetching registers.
8269 (regcache_invalidate_one): Adjust.
8270 (regcache_invalidate): Fix prototype.
8271 (new_register_cache): Return the new register cache.
8272 (free_register_cache): Change prototype.
8273 (realloc_register_cache): Adjust.
8274 (registers_to_string): Change prototype to take a regcache. Adjust.
8275 (registers_from_string): Ditto.
8276 (register_data): Ditto.
8277 (supply_register): Ditto.
8278 (supply_register_by_name): Ditto.
8279 (collect_register): Ditto.
8280 (collect_register_as_string): Ditto.
8281 (collect_register_by_name): Ditto.
8282 * server.c (process_serial_event): Adjust.
8283 * linux-low.h (regset_fill_func, regset_store_func): Change
8284 prototype.
8285 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8286 Change prototype.
8287 * linux-low.c (get_stop_pc): Adjust.
8288 (check_removed_breakpoint): Adjust.
8289 (linux_wait_for_event): Adjust.
8290 (linux_resume_one_lwp): Adjust.
8291 (fetch_register): Add regcache parameter. Adjust.
8292 (usr_store_inferior_registers): Ditto.
8293 (regsets_fetch_inferior_registers): Ditto.
8294 (regsets_store_inferior_registers): Ditto.
8295 (linux_fetch_registers, linux_store_registers): Ditto.
8296 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8297 regcache. Adjust.
43aaf8b6
PA
8298 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8299 Ditto.
442ea881
PA
8300 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8301 prototype to take a regcache.
8302 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8303 * remote-utils.c (convert_ascii_to_int, outreg)
8304 (prepare_resume_reply): Change prototype to take a regcache.
8305 Adjust.
8306 * target.h (struct target_ops) <fetch_registers, store_registers>:
8307 Change prototype to take a regcache.
8308 (fetch_inferior_registers, store_inferior_registers): Change
8309 prototype to take a regcache. Adjust.
8310 * proc-service.c (ps_lgetregs): Adjust.
8311 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8312 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8313 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8314 take a regcache. Adjust.
8315 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8316 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8317 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8318 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8319 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8320 (cris_cannot_fetch_register):
8321 (cris_breakpoint_at): Change prototype to take a regcache.
8322 Adjust.
8323 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8324 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8325 to take a regcache. Adjust.
8326 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8327 Adjust.
8328 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8329 take a regcache. Adjust.
8330 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8331 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8332 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8333 * linux-mips-low.c (mips_get_pc):
8334 (mips_set_pc): Change prototype to take a regcache. Adjust.
8335 (mips_reinsert_addr): Adjust.
8336 (mips_collect_register): Change prototype to take a regcache.
8337 Adjust.
8338 (mips_supply_register):
8339 (mips_collect_register_32bit, mips_supply_register_32bit)
8340 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8341 (mips_store_fpregset): Ditto.
43aaf8b6
PA
8342 * linux-ppc-low.c (ppc_supply_ptrace_register)
8343 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
8344 (parse_spufs_run): Adjust.
8345 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8346 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8347 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8348 take a regcache. Adjust.
8349 * linux-s390-low.c (s390_collect_ptrace_register)
8350 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8351 (s390_set_pc): Change prototype to take a regcache. Adjust.
8352 (s390_arch_setup): Adjust.
8353 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8354 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8355 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8356 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8357 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8358 regcache. Adjust.
8359 (sparc_breakpoint_at): Adjust.
8360 * linux-xtensa-low.c (xtensa_fill_gregset):
8361 (xtensa_store_gregset):
8362 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8363 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8364 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8365 prototype to take a regcache. Adjust.
8366 * win32-arm-low.c (arm_fetch_inferior_register)
8367 (arm_store_inferior_register): Change prototype to take a
8368 regcache. Adjust.
8369 * win32-i386-low.c (i386_fetch_inferior_register)
8370 (i386_store_inferior_register): Change prototype to take a
8371 regcache. Adjust.
8372 * win32-low.c (child_fetch_inferior_registers)
8373 (child_store_inferior_registers): Change prototype to take a
8374 regcache. Adjust.
8375 (win32_wait): Adjust.
8376 (win32_fetch_inferior_registers): Change prototype to take a
8377 regcache. Adjust.
8378 (win32_store_inferior_registers): Adjust.
8379 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8380 store_inferior_register>: Change prototype to take a regcache.
8381
60c3d7b0
DE
83822010-01-20 Doug Evans <dje@google.com>
8383
8384 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8385 #ifdef.
8386 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 8387 (W_STOPCODE): Provide definition if missing.
60c3d7b0 8388
dc146f7c
VP
83892010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8390
8391 * linux-low.c (linux_core_of_thread): New.
8392 (compare_ints, show_process, list_threads): New.
8393 (linux_qxfer_osdata): Report threads and cores.
8394 (linux_target_op): Register linux_core_of_thread.
8395 * remote-utils.c (prepare_resume_reply): Report the core.
8396 (buffer_xml_printf): Support %d specifier.
8397 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8398 New.
8399 (handle_query): Handle qXfer:threads. Announce availability
8400 thereof.
8401 * target.h (struct target_ops): New field core_of_thread.
8402
7803799a
UW
84032010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8404
8405 * Makefile.in (clean): Remove new generated files.
8406 (reg-s390.o, reg-s390.c): Remove rules.
8407 (reg-s390x.o, reg-s390x.c): Likewise.
8408 (s390-linux32.o, s390-linux32.c): Add rules.
8409 (s390-linux64.o, s390-linux64.c): Likewise.
8410 (s390x-linux64.o, s390x-linux64.c): Likewise.
8411 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8412 * linux-s390-low.c: Include <elf.h>.
8413 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8414 (init_registers_s390): Remove prototype.
8415 (init_registers_s390x): Likewise.
8416 (init_registers_s390_linux32): Add prototype.
8417 (init_registers_s390_linux64): Likewise.
8418 (init_registers_s390x_linux64): Likewise.
8419 (s390_num_regs_3264): New define.
8420 (s390_regmap_3264): New global variable.
8421 (s390_cannot_fetch_register): Remove obsolete check.
8422 (s390_cannot_store_register): Likewise.
8423 (s390_collect_ptrace_register): Handle upper/lower register halves.
8424 (s390_supply_ptrace_register): Likewise.
8425 (s390_fill_gregset): Update to register number changes.
8426 (s390_get_hwcap): New routine.
8427 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8428 Install appropriate regmap and register set.
8429
6e7ffa39
JB
84302010-01-01 Joel Brobecker <brobecker@adacore.com>
8431
8432 * server.c (gdbserver_version): Update copyright year to 2010.
8433 * gdbreplay.c (gdbreplay_version): Likewise.
8434
957f3f49
DE
84352009-12-28 Doug Evans <dje@google.com>
8436
8437 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8438 elf/external.h. Include <elf.h> instead but only if necessary.
8439
ca5c370d
PA
84402009-12-28 Pedro Alves <pedro@codesourcery.com>
8441
8442 * linux-low.c (linux_remove_process): Remove `detaching'
8443 parameter. Don't release/detach from thread_db here.
8444 (linux_kill): Release/detach from thread_db here, ...
8445 (linux_detach): ... and here, before actually detaching.
8446 (linux_wait_1): ... and here, when a process exits.
8447 * thread-db.c (any_thread_of): New.
8448 (thread_db_free): Switch the current inferior to a thread of the
8449 passed in process.
8450
4ee62156
DE
84512009-12-21 Doug Evans <dje@google.com>
8452
d90e6a88
DE
8453 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8454
c5f62d5f
DE
8455 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8456 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8457 warning ifndef __NR_tkill. Move setting of errno there too.
8458 Delete unnecessary resetting of errno after syscall.
8459 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8460
10e86dd7
DE
8461 * configure.ac: Check for dladdr.
8462 * config.in: Regenerate.
8463 * configure: Regenerate.
8464 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8465 (try_thread_db_load): Update.
8466
4ee62156
DE
8467 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8468
00f515da
DE
84692009-12-18 Doug Evans <dje@google.com>
8470
e9464885
DE
8471 * event-loop.c: Include unistd.h if it exists.
8472
07d4f67e
DE
8473 * linux-low.c (my_waitpid): Move definition away from being in
8474 between linux_tracefork_child/linux_test_for_tracefork.
8475
00f515da
DE
8476 * gdb_proc_service.h (psaddr_t): Fix type.
8477 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8478 signature to match glibc.
8479
1de1badb
DE
84802009-12-16 Doug Evans <dje@google.com>
8481
8482 * linux-low.c (linux_read_memory): Fix argument to read.
8483
aeeb81d1
PA
84842009-11-26 Pedro Alves <pedro@codesourcery.com>
8485
8486 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8487 events, don't leave current_inferior pointing at null.
8488
10357975
PA
84892009-11-26 Pedro Alves <pedro@codesourcery.com>
8490
8491 * win32-low.c (LOG): Delete.
8492 (OUTMSG): Output to stderr.
8493 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8494 on compile time LOG macro.
8495 (win32_wait): Fix debug output.
8496
cf6e3471
PA
84972009-11-26 Pedro Alves <pedro@codesourcery.com>
8498
8499 * win32-low.c (win32_add_one_solib): If the dll name is
8500 "ntdll.dll", prepend the system directory to the dll path.
8501
0c85e18e
MK
85022009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8503
8504 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8505
9ac544ce 85062009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 8507 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
8508
8509 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8510 * configure.ac: Check for __mcoldfire__ and set
8511 gdb_cv_m68k_is_coldfire.
8512 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8513 reg-cf.o and reg-m68k.o.
8514 * configure: Regenerated.
8515
fd7dd3e6
PA
85162009-11-16 Pedro Alves <pedro@codesourcery.com>
8517
8518 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8519 Pass it to thread_db_free.
8520 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8521 proper `detaching' argument to linux_remove_process.
8522 * linux-low.h (thread_db_free): Add `detaching' parameter.
8523 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8524 to thread_db_free.
8525 (thread_db_free): Add `detaching' parameter. Only
8526 call td_ta_clear_event if detaching from process.
8527
75aa492e
MK
85282009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8529
8530 * thread-db.c (thread_db_free): Fix typo.
8531
21e1bee4
PP
85322009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8533
8534 PR gdb/10838
8535 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8536
8838b45e
NS
85372009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8538
8539 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8540 with an i686 compiler.
8541 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8542 needed.
8543 * configure: Rebuilt.
8544
8a35fb51
SL
85452009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8546
8547 PR gdb/10783
8548
8549 * server.c (handle_search_memory_1): Correct read_addr initialization
8550 in loop for searching subsequent chunks.
8551
96f15937
PP
85522009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8553
8554 * configure.ac: New --with-libthread-db option.
8555 * thread-db.c: Allow direct dependence on libthread_db.
8556 (thread_db_free): Adjust.
8557 * config.in: Regenerate.
8558 * configure: Likewise.
889bf7c5 8559
5f7d1694
PP
85602009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8561
8562 PR gdb/10757
8563 * thread-db.c (attach_thread): New function.
8564 (maybe_attach_thread): Return success/failure.
8565 (find_new_threads_callback): Adjust.
889bf7c5
PA
8566 (thread_db_find_new_threads): Loop until no new threads.
8567
88e3b899
PA
85682009-10-13 Pedro Alves <pedro@codesourcery.com>
8569
8570 * proc-service.c (ps_lgetregs): Formatting.
8571
cdbfd419
PP
85722009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8573
8574 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8575 * configure.ac: Adjust.
8576 * linux-low.h (struct process_info_private): Move members to struct
8577 thread_db.
8578 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8579 * linux-low.c (linux_remove_process): Adjust.
8580 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8581 * server.c (handle_query): Move code ...
8582 (handle_monitor_command): ... here. New function.
8583 * target.h (struct target_ops): New member.
8584 * thread-db.c (struct thread_db): New.
8585 (libthread_db_search_path): New variable.
8586 (thread_db_create_event, thread_db_enable_reporting)
8587 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8588 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8589 (try_thread_db_load_1, dladdr_to_soname): New functions.
8590 (try_thread_db_load, thread_db_load_search): New functions.
8591 (thread_db_init): Search for libthread_db.
8592 (thread_db_free): New function.
8593 (thread_db_handle_monitor_command): Likewise.
8594 * config.in: Regenerate.
8595 * configure: Regenerate.
889bf7c5 8596
4168d2d6
UW
85972009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8598
8599 * spu-low.c (spu_kill): Wait for inferior to terminate.
8600 Call clear_inferiors.
8601 (spu_detach): Call clear_inferiors.
8602
81ecdfbb
RW
86032009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8604
8605 * aclocal.m4: Regenerate.
8606 * config.in: Likewise.
8607 * configure: Likewise.
8608
0b9ff2c0
UW
86092009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8610
8611 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8612 (parse_spufs_run): New function.
8613 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8614 (ppc_breakpoint_at): Handle SPU breakpoints.
8615
efcbbd14
UW
86162009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8617
8618 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8619 (SPUFS_MAGIC): Define.
8620 (spu_enumerate_spu_ids): New function.
8621 (linux_qxfer_spu): New function.
8622 (linux_target_ops): Install linux_qxfer_spu.
8623
f4d9bade
UW
86242009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8625
8626 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8627 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8628 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8629 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8630 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8631 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8632 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8633 (init_registers_powerpc_cell32l): Add prototype.
8634 (init_registers_powerpc_cell64l): Likewise.
8635 (ppc_arch_setup): Detect Cell/B.E. architecture.
8636
96e946ca
RW
86372009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8638
8639 * Makefile.in (datarootdir): New variable.
8640
58d6951d
DJ
86412009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8642
8643 * linux-low.c (linux_write_memory): Update debugging output.
8644 * Makefile.in (clean): Add new descriptions.
8645 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8646 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8647 * configure.srv: Add new files for arm*-*-linux*.
8648 * linux-arm-low.c: Add new declarations.
8649 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8650 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8651 (HWCAP_VFPv3D16): New.
8652 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8653 instead of __IWMMXT__.
8654 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8655 (arm_arch_setup): New.
8656 (target_regsets): Remove #ifdef. Add VFP regset.
8657 (the_low_target): Use arm_arch_setup.
8658
12b42a12
DJ
86592009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8660
8661 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8662 the main thread again.
8663
ac8c974e
AR
86642009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8665
8666 Adding Neutrino gdbserver.
8667 * configure: Regenerated.
8668 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8669 * configure.srv (i[34567]86-*-nto*): New target.
8670 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8671 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8672 (nto_comctrl) [__QNX__]: New function.
8673 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8674
4424e0c3 86752009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
8676
8677 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8678 srv_tgtobj.
8679
912cf4ba
PA
86802009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8681 Pedro Alves <pedro@codesourcery.com>
8682
8683 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8684 don't support CONTEXT_EXTENDED_REGISTERS.
8685 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8686 (the_low_target): Install them.
8687 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8688 failing with ERROR_PIPE_NOT_CONNECTED.
8689
aa5ca48f
DE
86902009-06-30 Doug Evans <dje@google.com>
8691 Pierre Muller <muller@ics.u-strasbg.fr>
8692
8693 Add h/w watchpoint support to x86-linux, win32-i386.
8694 * Makefile.in (SFILES): Add i386-low.c
8695 (i386_low_h): Define.
8696 (i386-low.o): Add dependencies.
8697 (linux-x86-low.o): Add i386-low.h dependency.
8698 (win32-i386-low.o): Ditto.
8699 * i386-low.c: New file.
8700 * i386-low.h: New file.
8701 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8702 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8703 * linux-low.c (linux_add_process): Initialize arch_private.
8704 (linux_remove_process): Free arch_private.
8705 (add_lwp): Initialize arch_private.
8706 (delete_lwp): Free arch_private.
8707 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8708 provided.
8709 * linux-low.h (process_info_private): New member arch_private.
8710 (lwp_info): New member arch_private.
8711 (linux_target_ops): New members new_process, new_thread,
8712 prepare_to_resume.
8713 (ptid_of): New macro.
8714 * linux-x86-low.c: Include stddef.h, i386-low.h.
8715 (arch_process_info): New struct.
8716 (arch_lwp_info): New struct.
8717 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8718 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8719 (i386_dr_low_get_status): New function.
8720 (x86_insert_point, x86_remove_point): New functions.
8721 (x86_stopped_by_watchpoint): New function.
8722 (x86_stopped_data_address): New function.
8723 (x86_linux_new_process, x86_linux_new_thread): New functions.
8724 (x86_linux_prepare_to_resume): New function.
8725 (the_low_target): Add entries for insert_point, remove_point,
8726 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8727 prepare_to_resume.
8728 * server.c (debug_hw_points): New global.
8729 (monitor_show_help): Document set debug-hw-points.
8730 (handle_query): Process "set debug-hw-points".
8731 * server.h (debug_hw_points): Declare.
8732 (paddress): Declare.
8733 * utils.c (NUMCELLS, CELLSIZE): New macros.
8734 (get_sell, xsnprintf, paddress): New functions.
8735 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8736 remove_point, stopped_by_watchpoint, stopped_data_address.
8737 * win32-i386-low.c: Include i386-low.h.
8738 (debug_reg_state): Replaces dr.
8739 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8740 (i386_dr_low_get_status): New function.
8741 (i386_insert_point, i386_remove_point): New functions.
8742 (i386_stopped_by_watchpoint): New function.
8743 (i386_stopped_data_address): New function.
8744 (i386_initial_stuff): Update.
8745 (get_thread_context,set_thread_context,i386_thread_added): Update.
8746 (the_low_target): Add entries for insert_point,
8747 remove_point, stopped_by_watchpoint, stopped_data_address.
8748 * win32-low.c (win32_insert_watchpoint): New function.
8749 (win32_remove_watchpoint): New function.
8750 (win32_stopped_by_watchpoint): New function.
8751 (win32_stopped_data_address): New function.
8752 (win32_target_ops): Add entries for insert_watchpoint,
8753 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8754 * win32-low.h (win32_target_ops): New members insert_point,
8755 remove_point, stopped_by_watchpoint, stopped_data_address.
8756
d993e290
PA
87572009-06-25 Pedro Alves <pedro@codesourcery.com>
8758
8759 * server.c (process_serial_event): Re-return unsupported, not
8760 error, if the type isn't recognized. Re-allow supporting only
8761 insert or remove packets. Also call require_running for
8762 breakpoints. Add missing break statement to default case. Tidy.
8763 * target.h (struct target_ops): Rename insert_watchpoint to
8764 insert_point, and remove_watchpoint to remove_point.
8765
8766 * linux-low.h (struct linux_target_ops): Likewise.
8767 * linux-low.c (linux_insert_watchpoint): Rename to ...
8768 (linux_insert_point): ... this. Adjust.
8769 (linux_remove_watchpoint): Rename to ...
8770 (linux_remove_point): ... this. Adjust.
8771 (linux_target_ops): Adjust.
8772 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8773 (cris_insert_point): ... this.
8774 (cris_remove_watchpoint): Rename to ...
8775 (cris_remove_point): ... this.
8776 (the_low_target): Adjust.
8777
0f54c268
PM
87782009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8779
8780 * server.c (handle_v_kill): Pass signal_pid to
8781 kill_inferior if multi_process is zero.
8782
c6314022
AR
87832009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8784
8785 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8786 * target.h (target_ops): Comment for *_watchpoint to make it clear
8787 the functions can get types '0' and '1'.
8788
4463ce24
AR
87892009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8790
8791 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8792 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8793 * regcache.c (get_regcache): Likewise.
8794 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8795 * win32-low.c (child_fetch_inferior_registers): Remove check for
8796 regno 0.
8797
cf8fd78b
PA
87982009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8799 Pedro Alves <pedro@codesourcery.com>
8800
8801 * target.h (struct target_ops) <supports_multi_process>: New
8802 callback.
8803 (target_supports_multi_process): New.
8804 * server.c (handle_query): Even if GDB reports support, only
8805 enable multi-process if the target also supports it. Report
8806 multi-process support only if the target backend supports it.
8807 * linux-low.c (linux_supports_multi_process): New function.
8808 (linux_target_ops): Install it as target_supports_multi_process
8809 callback.
8810
47c0c975
DE
88112009-05-24 Doug Evans <dje@google.com>
8812
e09875d4
DE
8813 Global renaming of find_thread_pid to find_thread_ptid.
8814 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8815 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8816 All callers updated.
8817
e27d73f6
DE
8818 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8819 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8820 directly.
8821
47c0c975
DE
8822 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8823 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8824 (linux_resume_one_lwp): Ditto.
8825
2acc282a
DE
88262009-05-23 Doug Evans <dje@google.com>
8827
8828 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8829 from struct inferior_list_entry * to struct lwp_info *.
8830 All callers updated.
8831
9f1036c1
DE
88322009-05-13 Doug Evans <dje@google.com>
8833
8834 * linux-x86-low.c: Don't include assert.h.
8835 (x86_siginfo_fixup): Use fatal, not assert.
8836 (x86_arch_setup): Fix comment.
8837
d0722149
DE
88382009-05-12 Doug Evans <dje@google.com>
8839
8840 Biarch support for i386/amd64 gdbserver.
8841 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8842 Add linux-x86-low.c.
8843 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8844 (linux-x86-low.o): Add.
8845 * linux-x86-64-low.c: Delete.
8846 * linux-i386-low.c: Delete.
8847 * linux-x86-low.c: New file.
8848 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8849 linux-x86-low.o.
8850 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8851 linux-x86-low.o.
8852 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8853 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8854 (linux_child_pid_to_exec_file): New function.
8855 (elf_64_header_p, elf_64_file_p): New functions.
8856 (siginfo_fixup): New function.
8857 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8858 give target a chance to convert layout.
8859 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8860 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8861
fdeb2a12
DE
88622009-05-07 Doug Evans <dje@google.com>
8863
8864 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8865 (regsets_store_inferior_registers): Ditto.
8866
a6dbe5df
PA
88672009-05-06 Pedro Alves <pedro@codesourcery.com>
8868
8869 PR server/10048
8870
8871 * linux-low.c (must_set_ptrace_flags): Delete.
8872 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8873 of the global.
8874 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8875 `lwp->must_set_ptrace_flags' instead.
ba42693b 8876 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
8877 (linux_wait_1): ... not here.
8878
5091eb23
DE
88792009-04-30 Doug Evans <dje@google.com>
8880
9f767825
DE
8881 * inferiors.c (started_inferior_callback): New function.
8882 (attached_inferior_callback): New function.
8883 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8884 * server.c (print_started_pid, print_attached_pid): New functions.
8885 (detach_or_kill_for_exit): New function.
8886 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8887 * server.h (have_started_inferiors_p): Declare.
8888 (have_attached_inferiors_p): Declare.
8889
5091eb23
DE
8890 * inferiors.c (remove_process): Fix memory leak, free process.
8891 * linux-low.c (linux_remove_process): New function.
8892 (linux_kill): Call it instead of remove_process.
8893 (linux_detach, linux_wait_1): Ditto.
8894
155c8968
PA
88952009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8896
8897 * configure.srv: Add x86 Windows CE target.
8898
7fe519cb
UW
88992009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8900
8901 * inferiors.c (get_thread_process): Make global.
8902 * server.h (get_thread_process): Add prototype.
8903 * thread-db.c (find_one_thread): Use get_thread_process
8904 instead of current_process.
8905 (thread_db_get_tls_address): Do not crash if called when
8906 thread layer is not yet initialized.
8907
5472f405
UW
89082009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8909
8910 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8911 * spu-low.c (current_tid): Rename to ...
8912 (current_ptid): ... this.
8913 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8914 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8915 ptid_get_lwp (current_ptid) instead of current_tid.
8916 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8917 instead of current_tid. Use find_process_pid to verify pid
8918 argument is valid. Pass proper argument to remove_process.
8919 (spu_thread_alive): Compare current_ptid instead of current_tid.
8920 (spu_resume): Likewise.
8921
55ac2b99
PA
89222009-04-02 Pedro Alves <pedro@codesourcery.com>
8923
8924 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8925 variable.
8926
95954743
PA
89272009-04-01 Pedro Alves <pedro@codesourcery.com>
8928
8929 Implement the multiprocess extensions, and add linux multiprocess
8930 support.
8931
8932 * server.h (ULONGEST): Declare.
8933 (struct ptid, ptid_t): New.
8934 (minus_one_ptid, null_ptid): Declare.
8935 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8936 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8937 (struct inferior_list_entry): Change `id' type from unsigned from
8938 to ptid_t.
8939 (struct sym_cache, struct breakpoint, struct
8940 process_info_private): Forward declare.
8941 (struct process_info): Declare.
8942 (current_process): Declare.
8943 (all_processes): Declare.
8944 (initialize_inferiors): Declare.
8945 (add_thread): Adjust to use ptid_t.
8946 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8947 (add_process, remove_process, find_thread_pid): Declare.
8948 (find_inferior_id): Adjust to use ptid_t.
8949 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8950 (multi_process): Declare.
8951 (push_event): Adjust to use ptid_t.
8952 (read_ptid, write_ptid): Declare.
8953 (prepare_resume_reply): Adjust to use ptid_t.
8954 (clear_symbol_cache): Declare.
8955 * inferiors.c (all_processes): New.
8956 (null_ptid, minus_one_ptid): New.
8957 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8958 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8959 (add_thread): Change unsigned long to ptid. Remove gdb_id
8960 parameter. Adjust.
8961 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8962 (gdb_id_to_thread): Rename to ...
8963 (find_thread_pid): ... this. Change unsigned long to ptid.
8964 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8965 (loaded_dll, pull_pid_from_list): Adjust.
8966 (add_process, remove_process, find_process_pid)
8967 (get_thread_process, current_process, initialize_inferiors): New.
8968 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8969 (struct target_waitstatus) <related_pid>: Ditto.
8970 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8971 return type to int.
8972 (struct target_ops) <join>: Add `pid' argument.
8973 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8974 (struct target_ops) <wait>: Add `ptid' field. Change return type
8975 to ptid.
8976 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8977 (mywait): Add `ptid' argument. Change return type to ptid_t.
8978 (target_pid_to_str): Declare.
8979 * target.c (set_desired_inferior): Adjust to use ptids.
8980 (mywait): Add new `ptid' argument. Adjust.
8981 (target_pid_to_str): New.
8982 * mem-break.h (free_all_breakpoints): Declare.
8983 * mem-break.c (breakpoints): Delelete.
8984 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8985 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8986 to use per-process breakpoint list.
8987 (free_all_breakpoints): New.
8988 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8989 (symbol_cache, all_symbols_looked_up): Delete.
8990 (hexchars): New.
8991 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8992 read_ptid): New.
8993 (prepare_resume_reply): Change ptid argument's type from unsigned
8994 long to ptid_t. Adjust. Implement W;process and X;process.
8995 (free_sym_cache, clear_symbol_cache): New.
8996 (look_up_one_symbol): Adjust to per-process symbol cache. *
8997 * server.c (cont_thread, general_thread, step_thread): Change type
8998 to ptid_t.
8999 (attached): Delete.
9000 (multi_process): New.
9001 (last_ptid): Change type to ptid_t.
9002 (struct vstop_notif) <ptid>: Change type to ptid_t.
9003 (queue_stop_reply, push_event): Change `ptid' argument's type to
9004 ptid_t.
9005 (discard_queued_stop_replies): Add `pid' argument.
9006 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9007 changes. Don't reference the `attached' global.
9008 (attach_inferior): Adjust to mywait interface changes.
9009 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9010 features. Handle and report "multiprocess+". Handle
9011 "qAttached:PID".
9012 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9013 changes.
9014 (handle_v_kill): New.
9015 (handle_v_stopped): Adjust to use target_pid_to_str.
9016 (handle_v_requests): Allow multiple attaches and runs when
9017 multiprocess extensions are in effect. Handle "vKill".
9018 (myresume): Adjust to use ptids.
9019 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9020 (handle_status): Adjust to discard_queued_stop_replies interface
9021 change.
9022 (first_thread_of, kill_inferior_callback)
9023 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9024 (main): Call initialize_inferiors. Adjust to use ptids, killing
9025 and detaching from all inferiors. Handle multiprocess packet
9026 variants.
9027 * linux-low.h: Include gdb_proc_service.h.
9028 (struct process_info_private): New.
9029 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9030 <lwpid_of>: Use ptid_get_lwp.
9031 (get_lwp_thread): Adjust.
9032 (struct lwp_info): Add `dead' member.
9033 (find_lwp_pid): Declare.
9034 * linux-low.c (thread_db_active): Delete.
9035 (new_inferior): Adjust comment.
9036 (inferior_pid): Delete.
9037 (linux_add_process): New.
9038 (handle_extended_wait): Adjust.
9039 (add_lwp): Change unsigned long to ptid.
9040 (linux_create_inferior): Add process to processes table. Adjust
9041 to use ptids. Don't set new_inferior here.
9042 (linux_attach_lwp): Rename to ...
9043 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9044 it. Adjust to use ptids.
9045 (linux_attach_lwp): New.
9046 (linux_attach): Add process to processes table. Don't set
9047 new_inferior here.
9048 (struct counter): New.
9049 (second_thread_of_pid_p, last_thread_of_process_p): New.
9050 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9051 multiple processes.
9052 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9053 processes. Remove process from process table.
9054 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9055 to multiple processes.
9056 (any_thread_of): New.
9057 (linux_detach): Add `pid' argument, and handle it. Remove process
9058 from processes table.
9059 (linux_join): Add `pid' argument. Handle it.
9060 (linux_thread_alive): Change unsighed long argument to ptid_t.
9061 Consider dead lwps as not being alive.
9062 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9063 threads we're not interested in.
9064 (same_lwp, find_lwp_pid): New.
9065 (linux_wait_for_lwp): Change `pid' argument's type from int to
9066 ptid_t. Adjust.
9067 (linux_wait_for_event): Rename to ...
9068 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9069 from int to ptid_t. Adjust.
9070 (linux_wait_for_event): New.
9071 (linux_wait_1): Add `ptid' argument. Change return type to
9072 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9073 that exit from the process table.
9074 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9075 Adjust.
9076 (mark_lwp_dead): New.
9077 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9078 stopping all threads, mark its main lwp as dead.
9079 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9080 ptids.
9081 (fetch_register, usr_store_inferior_registers)
9082 (regsets_fetch_inferior_registers)
9083 (regsets_store_inferior_registers, linux_read_memory)
9084 (linux_write_memory): Inline `inferior_pid'.
9085 (linux_look_up_symbols): Adjust to use per-process
9086 `thread_db_active'.
9087 (linux_request_interrupt): Adjust to use ptids.
9088 (linux_read_auxv): Inline `inferior_pid'.
9089 (initialize_low): Don't reference thread_db_active.
9090 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9091 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9092 (ps_getpid): Return the pid of the current inferior.
9093 * thread-db.c (proc_handle, thread_agent): Delete.
9094 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9095 per-process data.
9096 (find_one_thread): Change argument type to ptid_t. Adjust to
9097 per-process data.
9098 (maybe_attach_thread): Adjust to per-process data and ptids.
9099 (thread_db_find_new_threads): Ditto.
9100 (thread_db_init): Ditto.
9101 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9102 processes table. Adjust to use ptids.
9103 (spu_kill, spu_detach): Adjust interface. Remove process from
9104 processes table.
9105 (spu_join, spu_thread_alive): Adjust interface.
9106 (spu_wait): Adjust interface. Remove process from processes
9107 table. Adjust to use ptids.
9108 * win32-low.c (current_inferior_tid): Delete.
9109 (current_inferior_ptid): New.
9110 (debug_event_ptid): New.
9111 (thread_rec): Take a ptid. Adjust.
9112 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9113 (child_delete_thread): Ditto.
9114 (do_initial_child_stuff): Add `attached' argument. Add process to
9115 processes table.
9116 (child_fetch_inferior_registers, child_store_inferior_registers):
9117 Adjust.
9118 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9119 (win32_attach): Pass 1 to do_initial_child_stuff.
9120 (win32_kill): Adjust interface. Remove process from processes
9121 table.
9122 (win32_detach): Ditto.
9123 (win32_join): Adjust interface.
9124 (win32_thread_alive): Take a ptid.
9125 (win32_resume): Adjust to use ptids.
9126 (get_child_debug_event): Ditto.
9127 (win32_wait): Adjust interface. Remove exiting process from
9128 processes table.
9129
bd99dc85
PA
91302009-04-01 Pedro Alves <pedro@codesourcery.com>
9131
9132 Non-stop mode support.
9133
9134 * server.h (non_stop): Declare.
9135 (gdb_client_data, handler_func): Declare.
9136 (delete_file_handler, add_file_handler, start_event_loop):
9137 Declare.
9138 (handle_serial_event, handle_target_event, push_event)
9139 (putpkt_notif): Declare.
9140 * target.h (enum resume_kind): New.
9141 (struct thread_resume): Replace `step' field by `kind' field.
9142 (TARGET_WNOHANG): Define.
9143 (struct target_ops) <wait>: Add `options' argument.
9144 <supports_non_stop, async, start_non_stop>: New fields.
9145 (target_supports_non_stop, target_async): New.
9146 (start_non_stop): Declare.
9147 (mywait): Add `options' argument.
9148 * target.c (mywait): Add `options' argument. Print child exit
9149 notifications here.
9150 (start_non_stop): New.
9151 * server.c (non_stop, own_buf, mem_buf): New globals.
9152 (struct vstop_notif): New.
9153 (notif_queue): New global.
9154 (queue_stop_reply, push_event, discard_queued_stop_replies)
9155 (send_next_stop_reply): New.
9156 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9157 interface changes.
9158 (attach_inferior): In non-stop mode, don't wait for the target
9159 here.
9160 (handle_general_set): Handle QNonStop.
9161 (handle_query): When handling qC, return the current general
9162 thread, instead of the first thread of the list.
9163 (handle_query): If the backend supports non-stop mode, include
9164 QNonStop+ in the qSupported query response.
9165 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9166 and non-stop mode.
9167 (handle_v_attach, handle_v_run): Handle non-stop mode.
9168 (handle_v_stopped): New.
9169 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9170 (myresume): Adjust to use resume_kind. Handle non-stop.
9171 (queue_stop_reply_callback): New.
9172 (handle_status): Handle non-stop mode.
9173 (main): Clear non_stop flag on reconnection. Use the event-loop.
9174 Refactor serial protocol handling from here ...
9175 (process_serial_event): ... to this new function. When GDB
9176 selects any thread, select one here. In non-stop mode, wait until
9177 GDB acks all pending events before exiting.
9178 (handle_serial_event, handle_target_event): New.
9179 * remote-utils.c (remote_open): Install remote_desc in the event
9180 loop.
9181 (remote_close): Remove remote_desc from the event loop.
9182 (putpkt_binary): Rename to...
9183 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9184 (putpkt_binary): New as wrapper around putpkt_binary_1.
9185 (putpkt_notif): New.
9186 (prepare_resume_reply): In non-stop mode, don't change the
9187 general_thread.
9188 * event-loop.c: New.
9189 * Makefile.in (OBJ): Add event-loop.o.
9190 (event-loop.o): New rule.
9191
9192 * linux-low.h (pid_of): Moved here.
9193 (lwpid_of): New.
9194 (get_lwp_thread): Use lwpid_of.
9195 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9196 * linux-low.c (pid_of): Delete.
9197 (inferior_pid): Use lwpid_of.
9198 (linux_event_pipe): New.
9199 (target_is_async_p): New.
9200 (delete_lwp): New.
9201 (handle_extended_wait): Use lwpid_of.
9202 (add_lwp): Don't set lwpid field.
9203 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9204 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9205 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9206 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9207 first. Adjust to linux_wait_for_event interface changes. Use
9208 lwpid_of.
9209 (linux_detach): Don't delete the main lwp here.
9210 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9211 (status_pending_p): Don't consider explicitly suspended lwps.
9212 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9213 pointer. Add OPTIONS argument. Change return type to int. Use
9214 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9215 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9216 pointer. Add status pointer argument. Return a pid instead of a
9217 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9218 changes. In non-stop mode, don't switch to a random thread.
9219 (linux_wait): Rename to...
9220 (linux_wait_1): ... this. Add target_options argument, and handle
9221 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9222 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9223 clean exit and signal exit code. Don't stop all threads in
9224 non-stop mode. In all-stop mode, only stop all threads when
9225 reporting a stop to GDB. Handle explicit thread stop requests.
9226 (async_file_flush, async_file_mark): New.
9227 (linux_wait): New.
9228 (send_sigstop): Use lwpid_of.
9229 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9230 interface changes. In non-stop mode, don't switch to a random
9231 thread.
9232 (linux_resume_one_lwp): Use lwpid_of.
9233 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9234 (linux_resume_one_thread): ... this. Handle resume_stop. In
9235 non-stop mode, don't look for pending flag in all threads.
9236 (resume_status_pending_p): Don't consider explicitly suspended
9237 threads.
9238 (my_waitpid): Reimplement. Emulate __WALL.
9239 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9240 Use lwpid_of.
9241 (sigchld_handler, linux_supports_non_stop, linux_async)
9242 (linux_start_non_stop): New.
9243 (linux_target_ops): Register linux_supports_non_stop, linux_async
9244 and linux_start_non_stop.
9245 (initialize_low): Install SIGCHLD handler.
9246 * thread-db.c (thread_db_create_event, find_one_thread)
9247 (thread_db_get_tls_address): Use lwpid_of.
9248 * win32-low.c (win32_detach): Adjust to use resume_kind.
9249 (win32_wait): Add `options' argument.
9250 * spu-low.c (spu_resume): Adjust to use resume_kind.
9251 (spu_wait): Add `options' argument.
9252
5b1c542e
PA
92532009-04-01 Pedro Alves <pedro@codesourcery.com>
9254
9255 Decouple target code from remote protocol.
9256
9257 * target.h (enum target_waitkind): New.
9258 (struct target_waitstatus): New.
9259 (struct target_ops) <wait>: Return an unsigned long. Take a
9260 target_waitstatus pointer instead of a char pointer.
9261 (mywait): Likewise.
9262 * target.c (mywait): Change prototype to return an unsigned long.
9263 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9264 * server.h (thread_from_wait, old_thread_from_wait): Delete
9265 declarations.
9266 (prepare_resume_reply): Change prototype to take a
9267 target_waitstatus.
9268 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9269 (last_status, last_ptid): New.
9270 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9271 pid instead of a signal.
9272 (attach_inferior): Remove "status" and "signal" parameters.
9273 Adjust.
9274 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9275 not as an address.
9276 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9277 (handle_v_requests, myresume): Remove "status" and "signal"
9278 parameters. Adjust.
9279 (handle_status): New.
9280 (main): Delete local `status'. Adjust.
9281 * remote-utils.c: Include target.h.
9282 (prepare_resume_reply): Change prototype to take a
9283 target_waitstatus. Adjust.
9284
9285 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9286 interface.
9287 * spu-low.c (spu_wait): Adjust.
9288 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9289 Delete.
9290 (win32_wait): Adjust.
9291
2bd7c093
PA
92922009-04-01 Pedro Alves <pedro@codesourcery.com>
9293
9294 * target.h (struct thread_resume): Delete leave_stopped member.
9295 (struct target_ops): Add a `n' argument to the `resume' callback.
9296 * server.c (start_inferior): Adjust.
9297 (handle_v_cont, myresume): Adjust.
9298 * linux-low.c (check_removed_breakpoint): Adjust to resume
9299 interface change, and to removed leave_stopped field.
9300 (resume_ptr): Delete.
9301 (struct thread_resume_array): New.
9302 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9303 resume interface change.
9304 (linux_continue_one_thread, linux_queue_one_thread)
9305 (resume_status_pending_p): Check if the resume field is NULL
9306 instead of checking the leave_stopped member.
9307 (linux_resume): Adjust to the target resume interface change.
9308 * spu-low.c (spu_resume): Adjust to the target resume interface
9309 change.
9310 * win32-low.c (win32_detach, win32_resume): Ditto.
9311
c35fafde
PA
93122009-04-01 Pedro Alves <pedro@codesourcery.com>
9313
9314 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9315 flag.
9316 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9317 pending.
9318 (linux_continue_one_thread): Only preserve the stepping flag if
9319 there's a pending breakpoint.
9320
0a59d50b
PA
93212009-03-31 Pedro Alves <pedro@codesourcery.com>
9322
9323 * server.c (main): After the inferior having exited, call
9324 remote_close before exiting gdbserver.
9325
f04c6d38
TJB
93262009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9327
9328 Fix size of FPSCR in Power 7 processors.
9329 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9330 (PPC_FEATURE_HAS_DFP): New #define.
9331 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9332 size of the FPSCR.
9333
78e5cee6
PA
93342009-03-23 Pedro Alves <pedro@codesourcery.com>
9335
9336 * server.c (handle_query) Whitespace and formatting.
9337
1b3f6016
PA
93382009-03-22 Pedro Alves <pedro@codesourcery.com>
9339
9340 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9341 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9342 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9343 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9344 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9345 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9346 Makefile.in, configure.ac: Fix whitespace throughout.
9347 * configure: Regenerate.
9348
a07b2135
PA
93492009-03-22 Pedro Alves <pedro@codesourcery.com>
9350
9351 * inferiors.c (find_inferior): Make it safe for the callback
9352 function to delete the currently iterated inferior.
9353
67cc2626
PA
93542009-03-22 Pedro Alves <pedro@codesourcery.com>
9355
9356 * Makefile.in (linuw_low_h): Move higher.
9357 (thread-db.o): Depend on $(linux_low_h).
9358
54a0b537
PA
93592009-03-17 Pedro Alves <pedro@codesourcery.com>
9360
9361 Rename "process" to "lwp" throughout.
9362
9363 * linux-low.c (all_processes): Rename to...
9364 (all_lwps): ... this.
9365 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9366 (add_process): Rename to ...
9367 (add_lwp): ... this. Adjust.
9368 (linux_create_inferior): Adjust.
9369 (linux_attach_lwp): Adjust.
9370 (linux_attach): Adjust.
9371 (linux_kill_one_process): Rename to ...
9372 (linux_kill_one_lwp): ... this. Adjust.
9373 (linux_kill): Adjust.
9374 (linux_detach_one_process): Rename to ...
9375 (linux_detach_one_lwp): ... this. Adjust.
9376 (linux_detach): Adjust.
9377 (check_removed_breakpoint): Adjust.
9378 (status_pending_p): Adjust.
9379 (linux_wait_for_process): Rename to ...
9380 (linux_wait_for_lwp): ... this. Adjust.
9381 (linux_wait_for_event): Adjust.
9382 (send_sigstop): Adjust.
9383 (wait_for_sigstop): Adjust.
9384 (stop_all_processes): Rename to ...
9385 (stop_all_lwps): ... this.
9386 (linux_resume_one_process): Rename to ...
9387 (linux_resume_one_lwp): ... this. Adjust.
9388 (linux_set_resume_request, linux_continue_one_thread)
9389 (linux_queue_one_thread, resume_status_pending_p)
9390 (usr_store_inferior_registers, regsets_store_inferior_registers)
9391 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9392 Adjust.
9393 * linux-low.h (get_process): Rename to ...
9394 (get_lwp): ... this. Adjust.
9395 (get_thread_process): Rename to ...
9396 (get_thread_lwp): ... this. Adjust.
9397 (get_process_thread): Rename to ...
9398 (get_lwp_thread): ... this. Adjust.
9399 (struct process_info): Rename to ...
9400 (struct lwp_info): ... this.
9401 (all_processes): Rename to ...
9402 (all_lwps): ... this.
9403 * proc-service.c (ps_lgetregs): Adjust.
9404 * thread-db.c (thread_db_create_event, find_one_thread)
9405 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9406
0b16c5cf
PA
94072009-03-14 Pedro Alves <pedro@codesourcery.com>
9408
9409 * server.c (handle_query): Handle "qAttached".
9410
32de4b9d
NS
94112009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9412
9413 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9414 GPLv3, update license URL.
9415
2aecd87f
DE
94162009-03-01 Doug Evans <dje@google.com>
9417
93efd302 9418 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
9419 (server_h): Add gdb_signals.h.
9420 (signals.o): Update.
9421 * server.h (target_signal_from_host,target_signal_to_host_p)
9422 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9423
86b1f9c5
PM
94242009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9425
9426 * remote-utils.c (getpkt): Also generate remote-debug
9427 information if noack_mode is set.
9428
4aa995e1
PA
94292009-02-06 Pedro Alves <pedro@codesourcery.com>
9430
9431 * server.c (handle_query): Report qXfer:siginfo:read and
9432 qXfer:siginfo:write as supported and handle them.
9433 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9434 * linux-low.c (linux_xfer_siginfo): New.
9435 (linux_target_ops): Set it.
9436
62709adf
PA
94372009-01-26 Pedro Alves <pedro@codesourcery.com>
9438
9439 * server.c (gdbserver_usage): Mention --remote-debug.
9440 (main): Accept '--remote-debug' switch.
9441
aef93bd7
DE
94422009-01-18 Doug Evans <dje@google.com>
9443
9444 * regcache.c (new_register_cache): No need to check result of xcalloc.
9445 * server.c (handle_search_memory): Back out calls to xmalloc,
9446 result is checked and error is returned to user upon failure.
9447 (handle_query): Ditto. Add more checks for result of malloc.
9448 (handle_v_cont): Check result of malloc, report error back to
9449 user upon failure.
9450 (handle_v_run): Ditto. Call freeargv.
9451 * server.h (freeargv): Declare.
9452 * utils.c (freeargv): New fn.
9453
54363045
DE
94542009-01-15 Doug Evans <dje@google.com>
9455
f626972c
DE
9456 * gdbreplay.c (perror_with_name): Make arg const char *.
9457 * server.h (target_signal_to_name): Make return type const char *.
0842e787 9458 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 9459 * utils.c (perror_with_name): Make arg const char *.
54363045 9460
18aae699
PA
94612009-01-14 Pedro Alves <pedro@codesourcery.com>
9462
9463 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9464 when handling a EXIT_PROCESS_DEBUG_EVENT.
9465
ff703abe
JB
94662009-01-06 Joel Brobecker <brobecker@adacore.com>
9467
9468 * gdbreplay.c (gdbreplay_version): Update copyright year.
9469 * server.c (gdbserver_version): Likewise.
9470
f21cc1a2 94712009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
9472
9473 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 9474 (handle_extended_wait): Improve comment.
0e21c1ec 9475
bca929d3
DE
94762008-12-13 Doug Evans <dje@google.com>
9477
9478 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9479 * server.h (ATTR_MALLOC): New macro.
9480 (xmalloc,xcalloc,xstrdup): Declare.
9481 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9482 * inferiors.c: Ditto.
9483 * linux-low.c: Ditto.
9484 * mem-break.c: Ditto.
9485 * regcache.c: Ditto.
9486 * remote-utils.c: Ditto.
9487 * server.c: Ditto.
9488 * target.c: Ditto.
9489 * win32-low.c: Ditto.
9490
97438e3f
DE
94912008-12-12 Doug Evans <dje@google.com>
9492
896c7fbb
DE
9493 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9494 in debugging printf.
9495
97438e3f
DE
9496 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9497
e3b886f8
DE
94982008-12-09 Doug Evans <dje@google.com>
9499
9500 * linux-low.h (struct process_info): Delete member tid, unused.
9501 * thread-db.c (find_one_thread): Update.
9502 (maybe_attach_thread): Update.
9503
07e059b5
VP
95042008-12-02 Pedro Alves <pedro@codesourcery.com>
9505
889bf7c5
PA
9506 * target.h (struct target_ops): Add qxfer_osdata member.
9507 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9508 and dirent.h.
9509 (linux_qxfer_osdata): New functions.
9510 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9511 callback.
9512 * server.c (handle_query): Handle "qXfer:osdata:read:".
9513 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9514 (buffer_xml_printf): New functions.
9515 * server.h (struct buffer): New.
9516 (buffer_grow_str, buffer_grow_str0): New macros.
9517 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9518 (buffer_xml_printf): Declare.
07e059b5 9519
4cab47ab
DE
95202008-11-24 Doug Evans <dje@google.com>
9521
9522 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9523
f142445f
DJ
95242008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9525
9526 * server.c (handle_v_run): Always use the supplied argument list.
9527
d0107bb6 95282008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 9529
d0107bb6
BW
9530 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9531 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 9532
2c4ad781
TJB
95332008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9534
9535 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9536 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9537 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9538 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9539 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9540 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9541 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9542 XML target descriptions.
9543 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9544 when inferior is running on an ISA 2.05 or later processor. Add
9545 special case to return offset for full 64-bit slot of FPSCR when
9546 in 32-bits.
9547
dfb64f85
DJ
95482008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9549
9550 * Makefile.in (SFILES, clean): Added sparc64 files.
9551 (reg-sparc64.o, reg-sparc64.c): New.
9552 * configure.srv (sparc*-*-linux*): New configuration.
9553 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9554 syscall arguments for SPARC.
9555 (regsets_store_inferior_registers): Likewise.
9556 * linux-sparc-low.c: New file.
9557
66b6e1dd
DE
95582008-10-21 Doug Evans <dje@google.com>
9559
9560 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9561 (READLINE_DIR,READLINE_DEP): Delete.
9562 (INTERNAL_CFLAGS): Update.
9563 (LINTFLAGS): Update.
9564
9b710a42
PA
95652008-10-10 Pedro Alves <pedro@codesourcery.com>
9566
9567 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9568 whole argv from the last run, not just argv[0].
9569
5822d809
PA
95702008-09-08 Pedro Alves <pedro@codesourcery.com>
9571
9572 * regcache.c (new_register_cache): Return NULL if the register
9573 cache size isn't known yet.
9574 (free_register_cache): Avoid dereferencing a NULL regcache.
9575
74aac56f
DJ
95762008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9577
9578 * configure.srv: Merge MIPS and MIPS64.
9579
400b20f5
MR
95802008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9581
9582 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9583
677c5bb1
LM
95842008-08-18 Luis Machado <luisgpm@br.ibm.com>
9585
9586 * Makefile.in: Add required vsx dependencies.
9587
9588 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9589 Declare init_registers_powerpc_vsx32l.
9590 Declare init_registers_powerpc_vsx64l.
9591 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9592 (ppc_arch_setup): Check for VSX in hwcap.
9593 (ppc_fill_vsxregset): New function.
9594 (ppc_store_vsxregset): New function.
9595 Add new VSX entry in regset_info target_regsets.
9596
9597 * configure.srv: Add new VSX dependencies.
9598
a6f3e723
SL
95992008-08-12 Pedro Alves <pedro@codesourcery.com>
9600
9601 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9602 (remote_open): Set or clear transport_is_reliable.
9603 (putpkt_binary): Don't expect acks in noack mode.
9604 (getpkt): Don't send ack/nac in noack mode.
9605 * server.c (handle_general_set): Handle QStartNoAckMode.
9606 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9607 qSupported.
9608 (main): Reset noack_mode on every connection.
9609 * server.h (noack_mode): Declare.
9610
a417dc56
RW
96112008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9612
9613 * Makefile.in (GDBREPLAY_OBS): New variable.
9614 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9615
3221518c
UW
96162008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9617 Daniel Jacobowitz <dan@codesourcery.com>
9618
9619 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9620 (usr_store_inferior_registers): Likewise.
9621 (regsets_store_inferior_registers): Likewise.
9622
ec56be1b
PA
96232008-07-31 Rolf Jansen <rj@surtec.com>
9624 Pedro Alves <pedro@codesourcery.com>
9625
9626 * configure.ac: Check for memmem declaration.
9627 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9628 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9629 (disable_packet_qfThreadInfo): Unconditionally compile.
9630 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9631 * configure, config.in: Regenerate.
9632
2fe5e3ff
DE
96332008-07-28 Doug Kwan <dougkwan@google.com>
9634
9635 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9636 (linux_write_memory): Remove declaration of errno.
9637
836acd6d
UW
96382008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9639
9640 * linux-low.c (handle_extended_wait): Do not use "status"
9641 variable uninitialized.
9642
aeba519e
PA
96432008-07-07 Pedro Alves <pedro@codesourcery.com>
9644
9645 * server.c (handle_v_attach): Inhibit reporting dll changes.
9646
db42f210
PA
96472008-06-27 Pedro Alves <pedro@codesourcery.com>
9648
9649 * remote-utils.c (prepare_resume_reply): If requested, don't
9650 output "thread:TID" in the T stop reply.
9651
9652 * server.c (disable_packet_vCont, disable_packet_Tthread)
9653 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9654 (handle_query): If requested, disable support for qC, qfThreadInfo
9655 and qsThreadInfo.
9656 (handle_v_requests): If requested, disable support for vCont.
9657 (gdbserver_show_disableable): New.
9658 (main): Handle --disable-packet and --disable-packet=LIST.
9659
9660 * server.h (disable_packet_vCont, disable_packet_Tthread)
9661 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9662
8e4c5421
CD
96632008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9664
9665 * server.c (gdbserver_usage): Mention --version.
9666
6e23a804
DJ
96672008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9668
9669 * Makefile.in (gdbreplay.o): New rule.
9670
90aa6a40
JM
96712008-06-06 Joseph Myers <joseph@codesourcery.com>
9672
9673 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9674 message, not gdbserver.
9675
c16158bc 96762008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
9677 Nathan Sidwell <nathan@codesourcery.com>
9678 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
9679
9680 * acinclude.m4: Include ../../config/acx.m4.
9681 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9682 * configure, config.in: Regenerate.
9683 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9684 * server.c (gdbserver_version): Print PKGVERSION.
9685 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9686 (main): Adjust gdbserver_usage calls.
9687 * gdbreplay.c (version, host_name): Add declarations.
9688 (gdbreplay_version, gdbreplay_usage): New.
9689 (main): Accept --version and --help options.
9690
aeb75bf5
DJ
96912008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9692
9693 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9694 (arm_breakpoint_at): Handle Thumb.
9695 (the_low_target): Add comment.
9696
76b233dd
UW
96972008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9698
9699 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9700
08388c79
DE
97012008-05-09 Doug Evans <dje@google.com>
9702
a3c83fae
DE
9703 * server.h (decode_search_memory_packet): Declare.
9704 * remote-utils.c (decode_search_memory_packet): New fn.
9705 * server.c (handle_search_memory_1): New fn.
08388c79
DE
9706 (handle_search_memory): New fn.
9707 (handle_query): Process qSearch:memory packets.
9708
bb9c3d36
UW
97092008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9710
9711 * regcache.c (registers_length): Remove.
9712 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9713 full register packet.
9714 * regcache.h (registers_length): Remove prototype.
9715 * server.h (PBUFSIZ): Define to 16384.
9716
7284e1be
UW
97172008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9718
9719 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9720 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9721 powerpc-64l.o, and powerpc-altivec64l.o.
9722 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9723 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9724 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9725 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9726 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9727 to srv_xmlfiles.
9728
9729 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9730 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9731 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9732 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9733 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9734 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9735 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9736 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9737 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9738 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9739 (clean): Update.
9740
9741 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9742 (init_registers_powerpc_32l): ... this new prototype.
9743 (init_registers_powerpc_32): Remove, replace by ...
9744 (init_registers_powerpc_altivec32l): ... this new prototype.
9745 (init_registers_powerpc_e500): Remove, replace by ...
9746 (init_registers_powerpc_e500l): ... this new prototype.
9747 (init_registers_ppc64): Remove, replace by ...
9748 (init_registers_powerpc_64l): ... this new prototype.
9749 (init_registers_powerpc_64): Remove, replace by ...
9750 (init_registers_powerpc_altivec64l): ... this new prototype.
9751 (ppc_num_regs): Set to 73.
9752 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9753 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9754 (ppc_cannot_store_register): Handle orig_r3 and trap.
9755 (ppc_arch_setup): Update init_registers_... calls.
9756 (ppc_fill_gregset): Handle orig_r3 and trap.
9757
9758 * inferiors.c (clear_inferiors): Reset current_inferior.
9759
fdc59709
PB
97602008-04-23 Paolo Bonzini <bonzini@gnu.org>
9761
889bf7c5
PA
9762 * acinclude.m4: Add override.m4.
9763 * configure: Regenerate.
fdc59709 9764
c9b2f845
UW
97652008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9766
9767 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9768 initial call to init_register_ppc64.
9769
550512b8
UW
97702008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9771
43aaf8b6
PA
9772 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9773 single powerpc*-*-linux* case.
550512b8
UW
9774 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9775
b6430ec3
UW
97762008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9777
9778 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 9779 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
9780 from reg_xmlfiles.
9781 * linux-ppc-low.c: Include <elf.h>.
9782 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9783 (ppc_hwcap): New global variable.
9784 (ppc_regmap): Remove __SPE__ #ifdef sections.
9785 (ppc_regmap_e500): New global variable.
9786 (ppc_cannot_store_register): Update __SPE__ special case.
9787 (ppc_get_hwcap): New function.
9788 (ppc_arch_setup): Use it to determine whether inferior supports
9789 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9790 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9791 Do not access registers if target does not support AltiVec.
9792 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9793 Do not access registers if target does not support SPE.
9794 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9795
52fa2412
UW
97962008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9797
9798 * linux-low.c (disabled_regsets, num_regsets): New.
9799 (use_regsets_p): Delete.
9800 (linux_wait_for_process): Clear disabled_regsets.
9801 (regsets_fetch_inferior_registers): Check and set it.
9802 (regsets_store_inferior_registers): Likewise.
9803 (linux_fetch_registers, linux_store_registers): Do not use
9804 use_regsets_p.
9805 (initialize_low): Allocate disabled_regsets.
9806
e28b3332
DJ
98072008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9808
9809 * Makefile.in (LIBOBJS): New.
9810 (OBS): Use LIBOBJS.
9811 (memmem.o): New rule.
9812 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9813 * configure: Regenerated.
9814
4536995d
UW
98152008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9816
9817 * server.c (handle_query): Never return "unsupported" for
9818 qXfer:features:read queries.
9819
221c031f
UW
98202008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9821
9822 * server.c (get_features_xml): Fix inverted condition.
9823 (handle_query): Always support qXfer:feature:read.
9824
ccd213ac
DJ
98252008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9826
9827 * server.c (wrapper_argv): New.
9828 (start_inferior): Handle wrapper_argv. If set, expect an extra
9829 trap.
9830 (gdbserver_usage): Document --wrapper.
9831 (main): Parse --wrapper.
9832
6fe305f7
UW
98332008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9834
9835 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9836 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9837 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9838 (ppc_set_pc): Likewise.
9839 (ppc_arch_setup): New function.
9840 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9841 of collect_register.
889bf7c5 9842 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 9843
5b0a002e
UW
98442008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9845
9846 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9847 instead of linux-ppc64-low.o.
9848 * linux-ppc64-low.c: Remove file.
9849 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9850 (linux-ppc64-low.o): Remove rule.
9851
9852 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9853 (init_registers_powerpc_64): Likewise.
9854 (ppc_regmap): Conditionally define depending on __powerpc64__.
9855 (ppc_cannot_store_register): Do not special-case "fpscr" when
9856 compiled on __powerpc64__.
9857 (ppc_collect_ptrace_register): New function.
9858 (ppc_supply_ptrace_register): New function.
9859 (ppc_breakpoint): Change type to "unsigned int".
9860 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9861 (the_low_target): Conditionally provide initializers for the
889bf7c5 9862 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
9863 collect_ptrace_register and supply_ptrace_register members.
9864
9b4b61c8
UW
98652008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9866
9867 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9868 * server.c (gdbserver_xmltarget): Define.
9869 (get_features_xml): Use it to replace "target.xml" and arch_string.
9870
9871 * configure.srv: Remove srv_xmltarget. Add XML files that were
9872 mentioned there to srv_xmlfiles instead. Remove conditional tests
9873 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9874 srv_xmlfiles and srv_regobj to include all possible choices.
9875 * configure.ac (srv_xmltarget): Remove.
9876 (srv_xmlfiles): Do not add "target.xml".
9877 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9878 checks for supplementary target information.
9879 * configure: Regenerate.
9880 * Makefile.in (XML_TARGET): Remove.
9881 (target.xml): Remove rule.
9882 (clean): Do not clean up target.xml.
9883 (.PRECIOUS): Do not mention target.xml.
9884
9885 * target.h (struct target_ops): Remove arch_string member.
9886 * linux-low.c (linux_arch_string): Remove.
9887 (linux_target_ops): Remove arch_string initializer.
9888 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9889 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9890 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9891 * spu-low.c (spu_arch_string): Remove.
9892 (spu_target_ops): Remove arch_string initializer.
9893 * win32-low.c (win32_arch_string): Remove.
9894 (win32_target_ops): Remove arch_string initializer.
9895 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9896 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9897 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9898
ee1a7ae4
UW
98992008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9900
9901 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9902 by collect_ptrace_register and supply_ptrace_register hooks.
9903 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9904 instead of checking for the_low_target.left_pad_xfer.
9905 (usr_store_inferior_registers): Use collect_ptrace_register callback
9906 instead of checking for the_low_target.left_pad_xfer.
9907
9908 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9909 (s390_supply_ptrace_register): Likewise.
9910 (s390_fill_gregset): Call s390_collect_ptrace_register.
9911 (the_low_target): Update.
9912
9913 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9914 (ppc_supply_ptrace_register): Likewise.
9915 (the_low_target): Update.
9916
9917 * linux-i386-low.c (the_low_target): Update.
9918 * linux-x86-64-low.c (the_low_target): Update.
9919
d61ddec4
UW
99202008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9921
9922 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9923 reg-s390.o and reg-s390x.o.
9924
9925 * linux-low.c (new_inferior): New global variable.
9926 (linux_create_inferior, linux_attach): Set it.
9927 (linux_wait_for_process): Call the_low_target.arch_setup after the
9928 target has stopped for the first time.
9929 (initialize_low): Do not call the_low_target.arch_setup.
9930
9931 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9932 (s390_set_pc): Likewise.
9933 (s390_arch_setup): New function.
9934 (the_low_target): Use s390_arch_setup as arch_setup routine.
9935
9936 * regcache.c (realloc_register_cache): New function.
9937 (set_register_cache): Call it for each existing regcache.
9938
d05b4ac3
UW
99392008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9940
9941 * server.h (init_registers): Remove prototype.
9942
9943 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9944 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9945 instead of init_registers ().
9946 * linux-arm-low.c (init_registers_arm): Add prototype.
9947 (init_registers_arm_with_iwmmxt): Likewise.
9948 (the_low_target): Add initializer for arch_setup field.
9949 * linux-cris-low.c (init_registers_cris): Add prototype.
9950 (the_low_target): Add initializer for arch_setup field.
9951 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9952 (the_low_target): Add initializer for arch_setup field.
9953 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9954 (the_low_target): Add initializer for arch_setup field.
9955 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9956 (the_low_target): Add initializer for arch_setup field.
9957 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9958 (the_low_target): Add initializer for arch_setup field.
9959 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9960 (the_low_target): Add initializer for arch_setup field.
9961 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9962 (init_registers_mips64_linux): Likewise.
9963 (the_low_target): Add initializer for arch_setup field.
9964 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9965 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9966 (the_low_target): Add initializer for arch_setup field.
9967 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9968 (init_registers_powerpc_64): Likewise.
9969 (the_low_target): Add initializer for arch_setup field.
9970 * linux-s390-low.c (init_registers_s390): Add prototype.
9971 (init_registers_s390x): Likewise.
9972 (the_low_target): Add initializer for arch_setup field.
9973 * linux-sh-low.c (init_registers_sh): Add prototype.
9974 (the_low_target): Add initializer for arch_setup field.
9975 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9976 (the_low_target): Add initializer for arch_setup field.
9977 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9978 (the_low_target): Add initializer for arch_setup field.
9979
9980 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9981 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9982 instead of init_registers ().
9983 * win32-arm-low.c (init_registers_arm): Add prototype.
9984 (the_low_target): Add initializer for arch_setup field.
9985 * win32-i386-low.c (init_registers_i386): Add prototype.
9986 (the_low_target): Add initializer for arch_setup field.
9987
9988 * spu-low.c (init_registers_spu): Add prototype.
9989 (initialize_low): Call initialie_registers_spu () instead of
9990 initialize_registers ().
9991
fd96d250
PA
99922008-02-19 Pedro Alves <pedro@codesourcery.com>
9993
9994 * server.c (handle_v_requests): When handling the vRun and vAttach
9995 packets, if already debugging a process, don't kill it. Return an
9996 error instead.
9997
d41b6bb4
DJ
99982008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9999
10000 * server.c (handle_query): Correct length check.
10001
5ac588cf
PA
100022008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10003
10004 * win32-low.c (do_initial_child_stuff): Add process handle
10005 parameter. Set current_process_handle and current_process_id from the
10006 parameters. Clear globals.
10007 (win32_create_inferior): Don't set current_process_handle and
10008 current_process_id here. Instead pass them on the call to
10009 do_initial_child_stuff.
10010 (win32_attach): Likewise.
10011 (win32_clear_inferiors): New.
10012 (win32_kill): Don't close the current process handle or the
10013 current thread handle here. Instead call win32_clear_inferiors.
10014 (win32_detach): Don't open a new handle to the process. Call
10015 win32_clear_inferiors.
10016 (win32_join): Don't rely on current_process_handle; open a new
10017 handle using the process id.
10018 (win32_wait): Call win32_clear_inferiors when the inferior process
10019 has exited.
10020
ecd7ecbc
DJ
100212008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10022
10023 * server.c (monitor_show_help): Add "exit".
10024
1525d545
MG
100252008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10026
ecd7ecbc 10027 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
10028 (clean): Add reg-xtensa.c.
10029 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
10030 * configure.srv (xtensa*-*-linux*) New target.
10031 * linux-xtensa-low.c: New.
10032 * xtensa-xtregs.c: New.
1525d545 10033
59a016f0
PA
100342008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10035
10036 * hostio.c: Don't include errno.h.
10037 (errno_to_fileio_errno): Move to hostio-errno.
10038 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10039 error number outputting to the target->hostio_last_error callback.
10040 (hostio_packet_error): Use FILEIO_EINVAL directly.
10041 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10042 calls to hostio_error.
10043 * hostio-errno.c: New.
10044 * server.h (hostio_last_error_from_errno): Declare.
10045 * target.h (target_ops): Add hostio_last_error member.
10046 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10047 as hostio_last_error handler.
889bf7c5 10048 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
10049 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10050 (wince_hostio_last_error): New functions.
10051 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10052 as hostio_last_error handler.
10053 (win32_target_ops) [!_WIN32_WCE]: Register
10054 hostio_last_error_from_errno as hostio_last_error handler.
10055 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10056 (hostio-errno.o): New rule.
10057 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10058 * configure.srv (srv_hostio_err_objs): New variable. Default to
10059 hostio-errno.o.
10060 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10061 * configure: Regenerate.
10062
2d717e4f
DJ
100632008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10064
10065 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10066 (linux_kill, linux_detach): Clean up the process list.
10067 * remote-utils.c (remote_open): Improve port number parsing.
10068 (putpkt_binary, input_interrupt): Only send interrupts if the target
10069 is running.
10070 * server.c (extended_protocol): Make static.
10071 (attached): Define earlier.
10072 (exit_requested, response_needed, program_argv): New variables.
10073 (target_running): New.
10074 (start_inferior): Clear attached here.
10075 (attach_inferior): Set attached here.
10076 (require_running): Define.
10077 (handle_query): Use require_running and target_running. Implement
10078 "monitor exit".
10079 (handle_v_attach, handle_v_run): New.
10080 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10081 (gdbserver_usage): Update.
10082 (main): Redo argument parsing. Handle --debug and --multi. Handle
10083 --attach along with other options or after the port. Save
10084 program_argv. Support no initial program. Resynchronize
10085 communication with GDB after an error. Handle "monitor exit".
10086 Use require_running and target_running. Always allow the extended
10087 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10088 restart in extended mode.
10089 * README: Refer to the GDB manual. Update --attach usage.
10090
7407e2de
AS
100912007-12-20 Andreas Schwab <schwab@suse.de>
10092
10093 * linux-low.c (STACK_SIZE): Define.
10094 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10095 (linux_test_for_tracefork): Likewise.
10096
b65d95c5
DJ
100972007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10098
10099 * linux-low.c (linux_wait_for_event): Update messages. Do not
10100 reinsert auto-delete breakpoints.
10101 * mem-break.c (struct breakpoint): Change return type of handler to
10102 int.
10103 (set_breakpoint_at): Update handler type.
10104 (reinsert_breakpoint_handler): Return 1 instead of calling
10105 delete_breakpoint.
10106 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10107 setting a new one.
10108 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10109 * mem-break.h (set_breakpoint_at): Update handler type.
10110 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10111 * win32-low.c (auto_delete_breakpoint): New.
10112 (get_child_debug_event): Use it.
10113
4e799345
DJ
101142007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10115
10116 * configure.ac: Check for pread and pwrite.
10117 * hostio.c (handle_pread): Fall back to lseek and read.
10118 (handle_pwrite): Fall back to lseek and write.
10119 * config.in, configure: Regenerated.
10120
27524b67
DJ
101212007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10122
10123 * server.c (myresume): Add own_buf argument.
10124 (main): Update calls.
10125
a20d5e98
DJ
101262007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10127
10128 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10129 * remote-utils.c (remote_open): Do not call disable_async_io.
10130 (block_async_io): Delete.
10131 (unblock_async_io): Make static.
10132 (initialize_async_io): New.
10133 * server.c (handle_v_cont): Handle async I/O here.
10134 (myresume): Likewise. Move other common resume tasks here...
10135 (main): ... from here. Call initialize_async_io. Disable async
10136 I/O before the main loop.
10137 * server.h (initialize_async_io): Declare.
10138 (block_async_io, unblock_async_io): Delete prototypes.
10139 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10140
b79d787e
DJ
101412007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10142
10143 * remote-utils.c (readchar): Allow binary data in received messages.
10144
d97903b2
PA
101452007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10146
10147 * win32-low.c (attaching): New global.
10148 (win32_create_inferior): Clear the `attaching' global.
10149 (win32_attach): Set the `attaching' global.
10150 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10151 attaching. Only set a breakpoint at the entry point if not
10152 attaching.
10153
311de423
PA
101542007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10155
10156 * server.c (main): Don't report dll events on the initial
10157 connection on attaches.
10158
6c2d16d2
PA
101592007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10160
10161 * server.c (main): Relax numerical bases supported for the pid of
10162 the --attach command line argument.
10163
5ca906e6
PA
101642007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10165
10166 * win32-low.c (win32_attach): Call OpenProcess before
10167 DebugActiveProcess, not after. Add last error output to error
10168 call.
10169
9c6c8194
PA
101702007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10171
10172 * win32-low.c (win32_get_thread_context)
10173 (win32_set_thread_context): New functions.
10174 (thread_rec): Use win32_get_thread_context.
10175 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10176 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10177 field.
10178
4d5d1aaa
PA
101792007-12-03 Leo Zayas
10180 Pedro Alves <pedro_alves@portugalmail.pt>
10181
10182 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10183 global variables.
10184 (child_add_thread): Minor cleanup.
10185 (child_continue): Resume artificially suspended threads before
10186 calling ContinueDebugEvent.
10187 (suspend_one_thread): New.
10188 (fake_breakpoint_event): New.
10189 (get_child_debug_event): Change return type to int. Check here if
10190 gdb sent an interrupt request. If a soft interrupt was requested,
10191 fake a breakpoint event. Return 0 if there is no event to handle,
10192 and 1 otherwise.
10193 (win32_wait): Don't check here if gdb sent an interrupt request.
10194 Ensure there is a valid event to handle.
10195 (win32_request_interrupt): Add soft interruption method as last
10196 resort.
10197
c436e841
PA
101982007-12-03 Leo Zayas
10199 Pedro Alves <pedro_alves@portugalmail.pt>
10200
10201 * win32-low.h (win32_thread_info): Add descriptions to the
10202 structure members. Replace `suspend_count' counter by a
10203 `suspended' flag.
10204 * win32-low.c (thread_rec): Update condition of when to get the
10205 context from the inferior. Rely on ContextFlags being set if it
10206 has already been retrieved. Only suspend the inferior thread if
10207 we haven't already. Warn if that fails.
10208 (continue_one_thread): s/suspend_count/suspended/. Only call
10209 ResumeThread once. Warn if that fails.
10210
e7b5fa67
PA
102112007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10212
10213 * win32-low.c (win32_wait): Don't read from the inferior when it
10214 has already exited.
10215
a385171d
PA
102162007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10217
10218 * Makefile.in (win32_low_h): New variable.
10219 (win32-low.o): Add dependency on $(win32_low_h).
10220 (win32-arm-low.o, win32-i386-low.o): New rules.
10221
f80c84b3
DJ
102222007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10223
10224 * hostio.c: Correct copyright year.
10225
a6b151f1
DJ
102262007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10227
10228 * Makefile.in (OBS): Add hostio.o.
10229 (hostio.o): New rule.
10230 * server.h (handle_vFile): Declare.
10231 * hostio.c: New file.
10232 * server.c (handle_v_requests): Take packet_len and new_packet_len
10233 for binary packets. Call handle_vFile.
10234 (main): Update call to handle_v_requests.
10235
f9387fc3
DJ
102362007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10237
10238 * linux-low.c: Include <sched.h>.
10239
51c2684e
DJ
102402007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10241
10242 * linux-low.c (linux_tracefork_grandchild): New.
10243 (linux_tracefork_child): Use clone.
10244 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10245
75f83163
JB
102462007-10-31 Joel Brobecker <brobecker@adacore.com>
10247
10248 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10249
da5898ce
DJ
102502007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10251
10252 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10253
24a09b5f
DJ
102542007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10255
10256 * inferiors.c (change_inferior_id): Delete.
10257 (add_pid_to_list, pull_pid_from_list): New.
10258 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10259 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10260 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10261 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10262 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10263 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10264 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10265 (using_threads): Always set to 1.
10266 (handle_extended_wait): New.
10267 (add_process): Do not set TID.
10268 (linux_create_inferior): Set must_set_ptrace_flags.
10269 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10270 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10271 (linux_thread_alive): Rename TID argument to LWPID.
10272 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10273 (linux_wait_for_event): Do not use TID or check using_threads. Update
10274 call to dead_thread_notify. Call handle_extended_wait.
10275 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10276 (send_sigstop): Delete sigstop_sent.
10277 (wait_for_sigstop): Avoid TID.
10278 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10279 (linux_test_for_tracefork): New.
10280 (linux_lookup_signals): Use thread_db_active and
10281 linux_supports_tracefork_flag.
10282 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10283 * linux-low.h (get_process_thread): Avoid TID.
10284 (struct process_ifo): Move thread_known and tid to the end. Remove
10285 sigstop_sent.
10286 (linux_attach_lwp, thread_db_init): Update prototypes.
10287 * server.h (change_inferior_id): Delete prototype.
10288 (add_pid_to_list, pull_pid_from_list): New prototypes.
10289 * thread-db.c (thread_db_use_events): New.
10290 (find_first_thread): Rename to...
10291 (find_one_thread): ...this. Update callers and messages. Do not
10292 call fatal. Check thread_db_use_events. Do not call
10293 change_inferior_id or new_thread_notify.
10294 (maybe_attach_thread): Update. Do not call new_thread_notify.
10295 (thread_db_init): Set thread_db_use_events. Check use_events.
10296 * utils.c (fatal, warning): Correct message prefix.
10297
30ed0a8f
DJ
102982007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10299
10300 * Makefile.in (clean): Remove new files.
10301 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10302 (powerpc-64.o, powerpc-64.c): New rules.
10303 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10304 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10305 with SPE.
10306 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10307 SPE targets.
10308 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10309 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10310 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10311 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10312 (target_regsets): Add AltiVec and SPE register sets.
10313 * configure.ac: Check for AltiVec and SPE.
10314 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10315 (ppc_fill_vrregset, ppc_store_vrregset): New.
10316 (target_regsets): Add AltiVec register set.
10317 * configure: Regenerated.
10318
fd462a61
DJ
103192007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10320
10321 * linux-low.c (O_LARGEFILE): Define.
10322 (linux_read_memory): Use /proc/PID/mem.
10323 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10324 * configure, config.in: Regenerated.
10325
69f223ed
DJ
103262007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10327
10328 * linux-low.c (linux_wait_for_event): Do not pass signals while
10329 single-stepping.
10330
aec18585
PA
103312007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10332
10333 * win32-low.c (create_process): New.
10334 (win32_create_inferior): Use create_process instead of
10335 CreateProcess. If create_process failed retry appending an ".exe"
10336 suffix. Store the GetLastError result immediatelly after
10337 create_process calls and use it on the call to error.
10338
34d86ddd
PA
103392007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10340
10341 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10342
5a0e3bd0
JB
103432007-08-23 Joel Brobecker <brobecker@adacore.com>
10344
10345 * configure.ac: Switch license to GPLv3.
10346
f88c79e6
MS
103472007-08-01 Michael Snyder <msnyder@access-company.com>
10348
10349 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10350
6b3d9b83
PA
103512007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10352
10353 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10354 typedef.
10355 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10356 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10357 CloseToolhelp32Snapshot.
10358 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10359 CloseToolhelp32Snapshot.
10360
c588c53c
MS
103612007-07-27 Michael Snyder <michael.snyder@access-company.com>
10362
10363 * server.c (main): Check for inferior exit before main loop.
10364
aa0403d9
PA
103652007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10366
10367 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10368 instead of on tmp_desc.
10369
255e7678
DJ
103702007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10371 Daniel Jacobowitz <dan@codesourcery.com>
10372
10373 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10374 (add_thread): Minor cleanups.
10375 (clear_inferiors): Move lower in the file. Clear the DLL
10376 list.
10377 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10378 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10379 (xml_escape_text): New.
10380 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10381 for qSupported.
10382 (handle_v_cont): Report errors.
10383 (gdbserver_version): Update.
10384 (main): Correct size of own_buf. Do not report initial DLL events.
10385 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10386 (unloaded_dll, xml_escape_text): New.
10387 * win32-low.c (enum target_waitkind): Update comments.
10388 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10389 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10390 (win32_EnumProcessModules, win32_GetModuleInformation)
10391 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10392 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10393 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10394 (win32_Module32First, win32_Module32Next, load_toolhelp)
10395 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10396 (get_child_debug_event): Handle DLL events.
10397 (win32_wait): Likewise.
10398
0d37add9
DJ
103992007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10400
10401 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10402 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10403
45e2715e
PA
104042007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10405
10406 * win32-low.c (handle_output_debug_string): Ignore event if not
10407 waiting.
10408
c5674cf1
PA
104092007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10410
10411 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10412
2bbe3cc1
DJ
104132007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10414
10415 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10416
ae13219e
DJ
104172007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10418
10419 * inferiors.c (change_inferior_id): Add comment.
10420 * linux-low.c (check_removed_breakpoint): Add an early
10421 prototype. Improve debug output.
10422 (linux_attach): Doc update.
10423 (linux_detach_one_process, linux_detach): Clean up before releasing
10424 each process.
10425 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10426 * linux-low.h (struct process_info): Doc improvement.
10427 * mem-break.c (delete_all_breakpoints): New.
10428 * mem-break.h (delete_all_breakpoints): New prototype.
10429 * thread-db.c (find_first_thread): New.
10430 (thread_db_create_event): Call it instead of
10431 thread_db_find_new_threads. Clean up unused variables.
10432 (maybe_attach_thread): Remove first thread handling.
10433 (thread_db_find_new_threads): Use find_first_thread.
10434 (thread_db_get_tls_address): Likewise.
10435
4105de34
DJ
104362007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10437
10438 * thread-db.c (thread_db_find_new_threads): Add prototype.
10439 (thread_db_create_event): Check for the main thread before adding
10440 a new thread.
10441 (maybe_attach_thread): Only enable event reporting if TID == 0.
10442 (thread_db_get_tls_address): Check for new threads.
10443
2b876972
DJ
104442007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10445
10446 * linux-low.c (linux_create_inferior): Try execv before execvp.
10447 * spu-low.c (spu_create_inferior): Likewise.
10448
7a245884
DJ
104492007-06-13 Mike Frysinger <vapier@gentoo.org>
10450
10451 * linux-low.c (linux_create_inferior): Change execv to execvp.
10452 * spu-low.c (spu_create_inferior): Likewies.
10453
117ce543
DJ
104542007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10455
10456 * Makefile.in (clean): Clean new files instead of deleted ones.
10457 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10458 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10459 rules.
10460 * configure.srv: Specify XML files and new regformats for MIPS and
10461 MIPS64 GNU/Linux.
10462 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10463 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10464 an entry for the restart register.
10465 (mips_cannot_fetch_register, mips_cannot_store_register)
10466 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10467 register names to match the XML descriptions.
10468 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10469 restart register instead of $0.
10470
0e7f50da
UW
104712007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10472 Markus Deuling <deuling@de.ibm.com>
10473
10474 * remote-utils.c (decode_xfer_write): New function.
10475 * server.h (decode_xfer_write): Add prototype.
10476 * server.c (handle_query): Add PACKET_LEN argument. Support
10477 qXfer:spu:read and qXfer:spu:write packets.
10478 (main): Pass packet_len to handle_query.
10479 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10480 * target.h (target_ops): Add qxfer_spu.
10481
374c1d38
UW
104822007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10483
10484 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10485 accessing non-seekable spufs files.
10486
bb63802a
UW
104872007-05-16 Markus Deuling <deuling@de.ibm.com>
10488
889bf7c5 10489 * server.c (handle_query): Add reply for qC packet.
bb63802a 10490
7390519e
PA
104912007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10492 Leo Zayas <lerele@champenstudios@com>
10493
10494 * server.h (check_remote_input_interrupt_request): New function.
10495 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10496 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10497 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10498 (check_remote_input_interrupt_request): New function.
10499 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 10500 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
10501 winapi_GenerateConsoleCtrlEvent): New typedefs.
10502 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10503 to 250 ms.
10504 (win32_wait): Check for remote interrupt request
10505 with check_remote_input_interrupt_request.
10506 (win32_request_interrupt): New function.
10507 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10508
34b34921
PA
105092007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10510
10511 * win32-low.c (debug_registers_changed,
10512 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10513 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10514 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10515 (thread_rec): Get context using the low target.
10516 (child_add_thread): Call thread_added on the low target,
10517 which does the same thing.
10518 (regptr): Delete.
10519 (do_initial_child_stuff): Remove debug registers references.
10520 Set context using the low target. Resume threads after
10521 setting the contexts.
10522 (child_continue): Remove dead variable. Remove debug
10523 registers references.
10524 (child_fetch_inferior_registers): Go through the low target.
10525 (do_child_store_inferior_registers): Remove.
10526 (child_store_inferior_registers): Go through the low target.
10527 (win32_resume): Remove debug registers references.
10528 Set context using the low target.
10529 (handle_exception): Change return type to void. Don't record
10530 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10531 first chance exception.
889bf7c5 10532 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
10533 goto loop. Always return after waiting for debug event.
10534 (win32_wait): Convert to switch statement. Handle spurious
10535 events.
10536
10537 * win32-i386-low.c (debug_registers_changed,
10538 debug_registers_used): New.
10539 (initial_stuff): Rename to ...
10540 (i386_initial_stuff): ... this. Clear debug registers
10541 state variables.
10542 (store_debug_registers): Delete.
10543 (i386_get_thread_context): New.
10544 (load_debug_registers): Delete.
10545 (i386_set_thread_context): New.
10546 (i386_thread_added): New.
10547 (single_step): Rename to ...
10548 (i386_single_step): ... this.
10549 (do_fetch_inferior_registers): Rename to ...
10550 (i386_fetch_inferior_register): ... this.
10551 (i386_store_inferior_register): New.
10552 (the_low_target): Adapt to new interface.
10553
10554 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10555 (arm_get_thread_context): New.
10556 (arm_set_thread_context): New.
10557 (regptr): New.
10558 (do_fetch_inferior_registers): Rename to ...
10559 (arm_fetch_inferior_register): ... this.
10560 (arm_store_inferior_register): New.
10561 (arm_wince_breakpoint): Reimplement as unsigned long.
10562 (arm_wince_breakpoint_len): Define.
10563 (the_low_target): Adapt to new interface.
10564
10565 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10566 load_debug_registers. Add get_thread_context, set_thread_context,
10567 thread_added and store_inferior_register. Rename
10568 fetch_inferior_registers to fetch_inferior_register.
10569 (regptr): Remove declaration.
10570
dd6953e1
PA
105712007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10572
10573 * linux-low.c (linux_detach): Change return type to int. Return 0.
10574 * spu-low.c (spu_detach): Likewise.
10575
444d6139
PA
105762007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10577
10578 * target.h (target_ops): Change return type of detach to int.
10579 Add join.
10580 (join_inferior): New.
10581 * server.c (main): Don't skip detach support on mingw32.
10582 If the inferior doesn't support detaching return error.
10583 Call join_inferior instead of using waitpid.
10584 * linux-low.c (linux_join): New.
10585 (linux_target_op): Add linux_join.
10586 * spu-low.c (spu_join): New.
10587 (spu_target_ops): Add spu_join.
10588 * win32-low.c (win32_detach): Adapt to new interface.
10589 Reopen current_process_handle before detaching. Issue a child
10590 resume before detaching.
10591 (win32_join): New.
10592 (win32_target_op): Add win32_join.
10593
1d5315fe
PA
105942007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10595
10596 * win32-low.c (win32-attach): Fix return value.
10597 * target.h (target_ops): Describe ATTACH return values.
10598
bf914831
PA
105992007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10600
10601 * win32-low.c (GETPROCADDRESS): Define.
10602 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10603 (winapi_DebugSetProcessKillOnExit): Likewise.
10604 (win32_create_inferior): Force usage of ansi CreateProcessA.
10605 (win32_attach): Use GETPROCADDRESS.
10606 (win32_detach): Likewise.
10607
f72f3e60
PA
106082007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10609
10610 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10611
ed50f18f
PA
106122007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10613
10614 * win32-low.c: Commit leftover changes from 2007-03-29.
10615
0c2ead7e
DJ
106162007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10617
10618 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10619 fields short instead of int. Add explicit padding.
10620 (i387_cache_to_fsave): Remove unnecessary casts.
10621 (i387_fsave_to_cache): Doc fix.
10622 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10623
73725ff3
DJ
106242007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10625
10626 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10627 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10628
d99f33d8
PA
106292007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10630
10631 * configure.srv (arm*-*-mingw32ce*): Move near the other
10632 arm targets.
10633
68070c10
PA
106342007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10635
2482afc6 10636 * configure.ac: Add errno checking.
68070c10
PA
10637 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10638 sys/file.h and malloc.h.
10639 (AC_CHECK_DECLS): Add perror.
10640 (srv_mingwce): Handle.
2482afc6 10641 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
10642 win32-i386-low.o to srv_tgtobj.
10643 (i[34567]86-*-mingw*): Likewise.
10644 (arm*-*-mingw32ce*): Add case.
10645 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10646 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10647 [__MINGW32CE__] (strerror): New function.
10648 [__MINGW32CE__] (errno): Define to GetLastError.
10649 [__MINGW32CE__] (COUNTOF): New macro.
10650 (remote_open): Remove extra close call.
10651 * mem-break.c (delete_breakpoint_at): New function.
10652 * mem-break.h (delete_breakpoint_at): Declare.
10653 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10654 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10655 [USE_WIN32API] (read, write): Add char* casts.
10656 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10657 * server.h: Include wincecompat.h on Windows CE.
10658 [HAVE_ERRNO_H]: Check.
10659 (perror): Declare if not declared.
10660 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10661 (perror_with_name): Remove errno declaration.
10662 * wincecompat.h: New.
10663 * wincecompat.c: New.
10664 * win32-low.h: New.
10665 * win32-arm-low.c: New.
10666 * win32-i386-low.c: New.
10667 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10668 (OUTMSG2): Make it safe.
10669 (_T): New macro.
10670 (COUNTOF): New macro.
10671 (NUM_REGS): Get it from the low target.
10672 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10673 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10674 (thread_rec): Let low target handle debug registers.
10675 (child_add_thread): Likewise.
10676 (child_init_thread_list): Likewise.
10677 (continue_one_thread): Likewise.
10678 (regptr): New.
10679 (do_child_fetch_inferior_registers): Move to ...
10680 * win32-i386-low.c: ... here, and rename to ...
10681 (do_fetch_inferior_registers): ... this.
889bf7c5 10682 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
10683 Go through the low target.
10684 (do_child_store_inferior_registers): Use regptr.
10685 (strwinerror): New function.
10686 (win32_create_inferior): Handle Windows CE.
10687 Use strwinerror instead of strerror on Windows error
10688 codes. Add program to the error output.
10689 Don't close the main thread handle on Windows CE.
10690 (win32_attach): Use coredll.dll on Windows CE.
10691 (win32_kill): Close current process and current
10692 thread handles.
10693 (win32_detach): Use coredll.dll on Windows CE.
10694 (win32_resume): Let low target handle debug registers, and
10695 step request.
10696 (handle_exception): Add/Remove initial breakpoint. Avoid
10697 non-existant WSTOPSIG on Windows CE.
10698 (win32_read_inferior_memory): Cast to remove warning.
10699 (win32_arch_string): Go through the low target.
10700 (initialize_low): Call set_breakpoint_data with the low
10701 target's breakpoint.
10702 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10703 FOP_REGNUM, mappings): Move to ...
10704 * win32-i386-low.c: ... here.
10705 * win32-low.c (win32_thread_info): Move to ...
10706 * win32-low.h: ... here.
10707 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10708 win32-arm-low.c and wincecompat.c.
10709 (all:): Add $EXEEXT.
10710 (install-only:): Likewise.
10711 (gdbserver:): Likewise.
10712 (gdbreplay:): Likewise.
10713 * config.in: Regenerate.
10714 * configure: Regenerate.
10715
41093d81
PA
107162007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10717
10718 * win32-low.c: Rename typedef thread_info to
10719 win32_thread_info throughout.
10720
544afa54
PA
107212007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10722
10723 * win32-i386-low.c: Rename to ...
10724 * win32-low.c: ... this.
10725 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10726 * Makefile.in: Likewise.
10727
bce7165d
PA
107282007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10729
10730 * remote-utils.c (monitor_output): Constify msg parameter.
10731 * server.h (monitor_output): Likewise.
10732 * win32-i386-low.c (handle_output_debug_string): New.
10733 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10734 handle_output_debug_string.
10735 (get_child_debug_event): Likewise.
10736
506c7aa0
DJ
107372007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10738
10739 * server.c (main): Correct strtoul check.
10740
42c81e2a
DJ
107412007-03-27 Jon Ringle <jon@ringle.org>
10742
10743 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10744
9453113a
DJ
107452007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10746
10747 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10748
64a69107
DJ
107492007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10750
10751 * terminal.h: Check HAVE_SGTTY_H.
10752
107532007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
10754
10755 * remote-utils.c (remote_open): Print out the assigned port number.
10756
c74d0ad8
DJ
107572007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10758
10759 * remote-utils.c (monitor_output): New function.
10760 * server.c (debug_threads): Define here.
10761 (monitor_show_help): New function.
10762 (handle_query): Handle qRcmd.
10763 (main): Do not handle 'd' packet.
10764 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10765 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10766 of debug_threads.
10767
de7c3b4a
PA
107682007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10769
10770 * Makefile.in (EXEEXT): New.
10771 (clean): Use $(EXEEXT).
10772
ef57601b
PA
107732007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10774
10775 * target.h (target_ops): Rename send_signal to request_interrupt,
10776 and remove enum target_signal parameter.
10777 * linux-low.c (linux_request_interrupt): Rename from
10778 linux_send_signal, and always send SIGINT.
10779 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10780 and always send SIGINT.
10781 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10782 of send_signal.
10783 (input_interrupt): Likewise.
10784
820f2bda
PA
107852007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10786
10787 * server.c (get_features_xml): Check if target implemented
10788 arch_string.
10789 * win32-i386-low.c (win32_arch_string): New.
10790 (win32_target_ops): Add win32_arch_string as arch_string member.
10791
ab39bf24
UW
107922007-02-22 Markus Deuling <deuling@de.ibm.com>
10793
10794 * spu-low.c (spu_arch_string): New.
10795 (spu_target_ops): Add spu_arch_string.
10796
61ff6e04
DJ
107972007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10798
10799 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10800 * configure.ac: Do not check for terminal.h.
10801 * configure, config.in: Regenerated.
10802
fb1e4ffc
DJ
108032007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10804
10805 * Makefile.in (OBS): Add $(XML_BUILTIN).
10806 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10807 (clean): Update.
10808 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10809 (arm-with-iwmmxt.c): New.
10810 * config.in, configure: Regenerate.
10811 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10812 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10813 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10814 (arm*-*-linux*): Add iWMMXt and regset support.
10815 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10816 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10817 (arm_store_wmmxregset, target_regsets): New.
10818 * server.c (get_features_xml): Take annex argument. Check builtin
10819 XML documents.
10820 (handle_query): Handle multiple annexes.
10821
0f48aa01
DJ
108222007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10823
10824 * remote-utils.c [USE_WIN32API] (read, write): Define.
10825 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10826 write.
10827
23181151
DJ
108282007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10829
10830 * linux-i386-low.c (the_low_target): Set arch_string.
10831 * linux-x86-64-low.c (the_low_target): Likewise.
10832 * linux-low.c (linux_arch_string): New.
10833 (linux_target_ops): Add it.
10834 * linux-low.h (struct linux_target_ops): Add arch_string.
10835 * server.c (write_qxfer_response): Use const void * for DATA.
10836 (get_features_xml): New.
10837 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10838 * target.h (struct target_ops): Add arch_string method.
10839
9d606399
DJ
108402007-01-03 Denis Pilat <denis.pilat@st.com>
10841 Daniel Jacobowitz <dan@codesourcery.com>
10842
10843 * linux-low.c (linux_kill): Handle being called with no threads.
10844 * win32-i386-low.c (win32_kill): Likewise.
10845 (get_child_debug_event): Clear current_process_handle.
10846
108472006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
10848 Daniel Jacobowitz <dan@codesourcery.com>
10849
10850 * remote-utils.c (remote_open): Check the type of specified
10851 serial port devices before opening them.
10852 * server.c (main): Kill the inferior if an error occurs during
10853 the first remote_open.
10854
a5e13d24
DJ
108552006-12-05 Markus Deuling <deuling@de.ibm.com>
10856
10857 * README: Update supported targets.
10858
186947f7
DJ
108592006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10860
10861 * Makefile.in (clean): Remove reg-mips64.c.
10862 (reg-mips64.c, reg-mips64.o): New rules.
10863 * configure.srv: Handle mips64. Include regset support for mips.
10864 * linux-mips-low.c (union mips_register): New.
10865 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10866 (mips_breakpoint, mips_breakpoint_at): Use int.
10867 (mips_collect_register, mips_supply_register)
10868 (mips_collect_register_32bit, mips_supply_register_32bit)
10869 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10870 (mips_store_fpregset, target_regsets): New.
10871 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10872
a13e2c95
UW
108732006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10874
10875 * configure.srv: Add target "spu*-*-*".
10876 * Makefile.in (clean): Remove reg-spu.c.
10877 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10878 * spu-low.c: New file.
10879
cb7283db
DJ
108802006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10881
10882 * configure.ac: Correct td_thr_tls_get_addr test.
10883 * configure: Regenerated.
10884
89be2091
DJ
108852006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10886
10887 * linux-low.c (linux_wait_for_event): Reformat. Use the
10888 pass_signals array.
10889 * remote-utils.c (decode_address_to_semicolon): New.
10890 * server.c (pass_signals, handle_general_set): New.
10891 (handle_query): Mention QPassSignals for qSupported.
10892 (main): Call handle_general_set.
10893 * server.h (pass_signals, decode_address_to_semicolon): New.
10894
000ef4f0
DJ
108952006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10896
10897 * server.c (handle_query): Correct error handling for read_auxv.
10898
b7149293
UW
108992005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10900
10901 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10902 and srv_linux_thread_db to yes.
10903 * linux-s390-low.c (s390_fill_gregset): New function.
10904 (target_regsets): Define data structure.
10905
dae5f5cf
DJ
109062006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10907
10908 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10909 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10910 * config.in, configure: Regenerated.
10911 * inferiors.c (gdb_id_to_thread): New function.
10912 (gdb_id_to_thread_id): Use it.
10913 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10914 * linux-low.h (struct process_info): Add th member.
10915 (thread_db_get_tls_address): New prototype.
10916 * remote-utils.c (decode_address): Make non-static.
10917 * server.c (handle_query): Handle qGetTLSAddr.
10918 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10919 * target.h (struct target_ops): Add get_tls_address.
10920 * thread-db.c (maybe_attach_thread): Save the thread handle.
10921 (thread_db_get_tls_address): New.
10922
32ca6d61
DJ
109232006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10924
10925 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10926 (linux_resume_one_process): Take a siginfo_t *. Update all
10927 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10928 (struct pending_signals): Add a siginfo_t.
10929 (linux_wait_for_process): Always set last_status.
10930 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10931 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10932 * linux-low.h (struct process_info): Add last_status.
10933
5ffff7c1
DJ
109342006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10935
10936 * remote-utils.c (try_rle): New function.
10937 (putpkt_binary): Use it.
10938
8695c747
DJ
109392006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10940
10941 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10942 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10943 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10944 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10945 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10946 point registers.
10947
290fadea
RS
109482006-08-08 Richard Sandiford <richard@codesourcery.com>
10949
10950 * server.c (terminal_fd): New variable.
10951 (old_foreground_pgrp): Likewise.
10952 (restore_old_foreground_pgrp): New function.
10953 (start_inferior): Record the terminal file descriptor in terminal_fd
10954 and its original foreground group in old_foreground_pgrp. Register
10955 restore_old_foreground_pgrp with atexit().
10956
9f2e1e63
DJ
109572006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10958
10959 * server.c (handle_query): Correct qPart to qXfer.
10960
b80864fb
DJ
109612006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10962
10963 * configure.ac: Check for more headers which are missing on
10964 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10965 * configure.srv: Add Cygwin and mingw32.
10966 * remote-utils.c: Don't include headers unconditionally which
10967 are missing on mingw32. Include <winsock.h> for mingw32.
10968 (remote_open): Adjust for mingw32 support. Flush
10969 standard error after writing to it.
10970 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10971 (unblock_async_io, enable_async_io, disable_async_io)
10972 (readchar, getpkt): Update for Winsock support.
10973 (prepare_resume_reply): Expect a protocol signal number.
10974 * server.c: Disable <sys/wait.h> on mingw32.
10975 (start_inferior): Adjust for mingw32 support. Flush
10976 standard error after writing to it.
10977 (attach_inferior): Likewise. Use protocol signal
10978 numbers.
10979 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10980 and names.
10981 * win32-i386-low.c: New file.
10982 * Makefile.in (XM_CLIBS): Set.
10983 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10984 (win32-i386-low.o): New dependency rule.
10985 * linux-low.c (linux_wait): Use target signal numbers.
10986 * target.h (struct target_ops): Doc fix.
10987 * server.h (target_signal_to_name): New prototype.
10988 * gdbreplay.c: Don't include headers unconditionally which
10989 are missing on mingw32. Include <winsock.h> for mingw32.
10990 (remote_close, remote_open): Adjust for Winsock support.
10991 * configure, config.in: Regenerated.
10992
0876f84a
DJ
109932006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10994
10995 * server.c (decode_xfer_read, write_qxfer_response): New.
10996 (handle_query): Take a packet length argument. Handle
10997 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10998 the qSupported response.
10999 (main): Update call to handle_query.
11000
01f9e8fa
DJ
110012006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11002
11003 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11004 (putpkt_binary): Renamed from putpkt and adjusted for binary
11005 data.
11006 (putpkt): New wrapper for putpkt_binary.
11007 (readchar): Don't mask off the high bit.
11008 (decode_X_packet): New function.
11009 * server.c (main): Call putpkt_binary if a handler sets the packet
11010 length. Save the length of the incoming packet. Handle 'X'.
11011 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11012
be2a5f71
DJ
110132006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11014
11015 * server.c (handle_query): Handle qSupported.
11016
ea025f5f
DJ
110172006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11018
11019 * remote-utils.c (all_symbols_looked_up): New variable.
11020 (look_up_one_symbol): Check it.
11021 * server.h (look_up_one_symbol): New declaration.
11022 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11023
9308fc88
DJ
110242006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11025
11026 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 11027 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
11028 (PTRACE_GET_THREAD_AREA): Define.
11029 (ps_get_thread_area): New function.
11030
52fb6437
NS
110312006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11032
11033 * configure.srv (m68k*-*-uclinux*): New target.
11034 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11035 (linux_resume_one_process): Remove extraneous cast.
11036 (linux_read_offsets): New.
11037 (linux_target_op): Add linux_read_offsets on mmuless systems.
11038 * server.c (handle_query): Add qOffsets logic.
11039 * target.h (struct target_ops): Add read_offsets.
11040
21b0f40c
DJ
110412006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11042
11043 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11044 (PTRACE_GET_THREAD_AREA): Define.
11045 (ps_get_thread_area): New function.
11046 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11047 (linux-x86-64-low.o): Update.
11048
0050a760
DJ
110492006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11050
11051 * configure.ac: Remove checks for prfpregset_t.
11052 * gdb_proc_service.h: New file.
11053 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11054 new "gdb_proc_service.h".
11055 * proc-service.c: Likewise.
11056 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11057 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11058 * Makefile.in (gdb_proc_service_h): Updated.
11059 * configure, config.in: Regenerated.
11060
b92a518e
DJ
110612006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11062
11063 * remote-utils.c (prepare_resume_reply): Move declaration
11064 of gdb_id_from_wait to the top of the block.
11065
545587ee
DJ
110662006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11067
11068 * linux-low.c (regsets_store_inferior_registers): Read the regset
11069 from the target before filling it.
11070
9db87ebd
DJ
110712006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11072
11073 * server.c (attach_inferior): Return SIGTRAP for a successful
11074 attach.
11075
dd24457d
DJ
110762006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11077
11078 * Makefile.in (OBS): Add version.o.
11079 (STAGESTUFF): Delete.
11080 (version.o): Add dependencies.
11081 (version.c): Replace rule.
11082 (clean): Remove version.c.
11083 * server.c (gdbserver_version): New.
11084 (gdbserver_usage): Use printf.
11085 (main): Handle --version and --help.
11086 * server.h (version, host_name): Add declarations.
11087
6f0f660e
EZ
110882005-12-23 Eli Zaretskii <eliz@gnu.org>
11089
889bf7c5
PA
11090 * linux-arm-low.c:
11091 * linux-arm-low.c:
11092 * inferiors.c:
11093 * i387-fp.h:
11094 * i387-fp.c:
11095 * gdbreplay.c:
11096 * regcache.c:
11097 * proc-service.c:
11098 * mem-break.h:
11099 * mem-break.c:
11100 * linux-x86-64-low.c:
11101 * linux-sh-low.c:
11102 * linux-s390-low.c:
11103 * linux-ppc64-low.c:
11104 * linux-ppc-low.c:
11105 * linux-mips-low.c:
11106 * linux-m68k-low.c:
11107 * linux-m32r-low.c:
11108 * linux-low.h:
11109 * linux-low.c:
11110 * linux-ia64-low.c:
11111 * linux-i386-low.c:
11112 * linux-crisv32-low.c:
11113 * thread-db.c:
11114 * terminal.h:
11115 * target.h:
11116 * target.c:
11117 * server.h:
11118 * server.c:
11119 * remote-utils.c:
11120 * regcache.h:
11121 * utils.c:
11122 * Makefile.in:
11123 * configure.ac:
6f0f660e
EZ
11124 * gdbserver.1: Add (C) after Copyright. Update the FSF
11125 address.
11126
9d1fb177
DJ
111272005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11128
11129 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11130 (arm_breakpoint_at): Recognize both breakpoints.
11131 (the_low_target): Use the correct breakpoint instruction.
11132
011a70c2
DJ
111332005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11134
11135 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11136 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11137 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11138 (the_low_target): Update.
11139
7fb85e41
AS
111402005-10-25 Andreas Schwab <schwab@suse.de>
11141
11142 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11143
11144 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11145 (ia64_num_regs): Reduce to 462.
11146
3db0444b
DJ
111472005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11148
11149 * acinclude.m4: Correct quoting.
11150 * aclocal.m4: Regenerated.
11151
11152 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11153 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11154 (thread_db_init): Call thread_db_err_str.
11155 * configure.ac: Check for TD_VERSION.
11156 * config.in, configure: Regenerated.
11157
bee0189a
DJ
111582005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11159
11160 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11161
e9d25b98
DJ
111622005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11163
11164 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11165 is not available. Define HAVE_PTRACE_GETREGS if it is.
11166 * config.in, configure: Regenerated.
11167 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11168 * linux-i386-low.c, linux-m68k-low.c: Update to use
11169 HAVE_PTRACE_GETREGS.
11170 * linux-low.c (regsets_fetch_inferior_registers)
11171 (regsets_store_inferior_registers): Only return 0 if we processed
11172 GENERAL_REGS.
11173 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11174 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11175
a06660f7
DJ
111762005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11177
11178 * inferiors.c (struct thread_info): Add gdb_id.
11179 (add_thread): Add gdb_id argument.
11180 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11181 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11182 calls to add_thread.
11183 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11184 * server.c (handle_query): Use thread_to_gdb_id.
11185 (handle_v_cont, main): Use gdb_id_to_thread_id.
11186 * server.h (add_thread): Update prototype.
11187 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11188 prototypes.
11189
5a1f5858
DJ
111902005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11191
11192 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11193 left-padded registers.
11194 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11195 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11196
e122f1f5
SE
111972005-07-01 Steve Ellcey <sje@cup.hp.com>
11198
11199 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11200 * configure: Regenerate.
11201 * config.in: Regenerate.
11202 * server.h (NEED_DECLARATION_STRERROR):
11203 Replace with !HAVE_DECL_STRERROR.
11204
d592fa2f
DJ
112052005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11206
11207 * linux-low.c (linux_wait, linux_send_signal): Don't test
11208 an unsigned long variable for > 0 if it could be MAX_ULONG.
11209 * server.c (myresume): Likewise.
11210 * target.c (set_desired_inferior): Likewise.
11211
ccbd4912
MK
112122005-06-13 Mark Kettenis <kettenis@gnu.org>
11213
11214 * configure.ac: Simplify and improve check for socklen_t.
11215 * configure, config.in: Regenerate.
11216
f450004a
DJ
112172005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11218
11219 * acconfig.h: Remove.
11220 * configure.ac: Add a test for socklen_t. Use three-argument
11221 AC_DEFINE throughout.
11222 * config.in: Regenerated using autoheader 2.59.
11223 * configure: Regenerated.
11224
11225 * gdbreplay.c (socklen_t): Provide a default.
11226 (remote_open): Use socklen_t.
11227 * remote-utils.c (socklen_t): Provide a default.
11228 (remote_open): Use socklen_t.
11229 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11230 unsigned char.
11231
11232 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11233 char for buffers.
11234 * linux-low.c (linux_read_memory, linux_write_memory)
11235 (linux_read_auxv): Likewise.
11236 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11237 (check_mem_write): Likewise.
11238 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11239 Likewise.
11240 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11241 (registers_from_string, register_data): Likewise.
11242 * server.c (handle_query, main): Likewise.
11243 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11244 (decode_M_packet): Likewise.
11245 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11246 * target.h (struct target_ops): Update read_memory, write_memory,
11247 and read_auxv.
11248 (read_inferior_memory, write_inferior_memory): Update.
11249 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11250 to unsigned char *.
11251 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11252 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11253 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11254 linux-s390-low.c, linux-sh-low.c: Update for changes in
11255 read_inferior_memory and the_low_target->breakpoint.
11256
eee84df1
DJ
112572005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11258
11259 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11260 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11261 * configure.srv: Add powerpc64-*-linux*.
11262 * linux-ppc64-low.c: New file.
11263
45b134e5
OF
112642005-05-23 Orjan Friberg <orjanf@axis.com>
11265
11266 * linux-cris-low.c: New file with support for CRIS.
11267 * linux-crisv32-low.c: Ditto for CRISv32.
11268 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11269 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 11270 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
11271 reg-crisv32.o, and reg-crisv32.c to make rules.
11272 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11273 recognized targets.
11274
48d93c75
UW
112752005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11276
11277 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11278 of sizeof (PTRACE_XFER_TYPE).
11279 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11280
e013ee27
OF
112812005-05-12 Orjan Friberg <orjanf@axis.com>
11282
889bf7c5 11283 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
11284 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11285 pointers for hardware watchpoint support.
11286 * linux-low.h (struct linux_target_ops): Ditto.
11287 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11288 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11289 to linux_target_ops.
11290 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11291 reply packet.
11292 * server.c (main): Recognize 'Z' and 'z' packets.
11293
b0ded00b
UW
112942005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11295
11296 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11297 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11298 (the_low_target): Add new members.
11299
8643e2ad
DJ
113002005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11301
11302 * proc-service.c (ps_lgetregs): Search all_processes instead of
11303 all_threads.
11304
fc620387
DJ
113052005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11306
11307 * server.c (start_inferior): Change return type to int.
11308 (attach_inferior): Change sigptr to int *.
11309 (handle_v_cont, handle_v_requests): Change signal to int *.
11310 (main): Change signal to int.
11311
113122005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
11313
11314 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11315 * configure.srv: Add m32r*-*-linux*.
11316 * linux-m32r-low.c: New file.
11317
e0e76420
DJ
113182005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11319
11320 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11321
a1928bad
DJ
113222005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11323
11324 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11325 Take unsigned long arguments for PIDs.
11326 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11327 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11328 (wait_for_sigstop, linux_resume_one_process)
11329 (regsets_fetch_inferior_registers, linux_send_signal)
11330 (linux_read_auxv): Likewise. Update the types of variables holding
11331 PIDs. Update format string specifiers.
11332 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11333 * remote-utils.c (prepare_resume_reply): Likewise.
11334 * server.c (cont_thread, general_thread, step_thread)
11335 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11336 unsigned long.
11337 (handle_query): Update format specifiers.
11338 (handle_v_cont, main): Use strtoul for thread IDs.
11339 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11340 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11341 (general_thread, step_thread, thread_from_wait)
11342 (old_thread_from_wait): Update.
11343 * target.h (struct thread_resume): Use unsigned long for THREAD.
11344 (struct target_ops): Use unsigned long for arguments to attach and
11345 thread_alive.
11346
dcdb98d2
DJ
113472005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11348
11349 * acinclude.m4: Include bfd/bfd.m4 directly.
11350 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11351 <agriffis@toolchain.org>.
11352 * aclocal.m4, configure: Regenerated.
11353
bec39cab
AC
113542005-01-07 Andrew Cagney <cagney@gnu.org>
11355
11356 * configure.ac: Rename configure.in, require autoconf 2.59.
11357 * configure: Re-generate.
11358
434c4c77
DJ
113592004-12-08 Daniel Jacobowitz <dan@debian.org>
11360
11361 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11362 LIBS when finished.
11363 * aclocal.m4: Regenerated.
11364 * configure: Regenerated.
11365
db1d3e1b
AS
113662004-11-21 Andreas Schwab <schwab@suse.de>
11367
11368 * linux-m68k-low.c (m68k_num_gregs): Define.
11369 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11370 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11371 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11372 (m68k_breakpoint_at): New. Add to the_low_target.
11373
11374 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11375 srv_linux_thread_db to yes.
11376
43360365
JB
113772004-10-20 Joel Brobecker <brobecker@gnat.com>
11378
11379 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11380 (ARCH_SET_FS): Likewise.
11381 (ARCH_GET_FS): Likewise.
11382 (ARCH_GET_GS): Likewise.
11383
fd500816
DJ
113842004-10-16 Daniel Jacobowitz <dan@debian.org>
11385
11386 * linux-i386-low.c (ps_get_thread_area): New.
11387 * linux-x86-64-low.c (ps_get_thread_area): New.
11388 * linux-low.c: Include <sys/syscall.h>.
11389 (linux_kill_one_process): Don't kill the first thread here.
11390 (linux_kill): Kill the first thread here.
11391 (kill_lwp): New function.
11392 (send_sigstop, linux_send_signal): Use it.
11393 * proc-service.c: Clean up #ifdefs.
11394 (fpregset_info): Delete.
11395 (ps_lgetregs): Update and enable implementation.
11396 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11397 implementations.
11398 * remote-utils.c (struct sym_cache, symbol_cache): New.
11399 (input_interrupt): Print a clearer message.
11400 (async_io_enabled): New variable.
11401 (enable_async_io, disable_async_io): Use it. Update comments.
11402 (look_up_one_symbol): Use the symbol cache.
11403 * thread-db.c (thread_db_look_up_symbols): New function.
11404 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11405
f6de3c42
DJ
114062004-10-16 Daniel Jacobowitz <dan@debian.org>
11407
11408 * configure.in: Test for -rdynamic.
11409 * configure: Regenerated.
11410 * Makefile (INTERNAL_LDFLAGS): New.
11411 (gdbserver, gdbreplay): Use it.
11412
2c0fc042
AC
114132004-09-02 Andrew Cagney <cagney@gnu.org>
11414
11415 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11416
075b3282
DJ
114172004-03-23 Daniel Jacobowitz <drow@mvista.com>
11418
11419 * linux-low.c (linux_wait): Clear all_processes list also.
11420
fa6a77dc
DJ
114212004-03-12 Daniel Jacobowitz <drow@mvista.com>
11422
11423 * linux-low.c: Include <errno.h>. Remove extern declaration of
11424 errno.
11425
6d782a97
DJ
114262004-03-12 Daniel Jacobowitz <drow@mvista.com>
11427
11428 * gdbreplay.c, server.h, utils.c: Update copyright years.
11429
3a7fb99b
DJ
114302004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11431
11432 * server.c (main): Print child status or termination signal from
11433 variable 'signal', not 'sig'.
11434
c3e735a6
DJ
114352004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11436
11437 * linux-low.c (linux_read_memory): Change return type to
11438 int. Check for and return error from ptrace().
11439 * target.c (read_inferior_memory): Change return type to int. Pass
11440 back return status from the_target->read_memory().
11441 * target.h (struct target_ops): Adapt *read_memory() prototype.
11442 Update comment.
11443 (read_inferior_memory): Adapt prototype.
11444 * server.c (main): Return an error packet if
11445 read_inferior_memory() returns an error.
11446
a59d1c82
DJ
114472004-03-04 Daniel Jacobowitz <drow@mvista.com>
11448
11449 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11450 Unify with other clean targets.
11451
dc3f8883
DJ
114522004-02-29 Daniel Jacobowitz <drow@mvista.com>
11453
11454 * server.c (handle_v_cont): Call set_desired_inferior.
11455
89a208da
DJ
114562004-02-29 Daniel Jacobowitz <drow@mvista.com>
11457
11458 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11459
62ea82f5
DJ
114602004-02-29 Daniel Jacobowitz <drow@mvista.com>
11461
11462 * linux-low.c (linux_wait): Unblock async I/O.
11463 (linux_resume): Block and enable async I/O.
11464 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11465 * server.h (block_async_io, unblock_async_io): Add prototypes.
11466
6910d122
DJ
114672004-02-29 Daniel Jacobowitz <drow@mvista.com>
11468
11469 * remote-utils.c (remote_open): Print a status notice after
11470 opening a TCP port.
11471 * server.c (attach_inferior): Print a status notice after
11472 attaching.
11473
114742004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
11475
11476 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11477
c89dc5d4
DJ
114782004-02-26 Daniel Jacobowitz <drow@mvista.com>
11479
11480 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11481 error packet.
11482 * server.c, target.h: Update copyright years.
11483
4b8dad4a
RM
114842004-02-25 Roland McGrath <roland@redhat.com>
11485
11486 * target.h (struct target_ops): New member `read_auxv'.
11487 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11488 * linux-low.c (linux_read_auxv): New function.
11489 (linux_target_ops): Initialize `read_auxv' member to that.
11490
d7446758
JB
114912004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11492
11493 Committed by Jim Blandy <jimb@redhat.com>.
11494
11495 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 11496 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
11497 instead of GPR_SIZE to distiguish s390 and s390x targets.
11498
5544ad89
DJ
114992004-01-31 Daniel Jacobowitz <drow@mvista.com>
11500
11501 * linux-low.c: Update copyright year.
11502 (check_removed_breakpoint): Clear pending_is_breakpoint.
11503 (linux_set_resume_request, linux_queue_one_thread)
11504 (resume_status_pending_p): New functions.
11505 (linux_continue_one_thread): Use process->resume.
11506 (linux_resume): Only resume threads if there are no pending events.
11507 * linux-low.h (struct process_info): Add resume request
11508 pointer.
11509
2a68b70e
DJ
115102004-01-30 Daniel Jacobowitz <drow@mvista.com>
11511
11512 * regcache.c (new_register_cache): Clear the allocated register
11513 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11514
64386c31
DJ
115152003-10-13 Daniel Jacobowitz <drow@mvista.com>
11516
11517 * linux-low.c (linux_resume): Take a struct thread_resume *
11518 argument.
11519 (linux_wait): Update call.
11520 (resume_ptr): New static variable.
11521 (linux_continue_one_thread): Renamed from
11522 linux_continue_one_process. Use resume_ptr.
11523 (linux_resume): Use linux_continue_one_thread.
11524 * server.c (handle_v_cont, handle_v_requests): New functions.
11525 (myresume): New function.
11526 (main): Handle 'v' case.
11527 * target.h (struct thread_resume): New type.
11528 (struct target_ops): Change argument of "resume" to struct
11529 thread_resume *.
11530 (myresume): Delete macro.
11531
c938e9b0
L
115322003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11533
11534 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11535 (uninstall): Support DESTDIR.
11536
7f313d07
BC
11537Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11538
11539 * configure.srv: Add xscale*linux copy of arm*linux entry.
11540
3b2fc2ea
DJ
115412003-07-24 Daniel Jacobowitz <drow@mvista.com>
11542
11543 * linux-arm-low.c (arm_reinsert_addr): New function.
11544 (the_low_target): Add arm_reinsert_addr.
11545
1c0a559e
MK
115462003-07-08 Mark Kettenis <kettenis@gnu.org>
11547
11548 * mem-break.c: Remove whitespace at end of file.
11549
43d5792c
DJ
115502003-06-28 Daniel Jacobowitz <drow@mvista.com>
11551
11552 * configure.in: Check whether we need to prototype strerror.
11553 * server.h: Optionally prototype strerror.
11554 * gdbreplay.c (perror_with_name): Use strerror.
11555 * linux-low.c (linux_attach_lwp): Use strerror.
11556 * utils.c (perror_with_name): Use strerror.
11557 * config.in, configure: Regenerated.
11558
c8a86edf
DJ
115592003-06-28 Daniel Jacobowitz <drow@mvista.com>
11560
11561 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11562 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11563
73d37363
DJ
115642003-06-20 Daniel Jacobowitz <drow@mvista.com>
11565
11566 * Makefile.in (SFILES): Update.
11567 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11568 low-sun3.c: Remove files.
11569
6ad8ae5c
DJ
115702003-06-17 Daniel Jacobowitz <drow@mvista.com>
11571
11572 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11573 (linux_detach_one_process, linux_detach): New functions.
11574 (linux_target_ops): Add linux_detach.
11575 * server.c (main): Handle 'D' packet.
11576 * target.h (struct target_ops): Add "detach" member.
11577 (detach_inferior): Define.
11578
1581182a
MK
115792003-06-13 Mark Kettenis <kettenis@gnu.org>
11580
11581 From Kelley Cook <kelleycook@wideopenwest.com>:
11582 * configure.srv: Accept i[34567]86 variants.
11583
e5379b03
DJ
115842003-06-05 Daniel Jacobowitz <drow@mvista.com>
11585
11586 * linux-low.c (linux_wait_for_event): Correct comment typos.
11587 (linux_resume_one_process): Call check_removed_breakpoint.
11588 (linux_send_signal): New function.
11589 (linux_target_ops): Add linux_send_signal.
11590 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11591 of kill.
11592 * target.h (struct target_ops): Add send_signal.
11593
2ff29de4
JB
115942003-05-29 Jim Blandy <jimb@redhat.com>
11595
11596 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11597 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11598 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11599 away part of the register's value.
11600
254787d4
DJ
116012003-03-26 Daniel Jacobowitz <drow@mvista.com>
11602
11603 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11604 (linux_wait_for_event, linux_init_signals): Likewise.
11605
94e10508
DJ
116062003-03-17 Daniel Jacobowitz <drow@mvista.com>
11607
11608 * configure.in: Check for stdlib.h.
11609 * configure: Regenerated.
11610 * config.in: Regenerated.
11611
4c0711e0
DJ
116122003-01-04 Andreas Schwab <schwab@suse.de>
11613
11614 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11615
ef66e766
AC
116162003-01-02 Andrew Cagney <ac131313@redhat.com>
11617
11618 * Makefile.in: Remove obsolete code.
11619
a1358604
DJ
116202002-11-20 Daniel Jacobowitz <drow@mvista.com>
11621
11622 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11623 defined(PT_FPR0_HI).
11624
23ce3b1c
DJ
116252002-11-17 Stuart Hughes <seh@zee2.com>
11626
11627 * linux-arm-low.c (arm_num_regs): Increase.
11628 (arm_regmap): Include status register.
11629
116302002-11-17 Daniel Jacobowitz <drow@mvista.com>
11631
11632 * linux-low.c (register_addr): Remove incorrect -1 check.
11633
a9fa9f7d
DJ
116342002-08-29 Daniel Jacobowitz <drow@mvista.com>
11635
11636 * linux-low.c (linux_create_inferior): Call setpgid. Return
11637 the new PID.
11638 (unstopped_p, linux_signal_pid): Remove.
11639 (linux_target_ops): Remove linux_signal_pid.
11640 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11641 global instead of target method.
11642 * target.h (struct target_ops): Remove signal_pid. Update comment
11643 for create_inferior.
11644 * server.c (signal_pid): New variable.
11645 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 11646 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
11647 (attach_inferior): Set signal_pid.
11648
17574093
DJ
116492002-08-23 Daniel Jacobowitz <drow@mvista.com>
11650
11651 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11652
116532002-08-20 Jim Blandy <jimb@redhat.com>
11654
11655 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11656 default for this.
11657
116582002-08-01 Andrew Cagney <cagney@redhat.com>
11659
11660 * Makefile.in: Make chill references obsolete.
11661
116622002-07-24 Kevin Buettner <kevinb@redhat.com>
11663
11664 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11665 * configure: Regenerate.
11666 * config.in: Regenerate.
11667
116682002-07-09 David O'Brien <obrien@FreeBSD.org>
11669
11670 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11671 (perror_with_name, remote_close, remote_open, expect, play): Static.
11672
116732002-07-04 Michal Ludvig <mludvig@suse.cz>
11674
4b8dad4a 11675 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
11676 byte offsets instead of an array of indexes.
11677 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11678
116792002-06-13 Daniel Jacobowitz <drow@mvista.com>
11680
11681 * regcache.c: Add comment.
11682
116832002-06-11 Daniel Jacobowitz <drow@mvista.com>
11684
11685 * thread-db.c: New file.
11686 * proc-service.c: New file.
11687 * acinclude.m4: New file.
11688 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11689 proc-service.o, and thread-db.o.
11690 (linux-low.o): Add USE_THREAD_DB.
11691 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11692 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11693 * aclocal.m4: Regenerated.
11694 * config.in: Regenerated.
11695 * configure: Regenerated.
11696 * configure.in: Check for proc_service.h, sys/procfs.h,
11697 thread_db.h, and linux/elf.h headrs.
11698 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11699 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11700 Check for -lthread_db and thread support.
11701 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11702 PowerPC, and SuperH.
11703 * i387-fp.c: Constify arguments.
11704 * i387-fp.h: Likewise.
11705 * inferiors.c: (struct thread_info): Renamed from
11706 `struct inferior_info'. Remove PID member. Use generic inferior
11707 list header. All uses updated.
11708 (inferiors, signal_pid): Removed.
11709 (all_threads): New variable.
11710 (get_thread): Define.
11711 (add_inferior_to_list): New function.
11712 (for_each_inferior): New function.
11713 (change_inferior_id): New function.
11714 (add_inferior): Removed.
11715 (remove_inferior): New function.
11716 (add_thread): New function.
11717 (free_one_thread): New function.
11718 (remove_thread): New function.
11719 (clear_inferiors): Use for_each_inferior and free_one_thread.
11720 (find_inferior): New function.
11721 (find_inferior_id): New function.
11722 (inferior_target_data): Update argument type.
11723 (set_inferior_target_data): Likewise.
11724 (inferior_regcache_data): Likewise.
11725 (set_inferior_regcache_data): Likewise.
11726 * linux-low.c (linux_bp_reinsert): Remove.
11727 (all_processes, stopping_threads, using_thrads)
11728 (struct pending_signals, debug_threads, pid_of): New.
11729 (inferior_pid): Replace with macro.
11730 (struct inferior_linux_data): Remove.
11731 (get_stop_pc, add_process): New functions.
11732 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11733 Use add_process and add_thread.
11734 (linux_attach_lwp): New function, based on old linux_attach. Use
11735 add_process and add_thread. Set stop_expected for new threads.
11736 (linux_attach): New function.
11737 (linux_kill_one_process): New function.
11738 (linux_kill): Kill all LWPs.
11739 (linux_thread_alive): Use find_inferior_id.
11740 (check_removed_breakpoints, status_pending_p): New functions.
11741 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11742 Update. Use WNOHANG. Wait for cloned processes also. Update process
11743 struct for the found process.
11744 (linux_wait_for_event): New function.
11745 (linux_wait): Use it. Support LWPs.
11746 (send_sigstop, wait_for_sigstop, stop_all_processes)
11747 (linux_resume_one_process, linux_continue_one_process): New functions.
11748 (linux_resume): Support LWPs.
11749 (REGISTER_RAW_SIZE): Remove.
11750 (fetch_register): Use register_size instead. Call supply_register.
11751 (usr_store_inferior_registers): Likewise. Call collect_register.
11752 Fix recursive case.
11753 (regsets_fetch_inferior_registers): Improve error message.
11754 (regsets_store_inferior_registers): Add debugging.
11755 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11756 (unstopped_p, linux_signal_pid): New functions.
11757 (linux_target_ops): Add linux_signal_pid.
11758 (linux_init_signals): New function.
11759 (initialize_low): Call it. Initialize using_threads.
11760 * regcache.c (inferior_regcache_data): Add valid
11761 flag.
11762 (get_regcache): Fetch registers lazily. Add fetch argument
11763 and update all callers.
11764 (regcache_invalidate_one, regcache_invalidate): New
11765 functions.
11766 (new_register_cache): Renamed from create_register_cache.
11767 Return the new regcache.
11768 (free_register_cache): Change argument to a void *.
11769 (registers_to_string, registers_from_string): Call get_regcache
11770 with fetch flag set.
11771 (register_data): Make static. Pass fetch flag to get_regcache.
11772 (supply_register): Call get_regcache with fetch flag clear.
11773 (collect_register): Call get_regcache with fetch flag set.
11774 (collect_register_as_string): New function.
11775 * regcache.h: Update.
11776 * remote-utils.c (putpkt): Flush after debug output and use
11777 stderr.
11778 Handle input interrupts while waiting for an ACK.
11779 (input_interrupt): Use signal_pid method.
11780 (getpkt): Flush after debug output and use stderr.
11781 (outreg): Use collect_register_as_string.
11782 (new_thread_notify, dead_thread_notify): New functions.
11783 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11784 and general_thread.
11785 (look_up_one_symbol): Flush after debug output.
11786 * server.c (step_thread, server_waiting): New variables.
11787 (start_inferior): Don't use signal_pid. Update call to mywait.
11788 (attach_inferior): Update call to mywait.
11789 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11790 (main): Don't fetch/store registers explicitly. Use
11791 set_desired_inferior. Support proposed ``Hs'' packet. Update
11792 calls to mywait.
11793 * server.h: Update.
11794 (struct inferior_list, struct_inferior_list_entry): New.
11795 * target.c (set_desired_inferior): New.
11796 (write_inferior_memory): Constify.
11797 (mywait): New function.
11798 * target.h: Update.
11799 (struct target_ops): New signal_pid method.
11800 (mywait): Removed macro, added prototype.
11801
11802 * linux-low.h (regset_func): Removed.
11803 (regset_fill_func, regset_store_func): New.
11804 (enum regset_type): New.
11805 (struct regset_info): Add type field. Use new operation types.
11806 (struct linux_target_ops): stop_pc renamed to get_pc.
11807 Add decr_pc_after_break and breakpoint_at.
11808 (get_process, get_thread_proess, get_process_thread)
11809 (strut process_info, all_processes, linux_attach_lwp)
11810 (thread_db_init): New.
11811
11812 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11813 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11814 (the_low_target): Add new members.
11815 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11816 (i386_store_fpxregset): Constify.
11817 (target_regsets): Add new kind identifier.
11818 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11819 (i386_set_pc): Add debugging.
11820 (i386_breakpoint_at): New function.
11821 (the_low_target): Add new members.
11822 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11823 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11824 (mips_breakpoint_at): New.
11825 (the_low_target): Add new members.
11826 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11827 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11828 (the_low_target): Add new members.
11829 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11830 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11831 (the_low_target): Add new members.
11832 * linux-x86-64-low.c (target_regsets): Add new kind
11833 identifier.
11834
118352002-05-15 Daniel Jacobowitz <drow@mvista.com>
11836
11837 From Martin Pool <mbp@samba.org>:
11838 * server.c (gdbserver_usage): New function.
11839 (main): Call it.
11840
118412002-05-14 Daniel Jacobowitz <drow@mvista.com>
11842
11843 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11844 stop_at -> stop_pc.
11845
118462002-05-04 Andrew Cagney <ac131313@redhat.com>
11847
11848 * Makefile.in: Remove obsolete code.
11849
118502002-04-24 Michal Ludvig <mludvig@suse.cz>
11851
11852 * linux-low.c (regsets_fetch_inferior_registers),
11853 (regsets_store_inferior_registers): Removed cast to int from
11854 ptrace() calls.
11855 * regcache.h: Added declaration of struct inferior_info.
11856
118572002-04-20 Daniel Jacobowitz <drow@mvista.com>
11858
11859 * inferiors.c (struct inferior_info): Add regcache_data.
11860 (add_inferior): Call create_register_cache.
11861 (clear_inferiors): Call free_register_cache.
11862 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11863 * regcache.c (struct inferior_regcache_data): New.
11864 (registers): Remove.
11865 (get_regcache): New function.
11866 (create_register_cache, free_register_cache): New functions.
11867 (set_register_cache): Don't initialize the register cache here.
11868 (registers_to_string, registers_from_string, register_data): Call
11869 get_regcache.
11870 * regcache.h: Add prototypes.
11871 * server.h: Likewise.
11872
118732002-04-20 Daniel Jacobowitz <drow@mvista.com>
11874
11875 * mem-break.c: New file.
11876 * mem-break.h: New file.
11877 * Makefile.in: Add mem-break.o rule; update server.h
11878 dependencies.
11879 * inferiors.c (struct inferior_info): Add target_data
11880 member.
11881 (clear_inferiors): Free target_data member if set.
11882 (inferior_target_data, set_inferior_target_data): New functions.
11883 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11884 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11885 * linux-low.c (linux_bp_reinsert): New variable.
11886 (struct inferior_linux_data): New.
11887 (linux_create_inferior): Use set_inferior_target_data.
11888 (linux_attach): Likewise. Call add_inferior.
11889 (linux_wait_for_one_inferior): New function.
11890 (linux_wait): Call it.
11891 (linux_write_memory): Add const.
11892 (initialize_low): Call set_breakpoint_data.
11893 * linux-low.h (struct linux_target_ops): Add breakpoint
11894 handling members.
11895 * server.c (attach_inferior): Remove extra add_inferior
11896 call.
11897 * server.h: Include mem-break.h. Update inferior.c
11898 prototypes.
11899 * target.c (read_inferior_memory)
11900 (write_inferior_memory): New functions.
11901 * target.h (read_inferior_memory)
11902 (write_inferior_memory): Change macros to prototypes.
11903 (struct target_ops): Update comments. Add const to write_memory
11904 definition.
11905
119062002-04-11 Daniel Jacobowitz <drow@mvista.com>
11907
11908 * linux-low.c (usr_store_inferior_registers): Support
11909 registers which are allowed to fail to store.
11910 * linux-low.h (linux_target_ops): Likewise.
11911 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11912 (ppc_cannot_store_register): FPSCR may not be storable.
11913
119142002-04-09 Daniel Jacobowitz <drow@mvista.com>
11915
11916 * server.h: Include <string.h> if HAVE_STRING_H.
11917 * ChangeLog: Correct paths in last ChangeLog entry.
11918
119192002-04-09 Daniel Jacobowitz <drow@mvista.com>
11920
11921 * linux-low.h: Remove obsolete prototypes.
11922 (struct linux_target_ops): New.
11923 (extern the_low_target): New.
11924 * linux-low.c (num_regs, regmap): Remove declarations.
11925 (register_addr): Use the_low_target explicitly.
11926 (fetch_register): Likewise.
11927 (usr_fetch_inferior_registers): Likewise.
11928 (usr_store_inferior_registers): Likewise.
11929 * linux-arm-low.c (num_regs): Remove.
11930 (arm_num_regs): Define.
11931 (arm_regmap): Renamed from regmap, made static.
11932 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11933 made static.
11934 (arm_cannot_store_register): Renamed from cannot_store_register,
11935 made static.
11936 (the_low_target): New.
11937 * linux-i386-low.c (num_regs): Remove.
11938 (i386_num_regs): Define.
11939 (i386_regmap): Renamed from regmap, made static.
11940 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11941 made static.
11942 (i386_cannot_store_register): Renamed from cannot_store_register,
11943 made static.
11944 (the_low_target): New.
11945 * linux-ia64-low.c (num_regs): Remove.
11946 (ia64_num_regs): Define.
11947 (ia64_regmap): Renamed from regmap, made static.
11948 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11949 made static.
11950 (ia64_cannot_store_register): Renamed from cannot_store_register,
11951 made static.
11952 (the_low_target): New.
11953 * linux-m68k-low.c (num_regs): Remove.
11954 (m68k_num_regs): Define.
11955 (m68k_regmap): Renamed from regmap, made static.
11956 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11957 made static.
11958 (m68k_cannot_store_register): Renamed from cannot_store_register,
11959 made static.
11960 (the_low_target): New.
11961 * linux-mips-low.c (num_regs): Remove.
11962 (mips_num_regs): Define.
11963 (mips_regmap): Renamed from regmap, made static.
11964 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11965 made static.
11966 (mips_cannot_store_register): Renamed from cannot_store_register,
11967 made static.
11968 (the_low_target): New.
11969 * linux-ppc-low.c (num_regs): Remove.
11970 (ppc_num_regs): Define.
11971 (ppc_regmap): Renamed from regmap, made static.
11972 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11973 made static.
11974 (ppc_cannot_store_register): Renamed from cannot_store_register,
11975 made static.
11976 (the_low_target): New.
11977 * linux-s390-low.c (num_regs): Remove.
11978 (s390_num_regs): Define.
11979 (s390_regmap): Renamed from regmap, made static.
11980 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11981 made static.
11982 (s390_cannot_store_register): Renamed from cannot_store_register,
11983 made static.
11984 (the_low_target): New.
11985 * linux-sh-low.c (num_regs): Remove.
11986 (sh_num_regs): Define.
11987 (sh_regmap): Renamed from regmap, made static.
11988 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11989 made static.
11990 (sh_cannot_store_register): Renamed from cannot_store_register,
11991 made static.
11992 (the_low_target): New.
11993 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11994 (the_low_target): New.
11995
119962002-04-09 Daniel Jacobowitz <drow@mvista.com>
11997
11998 * Makefile.in: Add stamp-h target.
11999 * configure.in: Create stamp-h.
12000 * configure: Regenerated.
12001
120022002-04-09 Daniel Jacobowitz <drow@mvista.com>
12003
12004 * inferiors.c: New file.
12005 * target.c: New file.
12006 * target.h: New file.
12007 * Makefile.in: Add target.o and inferiors.o. Update
12008 dependencies.
12009 * linux-low.c (inferior_pid): New static variable,
12010 moved from server.c.
12011 (linux_create_inferior): Renamed from create_inferior.
12012 Call add_inferior. Return 0 on success instead of a PID.
12013 (linux_attach): Renamed from myattach.
12014 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12015 (linux_thread_alive): Renamed from mythread_alive.
12016 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12017 child dies.
12018 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12019 (regsets_store_inferior_registers): Correct error message.
12020 Add missing ``return 0''.
12021 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12022 (linux_store_registers): Renamed from store_inferior_registers.
12023 (linux_read_memory): Renamed from read_inferior_memory.
12024 (linux_write_memory): Renamed from write_inferior_memory.
12025 (linux_target_ops): New structure.
12026 (initialize_low): Call set_target_ops ().
12027 * remote-utils.c (unhexify): New function.
12028 (hexify): New function.
12029 (input_interrupt): Send signals to ``signal_pid''.
12030 * server.c (inferior_pid): Remove.
12031 (start_inferior): Update create_inferior call.
12032 (attach_inferior): Call add_inferior.
12033 (handle_query): New function.
12034 (main): Call handle_query for `q' packets.
12035 * server.h: Include "target.h". Remove obsolete prototypes.
12036 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12037
120382002-04-09 Daniel Jacobowitz <drow@mvista.com>
12039
12040 * Makefile.in: Add WARN_CFLAGS. Update configury
12041 dependencies.
12042 * configure.in: Check for <string.h>
12043 * configure: Regenerate.
12044 * config.in: Regenerate.
12045 * gdbreplay.c: Include needed system headers.
12046 (remote_open): Remove strchr prototype.
12047 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12048 * regcache.c (supply_register): Change buf argument to const void *.
12049 (supply_register_by_name): Likewise.
12050 (collect_register): Change buf argument to void *.
12051 (collect_register_by_name): Likewise.
12052 * regcache.h: Add missing prototypes.
12053 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12054 * server.c (handle_query): New function.
12055 (attached): New static variable, moved out of main.
12056 (main): Quiet longjmp clobber warnings.
12057 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12058 * utils.c (error): Remove NORETURN.
12059 (fatal): Likewise.
This page took 1.845417 seconds and 4 git commands to generate.