Remove some comments in debug_reg_change_callback
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-08-25 Yao Qi <yao.qi@linaro.org>
2
3 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4
5 2015-08-25 Yao Qi <yao.qi@linaro.org>
6
7 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
8 the code.
9
10 2015-08-25 Yao Qi <yao.qi@linaro.org>
11
12 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
13 Remove.
14 (debug_reg_change_callback): Remove argument entry and add argument
15 lwp. Remove local variable thread. Don't print thread id in the
16 debugging output. Don't check whether pid of thread equals to pid.
17 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
18 iterate_over_lwps instead find_inferior.
19
20 2015-08-24 Pedro Alves <palves@redhat.com>
21
22 * inferiors.c (get_first_process): New function.
23 * inferiors.h (get_first_process): New declaration.
24 * remote-utils.c (read_ptid): Default to the first process in the
25 list, instead of to the current thread's process.
26
27 2015-08-24 Pedro Alves <palves@redhat.com>
28
29 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
30 * event-loop.c: Likewise.
31 * remote-utils.c: Likewise.
32 * tracepoint.c: Likewise.
33
34 2015-08-24 Pedro Alves <palves@redhat.com>
35
36 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
37 ptid_get_lwp.
38
39 2015-08-21 Pedro Alves <palves@redhat.com>
40
41 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
42 instead of literal 1.
43
44 2015-08-21 Pedro Alves <palves@redhat.com>
45
46 * tdesc.c (default_description): Explicitly zero-initialize.
47
48 2015-08-21 Pedro Alves <palves@redhat.com>
49
50 PR gdb/18749
51 * inferiors.c (remove_thread): Discard any pending stop reply for
52 this thread.
53 * server.c (remove_all_on_match_pid): Rename to ...
54 (remove_all_on_match_ptid): ... this. Work with a filter ptid
55 instead of a pid.
56 (discard_queued_stop_replies): Change parameter to a ptid. Now
57 extern.
58 (handle_v_kill, kill_inferior_callback, captured_main)
59 (process_serial_event): Adjust.
60 * server.h (discard_queued_stop_replies): Declare.
61
62 2015-08-21 Pedro Alves <palves@redhat.com>
63
64 * linux-low.c (wait_for_sigstop): Always switch to no thread
65 selected if the previously current thread dies.
66 * lynx-low.c (lynx_request_interrupt): Use the first thread's
67 process instead of the current thread's.
68 * remote-utils.c (input_interrupt): Don't check if there's no
69 current thread.
70 * server.c (gdb_read_memory, gdb_write_memory): If setting the
71 current thread to the general thread fails, error out.
72 (handle_qxfer_auxv, handle_qxfer_libraries)
73 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
74 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
75 (handle_query): Check if there's a thread selected instead of
76 checking whether there's any thread in the thread list.
77 (handle_qxfer_threads, handle_qxfer_btrace)
78 (handle_qxfer_btrace_conf): Don't error out early if there's no
79 thread in the thread list.
80 (handle_v_cont, myresume): Don't set the current thread to the
81 continue thread.
82 (process_serial_event) <Hg handling>: Also set thread_id if the
83 previous general thread is still alive.
84 (process_serial_event) <g/G handling>: If setting the current
85 thread to the general thread fails, error out.
86 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
87 thread's lwp instead of the current thread's.
88 * target.c (set_desired_thread): If the desired thread was not
89 found, leave the current thread pointing to NULL. Return an int
90 (boolean) indicating success.
91 * target.h (set_desired_thread): Change return type to int.
92
93 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
94
95 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
96 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
97 #includes.
98 (ps_get_thread_area): New function.
99
100 2015-08-19 Gary Benson <gbenson@redhat.com>
101
102 * hostio.c (handle_pread): Do not attempt to read more data
103 than hostio_reply_with_data can fit in a packet.
104
105 2015-08-18 Joel Brobecker <brobecker@adacore.com>
106
107 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
108
109 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
110
111 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
112
113 2015-08-06 Pedro Alves <palves@redhat.com>
114
115 * tracepoint.c (expr_eval_result): Now an int.
116
117 2015-08-06 Pedro Alves <palves@redhat.com>
118
119 * gdbthread.h (struct regcache): Forward declare.
120 (struct thread_info) <regcache_data>: Now a struct regcache
121 pointer.
122 * inferiors.c (inferior_regcache_data)
123 (set_inferior_regcache_data): Now work with struct regcache
124 pointers.
125 * inferiors.h (struct regcache): Forward declare.
126 (inferior_regcache_data, set_inferior_regcache_data): Now work
127 with struct regcache pointers.
128 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
129 (free_register_cache_thread): Remove struct regcache pointer
130 casts.
131
132 2015-08-06 Pedro Alves <palves@redhat.com>
133
134 * server.c (captured_main): On error, print the exception message
135 to stderr, and if run_once is set, throw a quit.
136
137 2015-08-06 Pedro Alves <palves@redhat.com>
138
139 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
140 the current thread.
141
142 2015-08-06 Pedro Alves <palves@redhat.com>
143
144 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
145 reading beyond the passed in buffer length.
146
147 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
148
149 * tracepoint.c (symbol_list) <required>: Remove.
150
151 2015-08-06 Pedro Alves <palves@redhat.com>
152
153 * linux-low.c (handle_extended_wait): Set the fork child's suspend
154 count if stopping and suspending threads.
155 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
156 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
157 (linux_detach): Complete an ongoing step-over.
158 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
159 throughout.
160 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
161 (linux_wait_1): If passing a signal to the inferior after
162 finishing a step-over, unsuspend and re-resume all lwps. If we
163 see a single-step event but the thread should be continuing, don't
164 pass the trap to gdb.
165 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
166 internal_error instead of gdb_assert.
167 (enqueue_pending_signal): New function.
168 (check_ptrace_stopped_lwp_gone): Add debug output.
169 (start_step_over): Use internal_error instead of gdb_assert.
170 (complete_ongoing_step_over): New function.
171 (linux_resume_one_thread): Don't resume a suspended thread.
172 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
173 it stepping.
174
175 2015-08-06 Pedro Alves <palves@redhat.com>
176
177 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
178 (linux_thread_alive): Use lwp_is_marked_dead.
179 (extended_event_reported): Delete.
180 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
181 instead of extended_event_reported.
182 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
183 as well.
184 (lwp_is_marked_dead): New function.
185 (lwp_running): Use lwp_is_marked_dead.
186 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
187 comment.
188
189 2015-08-06 Pedro Alves <palves@redhat.com>
190
191 * linux-low.c (linux_wait_1): Move fork event output out of the
192 !report_to_gdb check. Pass event_child->waitstatus to
193 target_waitstatus_to_string instead of ourstatus.
194
195 2015-08-04 Yao Qi <yao.qi@linaro.org>
196
197 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
198 if current_thread is 32 bit.
199
200 2015-08-04 Yao Qi <yao.qi@linaro.org>
201
202 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
203 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
204 * server.c (extended_protocol): Remove "static".
205 * server.h (extended_protocol): Declare it.
206
207 2015-08-04 Yao Qi <yao.qi@linaro.org>
208
209 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
210 both aarch64 and aarch32.
211 (aarch64_set_pc): Likewise.
212
213 2015-08-04 Yao Qi <yao.qi@linaro.org>
214
215 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
216 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
217 arm-with-neon.xml to srv_xmlfiles.
218 * linux-aarch64-low.c: Include linux-aarch32-low.h.
219 (is_64bit_tdesc): New function.
220 (aarch64_linux_read_description): New function.
221 (aarch64_arch_setup): Call aarch64_linux_read_description.
222 (regs_info): Rename to regs_info_aarch64.
223 (aarch64_regs_info): Return right regs_info.
224 (initialize_low_arch): Call initialize_low_arch_aarch32.
225
226 2015-08-04 Yao Qi <yao.qi@linaro.org>
227
228 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
229 * linux-aarch32-low.c: New file.
230 * linux-aarch32-low.h: New file.
231 * linux-arm-low.c (arm_fill_gregset): Move it to
232 linux-aarch32-low.c.
233 (arm_store_gregset): Likewise.
234 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
235 (arm_store_vfpregset): Call arm_store_vfpregset_num.
236 (arm_arch_setup): Check if PTRACE_GETREGSET works.
237 (regs_info): Rename to regs_info_arm.
238 (arm_regs_info): Return regs_info_aarch32 if
239 have_ptrace_getregset is 1 and target description is
240 arm_with_neon or arm_with_vfpv3.
241 (initialize_low_arch): Don't call init_registers_arm_with_neon.
242 Call initialize_low_arch_aarch32 instead.
243
244 2015-08-04 Yao Qi <yao.qi@linaro.org>
245
246 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
247 * linux-low.c: ... here.
248 * linux-low.h (have_ptrace_getregset): Declare it.
249
250 2015-08-04 Pedro Alves <palves@redhat.com>
251
252 * thread-db.c (struct thread_db): Use new typedefs.
253 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
254 CHK calls.
255 (disable_thread_event_reporting): Cast result of dlsym to
256 destination function pointer type.
257 (thread_db_mourn): Use td_ta_delete_ftype.
258
259 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
260
261 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
262 arch variant.
263 (CDX_BREAKPOINT): Define for R2.
264 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
265 (the_low_target): Add comments.
266
267 2015-07-30 Yao Qi <yao.qi@linaro.org>
268
269 * linux-arm-low.c (arm_hwcap): Remove it.
270 (arm_read_description): New local variable arm_hwcap. Don't
271 set arm_hwcap to zero.
272
273 2015-07-30 Yao Qi <yao.qi@linaro.org>
274
275 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
276 Use regcache->tdesc instead.
277 (arm_store_wmmxregset): Likewise.
278 (arm_fill_vfpregset): Likewise.
279 (arm_store_vfpregset): Likewise.
280
281 2015-07-30 Yao Qi <yao.qi@linaro.org>
282
283 * linux-arm-low.c: Include arch/arm.h.
284 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
285 (arm_store_gregset): Likewise.
286
287 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
288
289 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
290 ptrace's 4th parameter.
291
292 2015-07-27 Yao Qi <yao.qi@linaro.org>
293
294 * configure.srv (case aarch64*-*-linux*): Don't set
295 srv_linux_usrregs.
296
297 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
298
299 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
300 sys/ptrace.h.
301 * linux-arm-low.c: Likewise.
302 * linux-cris-low.c: Likewise.
303 * linux-crisv32-low.c: Likewise.
304 * linux-low.c: Likewise.
305 * linux-m68k-low.c: Likewise.
306 * linux-mips-low.c: Likewise.
307 * linux-nios2-low.c: Likewise.
308 * linux-s390-low.c: Likewise.
309 * linux-sparc-low.c: Likewise.
310 * linux-tic6x-low.c: Likewise.
311 * linux-tile-low.c: Likewise.
312 * linux-x86-low.c: Likewise.
313
314 2015-07-24 Pedro Alves <palves@redhat.com>
315
316 * config.in: Regenerate.
317 * configure: Regenerate.
318
319 2015-07-24 Pedro Alves <palves@redhat.com>
320
321 * acinclude.m4: Include ../ptrace.m4.
322 * configure.ac: Call GDB_AC_PTRACE.
323 * config.in, configure: Regenerate.
324
325 2015-07-24 Yao Qi <yao.qi@linaro.org>
326
327 * linux-low.c (linux_create_inferior): Remove setting to
328 proc->priv->new_inferior.
329 (linux_attach): Likewise.
330 (linux_low_filter_event): Likewise.
331 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
332
333 2015-07-24 Yao Qi <yao.qi@linaro.org>
334
335 * linux-low.c (linux_arch_setup): New function.
336 (linux_low_filter_event): If proc->tdesc is NULL and
337 proc->attached is true, call the_low_target.arch_setup.
338 Otherwise, keep status pending, and return.
339 (linux_resume_one_lwp_throw): Don't call get_pc if
340 thread->while_stepping isn't NULL. Don't call
341 get_thread_regcache if proc->tdesc is NULL.
342 (need_step_over_p): Return 0 if proc->tdesc is NULL.
343 (linux_target_ops): Install arch_setup.
344 * server.c (start_inferior): Call the_target->arch_setup.
345 * target.h (struct target_ops) <arch_setup>: New field.
346 (target_arch_setup): New marco.
347 * lynx-low.c (lynx_target_ops): Update.
348 * nto-low.c (nto_target_ops): Update.
349 * spu-low.c (spu_target_ops): Update.
350 * win32-low.c (win32_target_ops): Update.
351
352 2015-07-24 Yao Qi <yao.qi@linaro.org>
353
354 * linux-low.c (linux_add_process): Don't set
355 proc->priv->new_inferior.
356 (linux_create_inferior): Set proc->priv->new_inferior to 1.
357 (linux_attach): Likewise.
358
359 2015-07-24 Yao Qi <yao.qi@linaro.org>
360
361 * server.c (start_inferior): Code refactor.
362
363 2015-07-24 Yao Qi <yao.qi@linaro.org>
364
365 * server.c (process_serial_event): Set general_thread.
366
367 2015-07-21 Yao Qi <yao.qi@linaro.org>
368
369 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
370 aarch64_linux_get_debug_reg_capacity.
371
372 2015-07-17 Yao Qi <yao.qi@linaro.org>
373
374 * Makefile.in (aarch64-linux-hw-point.o): New rule.
375 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
376 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
377 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
378 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
379 (AARCH64_HWP_ALIGNMENT): Likewise.
380 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
381 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
382 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
383 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
384 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
385 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
386 (struct aarch64_debug_reg_state): Likewise.
387 (struct arch_lwp_info): Likewise.
388 (aarch64_align_watchpoint): Likewise.
389 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
390 (aarch64_watchpoint_length): Likewise.
391 (aarch64_point_encode_ctrl_reg): Likewise
392 (aarch64_point_is_aligned): Likewise.
393 (aarch64_align_watchpoint): Likewise.
394 (aarch64_linux_set_debug_regs):
395 (aarch64_dr_state_insert_one_point): Likewise.
396 (aarch64_dr_state_remove_one_point): Likewise.
397 (aarch64_handle_breakpoint): Likewise.
398 (aarch64_handle_aligned_watchpoint): Likewise.
399 (aarch64_handle_unaligned_watchpoint): Likewise.
400 (aarch64_handle_watchpoint): Likewise.
401
402 2015-07-17 Yao Qi <yao.qi@linaro.org>
403
404 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
405 and don't aarch64_get_debug_reg_state. All callers update.
406 (aarch64_handle_aligned_watchpoint): Likewise.
407 (aarch64_handle_unaligned_watchpoint): Likewise.
408 (aarch64_handle_watchpoint): Likewise.
409 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
410 (aarch64_remove_point): Likewise.
411
412 2015-07-17 Yao Qi <yao.qi@linaro.org>
413
414 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
415 debug_printf.
416 (aarch64_handle_unaligned_watchpoint): Likewise.
417
418 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
419
420 Revert the previous 3 commits:
421 Move gdb_regex* to common/
422 Move linux_find_memory_regions_full & co.
423 gdbserver build-id attribute generator
424
425 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
426 Jan Kratochvil <jan.kratochvil@redhat.com>
427
428 gdbserver build-id attribute generator.
429 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
430 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
431 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
432 (find_phdr): New.
433 (get_dynamic): Use find_pdhr to traverse program headers.
434 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
435 (compare_mapping_entry_range, struct find_memory_region_callback_data)
436 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
437 (get_hex_build_id): New.
438 (linux_qxfer_libraries_svr4): Add optional build-id attribute
439 to reply XML document.
440
441 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
442 Jan Kratochvil <jan.kratochvil@redhat.com>
443
444 * target.c: Include target/target-utils.h and fcntl.h.
445 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
446 (target_fileio_read_stralloc): New functions.
447
448 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
449
450 * Makefile.in (OBS): Add gdb_regex.o.
451 (gdb_regex.o): New.
452 * config.in: Rebuilt.
453 * configure: Rebuilt.
454
455 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
456 Jan Kratochvil <jan.kratochvil@redhat.com>
457
458 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
459 * Makefile.in (OBS): Add target-utils.o.
460 (linux-maps.o, target-utils.o): New.
461 * configure.srv (srv_linux_obj): Add linux-maps.o.
462
463 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
464
465 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
466 function, return 1.
467 (the_low_target): Install it.
468
469 2015-07-14 Pedro Alves <palves@redhat.com>
470
471 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
472 Instead, ignore ECHILD, and throw an error for other errnos.
473
474 2015-07-10 Pedro Alves <palves@redhat.com>
475
476 * event-loop.c (struct callback_event) <data>: Change type to
477 gdb_client_data instance instead of gdb_client_data pointer.
478 (append_callback_event): Adjust.
479
480 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
481
482 * linux-aarch64-low.c: Add comments for each linux_target_ops
483 method. Remove comments already covered in target_ops and
484 linux_target_ops definitions.
485 (the_low_target): Add comments for each unimplemented method.
486
487 2015-07-09 Yao Qi <yao.qi@linaro.org>
488
489 * linux-aarch64-low.c (aarch64_regmap): Remove.
490 (aarch64_usrregs_info): Remove.
491 (regs_info): Set field usrregs to NULL.
492
493 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
494
495 * linux-low.c: Include "rsp-low.h"
496 (linux_low_encode_pt_config, linux_low_encode_raw): New.
497 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
498 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
499 (handle_btrace_enable_pt): New.
500 (handle_btrace_general_set): Support "pt".
501 (handle_btrace_conf_general_set): Support "pt:size".
502
503 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
504
505 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
506 Z_PACKET_SW_BP.
507
508 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
509
510 * linux-aarch64-low.c: Remove comment about endianness.
511 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
512 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
513 memcmp.
514
515 2015-06-24 Gary Benson <gbenson@redhat.com>
516
517 * linux-i386-ipa.c (stdint.h): Do not include.
518 * lynx-i386-low.c (stdint.h): Likewise.
519 * lynx-ppc-low.c (stdint.h): Likewise.
520 * mem-break.c (stdint.h): Likewise.
521 * thread-db.c (stdint.h): Likewise.
522 * tracepoint.c (stdint.h): Likewise.
523 * win32-low.c (stdint.h): Likewise.
524
525 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
526
527 * server.c (write_qxfer_response): Update call to
528 remote_escape_output.
529
530 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
531 Jan Kratochvil <jan.kratochvil@redhat.com>
532
533 Merge multiple hex conversions.
534 * gdbreplay.c (tohex): Rename to 'fromhex'.
535 (logchar): Use fromhex.
536
537 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
538
539 * server.c (handle_qxfer_libraries): Set `version' attribute for
540 <library-list>.
541
542 2015-06-10 Gary Benson <gbenson@redhat.com>
543
544 * target.h (struct target_ops) <multifs_open>: New field.
545 <multifs_unlink>: Likewise.
546 <multifs_readlink>: Likewise.
547 * linux-low.c (nat/linux-namespaces.h): New include.
548 (linux_target_ops): Initialize the_target->multifs_open,
549 the_target->multifs_unlink and the_target->multifs_readlink.
550 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
551 * hostio.c (hostio_fs_pid): New static variable.
552 (hostio_handle_new_gdb_connection): New function.
553 (handle_setfs): Likewise.
554 (handle_open): Use the_target->multifs_open as appropriate.
555 (handle_unlink): Use the_target->multifs_unlink as appropriate.
556 (handle_readlink): Use the_target->multifs_readlink as
557 appropriate.
558 (handle_vFile): Handle vFile:setfs packets.
559 * server.c (handle_query): Call hostio_handle_new_gdb_connection
560 after target_handle_new_gdb_connection.
561
562 2015-06-10 Gary Benson <gbenson@redhat.com>
563
564 * configure.ac (AC_CHECK_FUNCS): Add setns.
565 * config.in: Regenerate.
566 * configure: Likewise.
567 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
568 (linux-namespaces.o): New rule.
569 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
570
571 2015-06-09 Gary Benson <gbenson@redhat.com>
572
573 * hostio.c (handle_open): Process mode argument with
574 fileio_to_host_mode.
575
576 2015-06-01 Yao Qi <yao.qi@linaro.org>
577
578 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
579 * linux-x86-low.c: Likewise.
580
581 2015-05-28 Don Breazeal <donb@codesourcery.com>
582
583 * linux-low.c (handle_extended_wait): Initialize
584 thread_info.last_resume_kind for new fork children.
585
586 2015-05-15 Pedro Alves <palves@redhat.com>
587
588 * target.h (target_handle_new_gdb_connection): Rewrite using if
589 wrapped in do/while.
590
591 2015-05-14 Joel Brobecker <brobecker@adacore.com>
592
593 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
594 * configure, config.in: Regenerate.
595 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
596 Declare typedef.
597
598 2015-05-12 Don Breazeal <donb@codesourcery.com>
599
600 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
601 PTRACE_EVENT_VFORK_DONE.
602 (linux_low_ptrace_options, extended_event_reported): Add vfork
603 events.
604 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
605 and "vforkdone" for RSP 'T' Stop Reply Packet.
606 * server.h (report_vfork_events): Declare
607 global variable.
608
609 2015-05-12 Don Breazeal <donb@codesourcery.com>
610
611 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
612 (the_low_target) <new_fork>: Initialize new member.
613 * linux-arm-low.c (arm_new_fork): New function.
614 (the_low_target) <new_fork>: Initialize new member.
615 * linux-low.c (handle_extended_wait): Call new target function
616 new_fork.
617 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
618 * linux-mips-low.c (mips_add_watchpoint): New function
619 extracted from mips_insert_point.
620 (the_low_target) <new_fork>: Initialize new member.
621 (mips_linux_new_fork): New function.
622 (mips_insert_point): Call mips_add_watchpoint.
623 * linux-x86-low.c (x86_linux_new_fork): New function.
624 (the_low_target) <new_fork>: Initialize new member.
625
626 2015-05-12 Don Breazeal <donb@codesourcery.com>
627
628 * linux-low.c (handle_extended_wait): Implement return value,
629 rename argument 'event_child' to 'event_lwp', handle
630 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
631 (linux_low_ptrace_options): New function.
632 (linux_low_filter_event): Call linux_low_ptrace_options,
633 use different argument fo linux_enable_event_reporting,
634 use return value from handle_extended_wait.
635 (extended_event_reported): New function.
636 (linux_wait_1): Call extended_event_reported and set
637 status to report fork events.
638 (linux_write_memory): Add pid to debug message.
639 (reset_lwp_ptrace_options_callback): New function.
640 (linux_handle_new_gdb_connection): New function.
641 (linux_target_ops): Initialize new structure member.
642 * linux-low.h (struct lwp_info) <waitstatus>: New member.
643 * lynx-low.c: Initialize new structure member.
644 * remote-utils.c (prepare_resume_reply): Implement stop reason
645 "fork" for "T" stop message.
646 * server.c (handle_query): Call handle_new_gdb_connection.
647 * server.h (report_fork_events): Declare global flag.
648 * target.h (struct target_ops) <handle_new_gdb_connection>:
649 New member.
650 (target_handle_new_gdb_connection): New macro.
651 * win32-low.c: Initialize new structure member.
652
653 2015-05-12 Don Breazeal <donb@codesourcery.com>
654
655 * mem-break.c (APPEND_TO_LIST): Define macro.
656 (clone_agent_expr): New function.
657 (clone_one_breakpoint): New function.
658 (clone_all_breakpoints): New function.
659 * mem-break.h: Declare new functions.
660
661 2015-05-12 Don Breazeal <donb@codesourcery.com>
662
663 * linux-low.c (linux_supports_fork_events): New function.
664 (linux_supports_vfork_events): New function.
665 (linux_target_ops): Initialize new structure members.
666 (initialize_low): Call linux_check_ptrace_features.
667 * lynx-low.c (lynx_target_ops): Initialize new structure
668 members.
669 * server.c (report_fork_events, report_vfork_events):
670 New global flags.
671 (handle_query): Add new features to qSupported packet and
672 response.
673 (captured_main): Initialize new global variables.
674 * target.h (struct target_ops) <supports_fork_events>:
675 New member.
676 <supports_vfork_events>: New member.
677 (target_supports_fork_events): New macro.
678 (target_supports_vfork_events): New macro.
679 * win32-low.c (win32_target_ops): Initialize new structure
680 members.
681
682 2015-05-12 Gary Benson <gbenson@redhat.com>
683
684 * server.c (handle_qxfer_exec_file): Use current process
685 if annex is empty.
686
687 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
688
689 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
690 Remove HAVE_PTRACE_GETREGS conditionals.
691 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
692 instead of PTRACE_GETREGS and PTRACE_SETREGS.
693
694 2015-05-08 Yao Qi <yao.qi@linaro.org>
695
696 * linux-low.c (linux_supports_conditional_breakpoints): New
697 function.
698 (linux_target_ops): Install new target method.
699 * lynx-low.c (lynx_target_ops): Install NULL hook for
700 supports_conditional_breakpoints.
701 * nto-low.c (nto_target_ops): Likewise.
702 * spu-low.c (spu_target_ops): Likewise.
703 * win32-low.c (win32_target_ops): Likewise.
704 * server.c (handle_query): Check
705 target_supports_conditional_breakpoints.
706 * target.h (struct target_ops) <supports_conditional_breakpoints>:
707 New field.
708 (target_supports_conditional_breakpoints): New macro.
709
710 2015-05-06 Pedro Alves <palves@redhat.com>
711
712 PR server/18081
713 * server.c (start_inferior): If the process exits, mourn it.
714
715 2015-04-21 Gary Benson <gbenson@redhat.com>
716
717 * hostio.c (fileio_open_flags_to_host): Factored out to
718 fileio_to_host_openflags in common/fileio.c. Single use
719 updated.
720
721 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
722
723 * linux-xtensa-low.c (xtensa_fill_gregset)
724 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
725 XCHAL_HAVE_LOOP.
726
727 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
728
729 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
730 (regs_info): Replace usrregs pointer with NULL.
731
732 2015-04-17 Gary Benson <gbenson@redhat.com>
733
734 * target.h (struct target_ops) <pid_to_exec_file>: New field.
735 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
736 * server.c (handle_qxfer_exec_file): New function.
737 (qxfer_packets): Add exec-file entry.
738 (handle_query): Report qXfer:exec-file:read as supported packet.
739
740 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
741
742 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
743
744 2015-04-09 Gary Benson <gbenson@redhat.com>
745
746 * hostio-errno.c (errno_to_fileio_error): Remove function.
747 Update caller to use remote_fileio_to_fio_error.
748
749 2015-04-09 Yao Qi <yao.qi@linaro.org>
750
751 * linux-low.c (linux_insert_point): Call
752 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
753 (linux_remove_point): Call remove_memory_breakpoint if type is
754 raw_bkpt_type_sw.
755 * linux-x86-low.c (x86_insert_point): Don't call
756 insert_memory_breakpoint.
757 (x86_remove_point): Don't call remove_memory_breakpoint.
758
759 2015-04-01 Pedro Alves <palves@redhat.com>
760 Cleber Rosa <crosa@redhat.com>
761
762 * server.c (gdbserver_usage): Reorganize and extend the usage
763 message.
764
765 2015-03-24 Pedro Alves <palves@redhat.com>
766
767 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
768 output. Also dump TRAP_TRACE.
769 (linux_low_filter_event): In debug output, distinguish a
770 resume_stop SIGSTOP from a delayed SIGSTOP.
771
772 2015-03-24 Gary Benson <gbenson@redhat.com>
773
774 * linux-x86-low.c (x86_linux_new_thread): Moved to
775 nat/x86-linux.c.
776 (x86_linux_prepare_to_resume): Likewise.
777
778 2015-03-24 Gary Benson <gbenson@redhat.com>
779
780 * Makefile.in (x86-linux-dregs.o): New rule.
781 * configure.srv: Add x86-linux-dregs.o to relevant targets.
782 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
783 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
784 (x86_linux_dr_get): Likewise.
785 (x86_linux_dr_set): Likewise.
786 (update_debug_registers_callback): Likewise.
787 (x86_linux_dr_set_addr): Likewise.
788 (x86_linux_dr_get_addr): Likewise.
789 (x86_linux_dr_set_control): Likewise.
790 (x86_linux_dr_get_control): Likewise.
791 (x86_linux_dr_get_status): Likewise.
792 (x86_linux_update_debug_registers): Likewise.
793
794 2015-03-24 Gary Benson <gbenson@redhat.com>
795
796 * linux-x86-low.c (x86_linux_update_debug_registers):
797 New function, factored out from...
798 (x86_linux_prepare_to_resume): ...this.
799
800 2015-03-24 Gary Benson <gbenson@redhat.com>
801
802 * linux-x86-low.c (x86_linux_dr_get): Update comments.
803 (x86_linux_dr_set): Likewise.
804 (update_debug_registers_callback): Likewise.
805 (x86_linux_dr_set_addr): Likewise.
806 (x86_linux_dr_get_addr): Likewise.
807 (x86_linux_dr_set_control): Likewise.
808 (x86_linux_dr_get_control): Likewise.
809 (x86_linux_dr_get_status): Likewise.
810 (x86_linux_prepare_to_resume): Likewise.
811
812 2015-03-24 Gary Benson <gbenson@redhat.com>
813
814 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
815 Use perror_with_name. Pass string through gettext.
816 (x86_linux_dr_set): Likewise.
817
818 2015-03-24 Gary Benson <gbenson@redhat.com>
819
820 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
821 (x86_linux_dr_set_addr): ...this.
822 (x86_dr_low_get_addr): Rename to...
823 (x86_linux_dr_get_addr): ...this.
824 (x86_dr_low_set_control): Rename to...
825 (x86_linux_dr_set_control): ...this.
826 (x86_dr_low_get_control): Rename to...
827 (x86_linux_dr_get_control): ...this.
828 (x86_dr_low_get_status): Rename to...
829 (x86_linux_dr_get_status): ...this.
830 (x86_dr_low): Update with new function names.
831
832 2015-03-24 Gary Benson <gbenson@redhat.com>
833
834 * Makefile.in (x86-linux.o): New rule.
835 * configure.srv: Add x86-linux.o to relevant targets.
836 * linux-low.c (lwp_set_arch_private_info): New function.
837 (lwp_arch_private_info): Likewise.
838 * linux-x86-low.c: Include nat/x86-linux.h.
839 (arch_lwp_info): Removed structure.
840 (update_debug_registers_callback):
841 Use lwp_set_debug_registers_changed.
842 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
843 and lwp_set_debug_registers_changed.
844 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
845
846 2015-03-24 Gary Benson <gbenson@redhat.com>
847
848 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
849 * linux-arm-low.c (arm_new_thread): Likewise.
850 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
851 * linux-mips-low.c (mips_linux_new_thread): Likewise.
852 * linux-x86-low.c (x86_linux_new_thread): Likewise.
853 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
854
855 2015-03-24 Gary Benson <gbenson@redhat.com>
856
857 * linux-low.c (ptid_of_lwp): New function.
858 (lwp_is_stopped): Likewise.
859 (lwp_stop_reason): Likewise.
860 * linux-x86-low.c (update_debug_registers_callback):
861 Use lwp_is_stopped.
862 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
863 lwp_stop_reason.
864
865 2015-03-24 Gary Benson <gbenson@redhat.com>
866
867 * linux-low.h (linux_stop_lwp): Remove declaration.
868
869 2015-03-24 Gary Benson <gbenson@redhat.com>
870
871 * linux-low.h: Include nat/linux-nat.h.
872 * linux-low.c (iterate_over_lwps_args): New structure.
873 (iterate_over_lwps_filter): New function.
874 (iterate_over_lwps): Likewise.
875 * linux-x86-low.c (update_debug_registers_callback):
876 Update signature to what iterate_over_lwps expects.
877 Remove PID check that iterate_over_lwps now performs.
878 (x86_dr_low_set_addr): Use iterate_over_lwps.
879 (x86_dr_low_set_control): Likewise.
880
881 2015-03-24 Gary Benson <gbenson@redhat.com>
882
883 * linux-x86-low.c (x86_debug_reg_state): New function.
884 (x86_linux_prepare_to_resume): Use the above.
885
886 2015-03-24 Gary Benson <gbenson@redhat.com>
887
888 * linux-low.c (current_lwp_ptid): New function.
889 * linux-x86-low.c: Include nat/linux-nat.h.
890 (x86_dr_low_get_addr): Use current_lwp_ptid.
891 (x86_dr_low_get_control): Likewise.
892 (x86_dr_low_get_status): Likewise.
893
894 2015-03-20 Pedro Alves <palves@redhat.com>
895
896 * tracepoint.c (cmd_qtstatus): Make "str" const.
897
898 2015-03-20 Pedro Alves <palves@redhat.com>
899
900 * server.c (handle_general_set): Make "req_str" const.
901
902 2015-03-19 Pedro Alves <palves@redhat.com>
903
904 * linux-low.c (linux_resume_one_lwp): Rename to ...
905 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
906 instead call perror_with_name.
907 (check_ptrace_stopped_lwp_gone): New function.
908 (linux_resume_one_lwp): Reimplement as wrapper around
909 linux_resume_one_lwp_throw that swallows errors if the LWP is
910 gone.
911
912 2015-03-19 Pedro Alves <palves@redhat.com>
913
914 * linux-low.c (count_events_callback, select_event_lwp_callback):
915 No longer check whether the thread has resume_stop as last resume
916 kind.
917
918 2015-03-19 Pedro Alves <palves@redhat.com>
919
920 * linux-low.c (count_events_callback, select_event_lwp_callback):
921 Use the lwp's status_pending_p field, not the thread's.
922
923 2015-03-19 Pedro Alves <palves@redhat.com>
924
925 * linux-low.c (select_event_lwp_callback): Update comments to
926 no longer mention SIGTRAP.
927
928 2015-03-18 Gary Benson <gbenson@redhat.com>
929
930 * server.c (handle_query): Do not report vFile:fstat as supported.
931
932 2015-03-11 Gary Benson <gbenson@redhat.com>
933
934 * hostio.c (sys/types.h): New include.
935 (sys/stat.h): Likewise.
936 (common-remote-fileio.h): Likewise.
937 (handle_fstat): New function.
938 (handle_vFile): Handle vFile:fstat packets.
939
940 2015-03-11 Gary Benson <gbenson@redhat.com>
941
942 * configure.ac (AC_CHECK_MEMBERS): Add checks for
943 struct stat.st_blocks and struct stat.st_blksize.
944 * configure: Regenerate.
945 * config.in: Likewise.
946 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
947 (OBS): Add common-remote-fileio.o.
948 (common-remote-fileio.o): New rule.
949
950 2015-03-09 Pedro Alves <palves@redhat.com>
951
952 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
953 'struct sockaddr' pointer in 'accept' call.
954
955 2015-03-09 Pedro Alves <palves@redhat.com>
956
957 Revert:
958 2015-03-07 Pedro Alves <palves@redhat.com>
959 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
960 or <winsock2.h> here. Instead include "gdb_socket.h".
961 (remote_open): Use union gdb_sockaddr_u.
962 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
963 or <winsock2.h> here. Instead include "gdb_socket.h".
964 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
965 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
966 or <sys/un.h>.
967 (init_named_socket, gdb_agent_helper_thread): Use union
968 gdb_sockaddr_u.
969
970 2015-03-07 Pedro Alves <palves@redhat.com>
971
972 * configure.ac (build_warnings): Move
973 -Wdeclaration-after-statement to the C-specific set.
974 * configure: Regenerate.
975
976 2015-03-07 Pedro Alves <palves@redhat.com>
977
978 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
979 or <winsock2.h> here. Instead include "gdb_socket.h".
980 (remote_open): Use union gdb_sockaddr_u.
981 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
982 or <winsock2.h> here. Instead include "gdb_socket.h".
983 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
984 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
985 or <sys/un.h>.
986 (init_named_socket, gdb_agent_helper_thread): Use union
987 gdb_sockaddr_u.
988
989 2015-03-07 Pedro Alves <palves@redhat.com>
990
991 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
992 instead.
993
994 2015-03-06 Yao Qi <yao.qi@linaro.org>
995
996 * linux-aarch64-low.c (aarch64_insert_point): Use
997 show_debug_regs as a boolean.
998 (aarch64_remove_point): Likewise.
999
1000 2015-03-05 Pedro Alves <palves@redhat.com>
1001
1002 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1003 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1004 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1005 * nto-low.c (nto_target_ops): Likewise.
1006 * spu-low.c (spu_target_ops): Likewise.
1007 * win32-low.c (win32_target_ops): Likewise.
1008
1009 2015-03-04 Pedro Alves <palves@redhat.com>
1010
1011 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
1012 Decide whether a breakpoint triggered based on the SIGTRAP's
1013 siginfo.si_code.
1014 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1015 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
1016 (linux_low_filter_event): Check for breakpoints before checking
1017 watchpoints.
1018 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1019 siginfo.si_code.
1020 (linux_stopped_by_sw_breakpoint)
1021 (linux_supports_stopped_by_sw_breakpoint)
1022 (linux_stopped_by_hw_breakpoint)
1023 (linux_supports_stopped_by_hw_breakpoint): New functions.
1024 (linux_target_ops): Install new target methods.
1025
1026 2015-03-04 Pedro Alves <palves@redhat.com>
1027
1028 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1029 * server.c (swbreak_feature, hwbreak_feature): New globals.
1030 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1031 (captured_main): Clear swbreak_feature and hwbreak_feature.
1032 * server.h (swbreak_feature, hwbreak_feature): Declare.
1033 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1034 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1035 supports_stopped_by_hw_breakpoint>: New fields.
1036 (target_supports_stopped_by_sw_breakpoint)
1037 (target_stopped_by_sw_breakpoint)
1038 (target_supports_stopped_by_hw_breakpoint)
1039 (target_stopped_by_hw_breakpoint): Declare.
1040
1041 2015-03-04 Pedro Alves <palves@redhat.com>
1042
1043 enum lwp_stop_reason -> enum target_stop_reason
1044 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1045 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1046 (linux_wait_1, stuck_in_jump_pad_callback)
1047 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1048 (linux_stopped_by_watchpoint):
1049 * linux-low.h (enum lwp_stop_reason): Delete.
1050 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1051 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1052
1053 2015-03-04 Yao Qi <yao.qi@linaro.org>
1054
1055 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1056
1057 2015-03-03 Gary Benson <gbenson@redhat.com>
1058
1059 * hostio.c (handle_vFile): Fix prefix lengths.
1060
1061 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1062
1063 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1064 ptr_bits.
1065
1066 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1067
1068 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1069 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1070 (clean): Add "rm -f" for above C files.
1071 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1072 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1073 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1074 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1075 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1076 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1077 (init_registers_s390x_vx_linux64)
1078 (init_registers_s390x_tevx_linux64)
1079 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1080 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1081 declarations.
1082 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1083 (s390_store_vxrs_high): New functions.
1084 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1085 NT_S390_VXRS_HIGH.
1086 (s390_arch_setup): Add logic for selecting one of the new target
1087 descriptions. Activate the new vector regsets if applicable.
1088 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1089 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1090 and init_registers_s390x_tevx_linux64.
1091
1092 2015-03-01 Pedro Alves <palves@redhat.com>
1093
1094 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1095 parameter.
1096
1097 2015-02-27 Pedro Alves <palves@redhat.com>
1098
1099 * linux-x86-low.c (u_debugreg_offset): New function.
1100 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1101
1102 2015-02-27 Pedro Alves <palves@redhat.com>
1103
1104 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1105 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1106 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1107 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1108 (ps_lsetfpregs, ps_getpid)
1109 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1110 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1111 (ps_lsetxregs, ps_plog): Declare.
1112
1113 2015-02-27 Pedro Alves <palves@redhat.com>
1114
1115 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1116 IP_AGENT_EXPORT_FUNC.
1117 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1118 IP_AGENT_EXPORT_FUNC.
1119 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1120 (IP_AGENT_EXPORT): Delete.
1121 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1122 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1123 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1124 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1125 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1126 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1127 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1128 (traceframe_read_count, traceframe_write_count)
1129 (traceframes_created, trace_state_variables, get_raw_reg)
1130 (get_trace_state_variable_value, set_trace_state_variable_value)
1131 (ust_loaded, helper_thread_id, cmd_buf): Use
1132 IPA_SYM_EXPORTED_NAME.
1133 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1134 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1135 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1136 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1137 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1138 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1139 EXTERN_C_PUSH/EXTERN_C_POP.
1140 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1141 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1142 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1143 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1144 (traceframe_write_count, traceframe_read_count)
1145 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1146 (about_to_request_buffer_space, get_trace_state_variable_value)
1147 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1148 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1149 EXTERN_C_PUSH/EXTERN_C_POP.
1150 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1151 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1152 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1153 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1154 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1155 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1156 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1157 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1158 Define.
1159 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1160 (IP_AGENT_EXPORT_VAR_DECL): Define.
1161 (tracing): Declare.
1162 (gdb_agent_get_raw_reg): Declare.
1163
1164 2015-02-27 Tom Tromey <tromey@redhat.com>
1165 Pedro Alves <palves@redhat.com>
1166
1167 Rename symbols whose names are reserved C++ keywords throughout.
1168
1169 2015-02-27 Pedro Alves <palves@redhat.com>
1170
1171 * Makefile.in (COMPILER): New, get it from autoconf.
1172 (CXX): Get from autoconf instead.
1173 (COMPILE.pre): Use COMPILER.
1174 (CC-LD): Rename to ...
1175 (CC_LD): ... this. Use COMPILER.
1176 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1177 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1178 * acinclude.m4: Include build-with-cxx.m4.
1179 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1180 Disable -Werror by default if building in C++ mode.
1181 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1182 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1183 the C++ compiler. Save/restore CXXFLAGS too.
1184 * configure: Regenerate.
1185
1186 2015-02-27 Pedro Alves <palves@redhat.com>
1187
1188 * acinclude.m4: Include libiberty.m4.
1189 * configure.ac: Call libiberty_INIT.
1190 * config.in, configure: Regenerate.
1191
1192 2015-02-26 Pedro Alves <palves@redhat.com>
1193
1194 * linux-low.c (linux_wait_1): When incrementing the PC past a
1195 program breakpoint always use the_low_target.breakpoint_len as
1196 increment, rather than the maximum between that and
1197 the_low_target.decr_pc_after_break.
1198
1199 2015-02-23 Pedro Alves <palves@redhat.com>
1200
1201 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1202 thread was doing a step-over; always adjust the PC if
1203 we stepped over a permanent breakpoint.
1204 (linux_wait_1): If we stepped over breakpoint that was on top of a
1205 permanent breakpoint, manually advance the PC past it.
1206
1207 2015-02-23 Pedro Alves <palves@redhat.com>
1208
1209 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1210 modes.
1211 (x86_fill_gregset, x86_store_gregset): Use it when handling
1212 $orig_eax.
1213
1214 2015-02-20 Pedro Alves <palves@redhat.com>
1215
1216 * thread-db.c: Include "nat/linux-procfs.h".
1217 (thread_db_init): Skip listing new threads if the kernel supports
1218 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1219
1220 2015-02-20 Pedro Alves <palves@redhat.com>
1221
1222 * linux-low.c (status_pending_p_callback): Use ptid_match.
1223
1224 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1225
1226 PR breakpoints/16812
1227 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1228 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1229 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1230
1231 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1232
1233 PR breakpoints/15956
1234 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1235
1236 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1237
1238 * linux-low.c (linux_low_btrace_conf): Print size.
1239 * server.c (handle_btrace_conf_general_set): New.
1240 (hanle_general_set): Call handle_btrace_conf_general_set.
1241 (handle_query): Report Qbtrace-conf:bts:size as supported.
1242
1243 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1244
1245 * linux-low.c (linux_low_enable_btrace): Update parameters.
1246 (linux_low_btrace_conf): New.
1247 (linux_target_ops)<to_btrace_conf>: Initialize.
1248 * server.c (current_btrace_conf): New.
1249 (handle_btrace_enable): Rename to ...
1250 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
1251 to target_enable_btrace. Update comment. Update users.
1252 (handle_qxfer_btrace_conf): New.
1253 (qxfer_packets): Add btrace-conf entry.
1254 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1255 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1256 (target_ops)<read_btrace_conf>: New.
1257 (target_enable_btrace): Update parameters.
1258 (target_read_btrace_conf): New.
1259
1260 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1261
1262 * server.c (handle_btrace_general_set): Remove call to
1263 target_supports_btrace.
1264 (supported_btrace_packets): New.
1265 (handle_query): Call supported_btrace_packets.
1266 * target.h: include btrace-common.h.
1267 (btrace_target_info): Removed.
1268 (supports_btrace, target_supports_btrace): Update parameters.
1269
1270 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1271
1272 * Makefile.in (SFILES): Add common/btrace-common.c.
1273 (OBS): Add common/btrace-common.o.
1274 (btrace-common.o): Add build rules.
1275 * linux-low: Include btrace-common.h.
1276 (linux_low_read_btrace): Use struct btrace_data. Call
1277 btrace_data_init and btrace_data_fini.
1278
1279 2015-02-06 Pedro Alves <palves@redhat.com>
1280
1281 * thread-db.c (find_new_threads_callback): Add debug output.
1282
1283 2015-02-04 Pedro Alves <palves@redhat.com>
1284
1285 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1286 (resume_stopped_resumed_lwps): New function.
1287 (linux_wait_for_event_filtered): Use it.
1288
1289 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1290
1291 * Makefile.in (SFILES): Add linux-personality.c.
1292 (linux-personality.o): New rule.
1293 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1294 list of objects to be built.
1295 * linux-low.c: Include nat/linux-personality.h.
1296 (linux_create_inferior): Remove code to disable address space
1297 randomization (moved to ../nat/linux-personality.c). Create
1298 cleanup to disable address space randomization.
1299
1300 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1301
1302 * Makefile.in (posix-strerror.o): New rule.
1303 (mingw-strerror.o): Likewise.
1304 * configure: Regenerated.
1305 * configure.ac: Source file ../common/common.host. Initialize new
1306 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1307
1308 2015-01-14 Yao Qi <yao@codesourcery.com>
1309
1310 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1311 (ppc-linux.o): New rule.
1312 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1313 * configure.ac: AC_CHECK_FUNCS(getauxval).
1314 * config.in: Re-generated.
1315 * configure: Re-generated.
1316 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1317 ppc64_64bit_inferior_p
1318
1319 2015-01-14 Yao Qi <yao@codesourcery.com>
1320
1321 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1322 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1323 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1324 (PT_ORIG_R3, PT_TRAP): Likewise.
1325 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1326 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1327 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1328
1329 2015-01-10 Joel Brobecker <brobecker@adacore.com>
1330
1331 * i387-fp.c (i387_cache_to_xsave): In look over
1332 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1333 zmmh_low_space field by use of zmmh_high_space.
1334
1335 2015-01-09 Pedro Alves <palves@redhat.com>
1336
1337 * linux-low.c (step_over_bkpt): Move higher up in the file.
1338 (handle_extended_wait): Don't store the stop_pc here.
1339 (get_stop_pc): Adjust comments and rename to ...
1340 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1341 stopped for a software breakpoint or hardware breakpoint.
1342 (thread_still_has_status_pending_p): New function.
1343 (status_pending_p_callback): Use
1344 thread_still_has_status_pending_p. If the event is no longer
1345 interesting, resume the LWP.
1346 (handle_tracepoints): Add assert.
1347 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1348 (wstatus_maybe_breakpoint): New function.
1349 (cancel_breakpoint): Delete function.
1350 (check_stopped_by_watchpoint): New function, factored out from
1351 linux_low_filter_event.
1352 (lp_status_maybe_breakpoint): Delete function.
1353 (linux_low_filter_event): Remove filter_ptid argument.
1354 Leave thread group exits pending here. Store the LWP's stop PC.
1355 Always leave events pending.
1356 (linux_wait_for_event_filtered): Pull all events out of the
1357 kernel, and leave them all pending.
1358 (count_events_callback, select_event_lwp_callback): Consider all
1359 events.
1360 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1361 (select_event_lwp): Only give preference to the stepping LWP in
1362 all-stop mode. Adjust comments.
1363 (ignore_event): New function.
1364 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1365 references to cancel_breakpoints. Adjust to renames. Also give
1366 equal priority to all LWPs that have had events in non-stop mode.
1367 If reporting a software breakpoint event, unadjust the LWP's PC.
1368 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1369 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1370 Adjust.
1371 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1372 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1373 (linux_stopped_by_watchpoint): Adjust.
1374 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1375 * linux-low.h (enum lwp_stop_reason): New.
1376 (struct lwp_info) <stop_pc>: Adjust comment.
1377 <stopped_by_watchpoint>: Delete field.
1378 <stop_reason>: New field.
1379 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1380 * mem-break.c (software_breakpoint_inserted_here)
1381 (hardware_breakpoint_inserted_here): New function.
1382 * mem-break.h (software_breakpoint_inserted_here)
1383 (hardware_breakpoint_inserted_here): Declare.
1384 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1385 (cancel_breakpoints): Delete.
1386 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1387 (upload_fast_traceframes): Remove references to
1388 cancel_breakpoints.
1389
1390 2015-01-09 Pedro Alves <palves@redhat.com>
1391
1392 * thread-db.c (find_new_threads_callback): Ignore thread if the
1393 kernel thread ID is -1.
1394
1395 2015-01-09 Pedro Alves <palves@redhat.com>
1396
1397 * linux-low.c (linux_attach_fail_reason_string): Move to
1398 nat/linux-ptrace.c, and rename.
1399 (linux_attach_lwp): Update comment.
1400 (attach_proc_task_lwp_callback): New function.
1401 (linux_attach): Adjust to rename and use
1402 linux_proc_attach_tgid_threads.
1403 (linux_attach_fail_reason_string): Delete declaration.
1404
1405 2015-01-01 Joel Brobecker <brobecker@adacore.com>
1406
1407 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1408 * server.c (gdbserver_version): Likewise.
1409
1410 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1411
1412 * remote-utils.c: Include ctype.h.
1413 (input_interrupt): Explicitly handle the case when the char
1414 received is the NUL byte. Improve the printing of non-ASCII
1415 characters.
1416
1417 2014-12-16 Joel Brobecker <brobecker@adacore.com>
1418
1419 * linux-low.c (linux_low_filter_event): Update call to
1420 linux_enable_event_reporting following the addition of
1421 a new parameter to that function.
1422
1423 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
1424
1425 PR server/17457
1426 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1427 (AARCH64_FPCR_REGNO): Likewise.
1428 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1429 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1430 (aarch64_store_fpregset): Likewise.
1431
1432 2014-12-15 Joel Brobecker <brobecker@adacore.com>
1433
1434 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1435 Remove FIXME comment about assumption about N.
1436
1437 2014-12-13 Joel Brobecker <brobecker@adacore.com>
1438
1439 * configure.ac: If large-file support is disabled in GDBserver,
1440 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1441 * configure: Regenerate.
1442
1443 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1444
1445 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1446 warning upon ENODATA from ptrace.
1447 * linux-s390-low.c (s390_store_tdb): New.
1448 (s390_regsets): Add regset for NT_S390_TDB.
1449
1450 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1451
1452 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1453 without a fill_function.
1454 * linux-s390-low.c (s390_fill_last_break): Remove.
1455 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1456 (s390_arch_setup): Use regset's size instead of fill_function for
1457 loop end condition.
1458
1459 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1460
1461 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1462 the regset's store function when ptrace returned an error.
1463 * regcache.c (get_thread_regcache): Invalidate register cache
1464 before fetching inferior's registers.
1465
1466 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1467
1468 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1469 while-loop as for-loop.
1470 (regsets_store_inferior_registers): Likewise.
1471
1472 2014-11-28 Yao Qi <yao@codesourcery.com>
1473
1474 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1475 * config.in, configure: Re-generate.
1476 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1477 is defined.
1478
1479 2014-11-21 Yao Qi <yao@codesourcery.com>
1480
1481 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1482 (AC_CHECK_HEADERS): Remove malloc.h.
1483 * configure: Re-generated.
1484 * config.in: Re-generated.
1485 * server.h: Don't include alloca.h and malloc.h.
1486 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1487 Don't include malloc.h.
1488
1489 2014-11-17 Joel Brobecker <brobecker@adacore.com>
1490
1491 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1492 corresponding ERRNO check in same block.
1493
1494 2014-11-12 Pedro Alves <palves@redhat.com>
1495
1496 * server.c (cont_thread): Update comment.
1497 (start_inferior, attach_inferior): No longer clear cont_thread.
1498 (handle_v_cont): No longer set cont_thread.
1499 (captured_main): Clear cont_thread each time a GDB connects.
1500
1501 2014-11-12 Pedro Alves <palves@redhat.com>
1502
1503 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1504 thread, and don't resume all threads if the Hc thread has exited.
1505
1506 2014-11-12 Pedro Alves <palves@redhat.com>
1507
1508 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1509 the process group instead of to a specific LWP.
1510
1511 2014-10-15 Pedro Alves <palves@redhat.com>
1512
1513 PR server/17487
1514 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1515 parameter.
1516 (arm_set_thread_context): Delete.
1517 (the_low_target): Adjust.
1518 * win32-i386-low.c (debug_registers_changed)
1519 (debug_registers_used): Delete.
1520 (update_debug_registers_callback): New function.
1521 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1522 needing to update their debug registers.
1523 (win32_get_current_dr): New function.
1524 (x86_dr_low_get_addr, x86_dr_low_get_control)
1525 (x86_dr_low_get_status): Fetch the debug register from the thread
1526 record's context.
1527 (i386_initial_stuff): Adjust.
1528 (i386_get_thread_context): Remove current_event parameter. Don't
1529 clear debug_registers_changed nor copy DR values to
1530 debug_reg_state.
1531 (i386_set_thread_context): Delete.
1532 (i386_prepare_to_resume): New function.
1533 (i386_thread_added): Mark the thread as needing to update irs
1534 debug registers.
1535 (the_low_target): Remove i386_set_thread_context and install
1536 i386_prepare_to_resume.
1537 * win32-low.c (win32_get_thread_context): Adjust.
1538 (win32_set_thread_context): Use SetThreadContext
1539 directly.
1540 (win32_prepare_to_resume): New function.
1541 (win32_require_context): New function, factored out from ...
1542 (thread_rec): ... this.
1543 (continue_one_thread): Call win32_prepare_to_resume on each thread
1544 we're about to continue.
1545 (win32_resume): Call win32_prepare_to_resume on the event thread.
1546 * win32-low.h (struct win32_thread_info)
1547 <debug_registers_changed>: New field.
1548 (struct win32_target_ops): Change prototype of set_thread_context,
1549 delete set_thread_context and add prepare_to_resume.
1550 (win32_require_context): New declaration.
1551
1552 2014-10-08 Gary Benson <gbenson@redhat.com>
1553
1554 * server.h: Do not include common-exceptions.h.
1555
1556 2014-10-08 Gary Benson <gbenson@redhat.com>
1557
1558 * server.h: Do not include cleanups.h.
1559
1560 2014-09-30 James Hogan <james.hogan@imgtec.com>
1561
1562 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1563 mips64-dsp-linux.c.
1564
1565 2014-09-23 Yao Qi <yao@codesourcery.com>
1566
1567 * linux-low.c (lp_status_maybe_breakpoint): New function.
1568 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1569 (count_events_callback): Likewise.
1570 (select_event_lwp_callback): Likewise.
1571 (cancel_breakpoints_callback): Likewise.
1572
1573 2014-09-19 Don Breazeal <donb@codesourcery.com>
1574
1575 * linux-low.c (handle_extended_wait): Call
1576 linux_ptrace_get_extended_event.
1577 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1578 linux_is_extended_waitstatus.
1579
1580 2014-09-16 Joel Brobecker <brobecker@adacore.com>
1581
1582 * Makefile.in (CPPFLAGS): Define.
1583 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1584 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1585
1586 2014-09-16 Gary Benson <gbenson@redhat.com>
1587
1588 * inferiors.h (current_inferior): Renamed as...
1589 (current_thread): New variable. All uses updated.
1590 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1591 (maybe_move_out_of_jump_pad): Likewise.
1592 (cancel_breakpoint): Likewise.
1593 (linux_low_filter_event): Likewise.
1594 (wait_for_sigstop): Likewise.
1595 (linux_resume_one_lwp): Likewise.
1596 (need_step_over_p): Likewise.
1597 (start_step_over): Likewise.
1598 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1599 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1600 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1601 and save_inferior as saved_thread.
1602 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1603 saved_thread.
1604 (regcache_invalidate_thread): Likewise.
1605 * remote-utils.c (prepare_resume_reply): Likewise.
1606 * thread-db.c (thread_db_get_tls_address): Likewise.
1607 (disable_thread_event_reporting): Likewise.
1608 (remove_thread_event_breakpoints): Likewise.
1609 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1610 as saved_thread.
1611 * target.h (set_desired_inferior): Renamed as...
1612 (set_desired_thread): New declaration. All uses updated.
1613 * server.c (myresume): Updated comment to reference thread instead
1614 of inferior.
1615 (handle_serial_event): Likewise.
1616 (handle_target_event): Likewise.
1617
1618 2014-09-12 Tom Tromey <tromey@redhat.com>
1619 Gary Benson <gbenson@redhat.com>
1620
1621 * regcache.h: Include common-regcache.h.
1622 (regcache_read_pc): Don't declare.
1623 * regcache.c (get_thread_regcache_for_ptid): New function.
1624
1625 2014-09-11 Tom Tromey <tromey@redhat.com>
1626 Gary Benson <gbenson@redhat.com>
1627
1628 * symbol.c: New file.
1629 * Makefile.in (SFILES): Add symbol.c.
1630 (OBS): Add symbol.o.
1631
1632 2014-09-11 Gary Benson <gbenson@redhat.com>
1633
1634 * target.c (target_stop_ptid, target_continue_ptid): New
1635 functions.
1636
1637 2014-09-11 Tom Tromey <tromey@redhat.com>
1638 Gary Benson <gbenson@redhat.com>
1639
1640 * target.h: Include target/target.h.
1641 * target.c (target_read_memory, target_read_uint32)
1642 (target_write_memory): New functions.
1643
1644 2014-09-11 Gary Benson <gbenson@redhat.com>
1645
1646 * server.h (debug_hw_points): Don't declare.
1647 * server.c (debug_hw_points): Don't define. Replace all uses
1648 with show_debug_regs.
1649 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1650 all uses with show_debug_regs.
1651
1652 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1653
1654 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1655 endianness into account.
1656 (ppc_supply_ptrace_register): Likewise.
1657
1658 2014-09-03 James Hogan <james.hogan@imgtec.com>
1659
1660 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1661 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1662
1663 2014-09-03 Gary Benson <gbenson@redhat.com>
1664
1665 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1666 ALL_DEBUG_ADDRESS_REGISTERS.
1667
1668 2014-09-02 Gary Benson <gbenson@redhat.com>
1669
1670 * i386-low.h: Renamed as...
1671 * x86-low.h: New file. All type, function and variable name
1672 prefixes changed from "i386_" to "x86_". All references updated.
1673 * i386-low.c: Renamed as...
1674 * x86-low.c: New file. All type, function and variable name
1675 prefixes changed from "i386_" to "x86_". All references updated.
1676
1677 2014-09-02 Gary Benson <gbenson@redhat.com>
1678
1679 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1680 (x86_linux_new_thread): Likewise.
1681
1682 2014-08-29 Gary Benson <gbenson@redhat.com>
1683
1684 * server.h (setjmp.h): Do not include.
1685 (toplevel): Do not declare.
1686 (common-exceptions.h): Include.
1687 (cleanups.h): Likewise.
1688 * server.c (toplevel): Do not define.
1689 (exit_code): New static global.
1690 (detach_or_kill_for_exit_cleanup): New function.
1691 (main): New function. Original main renamed to...
1692 (captured_main): New function.
1693 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1694
1695 2014-08-29 Gary Benson <gbenson@redhat.com>
1696
1697 * Makefile.in (SFILES): Add common/common-exceptions.c.
1698 (OBS): Add common-exceptions.o.
1699 (common-exceptions.o): New rule.
1700 * utils.c (prepare_to_throw_exception): New function.
1701
1702 2014-08-29 Gary Benson <gbenson@redhat.com>
1703
1704 * config.in: Regenerate.
1705 * configure: Likewise.
1706
1707 2014-08-29 Gary Benson <gbenson@redhat.com>
1708
1709 * Makefile.in (SFILES): Add common/cleanups.c.
1710 (OBS): cleanups.o.
1711 (cleanups.o): New rule.
1712
1713 2014-08-29 Gary Benson <gbenson@redhat.com>
1714
1715 * utils.c (internal_vwarning): New function.
1716
1717 2014-08-28 Gary Benson <gbenson@redhat.com>
1718
1719 * utils.h (fatal): Remove declaration.
1720 * utils.c (fatal): Remove function.
1721
1722 2014-08-28 Gary Benson <gbenson@redhat.com>
1723
1724 * tracepoint.c (gdb_agent_init): Replace fatal with
1725 perror_with_name.
1726 (initialize_tracepoint): Likewise.
1727
1728 2014-08-28 Gary Benson <gbenson@redhat.com>
1729
1730 * remote-utils.c (remote_prepare): Replace fatal with error.
1731
1732 2014-08-28 Gary Benson <gbenson@redhat.com>
1733
1734 * linux-low.c (linux_async): Replace fatal with warning.
1735 Tidy up and return.
1736 (linux_start_non_stop): Return -1 if linux_async failed.
1737
1738 2014-08-28 Gary Benson <gbenson@redhat.com>
1739
1740 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1741 gdb_assert.
1742 (i386_dr_low_get_addr): Remove vague comment.
1743 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1744 gdb_assert.
1745
1746 2014-08-28 Gary Benson <gbenson@redhat.com>
1747
1748 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1749 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1750 internal_error.
1751 (linux_resume_one_lwp): Likewise.
1752 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1753 gdb_assert.
1754 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1755 with internal_error.
1756 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1757 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1758 (find_register_by_name): Replace fatal with internal_error.
1759 (find_regno): Likewise.
1760 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1761 * thread-db.c (thread_db_create_event): Likewise.
1762 (thread_db_load_search): Likewise.
1763 (try_thread_db_load_1): Likewise.
1764 * tracepoint.c (get_jump_space_head): Replace fatal with
1765 internal_error.
1766 (claim_trampoline_space): Likewise.
1767 (have_fast_tracepoint_trampoline_buffer): Likewise.
1768 (cmd_qtstart): Likewise.
1769 (stop_tracing): Likewise.
1770 (fast_tracepoint_collecting): Likewise.
1771 (target_malloc): Likewise.
1772 (download_tracepoint): Likewise.
1773 (download_trace_state_variables): Replace check with gdb_assert.
1774 (upload_fast_traceframes): Replace fatal with internal_error.
1775
1776 2014-08-19 Tom Tromey <tromey@redhat.com>
1777 Gary Benson <gbenson@redhat.com>
1778
1779 * Makefile.in (SFILES): Add common/common-debug.c.
1780 (OBS): Add common-debug.o.
1781 (common-debug.o): New rule.
1782 * debug.h (debug_printf): Don't declare.
1783 * debug.c (debug_printf): Renamed and rewritten as...
1784 (debug_vprintf): New function.
1785
1786 2014-08-19 Gary Benson <gbenson@redhat.com>
1787
1788 * utils.h: Do not include print-utils.h.
1789
1790 2014-08-19 Tom Tromey <tromey@redhat.com>
1791 Gary Benson <gbenson@redhat.com>
1792
1793 * server.h: Add static assertion.
1794 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1795
1796 2014-08-19 Tom Tromey <tromey@redhat.com>
1797 Gary Benson <gbenson@redhat.com>
1798
1799 * Makefile.in (SFILES): Add common/errors.c.
1800 (OBS): Add errors.o.
1801 (IPA_OBS): Add errors-ipa.o.
1802 (errors.o): New rule.
1803 (errors-ipa.o): Likewise.
1804 * utils.h (perror_with_name, error, warning): Don't declare.
1805 * utils.c (warning): Renamed and rewritten as...
1806 (vwarning): New function.
1807 (error): Renamed and rewritten as...
1808 (verror): New function.
1809 (internal_error): Renamed and rewritten as...
1810 (internal_verror): New function.
1811
1812 2014-08-07 Gary Benson <gbenson@redhat.com>
1813
1814 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1815 * configure: Regenerate.
1816 * config.in: Likewise.
1817 * server.h: Do not include errno.h.
1818 * event-loop.c: Likewise.
1819 * hostio-errno.c: Likewise.
1820 * linux-low.c: Likewise.
1821 * remote-utils.c: Likewise.
1822 * spu-low.c: Likewise.
1823 * utils.c: Likewise.
1824 * gdbreplay.c: Unconditionally include errno.h.
1825
1826 2014-08-07 Gary Benson <gbenson@redhat.com>
1827
1828 * server.h: Do not include string.h.
1829 * event-loop.c: Likewise.
1830 * linux-low.c: Likewise.
1831 * regcache.c: Likewise.
1832 * remote-utils.c: Likewise.
1833 * spu-low.c: Likewise.
1834 * utils.c: Likewise.
1835
1836 2014-08-07 Gary Benson <gbenson@redhat.com>
1837
1838 * server.h: Do not include gdb_assert.h.
1839
1840 2014-08-07 Gary Benson <gbenson@redhat.com>
1841
1842 * server.h: Do not include common-utils.h.
1843
1844 2014-08-07 Gary Benson <gbenson@redhat.com>
1845
1846 * server.h: Do not include ptid.h.
1847 * notif.h: Likewise.
1848
1849 2014-08-07 Gary Benson <gbenson@redhat.com>
1850
1851 * server.h: Do not include gdb_locale.h.
1852
1853 2014-08-07 Gary Benson <gbenson@redhat.com>
1854
1855 * server.h: Do not include gdb/signals.h.
1856 * win32-low.c: Likewise.
1857
1858 2014-08-07 Gary Benson <gbenson@redhat.com>
1859
1860 * server.h: Do not include pathmax.h.
1861
1862 2014-08-07 Gary Benson <gbenson@redhat.com>
1863
1864 * server.h: Do not include libiberty.h.
1865 * linux-bfin-low.c: Likewise.
1866
1867 2014-08-07 Gary Benson <gbenson@redhat.com>
1868
1869 * server.h: Do not include ansidecl.h.
1870
1871 2014-08-07 Gary Benson <gbenson@redhat.com>
1872
1873 * linux-x86-low.c: Do not include stddef.h.
1874 * lynx-ppc-low.c: Likewise.
1875 * tracepoint.c: Likewise.
1876
1877 2014-08-07 Gary Benson <gbenson@redhat.com>
1878
1879 * server.h: Do not include stdarg.h.
1880 * nto-low.c: Likewise.
1881
1882 2014-08-07 Gary Benson <gbenson@redhat.com>
1883
1884 * server.h: Do not include stdlib.h.
1885 * inferiors.c: Likewise.
1886 * linux-low.c: Likewise.
1887 * regcache.c: Likewise.
1888 * spu-low.c: Likewise.
1889 * tracepoint.c: Likewise.
1890 * utils.c: Likewise.
1891
1892 2014-08-07 Gary Benson <gbenson@redhat.com>
1893
1894 * server.h: Do not include stdio.h.
1895 * linux-low.c: Likewise.
1896 * remote-utils.c: Likewise.
1897 * spu-low.c: Likewise.
1898 * utils.c: Likewise.
1899 * wincecompat.c: Likewise.
1900
1901 2014-08-06 Gary Benson <gbenson@redhat.com>
1902
1903 * regcache.c (init_register_cache): Move conditionals inside if.
1904
1905 2014-08-06 Gary Benson <gbenson@redhat.com>
1906
1907 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1908
1909 2014-07-31 Gary Benson <gbenson@redhat.com>
1910
1911 * ax.h: Do not include server.h.
1912 * gdbthread.h: Likewise.
1913 * lynx-low.h: Likewise.
1914 * notif.h: Likewise.
1915
1916 2014-07-30 Gary Benson <gbenson@redhat.com>
1917
1918 * server.h: Include common-defs.h.
1919 Do not include config.h or build-gnulib-gdbserver/config.h.
1920
1921 2014-07-30 Gary Benson <gbenson@redhat.com>
1922
1923 * hostio-errno.c: Move server.h to top of includes list.
1924 * inferiors.c: Likewise.
1925 * linux-x86-low.c: Likewise.
1926 * notif.c: Include server.h.
1927
1928 2014-07-24 Tom Tromey <tromey@redhat.com>
1929 Gary Benson <gbenson@redhat.com>
1930
1931 * server.h (CORE_ADDR): Now unsigned.
1932
1933 2014-07-16 Pedro Alves <palves@redhat.com>
1934
1935 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1936
1937 2014-07-15 Pedro Alves <palves@redhat.com>
1938
1939 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1940 copy.
1941
1942 2014-07-11 Pedro Alves <palves@redhat.com>
1943
1944 * linux-low.c (kill_wait_lwp): New function, based on
1945 kill_one_lwp_callback, but use my_waitpid directly.
1946 (kill_one_lwp_callback, linux_kill): Use it.
1947
1948 2014-06-23 Pedro Alves <palves@redhat.com>
1949
1950 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1951 before setting DR0..DR3.
1952
1953 2014-06-20 Gary Benson <gbenson@redhat.com>
1954
1955 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1956 * configure: Regenerated.
1957 * config.in: Likewise.
1958
1959 2014-06-20 Gary Benson <gbenson@redhat.com>
1960
1961 * Makefile.in (SFILES): Update locations for files moved
1962 from common to nat.
1963 (object file files): Reordered.
1964
1965 2014-06-20 Gary Benson <gbenson@redhat.com>
1966
1967 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1968 (i386_dr_low_set_addr): Likewise.
1969 (i386_dr_low_get_addr): Likewise.
1970 (i386_dr_low_can_set_control): Likewise.
1971 (i386_dr_low_set_control): Likewise.
1972 (i386_dr_low_get_control): Likewise.
1973 (i386_dr_low_get_status): Likewise.
1974 (i386_get_debug_register_length): Likewise.
1975 * linux-x86-low.c (i386_dr_low_set_addr):
1976 Changed signature. Made static.
1977 (i386_dr_low_get_addr): Likewise.
1978 (i386_dr_low_set_control): Likewise.
1979 (i386_dr_low_get_control): Likewise.
1980 (i386_dr_low_get_status): Likewise.
1981 (i386_dr_low): New global variable.
1982 * win32-i386-low.c (i386_dr_low_set_addr):
1983 Changed signature. Made static.
1984 (i386_dr_low_get_addr): Likewise.
1985 (i386_dr_low_set_control): Likewise.
1986 (i386_dr_low_get_control): Likewise.
1987 (i386_dr_low_get_status): Likewise.
1988 (i386_dr_low): New global variable.
1989
1990 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1991
1992 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1993 * Makefile.in (AR, AR_FLAGS): Define.
1994 * configure: Regenerate.
1995
1996 2014-06-19 Gary Benson <gbenson@redhat.com>
1997
1998 * Makefile.in (i386-dregs.o): New rule.
1999 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2000 * i386-low.c (target.h): Remove include.
2001 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2002 (DR_CONTROL_SHIFT): Likewise.
2003 (DR_CONTROL_SIZE): Likewise.
2004 (DR_RW_EXECUTE): Likewise.
2005 (DR_RW_WRITE): Likewise.
2006 (DR_RW_READ): Likewise.
2007 (DR_RW_IORW): Likewise.
2008 (DR_LEN_1): Likewise.
2009 (DR_LEN_2): Likewise.
2010 (DR_LEN_4): Likewise.
2011 (DR_LEN_8): Likewise.
2012 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2013 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2014 (DR_ENABLE_SIZE): Likewise.
2015 (DR_LOCAL_SLOWDOWN): Likewise.
2016 (DR_GLOBAL_SLOWDOWN): Likewise.
2017 (DR_CONTROL_RESERVED): Likewise.
2018 (I386_DR_CONTROL_MASK): Likewise.
2019 (I386_DR_VACANT): Likewise.
2020 (I386_DR_LOCAL_ENABLE): Likewise.
2021 (I386_DR_GLOBAL_ENABLE): Likewise.
2022 (I386_DR_DISABLE): Likewise.
2023 (I386_DR_SET_RW_LEN): Likewise.
2024 (I386_DR_GET_RW_LEN): Likewise.
2025 (I386_DR_WATCH_HIT): Likewise.
2026 (i386_wp_op_t): Likewise.
2027 (i386_show_dr): Likewise.
2028 (i386_length_and_rw_bits): Likewise.
2029 (i386_insert_aligned_watchpoint): Likewise.
2030 (i386_remove_aligned_watchpoint): Likewise.
2031 (i386_handle_nonaligned_watchpoint): Likewise.
2032 i386_update_inferior_debug_regs(): Likewise.
2033 (i386_dr_insert_watchpoint): Likewise.
2034 (i386_dr_remove_watchpoint): Likewise.
2035 (i386_dr_region_ok_for_watchpoint): Likewise.
2036 (i386_dr_stopped_data_address): Likewise.
2037 (i386_dr_stopped_by_watchpoint): Likewise.
2038
2039 2014-06-19 Gary Benson <gbenson@redhat.com>
2040
2041 * i386-low.c (i386_dr_show): Renamed to
2042 i386_show_dr and made static. All uses updated.
2043 (i386_dr_length_and_rw_bits): Renamed to
2044 i386_length_and_rw_bits and made static.
2045 All uses updated.
2046 (i386_dr_insert_aligned_watchpoint): Renamed to
2047 i386_insert_aligned_watchpoint and made static.
2048 All uses updated.
2049 (i386_dr_remove_aligned_watchpoint): Renamed to
2050 i386_remove_aligned_watchpoint and made static.
2051 All uses updated.
2052 (i386_dr_update_inferior_debug_regs): Renamed to
2053 i386_update_inferior_debug_regs and made static.
2054 All uses updated.
2055
2056 2014-06-18 Gary Benson <gbenson@redhat.com>
2057
2058 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2059 (i386_dr_low_can_set_control): Likewise.
2060 (i386_get_debug_register_length): Likewise.
2061 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2062 (i386_dr_low_can_set_control): Likewise.
2063 (i386_get_debug_register_length): Likewise.
2064
2065 2014-06-17 Gary Benson <gbenson@redhat.com>
2066
2067 * i386-low.h (i386-dregs.h): New include.
2068 (DR_FIRSTADDR): Now in i386-dregs.h.
2069 (DR_LASTADDR): Likewise.
2070 (DR_NADDR): Likewise.
2071 (DR_STATUS): Likewise.
2072 (DR_CONTROL): Likewise.
2073 (i386_debug_reg_state): Likewise.
2074 (i386_dr_insert_watchpoint): Likewise.
2075 (i386_dr_remove_watchpoint): Likewise.
2076 (i386_dr_region_ok_for_watchpoint): Likewise.
2077 (i386_dr_stopped_data_address): Likewise.
2078 (i386_dr_stopped_by_watchpoint): Likewise.
2079 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2080
2081 2014-06-18 Gary Benson <gbenson@redhat.com>
2082
2083 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2084 i386_dr_insert_watchpoint.
2085 (i386_low_remove_watchpoint): Renamed to
2086 i386_dr_remove_watchpoint.
2087 (i386_low_region_ok_for_watchpoint): Renamed to
2088 i386_dr_region_ok_for_watchpoint.
2089 (i386_low_stopped_data_address): Renamed to
2090 i386_dr_stopped_data_address.
2091 (i386_low_stopped_by_watchpoint): Renamed to
2092 i386_dr_stopped_by_watchpoint.
2093 * i386-low.c (i386_show_dr): Renamed to
2094 i386_dr_show and made nonstatic. All uses updated.
2095 (i386_length_and_rw_bits): Renamed to
2096 i386_dr_length_and_rw_bits and made nonstatic.
2097 All uses updated.
2098 (i386_insert_aligned_watchpoint): Renamed to
2099 i386_dr_insert_aligned_watchpoint and made nonstatic.
2100 All uses updated.
2101 (i386_remove_aligned_watchpoint): Renamed to
2102 i386_dr_remove_aligned_watchpoint and made nonstatic.
2103 All uses updated.
2104 (i386_update_inferior_debug_regs): Renamed to
2105 i386_dr_update_inferior_debug_regs and made nonstatic.
2106 All uses updated.
2107 (i386_low_insert_watchpoint): Renamed to
2108 i386_dr_insert_watchpoint. All uses updated.
2109 (i386_low_remove_watchpoint): Renamed to
2110 i386_dr_remove_watchpoint. All uses updated.
2111 (i386_low_region_ok_for_watchpoint): Renamed to
2112 i386_dr_region_ok_for_watchpoint. All uses updated.
2113 (i386_low_stopped_data_address): Renamed to
2114 i386_dr_stopped_data_address. All uses updated.
2115 (i386_low_stopped_by_watchpoint): Renamed to
2116 i386_dr_stopped_by_watchpoint. All uses updated.
2117
2118 2014-06-18 Gary Benson <gbenson@redhat.com>
2119
2120 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2121 (i386_dr_low_can_set_control): Likewise.
2122 (i386_insert_aligned_watchpoint): New check.
2123
2124 2014-06-18 Gary Benson <gbenson@redhat.com>
2125
2126 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2127 Renamed to state.
2128
2129 2014-06-18 Gary Benson <gbenson@redhat.com>
2130
2131 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2132 instead of fatal and error.
2133 (i386_handle_nonaligned_watchpoint): Likewise.
2134
2135 2014-06-18 Gary Benson <gbenson@redhat.com>
2136
2137 * i386-low.c (i386_get_debug_register_length): New macro.
2138 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2139 (i386_show_dr): Use debug_printf instead of fprintf. Use
2140 phex to format values.
2141
2142 2014-06-18 Gary Benson <gbenson@redhat.com>
2143
2144 * i386-low.h: Comment changes.
2145 * i386-low.c: Likewise.
2146
2147 2014-06-18 Gary Benson <gbenson@redhat.com>
2148
2149 * i386-low.c: Whitespace changes.
2150
2151 2014-06-12 Tom Tromey <tromey@redhat.com>
2152
2153 * utils.c (freeargv): Remove.
2154
2155 2014-06-12 Tom Tromey <tromey@redhat.com>
2156
2157 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2158 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2159 (parse_debug_format_options): Likewise.
2160 (gdbserver_usage): Likewise.
2161 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2162 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2163 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2164 against libiberty.
2165 ($(LIBGNU)): Depend on libiberty.
2166 (all-lib): Recurse into all subdirs.
2167 (install-only): Invoke "install" target in subdirs.
2168 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2169 targets.
2170 * configure: Rebuild.
2171 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2172 for vasprintf, vsnprintf, or gettimeofday.
2173 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2174 srv_tgtobj.
2175
2176 2014-06-05 Joel Brobecker <brobecker@adacore.com>
2177
2178 * development.sh: Delete.
2179 * Makefile.in (config.status): Adjust dependency on development.sh.
2180 * configure.ac: Adjust development.sh source call.
2181 * configure: Regenerate.
2182
2183 2014-06-02 Pedro Alves <palves@redhat.com>
2184
2185 * ax.c (gdb_free_agent_expr): New function.
2186 * ax.h (gdb_free_agent_expr): New declaration.
2187 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2188 list.
2189 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2190 static.
2191 (clear_breakpoint_conditions_and_commands): New function.
2192 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2193 (clear_breakpoint_conditions_and_commands): New declaration.
2194
2195 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2196
2197 * linux-aarch64-low.c (asm/ptrace.h): Include.
2198
2199 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2200
2201 Fix TLS access for -static -pthread.
2202 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2203 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2204 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2205
2206 2014-05-20 Pedro Alves <palves@redhat.com>
2207
2208 * linux-aarch64-low.c (aarch64_insert_point)
2209 (aarch64_remove_point): No longer check whether the type is
2210 supported here. Adjust to new interface.
2211 (the_low_target): Install aarch64_supports_z_point_type as
2212 supports_z_point_type method.
2213 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2214 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2215 instead of a Z packet char. Adjust.
2216 (arm_supports_z_point_type): New function.
2217 (arm_insert_point, arm_remove_point): Adjust to new interface.
2218 (the_low_target): Install arm_supports_z_point_type.
2219 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2220 (cris_insert_point, cris_remove_point): Adjust to new interface.
2221 Don't check whether the type is supported here.
2222 (the_low_target): Install cris_supports_z_point_type.
2223 * linux-low.c (linux_supports_z_point_type): New function.
2224 (linux_insert_point, linux_remove_point): Adjust to new interface.
2225 * linux-low.h (struct linux_target_ops) <insert_point,
2226 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2227 raw_breakpoint pointer parameter.
2228 <supports_z_point_type>: New method.
2229 * linux-mips-low.c (mips_supports_z_point_type): New function.
2230 (mips_insert_point, mips_remove_point): Adjust to new interface.
2231 Use mips_supports_z_point_type.
2232 (the_low_target): Install mips_supports_z_point_type.
2233 * linux-ppc-low.c (the_low_target): Install NULL as
2234 supports_z_point_type method.
2235 * linux-s390-low.c (the_low_target): Install NULL as
2236 supports_z_point_type method.
2237 * linux-sparc-low.c (the_low_target): Install NULL as
2238 supports_z_point_type method.
2239 * linux-x86-low.c (x86_supports_z_point_type): New function.
2240 (x86_insert_point): Adjust to new insert_point interface. Use
2241 insert_memory_breakpoint. Adjust to new
2242 i386_low_insert_watchpoint interface.
2243 (x86_remove_point): Adjust to remove_point interface. Use
2244 remove_memory_breakpoint. Adjust to new
2245 i386_low_remove_watchpoint interface.
2246 (the_low_target): Install x86_supports_z_point_type.
2247 * lynx-low.c (lynx_target_ops): Install NULL as
2248 supports_z_point_type callback.
2249 * nto-low.c (nto_supports_z_point_type): New.
2250 (nto_insert_point, nto_remove_point): Adjust to new interface.
2251 (nto_target_ops): Install nto_supports_z_point_type.
2252 * mem-break.c: Adjust intro comment.
2253 (struct raw_breakpoint) <raw_type, size>: New fields.
2254 <inserted>: Update comment.
2255 <shlib_disabled>: Delete field.
2256 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2257 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2258 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2259 (raw_bkpt_type_to_target_hw_bp_type): New function.
2260 (find_enabled_raw_code_breakpoint_at): New function.
2261 (find_raw_breakpoint_at): New type and size parameters. Use them.
2262 (insert_memory_breakpoint): New function, based off
2263 set_raw_breakpoint_at.
2264 (remove_memory_breakpoint): New function.
2265 (set_raw_breakpoint_at): Reimplement.
2266 (set_breakpoint): New, based on set_breakpoint_at.
2267 (set_breakpoint_at): Reimplement.
2268 (delete_raw_breakpoint): Go through the_target->remove_point
2269 instead of assuming memory breakpoints.
2270 (find_gdb_breakpoint_at): Delete.
2271 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2272 (find_gdb_breakpoint): New function.
2273 (set_gdb_breakpoint_at): Delete.
2274 (z_type_supported): New function.
2275 (set_gdb_breakpoint_1): New function, loosely based off
2276 set_gdb_breakpoint_at.
2277 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2278 (delete_gdb_breakpoint_at): Delete.
2279 (delete_gdb_breakpoint_1): New function, loosely based off
2280 delete_gdb_breakpoint_at.
2281 (delete_gdb_breakpoint): New function.
2282 (clear_gdb_breakpoint_conditions): Rename to ...
2283 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2284 breakpoint.
2285 (add_condition_to_breakpoint): Make static.
2286 (add_breakpoint_condition): Take a struct breakpoint pointer
2287 instead of an address. Adjust.
2288 (gdb_condition_true_at_breakpoint): Rename to ...
2289 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2290 z_type parameter.
2291 (gdb_condition_true_at_breakpoint): Reimplement.
2292 (add_breakpoint_commands): Take a struct breakpoint pointer
2293 instead of an address. Adjust.
2294 (gdb_no_commands_at_breakpoint): Rename to ...
2295 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2296 parameter. Return true if no breakpoint was found. Change debug
2297 output.
2298 (gdb_no_commands_at_breakpoint): Reimplement.
2299 (run_breakpoint_commands): Rename to ...
2300 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2301 and change return type to boolean.
2302 (run_breakpoint_commands): New function.
2303 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2304 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2305 breakpoint. Go through the_target->remove_point instead of
2306 assuming memory breakpoint.
2307 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2308 software and hardware breakpoints.
2309 (reinsert_raw_breakpoint): Go through the_target->insert_point
2310 instead of assuming memory breakpoint.
2311 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2312 software and hardware breakpoints.
2313 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2314 Check both software and hardware breakpoints.
2315 (validate_inserted_breakpoint): Assert the breakpoint is a
2316 software breakpoint. Set the inserted flag to -1 instead of
2317 setting shlib_disabled.
2318 (delete_disabled_breakpoints): Adjust.
2319 (validate_breakpoints): Only validate software breakpoints.
2320 Adjust to inserted flag change.
2321 (check_mem_read, check_mem_write): Skip breakpoint types other
2322 than software breakpoints. Adjust to inserted flag change.
2323 * mem-break.h (enum raw_bkpt_type): New enum.
2324 (raw_breakpoint, struct process_info): Forward declare.
2325 (Z_packet_to_target_hw_bp_type): Delete declaration.
2326 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2327 (set_gdb_breakpoint, delete_gdb_breakpoint)
2328 (clear_breakpoint_conditions): New declarations.
2329 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2330 (breakpoint_inserted_here): Update comment.
2331 (add_breakpoint_condition, add_breakpoint_commands): Replace
2332 address parameter with a breakpoint pointer parameter.
2333 (gdb_breakpoint_here): Update comment.
2334 (delete_gdb_breakpoint_at): Delete.
2335 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2336 * server.c (process_point_options): Take a struct breakpoint
2337 pointer instead of an address. Adjust.
2338 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2339 delete_gdb_breakpoint.
2340 * spu-low.c (spu_target_ops): Install NULL as
2341 supports_z_point_type method.
2342 * target.h: Include mem-break.h.
2343 (struct target_ops) <prepare_to_access_memory>: Update comment.
2344 <supports_z_point_type>: New field.
2345 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2346 instead of a char. Also take a raw breakpoint pointer.
2347 * win32-arm-low.c (the_low_target): Install NULL as
2348 supports_z_point_type.
2349 * win32-i386-low.c (i386_supports_z_point_type): New function.
2350 (i386_insert_point, i386_remove_point): Adjust to new interface.
2351 (the_low_target): Install i386_supports_z_point_type.
2352 * win32-low.c (win32_supports_z_point_type): New function.
2353 (win32_insert_point, win32_remove_point): Adjust to new interface.
2354 (win32_target_ops): Install win32_supports_z_point_type.
2355 * win32-low.h (struct win32_target_ops):
2356 <supports_z_point_type>: New method.
2357 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2358 instead of a char. Also take a raw breakpoint pointer.
2359
2360 2014-05-20 Pedro Alves <palves@redhat.com>
2361
2362 * mem-break.h: Include break-common.h.
2363 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2364 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2365 (Z_packet_to_target_hw_bp_type): New declaration.
2366 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2367 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2368 (Z_PACKET_ACCESS_WP): Delete macros.
2369 (Z_packet_to_hw_type): Delete function.
2370 * i386-low.h: Don't include break-common.h here.
2371 (Z_packet_to_hw_type): Delete declaration.
2372 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2373 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2374 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2375 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2376 * linux-aarch64-low.c: Don't include break-common.h here.
2377 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2378 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2379 (Z_packet_to_target_hw_bp_type): Delete function.
2380 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2381 function.
2382 (mips_insert_point, mips_remove_point): Use
2383 Z_packet_to_target_hw_bp_type.
2384
2385 2014-05-20 Pedro Alves <palves@redhat.com>
2386
2387 * linux-aarch64-low.c: Include break-common.h.
2388 (enum target_point_type): Delete.
2389 (Z_packet_to_point_type): Rename to ...
2390 (Z_packet_to_target_hw_bp_type): ... this, and return a
2391 target_hw_bp_type instead.
2392 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2393 instead of an enum target_point_type.
2394 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2395 breakpoint type.
2396 (aarch64_dr_state_insert_one_point)
2397 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2398 (aarch64_handle_aligned_watchpoint)
2399 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2400 Take an enum target_hw_bp_type instead of an enum
2401 target_point_type.
2402 (aarch64_supports_z_point_type): New function.
2403 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2404 use Z_packet_to_target_hw_bp_type.
2405
2406 2014-05-20 Joel Brobecker <brobecker@adacore.com>
2407
2408 * configure.ac: Only use -Werror by default when DEVELOPMENT
2409 is true.
2410 * configure: Regenerate.
2411
2412 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2413
2414 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2415 * linux-x86-low.c (X86_64_USER_REGS): New.
2416 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2417
2418 2014-04-28 Yao Qi <yao@codesourcery.com>
2419
2420 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2421 name.
2422
2423 2014-04-25 Pedro Alves <palves@redhat.com>
2424
2425 PR server/16255
2426 * linux-low.c (linux_attach_fail_reason_string): New function.
2427 (linux_attach_lwp): Delete.
2428 (linux_attach_lwp_1): Rename to ...
2429 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2430 argument. Remove "initial" parameter. Return int instead of
2431 void. Don't error or warn here.
2432 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2433 failure to attach to the tgid. Call warning when failing to
2434 attach to an lwp.
2435 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2436 argument. Remove "initial" parameter. Return int instead of
2437 void. Don't error or warn here.
2438 (linux_attach_fail_reason_string): New declaration.
2439 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2440 interface change. Use linux_attach_fail_reason_string.
2441
2442 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
2443 Walfred Tedeschi <walfred.tedeschi@intel.com>
2444
2445 * Makefile.in: Added rules to handle new files
2446 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2447 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2448 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2449 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2450 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2451 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2452 x32-avx512-linux.o.
2453 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2454 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2455 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2456 i386/x32-avx512.xml.
2457 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2458 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2459 i386/x32-avx512-linux.xml.
2460 * i387-fp.c (num_avx512_k_registers): New constant for number
2461 of K registers.
2462 (num_avx512_zmmh_low_registers): New constant for number of
2463 lower ZMM registers (0-15).
2464 (num_avx512_zmmh_high_registers): New constant for number of
2465 higher ZMM registers (16-31).
2466 (num_avx512_ymmh_registers): New contant for number of higher
2467 YMM registers (ymm16-31 added by avx521 on x86_64).
2468 (num_avx512_xmm_registers): New constant for number of higher
2469 XMM registers (xmm16-31 added by AVX512 on x86_64).
2470 (struct i387_xsave): Add space for AVX512 registers.
2471 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2472 Add code to handle AVX512 registers.
2473 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2474 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2475 prototypei from generated file.
2476 (tdesc_amd64_avx512_linux): Likewise.
2477 (init_registers_x32_avx512_linux): Likewise.
2478 (tdesc_x32_avx512_linux): Likewise.
2479 (init_registers_i386_avx512_linux): Likewise.
2480 (tdesc_i386_avx512_linux): Likewise.
2481 (x86_64_regmap): Add AVX512 registers.
2482 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2483 mask.
2484 (initialize_low_arch): Add code to initialize AVX512 registers.
2485
2486 2014-04-23 Pedro Alves <palves@redhat.com>
2487
2488 * mem-break.c (find_gdb_breakpoint_at): Make static.
2489 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2490
2491 2014-04-23 Pedro Alves <palves@redhat.com>
2492
2493 * i386-low.c: Don't include break-common.h here.
2494 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2495 prototype to take target_hw_bp_type as argument instead of a Z
2496 packet char.
2497 * i386-low.h: Include break-common.h here.
2498 (Z_packet_to_hw_type): Declare.
2499 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2500 prototypes.
2501 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2502 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2503 (x86_remove_point): Convert the packet number to a
2504 target_hw_bp_type before calling i386_low_remove_watchpoint.
2505 * win32-i386-low.c (i386_insert_point): Convert the packet number
2506 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2507 (i386_remove_point): Convert the packet number to a
2508 target_hw_bp_type before calling i386_low_remove_watchpoint.
2509
2510 2014-04-23 Pedro Alves <palves@redhat.com>
2511
2512 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2513
2514 2014-04-10 Pedro Alves <palves@redhat.com>
2515
2516 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2517 Check if the condition or command is NULL before checking if the
2518 breakpoint is known. On success, return true.
2519 * mem-break.h (add_breakpoint_condition): Document return.
2520 (add_breakpoint_commands): Add describing comment.
2521 * server.c (skip_to_semicolon): New function.
2522 (process_point_options): Use it.
2523
2524 2014-04-09 Pedro Alves <palves@redhat.com>
2525
2526 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2527 to lwpid_of.
2528
2529 2014-02-27 Pedro Alves <palves@redhat.com>
2530
2531 PR 12702
2532 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2533 macros.
2534 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2535 output.
2536 (last_thread_of_process_p): Take a PID argument instead of a
2537 thread pointer.
2538 (linux_wait_for_lwp): Delete.
2539 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2540 functions.
2541 (linux_low_filter_event): New function, party factored out from
2542 linux_wait_for_event.
2543 (linux_wait_for_event): Rename to ...
2544 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2545 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2546 sigsuspend. Check for zombie leaders.
2547 (linux_wait_for_event): Reimplement as wrapper around
2548 linux_wait_for_event_filtered.
2549 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2550 a normal or signal exit is seen, it's the whole process exiting.
2551 (wait_for_sigstop): No longer a for_each_inferior callback.
2552 Rewrite on top of linux_wait_for_event_filtered.
2553 (stop_all_lwps): Call wait_for_sigstop directly.
2554 * server.c (resume, handle_target_event): Handle
2555 TARGET_WAITKIND_NO_RESUMED.
2556
2557 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2558
2559 * win32-low.c (psapi_get_dll_name,
2560 * win32_CreateToolhelp32Snapshot): Delete.
2561 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2562 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2563 Delete.
2564 (handle_load_dll): Add function description.
2565 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2566
2567 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2568
2569 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2570 Add comment.
2571 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2572 base address when calling win32_add_one_solib.
2573 (handle_load_dll): Delete local variable load_addr.
2574 Remove 0x1000 offset applied to DLL base address when calling
2575 win32_add_one_solib.
2576 (handle_unload_dll): Add comment.
2577
2578 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2579
2580 * win32-low.c (win32_add_all_dlls): Renames
2581 win32_ensure_ntdll_loaded. Rewrite function documentation.
2582 Adjust implementation to always load all DLLs.
2583 Add 0x1000 offset to DLL base address when calling
2584 win32_add_one_solib.
2585 (child_initialization_done): New static global.
2586 (do_initial_child_stuff): Set child_initialization_done to
2587 zero during child initialization, and 1 after. Replace call
2588 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2589 Add comment.
2590 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2591 (handle_unload_dll): Add function documentation.
2592 (get_child_debug_event): Ignore load and unload DLL events
2593 during child initialization.
2594
2595 2014-02-20 Doug Evans <dje@google.com>
2596
2597 Remove global all_lwps.
2598 * inferiors.h (ptid_of): Move here from linux-low.h.
2599 (pid_of, lwpid_of): Ditto.
2600 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2601 parameter is a struct thread_info * now.
2602 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2603 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2604 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2605 directly.
2606 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2607 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2608 * linux-arm-low.c (update_registers_callback): Update, "entry"
2609 parameter is a struct thread_info * now.
2610 Fetch lwpid from current_inferior directly.
2611 (arm_insert_point): Pass &all_threads to find_inferior instead of
2612 &all_lwps.
2613 (arm_remove_point): Ditto.
2614 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2615 (arm_prepare_to_resume): Fetch pid from thread.
2616 (arm_read_description): Fetch lwpid from current_inferior directly.
2617 * linux-low.c (all_lwps): Delete.
2618 (delete_lwp): Delete call to remove_inferior.
2619 (handle_extended_wait): Fetch lwpid from thread.
2620 (add_lwp): Don't set lwp->entry.id. Remove call to
2621 add_inferior_to_list.
2622 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2623 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2624 (kill_one_lwp_callback): Ditto.
2625 (linux_kill): Don't dereference NULL pointer.
2626 Fetch ptid,lwpid from thread.
2627 (get_detach_signal): Fetch ptid from thread.
2628 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2629 Simplify call to regcache_invalidate_thread.
2630 (delete_lwp_callback): Update, "entry" parameter is a
2631 struct thread_info * now. Fetch pid from thread.
2632 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2633 (status_pending_p_callback): Update, "entry" parameter is a
2634 struct thread_info * now. Fetch ptid from thread.
2635 (find_lwp_pid): Update, "entry" parameter is a
2636 struct thread_info * now.
2637 (linux_wait_for_lwp): Fetch pid from thread.
2638 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2639 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2640 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2641 (dequeue_one_deferred_signal): Ditto.
2642 (cancel_breakpoint): Fetch ptid from current_inferior.
2643 (linux_wait_for_event): Pass &all_threads to find_inferior,
2644 not &all_lwps. Fetch ptid, lwpid from thread.
2645 (count_events_callback): Update, "entry" parameter is a
2646 struct thread_info * now.
2647 (select_singlestep_lwp_callback): Ditto.
2648 (select_event_lwp_callback): Ditto.
2649 (cancel_breakpoints_callback): Ditto.
2650 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2651 not &all_lwps.
2652 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2653 (unsuspend_one_lwp): Update, "entry" parameter is a
2654 struct thread_info * now.
2655 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2656 not &all_lwps.
2657 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2658 Fetch lwpid from thread, not lwp.
2659 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2660 Pass &all_threads to find_inferior, not &all_lwps.
2661 (send_sigstop): Fetch lwpid from thread, not lwp.
2662 (send_sigstop_callback): Update, "entry" parameter is a
2663 struct thread_info * now.
2664 (suspend_and_send_sigstop_callback): Ditto.
2665 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2666 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2667 struct thread_info * now.
2668 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2669 from thread, lwp.
2670 (lwp_running): Update, "entry" parameter is a
2671 struct thread_info * now.
2672 (stop_all_lwps): Fetch ptid from thread.
2673 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2674 (linux_resume_one_lwp): Fetch lwpid from thread.
2675 (linux_set_resume_request): Update, "entry" parameter is a
2676 struct thread_info * now. Fetch pid, lwpid from thread.
2677 (resume_status_pending_p): Update, "entry" parameter is a
2678 struct thread_info * now.
2679 (need_step_over_p): Ditto. Fetch lwpid from thread.
2680 (start_step_over): Fetch lwpid from thread.
2681 (linux_resume_one_thread): Update, "entry" parameter is a
2682 struct thread_info * now. Fetch lwpid from thread.
2683 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2684 (proceed_one_lwp): Update, "entry" parameter is a
2685 struct thread_info * now. Fetch lwpid from thread.
2686 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2687 struct thread_info * now.
2688 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2689 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2690 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2691 directly.
2692 (regsets_store_inferior_registers): Ditto.
2693 (fetch_register, store_register): Ditto.
2694 (linux_read_memory, linux_write_memory): Ditto.
2695 (linux_request_interrupt): Ditto.
2696 (linux_read_auxv): Ditto.
2697 (linux_xfer_siginfo): Ditto.
2698 (linux_qxfer_spu): Ditto.
2699 (linux_qxfer_libraries_svr4): Ditto.
2700 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2701 moved to inferiors.h.
2702 (get_lwp): Delete.
2703 (get_thread_lwp): Update.
2704 (struct lwp_info): Delete member "entry". Simplify comment for
2705 member "thread".
2706 (all_lwps): Delete.
2707 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2708 current_inferior directly.
2709 (update_watch_registers_callback): Update, "entry" parameter is a
2710 struct thread_info * now. Fetch pid from thread.
2711 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2712 (mips_insert_point): Fetch lwpid from current_inferior.
2713 Pass &all_threads to find_inferior, not &all_lwps.
2714 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2715 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2716 directly.
2717 (mips_stopped_data_address): Ditto.
2718 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2719 directly.
2720 * linux-tile-low.c (tile_arch_setup): Ditto.
2721 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2722 (update_debug_registers_callback): Update, "entry" parameter is a
2723 struct thread_info * now. Fetch pid from thread.
2724 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2725 Pass &all_threads to find_inferior, not &all_lwps.
2726 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2727 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2728 Pass &all_threads to find_inferior, not &all_lwps.
2729 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2730 (i386_dr_low_get_status): Ditto.
2731 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2732 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2733 (x86_linux_read_description): Ditto.
2734 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2735
2736 2014-02-20 Doug Evans <dje@google.com>
2737
2738 * inferiors.c (get_first_inferior): Fix buglet.
2739
2740 2014-02-19 Doug Evans <dje@google.com>
2741
2742 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2743 * inferiors.c (add_thread): Change result type to struct thread_info *.
2744 All callers updated.
2745 (add_lwp): Call add_thread here instead of in callers.
2746 All callers updated.
2747 * linux-low.h (get_lwp_thread): Rewrite.
2748 (struct lwp_info): New member "thread".
2749
2750 2014-02-19 Doug Evans <dje@google.com>
2751
2752 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2753 All callers updated.
2754
2755 2014-02-19 Doug Evans <dje@google.com>
2756
2757 * inferiors.c (add_thread): Fix whitespace.
2758
2759 2014-02-19 Doug Evans <dje@google.com>
2760
2761 * dll.c (clear_dlls): Replace accessing list implemention details
2762 with API function.
2763 * gdbthread.h (get_first_thread): Declare.
2764 * inferiors.c (for_each_inferior_with_data): New function.
2765 (get_first_thread): New function.
2766 (find_thread_ptid): Simplify.
2767 (get_first_inferior): New function.
2768 (clear_list): Delete.
2769 (one_inferior_p): New function.
2770 (clear_inferior_list): New function.
2771 (clear_inferiors): Update.
2772 * inferiors.h (for_each_inferior_with_data): Declare.
2773 (clear_inferior_list): Declare.
2774 (one_inferior_p): Declare.
2775 (get_first_inferior): Declare.
2776 * linux-low.c (linux_wait_for_event): Replace accessing list
2777 implemention details with API function.
2778 * server.c (target_running): Ditto.
2779 (accumulate_file_name_length): New function.
2780 (emit_dll_description): New function.
2781 (handle_qxfer_libraries): Replace accessing list implemention
2782 details with API function.
2783 (handle_qxfer_threads_worker): New function.
2784 (handle_qxfer_threads_proper): Replace accessing list implemention
2785 details with API function.
2786 (handle_query): Ditto.
2787 (visit_actioned_threads_callback_ftype): New typedef.
2788 (visit_actioned_threads_data): New struct.
2789 (visit_actioned_threads): Rewrite to be find_inferior callback.
2790 (resume): Call find_inferior.
2791 (handle_status): Replace accessing list implemention
2792 details with API function.
2793 (process_serial_event): Replace accessing list implemention details
2794 with API function.
2795 * target.c (set_desired_inferior): Replace accessing list implemention
2796 details with API function.
2797 * tracepoint.c (same_process_p): New function.
2798 (gdb_agent_about_to_close): Replace accessing list implemention
2799 details with API function.
2800 * win32-low.c (child_delete_thread): Replace accessing list
2801 implemention details with API function.
2802 (match_dll_by_basename): New function.
2803 (dll_is_loaded_by_basename): New function.
2804 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2805 details call to dll_is_loaded_by_basename.
2806
2807 2014-02-19 Doug Evans <dje@google.com>
2808
2809 * dll.h (struct dll_info): Add comment.
2810 * gdbthread.h (struct thread_info): Add comment.
2811 (current_ptid): Simplify.
2812 * inferiors.c (add_process): Update.
2813 (remove_process): Update.
2814 * inferiors.h (struct process_info): Rename member "head" to "entry".
2815 * linux-low.c (delete_lwp): Update.
2816 (add_lwp): Update.
2817 (last_thread_of_process_p): Update.
2818 (kill_one_lwp_callback, linux_kill): Update.
2819 (status_pending_p_callback): Update.
2820 (wait_for_sigstop): Update. Simplify read of ptid.
2821 (start_step_over): Update.
2822 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2823 (get_lwp_thread): Update.
2824 (struct lwp_info): Rename member "head" to "entry".
2825 * regcache.h (inferior_list_entry): Delete.
2826 * server.c (kill_inferior_callback): Update.
2827 (detach_or_kill_inferior_callback): Update.
2828 (print_started_pid): Update.
2829 (print_attached_pid): Update.
2830 (process_serial_event): Simplify read of ptid.
2831 * thread-db.c (thread_db_create_event): Update.
2832 (thread_db_get_tls_address): Update.
2833 * win32-low.c (current_inferior_ptid): Simplify.
2834
2835 2014-02-19 Tom Tromey <tromey@redhat.com>
2836
2837 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2838 argument.
2839 (target_supports_btrace): Update.
2840
2841 2014-02-14 Yao Qi <yao@codesourcery.com>
2842
2843 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2844 (rsp-low-ipa.o): New target.
2845
2846 2014-02-12 Tom Tromey <tromey@redhat.com>
2847
2848 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2849 convert_ascii_to_int.
2850 * regcache.c (registers_to_string): Likewise.
2851 * remote-utils.c (decode_M_packet): Likewise.
2852 * server.c (process_serial_event): Likewise.
2853
2854 2014-02-12 Tom Tromey <tromey@redhat.com>
2855
2856 * server.c (handle_query, handle_v_run): Use hex2bin, not
2857 unhexify.
2858 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2859
2860 2014-02-12 Tom Tromey <tromey@redhat.com>
2861
2862 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2863 convert_int_to_ascii.
2864 * regcache.c (registers_to_string, collect_register_as_string):
2865 Likewise.
2866 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2867 Likewise.
2868 * server.c (process_serial_event): Likewise.
2869 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2870 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2871
2872 2014-02-12 Tom Tromey <tromey@redhat.com>
2873
2874 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2875 bin2hex, not hexify.
2876 * tracepoint.c (cmd_qtstatus): Likewise.
2877
2878 2014-02-12 Tom Tromey <tromey@redhat.com>
2879
2880 * remote-utils.c (monitor_output): Pass explicit length to
2881 hexify.
2882
2883 2014-02-12 Tom Tromey <tromey@redhat.com>
2884
2885 * tracepoint.c: Include rsp-low.h.
2886 * server.c: Include rsp-low.h.
2887 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2888 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2889 declare.
2890 * remote-utils.c: Include rsp-low.h.
2891 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2892 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2893 (convert_int_to_ascii, convert_ascii_to_int): Move to
2894 common/rsp-low.c.
2895 * regcache.c: Include rsp-low.h.
2896 * ax.c: Include rsp-low.h.
2897 * Makefile.in (SFILES): Add common/rsp-low.c.
2898 (OBS): Add rsp-low.o.
2899 (rsp-low.o): New target.
2900
2901 2014-02-12 Tom Tromey <tromey@redhat.com>
2902
2903 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2904 Include print-utils.h.
2905 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2906 (plongest, thirty_two, phex_nz): Remove.
2907 * Makefile.in (SFILES): Add common/print-utils.c.
2908 (OBS): Add print-utils.o.
2909 (print-utils-ipa.o): New target.
2910 (print-utils.o): New target.
2911 (IPA_OBJS): Add print-utils-ipa.o.
2912
2913 2014-02-06 Tom Tromey <tromey@redhat.com>
2914
2915 * Makefile.in (SFILES): Fix indentation.
2916
2917 2014-02-05 Doug Evans <dje@google.com>
2918
2919 * linux-low.c (linux_wait_for_event): Improve comment.
2920 (linux_wait_1): Keep current_inferior in sync with event_child.
2921
2922 2014-01-22 Doug Evans <dje@google.com>
2923
2924 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2925
2926 2014-01-22 Doug Evans <dje@google.com>
2927
2928 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2929 * configure: Regenerate.
2930 * config.in: Regenerate.
2931 * Makefile.in (SFILES): Add debug.c.
2932 (OBS): Add debug.o.
2933 * debug.c: New file.
2934 * debug.h: New file.
2935 * linux-aarch64-low.c (*): Update all debugging printfs to use
2936 debug_printf instead of fprintf.
2937 * linux-arm-low.c (*): Ditto.
2938 * linux-cris-low.c (*): Ditto.
2939 * linux-crisv32-low.c (*): Ditto.
2940 * linux-m32r-low.c (*): Ditto.
2941 * linux-sparc-low.c (*): Ditto.
2942 * linux-x86.c (*): Ditto.
2943 * linux-low.c (*): Ditto.
2944 (linux_wait_1): Add calls to debug_enter, debug_exit.
2945 (linux_wait): Remove redundant debugging printf.
2946 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2947 (linux_resume, unstop_all_lwps): Ditto.
2948 * mem-break.c (*): Update all debugging printfs to use
2949 debug_printf instead of fprintf.
2950 * remote-utils.c (*): Ditto.
2951 * thread-db.c (*): Ditto.
2952 * server.c #include <ctype.h>, "gdb_vecs.h".
2953 (debug_threads): Moved to debug.c.
2954 (*): Update all debugging printfs to use debug_printf instead of
2955 fprintf.
2956 (start_inferior): Replace call to fflush with call to debug_flush.
2957 (monitor_show_help): Mention set debug-format.
2958 (parse_debug_format_options): New function.
2959 (handle_monitor_command): Handle "monitor set debug-format".
2960 (gdbserver_usage): Mention --debug-format.
2961 (main): Parse --debug-format.
2962 * server.h (debug_threads): Declaration moved to debug.h.
2963 #include "debug.h".
2964 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2965 trace_debug_1 that uses debug_printf.
2966 (tracepoint_look_up_symbols): Update all debugging printfs to use
2967 debug_printf instead of fprintf.
2968
2969 2014-01-20 Baruch Siach <baruch@tkos.co.il>
2970
2971 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2972 sys/ptrace.h.
2973
2974 2014-01-17 Pedro Alves <palves@redhat.com>
2975
2976 PR build/16445
2977 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2978 defined after including gdb_proc_service.h.
2979
2980 2014-01-16 Doug Evans <dje@google.com>
2981
2982 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2983 (match_dll): Use it.
2984
2985 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2986
2987 * target.h (target_ops) <read_btrace>: Change parameters and
2988 return type to allow error reporting.
2989 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2990 trace reading errors on.
2991 * linux-low.c (linux_low_read_btrace): Pass trace reading
2992 errors on.
2993 (linux_low_disable_btrace): New.
2994
2995 2014-01-15 Doug Evans <dje@google.com>
2996
2997 * inferiors.c (thread_id_to_gdb_id): Delete.
2998 * inferiors.h (thread_id_to_gdb_id): Delete.
2999
3000 2014-01-13 Eli Zaretskii <eliz@gnu.org>
3001
3002 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3003 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3004 versions.
3005
3006 2014-01-08 Pedro Alves <palves@redhat.com>
3007
3008 * server.c (handle_status): Don't discard previous queued stop
3009 replies or thread's pending status here.
3010 (main) <disconnection>: Do it here instead.
3011
3012 2014-01-08 Pedro Alves <palves@redhat.com>
3013
3014 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3015 * server.c (visit_actioned_threads, handle_pending_status): New
3016 function.
3017 (handle_v_cont): Factor out parts to ...
3018 (resume): ... this new function. If in all-stop, and a thread
3019 being resumed has a pending status, report it without actually
3020 resuming.
3021 (myresume): Adjust to use the new 'resume' function.
3022 (clear_pending_status_callback, set_pending_status_callback)
3023 (find_status_pending_thread_callback): New functions.
3024 (handle_status): Handle the case of multiple threads having
3025 interesting statuses to report. Report threads' real last signal
3026 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3027 with an interesting thread to report the status for, instead of
3028 always reporting the status of the first thread.
3029
3030 2014-01-01 Joel Brobecker <brobecker@adacore.com>
3031
3032 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3033 * gdbreplay.c (gdbreplay_version): Likewise.
3034
3035 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3036
3037 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3038 iov.iov_len with the real length in use.
3039
3040 2013-12-13 Joel Brobecker <brobecker@adacore.com>
3041
3042 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3043 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3044 for all targets that use win32-low.c.
3045 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3046 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3047
3048 2013-12-13 Pedro Alves <palves@redhat.com>
3049
3050 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3051 if equal to TARGET_WAITKIND_LOADED.
3052 * win32-low.c (cached_status): New static global.
3053 (win32_wait): Add declaration.
3054 (do_initial_child_stuff): Flush all initial pending debug events
3055 up to the initial breakpoint.
3056 (win32_wait): If CACHED_STATUS was set, return that instead
3057 of doing a real wait. Remove the code resuming the execution
3058 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3059 during the initial phase. Also remove the code changing
3060 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3061 TARGET_WAITKIND_STOPPED.
3062
3063 2013-12-11 Yao Qi <yao@codesourcery.com>
3064
3065 * notif.c (handle_notif_ack): Return 0 if no notification
3066 matches.
3067
3068 2013-11-20 Doug Evans <dje@google.com>
3069
3070 * linux-low.c (linux_set_resume_request): Fix comment.
3071
3072 2013-11-20 Doug Evans <dje@google.com>
3073
3074 * linux-low.c (resume_status_pending_p): Tweak comment.
3075
3076 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3077
3078 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3079 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3080 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3081 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3082 (srv_amd64_regobj): Add amd64-mpx.o.
3083 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3084 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3085 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3086 * i387-fp.c (num_pl_bnd_register) Added constant.
3087 (num_pl_bnd_cfg_registers) Added constant.
3088 (struct i387_xsave) Added reserved area and MPX fields.
3089 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3090 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3091 function.
3092 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3093 (init_registers_amd64_mpx_linux): Declare new function.
3094 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3095 (x86_64_regmap): Add MPX registers.
3096 (x86_linux_read_description): Add MPX case.
3097 (initialize_low_arch): Initialize MPX targets.
3098
3099 2013-11-18 Tom Tromey <tromey@redhat.com>
3100
3101 * configure: Rebuild.
3102 * configure.ac: Don't check for stdlib.h.
3103 * gdbreplay.c: Unconditionally include stdlib.h.
3104
3105 2013-11-18 Tom Tromey <tromey@redhat.com>
3106
3107 * config.in: Rebuild.
3108 * configure: Rebuild.
3109 * configure.ac: Don't use AC_HEADER_DIRENT.
3110
3111 2013-11-18 Tom Tromey <tromey@redhat.com>
3112
3113 * server.h: Don't check HAVE_STRING_H.
3114 * gdbreplay.c: Don't check HAVE_STRING_H.
3115 * configure: Rebuild.
3116
3117 2013-11-18 Tom Tromey <tromey@redhat.com>
3118
3119 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3120 LIBGNU.
3121
3122 2013-11-08 Tom Tromey <tromey@redhat.com>
3123
3124 * configure, config.in: Rebuild.
3125 * configure.ac: Remove unused configury.
3126
3127 2013-11-08 Tom Tromey <tromey@redhat.com>
3128
3129 * acinclude.m4: Include common.m4, codeset.m4.
3130 * configure, config.in: Rebuild.
3131 * configure.ac: Use GDB_AC_COMMON.
3132
3133 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3134
3135 * linux-s390-low.c (HWCAP_S390_TE): New define.
3136 (s390_arch_setup): Consider the TE field in the HWCAP for
3137 determining 'have_regset_tdb'.
3138
3139 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3140
3141 PR gdb/16014
3142 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3143 call to sizeof.
3144
3145 2013-10-02 Pedro Alves <palves@redhat.com>
3146
3147 * server.c (process_serial_event): Don't output "GDBserver
3148 exiting" if GDB is connected through stdio.
3149 * target.c (mywait): Likewise, be silent if GDB is connected
3150 through stdio.
3151
3152 2013-10-01 Joel Brobecker <brobecker@adacore.com>
3153
3154 * lynx-low.c (lynx_add_threads_after_attach): New function.
3155 (lynx_attach): Remove call to add_thread. Add call to
3156 lynx_add_threads_after_attach instead.
3157
3158 2013-09-28 Mike Frysinger <vapier@gentoo.org>
3159
3160 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3161 * config.in, configure: Regenerated.
3162
3163 2013-09-18 Yao Qi <yao@codesourcery.com>
3164
3165 PR server/15959
3166 * server.c (start_inferior): Clear 'resume_info'.
3167
3168 2013-09-16 Jiong Wang <jiwang@tilera.com>
3169
3170 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3171 for each register.
3172
3173 2013-09-16 Jiong Wang <jiwang@tilera.com>
3174
3175 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3176 linux-tile-low.o to srv_tgtobj.
3177
3178 2013-09-16 Will Newton <will.newton@linaro.org>
3179
3180 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3181 out regs.
3182
3183 2013-09-06 Pedro Alves <palves@redhat.com>
3184
3185 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3186 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3187 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3188 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3189 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3190 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3191
3192 2013-09-06 Pedro Alves <palves@redhat.com>
3193
3194 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3195 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3196
3197 2013-09-06 Pedro Alves <palves@redhat.com>
3198
3199 * linux-amd64-ipa.c: Include tracepoint.h.
3200 * linux-i386-ipa.c: Include tracepoint.h.
3201
3202 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3203
3204 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3205 (ps_get_thread_area): New function.
3206
3207 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3208
3209 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3210 (initialize_low_arch): Call init_registers_crisv32 rather than
3211 init_register_crisv32.
3212
3213 2013-09-05 Pedro Alves <palves@redhat.com>
3214
3215 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3216 to ...
3217 * hostio.h: ... this new file.
3218 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3219 win32-low.c: Include hostio.h.
3220
3221 2013-09-05 Pedro Alves <palves@redhat.com>
3222
3223 * server.h (gdb_client_data, handler_func, callback_handler_func)
3224 (delete_file_handler, add_file_handler, append_callback_event)
3225 (delete_callback_event, start_event_loop, initialize_event_loop):
3226 Move to event-loop.h and include it.
3227 * event-loop.h: New file.
3228
3229 2013-09-05 Pedro Alves <palves@redhat.com>
3230
3231 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3232 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3233 (loaded_dll, unloaded_dll): Move to ...
3234 * dll.h: ... this new file.
3235 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3236
3237 2013-09-05 Pedro Alves <palves@redhat.com>
3238
3239 * server.h (current_process, get_thread_process, all_processes)
3240 (add_inferior_to_list, for_each_inferior, current_inferior)
3241 (remove_inferior, add_process, remove_process, find_process_pid)
3242 (have_started_inferiors_p, have_attached_inferiors_p)
3243 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3244 (clear_inferiors, find_inferior, find_inferior_id)
3245 (inferior_target_data, set_inferior_target_data)
3246 (inferior_regcache_data, set_inferior_regcache_data): Move to
3247 inferiors.h, and include it.
3248 * inferiors.h: New file.
3249
3250 2013-09-05 Pedro Alves <palves@redhat.com>
3251
3252 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3253 Move ...
3254 * ax.h: ... here.
3255
3256 2013-09-05 Pedro Alves <palves@redhat.com>
3257
3258 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3259 tracepoint.h.
3260 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3261 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3262 (handle_tracepoint_general_set, handle_tracepoint_query)
3263 (tracepoint_finished_step, tracepoint_was_hit)
3264 (release_while_stepping_state_list, current_traceframe)
3265 (in_readonly_region, traceframe_read_mem)
3266 (fetch_traceframe_registers, traceframe_read_sdata)
3267 (traceframe_read_info, struct fast_tpoint_collect_status)
3268 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3269 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3270 (supply_fast_tracepoint_registers)
3271 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3272 (ipa_tdesc, claim_trampoline_space)
3273 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3274 (agent_mem_read, agent_get_trace_state_variable_value)
3275 (agent_set_trace_state_variable_value, agent_tsv_read)
3276 (agent_mem_read_string, get_raw_reg_func_addr)
3277 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3278 * tracepoint.h: ... this new file.
3279
3280 2013-09-05 Pedro Alves <palves@redhat.com>
3281
3282 * server.h (perror_with_name, error, fatal, warning, paddress)
3283 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3284 include it.
3285 * utils.h: New file.
3286
3287 2013-09-05 Pedro Alves <palves@redhat.com>
3288
3289 * server.h (remote_debug, noack_mode, transport_is_reliable)
3290 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3291 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3292 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3293 (write_enn, initialize_async_io, enable_async_io)
3294 (disable_async_io, check_remote_input_interrupt_request)
3295 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3296 (dead_thread_notify, prepare_resume_reply)
3297 (decode_address_to_semicolon, decode_address, decode_m_packet)
3298 (decode_M_packet, decode_X_packet, decode_xfer_write)
3299 (decode_search_memory_packet, unhexify, hexify)
3300 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3301 (look_up_one_symbol, relocate_instruction)
3302 (monitor_output): Move to remote-utils.h, and include it.
3303 * remote-utils.h: New file.
3304
3305 2013-09-05 Pedro Alves <palves@redhat.com>
3306
3307 * server.h (_): Delete.
3308
3309 2013-09-02 Pedro Alves <palves@redhat.com>
3310
3311 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3312 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3313 allocated.
3314 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3315
3316 2013-09-02 Pierre Muller <muller@sourceware.org>
3317
3318 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3319 or WriteProcessMemory complete successfully and handle
3320 ERROR_PARTIAL_COPY error.
3321
3322 2013-09-02 Pedro Alves <palves@redhat.com>
3323
3324 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3325 error instead of EIO.
3326
3327 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3328
3329 PR server/15604
3330 * linux-low.c: Include filestuff.h.
3331 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3332 * lynx-low.c: Include filestuff.h.
3333 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3334 * server.c: Include filestuff.h.
3335 (main): Call notice_open_fds.
3336 * spu-low.c: Include filestuff.h.
3337 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3338
3339 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
3340
3341 * Makefile.in: Explain why ../target and ../nat are not
3342 listed as include file search paths.
3343 (linux-waitpid.o): New object file rule.
3344 * configure.srv (srv_native_linux_obj): New variable.
3345 Replace all occurrences of linux native object files with
3346 $srv_native_linux_obj.
3347 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3348 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3349 (linux_enable_event_reporting): Remove declaration.
3350 (my_waitpid): Moved to common/linux-waitpid.c.
3351 (linux_wait_for_event): Pass ptid when calling
3352 linux_enable_event_reporting.
3353 (linux_supports_tracefork_flag): Remove.
3354 (linux_enable_event_reporting): Likewise.
3355 (linux_tracefork_grandchild): Remove.
3356 (STACK_SIZE): Moved to common/linux-ptrace.c.
3357 (linux_tracefork_child): Remove.
3358 (linux_test_for_tracefork): Remove.
3359 (linux_look_up_symbols): Call linux_supports_traceclone.
3360 (initialize_low): Remove call to linux_test_for_tracefork.
3361 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3362 common/linux-ptrace.h.
3363 (PTRACE_TYPE_ARG4): Likewise.
3364 Include linux-ptrace.h.
3365
3366 2013-08-21 Pedro Alves <palves@redhat.com>
3367
3368 * config.in: Renegerate.
3369
3370 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
3371
3372 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3373 (SFILES): Remove $(srcdir)/common/target-common.c and
3374 add $(srcdir)/target/waitstatus.c.
3375 (OBS): Remove target-common.o and add waitstatus.o.
3376 (server_h): Remove $(srcdir)/../common/target-common.h and
3377 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3378 and $(srcdir)/../target/waitstatus.h.
3379 (target-common.o): Remove.
3380 (waitstatus.o): New target object file.
3381 * target.h: Do not include target-common.h and
3382 include target/resume.h, target/wait.h and
3383 target/waitstatus.h.
3384
3385 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
3386
3387 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3388 to PTRACE_TYPE_ARG3.
3389 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3390 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3391 PTRACE_TYPE_ARG4.
3392 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3393 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3394
3395 2013-07-27 Jie Zhang <jie@codesourcery.com>
3396 Daniel Jacobowitz <dan@codesourcery.com>
3397 Yao Qi <yao@codesourcery.com>
3398
3399 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3400 (mips-linux-watch.o): New rule.
3401 (mips_linux_watch_h): New variable.
3402 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3403 srv_tgtobj.
3404 * linux-mips-low.c: Include mips-linux-watch.h.
3405 (struct arch_process_info, struct arch_lwp_info): New.
3406 (update_watch_registers_callback): New function.
3407 (mips_linux_new_process, mips_linux_new_thread) New functions.
3408 (mips_linux_prepare_to_resume, mips_insert_point): New
3409 functions.
3410 (mips_remove_point, mips_stopped_by_watchpoint): New
3411 functions.
3412 (rsp_bp_type_to_target_hw_bp_type): New function.
3413 (mips_stopped_data_address): New function.
3414 (the_low_target): Add watchpoint support functions.
3415
3416 2013-07-27 Yao Qi <yao@codesourcery.com>
3417
3418 * i386-low.c: Include break-common.h.
3419 (enum target_hw_bp_type): Remove.
3420
3421 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
3422
3423 * Makefile.in (SFILES): /common/target-common.c.
3424 (OBS): Add target-common.o.
3425 (server_h): Add $(srcdir)/../common/target-common.h.
3426 (target-common.o): New target.
3427 * server.c (queue_stop_reply_callback): Free
3428 status string after use.
3429 * target.c (target_waitstatus_to_string): Remove.
3430 * target.h: Include target-common.h.
3431 (resume_kind): Likewise.
3432 (target_waitkind): Likewise.
3433 (target_waitstatus): Likewise.
3434 (TARGET_WNOHANG): Likewise.
3435
3436 2013-07-04 Yao Qi <yao@codesourcery.com>
3437
3438 * Makefile.in (host_alias): Use @host_noncanonical@.
3439 (target_alias): Use @target_noncanonical@.
3440 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3441 ACX_NONCANONICAL_HOST.
3442 * configure: Regenerated.
3443
3444 Revert:
3445 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3446
3447 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3448 * configure: Rebuild.
3449 * Makefile.in (version_host, version_target): Get from configure.
3450 (version.c): Use $(version_host) and $(version_target).
3451
3452 2013-07-03 Pedro Alves <palves@redhat.com>
3453
3454 * Makefile.in (config.status): Depend on development.sh.
3455 * acinclude.m4: Include libmcheck.m4.
3456 * configure: Regenerate.
3457
3458 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3459
3460 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3461 attribute inside the parentheses.
3462 (winapi_DebugSetProcessKillOnExit): Ditto.
3463 (winapi_DebugBreakProcess): Ditto.
3464 (winapi_GenerateConsoleCtrlEvent): Ditto.
3465
3466 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3467
3468 * notif.h (notif_event): Add a dummy member to avoid compiler
3469 errors.
3470
3471 2013-07-01 Pedro Alves <palves@redhat.com>
3472
3473 * hostio.c (HOSTIO_PATH_MAX): Define.
3474 (require_filename, handle_open, handle_unlink, handle_readlink):
3475 Use it.
3476
3477 2013-07-01 Pedro Alves <palves@redhat.com>
3478
3479 * server.h: Include "pathmax.h".
3480 * linux-low.c: Don't include sys/param.h.
3481 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3482 MAXPATHLEN.
3483 * win32-low.c: Don't include sys/param.h.
3484 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3485
3486 2013-07-01 Pedro Alves <palves@redhat.com>
3487
3488 * event-loop.c: Don't check HAVE_UNISTD_H before including
3489 <unistd.h>.
3490 * gdbreplay.c: Likewise.
3491 * remote-utils.c: Likewise.
3492 * server.c: Likewise.
3493 * configure.ac: Don't check for unistd.h.
3494 * configure: Regenerate.
3495
3496 2013-06-28 Tom Tromey <tromey@redhat.com>
3497
3498 * Makefile.in (version.c): Use version.in, not
3499 common/version.in.
3500
3501 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3502
3503 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3504 * configure: Rebuild.
3505 * Makefile.in (version_host, version_target): Get from configure.
3506 (version.c): Use $(version_host) and $(version_target).
3507
3508 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3509
3510 Fix trace-status to output user name without trailing colon.
3511 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3512
3513 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3514
3515 Fix trace-status to output proper start-time and stop-time.
3516 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3517 output start time and stop time in hex as gdb expects.
3518
3519 2013-06-26 Pedro Alves <pedro@codesourcery.com>
3520
3521 * tracepoint.c (build_traceframe_info_xml): Output trace state
3522 variables present in the trace buffer.
3523
3524 2013-06-24 Tom Tromey <tromey@redhat.com>
3525
3526 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3527 create-version.sh.
3528 (version.o): Remove.
3529 * gdbreplay.c: Include version.h.
3530 (version, host_name): Don't declare.
3531 * server.h: Include version.h.
3532 (version, host_name): Don't declare.
3533
3534 2013-06-12 Pedro Alves <palves@redhat.com>
3535
3536 * linux-x86-low.c (linux_is_elf64): Delete global.
3537 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3538 with local linux_pid_exe_is_elf_64_file use.
3539
3540 2013-06-11 Pedro Alves <palves@redhat.com>
3541
3542 * linux-low.c (regset_disabled, disable_regset): New functions.
3543 (regsets_fetch_inferior_registers)
3544 (regsets_store_inferior_registers): Use them.
3545 (initialize_regsets_info); Don't allocate the disabled_regsets
3546 array here.
3547 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3548 comment.
3549
3550 2013-06-11 Pedro Alves <palves@redhat.com>
3551
3552 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3553 xmalloc.
3554
3555 2013-06-11 Pedro Alves <palves@redhat.com>
3556
3557 * linux-x86-low.c (initialize_low_arch): Call
3558 init_registers_x32_avx_linux.
3559
3560 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3561
3562 Fix compatibility with Android Bionic.
3563 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3564 it is not empty.
3565
3566 2013-06-07 Pedro Alves <palves@redhat.com>
3567
3568 PR server/14823
3569 * Makefile.in (OBS): Add tdesc.o.
3570 (IPA_OBJS): Add tdesc-ipa.o.
3571 (tdesc-ipa.o): New rule.
3572 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3573 interface.
3574 * linux-low.c (new_inferior): Delete.
3575 (disabled_regsets, num_regsets): Delete.
3576 (linux_add_process): Adjust to set the new per-process
3577 new_inferior flag.
3578 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3579 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3580 was a stop. When calling arch_setup, switch the current inferior
3581 to the thread that got an event.
3582 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3583 (regsets_fetch_inferior_registers)
3584 (regsets_store_inferior_registers): New regsets_info parameter.
3585 Adjust to use it.
3586 (linux_register_in_regsets): New regs_info parameter. Adjust to
3587 use it.
3588 (register_addr, fetch_register, store_register): New usrregs_info
3589 parameter. Adjust to use it.
3590 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3591 parameter regs_info. Adjust to use it.
3592 (linux_fetch_registers): Get the current inferior's regs_info, and
3593 adjust to use it.
3594 (linux_store_registers): Ditto.
3595 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3596 (initialize_low): Don't initialize the target_regsets here. Call
3597 initialize_low_arch.
3598 * linux-low.h (target_regsets): Delete declaration.
3599 (struct regsets_info): New.
3600 (struct usrregs_info): New.
3601 (struct regs_info): New.
3602 (struct process_info_private) <new_inferior>: New field.
3603 (struct linux_target_ops): Delete the num_regs, regmap, and
3604 regset_bitmap fields. New field regs_info.
3605 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3606 * i387-fp.c (num_xmm_registers): Delete.
3607 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3608 calls to new interface.
3609 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3610 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3611 Infer the number of xmm registers from the regcache's target
3612 description.
3613 * i387-fp.h (num_xmm_registers): Delete.
3614 * inferiors.c (add_thread): Don't install the thread's regcache
3615 here.
3616 * proc-service.c (gregset_info): Fetch the current inferior's
3617 regs_info. Adjust to use it.
3618 * regcache.c: Include tdesc.h.
3619 (register_bytes, reg_defs, num_registers)
3620 (gdbserver_expedite_regs): Delete.
3621 (get_thread_regcache): If the thread doesn't have a regcache yet,
3622 create one, instead of aborting gdbserver.
3623 (regcache_invalidate_one): Rename to ...
3624 (regcache_invalidate_thread): ... this.
3625 (regcache_invalidate_one): New.
3626 (regcache_invalidate): Only invalidate registers of the current
3627 process.
3628 (init_register_cache): Add target_desc parameter, and use it.
3629 (new_register_cache): Ditto. Assert the target description has a
3630 non zero registers_size.
3631 (regcache_cpy): Add assertions. Adjust.
3632 (realloc_register_cache, set_register_cache): Delete.
3633 (registers_to_string, registers_from_string): Adjust.
3634 (find_register_by_name, find_regno, find_register_by_number)
3635 (register_cache_size): Add target_desc parameter, and use it.
3636 (free_register_cache_thread, free_register_cache_thread_one)
3637 (regcache_release, register_cache_size): New.
3638 (register_size): Add target_desc parameter, and use it.
3639 (register_data, supply_register, supply_register_zeroed)
3640 (supply_regblock, supply_register_by_name, collect_register)
3641 (collect_register_as_string, collect_register_by_name): Adjust.
3642 * regcache.h (struct target_desc): Forward declare.
3643 (struct regcache) <tdesc>: New field.
3644 (init_register_cache, new_register_cache): Add target_desc
3645 parameter.
3646 (regcache_invalidate_thread): Declare.
3647 (regcache_invalidate_one): Delete declaration.
3648 (regcache_release): Declare.
3649 (find_register_by_number, register_cache_size, register_size)
3650 (find_regno): Add target_desc parameter.
3651 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3652 declarations.
3653 * remote-utils.c: Include tdesc.h.
3654 (outreg, prepare_resume_reply): Adjust.
3655 * server.c: Include tdesc.h.
3656 (gdbserver_xmltarget): Delete declaration.
3657 (get_features_xml, process_serial_event): Adjust.
3658 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3659 declare.
3660 (struct process_info) <tdesc>: New field.
3661 (ipa_tdesc): Declare.
3662 * tdesc.c: New file.
3663 * tdesc.h: New file.
3664 * tracepoint.c: Include tdesc.h.
3665 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3666 (get_context_regcache): Adjust to pass ipa_tdesc down.
3667 (do_action_at_tracepoint): Adjust to get the register cache size
3668 from the context regcache's description.
3669 (traceframe_walk_blocks): Adjust to get the register cache size
3670 from the current trace frame's description.
3671 (traceframe_get_pc): Adjust to get current trace frame's
3672 description and pass it down.
3673 (gdb_collect): Adjust to get the register cache size from the
3674 IPA's description.
3675 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3676 (gdbserver_xmltarget): Delete.
3677 (initialize_low_tracepoint): Set the ipa's target description.
3678 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3679 (initialize_low_tracepoint): Set the ipa's target description.
3680 * linux-x86-low.c: Include tdesc.h.
3681 [__x86_64__] (is_64bit_tdesc): New.
3682 (ps_get_thread_area, x86_get_thread_area): Use it.
3683 (i386_cannot_store_register): Rename to ...
3684 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3685 (i386_cannot_fetch_register): Rename to ...
3686 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3687 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3688 to new interface.
3689 (target_regsets): Rename to ...
3690 (x86_regsets): ... this.
3691 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3692 interface.
3693 (x86_siginfo_fixup): Use is_64bit_tdesc.
3694 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3695 (tdesc_x32_avx_linux, tdesc_x32_linux)
3696 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3697 Declare.
3698 (x86_linux_update_xmltarget): Delete.
3699 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3700 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3701 (AMD64_LINUX_USER64_CS): New.
3702 (x86_linux_read_description): New, based on
3703 x86_linux_update_xmltarget.
3704 (same_process_callback): New.
3705 (x86_arch_setup_process_callback): New.
3706 (x86_linux_update_xmltarget): New.
3707 (x86_regsets_info): New.
3708 (amd64_linux_regs_info): New.
3709 (i386_linux_usrregs_info): New.
3710 (i386_linux_regs_info): New.
3711 (x86_linux_regs_info): New.
3712 (x86_arch_setup): Reimplement.
3713 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3714 (x86_emit_ops): Ditto.
3715 (the_low_target): Adjust. Install x86_linux_regs_info,
3716 x86_cannot_fetch_register, and x86_cannot_store_register.
3717 (initialize_low_arch): New.
3718 * linux-ia64-low.c (tdesc_ia64): Declare.
3719 (ia64_fetch_register): Adjust.
3720 (ia64_usrregs_info, regs_info): New globals.
3721 (ia64_regs_info): New function.
3722 (the_low_target): Adjust.
3723 (initialize_low_arch): New function.
3724 * linux-sparc-low.c (tdesc_sparc64): Declare.
3725 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3726 Adjust.
3727 (sparc_arch_setup): New function.
3728 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3729 (the_low_target): Adjust.
3730 (initialize_low_arch): New function.
3731 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3732 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3733 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3734 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3735 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3736 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3737 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3738 (tdesc_powerpc_isa205_vsx64l): Declare.
3739 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3740 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3741 (ppc_set_pc, ppc_get_hwcap): Adjust.
3742 (ppc_usrregs_info): Forward declare.
3743 (!__powerpc64__) ppc_regmap_adjusted: New global.
3744 (ppc_arch_setup): Adjust to the current process'es target
3745 description.
3746 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3747 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3748 (ppc_store_evrregset): Adjust.
3749 (target_regsets): Rename to ...
3750 (ppc_regsets): ... this, and make static.
3751 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3752 (ppc_regs_info): New function.
3753 (the_low_target): Adjust.
3754 (initialize_low_arch): New function.
3755 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3756 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3757 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3758 (tdesc_s390x_linux64v2): Declare.
3759 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3760 (s390_fill_gregset, s390_store_last_break): Adjust.
3761 (target_regsets): Rename to ...
3762 (s390_regsets): ... this, and make static.
3763 (s390_get_pc, s390_set_pc): Adjust.
3764 (s390_get_hwcap): New target_desc parameter, and use it.
3765 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3766 (s390_arch_setup): Adjust to set the current process'es target
3767 description. Don't adjust the regmap.
3768 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3769 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3770 (regs_info_3264): New globals.
3771 (s390_regs_info): New function.
3772 (the_low_target): Adjust.
3773 (initialize_low_arch): New function.
3774 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3775 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3776 [__mips64] (init_registers_mips_linux)
3777 (init_registers_mips_dsp_linux): Delete defines.
3778 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3779 (have_dsp): New global.
3780 (mips_read_description): New, based on mips_arch_setup.
3781 (mips_arch_setup): Reimplement.
3782 (get_usrregs_info): New function.
3783 (mips_cannot_fetch_register, mips_cannot_store_register)
3784 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3785 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3786 (target_regsets): Rename to ...
3787 (mips_regsets): ... this, and make static.
3788 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3789 (dsp_regs_info, regs_info): New globals.
3790 (mips_regs_info): New function.
3791 (the_low_target): Adjust.
3792 (initialize_low_arch): New function.
3793 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3794 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3795 Declare.
3796 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3797 (arm_read_description): New, with bits factored from
3798 arm_arch_setup.
3799 (arm_arch_setup): Reimplement.
3800 (target_regsets): Rename to ...
3801 (arm_regsets): ... this, and make static.
3802 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3803 (arm_regs_info): New function.
3804 (the_low_target): Adjust.
3805 (initialize_low_arch): New function.
3806 * linux-m68k-low.c (tdesc_m68k): Declare.
3807 (target_regsets): Rename to ...
3808 (m68k_regsets): ... this, and make static.
3809 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3810 (m68k_regs_info): New function.
3811 (m68k_arch_setup): New function.
3812 (the_low_target): Adjust.
3813 (initialize_low_arch): New function.
3814 * linux-sh-low.c (tdesc_sharch): Declare.
3815 (target_regsets): Rename to ...
3816 (sh_regsets): ... this, and make static.
3817 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3818 (sh_regs_info, sh_arch_setup): New functions.
3819 (the_low_target): Adjust.
3820 (initialize_low_arch): New function.
3821 * linux-bfin-low.c (tdesc_bfin): Declare.
3822 (bfin_arch_setup): New function.
3823 (bfin_usrregs_info, regs_info): New globals.
3824 (bfin_regs_info): New function.
3825 (the_low_target): Adjust.
3826 (initialize_low_arch): New function.
3827 * linux-cris-low.c (tdesc_cris): Declare.
3828 (cris_arch_setup): New function.
3829 (cris_usrregs_info, regs_info): New globals.
3830 (cris_regs_info): New function.
3831 (the_low_target): Adjust.
3832 (initialize_low_arch): New function.
3833 * linux-cris-low.c (tdesc_crisv32): Declare.
3834 (cris_arch_setup): New function.
3835 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3836 (cris_regs_info): New function.
3837 (the_low_target): Adjust.
3838 (initialize_low_arch): New function.
3839 * linux-m32r-low.c (tdesc_m32r): Declare.
3840 (m32r_arch_setup): New function.
3841 (m32r_usrregs_info, regs_info): New globals.
3842 (m32r_regs_info): Adjust.
3843 (initialize_low_arch): New function.
3844 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3845 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3846 (tic6x_usrregs_info): Forward declare.
3847 (tic6x_read_description): New function, based on ...
3848 (tic6x_arch_setup): ... this. Reimplement.
3849 (target_regsets): Rename to ...
3850 (tic6x_regsets): ... this, and make static.
3851 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3852 (tic6x_regs_info): New function.
3853 (the_low_target): Adjust.
3854 (initialize_low_arch): New function.
3855 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3856 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3857 (target_regsets): Rename to ...
3858 (xtensa_regsets): ... this, and make static.
3859 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3860 globals.
3861 (xtensa_arch_setup, xtensa_regs_info): New functions.
3862 (the_low_target): Adjust.
3863 (initialize_low_arch): New function.
3864 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3865 (nios2_arch_setup): Set the current process'es tdesc.
3866 (target_regsets): Rename to ...
3867 (nios2_regsets): ... this.
3868 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3869 (nios2_regs_info): New function.
3870 (the_low_target): Adjust.
3871 (initialize_low_arch): New function.
3872 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3873 (aarch64_arch_setup): Set the current process'es tdesc.
3874 (target_regsets): Rename to ...
3875 (aarch64_regsets): ... this.
3876 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3877 (aarch64_regs_info): New function.
3878 (the_low_target): Adjust.
3879 (initialize_low_arch): New function.
3880 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3881 globals.
3882 (target_regsets): Rename to ...
3883 (tile_regsets): ... this.
3884 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3885 (tile_regs_info): New function.
3886 (tile_arch_setup): Set the current process'es tdesc.
3887 (the_low_target): Adjust.
3888 (initialize_low_arch): New function.
3889 * spu-low.c (tdesc_spu): Declare.
3890 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3891 * win32-arm-low.c (tdesc_arm): Declare.
3892 (arm_arch_setup): New function.
3893 (the_low_target): Install arm_arch_setup instead of
3894 init_registers_arm.
3895 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3896 (init_windows_x86): Rename to ...
3897 (i386_arch_setup): ... this. Set `win32_tdesc'.
3898 (the_low_target): Adjust.
3899 * win32-low.c (win32_tdesc): New global.
3900 (child_add_thread): Don't create the thread cache here.
3901 (do_initial_child_stuff): Set the new process'es tdesc.
3902 * win32-low.h (struct target_desc): Forward declare.
3903 (win32_tdesc): Declare.
3904 * lynx-i386-low.c (tdesc_i386): Declare global.
3905 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3906 * lynx-low.c (lynx_tdesc): New global.
3907 (lynx_add_process): Set the new process'es tdesc.
3908 * lynx-low.h (struct target_desc): Forward declare.
3909 (lynx_tdesc): Declare global.
3910 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3911 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3912 * nto-low.c (nto_tdesc): New global.
3913 (do_attach): Set the new process'es tdesc.
3914 * nto-low.h (struct target_desc): Forward declare.
3915 (nto_tdesc): Declare.
3916 * nto-x86-low.c (tdesc_i386): Declare.
3917 (nto_x86_arch_setup): Set `nto_tdesc'.
3918
3919 2013-06-04 Gary Benson <gbenson@redhat.com>
3920
3921 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3922 to qSupported response when appropriate.
3923 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3924 with nonzero-length annex.
3925 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3926 arguments supplied in annex.
3927
3928 2013-05-31 Doug Evans <dje@google.com>
3929
3930 PR server/15594
3931 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3932 64 bits in 64-cross-32 environment.
3933
3934 2013-05-28 Pedro Alves <palves@redhat.com>
3935
3936 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3937 (aarch64-without-fpu.c): Delete rule.
3938 * configure.srv (aarch64*-*-linux*): Remove references to
3939 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3940 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3941 declaration.
3942
3943 2013-05-24 Pedro Alves <palves@redhat.com>
3944
3945 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3946 instead of strchr/decode_address. Error if the range isn't split
3947 with a ','. Don't assume there's be a ':' in the action.
3948
3949 2013-05-23 Yao Qi <yao@codesourcery.com>
3950 Pedro Alves <palves@redhat.com>
3951
3952 * linux-low.c (lwp_in_step_range): New function.
3953 (linux_wait_1): If the thread was range stepping and stopped
3954 outside the stepping range, report the stop to GDB. Otherwise,
3955 continue stepping. Add range stepping debug output.
3956 (linux_set_resume_request): Copy the step range from the resume
3957 request to the lwp.
3958 (linux_supports_range_stepping): New.
3959 (linux_target_ops) <supports_range_stepping>: Set to
3960 linux_supports_range_stepping.
3961 * linux-low.h (struct linux_target_ops)
3962 <supports_range_stepping>: New field.
3963 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3964 * linux-x86-low.c (x86_supports_range_stepping): New.
3965 (the_low_target) <supports_range_stepping>: Set to
3966 x86_supports_range_stepping.
3967 * server.c (handle_v_cont): Handle 'r' action.
3968 (handle_v_requests): Append ";r" if the target supports range
3969 stepping.
3970 * target.h (struct thread_resume) <step_range_start,
3971 step_range_end>: New fields.
3972 (struct target_ops) <supports_range_stepping>:
3973 New field.
3974 (target_supports_range_stepping): New macro.
3975
3976 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3977
3978 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3979 confusion in comment.
3980
3981 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3982
3983 * lynx-low.c (struct process_info_private): New type.
3984 (lynx_add_process): New function.
3985 (lynx_create_inferior, lynx_attach): Replace calls to
3986 add_process by calls to lynx_add_process.
3987 (lynx_resume): If PTID is null, then try using
3988 current_process()->private->last_wait_event_ptid.
3989 Add comments.
3990 (lynx_clear_inferiors): Delete. The contents of that function
3991 has been inlined in lynx_mourn;
3992 (lynx_wait_1): Save the ptid in the process's private data.
3993 (lynx_mourn): Free the process' private data. Replace call
3994 to lynx_clear_inferiors by call to clear_inferiors.
3995
3996 2013-05-17 Yao Qi <yao@codesourcery.com>
3997
3998 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3999 the right place.
4000
4001 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
4002
4003 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4004 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4005 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4006 PT_TEXT_END_ADDR guards. Update comments.
4007 (linux_target_op) <read_offsets>: Conditionally define to
4008 linux_read_offsets if the target is UCLIBC and if it defines
4009 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4010
4011 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4012 Andrew Jenner <andrew@codesourcery.com>
4013
4014 * Makefile.in (SFILES): Add linux-nios2-low.c.
4015 (clean): Add action to delete nios2-linux.c.
4016 (nios2-linux.c): New rule.
4017 * configure.srv: Add nios2*-*-linux*.
4018 * linux-nios2-low.c: New.
4019
4020 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4021
4022 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4023
4024 2013-04-25 Hui Zhu <hui@codesourcery.com>
4025
4026 PR gdb/15186
4027 * ax.c (ax_printf): Add fflush.
4028
4029 2013-04-22 Tom Tromey <tromey@redhat.com>
4030
4031 * Makefile.in (SFILES): Add filestuff.c.
4032 (OBS): Add filestuff.o.
4033 (filestuff.o): New target.
4034 * config.in, configure: Rebuild.
4035 * configure.ac: Check for fdwalk, pipe2.
4036
4037 2013-04-17 Pedro Alves <palves@redhat.com>
4038
4039 * configure.ac (USE_THREAD_DB): Delete variable.
4040 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4041 Don't AC_SUBST USE_THREAD_DB.
4042 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4043 * config.in, configure: Regenerate.
4044
4045 2013-04-16 Pedro Alves <palves@redhat.com>
4046
4047 * linux-low.h (struct lwp_info) <thread_known>: Move under
4048 the USE_THREAD_DB #ifdef.
4049
4050 2013-04-16 Pedro Alves <palves@redhat.com>
4051
4052 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4053 (linux-low.o): Delete rule.
4054 * linux-low.h: Always include "gdb_thread_db.h" instead of
4055 conditionally including thread_db.h.
4056 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4057 HAVE_THREAD_DB_H.
4058
4059 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4060
4061 * Makefile.in (install-only): Fix make install regression.
4062
4063 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4064
4065 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4066 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4067 installation.
4068 * gdbserver.1: Remove.
4069
4070 2013-03-22 Pedro Alves <palves@redhat.com>
4071
4072 * linux-low.c (handle_extended_wait): Don't call
4073 linux_enable_event_reporting.
4074
4075 2013-03-15 Tony Theodore <tonyt@logyst.com>
4076
4077 PR build/9098:
4078 * Makefile.in (SHELL): Use @SHELL@.
4079
4080 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4081
4082 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4083 compiler warning.
4084
4085 2013-03-13 Joel Brobecker <brobecker@adacore.com>
4086
4087 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4088 Remove extraneous NULL element.
4089
4090 2013-03-13 Yao Qi <yao@codesourcery.com>
4091
4092 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4093 'V' block in trace frame.
4094
4095 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4096
4097 * target.h (struct target_ops): Add btrace ops.
4098 (target_supports_btrace): New macro.
4099 (target_enable_btrace): New macro.
4100 (target_disable_btrace): New macro.
4101 (target_read_btrace): New macro.
4102 * gdbthread.h (struct thread_info): Add btrace field.
4103 * server.c: Include btrace-common.h.
4104 (handle_btrace_general_set): New function.
4105 (handle_btrace_enable): New function.
4106 (handle_btrace_disable): New function.
4107 (handle_general_set): Call handle_btrace_general_set.
4108 (handle_qxfer_btrace): New function.
4109 (struct qxfer qxfer_packets[]): Add btrace entry.
4110 * inferiors.c (remove_thread): Disable btrace.
4111 * linux-low: Include linux-btrace.h.
4112 (linux_low_enable_btrace): New function.
4113 (linux_low_read_btrace): New function.
4114 (linux_target_ops): Add btrace ops.
4115 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4116 Add srv_linux_btrace=yes.
4117 (x86_64-*-linux*): Add linux-btrace.o.
4118 Add srv_linux_btrace=yes.
4119 * configure.ac: Define HAVE_LINUX_BTRACE.
4120 * config.in: Regenerated.
4121 * configure: Regenerated.
4122
4123 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4124
4125 * server.c (handle_qxfer): Preserve error message if -3 is
4126 returned.
4127 (qxfer): Document the -3 return value.
4128
4129 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4130
4131 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4132 (linux_btrace_h): New variable.
4133 (linux-btrace.o): New rule.
4134
4135 2013-03-08 Stan Shebs <stan@codesourcery.com>
4136 Hafiz Abid Qadeer <abidh@codesourcery.com>
4137
4138 * tracepoint.c (trace_buffer_size): New global.
4139 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4140 (init_trace_buffer): Change to one-argument function. Allocate
4141 trace buffer memory.
4142 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4143 handle QTBuffer:size packet.
4144 (cmd_bigqtbuffer_size): New function.
4145 (initialize_tracepoint): Call init_trace_buffer with
4146 DEFAULT_TRACE_BUFFER_SIZE.
4147 * server.c (handle_query): Add QTBuffer:size in the
4148 supported packets.
4149
4150 2013-03-07 Yao Qi <yao@codesourcery.com>
4151
4152 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4153 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4154 of -1.
4155 (cmd_qtsp): Adjust condition. Do post increment.
4156 Set cur_action and cur_step_action back to 0.
4157
4158 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4159
4160 PR server/15236
4161 * linux-low.c (linux_write_memory): Return early success if LEN is
4162 zero.
4163
4164 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
4165
4166 * configure.srv: Add x86_64-*-cygwin* as target.
4167
4168 2013-02-28 Tom Tromey <tromey@redhat.com>
4169
4170 * configure.ac: Invoke AC_SYS_LARGEFILE.
4171 * configure, config.in: Rebuild.
4172
4173 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
4174
4175 * win32-low.c: Throughout, fix format strings and casts of
4176 printf-like functions to avoid type related warnings on all
4177 platforms.
4178 (get_child_debug_event): Print dwDebugEventCode as hex since
4179 that's how it's usually documented.
4180
4181 2013-02-28 Yao Qi <yao@codesourcery.com>
4182
4183 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4184 pulongest.
4185
4186 2013-02-27 Jiong Wang <jiwang@tilera.com>
4187
4188 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4189 (reg-tilegx32.c): New rule.
4190 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4191 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4192 different register info initializer according to elf class.
4193 (init_registers_tilgx32): New function. The tilegx32 register info
4194 initializer.
4195 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4196 (tile_store_gregset): Likewise.
4197
4198 2013-02-27 Yao Qi <yao@codesourcery.com>
4199
4200 * server.c (process_point_options): Print debug message when
4201 debug_threads is true.
4202
4203 2013-02-26 Yao Qi <yao@codesourcery.com>
4204
4205 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4206
4207 2013-02-19 Pedro Alves <palves@redhat.com>
4208 Kai Tietz <ktietz@redhat.com>
4209
4210 PR gdb/15161
4211
4212 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4213 instead of strtoul to extract address from packet.
4214 (process_serial_event) <'z'>: Likewise.
4215
4216 2013-02-18 Yao Qi <yao@codesourcery.com>
4217
4218 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4219
4220 2013-02-14 Pedro Alves <palves@redhat.com>
4221
4222 Plug memory leak.
4223
4224 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4225 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4226
4227 2013-02-14 Pedro Alves <palves@redhat.com>
4228
4229 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4230
4231 2013-02-14 Pedro Alves <palves@redhat.com>
4232
4233 * tracepoint.c (save_string): Delete.
4234 (add_tracepoint_action): Use savestring instead of save_string.
4235
4236 2013-02-12 Pedro Alves <palves@redhat.com>
4237
4238 * linux-xtensa-low.c: Ditto.
4239 * xtensa-xtregs.c: Ditto.
4240
4241 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4242
4243 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4244 thread_db.
4245
4246 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4247
4248 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4249 aarch64_num_wp_regs and aarch64_num_bp_regs to
4250 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4251
4252 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4253
4254 * linux-aarch64-low.c (ps_get_thread_area): Replace
4255 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4256
4257 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4258 Marcus Shawcroft <marcus.shawcroft@arm.com>
4259 Nigel Stephens <nigel.stephens@arm.com>
4260 Yufeng Zhang <yufeng.zhang@arm.com>
4261
4262 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4263 (aarch64.c, aarch64-without-fpu.c): New targets.
4264 * configure.srv (aarch64*-*-linux*): New.
4265 * linux-aarch64-low.c: New file.
4266
4267 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4268
4269 * linux-low.c (handle_extended_wait, linux_create_inferior)
4270 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4271 (dequeue_one_deferred_signal, linux_resume_one_thread)
4272 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4273 (linux_tracefork_grandchild, linux_test_for_tracefork)
4274 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4275 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4276 where the argument is 0.
4277
4278 2013-01-25 Yao Qi <yao@codesourcery.com>
4279
4280 * event-loop.c: Include "queue.h".
4281 (gdb_event_p): New typedef.
4282 (struct gdb_event) <next_event>: Remove.
4283 (event_queue): Change to QUEUE(gdb_event_p).
4284 (async_queue_event): Remove.
4285 (gdb_event_xfree): New.
4286 (initialize_event_loop): New.
4287 (process_event): Use API from QUEUE.
4288 (wait_for_event): Likewise.
4289 * server.c (main): Call initialize_event_loop.
4290 * server.h (initialize_event_loop): Declare.
4291
4292 2013-01-18 Yao Qi <yao@codesourcery.com>
4293
4294 * ax.h (struct eval_agent_expr_context): New.
4295 (gdb_eval_agent_expr): Update declaration.
4296 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4297 TFRAME. Add new argument CTX.
4298 * server.h (struct eval_agent_expr_context): Declare.
4299 (agent_mem_read, agent_tsv_read): Update declaration.
4300 (agent_mem_read_string): Likewise.
4301 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4302 (add_traceframe_block): Add new argument TPOINT.
4303 Increase TPOINT->traceframe_usage.
4304 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4305 eval_tracepoint_agent_expr.
4306 (condition_true_at_tracepoint): Likewise.
4307 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4308 (agent_mem_read_string, agent_tsv_read): Likewise.
4309
4310 2013-01-16 Yao Qi <yao@codesourcery.com>
4311
4312 * linux-low.c (linux_resume_one_lwp): Don't check
4313 'lwp->bp_reinsert != 0'.
4314
4315 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4316 Pedro Alves <palves@redhat.com>
4317
4318 * lynx-low.c (ptrace_request_to_str): Define a temporary
4319 macro and use it to simplify this function's implementation.
4320
4321 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4322
4323 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4324 sets errno.
4325
4326 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4327
4328 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4329
4330 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4331
4332 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4333
4334 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4335
4336 * lynx-low.c (lynx_resume): Use the resume_info parameter
4337 to determine the ptid for the lynx_ptrace call, unless
4338 it is equal to minus_one_ptid, in which case we use the
4339 ptid of the current_inferior.
4340 (lynx_wait_1): After having received a thread create/exit
4341 event, resume the inferior's execution using the signaling
4342 thread's ptid, rather than the old ptid.
4343
4344 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4345
4346 * lynx-low.c (lynx_resume): Delete variable ret.
4347
4348 2013-01-01 Joel Brobecker <brobecker@adacore.com>
4349
4350 * gdbreplay.c (gdbreplay_version): Update copyright year.
4351 * server.c (gdbserver_version): Likewise.
4352
4353 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4354
4355 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4356 new thread.
4357
4358 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4359
4360 * lynx-low.c (ptrace_request_to_str): Add handling for
4361 PTRACE_GETTRACESIG.
4362
4363 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4364
4365 * lynx-low.c (lynx_attach): Delete variable new_process.
4366
4367 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4368
4369 * lynx-low.c (lynx_create_inferior): Delete variable
4370 new_process.
4371
4372 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4373
4374 * lynx-low.c (ptrace_request_to_str): Do not handle
4375 PTRACE_GETTHREADLIST if this macro does not exist.
4376
4377 2012-12-15 Yao Qi <yao@codesourcery.com>
4378
4379 * Makefile.in (OBS): Add notif.o.
4380 * notif.c, notif.h: New.
4381 * server.c: Include "notif.h".
4382 (struct vstop_notif) <next>: Remove.
4383 <base>: New field.
4384 (queue_stop_reply): Update.
4385 (push_event, send_next_stop_reply): Remove.
4386 (discard_queued_stop_replies): Update.
4387 (notif_stop): New variable.
4388 (handle_v_stopped): Remove.
4389 (handle_v_requests): Don't call handle_v_stopped. Call
4390 handle_ack_notif instead.
4391 (queue_stop_reply_callback): Call notif_event_enque instead
4392 of queue_stop_reply.
4393 (handle_status): Don't call send_next_stop_reply, call
4394 notif_write_event instead.
4395 (kill_inferior_callback): Likewise.
4396 (detach_or_kill_inferior_callback): Likewise.
4397 (main): Call initialize_notif.
4398 (process_serial_event): Call QUEUE_is_empty.
4399 (handle_target_event): Call notif_push instead of push event.
4400 * server.h (push_event): Remove declaration.
4401
4402 2012-12-10 Tom Tromey <tromey@redhat.com>
4403
4404 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4405 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4406 macros.
4407 (.c.o): Rewrite.
4408 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4409 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4410 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4411 (amd64-linux-ipa.o, ax.o): Rewrite.
4412 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4413 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4414 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4415 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4416 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4417 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4418 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4419 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4420 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4421 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4422 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4423 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4424 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4425 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4426 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4427 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4428 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4429 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4430 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4431 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4432 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4433 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4434 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4435 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4436 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4437 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4438 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4439 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4440 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4441 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4442 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4443 (reg-tilegx.o): Remove.
4444 (all_object_files): New macro.
4445 Include .deps files.
4446 * aclocal.m4, configure: Rebuild.
4447 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4448 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4449 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4450
4451 2012-12-05 Tom Tromey <tromey@redhat.com>
4452
4453 PR gdb/14917:
4454 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4455
4456 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
4457
4458 * configure.ac: Check for linux/perf_event.h.
4459 * config.in: Regenerated.
4460 * configure: Regenerated.
4461
4462 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4463
4464 * hostio.c (handle_readlink): Decrease buffer size
4465 parameter passed to readlink by one byte.
4466
4467 2012-11-26 Yao Qi <yao@codesourcery.com>
4468
4469 * configure.ac (build_warnings): Append '-Wempty-body'.
4470 * configure: Regenerated.
4471 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4472 body.
4473
4474 2012-11-15 Pierre Muller <muller@sourceware.org>
4475
4476 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4477 * config.in: Regenerate.
4478 * configure: Regenerate.
4479 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4480 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4481 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4482 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4483 header.
4484 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4485 instead of <sys/wait.h> header.
4486 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4487
4488 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
4489
4490 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4491 (various make rules): Remove -DGDBSERVER
4492
4493 2012-11-09 Yao Qi <yao@codesourcery.com>
4494
4495 * spu-low.c (current_ptid): Move it to ..
4496 * gdbthread.h: ... here. New.
4497 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4498 * server.c (myresume, process_serial_event): Likewise.
4499 * thread-db.c (thread_db_find_new_threads): Likewise.
4500 * tracepoint.c (run_inferior_command): Likewise.
4501
4502 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
4503
4504 * server.c (handle_search_memory_1): Include access length in
4505 warning message.
4506
4507 2012-09-05 Michael Brandt <michael.brandt@axis.com>
4508
4509 * linux-crisv32-low.c: Fix compile errors.
4510
4511 2012-09-04 Yao Qi <yao@codesourcery.com>
4512
4513 * tracepoint.c (cmd_qtsv): Adjust debug message.
4514 Don't check CUR_TPOINT.
4515
4516 2012-08-28 Yao Qi <yao@codesourcery.com>
4517
4518 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4519 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4520 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4521 Remove declarations of xmalloc, xreallloc, xstrdup and
4522 freeargv.
4523 * Makefile.in (libiberty_h): New.
4524 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4525 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4526
4527 2012-08-23 Yao Qi <yao@codesourcery.com>
4528
4529 * server.h: Remove declaration of 'xsnprintf'.
4530
4531 2012-08-22 Keith Seitz <keiths@redhat.com>
4532
4533 * server.h: Include build-gnulib-gbserver/config.h.
4534 * gdbreplay.c: Likewise.
4535
4536 2012-08-08 Doug Evans <dje@google.com>
4537
4538 * Makefile.in (SFILES): Add gdb_vecs.c.
4539 (OBS): Add gdb_vecs.o.
4540 (gdb_vecs_h, host_defs_h): New variables.
4541 (thread-db.o): Add $(gdb_vecs_h) dependency.
4542 (gdb_vecs.o): New rule.
4543 * thread-db.c: #include "gdb_vecs.h".
4544 (thread_db_load_search): Use a vector to iterate over path elements.
4545 Handle text appearing after "$pdir".
4546
4547 * configure.ac: Add check for strstr.
4548 * config.in: Regenerate.
4549 * configure: Regenerate.
4550
4551 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4552
4553 * hostio.c (handle_pread): If pread fails, fall back to attempting
4554 lseek/read.
4555 (handle_pwrite): Likewise for pwrite.
4556
4557 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4558
4559 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4560 between unsupported TYPE and unimplementable ADDR/LEN combination.
4561 (arm_insert_point): Act on new return value.
4562
4563 2012-07-31 Pedro Alves <palves@redhat.com>
4564
4565 * server.c (process_point_options): Only skip tokens if we find
4566 one that is unrecognized. Don't treat 'X' specially while
4567 skipping unrecognized tokens.
4568
4569 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4570
4571 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4572 to 4-byte-align HW breakpoint addresses for Thumb.
4573
4574 2012-07-27 Yao Qi <yao@codesourcery.com>
4575
4576 PR remote/14161.
4577
4578 * server.h: Declare gdb_agent_about_to_close.
4579 * target.c (kill_inferior): Include "agent.h".
4580 New. Send command 'kill'.
4581 * target.h (kill_inferior): Removed macro.
4582 * tracepoint.c (gdb_agent_about_to_close): New.
4583 (gdb_agent_helper_thread): Handle command 'close'.
4584 Wait endlessly until the inferior stops.
4585 Install gdb_agent_remove_socket to atexit hook.
4586 (agent_socket_name): New static variable.
4587 (gdb_agent_socket_init): Replace local variable 'name' with
4588 'agent_socket_name'.
4589 (gdb_agent_remove_socket): New.
4590
4591 2012-07-27 Yao Qi <yao@codesourcery.com>
4592
4593 * server.c (process_point_options): Stop at 'X' when parsing.
4594
4595 2012-07-19 Michael Eager <eager@eagercon.com>
4596
4597 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
4598 to hw_execute.
4599 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4600 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4601 hardware breakpoint.
4602
4603 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4604
4605 * gdbserver/linux-low.c (initialize_low): Call
4606 linux_ptrace_init_warnings.
4607
4608 2012-07-02 Doug Evans <dje@google.com>
4609
4610 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4611 pointer to int.
4612
4613 2012-07-02 Stan Shebs <stan@codesourcery.com>
4614
4615 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4616 (ax.o): Add it to build rule.
4617 (ax-ipa.o): Ditto.
4618 (OBS): Add format.o.
4619 (IPA_OBS): Add format.o.
4620 * server.c (handle_query): Claim support for breakpoint commands.
4621 (process_point_options): Add command case.
4622 (process_serial_event): Leave running if there are printfs in
4623 effect.
4624 * mem-break.h (any_persistent_commands): Declare.
4625 (add_breakpoint_commands): Declare.
4626 (gdb_no_commands_at_breakpoint): Declare.
4627 (run_breakpoint_commands): Declare.
4628 * mem-break.c (struct point_command_list): New struct.
4629 (struct breakpoint): New field command_list.
4630 (any_persistent_commands): New function.
4631 (add_commands_to_breakpoint): New function.
4632 (add_breakpoint_commands): New function.
4633 (gdb_no_commands_at_breakpoint): New function.
4634 (run_breakpoint_commands): New function.
4635 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4636 locally.
4637 * ax.c: Include format.h.
4638 (ax_printf): New function.
4639 (gdb_eval_agent_expr): Add printf opcode.
4640
4641 2012-06-13 Yao Qi <yao@codesourcery.com>
4642
4643 * server.c (start_inferior): Remove duplicated writes to fields
4644 'last_resume_kind' and 'last_status' of 'current_inferior'.
4645
4646 2012-06-12 Yao Qi <yao@codesourcery.com>
4647 Pedro Alves <palves@redhat.com>
4648
4649 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4650 comment.
4651 * server.c (handle_v_cont): Extend comment.
4652
4653 2012-06-11 Yao Qi <yao@codesourcery.com>
4654
4655 * linux-low.c (linux_attach): Add 'static'.
4656
4657 2012-06-06 Yao Qi <yao@codesourcery.com>
4658
4659 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4660
4661 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4662
4663 Fix gcc -flto compilation warning.
4664 * server.c (main): Make variable multi_mode and attach volatile.
4665
4666 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4667
4668 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4669 if the platform doesn't know about it.
4670
4671 2012-05-30 Jeff Kenton <jkenton@tilera.com>
4672
4673 * Makefile.in (SFILES): Add linux-tile-low.c.
4674 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4675 * configure.srv: Handle tilegx-*-linux*.
4676 * linux-tile-low.c: New file.
4677
4678 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4679
4680 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4681
4682 2012-05-24 Pedro Alves <palves@redhat.com>
4683
4684 PR gdb/7205
4685
4686 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
4687
4688 2012-05-24 Pedro Alves <palves@redhat.com>
4689
4690 PR gdb/7205
4691
4692 Replace target_signal with gdb_signal throughout.
4693
4694 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4695
4696 * linux-low.c (linux_store_registers): Avoid the copying sequence
4697 when no data has been retrieved by ptrace.
4698
4699 2012-05-22 Will Deacon <will.deacon@arm.com>
4700
4701 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4702 Include asm/ptrace.h.
4703 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4704 already defined.
4705
4706 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4707
4708 * linux-low.c (linux_store_registers): Don't re-retrieve data
4709 with ptrace that has already been obtained from /proc. Always
4710 copy any data retrieved with ptrace to the buffer supplied.
4711
4712 2012-05-11 Yao Qi <yao@codesourcery.com>
4713 Pedro Alves <palves@redhat.com>
4714
4715 * linux-low.c (enum stopping_threads_kind): New.
4716 (stopping_threads): Change type to `enum stopping_threads_kind'.
4717 (handle_extended_wait): If stopping and suspending threads, leave
4718 the new_lwp suspended too.
4719 (linux_wait_for_event): Adjust.
4720 (stop_all_lwps): Set `stopping_threads' to
4721 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4722 whether we're suspending threads or just stopping them. Assert no
4723 recursion happens.
4724
4725 2012-04-29 Yao Qi <yao@codesourcery.com>
4726
4727 * server.h: Move some code to ...
4728 * gdbthread.h: ... here. New.
4729 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4730 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4731 (nto-low.o, win32-low.o): Likewise.
4732 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4733 * regcache.c, remote-utils.c, server.c: Likewise.
4734 * target.c, tracepoint.c, win32-low.c: Likewise.
4735
4736 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4737
4738 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4739 (PTRACE_ARG4_TYPE): Likewise.
4740 (PTRACE_XFER_TYPE): Likewise.
4741 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4742 ptrace to PTRACE_ARG3_TYPE.
4743 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4744 (PTRACE_ARG4_TYPE): Likewise.
4745 (PTRACE_XFER_TYPE): Likewise.
4746 (linux_detach_one_lwp): Cast fourth argument of
4747 ptrace to long then PTRACE_ARG4_TYPE.
4748 (regsets_fetch_inferior_registers): Cast third argument of
4749 ptrace to long then PTRACE_ARG3_TYPE.
4750 (regsets_store_inferior_registers): Likewise.
4751
4752 2012-04-20 Pedro Alves <palves@redhat.com>
4753
4754 * configure: Regenerate.
4755
4756 2012-04-19 Pedro Alves <palves@redhat.com>
4757
4758 * Makefile.in (GNULIB_BUILDDIR): New.
4759 (LIBGNU, INCGNU, GNULIB_H): Adjust.
4760 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4761 (all, install-only, uninstall, clean-info, all-lib, clean): No
4762 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4763 (maintainer-clean realclean distclean): Use subdir_do.
4764 (subdir_do): New.
4765 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
4766 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
4767 * acinclude.m4: Include acx_configure_dir.m4.
4768 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4769 calls. Call AC_PROG_RANLIB. Configure gnulib using
4770 ACX_CONFIGURE_DIR.
4771 (GNULIB): New.
4772 (GNULIB_STDINT_H): Adjust.
4773 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4774 * gdbreplay.c: Include build-gnulib/config.h.
4775 * server.h: Likewise.
4776 * aclocal.m4: Regenerate.
4777 * config.in: Regenerate.
4778 * configure: Regenerate.
4779
4780 2012-04-19 Pedro Alves <palves@redhat.com>
4781
4782 * Makefile.in (LIBGNU, INCGNU): Adjust.
4783 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4784 (all, install-only, uninstall, clean-info, all-lib, clean)
4785 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4786 * configure.ac: Adjust AC_OUTPUT output.
4787 * aclocal.m4: Regenerate.
4788 * configure: Regenerate.
4789
4790 2012-04-19 Pedro Alves <palves@redhat.com>
4791
4792 * Makefile.in (generated_files): New.
4793 (server_h): Remove the explicit dependency on config.h, and depend
4794 on $generated_files.
4795
4796 2012-04-19 Pedro Alves <palves@redhat.com>
4797
4798 * Makefile.in (INCGNU): Add -Ignulib.
4799
4800 2012-04-19 Pedro Alves <palves@redhat.com>
4801
4802 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4803 (INCGNU): ... this, and spell out -I here.
4804 (GNULIB_LIB): Rename to ...
4805 (LIBGNU): ... this.
4806 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4807
4808 2012-04-19 Pedro Alves <palves@redhat.com>
4809
4810 * config.in: Regenerate.
4811
4812 2012-04-19 Pedro Alves <palves@redhat.com>
4813
4814 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4815 * server.h (memmem): Remove declaration.
4816 * config.in: Regenerate.
4817 * configure: Regenerate.
4818
4819 2012-04-19 Yao Qi <yao@codesourcery.com>
4820
4821 * Makefile.in (SFILES): Add common/vec.c.
4822 (OBS): Add vec.o.
4823 (vec.o): New rule.
4824
4825 2012-04-19 Yao Qi <yao@codesourcery.com>
4826
4827 * remote-utils.c (prepare_resume_reply): Replace with macro
4828 target_core_of_thread.
4829 * server.c (handle_qxfer_threads_proper): Likewise.
4830 * target.h (traget_core_of_thread): New macro.
4831
4832 2012-04-18 Pedro Alves <palves@redhat.com>
4833
4834 * aclocal.m4: Regenerate.
4835 * configure: Regenerate.
4836
4837 2012-04-16 Yao Qi <yao@codesourcery.com>
4838
4839 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4840 duplicated on address.
4841
4842 2012-04-16 Yao Qi <yao@codesourcery.com>
4843
4844 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4845 (struct tracepoint_action_ops) <send>: New field.
4846 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4847 (agent_expr_send, x_tracepoint_action_send): New.
4848 (l_tracepoint_action_send): New.
4849 (cmd_qtdp): Download and install tracepoint
4850 according to `use_agent'.
4851 (run_inferior_command): Add one more parameter `len'.
4852 Update callers.
4853 (tracepoint_send_agent): New.
4854 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4855
4856 2012-04-16 Yao Qi <yao@codesourcery.com>
4857
4858 * tracepoint.c (download_tracepoints): Moved to ...
4859 (cmd_qtstart): ... here.
4860
4861 2012-04-14 Yao Qi <yao@codesourcery.com>
4862
4863 * tracepoint.c: Include inttypes.h.
4864 (struct collect_memory_action): Use sized types.
4865 (struct tracepoint): Likewise.
4866 (cmd_qtdp, stop_tracing): Update print specifiers.
4867 (cmd_qtp, response_tracepoint): Likewise.
4868 (collect_data_at_tracepoint): Likewise.
4869 (collect_data_at_step): Likewise.
4870
4871 2012-04-14 Yao Qi <yao@codesourcery.com>
4872
4873 Import gnulib module inttypes.
4874 * aclocal.m4, config.in, configure: Regenerated.
4875
4876 2012-04-14 Yao Qi <yao@codesourcery.com>
4877
4878 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4879 Makefile and config.status at last.
4880
4881 2012-04-13 Yao Qi <yao@codesourcery.com>
4882
4883 * tracepoint.c: Include stdint.h unconditionally.
4884
4885 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4886
4887 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4888 on BFD_HAVE_SYS_PROCFS_TYPE.
4889 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4890 * configure: Regenerate.
4891 * config.in: Likewise.
4892
4893 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4894
4895 * Makefile.in (clean): Also remove x32.c x32-linux.c
4896 x32-avx.c x32-avx-linux.c.
4897 (x32.o): New target.
4898 (x32.c): Likewise.
4899 (x32-linux.o): Likewise.
4900 (x32-linux.c): Likewise.
4901 (x32-avx.o): Likewise.
4902 (x32-avx.c): Likewise.
4903 (x32-avx-linux.o): Likewise.
4904 (x32-avx-linux.c): Likewise.
4905
4906 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4907 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4908 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4909 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4910 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4911 i386/x32-avx-linux.xml.
4912
4913 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4914 (init_registers_x32_avx_linux): Likwise.
4915 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4916 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4917
4918 2012-04-13 Pedro Alves <palves@redhat.com>
4919
4920 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4921 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4922 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4923 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4924 the sub-make.
4925
4926 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4927
4928 * linux-x86-low.c (compat_x32_clock_t): New.
4929 (compat_x32_siginfo_t): Likewise.
4930 (compat_x32_siginfo_from_siginfo): Likewise.
4931 (siginfo_from_compat_x32_siginfo): Likewise.
4932 (linux_is_elf64): Likewise.
4933 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4934 and siginfo_from_compat_x32_siginfo for x32.
4935 (x86_arch_setup): Set linux_is_elf64.
4936
4937 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4938
4939 PR gdb/13969
4940 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4941 e_machine field.
4942 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4943 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4944 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4945 compatible with process.
4946
4947 2012-04-12 Yao Qi <yao@codesourcery.com>
4948
4949 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4950 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4951 (install-only, install-info, clean): Handle sub dir gnulib.
4952 (all-lib, am--refresh): New targets.
4953 (memmem.o): Remove target.
4954 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4955 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4956 (AC_REPLACE_FUNCS): Remove memmem.
4957 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4958 (AC_OUTPUT): Generate Makefile in gnulib/.
4959 * aclocal.m4, config.in, configure: Regenerated.
4960
4961 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4962
4963 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4964
4965 2012-04-05 Pedro Alves <palves@redhat.com>
4966
4967 -Werror=strict-aliasing
4968
4969 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4970 pointer.
4971
4972 2012-04-04 Pedro Alves <palves@redhat.com>
4973
4974 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4975 (sparc_store_gregset_from_stack, sparc_store_gregset)
4976 (sparc_breakpoint_at): Fix formatting.
4977
4978 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4979
4980 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4981 are available.
4982 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4983 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4984 * config.in: Regenerate.
4985 * configure: Likewise.
4986
4987 2012-03-29 Pedro Alves <palves@redhat.com>
4988
4989 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4990 Correct ptrace arguments.
4991
4992 2012-03-28 Pedro Alves <palves@redhat.com>
4993
4994 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4995 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4996 (IA64_FR1_REGNUM): New defines.
4997 (ia64_fetch_register): New.
4998 (the_low_target): Install it.
4999 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5000 field.
5001 * linux-low.c (linux_fetch_registers): Try the
5002 the_low_target.fetch_register hook first.
5003
5004 * linux-arm-low.c (the_low_target): Adjust.
5005 * linux-bfin-low.c (the_low_target): Adjust.
5006 * linux-cris-low.c (the_low_target): Adjust.
5007 * linux-crisv32-low.c (the_low_target): Adjust.
5008 * linux-m32r-low.c (the_low_target): Adjust.
5009 * linux-m68k-low.c (the_low_target): Adjust.
5010 * linux-mips-low.c (the_low_target): Adjust.
5011 * linux-ppc-low.c (the_low_target): Adjust.
5012 * linux-s390-low.c (the_low_target): Adjust.
5013 * linux-sh-low.c (the_low_target): Adjust.
5014 * linux-sparc-low.c (the_low_target): Adjust.
5015 * linux-tic6x-low.c (the_low_target): Adjust.
5016 * linux-x86-low.c (the_low_target): Adjust.
5017 * linux-xtensa-low.c (the_low_target): Adjust.
5018
5019 2012-03-26 Pedro Alves <palves@redhat.com>
5020
5021 * server.c (handle_qxfer_libraries): Don't bail early if
5022 the_target->qxfer_libraries_svr4 is not NULL.
5023
5024 2012-03-26 Pedro Alves <palves@redhat.com>
5025
5026 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5027
5028 2012-03-23 Pedro Alves <palves@redhat.com>
5029
5030 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5031 "library-list-svr4" element's start tag when the the DSO list is
5032 empty.
5033
5034 2012-03-23 Pedro Alves <palves@redhat.com>
5035
5036 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5037 a variable whose type size is the same as the inferior's pointer
5038 size.
5039
5040 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5041
5042 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5043 struct siginfo.
5044 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5045 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5046 * linux-low.h: Include <signal.h>.
5047 (struct siginfo): Remove forward declaration.
5048 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5049 struct siginfo.
5050
5051 2012-03-21 Mike Frysinger <vapier@gentoo.org>
5052
5053 * .gitignore: Ignore more files.
5054
5055 2012-03-19 Pedro Alves <palves@redhat.com>
5056 Jan Kratochvil <jan.kratochvil@redhat.com>
5057
5058 * server.c (cont_thread, general_thread): Add describing comments.
5059 (start_inferior): Clear `cont_thread'.
5060 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5061 of a process.
5062
5063 2012-03-15 Yao Qi <yao@codesourcery.com>
5064
5065 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5066 handling to ...
5067 (cmd_qtdp): ... here.
5068
5069 2012-03-15 Yao Qi <yao@codesourcery.com>
5070
5071 * tracepoint.c (struct tracepoint_action_ops): New.
5072 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5073 (m_tracepoint_action_download): New.
5074 (r_tracepoint_action_download): New.
5075 (x_tracepoint_action_download): New.
5076 (l_tracepoint_action_download): New.
5077 (add_tracepoint_action): Install `action->ops' according type.
5078 (download_tracepoint_1): Move code `download' function pointer
5079 of various tracepoint_action_ops.
5080
5081 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5082
5083 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5084 linux_ptrace_attach_warnings.
5085
5086 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5087
5088 * Makefile.in (linux-ptrace.o): New.
5089 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5090 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5091 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5092 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5093 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5094 of these targets.
5095 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5096
5097 2012-03-08 Yao Qi <yao@codesourcery.com>
5098 Pedro Alves <palves@redhat.com>
5099
5100 Fix PR server/13392.
5101 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5102 offset of JMP insn.
5103 * tracepoint.c (remove_tracepoint): New.
5104 (cmd_qtdp): Call remove_tracepoint when failed to install.
5105
5106 2012-03-07 Pedro Alves <palves@redhat.com>
5107
5108 * linux-low.c (get_detach_signal): New.
5109 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5110 Pass on pending signals to PTRACE_DETACH. Check the result of the
5111 ptrace call.
5112 * server.c (program_signals, program_signals_p): New.
5113 (handle_general_set): Handle QProgramSignals.
5114 * server.h (program_signals, program_signals_p): Declare.
5115
5116 2012-03-05 Pedro Alves <palves@redhat.com>
5117 Jan Kratochvil <jan.kratochvil@redhat.com>
5118
5119 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5120 New comment why.
5121
5122 2012-03-03 Yao Qi <yao@codesourcery.com>
5123
5124 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5125 agent_look_up_symbols.
5126
5127 2012-03-03 Yao Qi <yao@codesourcery.com>
5128
5129 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5130 (linux-x86-low.o): Likewise.
5131 * server.h: Remove in_process_agent_loaded.
5132 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5133 common/agent.c.
5134 Update callers.
5135
5136 2012-03-03 Yao Qi <yao@codesourcery.com>
5137
5138 * tracepoint.c (gdb_agent_capability): New global.
5139 (in_process_agent_loaded_ust): Renamed to
5140 `in_process_agent_supports_ust'.
5141 Update callers.
5142 (in_process_agent_supports_ust): Call agent_capability_check.
5143 (clear_installed_tracepoints): Assert that agent supports
5144 agent.
5145
5146 2012-03-03 Yao Qi <yao@codesourcery.com>
5147
5148 * linux-low.c (linux_supports_agent): New.
5149 (linux_target_ops): Initialize field `supports_agent' with
5150 linux_supports_agent.
5151 * target.h (struct target_ops) <supports_agent>: New.
5152 (target_supports_agent): New macro.
5153 * server.c (handle_general_set): Handle packet 'QAgent'.
5154 (handle_query): Send `QAgent+'.
5155 * Makefile.in (server.o): Depends on agent.h.
5156
5157 2012-03-03 Yao Qi <yao@codesourcery.com>
5158
5159 * Makefile.in (OBS): Add agent.o.
5160 Add new rule for agent.o.
5161 Track dependence of tracepoint.c on agent.h.
5162 * tracepoint.c (run_inferior_command_1):
5163 (run_inferior_command): Call agent_run_command.
5164 (gdb_ust_connect_sync_socket): Deleted. Move it to
5165 common/agent.c.
5166 (resume_thread, stop_thread): Likewise.
5167 (gdb_ust_socket_init): Renamed to ...
5168 (gdb_agent_socket_init): ... New.
5169 (gdb_ust_thread): Renamed to ...
5170 (gdb_agent_helper_thread): ... New.
5171 (gdb_ust_init): Move some code to ...
5172 (gdb_agent_init): ... here. New.
5173 [HAVE_UST]: Call gdb_ust_init.
5174 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5175 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5176 * config.in, configure: Regenerated.
5177
5178 2012-03-02 Pedro Alves <palves@redhat.com>
5179
5180 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5181 * linux-low.c (struct simple_pid_list): New.
5182 (stopped_pids): New a struct simple_pid_list pointer.
5183 (add_to_pid_list, pull_pid_from_list): New.
5184 (handle_extended_wait): Don't assume the first signal new children
5185 report is SIGSTOP. Adjust call to pull_pid_from_list.
5186 (linux_wait_for_lwp): Adjust.
5187
5188 2012-03-02 Yao Qi <yao@codesourcery.com>
5189
5190 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5191 debug log.
5192
5193 2012-03-02 Yao Qi <yao@codesourcery.com>
5194
5195 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5196 `stop_pc' and `tpoint'. Update caller.
5197
5198 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5199
5200 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5201 * linux-low.c (use_linux_regsets): New macro.
5202 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5203 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5204 (linux_register_in_regsets): New function.
5205 (usr_fetch_inferior_registers): Skip registers covered by
5206 regsets.
5207 (usr_store_inferior_registers): Likewise.
5208 (usr_fetch_inferior_registers): New macro.
5209 (usr_store_inferior_registers): Likewise.
5210 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5211 (linux_store_registers): Likewise.
5212 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5213 prototype.
5214 (init_registers_mips64_dsp_linux): Likewise.
5215 (init_registers_mips_linux): New macro.
5216 (init_registers_mips_dsp_linux): Likewise.
5217 (mips_dsp_num_regs): Likewise.
5218 (DSP_BASE, DSP_CONTROL): New fallback macros.
5219 (mips_base_regs): New macro.
5220 (mips_regmap): Use it. Fix the size.
5221 (mips_dsp_regmap): New variable.
5222 (mips_dsp_regset_bitmap): Likewise.
5223 (mips_arch_setup): New function.
5224 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5225 than mips_regmap.
5226 (mips_cannot_store_register): Likewise.
5227 (the_low_target): Update .arch_setup, .num_regs and .regmap
5228 initializers. Add .regset_bitmap initializer.
5229 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5230 initializer.
5231 * linux-bfin-low.c (the_low_target): Likewise.
5232 * linux-cris-low.c (the_low_target): Likewise.
5233 * linux-crisv32-low.c (the_low_target): Likewise.
5234 * linux-ia64-low.c (the_low_target): Likewise.
5235 * linux-m32r-low.c (the_low_target): Likewise.
5236 * linux-m68k-low.c (the_low_target): Likewise.
5237 * linux-ppc-low.c (the_low_target): Likewise.
5238 * linux-s390-low.c (the_low_target): Likewise.
5239 * linux-sh-low.c (the_low_target): Likewise.
5240 * linux-sparc-low.c (the_low_target): Likewise.
5241 * linux-tic6x-low.c (the_low_target): Likewise.
5242 * linux-x86-low.c (the_low_target): Likewise.
5243 * linux-xtensa-low.c (the_low_target): Likewise.
5244 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5245 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5246 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5247 srv_xmlfiles.
5248 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5249 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5250
5251 2012-02-29 Yao Qi <yao@codesourcery.com>
5252 Pedro Alves <palves@redhat.com>
5253
5254 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5255 `step_over_finished' is true.
5256
5257 2012-02-27 Pedro Alves <palves@redhat.com>
5258
5259 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5260 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5261
5262 2012-02-27 Pedro Alves <palves@redhat.com>
5263
5264 PR server/9684
5265 * linux-low.c (pid_is_stopped): New.
5266 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5267
5268 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
5269
5270 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5271 of conditions.
5272
5273 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5274
5275 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5276
5277 2012-02-24 Luis Machado <lgustavo@codesourcery>
5278
5279 * server.c (handle_query): Advertise support for target-side
5280 breakpoint condition evaluation.
5281 (process_point_options): New function.
5282 (process_serial_event): When inserting a breakpoint, check for
5283 a target-side condition that should be evaluated.
5284
5285 * mem-break.c: Include regcache.h and ax.h.
5286 (point_cond_list_t): New data structure.
5287 (breakpoint) <cond_list>: New field.
5288 (find_gdb_breakpoint_at): Make non-static.
5289 (delete_gdb_breakpoint_at): Clear any target-side
5290 conditions.
5291 (clear_gdb_breakpoint_conditions): New function.
5292 (add_condition_to_breakpoint): Likewise.
5293 (add_breakpoint_condition): Likewise.
5294 (gdb_condition_true_at_breakpoint): Likewise.
5295 (gdb_breakpoint_here): Return result directly instead
5296 of going through a local variable.
5297
5298 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5299 (clear_gdb_breakpoint_conditions): Likewise.
5300 (add_breakpoint_condition): Likewise.
5301 (gdb_condition_true_at_breakpoint): Likewise.
5302
5303 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5304 (need_step_over_p): Take target-side breakpoint condition into
5305 consideration.
5306
5307 2012-02-24 Luis Machado <lgustavo@codesourcery>
5308
5309 * server.h: Include tracepoint.h.
5310 (agent_mem_read, agent_get_trace_state_variable_value,
5311 agent_set_trace_state_variable_value,
5312 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5313 get_set_tsv_func_addr): New prototypes.
5314
5315 * ax.h: New include file.
5316 * ax.c: New source file.
5317
5318 * tracepoint.c: Include ax.h.
5319 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5320 agent_expr, eval_result_type): Move to ax.h.
5321 (parse_agent_expr): Rename to ...
5322 (gdb_parse_agent_expr): ... this, make it non-static and move
5323 to ax.h.
5324 (unparse_agent_expr) Rename to ...
5325 (gdb_unparse_agent_expr): ... this, make it non-static and move
5326 to ax.h.
5327 (eval_agent_expr): Rename to ...
5328 (eval_tracepoint_agent_expr): ... this.
5329 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5330 forward declarations.
5331 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5332 (agent_get_trace_state_variable_value): New function.
5333 (agent_set_trace_state_variable_value): New function.
5334 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5335 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5336 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5337 (condition_true_at_tracepoint): Likewise.
5338 (parse_agent_expr): Rename to ...
5339 (gdb_parse_agent_expr): ... this and move to ax.c.
5340 (unparse_agent_expr): Rename to ...
5341 (gdb_unparse_agent_expr): ... this and move to ax.c.
5342 (gdb_agent_op_name): Move to ax.c.
5343 (eval_agent_expr): Rename to ...
5344 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5345 and move to ax.c.
5346 (eval_tracepoint_agent_expr): New function.
5347 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
5348 non-static.
5349 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5350 ax.c.
5351 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5352 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5353 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5354 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5355 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5356 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5357 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5358 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5359 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5360 (compile_bytecodes): Remove forward declaration.
5361 (is_goto_target): Move to ax.c.
5362 (compile_bytecodes): Move to ax.c and call
5363 agent_get_trace_state_variable_value (...) and
5364 agent_set_trace_state_variable_value (...).
5365
5366 * Makefile.in: Update ax.c and IPA dependencies.
5367
5368 2012-02-24 Pedro Alves <palves@redhat.com>
5369
5370 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5371 (cmd_bigqtbuffer_circular): ... this. Only handle
5372 'QTBuffer:circular:'.
5373 (handle_tracepoint_general_set): Adjust.
5374
5375 2012-02-16 Yao Qi <yao@codesourcery.com>
5376
5377 * inferiors.c: Move code to ...
5378 * dll.c: .... here. New.
5379 * server.h: Declare clear_dlls.
5380 * Makefile.in (SFILES): Add dll.c.
5381 (OBS): Add dll.o
5382 (dll.o): New rule.
5383
5384 2012-02-11 Yao Qi <yao@codesourcery.com>
5385
5386 * server.c: (handle_monitor_command): Add a new parameter
5387 `own_buf'.
5388 (handle_query): Update caller.
5389
5390 2012-02-09 Joel Brobecker <brobecker@adacore.com>
5391
5392 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5393 * configure, config.in: Regenerate.
5394 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5395 is not defined.
5396
5397 2012-02-02 Pedro Alves <palves@redhat.com>
5398
5399 Try SIGKILL first, then PTRACE_KILL.
5400 * linux-low.c (linux_kill_one_lwp): New.
5401 (linux_kill_one_lwp): Rename to ...
5402 (kill_one_lwp_callback): ... this. Use the new
5403 linux_kill_one_lwp.
5404
5405 2012-02-02 Pedro Alves <palves@redhat.com>
5406
5407 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5408 inferior.
5409
5410 2012-01-27 Pedro Alves <palves@redhat.com>
5411
5412 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5413 (elf_64_file_p): Make static.
5414 (linux_pid_exe_is_elf_64_file): New.
5415 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5416 Delete declarations.
5417 (linux_pid_exe_is_elf_64_file): Declare.
5418 * linux-x86-low.c (x86_arch_setup): Use
5419 linux_pid_exe_is_elf_64_file.
5420
5421 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5422
5423 * linux-low.c (linux_wait_for_event_1): Rename to ...
5424 (linux_wait_for_event): ... here and merge it with former
5425 linux_wait_for_event - new variable wait_ptid, use it.
5426 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5427
5428 2012-01-23 Pedro Alves <palves@redhat.com>
5429
5430 * server.c (main): Avoid yet another case of infinite loop while
5431 detaching/killing after a longjmp.
5432
5433 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5434
5435 Code cleanup.
5436 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5437
5438 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5439
5440 * hostio.c (handle_readlink): New function.
5441 (handle_vFile): Call it to handle "vFile:readlink" packets.
5442
5443 2012-01-20 Pedro Alves <palves@redhat.com>
5444 Ulrich Weigand <ulrich.weigand@linaro.org>
5445
5446 * server.c (handle_v_requests): Only support vAttach and vRun to
5447 start multiple processes when in extended protocol mode.
5448
5449 2012-01-17 Pedro Alves <palves@redhat.com>
5450
5451 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5452 memalign plus mprotect to allocate the scratch buffer.
5453
5454 2012-01-13 Pedro Alves <palves@redhat.com>
5455
5456 * server.c (attach_inferior): Clear `cont_thread'.
5457
5458 2012-01-13 Pedro Alves <palves@redhat.com>
5459
5460 * server.c (main): Avoid infinite loop while detaching/killing
5461 after a longjmp.
5462
5463 2012-01-09 Doug Evans <dje@google.com>
5464
5465 * server.c (start_inferior): Set last_ptid in --wrapper case.
5466
5467 2012-01-06 Yao Qi <yao@codesourcery.com>
5468
5469 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5470 defined.
5471 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5472
5473 2012-01-04 Yao Qi <yao@codesourcery.com>
5474
5475 * tracepoint.c (cmd_qtdp): Print debug message
5476 for static tracepoint.
5477
5478 2012-01-04 Yao Qi <yao@codesourcery.com>
5479
5480 * tracepoint.c (trace_vdebug): Differentiate debug message
5481 between gdbserver and IPA.
5482
5483 2012-01-03 Yao Qi <yao@codesourcery.com>
5484
5485 * tracepoint.c (tracepoint_was_hit): Don't collect for
5486 static tracepoint.
5487
5488 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5489
5490 * terminal.h: Reformat copyright header.
5491
5492 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5493
5494 * server.c (gdbserver_version): Update copyright year.
5495 * gdbreplay.c (gdbreplay_version): Likewise.
5496
5497 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5498
5499 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5500
5501 Revert:
5502 2011-12-18 Hui Zhu <teawater@gmail.com>
5503 * linux-low.c (linux_create_inferior): Save return value to ret.
5504
5505 2011-12-18 Hui Zhu <teawater@gmail.com>
5506
5507 * linux-low.c (linux_create_inferior): Save return value to ret.
5508
5509 2011-12-16 Doug Evans <dje@google.com>
5510
5511 * linux-low.c (linux_create_inferior): If stdio connection,
5512 redirect stdin from /dev/null, stdout to stderr.
5513 * remote-utils.c (remote_is_stdio): New static global.
5514 (remote_connection_is_stdio): New function.
5515 (remote_prepare): Handle stdio connection.
5516 (remote_open): Ditto.
5517 (remote_close): Don't close stdin for stdio connections.
5518 (read_prim,write_prim): New functions. Replace all calls to
5519 read/write to these.
5520 * server.c (main): Watch for "-" argument. Move call to
5521 remote_prepare before start_inferior.
5522 * server.h (STDIO_CONNECTION_NAME): New macro.
5523 (remote_connection_is_stdio): Declare.
5524
5525 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5526 in debugging output.
5527
5528 2011-12-15 Yao Qi <yao@codesourcery.com>
5529
5530 * tracepoint.c: Include sys/syscall.h.
5531 (gdb_ust_thread): Remove preprocessor conditional.
5532
5533 2011-12-14 Pedro Alves <pedro@codesourcery.com>
5534
5535 * linux-low.c (linux_detach_one_lwp): Call
5536 the_low_target.prepare_to_resume before detaching.
5537
5538 2011-12-14 Yao Qi <yao@codesourcery.com>
5539
5540 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5541 of write.
5542
5543 2011-12-14 Yao Qi <yao@codesourcery.com>
5544
5545 * i386-low.c (i386_low_stopped_data_address): Initialize local
5546 variable `control'.
5547
5548 2011-12-13 Pedro Alves <pedro@codesourcery.com>
5549
5550 PR remote/13492
5551
5552 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5553 DR_CONTROL unless necessary. Extend comments.
5554 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5555 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5556
5557 2011-12-13 Yao Qi <yao@codesourcery.com>
5558
5559 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5560 macros.
5561 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5562
5563 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5564
5565 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5566 Print new debug message for such case.
5567
5568 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5569
5570 Fix overlapping memcpy.
5571 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5572 the read_inferior_memory transfer.
5573 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5574 write_inferior_memory transfer.
5575 (set_fast_tracepoint_jump): New variable buf. Use it for the
5576 read_inferior_memory and write_inferior_memory transfers.
5577 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5578 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5579 Use it for the write_inferior_memory transfer.
5580 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5581 buffers.
5582
5583 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5584
5585 * linux-low.c (fetch_register, store_register): Make code
5586 consistent, fix formatting.
5587
5588 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5589
5590 * linux-low.c (usr_store_inferior_registers): Factor out code
5591 to handle individual registers into...
5592 (store_register): ... this new function.
5593
5594 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5595
5596 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5597 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5598 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5599 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5600 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5601 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5602 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5603 (srv_xmlfiles): Add new XML files.
5604
5605 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5606 and <sys/uio.h>.
5607 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5608 (init_registers_s390_linux32v1): Add prototype.
5609 (init_registers_s390_linux32v2): Likewise.
5610 (init_registers_s390_linux64v1): Likewise.
5611 (init_registers_s390_linux64v2): Likewise.
5612 (init_registers_s390x_linux64v1): Likewise.
5613 (init_registers_s390x_linux64v2): Likewise.
5614 (s390_num_regs): Increment to 52.
5615 (s390_regmap): Add orig_r2 register.
5616 (s390_num_regs_3264): Increment to 68.
5617 (s390_regmap_3264): Add orig_r2 register.
5618 (s390_collect_ptrace_register): Handle orig_r2 register.
5619 (s390_supply_ptrace_register): Likewise.
5620 (s390_fill_last_break): New function.
5621 (s390_store_last_break): Likewise.
5622 (s390_fill_system_call): New function.
5623 (s390_store_system_call): Likewise.
5624 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5625 register sets.
5626 (s390_check_regset): New function.
5627 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5628 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5629 Update target_regsets for available register sets.
5630
5631 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5632 Jan Kratochvil <jan.kratochvil@redhat.com>
5633
5634 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5635 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5636 New.
5637 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5638 * linux-low.h (struct process_info_private): New member r_debug.
5639 * server.c (handle_qxfer_libraries): Call
5640 the_target->qxfer_libraries_svr4.
5641 (handle_qxfer_libraries_svr4): New function.
5642 (qxfer_packets): New entry "libraries-svr4".
5643 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5644 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5645 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5646 PACKET_qXfer_libraries_svr4.
5647
5648 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5649
5650 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5651 PSW address/mask between 8-byte and 16-byte formats.
5652 (s390_supply_ptrace_register): Likewise.
5653 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5654 basic addressing mode bit.
5655
5656 2011-11-24 Stan Shebs <stan@codesourcery.com>
5657
5658 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5659
5660 2011-11-17 Stan Shebs <stan@codesourcery.com>
5661
5662 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5663 (tracing_start_time): New global.
5664 (tracing_stop_time): New global.
5665 (tracing_user_name): New global.
5666 (tracing_notes): New global.
5667 (tracing_stop_note): New global.
5668 (cmd_qtstart): Set traceframe_usage, start_time.
5669 (stop_tracing): Set stop_time.
5670 (cmd_qtstatus): Report additional status.
5671 (cmd_qtp): New function.
5672 (handle_tracepoint_query): Call it.
5673 (cmd_qtnotes): New function.
5674 (handle_tracepoint_general_set): Call it.
5675 (get_timestamp): Rename from tsv_get_timestamp.
5676
5677 2011-11-14 Stan Shebs <stan@codesourcery.com>
5678 Kwok Cheung Yeung <kcy@codesourcery.com>
5679
5680 * linux-x86-low.c (small_jump_insn): New.
5681 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5682 trampoline and error message, build a trampoline and issue a small
5683 jump instruction to it.
5684 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5685 trampoline and error message.
5686 (x86_get_min_fast_tracepoint_insn_len): New.
5687 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5688 * linux-low.h (struct linux_target_ops): Add arguments to
5689 install_fast_tracepoint_jump_pad operation, add new operation.
5690 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5691 arguments.
5692 (linux_get_min_fast_tracepoint_insn_len): New function.
5693 (linux_target_op): Add new operation.
5694 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5695 (gdb_trampoline_buffer_end): Ditto.
5696 (gdb_trampoline_buffer_error): Ditto.
5697 (struct ipa_sym_addresses): Add fields for new IPA variables.
5698 (symbol_list): Add entries for new IPA variables.
5699 (struct tracepoint): Add fields to hold the address range of the
5700 trampoline used by the tracepoint.
5701 (trampoline_buffer_head): New static variable.
5702 (trampoline_buffer_tail): Ditto.
5703 (claim_trampoline_space): New function.
5704 (have_fast_tracepoint_trampoline_buffer): New function.
5705 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5706 structure.
5707 (install_fast_tracepoint): Ditto, also add error buffer argument.
5708 (cmd_qtminftpilen): New function.
5709 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5710 (fast_tracepoint_from_trampoline_address): New function.
5711 (fast_tracepoint_collecting): Handle trampoline as part of jump
5712 pad space.
5713 (set_trampoline_buffer_space): New function.
5714 (initialize_tracepoint): Initialize new IPA variables.
5715 * target.h (struct target_ops): Add arguments to
5716 install_fast_tracepoint_jump_pad operation, add new
5717 get_min_fast_tracepoint_insn_len operation.
5718 (target_get_min_fast_tracepoint_insn_len): New.
5719 (install_fast_tracepoint_jump_pad): Add arguments.
5720 * server.h (IPA_BUFSIZ): Define.
5721 * linux-i386-ipa.c: Include extra header files.
5722 (initialize_fast_tracepoint_trampoline_buffer): New function.
5723 (initialize_low_tracepoint): Call it.
5724 * server.h (set_trampoline_buffer_space): Declare.
5725 (claim_trampoline_space): Ditto.
5726 (have_fast_tracepoint_trampoline_buffer): Ditto.
5727
5728 2011-11-14 Yao Qi <yao@codesourcery.com>
5729
5730 * server.c (handle_query): Handle InstallInTrace for qSupported.
5731 * tracepoint.c (add_tracepoint): Sort list.
5732 (install_tracepoint, download_tracepoint): New.
5733 (cmd_qtdp): Call them to install and download tracepoints.
5734 (sort_tracepoints): Removed.
5735 (cmd_qtstart): Update.
5736
5737 2011-11-14 Yao Qi <yao@codesourcery.com>
5738
5739 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5740 * mem-break.h: Declare.
5741 * tracepoint.c (cmd_qtstart): Move some code to ...
5742 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5743 New.
5744 (download_tracepoints): Move some code to ...
5745 (download_tracepoint_1): ... here. New.
5746
5747 2011-11-08 Yao Qi <yao@codesourcery.com>
5748
5749 * remote-utils.c (relocate_instruction): A comment fix.
5750
5751 2011-11-07 Joel Brobecker <brobecker@adacore.com>
5752
5753 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5754 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5755 dr_status_mirror and dr_control_mirror from debug_reg_state.
5756 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5757 (i386_initial_stuff): Remove use of deleted globals.
5758 (i386_get_thread_context, i386_set_thread_context,
5759 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5760 from debug_reg_state.
5761
5762 2011-11-05 Yao Qi <yao@codesourcery.com>
5763
5764 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5765 address as TPOINT's.
5766
5767 2011-11-02 Stan Shebs <stan@codesourcery.com>
5768
5769 * tracepoint.c (agent_mem_read_string): New function.
5770 (eval_agent_expr): Call it for tracenz.
5771 * server.c (handle_query): Report support for tracenz.
5772
5773 2011-11-02 Yao Qi <yao@codesourcery.com>
5774
5775 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5776
5777 2011-11-02 Yao Qi <yao@codesourcery.com>
5778
5779 * target.h: Fix a typo in comment.
5780
5781 2011-10-31 Pedro Alves <pedro@codesourcery.com>
5782
5783 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5784 clobber the breakpoints' shadows with fast tracepoint jumps.
5785 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5786 * target.c (write_inferior_memory): Also pass MYADDR down to
5787 check_mem_write.
5788
5789 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5790
5791 * configure.ac: Check support for personality routine.
5792 * configure: Regenerate.
5793 * config.in: Likewise.
5794 * linux-low.c: Include <sys/personality.h>.
5795 Define ADDR_NO_RANDOMIZE if necessary.
5796 (linux_create_inferior): Disable address space randomization when
5797 forking inferior, if requested.
5798 (linux_supports_disable_randomization): New function.
5799 (linux_target_ops): Install it.
5800 * server.h (disable_randomization): Declare.
5801 * server.c (disable_randomization): New global variable.
5802 (handle_general_set): Handle QDisableRandomization.
5803 (handle_query): Likewise for qSupported.
5804 (main): Support --disable-randomization and --no-disable-randomization
5805 command line arguments.
5806 * target.h (struct target_ops): Add supports_disable_randomization.
5807 (target_supports_disable_randomization): New macro.
5808
5809 2011-09-29 Mike Frysinger <vapier@gentoo.org>
5810
5811 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5812 ifdef check.
5813 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5814 [!PT_GETDSBT] (target_loadmap): New definition.
5815 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5816 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5817 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5818 and PT_GETDSBT to LINUX_LOADMAP.
5819 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5820 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5821
5822 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5823
5824 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5825 (arm_linux_hwbp_cap): New static variable.
5826 (arm_linux_get_hwbp_cap): Replace by ...
5827 (arm_linux_init_hwbp_cap): ... this new function.
5828 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5829 (arm_linux_get_hw_watchpoint_count): Likewise.
5830 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5831 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5832 (arm_prepare_to_resume): Use perror_with_name instead of error.
5833
5834 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5835
5836 * linux-arm-low.c: Include <signal.h>.
5837 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5838 (struct arm_linux_hwbp_cap): New data type.
5839 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5840 (struct arm_linux_hw_breakpoint): New data type.
5841 (MAX_BPTS, MAX_WPTS): Define.
5842 (struct arch_process_info, struct arch_lwp_info): New data types.
5843 (arm_linux_get_hwbp_cap): New function.
5844 (arm_linux_get_hw_breakpoint_count): Likewise.
5845 (arm_linux_get_hw_watchpoint_count): Likewise.
5846 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5847 (arm_hwbp_control_initialize): Likewise.
5848 (arm_hwbp_control_is_enabled): Likewise.
5849 (arm_hwbp_control_is_initialized): Likewise.
5850 (arm_hwbp_control_disable): Likewise.
5851 (arm_linux_hw_breakpoint_equal): Likewise.
5852 (arm_linux_hw_point_initialize): Likewise.
5853 (struct update_registers_data): New data structure.
5854 (update_registers_callback: New function.
5855 (arm_insert_point): Likewise.
5856 (arm_remove_point): Likewise.
5857 (arm_stopped_by_watchpoint): Likewise.
5858 (arm_stopped_data_address): Likewise.
5859 (arm_new_process): Likewise.
5860 (arm_new_thread): Likewise.
5861 (arm_prepare_to_resume): Likewise.
5862 (the_low_target): Register arm_insert_point, arm_remove_point,
5863 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5864 arm_new_thread, and arm_prepare_to_resume.
5865
5866 2011-09-15 Stan Shebs <stan@codesourcery.com>
5867
5868 * server.h (struct emit_ops): Add compare-goto fields.
5869 * tracepoint.c (gdb_agent_op_sizes): New table.
5870 (emit_eq_goto): New function.
5871 (emit_ne_goto): New function.
5872 (emit_lt_goto): New function.
5873 (emit_le_goto): New function.
5874 (emit_gt_goto): New function.
5875 (emit_ge_goto): New function.
5876 (is_goto_target): New function.
5877 (compile_bytecodes): Recognize special cases of compare-goto
5878 combinations and call specialized emitters for them.
5879 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5880 (amd64_emit_ne_goto): New function.
5881 (amd64_emit_lt_goto): New function.
5882 (amd64_emit_le_goto): New function.
5883 (amd64_emit_gt_goto): New function.
5884 (amd64_emit_ge_goto): New function.
5885 (amd64_emit_ops): Add the new functions.
5886 (i386_emit_eq_goto): New function.
5887 (i386_emit_ne_goto): New function.
5888 (i386_emit_lt_goto): New function.
5889 (i386_emit_le_goto): New function.
5890 (i386_emit_gt_goto): New function.
5891 (i386_emit_ge_goto): New function.
5892 (i386_emit_ops): Add the new functions.
5893
5894 2011-09-08 Stan Shebs <stan@codesourcery.com>
5895
5896 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5897 (i386_emit_epilogue): Restore %ebx.
5898
5899 2011-08-31 Jie Zhang <jzhang918@gmail.com>
5900
5901 * server.c (step_thread): Remove definition.
5902 (process_serial_event): Don't handle Hs.
5903 * server.h (step_thread): Remove declaration.
5904 * target.c (set_desired_inferior): Remove use of step_thread.
5905
5906 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5907
5908 * linux-low.c: Include linux-procfs.h.
5909 (linux_attach_lwp_1): Update comments.
5910 (linux_attach): Scan for existing threads when attaching to a
5911 process that is the tgid.
5912 * Makefile.in: Update dependencies.
5913
5914 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5915
5916 * configure.srv: Add linux-procfs.o dependencies.
5917
5918 2011-08-14 Yao Qi <yao@codesourcery.com>
5919
5920 * target.h (struct target_ops): Fix indent.
5921 * win32-low.c (win32_target_ops): Fix comment.
5922
5923 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
5924 Yao Qi <yao@codesourcery.com>
5925
5926 * Makefile.in (clean): Remove tic6x-*.c files.
5927 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5928 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5929 (tic6x-c64xp-linux.c): Likewise.
5930 * configure.srv: Add support for tic6x-*-uclinux.
5931 * linux-tic6x-low.c: New.
5932 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5933
5934 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
5935 Yao Qi <yao@codesourcery.com>
5936
5937 * target.h (struct target_ops): Add read_loadmap.
5938 * linux-low.c (struct target_loadseg): New type.
5939 (struct target_loadmap): New type.
5940 (linux_read_loadmap): New function.
5941 (linux_target_ops): Add linux_read_loadmap.
5942 * server.c (handle_query): Support qXfer:fdpic:read packet.
5943 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5944 to NULL.
5945
5946 2011-08-05 Eli Zaretskii <eliz@gnu.org>
5947
5948 * win32-low.c: Include <stdint.h>.
5949
5950 2011-07-22 Pedro Alves <pedro@codesourcery.com>
5951
5952 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5953 to the inferior here.
5954 (i386_remove_aligned_watchpoint): Ditto.
5955 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5956 fit part of the watchpoint in the debug registers.
5957 (i386_update_inferior_debug_regs): New.
5958 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5959 registers, and only update the inferior on success.
5960 (i386_low_remove_watchpoint): Ditto.
5961
5962 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5963
5964 * linux-low.c (compare_ints, unique, list_threads, show_process,
5965 linux_core_of_thread): Delete.
5966 (linux_target_ops): Change linux_core_of_thread to
5967 linux_common_core_of_thread.
5968 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5969 * utils.c (malloc_failure): Change type of argument.
5970 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5971 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5972 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5973 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5974 (IPA_OBJS): Add common-utils-ipa.o.
5975 (ptid_h, linux_osdata_h): New macros.
5976 (server_h): Add common/common-utils.h, common/xml-utils.h,
5977 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5978 common/ptid.h.
5979 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5980 ptid.o, buffer.o): New rules.
5981 (linux-low.o): Add common/linux-osdata.h as a dependency.
5982 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5983 * configure.ac: Add AC_HEADER_DIRENT check.
5984 * config.in: Regenerate.
5985 * configure: Regenerate.
5986 * remote-utils.c (xml_escape_text): Delete.
5987 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5988 buffer_xml_printf): Move to common/buffer.c.
5989 * server.c (main): Remove call to initialize_inferiors.
5990 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5991 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5992 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5993 internal_error, gdb_assert, gdb_assert_fail): Delete.
5994 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5995 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5996 common/buffer.h.
5997 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5998 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5999 initialize_inferiors): Delete.
6000
6001 2011-07-20 Pedro Alves <pedro@codesourcery.com>
6002
6003 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6004 symbol error.
6005
6006 2011-05-31 Pedro Alves <pedro@codesourcery.com>
6007
6008 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6009 assertion.
6010 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6011
6012 2011-05-26 Yao Qi <yao@codesourcery.com>
6013
6014 * Makefile.in (thread-db.o): Track dependence to
6015 common/gdb_thread_db.h.
6016 * thread-db.c: include gdb_thread_db.h from right place.
6017
6018 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6019
6020 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6021 __FILE__ and __LINE__ to internal_error.
6022
6023 2011-05-13 Doug Evans <dje@google.com>
6024
6025 * thread-db.c (try_thread_db_load_from_sdir): New function.
6026 (try_thread_db_load_from_dir): New function.
6027 (thread_db_load_search): Handle $sdir, ignore $pdir.
6028 Remove trying of system directories if search of
6029 libthread-db-search-path fails, that is now done via $sdir.
6030
6031 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6032
6033 * server.c (handle_query): Add EnableDisableTracepoints to the list
6034 of supported features.
6035 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
6036 tracepoints.
6037 (cmd_qtenable_disable): New.
6038 (cmd_qtstart): Install tracepoints even if disabled.
6039 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6040 receiving a QTEnable or QTDisable packet.
6041 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6042 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6043 tracepoints.
6044 (gdb_probe): Skip data collection if static tracepoint is disabled.
6045
6046 2011-05-10 Doug Evans <dje@google.com>
6047
6048 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6049
6050 2011-05-04 Doug Evans <dje@google.com>
6051
6052 * linux-low.c (linux_join): Skip process lookup.
6053 * spu-low.c (spu_join): Ditto.
6054 * server.c (join_inferiors_callback): Delete.
6055 (process_serial_event): For 'D' packet (detach) call join_inferior
6056 directly.
6057
6058 2011-05-04 Joseph Myers <joseph@codesourcery.com>
6059
6060 * README: Don't mention xscale*-*-linux*.
6061 * configure.srv (xscale*-*-linux*): Don't handle target.
6062
6063 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6064
6065 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6066 casting pointers.
6067 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6068 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6069 (i386_emit_void_call_2): Likewise.
6070
6071 2011-04-26 Yao Qi <yao@codesourcery.com>
6072
6073 * linux-low.c: Move common macros to linux-ptrace.h.
6074 Include linux-ptrace.h.
6075 * Makefile.in (linux_ptrace_h): New.
6076 (linux-low.o): Depends on linux-ptrace.h.
6077
6078 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6079
6080 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6081 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6082 (remote_prepare): New function with most of the TCP code from ...
6083 (remote_open): ... here. Detect PORT here unconditionally. Move also
6084 setting transport_is_reliable.
6085 * server.c (run_once): New variable.
6086 (gdbserver_usage): Document it.
6087 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6088 the first run if RUN_ONCE.
6089 * server.h (run_once, remote_prepare): New declarations.
6090
6091 2011-04-19 Tom Tromey <tromey@redhat.com>
6092
6093 * win32-low.c (handle_load_dll): Remove duplicate "the".
6094
6095 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6096
6097 Remove support for old Cygwin 1.5 versions.
6098 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6099 function to avoid warning.
6100 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6101 warning.
6102
6103 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6104
6105 * gdbserver/server.h (Macro _): Define it if not available.
6106
6107 2011-03-14 Michael Snyder <msnyder@vmware.com>
6108
6109 * hostio.c (handle_close): Remove unnecessary null test.
6110
6111 2011-03-10 Joel Brobecker <brobecker@adacore.com>
6112
6113 * Makefile.in (maintainer-clean realclean distclean): Remove
6114 "make ... subdir_do" command.
6115
6116 2011-03-10 Michael Snyder <msnyder@vmware.com>
6117
6118 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6119
6120 * server.c (handle_v_run): Free alloced buffer on early return.
6121
6122 2011-03-09 Yao Qi <yao@codesourcery.com>
6123
6124 Revert:
6125 2011-03-04 Yao Qi <yao@codesourcery.com>
6126
6127 * Makefile.in: Remove GNU make feature --directory.
6128
6129 2011-03-05 Yao Qi <yao@codesourcery.com>
6130
6131 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6132 (subdir_do): New make target. Copied from gdb/Makefile.
6133 (maintainer-clean, realclean, distclean, clean): Call corresponding
6134 make targets in common/Makefile.
6135
6136 2011-02-11 Yao Qi <yao@codesourcery.com>
6137
6138 * configure.ac: Call AC_PROG_RANLIB.
6139 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6140 * configure: Regenerate.
6141
6142 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6143
6144 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6145
6146 2011-03-06 Yao Qi <yao@codesourcery.com>
6147
6148 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6149
6150 2011-03-05 Yao Qi <yao@codesourcery.com>
6151
6152 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6153 (subdir_do): New make target. Copied from gdb/Makefile.
6154 (maintainer-clean, realclean, distclean, clean): Call corresponding
6155 make targets in common/Makefile.
6156
6157 2011-03-04 Yao Qi <yao@codesourcery.com>
6158
6159 * Makefile.in: Remove GNU make feature --directory.
6160
6161 2011-03-04 Michael Snyder <msnyder@vmware.com>
6162
6163 * server.c (queue_stop_reply): Call xmalloc not malloc.
6164
6165 2011-03-02 Michael Snyder <msnyder@vmware.com>
6166
6167 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6168
6169 2011-02-28 Michael Snyder <msnyder@vmware.com>
6170
6171 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6172 (cmd_qtframe): Ditto.
6173 (cmd_qtbuffer): Ditto.
6174 (cmd_bigqtbuffer): Ditto.
6175
6176 * utils.c (decimal2str): Initialize 'width' to nine, then
6177 don't mess with it.
6178
6179 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6180
6181 * hostio.c (require_data): Free *data, not data.
6182
6183 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6184
6185 * hostio.c (require_data): Use free, not xfree.
6186
6187 2011-02-27 Michael Snyder <msnyder@vmware.com>
6188
6189 * server.c (handle_query): Discard unused value.
6190
6191 * hostio.c (require_data): Free malloc memory before returning
6192 error.
6193
6194 2011-02-26 Michael Snyder <msnyder@vmware.com>
6195
6196 * linux-low.c (list_threads): Call closedir for dirent.
6197
6198 2011-02-27 Michael Snyder <msnyder@vmware.com>
6199
6200 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6201 a case statement falls through.
6202
6203 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6204
6205 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6206 in comparison.
6207
6208 2011-02-26 Michael Snyder <msnyder@vmware.com>
6209
6210 * utils.c (decimal2str): Eliminate dead code and dead param.
6211 (pulongest): Drop dead param from call to decimal2str.
6212 (plongest): Ditto.
6213
6214 2011-02-24 Joel Brobecker <brobecker@adacore.com>
6215
6216 Revert the following patch (not approved yet):
6217 2011-02-21 Hui Zhu <teawater@gmail.com>
6218 * tracepoint.c (tp_printf): New function.
6219 (eval_agent_expr): Handle gdb_agent_op_printf.
6220
6221 2011-02-21 Hui Zhu <teawater@gmail.com>
6222
6223 * tracepoint.c (tp_printf): New function.
6224 (eval_agent_expr): Handle gdb_agent_op_printf.
6225
6226 2011-02-18 Tom Tromey <tromey@redhat.com>
6227
6228 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6229 (tracepoint.o): Likewise.
6230 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6231 (gdb_agent_op_names): Likewise.
6232
6233 2011-02-18 Tom Tromey <tromey@redhat.com>
6234
6235 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6236 gdb_agent_op_rot>: New constants.
6237 (gdb_agent_op_names): Add pick and roll.
6238 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6239 cases.
6240
6241 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6242
6243 * aclocal.m4: Regenerated with aclocal-1.11.1.
6244
6245 2011-02-14 Pedro Alves <pedro@codesourcery.com>
6246
6247 * server.c (handle_qxfer_traceframe_info): New.
6248 (qxfer_packets): Register "traceframe-info".
6249 (handle_query): Report support for qXfer:traceframe-info:read+.
6250 * tracepoint.c (match_blocktype): New.
6251 (traceframe_find_block_type): Rename to ...
6252 (traceframe_walk_blocks): ... this. Add callback filter argument,
6253 and use it.
6254 (traceframe_find_block_type): New, reimplemented on top of
6255 traceframe_walk_blocks.
6256 (build_traceframe_info_xml): New.
6257 (traceframe_read_info): New.
6258 * server.h (traceframe_read_info): Declare.
6259
6260 2011-02-11 Yao Qi <yao@codesourcery.com>
6261
6262 * configure.ac: Call AC_PROG_RANLIB.
6263 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6264 * configure: Regenerate.
6265
6266 2011-02-07 Pedro Alves <pedro@codesourcery.com>
6267
6268 * server.c (gdb_read_memory): Change return semantics to allow
6269 partial transfers.
6270 (handle_search_memory_1): Adjust.
6271 (process_serial_event) <'m' packet>: Handle partial transfers.
6272 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6273
6274 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6275
6276 * regcache.c (init_register_cache): Initialize
6277 regcache->register_status.
6278 (free_register_cache): Release regcache->register_status.
6279 (regcache_cpy): Copy register_status.
6280 (registers_to_string): Print 'x's for unavailable registers.
6281 (supply_register): Mark the register's status valid or
6282 unavailable, depending on whether a buffer was passed in or not.
6283 (supply_register_zeroed): New.
6284 (supply_regblock): Mark the registers' status valid or
6285 unavailable, depending on whether a buffer was passed in or not.
6286 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6287 (struct regcache): New `register_status' field.
6288 (supply_register_zeroed): Declare.
6289 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6290 supply_register_zeroed, rather than passing a NULL buffer to
6291 supply_register.
6292 * tracepoint.c (fetch_traceframe_registers): Update comment.
6293
6294 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6295
6296 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6297 buffer explicit.
6298
6299 2011-01-25 Pedro Alves <pedro@codesourcery.com>
6300
6301 * server.h (decode_xfer_write): Change prototype.
6302 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6303 and don't extract the annex here.
6304 * server.c (decode_xfer_read): Remove `annex' parameter,
6305 and don't extract the annex here.
6306 (decode_xfer): New.
6307 (struct qxfer): New.
6308 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6309 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6310 (handle_qxfer_statictrace): New functions, abstracted out from
6311 handle_query, and made to use the struct qxfer interface.
6312 (handle_threads_qxfer_proper): Rename to ...
6313 (handle_qxfer_threads_proper): ... this.
6314 (handle_threads_qxfer): Rename to ...
6315 (handle_qxfer_threads): ... this. Adjust.
6316 (qxfer_packets): New array.
6317 (handle_qxfer): New function.
6318 (handle_query): Use handle_qxfer.
6319
6320 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6321
6322 * gdbreplay.c: Shorten lines of >= 80 columns.
6323 * linux-low.c: Ditto.
6324 * linux-ppc-low.c: Ditto.
6325 * linux-s390-low.c: Ditto.
6326 * linux-sparc-low.c: Ditto.
6327 * linux-x86-low.c: Ditto.
6328 * linux-xtensa-low.c: Ditto.
6329 * mem-break.c: Ditto.
6330 * nto-low.c: Ditto.
6331 * regcache.h: Ditto.
6332 * remote-utils.c: Ditto.
6333 * server.c: Ditto.
6334 * server.h: Ditto.
6335 * thread-db.c: Ditto.
6336 * tracepoint.c: Ditto.
6337 * utils.c: Ditto.
6338 * win32-low.h: Ditto.
6339
6340 2011-01-05 Joel Brobecker <brobecker@adacore.com>
6341
6342 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6343 update.
6344
6345 2011-01-01 Joel Brobecker <brobecker@adacore.com>
6346
6347 * server.c (gdbserver_version): Update copyright year in version
6348 output.
6349 * gdbreplay.c (gdbreplay_version): Ditto.
6350
6351 2010-12-29 Jie Zhang <jie.zhang@analog.com>
6352
6353 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6354 * linux-bfin-low.c: New file.
6355 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6356 PT_DATA_ADDR for BFIN targets.
6357 * Makefile.in (SFILES): Add linux-bfin-low.c.
6358 (clean): Remove reg-bfin.c.
6359 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6360 * README: Mention supported Blackfin targets.
6361
6362 2010-12-23 Mike Frysinger <vapier@gentoo.org>
6363
6364 * .gitignore: New file.
6365
6366 2010-11-16 Mike Frysinger <vapier@gentoo.org>
6367
6368 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6369
6370 2010-10-22 Jie Zhang <jie@codesourcery.com>
6371
6372 * Makefile.in: Add FLAGS_TO_PASS variable.
6373 (install): Remove dependency of install-only and recursively
6374 invoke make for install-only.
6375
6376 2010-10-04 Doug Evans <dje@google.com>
6377
6378 * Makefile.in (uninstall): Use $(DESTDIR).
6379
6380 2010-09-24 Pedro Alves <pedro@codesourcery.com>
6381
6382 PR gdb/11842
6383
6384 * linux-x86-low.c (compat_siginfo_from_siginfo)
6385 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6386 si_code is < 0. Check for si_code == SI_TIMER before checking for
6387 si_code < 0.
6388
6389 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6390
6391 * lynx-i386-low.c: New file.
6392 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6393
6394 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6395
6396 * lynx-low.c (ptrace_request_to_str): Remove handling for
6397 request values that have been removed in LynxOS 5.x.
6398
6399 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6400
6401 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6402 <ptrace.h>
6403
6404 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6405
6406 * configure.ac: Add --enable-inprocess-agent option.
6407 * configure: Rebuilt.
6408
6409 2010-09-06 Yao Qi <yao@codesourcery.com>
6410
6411 * linux-low.c (linux_kill): Remove unused variable.
6412 (linux_stabilize_threads): Likewise.
6413 * server.c (start_inferior): Likewise.
6414 (queue_stop_reply_callback): Likewise.
6415 * tracepoint.c (do_action_at_tracepoint): Likewise.
6416
6417 2010-09-06 Yao Qi <yao@codesourcery.com>
6418
6419 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6420 on return.
6421
6422 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6423
6424 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6425
6426 2010-09-06 Pedro Alves <pedro@codesourcery.com>
6427
6428 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6429 "$(IPA_DEPFILES)".
6430
6431 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6432
6433 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6434 gdbserver/lynx-ppc-low.c: New files.
6435 * Makefile.in (lynx_low_h): New variable.
6436 (lynx-low.o, lynx-ppc-low.o): New rules.
6437 * configure.ac: On LynxOS, link with -lnetinet.
6438 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6439 * configure: regenerate.
6440
6441 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6442
6443 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6444 * configure.ac: Add check for vasprintf and vsnprintf.
6445 * configure, config.in: Regenerate.
6446 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6447
6448 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6449
6450 * gdbreplay.c: Move include of alloca.h up, next to include of
6451 malloc.h.
6452 * server.h: Add include of malloc.h.
6453 * mem-break.c: Remove include of malloc.h.
6454 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6455
6456 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6457
6458 * Makefile.in (memmem.o): Build with -Wno-error.
6459
6460 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6461
6462 * utils.c (xsnprintf): Make non-static.
6463 * server.h: Add xsnprintf declaration.
6464 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6465 replace calls to snprintf by calls to xsnprintf throughout.
6466
6467 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6468
6469 * configure.ac: Add configure check for alloca.
6470 * configure, config.in: Regenerate.
6471 * server.h: Include alloca.h if it exists.
6472 * gdbreplay.c: Include alloca.h if it exists.
6473
6474 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6475
6476 * linux-low.c (__SIGRTMIN): Define if not already defined.
6477 (linux_create_inferior): Check for __ANDROID__ rather than
6478 __SIGRTMIN.
6479 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6480 are already deferred.
6481 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6482 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6483 stopped and already has a pending signal to report.
6484 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6485 a pending signal to report or is moving out of a jump pad.
6486 (linux_init_signals): Check for __ANDROID__ rather than
6487 __SIGRTMIN.
6488
6489 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6490
6491 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6492 debug_threads check. Avoid a linear search when not doing debug
6493 output.
6494
6495 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6496
6497 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6498 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6499 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6500 (process_event): Change local fd's type to gdb_fildes_t.
6501 (create_file_handler): Adjust prototype.
6502 (delete_file_handler): Adjust prototype.
6503 (handle_file_event): Adjust prototype. Use pfildes.
6504 (create_file_event): Adjsut prototype.
6505 * remote-utils.c (remote_desc, listen_desc): Change type to
6506 gdb_fildes_t.
6507 * server.h: New gdb_fildes_t typedef.
6508 [USE_WIN32API]: Include winsock2.h.
6509 (delete_file_handler, add_file_handler): Adjust prototypes.
6510 (pfildes): Declare.
6511 * utils.c (pfildes): New.
6512
6513 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6514
6515 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6516 * configure: Regenerate.
6517
6518 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6519
6520 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6521 (linux_done_accessing_memory): ... this.
6522 (linux_target_ops): Adjust.
6523 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6524 * nto-low.c (nto_target_ops): Adjust comment.
6525 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6526 * spu-low.c (spu_target_ops): Adjust comment.
6527 * target.h (target_ops): Rename unprepare_to_access_memory field
6528 to done_accessing_memory.
6529 (unprepare_to_access_memory): Rename to ...
6530 (done_accessing_memory): ... this.
6531
6532 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6533
6534 * linux-low.c (linux_prepare_to_access_memory): New.
6535 (linux_unprepare_to_access_memory): New.
6536 (linux_target_ops): Install them.
6537 * server.c (read_memory): Rename to ...
6538 (gdb_read_memory): ... this. Use
6539 prepare_to_access_memory/prepare_to_access_memory.
6540 (write_memory): Rename to ...
6541 (gdb_write_memory): ... this. Use
6542 prepare_to_access_memory/prepare_to_access_memory.
6543 (handle_search_memory_1): Adjust.
6544 (process_serial_event): Adjust.
6545 * target.h (struct target_ops): New fields
6546 prepare_to_access_memory and unprepare_to_access_memory.
6547 (prepare_to_access_memory, unprepare_to_access_memory): New.
6548 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6549 prepare_to_access_memory/prepare_to_access_memory.
6550 * nto-low.c (nto_target_ops): Adjust.
6551 * spu-low.c (spu_target_ops): Adjust.
6552 * win32-low.c (win32_target_ops): Adjust.
6553
6554 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6555
6556 * Makefile.in (WARN_CFLAGS): Get it from configure.
6557 (WERROR_CFLAGS): New.
6558 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6559 * configure.ac: Introduce --enable-werror, which adds -Werror to
6560 the compiler command line. Enabled by default. Disable with
6561 --disable-werror. Add -Wdeclaration-after-statement
6562 Wpointer-arith and -Wformat-nonliteral to warning flags.
6563 * configure: Regenerate.
6564
6565 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6566
6567 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6568
6569 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6570
6571 * gdbreplay.c (remote_error): New.
6572 (gdbchar): New.
6573 (expect): Use gdbchar. Check for error reading from GDB.
6574 Clarify sync error output.
6575 (play): Check for errors writing to GDB.
6576 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6577 * remote-utils.c (getpkt): Check for errors writing to the remote
6578 descriptor.
6579
6580 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6581
6582 * linux-low.c (linux_wait_1): Move non-debugging code out of
6583 `debug_threads' control.
6584
6585 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6586
6587 * linux-low.c (linux_wait_1): Don't set last_status here.
6588 * server.c (push_event, queue_stop_reply_callback): Assert we're
6589 not pushing a TARGET_WAITKIND_IGNORE event.
6590 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6591 (myresume, handle_target_event): Set the thread's last_resume_kind
6592 and last_status from the target returned status.
6593
6594 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6595
6596 PR threads/10729
6597
6598 * linux-x86-low.c (update_debug_registers_callback): New.
6599 (i386_dr_low_set_addr): Use it.
6600 (i386_dr_low_get_addr): New.
6601 (i386_dr_low_set_control): Use update_debug_registers_callback.
6602 (i386_dr_low_get_control): New.
6603 (i386_dr_low_get_status): Adjust.
6604 * linux-low.c (linux_stop_lwp): New.
6605 * linux-low.h (linux_stop_lwp): Declare.
6606
6607 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6608 argument instead of a i386_debug_reg_state.
6609 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6610 a i386_debug_reg_state.
6611 (i386_insert_aligned_watchpoint): Adjust.
6612 (i386_remove_aligned_watchpoint): Adjust.
6613 (i386_low_stopped_data_address): Read the debug registers from the
6614 inferior instead of from the mirrors.
6615 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6616 (i386_dr_low_get_addr): Declare.
6617 (i386_dr_low_get_control): Declare.
6618 (i386_dr_low_get_status): Change prototype.
6619
6620 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6621 (i386_dr_low_get_addr): New.
6622 (i386_dr_low_get_control): New.
6623 (i386_dr_low_get_status): Adjust prototype. Return
6624 dr_status_mirror.
6625 (i386_initial_stuff): Clear dr_status_mirror and
6626 dr_control_mirror.
6627 (i386_get_thread_context): Adjust.
6628 (i386_set_thread_context): Adjust.
6629 (i386_thread_added): Adjust.
6630
6631 2010-08-24 Pedro Alves <pedro@codesourcery.com>
6632
6633 * linux-low.h (linux_thread_area): Delete declaration.
6634
6635 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6636
6637 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6638 after its termination.
6639
6640 2010-08-09 Pedro Alves <pedro@codesourcery.com>
6641
6642 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6643 (gdb_wants_all_stopped): Delete.
6644 (linux_wait_1): Don't call them.
6645 * server.c (handle_v_cont): Tag all threads as want-stopped.
6646 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6647 stopped as "client-wants-stopped".
6648
6649 2010-07-31 Pedro Alves <pedro@codesourcery.com>
6650
6651 * Makefile.in (signals_h): New.
6652 (server_h): Depend on it.
6653 (server.o): Don't depend on $(signals_def).
6654 (signals.o): Depend on $(signals_def).
6655
6656 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6657
6658 * Makefile.in (signals_def): New.
6659 (server_h): Append include/gdb/signals.h and signals_def.
6660 (server.o): Append signals_def.
6661
6662 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6663
6664 * server.c (handle_target_event): Use target_signal_to_host for
6665 resume_info.sig initialization.
6666 * target.h (struct thread_resume) <sig>: New comment.
6667
6668 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6669
6670 * server.c (handle_query): strcpy() the returned string from paddress()
6671 instead of sprintf().
6672 * utils.c (paddress): Return phex_nz().
6673
6674 2010-07-07 Joel Brobecker <brobecker@adacore.com>
6675
6676 * server.c (handle_v_cont): Call mourn_inferior if process
6677 just exited.
6678 (myresume): Likewise.
6679
6680 2010-07-01 Pedro Alves <pedro@codesourcery.com>
6681
6682 Static tracepoints, and integration with UST.
6683
6684 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6685 * mem-break.c (uninsert_all_breakpoints)
6686 (reinsert_all_breakpoints): New.
6687 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6688 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6689 (gdb_agent_ust_loaded, helper_thread_id)
6690 (gdb_agent_helper_thread_id): New macros.
6691 (struct ipa_sym_addresses): Add addr_ust_loaded,
6692 addr_helper_thread_id, addr_cmd_buf.
6693 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6694 (in_process_agent_loaded_ust): New.
6695 (write_e_ust_not_loaded): New.
6696 (maybe_write_ipa_ust_not_loaded): New.
6697 (struct collect_static_trace_data_action): New.
6698 (enum tracepoint_type) <static_tracepoint>: New.
6699 (struct tracepoint) <handle>: Mention static tracepoints.
6700 (struct static_tracepoint_ctx): New.
6701 (CMD_BUF_SIZE): New.
6702 (add_tracepoint_action): Handle static tracepoint actions.
6703 (unprobe_marker_at): New.
6704 (clear_installed_tracepoints): Handle static tracepoints.
6705 (cmd_qtdp): Handle static tracepoints.
6706 (probe_marker_at): New.
6707 (cmd_qtstart): Handle static tracepoints.
6708 (response_tracepoint): Handle static tracepoints.
6709 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6710 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6711 (get_context_regcache): Handle static tracepoints.
6712 (do_action_at_tracepoint): Handle static tracepoint actions.
6713 (traceframe_find_block_type): Handle static trace data blocks.
6714 (traceframe_read_sdata): New.
6715 (download_tracepoints): Download static tracepoint actions.
6716 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6717 (GDB_PROBE_NAME): New.
6718 (ust_ops): New.
6719 (GET_UST_SYM): New.
6720 (USTF): New.
6721 (dlsym_ust): New.
6722 (ust_marker_to_static_tracepoint): New.
6723 (gdb_probe): New.
6724 (collect_ust_data_at_tracepoint): New.
6725 (gdb_ust_probe): New.
6726 (UNIX_PATH_MAX, SOCK_DIR): New.
6727 (gdb_ust_connect_sync_socket): New.
6728 (resume_thread, stop_thread): New.
6729 (run_inferior_command): New.
6730 (init_named_socket): New.
6731 (gdb_ust_socket_init): New.
6732 (cstr_to_hexstr): New.
6733 (next_st): New.
6734 (first_marker, next_marker): New.
6735 (response_ust_marker): New.
6736 (cmd_qtfstm, cmd_qtsstm): New.
6737 (unprobe_marker_at, probe_marker_at): New.
6738 (cmd_qtstmat, gdb_ust_thread): New.
6739 (gdb_ust_init): New.
6740 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6741 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6742 (ST_REGENTRY): New.
6743 (x86_64_st_collect_regmap): New.
6744 (X86_64_NUM_ST_COLLECT_GREGS): New.
6745 (AMD64_RIP_REGNUM): New.
6746 (supply_static_tracepoint_registers): New.
6747 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6748 (ST_REGENTRY): New.
6749 (i386_st_collect_regmap): New.
6750 (i386_NUM_ST_COLLECT_GREGS): New.
6751 (supply_static_tracepoint_registers): New.
6752 * server.c (handle_query): Handle qXfer:statictrace:read.
6753 <qSupported>: Report support for StaticTracepoints, and
6754 qXfer:statictrace:read features.
6755 * server.h (traceframe_read_sdata)
6756 (supply_static_tracepoint_registers): Declare.
6757 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6758 (unpack_varlen_hex): Include in IPA build.
6759 * Makefile.in (ustlibs, ustinc): New.
6760 (IPA_OBJS): Add remote-utils-ipa.o.
6761 ($(IPA_LIB)): Link -ldl and -lpthread.
6762 (UST_CFLAGS): New.
6763 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6764 * config.in, configure: Regenerate.
6765
6766 2010-06-20 Ian Lance Taylor <iant@google.com>
6767 Pedro Alves <pedro@codesourcery.com>
6768
6769 * linux-x86-low.c (always_true): Delete.
6770 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6771 trying to fool the compiler with always_true.
6772
6773 2010-06-20 Pedro Alves <pedro@codesourcery.com>
6774
6775 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6776 conditions in gdbserver.
6777
6778 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6779
6780 * spu-low.c (spu_read_memory): Wrap around local store limit.
6781 (spu_write_memory): Likewise.
6782
6783 2010-06-15 Pedro Alves <pedro@codesourcery.com>
6784
6785 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6786 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6787 LONGEST uses.
6788 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6789 uses.
6790 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6791 uses with LONGEST uses.
6792
6793 2010-06-14 Stan Shebs <stan@codesourcery.com>
6794 Pedro Alves <pedro@codesourcery.com>
6795
6796 Bytecode compiler.
6797
6798 * linux-x86-low.c: Include limits.h.
6799 (add_insns): New.
6800 (always_true): New.
6801 (EMIT_ASM): New.
6802 (EMIT_ASM32): New.
6803 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6804 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6805 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6806 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6807 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6808 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6809 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6810 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6811 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6812 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6813 (amd64_emit_void_call_2): New.
6814 (amd64_emit_ops): New.
6815 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6816 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6817 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6818 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6819 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6820 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6821 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6822 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6823 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6824 (i386_emit_stack_adjust, i386_emit_int_call_1)
6825 (i386_emit_void_call_2): New.
6826 (i386_emit_ops): New.
6827 (x86_emit_ops): New.
6828 (the_low_target): Install x86_emit_ops.
6829 * server.h (struct emit_ops): New.
6830 (get_raw_reg_func_addr): Declare.
6831 (current_insn_ptr, emit_error): Declare.
6832 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6833 (set_trace_state_variable_value): New defines.
6834 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6835 addr_get_trace_state_variable_value and
6836 addr_set_trace_state_variable_value.
6837 (symbol_list): New fields for get_raw_reg,
6838 get_trace_state_variable_value and set_trace_state_variable_value.
6839 (condfn): New typedef.
6840 (struct tracepoint): New field `compiled_cond'.
6841 (do_action_at_tracepoint): Clear compiled_cond.
6842 (get_trace_state_variable_value, set_trace_state_variable_value):
6843 Export in the IPA.
6844 (condition_true_at_tracepoint): If there's a compiled condition,
6845 run that.
6846 (current_insn_ptr, emit_error): New globals.
6847 (struct bytecode_address): New.
6848 (get_raw_reg_func_addr): New.
6849 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6850 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6851 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6852 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6853 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6854 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6855 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6856 (compile_tracepoint_condition, compile_bytecodes): New.
6857 * target.h (emit_ops): Forward declare.
6858 (struct target_ops): New field emit_ops.
6859 (target_emit_ops): New.
6860 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6861 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6862 * linux-low.c (linux_emit_ops): New.
6863 (linux_target_ops): Install it.
6864 * linux-low.h (struct linux_target_ops): New field emit_ops.
6865
6866 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6867
6868 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6869 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6870
6871 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6872 Stan Shebs <stan@codesourcery.com>
6873
6874 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6875 (all): Depend on $(extra_libraries).
6876 (install-only): Install the IPA.
6877 (IPA_OBJS, IPA_LIB): New.
6878 (clean): Remove the IPA lib.
6879 (IPAGENT_CFLAGS): New.
6880 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6881 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6882 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6883 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6884 * configure.ac: Check for atomic builtins support in the compiler.
6885 (IPA_DEPFILES, extra_libraries): Define.
6886 * configure.srv (ipa_obj): Add description.
6887 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6888 (i[34567]86-*-linux*): Set ipa_obj.
6889 (x86_64-*-linux*): Set ipa_obj.
6890 * linux-low.c (stabilizing_threads): New.
6891 (supports_fast_tracepoints): New.
6892 (linux_detach): Stabilize threads before detaching.
6893 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6894 the lwp is either not stabilizing, or is moving out of a jump pad.
6895 (linux_fast_tracepoint_collecting): New.
6896 (maybe_move_out_of_jump_pad): New.
6897 (enqueue_one_deferred_signal): New.
6898 (dequeue_one_deferred_signal): New.
6899 (linux_wait_for_event_1): If moving out of a jump pad, defer
6900 pending signals to later.
6901 (linux_stabilize_threads): New.
6902 (linux_wait_1): Check if threads need moving out of jump pads, and
6903 do it if so.
6904 (stuck_in_jump_pad_callback): New.
6905 (move_out_of_jump_pad_callback): New.
6906 (lwp_running): New.
6907 (linux_resume_one_lwp): Handle moving out of jump pads.
6908 (linux_set_resume_request): Dequeue deferred signals.
6909 (need_step_over_p): Also step over fast tracepoint jumps.
6910 (start_step_over): Also uninsert fast tracepoint jumps.
6911 (finish_step_over): Also reinsert fast tracepoint jumps.
6912 (linux_install_fast_tracepoint_jump): New.
6913 (linux_target_ops): Install linux_stabilize_threads and
6914 linux_install_fast_tracepoint_jump_pad.
6915 * linux-low.h (linux_target_ops) <get_thread_area,
6916 install_fast_tracepoint_jump_pad>: New fields.
6917 (struct lwp_info) <collecting_fast_tracepoint,
6918 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6919 (linux_get_thread_area): Declare.
6920 * linux-x86-low.c (jump_insn): New.
6921 (x86_get_thread_area): New.
6922 (append_insns): New.
6923 (push_opcode): New.
6924 (amd64_install_fast_tracepoint_jump_pad): New.
6925 (i386_install_fast_tracepoint_jump_pad): New.
6926 (x86_install_fast_tracepoint_jump_pad): New.
6927 (the_low_target): Install x86_get_thread_area and
6928 x86_install_fast_tracepoint_jump_pad.
6929 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6930 (struct fast_tracepoint_jump): New.
6931 (fast_tracepoint_jump_insn): New.
6932 (fast_tracepoint_jump_shadow): New.
6933 (find_fast_tracepoint_jump_at): New.
6934 (fast_tracepoint_jump_here): New.
6935 (delete_fast_tracepoint_jump): New.
6936 (set_fast_tracepoint_jump): New.
6937 (uninsert_fast_tracepoint_jumps_at): New.
6938 (reinsert_fast_tracepoint_jumps_at): New.
6939 (set_breakpoint_at): Use write_inferior_memory.
6940 (uninsert_raw_breakpoint): Use write_inferior_memory.
6941 (check_mem_read): Mask out fast tracepoint jumps.
6942 (check_mem_write): Mask out fast tracepoint jumps.
6943 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6944 (set_fast_tracepoint_jump): Declare.
6945 (delete_fast_tracepoint_jump)
6946 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6947 (reinsert_fast_tracepoint_jumps_at): Declare.
6948 * regcache.c: Don't compile many functions when building the
6949 in-process agent library.
6950 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6951 the register buffer in the heap.
6952 (free_register_cache): If the register buffer isn't owned by the
6953 regcache, don't free it.
6954 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6955 pre-existing register caches.
6956 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6957 type.
6958 (convert_ascii_to_int): : Constify `from' parameter type.
6959 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6960 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6961 the needed buffer in-place.
6962 (relocate_instruction): New.
6963 * server.c (handle_query) <qSymbols>: If the target supports
6964 tracepoints, give it a chance of looking up symbols. Report
6965 support for fast tracepoints.
6966 (handle_status): Stabilize threads.
6967 (process_serial_event): Adjust.
6968 * server.h (struct fast_tracepoint_jump): Forward declare.
6969 (struct process_info) <fast_tracepoint_jumps>: New field.
6970 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6971 (decode_X_packet, decode_M_packet): Adjust.
6972 (relocate_instruction): Declare.
6973 (in_process_agent_loaded): Declare.
6974 (tracepoint_look_up_symbols): Declare.
6975 (struct fast_tpoint_collect_status): Declare.
6976 (fast_tracepoint_collecting): Declare.
6977 (force_unlock_trace_buffer): Declare.
6978 (handle_tracepoint_bkpts): Declare.
6979 (initialize_low_tracepoint)
6980 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6981 * target.h (struct target_ops) <stabilize_threads,
6982 install_fast_tracepoint_jump_pad>: New fields.
6983 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6984 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6985 [HAVE_STDINT_H]: Include stdint.h.
6986 (trace_debug_1): Rename to ...
6987 (trace_vdebug): ... this.
6988 (trace_debug): Rename to ...
6989 (trace_debug_1): ... this. Add `level' parameter.
6990 (trace_debug): New.
6991 (ATTR_USED, ATTR_NOINLINE): New.
6992 (IP_AGENT_EXPORT): New.
6993 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6994 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6995 (about_to_request_buffer_space, trace_buffer_is_full)
6996 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6997 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6998 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6999 (traceframe_write_count, traceframes_created)
7000 (trace_state_variables)
7001 New renaming defines.
7002 (struct ipa_sym_addresses): New.
7003 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7004 (symbol_list): New.
7005 (ipa_sym_addrs): New.
7006 (all_tracepoint_symbols_looked_up): New.
7007 (in_process_agent_loaded): New.
7008 (write_e_ipa_not_loaded): New.
7009 (maybe_write_ipa_not_loaded): New.
7010 (tracepoint_look_up_symbols): New.
7011 (debug_threads) [IN_PROCESS_AGENT]: New.
7012 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7013 (UNKNOWN_SIDE_EFFECTS): New.
7014 (stop_tracing): New.
7015 (flush_trace_buffer): New.
7016 (stop_tracing_bkpt): New.
7017 (flush_trace_buffer_bkpt): New.
7018 (read_inferior_integer): New.
7019 (read_inferior_uinteger): New.
7020 (read_inferior_data_pointer): New.
7021 (write_inferior_data_pointer): New.
7022 (write_inferior_integer): New.
7023 (write_inferior_uinteger): New.
7024 (struct collect_static_trace_data_action): Delete.
7025 (enum tracepoint_type): New.
7026 (struct tracepoint) <type>: New field `type'.
7027 <actions_str, step_actions, step_actions_str>: Only include in
7028 GDBserver.
7029 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7030 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7031 (tracepoints): Use IP_AGENT_EXPORT.
7032 (last_tracepoint): Don't include in the IPA.
7033 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7034 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7035 (alloced_trace_state_variables): New.
7036 (trace_state_variables): Use IP_AGENT_EXPORT.
7037 (traceframe_t): Delete unused variable.
7038 (circular_trace_buffer): Don't include in the IPA.
7039 (trace_buffer_start): Delete.
7040 (struct trace_buffer_control): New.
7041 (trace_buffer_free): Delete.
7042 (struct ipa_trace_buffer_control): New.
7043 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7044 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7045 New.
7046 (trace_buffer_ctrl): New.
7047 (TRACE_BUFFER_CTRL_CURR): New.
7048 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7049 Reimplement as macros.
7050 (trace_buffer_wrap): Delete.
7051 (traceframe_write_count, traceframe_read_count)
7052 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7053 (struct tracepoint_hit_ctx) <type>: New field.
7054 (struct fast_tracepoint_ctx): New.
7055 (memory_barrier): New.
7056 (cmpxchg): New.
7057 (record_tracepoint_error): Update atomically in the IPA.
7058 (clear_inferior_trace_buffer): New.
7059 (about_to_request_buffer_space): New.
7060 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7061 updating the same buffer.
7062 (add_tracepoint): Default the tracepoint's type to trap
7063 tracepoint, and orig_size to -1.
7064 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7065 internal variables.
7066 (create_trace_state_variable): New parameter `gdb'. Handle it.
7067 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7068 (cmd_qtdp): Handle fast tracepoints.
7069 (cmd_qtdv): Adjust.
7070 (max_jump_pad_size): New.
7071 (gdb_jump_pad_head): New.
7072 (get_jump_space_head): New.
7073 (claim_jump_space): New.
7074 (sort_tracepoints): New.
7075 (MAX_JUMP_SIZE): New.
7076 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7077 IPA.
7078 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7079 support. Upload fast traceframes, and delete internal IPA
7080 breakpoints.
7081 (stop_tracing_handler): New.
7082 (flush_trace_buffer_handler): New.
7083 (cmd_qtstop): Upload fast tracepoints.
7084 (response_tracepoint): Handle fast tracepoints.
7085 (tracepoint_finished_step): Upload fast traceframes. Set the
7086 tracepoint hit context's tracepoint type.
7087 (handle_tracepoint_bkpts): New.
7088 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7089 type. Add comment about fast tracepoints.
7090 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7091 non-existing action_str field.
7092 (get_context_regcache): Handle fast tracepoints.
7093 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7094 to the regcache.
7095 (fast_tracepoint_from_jump_pad_address): New.
7096 (fast_tracepoint_from_ipa_tpoint_address): New.
7097 (collecting_t): New.
7098 (force_unlock_trace_buffer): New.
7099 (fast_tracepoint_collecting): New.
7100 (collecting): New.
7101 (gdb_collect): New.
7102 (write_inferior_data_ptr): New.
7103 (target_tp_heap): New.
7104 (target_malloc): New.
7105 (download_agent_expr): New.
7106 (UALIGN): New.
7107 (download_tracepoints): New.
7108 (download_trace_state_variables): New.
7109 (upload_fast_traceframes): New.
7110 (IPA_FIRST_TRACEFRAME): New.
7111 (IPA_NEXT_TRACEFRAME_1): New.
7112 (IPA_NEXT_TRACEFRAME): New.
7113 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7114 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7115 (gdb_jump_pad_buffer_end): New.
7116 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7117 (initialize_tracepoint): Adjust.
7118 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7119 buffer. Initialize the low module.
7120 * utils.c (PREFIX, TOOLNAME): New.
7121 (malloc_failure): Use PREFIX.
7122 (error): In the IPA, an error causes an exit.
7123 (fatal, warning): Use PREFIX.
7124 (internal_error): Use TOOLNAME.
7125 (NUMCELLS): Increase to 10.
7126 * configure, config.in: Regenerate.
7127
7128 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7129
7130 * server.c (handle_query) <qSupported>: Do two passes over the
7131 qSupported string to avoid nesting strtok.
7132
7133 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7134
7135 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7136 (CDEPS): New.
7137 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7138 -Wl,--dynamic-list.
7139 * configure: Regenerate.
7140 * proc-service.list: New.
7141
7142 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7143
7144 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7145 New comment.
7146
7147 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7148
7149 * gdbreplay.c (remote_open): Check error return from socket() call by
7150 its equality to -1 not by it being negative.
7151 * remote-utils.c (remote_open): Likewise.
7152
7153 2010-05-23 Pedro Alves <pedro@codesourcery.com>
7154
7155 * config.h: Regenerate.
7156
7157 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7158
7159 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7160 doesn't provide PTRACE_GET_THREAD_AREA.
7161
7162 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7163
7164 * linux-m68k-low.c: Include <asm/ptrace.h>
7165 (ps_get_thread_area): Implement.
7166
7167 2010-05-03 Doug Evans <dje@google.com>
7168
7169 * event-loop.c (struct callback_event): New struct.
7170 (callback_list): New global.
7171 (append_callback_event, delete_callback_event): New functions.
7172 (process_callback): New function.
7173 (start_event_loop): Call it.
7174 * remote-utils.c (NOT_SCHEDULED): Define.
7175 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7176 moved out of readchar.
7177 (readchar): Rewrite. Call reschedule before returning.
7178 (reset_readchar): New function.
7179 (remote_close): Call it.
7180 (process_remaining, reschedule): New functions.
7181 * server.h (callback_handler_func): New typedef.
7182 (append_callback_event, delete_callback_event): Declare.
7183
7184 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7185
7186 * proc-service.c (ps_pglobal_lookup): Use
7187 thread_db_look_up_one_symbol.
7188 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7189 parameter. Use it instead of all_symbols_looked_up.
7190 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7191 field.
7192 (all_symbols_looked_up): Don't declare.
7193 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7194 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7195 field.
7196 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7197 Set all_symbols_looked_up here.
7198 (thread_db_look_up_one_symbol): New.
7199 (thread_db_get_tls_address): Adjust.
7200 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7201 thread_db object on the heap, and tentatively set it in the
7202 process structure.
7203 (thread_db_init): Don't set all_symbols_looked_up here.
7204 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7205
7206 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7207
7208 * linux-low.c (linux_kill, linux_detach): Adjust.
7209 (status_pending_p_callback): Remove redundant statement. Check
7210 for !TARGET_WAITIKIND_IGNORE, instead of
7211 TARGET_WAITKIND_STOPPED.
7212 (handle_tracepoints): Make sure LWP is locked. Adjust.
7213 (linux_wait_for_event_1): Adjust.
7214 (linux_cancel_breakpoints): New.
7215 (unsuspend_one_lwp): New.
7216 (unsuspend_all_lwps): New.
7217 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7218 (send_sigstop_callback): Change return type to int, add new
7219 `except' parameter and handle it.
7220 (suspend_and_send_sigstop_callback): New.
7221 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7222 pass them down. If SUSPEND, also increment the lwp's suspend
7223 count.
7224 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7225 (need_step_over_p): Don't consider suspended LWPs.
7226 (start_step_over): Adjust.
7227 (proceed_one_lwp): Change return type to int, add new `except'
7228 parameter and handle it.
7229 (unsuspend_and_proceed_one_lwp): New.
7230 (proceed_all_lwps): Use find_inferior instead of
7231 for_each_inferior.
7232 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7233 also decrement the suspend count of LWPs. Pass `except' down,
7234 instead of hacking its suspend count.
7235 (linux_pause_all): Add `freeze' parameter. Adjust.
7236 (linux_unpause_all): New.
7237 (linux_target_ops): Install linux_unpause_all.
7238 * server.c (handle_status): Adjust.
7239 * target.h (struct target_ops): New fields `unpause_all' and
7240 `cancel_breakpoints'. Add new parameter to `pause_all'.
7241 (pause_all): Add new `freeze' parameter.
7242 (unpause_all): New.
7243 (cancel_breakpoints): New.
7244 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7245 cancel breakpoints.
7246 (cmd_qtstart): Pause threads.
7247 (stop_tracing): Pause threads, and cancel breakpoints.
7248 * win32-low.c (win32_target_ops): Adjust.
7249
7250 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7251
7252 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7253 the inferior right away from here...
7254 (linux_wait_1): ... to here, and adjust to check the thread's
7255 last_resume_kind instead of the lwp's step or stop_expected flags.
7256
7257 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7258
7259 * README: Use consistent `GDB' and `GDBserver' spellings.
7260
7261 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7262
7263 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7264 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7265 (linux_detach_one_lwp): Assume the lwp is stopped.
7266 (any_thread_of): Delete.
7267 (linux_detach): Stop all lwps here. Don't blindly delete all
7268 breakpoints.
7269 (delete_lwp_callback): New.
7270 (linux_mourn): Delete all lwps of the process that is gone.
7271 (linux_wait_1): Don't delete the last lwp of the process here.
7272 * mem-break.h (mark_breakpoints_out): Declare.
7273 * mem-break.c (mark_breakpoints_out): New.
7274 (free_all_breakpoints): Use it.
7275 * server.c (handle_target_event): If the process is gone, mark
7276 breakpoints out.
7277 * thread-db.c (struct thread_db) <create_bp>: New field.
7278 (thread_db_enable_reporting): Fix prototype. Store a thread event
7279 breakpoint reference in the thread_db struct.
7280 (thread_db_load_search): Clear the thread_db object.
7281 (try_thread_db_load_1): Ditto.
7282 (switch_to_process): New.
7283 (disable_thread_event_reporting): Use it.
7284 (remove_thread_event_breakpoints): New.
7285 (thread_db_detach, thread_db_mourn): Use it.
7286
7287 2010-05-01 Pedro Alves <pedro@codesourcery.com>
7288
7289 * linux-low.c (linux_enable_event_reporting): New.
7290 (linux_wait_for_event_1, handle_extended_wait): Use it.
7291
7292 2010-04-30 Pedro Alves <pedro@codesourcery.com>
7293
7294 * linux-low.c (linux_kill_one_lwp, linux_kill)
7295 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7296 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7297 SIGSTOP even if the LWP is stopped.
7298 (send_sigstop_callback): New.
7299 (stop_all_lwps): Use send_sigstop_callback instead.
7300 (linux_resume_one_thread): Adjust.
7301 (proceed_one_lwp): Still proceed an LWP that the client has
7302 requested to stop, if we haven't reported it as stopped yet. Make
7303 sure that LWPs the client want stopped, have a pending SIGSTOP.
7304
7305 2010-04-26 Doug Evans <dje@google.com>
7306
7307 * server.c (handle_general_set): Make static.
7308
7309 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7310 Print received char after testing for error/eof instead of before.
7311 (input_interrupt): Tweak comment.
7312
7313 2010-04-23 Doug Evans <dje@google.com>
7314
7315 * server.c (start_inferior): Print inferior argv if --debug.
7316
7317 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7318
7319 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7320 * nto-x86-low.c: Include server.h
7321
7322 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7323
7324 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7325 be consistent with other sources of this directory.
7326 (init_registers_amd64): Correct name of source file of this function
7327 in the comment.
7328
7329 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7330
7331 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7332 64-bit executables.
7333
7334 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7335
7336 * win32-i386-low.c: Add 64-bit support.
7337 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7338 (init_registers_amd64): Declare.
7339 (mappings): Add 64-bit version of array.
7340 (init_windows_x86): New function.
7341 (the_low_target): Change init_arch field to init_windows_x86.
7342
7343 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7344
7345 * win32-low.c: Adapt to support also 64-bit architecture.
7346 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7347 (get_image_name): Use SIZE_T type for local variable `done'.
7348 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7349 (toolhelp_get_dll_name): Idem.
7350 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7351 Use uintptr_t typecast to avoid warning.
7352 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7353 (handle_exception): Use phex_nz to avoid warning.
7354 (win32_wait): Remove unused local variable `process'.
7355
7356 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7357
7358 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7359 `amd64-avx.o'.
7360
7361 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7362
7363 * configure.ac: Use `ws2_32' library for srv_mingw.
7364 * configure: Regenerate.
7365 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7366 * remote-utils.c: Likewise.
7367
7368 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7369
7370 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7371 if __x86_64__ is defined.
7372
7373 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7374
7375 * configure: Regenerate.
7376
7377 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7378
7379 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7380 * target.h (target_ops): New get_tib_address field.
7381 * win32-low.h (win32_thread_info): Add thread_local_base field.
7382 * win32-low.c (child_add_thread): Add tlb argument.
7383 Set thread_local_base field to TLB.
7384 (get_child_debug_event): Adapt to child_add_thread change.
7385 (win32_get_tib_address): New function.
7386 (win32_target_ops): Set get_tib_address field to
7387 win32_get_tib_address.
7388 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7389
7390 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7391
7392 * linux-low.c (linux_mourn): Also remove the process.
7393 * server.c (handle_target_event): Don't remove the process here.
7394 * nto-low.c (nto_mourn): New.
7395 (nto_target_ops): Install it.
7396 * spu-low.c (spu_mourn): New.
7397 (spu_target_ops): Install it.
7398 * win32-low.c (win32_mourn): New.
7399 (win32_target_ops): Install it.
7400
7401 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7402
7403 * server.h (buffer_xml_printf): Remove redundant `;'.
7404
7405 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7406
7407 * regcache.c (set_register_cache): Invalidate regcaches before
7408 changing the register cache layout.
7409 (regcache_invalidate_one): Allow a NULL regcache.
7410 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7411 regcaches before changing the register cache layout or the target
7412 regsets.
7413
7414 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7415
7416 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7417 variable warning on Linux/x86-64.
7418
7419 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7420
7421 GDBserver disconnected tracing support.
7422
7423 * linux-low.c (linux_remove_process): Delete.
7424 (add_lwp): Don't set last_resume_kind here.
7425 (linux_kill): Use `mourn'.
7426 (linux_detach): Use `thread_db_detach', and `mourn'.
7427 (linux_mourn): New.
7428 (linux_attach_lwp_1): Adjust comment.
7429 (linux_attach): last_resume_kind moved the thread_info; adjust.
7430 (status_pending_p_callback): Adjust.
7431 (linux_wait_for_event_1): Adjust.
7432 (count_events_callback, select_singlestep_lwp_callback)
7433 (select_event_lwp_callback, cancel_breakpoints_callback)
7434 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7435 (proceed_one_lwp): Adjust.
7436 (linux_async): Add debug output.
7437 (linux_thread_stopped): New.
7438 (linux_pause_all): New.
7439 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7440 linux_pause_all.
7441 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7442 (thread_db_free): Delete declaration.
7443 (thread_db_detach, thread_db_mourn): Declare.
7444 * thread-db.c (thread_db_init): Use thread_db_mourn.
7445 (thread_db_free): Delete, split in two.
7446 (disable_thread_event_reporting): New.
7447 (thread_db_detach): New.
7448 (thread_db_mourn): New.
7449
7450 * server.h (struct thread_info) <last_resume_kind>: New field.
7451 <attached>: Add comment.
7452 <gdb_detached>: New field.
7453 (handler_func): Change return type to int.
7454 (handle_serial_event, handle_target_event): Ditto.
7455 (gdb_connected): Declare.
7456 (tracing): Delete.
7457 (disconnected_tracing): Declare.
7458 (stop_tracing): Declare.
7459
7460 * server.c (handle_query) <qSupported>: Report support for
7461 disconnected tracing.
7462 (queue_stop_reply_callback): Account for running threads.
7463 (gdb_wants_thread_stopped): New.
7464 (gdb_wants_all_threads_stopped): New.
7465 (gdb_reattached_process): New.
7466 (handle_status): Clear the `gdb_detached' flag of all processes.
7467 In all-stop, stop all threads.
7468 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7469 (process_serial_event): If the remote connection breaks, or if an
7470 exit was forced with "monitor exit", force an event loop exit.
7471 Handle disconnected tracing on detach.
7472 (handle_serial_event): Adjust.
7473 (handle_target_event): If GDB isn't connected, forward events back
7474 to the inferior, unless the last process exited, in which case,
7475 exit gdbserver. Adjust interface.
7476
7477 * remote-utils.c (remote_open): Don't block in accept. Instead
7478 register an event loop source on the listen socket file
7479 descriptor. Refactor bits into ...
7480 (listen_desc): ... this new global.
7481 (gdb_connected): ... this new function.
7482 (enable_async_notification): ... this new function.
7483 (handle_accept_event): ... this new function.
7484 (remote_close): Clear remote_desc.
7485
7486 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7487
7488 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7489 New fields.
7490 (mourn_inferior): Define.
7491 (target_process_qsupported): Avoid the dangling else problem.
7492 (thread_stopped): Define.
7493 (pause_all): Define.
7494 (target_waitstatus_to_string): Declare.
7495 * target.c (target_waitstatus_to_string): New.
7496
7497 * tracepoint.c (tracing): Make extern.
7498 (disconnected_tracing): New.
7499 (stop_tracing): Make extern. Handle tracing stops due to GDB
7500 disconnecting.
7501 (cmd_qtdisconnected): New.
7502 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7503 (handle_tracepoint_general_set): Handle QTDisconnected.
7504
7505 * event-loop.c (event_handler_func): Change return type to int.
7506 (process_event): Bail out if the event handler wants the event
7507 loop to stop.
7508 (handle_file_event): Ditto.
7509 (start_event_loop): Bail out if the event handler wants the event
7510 loop to stop.
7511
7512 * nto-low.c (nto_target_ops): Adjust.
7513 * spu-low.c (spu_wait): Don't remove the process here.
7514 (spu_target_ops): Adjust.
7515 * win32-low.c (win32_wait): Don't remove the process here.
7516 (win32_target_ops): Adjust.
7517
7518 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7519
7520 * regcache.c (realloc_register_cache): Invalidate inferior's
7521 regcache before recreating it.
7522
7523 2010-04-09 Pedro Alves <pedro@codesourcery.com>
7524
7525 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7526
7527 2010-04-09 Stan Shebs <stan@codesourcery.com>
7528 Pedro Alves <pedro@codesourcery.com>
7529
7530 * server.h (LONGEST): New.
7531 (struct thread_info) <while_stepping>: New field.
7532 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7533 Declare.
7534 (initialize_tracepoint, handle_tracepoint_general_set)
7535 (handle_tracepoint_query, tracepoint_finished_step)
7536 (tracepoint_was_hit, release_while_stepping_state_list):
7537 (current_traceframe): Declare.
7538 * server.c (handle_general_set): Handle tracepoint packets.
7539 (read_memory): New.
7540 (write_memory): New.
7541 (handle_search_memory_1): Use read_memory.
7542 (handle_query): Report support for conditional tracepoints, trace
7543 state variables, and tracepoint sources. Handle tracepoint
7544 queries.
7545 (main): Initialize the tracepoints module.
7546 (process_serial_event): Handle traceframe reads/writes.
7547
7548 * linux-low.c (handle_tracepoints): New.
7549 (linux_wait_1): Call it.
7550 (linux_resume_one_lwp): Handle while-stepping.
7551 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7552 (linux_target_ops): Install them.
7553 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7554 New field.
7555 * linux-x86-low.c (x86_supports_tracepoints): New.
7556 (the_low_target). Install it.
7557
7558 * mem-break.h (delete_breakpoint): Declare.
7559 * mem-break.c (delete_breakpoint): Make external.
7560
7561 * target.h (struct target_ops): Add `supports_tracepoints',
7562 `read_pc', and `write_pc' fields.
7563 (target_supports_tracepoints): Define.
7564 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7565 (phex_nz): New.
7566
7567 * regcache.h (struct regcache) <registers_owned>: New field.
7568 (init_register_cache, regcache_cpy): Declare.
7569 (regcache_read_pc, regcache_write_pc): Declare.
7570 (register_cache_size): Declare.
7571 (supply_regblock): Declare.
7572 * regcache.c (init_register_cache): New.
7573 (new_register_cache): Use it.
7574 (regcache_cpy): New.
7575 (register_cache_size): New.
7576 (supply_regblock): New.
7577 (regcache_read_pc, regcache_write_pc): New.
7578
7579 * tracepoint.c: New.
7580
7581 * Makefile.in (OBS): Add tracepoint.o.
7582 (tracepoint.o): New rule.
7583
7584 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7585
7586 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7587 (i386-mmx.o): New.
7588 (i386-mmx.c): Likewise.
7589 (i386-mmx-linux.o): Likewise.
7590 (i386-mmx-linux.c): Likewise.
7591
7592 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7593 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7594 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7595 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7596
7597 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7598 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7599 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7600
7601 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7602
7603 * Makefile.in (clean): Updated.
7604 (i386-avx.o): New.
7605 (i386-avx.c): Likewise.
7606 (i386-avx-linux.o): Likewise.
7607 (i386-avx-linux.c): Likewise.
7608 (amd64-avx.o): Likewise.
7609 (amd64-avx.c): Likewise.
7610 (amd64-avx-linux.o): Likewise.
7611 (amd64-avx-linux.c): Likewise.
7612
7613 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7614 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7615 (srv_amd64_regobj): Add amd64-avx.o.
7616 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7617 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7618 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7619 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7620 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7621 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7622 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7623
7624 * i387-fp.c: Include "i386-xstate.h".
7625 (i387_xsave): New.
7626 (i387_cache_to_xsave): Likewise.
7627 (i387_xsave_to_cache): Likewise.
7628 (x86_xcr0): Likewise.
7629
7630 * i387-fp.h (i387_cache_to_xsave): Likewise.
7631 (i387_xsave_to_cache): Likewise.
7632 (x86_xcr0): Likewise.
7633
7634 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7635 * linux-crisv32-low.c (target_regsets): Likewise.
7636 * linux-m68k-low.c (target_regsets): Likewise.
7637 * linux-mips-low.c (target_regsets): Likewise.
7638 * linux-ppc-low.c (target_regsets): Likewise.
7639 * linux-s390-low.c (target_regsets): Likewise.
7640 * linux-sh-low.c (target_regsets): Likewise.
7641 * linux-sparc-low.c (target_regsets): Likewise.
7642 * linux-xtensa-low.c (target_regsets): Likewise.
7643
7644 * linux-low.c: Include <sys/uio.h>.
7645 (regsets_fetch_inferior_registers): Support nt_type.
7646 (regsets_store_inferior_registers): Likewise.
7647 (linux_process_qsupported): New.
7648 (linux_target_ops): Add linux_process_qsupported.
7649
7650 * linux-low.h (regset_info): Add nt_type.
7651 (linux_target_ops): Add process_qsupported.
7652
7653 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7654 and <sys/uio.h>.
7655 (init_registers_i386_avx_linux): New.
7656 (init_registers_amd64_avx_linux): Likewise.
7657 (xmltarget_i386_linux_no_xml): Likewise.
7658 (xmltarget_amd64_linux_no_xml): Likewise.
7659 (PTRACE_GETREGSET): Likewise.
7660 (PTRACE_SETREGSET): Likewise.
7661 (x86_fill_xstateregset): Likewise.
7662 (x86_store_xstateregset): Likewise.
7663 (use_xml): Likewise.
7664 (x86_linux_update_xmltarget): Likewise.
7665 (x86_linux_process_qsupported): Likewise.
7666 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7667 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7668 init_registers_i386_linux here. Call
7669 x86_linux_update_xmltarget.
7670 (the_low_target): Add x86_linux_process_qsupported.
7671
7672 * server.c (handle_query): Call target_process_qsupported.
7673
7674 * target.h (target_ops): Add process_qsupported.
7675 (target_process_qsupported): New.
7676
7677 2010-04-03 Pedro Alves <pedro@codesourcery.com>
7678
7679 * inferiors.c (add_thread): Set last_status kind to
7680 TARGET_WAITKIND_IGNORE.
7681 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7682 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7683 (linux_wait_1): Move `thread' local definition to block that uses
7684 it. Don't NULL initialize `event_child'.
7685 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7686 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7687 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7688
7689 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7690
7691 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7692 an extended waitstatus, or by a watchpoint.
7693 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7694 thread was stepping or has been stopped by a watchpoint.
7695
7696 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7697
7698 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7699 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7700 of another, then delete the previous, and validate all
7701 breakpoints.
7702 (validate_inserted_breakpoint): New.
7703 (delete_disabled_breakpoints): New.
7704 (validate_breakpoints): New.
7705 (check_mem_read): Validate breakpoints before trusting their
7706 shadow. Delete disabled breakpoints.
7707 (check_mem_write): Validate breakpoints before trusting they
7708 should be inserted. Delete disabled breakpoints.
7709 * mem-break.h (validate_breakpoints):
7710 * server.c (handle_query): Validate breakpoints when we see a
7711 qSymbol query.
7712
7713 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7714
7715 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7716 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7717 if we could tell there's a GDB breakpoint at stop_pc.
7718 (need_step_over_p): Don't do a step over if we find a GDB
7719 breakpoint at the resume PC.
7720
7721 * mem-break.c (struct raw_breakpoint): New.
7722 (enum bkpt_type): New type `gdb_breakpoint'.
7723 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7724 fields. New field `raw'.
7725 (find_raw_breakpoint_at): New.
7726 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7727 breakpoint instead.
7728 (set_breakpoint_at): Adjust.
7729 (delete_raw_breakpoint): New.
7730 (release_breakpoint): New.
7731 (delete_breakpoint): Rename to...
7732 (delete_breakpoint_1): ... this. Add proc parameter. Use
7733 release_breakpoint. Return ENOENT.
7734 (delete_breakpoint): Reimplement.
7735 (find_breakpoint_at): Delete.
7736 (find_gdb_breakpoint_at): New.
7737 (delete_breakpoint_at): Delete.
7738 (set_gdb_breakpoint_at): New.
7739 (delete_gdb_breakpoint_at): New.
7740 (gdb_breakpoint_here): New.
7741 (set_reinsert_breakpoint): Use release_breakpoint.
7742 (uninsert_breakpoint): Rename to ...
7743 (uninsert_raw_breakpoint): ... this.
7744 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7745 (reinsert_raw_breakpoint): Change parameter type to
7746 raw_breakpoint.
7747 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7748 instead.
7749 (check_breakpoints): Adjust. Use release_breakpoint.
7750 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7751 (breakpoint_inserted_here): Ditto.
7752 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7753 Don't trust the breakpoint's shadow if it is not inserted.
7754 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7755 (delete_all_breakpoints): Adjust.
7756 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7757 use delete_breakpoint_1.
7758
7759 * mem-break.h (breakpoints_supported): Delete declaration.
7760 (set_gdb_breakpoint_at): Declare.
7761 (gdb_breakpoint_here): Declare.
7762 (delete_breakpoint_at): Delete.
7763 (delete_gdb_breakpoint_at): Declare.
7764
7765 * server.h (struct raw_breakpoint): Forward declare.
7766 (struct process_info): New field `raw_breakpoints'.
7767
7768 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7769 breakpoints.
7770
7771 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7772
7773 * linux-low.c (status_pending_p_callback): Fix comment.
7774 (linux_wait_for_event_1): Move most of the internal breakpoint
7775 handling from here...
7776 (linux_wait_1): ... to here.
7777 (count_events_callback): New.
7778 (select_singlestep_lwp_callback): New.
7779 (select_event_lwp_callback): New.
7780 (cancel_breakpoints_callback): New.
7781 (select_event_lwp): New.
7782 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7783 priority to all LWPs that have had events that should be reported
7784 to the client. Cancel breakpoints when about to reporting the
7785 event to the client, not while stopping lwps. No longer cancel
7786 finished single-steps here.
7787 (cancel_finished_single_step): Delete.
7788 (cancel_finished_single_steps): Delete.
7789
7790 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7791
7792 * mem-break.c (enum bkpt_type): New.
7793 (struct breakpoint): New field `type'.
7794 (set_breakpoint_at): Change return type to struct breakpoint
7795 pointer. Set type to `other_breakpoint' by default.
7796 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7797 in the breakpoint list.
7798 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7799 (reinsert_breakpoint): Rename to ...
7800 (reinsert_raw_breakpoint): ... this.
7801 (reinsert_breakpoints_at): Adjust.
7802 * mem-break.h (struct breakpoint): Declare.
7803 (set_breakpoint_at): Change return type to struct breakpoint
7804 pointer.
7805
7806 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7807
7808 * server.c (handle_query): Assign, not compare.
7809
7810 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7811
7812 Teach linux gdbserver to step-over-breakpoints.
7813
7814 * linux-low.c (can_hardware_single_step): New.
7815 (supports_breakpoints): New.
7816 (handle_extended_wait): If stopping threads, read the stop pc of
7817 the new cloned LWP.
7818 (get_pc): New.
7819 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7820 low target doesn't support retrieving the PC.
7821 (add_lwp): Set last_resume_kind to resume_continue.
7822 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7823 (linux_attach): Don't clear stop_expected. Set the lwp's
7824 last_resume_kind to resume_stop.
7825 (linux_detach_one_lwp): Don't check for removed breakpoints.
7826 (check_removed_breakpoint): Delete.
7827 (status_pending_p): Rename to ...
7828 (status_pending_p_callback): ... this. Don't check for removed
7829 breakpoints. Don't consider threads that are stopped from GDB's
7830 perspective.
7831 (linux_wait_for_lwp): Always read the stop_pc here.
7832 (cancel_breakpoint): New.
7833 (step_over_bkpt): New global.
7834 (linux_wait_for_event_1): Implement stepping over breakpoints.
7835 (gdb_wants_lwp_stopped): New.
7836 (gdb_wants_all_stopped): New.
7837 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7838 single-step traps here. Store the thread's last reported target
7839 wait status.
7840 (send_sigstop): Don't clear stop_expected. Always set it,
7841 instead.
7842 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7843 (cancel_finished_single_step): New.
7844 (cancel_finished_single_steps): New.
7845 (wait_for_sigstop): Don't cancel finished single-step traps here.
7846 (linux_resume_one_lwp): Don't check for removed breakpoints.
7847 Don't set `step' on non-hardware step archs.
7848 (linux_set_resume_request): Ignore resume_stop requests if already
7849 stopping or stopped. Set the lwp's last_resume_kind.
7850 (resume_status_pending_p): Don't check for removed breakpoints.
7851 (need_step_over_p): New.
7852 (start_step_over): New.
7853 (finish_step_over): New.
7854 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7855 requests. Clear the thread's last reported target waitstatus.
7856 Don't use the `suspended' flag. Don't consider pending breakpoints.
7857 (linux_resume): Start a step-over if necessary.
7858 (proceed_one_lwp): New.
7859 (proceed_all_lwps): New.
7860 (unstop_all_lwps): New.
7861 * linux-low.h (struct lwp_info): Rewrite comment for the
7862 `suspended' flag. Add the `stop_pc' field. Delete the
7863 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7864 Add `'last_resume_kind' and `need_step_over' fields.
7865 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7866 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7867 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7868 (set_raw_breakpoint_at): New.
7869 (set_breakpoint_at): Rewrite to use it.
7870 (reinsert_breakpoint_handler): Delete.
7871 (set_reinsert_breakpoint): New.
7872 (reinsert_breakpoint_by_bp): Delete.
7873 (delete_reinsert_breakpoints): New.
7874 (uninsert_breakpoint): Rewrite.
7875 (uninsert_breakpoints_at): New.
7876 (reinsert_breakpoint): Rewrite.
7877 (reinsert_breakpoints_at): New.
7878 (check_breakpoints): Rewrite.
7879 (breakpoint_here): New.
7880 (breakpoint_inserted_here): New.
7881 (check_mem_read): Adjust.
7882 * mem-break.h (breakpoints_supported, breakpoint_here)
7883 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7884 (reinsert_breakpoint_by_bp): Delete declaration.
7885 (delete_reinsert_breakpoints): Declare.
7886 (reinsert_breakpoint): Delete declaration.
7887 (reinsert_breakpoints_at): Declare.
7888 (uninsert_breakpoint): Delete declaration.
7889 (uninsert_breakpoints_at): Declare.
7890 (check_breakpoints): Adjust prototype.
7891 * server.h: Adjust include order.
7892 (struct thread_info): Declare here. Add a `last_status' field.
7893
7894 2010-03-23 Michael Snyder <msnyder@vmware.com>
7895
7896 * server.c (crc32): New function.
7897 (handle_query): Add handling for 'qCRC:' request.
7898
7899 2010-03-23 Pedro Alves <pedro@codesourcery.com>
7900
7901 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7902 lwp had been stopped by a watchpoint.
7903
7904 2010-03-16 Pedro Alves <pedro@codesourcery.com>
7905
7906 * server.h (internal_error): Declare.
7907 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7908 * utils.c (internal_error): New function.
7909
7910 2010-03-15 Andreas Schwab <schwab@redhat.com>
7911
7912 * configure.srv: Fix typo setting srv_regobj.
7913
7914 2010-03-15 Pedro Alves <pedro@codesourcery.com>
7915
7916 * linux-low.c (fetch_register): Avoid passing a non string literal
7917 format to `error'.
7918 (usr_store_inferior_registers): Ditto.
7919
7920 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7921
7922 * linux-low.c (linux_write_memory): Bail out early if peeking
7923 memory failed.
7924
7925 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7926
7927 * linux-low.h (struct lwp_info): New fields
7928 `stopped_by_watchpoint' and `stopped_data_address'.
7929 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7930 here, and cache them in the lwp object.
7931 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7932 directly.
7933 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7934 field.
7935 (linux_stopped_by_watchpoint): Rewrite.
7936 (linux_stopped_data_address): Rewrite.
7937
7938 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
7939
7940 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7941 switching the current inferior, not before.
7942
7943 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7944
7945 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7946 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7947 i386-linux.c and amd64-linux.c.
7948 (reg-i386.o): Removed.
7949 (reg-i386.c): Likewise.
7950 (reg-i386-linux.o): Likewise.
7951 (reg-i386-linux.c): Likewise.
7952 (reg-x86-64.o): Likewise.
7953 (reg-x86-64.c): Likewise.
7954 (reg-x86-64-linux.o): Likewise.
7955 (reg-x86-64-linux.c): Likewise.
7956 (i386.o): New.
7957 (i386.c): Likewise.
7958 (i386-linux.o): Likewise.
7959 (i386-linux.c): Likewise.
7960 (amd64.o): Likewise.
7961 (amd64.c): Likewise.
7962 (amd64-linux.o): Likewise.
7963 (amd64-linux.c): Likewise.
7964
7965 * configure.srv (srv_i386_regobj): New.
7966 (srv_i386_linux_regobj): Likewise.
7967 (srv_amd64_regobj): Likewise.
7968 (srv_amd64_linux_regobj): Likewise.
7969 (srv_i386_32bit_xmlfiles): Likewise.
7970 (srv_i386_64bit_xmlfiles): Likewise.
7971 (srv_i386_xmlfiles): Likewise.
7972 (srv_amd64_xmlfiles): Likewise.
7973 (srv_i386_linux_xmlfiles): Likewise.
7974 (srv_amd64_linux_xmlfiles): Likewise.
7975 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7976 srv_xmlfiles to $srv_i386_xmlfiles.
7977 (i[34567]86-*-mingw32ce*): Likewise.
7978 (i[34567]86-*-mingw*): Likewise.
7979 (i[34567]86-*-nto*): Likewise.
7980 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7981 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7982 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7983 (x86_64-*-linux*): Likewise.
7984
7985 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7986 (init_registers_amd64_linux): New.
7987 (x86_arch_setup): Replace init_registers_x86_64_linux with
7988 init_registers_amd64_linux.
7989
7990 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7991
7992 * configure.ac: Check for libdl. If it is not available link against
7993 static libthread_db.
7994 * configure: Regenerate.
7995
7996 2010-02-22 Pedro Alves <pedro@codesourcery.com>
7997
7998 PR9605
7999
8000 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8001 handing a read watchpoint.
8002 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8003
8004 2010-02-12 Doug Evans <dje@google.com>
8005
8006 * linux-low.c (linux_supports_tracefork_flag): Document.
8007 (linux_look_up_symbols): Add comment.
8008
8009 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8010
8011 * regcache.c (supply_register): Clear regcache if buf is NULL.
8012
8013 2010-02-02 Nicolas Roche <roche@sourceware.org>
8014 Joel Brobecker <brobecker@adacore.com>
8015
8016 * inferiors.c (find_inferior): Add function documentation.
8017 (unloaded_dll): Handle the case where the unloaded dll has not
8018 been previously registered in the dll list.
8019
8020 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8021
8022 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8023 (thumb2_breakpoint): New.
8024 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8025
8026 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8027
8028 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8029 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8030 breakpoints.
8031
8032 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8033
8034 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8035
8036 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8037
8038 * linux-s390-low.c (s390_collect_ptrace_register)
8039 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8040
8041 2010-01-21 Doug Evans <dje@google.com>
8042
8043 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8044 (PTRACE_ARG4_TYPE): New macro.
8045 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8046 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8047 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8048 (usr_store_inferior_registers): Ditto.
8049 (linux_read_memory, linux_write_memory): Ditto.
8050 (linux_test_for_tracefork): Ditto.
8051
8052 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8053 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8054
8055 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8056
8057 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8058 target.
8059
8060 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8061
8062 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8063 prototype to take a regcache. Adjust.
8064
8065 2010-01-20 Pedro Alves <pedro@codesourcery.com>
8066
8067 * regcache.h (struct thread_info): Forward declare.
8068 (struct regcache): New.
8069 (new_register_cache): Adjust prototype.
8070 (get_thread_regcache): Declare.
8071 (free_register_cache): Adjust prototype.
8072 (registers_to_string, registers_from_string): Ditto.
8073 (supply_register, supply_register_by_name, collect_register)
8074 (collect_register_as_string, collect_register_by_name): Ditto.
8075 * regcache.c (struct inferior_regcache_data): Delete.
8076 (get_regcache): Rename to ...
8077 (get_thread_regcache): ... this. Adjust. Switch inferior before
8078 fetching registers.
8079 (regcache_invalidate_one): Adjust.
8080 (regcache_invalidate): Fix prototype.
8081 (new_register_cache): Return the new register cache.
8082 (free_register_cache): Change prototype.
8083 (realloc_register_cache): Adjust.
8084 (registers_to_string): Change prototype to take a regcache. Adjust.
8085 (registers_from_string): Ditto.
8086 (register_data): Ditto.
8087 (supply_register): Ditto.
8088 (supply_register_by_name): Ditto.
8089 (collect_register): Ditto.
8090 (collect_register_as_string): Ditto.
8091 (collect_register_by_name): Ditto.
8092 * server.c (process_serial_event): Adjust.
8093 * linux-low.h (regset_fill_func, regset_store_func): Change
8094 prototype.
8095 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8096 Change prototype.
8097 * linux-low.c (get_stop_pc): Adjust.
8098 (check_removed_breakpoint): Adjust.
8099 (linux_wait_for_event): Adjust.
8100 (linux_resume_one_lwp): Adjust.
8101 (fetch_register): Add regcache parameter. Adjust.
8102 (usr_store_inferior_registers): Ditto.
8103 (regsets_fetch_inferior_registers): Ditto.
8104 (regsets_store_inferior_registers): Ditto.
8105 (linux_fetch_registers, linux_store_registers): Ditto.
8106 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8107 regcache. Adjust.
8108 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8109 Ditto.
8110 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8111 prototype to take a regcache.
8112 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8113 * remote-utils.c (convert_ascii_to_int, outreg)
8114 (prepare_resume_reply): Change prototype to take a regcache.
8115 Adjust.
8116 * target.h (struct target_ops) <fetch_registers, store_registers>:
8117 Change prototype to take a regcache.
8118 (fetch_inferior_registers, store_inferior_registers): Change
8119 prototype to take a regcache. Adjust.
8120 * proc-service.c (ps_lgetregs): Adjust.
8121 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8122 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8123 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8124 take a regcache. Adjust.
8125 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8126 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8127 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8128 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8129 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8130 (cris_cannot_fetch_register):
8131 (cris_breakpoint_at): Change prototype to take a regcache.
8132 Adjust.
8133 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8134 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8135 to take a regcache. Adjust.
8136 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8137 Adjust.
8138 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8139 take a regcache. Adjust.
8140 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8141 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8142 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8143 * linux-mips-low.c (mips_get_pc):
8144 (mips_set_pc): Change prototype to take a regcache. Adjust.
8145 (mips_reinsert_addr): Adjust.
8146 (mips_collect_register): Change prototype to take a regcache.
8147 Adjust.
8148 (mips_supply_register):
8149 (mips_collect_register_32bit, mips_supply_register_32bit)
8150 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8151 (mips_store_fpregset): Ditto.
8152 * linux-ppc-low.c (ppc_supply_ptrace_register)
8153 (ppc_supply_ptrace_register): Ditto.
8154 (parse_spufs_run): Adjust.
8155 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8156 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8157 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8158 take a regcache. Adjust.
8159 * linux-s390-low.c (s390_collect_ptrace_register)
8160 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8161 (s390_set_pc): Change prototype to take a regcache. Adjust.
8162 (s390_arch_setup): Adjust.
8163 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8164 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8165 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8166 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8167 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8168 regcache. Adjust.
8169 (sparc_breakpoint_at): Adjust.
8170 * linux-xtensa-low.c (xtensa_fill_gregset):
8171 (xtensa_store_gregset):
8172 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8173 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8174 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8175 prototype to take a regcache. Adjust.
8176 * win32-arm-low.c (arm_fetch_inferior_register)
8177 (arm_store_inferior_register): Change prototype to take a
8178 regcache. Adjust.
8179 * win32-i386-low.c (i386_fetch_inferior_register)
8180 (i386_store_inferior_register): Change prototype to take a
8181 regcache. Adjust.
8182 * win32-low.c (child_fetch_inferior_registers)
8183 (child_store_inferior_registers): Change prototype to take a
8184 regcache. Adjust.
8185 (win32_wait): Adjust.
8186 (win32_fetch_inferior_registers): Change prototype to take a
8187 regcache. Adjust.
8188 (win32_store_inferior_registers): Adjust.
8189 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8190 store_inferior_register>: Change prototype to take a regcache.
8191
8192 2010-01-20 Doug Evans <dje@google.com>
8193
8194 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8195 #ifdef.
8196 (linux_wait_for_event1, linux_init_signals): Ditto.
8197 (W_STOPCODE): Provide definition if missing.
8198
8199 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8200
8201 * linux-low.c (linux_core_of_thread): New.
8202 (compare_ints, show_process, list_threads): New.
8203 (linux_qxfer_osdata): Report threads and cores.
8204 (linux_target_op): Register linux_core_of_thread.
8205 * remote-utils.c (prepare_resume_reply): Report the core.
8206 (buffer_xml_printf): Support %d specifier.
8207 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8208 New.
8209 (handle_query): Handle qXfer:threads. Announce availability
8210 thereof.
8211 * target.h (struct target_ops): New field core_of_thread.
8212
8213 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8214
8215 * Makefile.in (clean): Remove new generated files.
8216 (reg-s390.o, reg-s390.c): Remove rules.
8217 (reg-s390x.o, reg-s390x.c): Likewise.
8218 (s390-linux32.o, s390-linux32.c): Add rules.
8219 (s390-linux64.o, s390-linux64.c): Likewise.
8220 (s390x-linux64.o, s390x-linux64.c): Likewise.
8221 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8222 * linux-s390-low.c: Include <elf.h>.
8223 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8224 (init_registers_s390): Remove prototype.
8225 (init_registers_s390x): Likewise.
8226 (init_registers_s390_linux32): Add prototype.
8227 (init_registers_s390_linux64): Likewise.
8228 (init_registers_s390x_linux64): Likewise.
8229 (s390_num_regs_3264): New define.
8230 (s390_regmap_3264): New global variable.
8231 (s390_cannot_fetch_register): Remove obsolete check.
8232 (s390_cannot_store_register): Likewise.
8233 (s390_collect_ptrace_register): Handle upper/lower register halves.
8234 (s390_supply_ptrace_register): Likewise.
8235 (s390_fill_gregset): Update to register number changes.
8236 (s390_get_hwcap): New routine.
8237 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8238 Install appropriate regmap and register set.
8239
8240 2010-01-01 Joel Brobecker <brobecker@adacore.com>
8241
8242 * server.c (gdbserver_version): Update copyright year to 2010.
8243 * gdbreplay.c (gdbreplay_version): Likewise.
8244
8245 2009-12-28 Doug Evans <dje@google.com>
8246
8247 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8248 elf/external.h. Include <elf.h> instead but only if necessary.
8249
8250 2009-12-28 Pedro Alves <pedro@codesourcery.com>
8251
8252 * linux-low.c (linux_remove_process): Remove `detaching'
8253 parameter. Don't release/detach from thread_db here.
8254 (linux_kill): Release/detach from thread_db here, ...
8255 (linux_detach): ... and here, before actually detaching.
8256 (linux_wait_1): ... and here, when a process exits.
8257 * thread-db.c (any_thread_of): New.
8258 (thread_db_free): Switch the current inferior to a thread of the
8259 passed in process.
8260
8261 2009-12-21 Doug Evans <dje@google.com>
8262
8263 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8264
8265 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8266 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8267 warning ifndef __NR_tkill. Move setting of errno there too.
8268 Delete unnecessary resetting of errno after syscall.
8269 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8270
8271 * configure.ac: Check for dladdr.
8272 * config.in: Regenerate.
8273 * configure: Regenerate.
8274 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8275 (try_thread_db_load): Update.
8276
8277 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8278
8279 2009-12-18 Doug Evans <dje@google.com>
8280
8281 * event-loop.c: Include unistd.h if it exists.
8282
8283 * linux-low.c (my_waitpid): Move definition away from being in
8284 between linux_tracefork_child/linux_test_for_tracefork.
8285
8286 * gdb_proc_service.h (psaddr_t): Fix type.
8287 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8288 signature to match glibc.
8289
8290 2009-12-16 Doug Evans <dje@google.com>
8291
8292 * linux-low.c (linux_read_memory): Fix argument to read.
8293
8294 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8295
8296 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8297 events, don't leave current_inferior pointing at null.
8298
8299 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8300
8301 * win32-low.c (LOG): Delete.
8302 (OUTMSG): Output to stderr.
8303 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8304 on compile time LOG macro.
8305 (win32_wait): Fix debug output.
8306
8307 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8308
8309 * win32-low.c (win32_add_one_solib): If the dll name is
8310 "ntdll.dll", prepend the system directory to the dll path.
8311
8312 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8313
8314 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8315
8316 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
8317 Vladimir Prus <vladimir@codesourcery.com>
8318
8319 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8320 * configure.ac: Check for __mcoldfire__ and set
8321 gdb_cv_m68k_is_coldfire.
8322 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8323 reg-cf.o and reg-m68k.o.
8324 * configure: Regenerated.
8325
8326 2009-11-16 Pedro Alves <pedro@codesourcery.com>
8327
8328 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8329 Pass it to thread_db_free.
8330 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8331 proper `detaching' argument to linux_remove_process.
8332 * linux-low.h (thread_db_free): Add `detaching' parameter.
8333 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8334 to thread_db_free.
8335 (thread_db_free): Add `detaching' parameter. Only
8336 call td_ta_clear_event if detaching from process.
8337
8338 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8339
8340 * thread-db.c (thread_db_free): Fix typo.
8341
8342 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8343
8344 PR gdb/10838
8345 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8346
8347 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8348
8349 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8350 with an i686 compiler.
8351 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8352 needed.
8353 * configure: Rebuilt.
8354
8355 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8356
8357 PR gdb/10783
8358
8359 * server.c (handle_search_memory_1): Correct read_addr initialization
8360 in loop for searching subsequent chunks.
8361
8362 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8363
8364 * configure.ac: New --with-libthread-db option.
8365 * thread-db.c: Allow direct dependence on libthread_db.
8366 (thread_db_free): Adjust.
8367 * config.in: Regenerate.
8368 * configure: Likewise.
8369
8370 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8371
8372 PR gdb/10757
8373 * thread-db.c (attach_thread): New function.
8374 (maybe_attach_thread): Return success/failure.
8375 (find_new_threads_callback): Adjust.
8376 (thread_db_find_new_threads): Loop until no new threads.
8377
8378 2009-10-13 Pedro Alves <pedro@codesourcery.com>
8379
8380 * proc-service.c (ps_lgetregs): Formatting.
8381
8382 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8383
8384 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8385 * configure.ac: Adjust.
8386 * linux-low.h (struct process_info_private): Move members to struct
8387 thread_db.
8388 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8389 * linux-low.c (linux_remove_process): Adjust.
8390 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8391 * server.c (handle_query): Move code ...
8392 (handle_monitor_command): ... here. New function.
8393 * target.h (struct target_ops): New member.
8394 * thread-db.c (struct thread_db): New.
8395 (libthread_db_search_path): New variable.
8396 (thread_db_create_event, thread_db_enable_reporting)
8397 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8398 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8399 (try_thread_db_load_1, dladdr_to_soname): New functions.
8400 (try_thread_db_load, thread_db_load_search): New functions.
8401 (thread_db_init): Search for libthread_db.
8402 (thread_db_free): New function.
8403 (thread_db_handle_monitor_command): Likewise.
8404 * config.in: Regenerate.
8405 * configure: Regenerate.
8406
8407 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8408
8409 * spu-low.c (spu_kill): Wait for inferior to terminate.
8410 Call clear_inferiors.
8411 (spu_detach): Call clear_inferiors.
8412
8413 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8414
8415 * aclocal.m4: Regenerate.
8416 * config.in: Likewise.
8417 * configure: Likewise.
8418
8419 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8420
8421 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8422 (parse_spufs_run): New function.
8423 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8424 (ppc_breakpoint_at): Handle SPU breakpoints.
8425
8426 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8427
8428 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8429 (SPUFS_MAGIC): Define.
8430 (spu_enumerate_spu_ids): New function.
8431 (linux_qxfer_spu): New function.
8432 (linux_target_ops): Install linux_qxfer_spu.
8433
8434 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8435
8436 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8437 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8438 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8439 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8440 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8441 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8442 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8443 (init_registers_powerpc_cell32l): Add prototype.
8444 (init_registers_powerpc_cell64l): Likewise.
8445 (ppc_arch_setup): Detect Cell/B.E. architecture.
8446
8447 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8448
8449 * Makefile.in (datarootdir): New variable.
8450
8451 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8452
8453 * linux-low.c (linux_write_memory): Update debugging output.
8454 * Makefile.in (clean): Add new descriptions.
8455 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8456 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8457 * configure.srv: Add new files for arm*-*-linux*.
8458 * linux-arm-low.c: Add new declarations.
8459 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8460 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8461 (HWCAP_VFPv3D16): New.
8462 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8463 instead of __IWMMXT__.
8464 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8465 (arm_arch_setup): New.
8466 (target_regsets): Remove #ifdef. Add VFP regset.
8467 (the_low_target): Use arm_arch_setup.
8468
8469 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8470
8471 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8472 the main thread again.
8473
8474 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8475
8476 Adding Neutrino gdbserver.
8477 * configure: Regenerated.
8478 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8479 * configure.srv (i[34567]86-*-nto*): New target.
8480 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8481 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8482 (nto_comctrl) [__QNX__]: New function.
8483 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8484
8485 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
8486
8487 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8488 srv_tgtobj.
8489
8490 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8491 Pedro Alves <pedro@codesourcery.com>
8492
8493 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8494 don't support CONTEXT_EXTENDED_REGISTERS.
8495 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8496 (the_low_target): Install them.
8497 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8498 failing with ERROR_PIPE_NOT_CONNECTED.
8499
8500 2009-06-30 Doug Evans <dje@google.com>
8501 Pierre Muller <muller@ics.u-strasbg.fr>
8502
8503 Add h/w watchpoint support to x86-linux, win32-i386.
8504 * Makefile.in (SFILES): Add i386-low.c
8505 (i386_low_h): Define.
8506 (i386-low.o): Add dependencies.
8507 (linux-x86-low.o): Add i386-low.h dependency.
8508 (win32-i386-low.o): Ditto.
8509 * i386-low.c: New file.
8510 * i386-low.h: New file.
8511 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8512 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8513 * linux-low.c (linux_add_process): Initialize arch_private.
8514 (linux_remove_process): Free arch_private.
8515 (add_lwp): Initialize arch_private.
8516 (delete_lwp): Free arch_private.
8517 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8518 provided.
8519 * linux-low.h (process_info_private): New member arch_private.
8520 (lwp_info): New member arch_private.
8521 (linux_target_ops): New members new_process, new_thread,
8522 prepare_to_resume.
8523 (ptid_of): New macro.
8524 * linux-x86-low.c: Include stddef.h, i386-low.h.
8525 (arch_process_info): New struct.
8526 (arch_lwp_info): New struct.
8527 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8528 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8529 (i386_dr_low_get_status): New function.
8530 (x86_insert_point, x86_remove_point): New functions.
8531 (x86_stopped_by_watchpoint): New function.
8532 (x86_stopped_data_address): New function.
8533 (x86_linux_new_process, x86_linux_new_thread): New functions.
8534 (x86_linux_prepare_to_resume): New function.
8535 (the_low_target): Add entries for insert_point, remove_point,
8536 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8537 prepare_to_resume.
8538 * server.c (debug_hw_points): New global.
8539 (monitor_show_help): Document set debug-hw-points.
8540 (handle_query): Process "set debug-hw-points".
8541 * server.h (debug_hw_points): Declare.
8542 (paddress): Declare.
8543 * utils.c (NUMCELLS, CELLSIZE): New macros.
8544 (get_sell, xsnprintf, paddress): New functions.
8545 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8546 remove_point, stopped_by_watchpoint, stopped_data_address.
8547 * win32-i386-low.c: Include i386-low.h.
8548 (debug_reg_state): Replaces dr.
8549 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8550 (i386_dr_low_get_status): New function.
8551 (i386_insert_point, i386_remove_point): New functions.
8552 (i386_stopped_by_watchpoint): New function.
8553 (i386_stopped_data_address): New function.
8554 (i386_initial_stuff): Update.
8555 (get_thread_context,set_thread_context,i386_thread_added): Update.
8556 (the_low_target): Add entries for insert_point,
8557 remove_point, stopped_by_watchpoint, stopped_data_address.
8558 * win32-low.c (win32_insert_watchpoint): New function.
8559 (win32_remove_watchpoint): New function.
8560 (win32_stopped_by_watchpoint): New function.
8561 (win32_stopped_data_address): New function.
8562 (win32_target_ops): Add entries for insert_watchpoint,
8563 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8564 * win32-low.h (win32_target_ops): New members insert_point,
8565 remove_point, stopped_by_watchpoint, stopped_data_address.
8566
8567 2009-06-25 Pedro Alves <pedro@codesourcery.com>
8568
8569 * server.c (process_serial_event): Re-return unsupported, not
8570 error, if the type isn't recognized. Re-allow supporting only
8571 insert or remove packets. Also call require_running for
8572 breakpoints. Add missing break statement to default case. Tidy.
8573 * target.h (struct target_ops): Rename insert_watchpoint to
8574 insert_point, and remove_watchpoint to remove_point.
8575
8576 * linux-low.h (struct linux_target_ops): Likewise.
8577 * linux-low.c (linux_insert_watchpoint): Rename to ...
8578 (linux_insert_point): ... this. Adjust.
8579 (linux_remove_watchpoint): Rename to ...
8580 (linux_remove_point): ... this. Adjust.
8581 (linux_target_ops): Adjust.
8582 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8583 (cris_insert_point): ... this.
8584 (cris_remove_watchpoint): Rename to ...
8585 (cris_remove_point): ... this.
8586 (the_low_target): Adjust.
8587
8588 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8589
8590 * server.c (handle_v_kill): Pass signal_pid to
8591 kill_inferior if multi_process is zero.
8592
8593 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8594
8595 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8596 * target.h (target_ops): Comment for *_watchpoint to make it clear
8597 the functions can get types '0' and '1'.
8598
8599 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8600
8601 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8602 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8603 * regcache.c (get_regcache): Likewise.
8604 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8605 * win32-low.c (child_fetch_inferior_registers): Remove check for
8606 regno 0.
8607
8608 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8609 Pedro Alves <pedro@codesourcery.com>
8610
8611 * target.h (struct target_ops) <supports_multi_process>: New
8612 callback.
8613 (target_supports_multi_process): New.
8614 * server.c (handle_query): Even if GDB reports support, only
8615 enable multi-process if the target also supports it. Report
8616 multi-process support only if the target backend supports it.
8617 * linux-low.c (linux_supports_multi_process): New function.
8618 (linux_target_ops): Install it as target_supports_multi_process
8619 callback.
8620
8621 2009-05-24 Doug Evans <dje@google.com>
8622
8623 Global renaming of find_thread_pid to find_thread_ptid.
8624 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8625 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8626 All callers updated.
8627
8628 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8629 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8630 directly.
8631
8632 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8633 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8634 (linux_resume_one_lwp): Ditto.
8635
8636 2009-05-23 Doug Evans <dje@google.com>
8637
8638 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8639 from struct inferior_list_entry * to struct lwp_info *.
8640 All callers updated.
8641
8642 2009-05-13 Doug Evans <dje@google.com>
8643
8644 * linux-x86-low.c: Don't include assert.h.
8645 (x86_siginfo_fixup): Use fatal, not assert.
8646 (x86_arch_setup): Fix comment.
8647
8648 2009-05-12 Doug Evans <dje@google.com>
8649
8650 Biarch support for i386/amd64 gdbserver.
8651 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8652 Add linux-x86-low.c.
8653 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8654 (linux-x86-low.o): Add.
8655 * linux-x86-64-low.c: Delete.
8656 * linux-i386-low.c: Delete.
8657 * linux-x86-low.c: New file.
8658 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8659 linux-x86-low.o.
8660 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8661 linux-x86-low.o.
8662 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8663 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8664 (linux_child_pid_to_exec_file): New function.
8665 (elf_64_header_p, elf_64_file_p): New functions.
8666 (siginfo_fixup): New function.
8667 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8668 give target a chance to convert layout.
8669 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8670 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8671
8672 2009-05-07 Doug Evans <dje@google.com>
8673
8674 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8675 (regsets_store_inferior_registers): Ditto.
8676
8677 2009-05-06 Pedro Alves <pedro@codesourcery.com>
8678
8679 PR server/10048
8680
8681 * linux-low.c (must_set_ptrace_flags): Delete.
8682 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8683 of the global.
8684 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8685 `lwp->must_set_ptrace_flags' instead.
8686 (linux_wait_for_event_1): Set ptrace options here.
8687 (linux_wait_1): ... not here.
8688
8689 2009-04-30 Doug Evans <dje@google.com>
8690
8691 * inferiors.c (started_inferior_callback): New function.
8692 (attached_inferior_callback): New function.
8693 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8694 * server.c (print_started_pid, print_attached_pid): New functions.
8695 (detach_or_kill_for_exit): New function.
8696 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8697 * server.h (have_started_inferiors_p): Declare.
8698 (have_attached_inferiors_p): Declare.
8699
8700 * inferiors.c (remove_process): Fix memory leak, free process.
8701 * linux-low.c (linux_remove_process): New function.
8702 (linux_kill): Call it instead of remove_process.
8703 (linux_detach, linux_wait_1): Ditto.
8704
8705 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8706
8707 * configure.srv: Add x86 Windows CE target.
8708
8709 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8710
8711 * inferiors.c (get_thread_process): Make global.
8712 * server.h (get_thread_process): Add prototype.
8713 * thread-db.c (find_one_thread): Use get_thread_process
8714 instead of current_process.
8715 (thread_db_get_tls_address): Do not crash if called when
8716 thread layer is not yet initialized.
8717
8718 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8719
8720 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8721 * spu-low.c (current_tid): Rename to ...
8722 (current_ptid): ... this.
8723 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8724 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8725 ptid_get_lwp (current_ptid) instead of current_tid.
8726 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8727 instead of current_tid. Use find_process_pid to verify pid
8728 argument is valid. Pass proper argument to remove_process.
8729 (spu_thread_alive): Compare current_ptid instead of current_tid.
8730 (spu_resume): Likewise.
8731
8732 2009-04-02 Pedro Alves <pedro@codesourcery.com>
8733
8734 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8735 variable.
8736
8737 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8738
8739 Implement the multiprocess extensions, and add linux multiprocess
8740 support.
8741
8742 * server.h (ULONGEST): Declare.
8743 (struct ptid, ptid_t): New.
8744 (minus_one_ptid, null_ptid): Declare.
8745 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8746 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8747 (struct inferior_list_entry): Change `id' type from unsigned from
8748 to ptid_t.
8749 (struct sym_cache, struct breakpoint, struct
8750 process_info_private): Forward declare.
8751 (struct process_info): Declare.
8752 (current_process): Declare.
8753 (all_processes): Declare.
8754 (initialize_inferiors): Declare.
8755 (add_thread): Adjust to use ptid_t.
8756 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8757 (add_process, remove_process, find_thread_pid): Declare.
8758 (find_inferior_id): Adjust to use ptid_t.
8759 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8760 (multi_process): Declare.
8761 (push_event): Adjust to use ptid_t.
8762 (read_ptid, write_ptid): Declare.
8763 (prepare_resume_reply): Adjust to use ptid_t.
8764 (clear_symbol_cache): Declare.
8765 * inferiors.c (all_processes): New.
8766 (null_ptid, minus_one_ptid): New.
8767 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8768 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8769 (add_thread): Change unsigned long to ptid. Remove gdb_id
8770 parameter. Adjust.
8771 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8772 (gdb_id_to_thread): Rename to ...
8773 (find_thread_pid): ... this. Change unsigned long to ptid.
8774 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8775 (loaded_dll, pull_pid_from_list): Adjust.
8776 (add_process, remove_process, find_process_pid)
8777 (get_thread_process, current_process, initialize_inferiors): New.
8778 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8779 (struct target_waitstatus) <related_pid>: Ditto.
8780 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8781 return type to int.
8782 (struct target_ops) <join>: Add `pid' argument.
8783 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8784 (struct target_ops) <wait>: Add `ptid' field. Change return type
8785 to ptid.
8786 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8787 (mywait): Add `ptid' argument. Change return type to ptid_t.
8788 (target_pid_to_str): Declare.
8789 * target.c (set_desired_inferior): Adjust to use ptids.
8790 (mywait): Add new `ptid' argument. Adjust.
8791 (target_pid_to_str): New.
8792 * mem-break.h (free_all_breakpoints): Declare.
8793 * mem-break.c (breakpoints): Delelete.
8794 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8795 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8796 to use per-process breakpoint list.
8797 (free_all_breakpoints): New.
8798 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8799 (symbol_cache, all_symbols_looked_up): Delete.
8800 (hexchars): New.
8801 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8802 read_ptid): New.
8803 (prepare_resume_reply): Change ptid argument's type from unsigned
8804 long to ptid_t. Adjust. Implement W;process and X;process.
8805 (free_sym_cache, clear_symbol_cache): New.
8806 (look_up_one_symbol): Adjust to per-process symbol cache. *
8807 * server.c (cont_thread, general_thread, step_thread): Change type
8808 to ptid_t.
8809 (attached): Delete.
8810 (multi_process): New.
8811 (last_ptid): Change type to ptid_t.
8812 (struct vstop_notif) <ptid>: Change type to ptid_t.
8813 (queue_stop_reply, push_event): Change `ptid' argument's type to
8814 ptid_t.
8815 (discard_queued_stop_replies): Add `pid' argument.
8816 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8817 changes. Don't reference the `attached' global.
8818 (attach_inferior): Adjust to mywait interface changes.
8819 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8820 features. Handle and report "multiprocess+". Handle
8821 "qAttached:PID".
8822 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8823 changes.
8824 (handle_v_kill): New.
8825 (handle_v_stopped): Adjust to use target_pid_to_str.
8826 (handle_v_requests): Allow multiple attaches and runs when
8827 multiprocess extensions are in effect. Handle "vKill".
8828 (myresume): Adjust to use ptids.
8829 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8830 (handle_status): Adjust to discard_queued_stop_replies interface
8831 change.
8832 (first_thread_of, kill_inferior_callback)
8833 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8834 (main): Call initialize_inferiors. Adjust to use ptids, killing
8835 and detaching from all inferiors. Handle multiprocess packet
8836 variants.
8837 * linux-low.h: Include gdb_proc_service.h.
8838 (struct process_info_private): New.
8839 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8840 <lwpid_of>: Use ptid_get_lwp.
8841 (get_lwp_thread): Adjust.
8842 (struct lwp_info): Add `dead' member.
8843 (find_lwp_pid): Declare.
8844 * linux-low.c (thread_db_active): Delete.
8845 (new_inferior): Adjust comment.
8846 (inferior_pid): Delete.
8847 (linux_add_process): New.
8848 (handle_extended_wait): Adjust.
8849 (add_lwp): Change unsigned long to ptid.
8850 (linux_create_inferior): Add process to processes table. Adjust
8851 to use ptids. Don't set new_inferior here.
8852 (linux_attach_lwp): Rename to ...
8853 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8854 it. Adjust to use ptids.
8855 (linux_attach_lwp): New.
8856 (linux_attach): Add process to processes table. Don't set
8857 new_inferior here.
8858 (struct counter): New.
8859 (second_thread_of_pid_p, last_thread_of_process_p): New.
8860 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8861 multiple processes.
8862 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8863 processes. Remove process from process table.
8864 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8865 to multiple processes.
8866 (any_thread_of): New.
8867 (linux_detach): Add `pid' argument, and handle it. Remove process
8868 from processes table.
8869 (linux_join): Add `pid' argument. Handle it.
8870 (linux_thread_alive): Change unsighed long argument to ptid_t.
8871 Consider dead lwps as not being alive.
8872 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8873 threads we're not interested in.
8874 (same_lwp, find_lwp_pid): New.
8875 (linux_wait_for_lwp): Change `pid' argument's type from int to
8876 ptid_t. Adjust.
8877 (linux_wait_for_event): Rename to ...
8878 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8879 from int to ptid_t. Adjust.
8880 (linux_wait_for_event): New.
8881 (linux_wait_1): Add `ptid' argument. Change return type to
8882 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8883 that exit from the process table.
8884 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8885 Adjust.
8886 (mark_lwp_dead): New.
8887 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8888 stopping all threads, mark its main lwp as dead.
8889 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8890 ptids.
8891 (fetch_register, usr_store_inferior_registers)
8892 (regsets_fetch_inferior_registers)
8893 (regsets_store_inferior_registers, linux_read_memory)
8894 (linux_write_memory): Inline `inferior_pid'.
8895 (linux_look_up_symbols): Adjust to use per-process
8896 `thread_db_active'.
8897 (linux_request_interrupt): Adjust to use ptids.
8898 (linux_read_auxv): Inline `inferior_pid'.
8899 (initialize_low): Don't reference thread_db_active.
8900 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8901 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8902 (ps_getpid): Return the pid of the current inferior.
8903 * thread-db.c (proc_handle, thread_agent): Delete.
8904 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8905 per-process data.
8906 (find_one_thread): Change argument type to ptid_t. Adjust to
8907 per-process data.
8908 (maybe_attach_thread): Adjust to per-process data and ptids.
8909 (thread_db_find_new_threads): Ditto.
8910 (thread_db_init): Ditto.
8911 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8912 processes table. Adjust to use ptids.
8913 (spu_kill, spu_detach): Adjust interface. Remove process from
8914 processes table.
8915 (spu_join, spu_thread_alive): Adjust interface.
8916 (spu_wait): Adjust interface. Remove process from processes
8917 table. Adjust to use ptids.
8918 * win32-low.c (current_inferior_tid): Delete.
8919 (current_inferior_ptid): New.
8920 (debug_event_ptid): New.
8921 (thread_rec): Take a ptid. Adjust.
8922 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8923 (child_delete_thread): Ditto.
8924 (do_initial_child_stuff): Add `attached' argument. Add process to
8925 processes table.
8926 (child_fetch_inferior_registers, child_store_inferior_registers):
8927 Adjust.
8928 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8929 (win32_attach): Pass 1 to do_initial_child_stuff.
8930 (win32_kill): Adjust interface. Remove process from processes
8931 table.
8932 (win32_detach): Ditto.
8933 (win32_join): Adjust interface.
8934 (win32_thread_alive): Take a ptid.
8935 (win32_resume): Adjust to use ptids.
8936 (get_child_debug_event): Ditto.
8937 (win32_wait): Adjust interface. Remove exiting process from
8938 processes table.
8939
8940 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8941
8942 Non-stop mode support.
8943
8944 * server.h (non_stop): Declare.
8945 (gdb_client_data, handler_func): Declare.
8946 (delete_file_handler, add_file_handler, start_event_loop):
8947 Declare.
8948 (handle_serial_event, handle_target_event, push_event)
8949 (putpkt_notif): Declare.
8950 * target.h (enum resume_kind): New.
8951 (struct thread_resume): Replace `step' field by `kind' field.
8952 (TARGET_WNOHANG): Define.
8953 (struct target_ops) <wait>: Add `options' argument.
8954 <supports_non_stop, async, start_non_stop>: New fields.
8955 (target_supports_non_stop, target_async): New.
8956 (start_non_stop): Declare.
8957 (mywait): Add `options' argument.
8958 * target.c (mywait): Add `options' argument. Print child exit
8959 notifications here.
8960 (start_non_stop): New.
8961 * server.c (non_stop, own_buf, mem_buf): New globals.
8962 (struct vstop_notif): New.
8963 (notif_queue): New global.
8964 (queue_stop_reply, push_event, discard_queued_stop_replies)
8965 (send_next_stop_reply): New.
8966 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8967 interface changes.
8968 (attach_inferior): In non-stop mode, don't wait for the target
8969 here.
8970 (handle_general_set): Handle QNonStop.
8971 (handle_query): When handling qC, return the current general
8972 thread, instead of the first thread of the list.
8973 (handle_query): If the backend supports non-stop mode, include
8974 QNonStop+ in the qSupported query response.
8975 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8976 and non-stop mode.
8977 (handle_v_attach, handle_v_run): Handle non-stop mode.
8978 (handle_v_stopped): New.
8979 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8980 (myresume): Adjust to use resume_kind. Handle non-stop.
8981 (queue_stop_reply_callback): New.
8982 (handle_status): Handle non-stop mode.
8983 (main): Clear non_stop flag on reconnection. Use the event-loop.
8984 Refactor serial protocol handling from here ...
8985 (process_serial_event): ... to this new function. When GDB
8986 selects any thread, select one here. In non-stop mode, wait until
8987 GDB acks all pending events before exiting.
8988 (handle_serial_event, handle_target_event): New.
8989 * remote-utils.c (remote_open): Install remote_desc in the event
8990 loop.
8991 (remote_close): Remove remote_desc from the event loop.
8992 (putpkt_binary): Rename to...
8993 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8994 (putpkt_binary): New as wrapper around putpkt_binary_1.
8995 (putpkt_notif): New.
8996 (prepare_resume_reply): In non-stop mode, don't change the
8997 general_thread.
8998 * event-loop.c: New.
8999 * Makefile.in (OBJ): Add event-loop.o.
9000 (event-loop.o): New rule.
9001
9002 * linux-low.h (pid_of): Moved here.
9003 (lwpid_of): New.
9004 (get_lwp_thread): Use lwpid_of.
9005 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9006 * linux-low.c (pid_of): Delete.
9007 (inferior_pid): Use lwpid_of.
9008 (linux_event_pipe): New.
9009 (target_is_async_p): New.
9010 (delete_lwp): New.
9011 (handle_extended_wait): Use lwpid_of.
9012 (add_lwp): Don't set lwpid field.
9013 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9014 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9015 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9016 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9017 first. Adjust to linux_wait_for_event interface changes. Use
9018 lwpid_of.
9019 (linux_detach): Don't delete the main lwp here.
9020 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9021 (status_pending_p): Don't consider explicitly suspended lwps.
9022 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9023 pointer. Add OPTIONS argument. Change return type to int. Use
9024 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9025 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9026 pointer. Add status pointer argument. Return a pid instead of a
9027 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9028 changes. In non-stop mode, don't switch to a random thread.
9029 (linux_wait): Rename to...
9030 (linux_wait_1): ... this. Add target_options argument, and handle
9031 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9032 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9033 clean exit and signal exit code. Don't stop all threads in
9034 non-stop mode. In all-stop mode, only stop all threads when
9035 reporting a stop to GDB. Handle explicit thread stop requests.
9036 (async_file_flush, async_file_mark): New.
9037 (linux_wait): New.
9038 (send_sigstop): Use lwpid_of.
9039 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9040 interface changes. In non-stop mode, don't switch to a random
9041 thread.
9042 (linux_resume_one_lwp): Use lwpid_of.
9043 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9044 (linux_resume_one_thread): ... this. Handle resume_stop. In
9045 non-stop mode, don't look for pending flag in all threads.
9046 (resume_status_pending_p): Don't consider explicitly suspended
9047 threads.
9048 (my_waitpid): Reimplement. Emulate __WALL.
9049 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9050 Use lwpid_of.
9051 (sigchld_handler, linux_supports_non_stop, linux_async)
9052 (linux_start_non_stop): New.
9053 (linux_target_ops): Register linux_supports_non_stop, linux_async
9054 and linux_start_non_stop.
9055 (initialize_low): Install SIGCHLD handler.
9056 * thread-db.c (thread_db_create_event, find_one_thread)
9057 (thread_db_get_tls_address): Use lwpid_of.
9058 * win32-low.c (win32_detach): Adjust to use resume_kind.
9059 (win32_wait): Add `options' argument.
9060 * spu-low.c (spu_resume): Adjust to use resume_kind.
9061 (spu_wait): Add `options' argument.
9062
9063 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9064
9065 Decouple target code from remote protocol.
9066
9067 * target.h (enum target_waitkind): New.
9068 (struct target_waitstatus): New.
9069 (struct target_ops) <wait>: Return an unsigned long. Take a
9070 target_waitstatus pointer instead of a char pointer.
9071 (mywait): Likewise.
9072 * target.c (mywait): Change prototype to return an unsigned long.
9073 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9074 * server.h (thread_from_wait, old_thread_from_wait): Delete
9075 declarations.
9076 (prepare_resume_reply): Change prototype to take a
9077 target_waitstatus.
9078 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9079 (last_status, last_ptid): New.
9080 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9081 pid instead of a signal.
9082 (attach_inferior): Remove "status" and "signal" parameters.
9083 Adjust.
9084 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9085 not as an address.
9086 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9087 (handle_v_requests, myresume): Remove "status" and "signal"
9088 parameters. Adjust.
9089 (handle_status): New.
9090 (main): Delete local `status'. Adjust.
9091 * remote-utils.c: Include target.h.
9092 (prepare_resume_reply): Change prototype to take a
9093 target_waitstatus. Adjust.
9094
9095 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9096 interface.
9097 * spu-low.c (spu_wait): Adjust.
9098 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9099 Delete.
9100 (win32_wait): Adjust.
9101
9102 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9103
9104 * target.h (struct thread_resume): Delete leave_stopped member.
9105 (struct target_ops): Add a `n' argument to the `resume' callback.
9106 * server.c (start_inferior): Adjust.
9107 (handle_v_cont, myresume): Adjust.
9108 * linux-low.c (check_removed_breakpoint): Adjust to resume
9109 interface change, and to removed leave_stopped field.
9110 (resume_ptr): Delete.
9111 (struct thread_resume_array): New.
9112 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9113 resume interface change.
9114 (linux_continue_one_thread, linux_queue_one_thread)
9115 (resume_status_pending_p): Check if the resume field is NULL
9116 instead of checking the leave_stopped member.
9117 (linux_resume): Adjust to the target resume interface change.
9118 * spu-low.c (spu_resume): Adjust to the target resume interface
9119 change.
9120 * win32-low.c (win32_detach, win32_resume): Ditto.
9121
9122 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9123
9124 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9125 flag.
9126 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9127 pending.
9128 (linux_continue_one_thread): Only preserve the stepping flag if
9129 there's a pending breakpoint.
9130
9131 2009-03-31 Pedro Alves <pedro@codesourcery.com>
9132
9133 * server.c (main): After the inferior having exited, call
9134 remote_close before exiting gdbserver.
9135
9136 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9137
9138 Fix size of FPSCR in Power 7 processors.
9139 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9140 (PPC_FEATURE_HAS_DFP): New #define.
9141 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9142 size of the FPSCR.
9143
9144 2009-03-23 Pedro Alves <pedro@codesourcery.com>
9145
9146 * server.c (handle_query) Whitespace and formatting.
9147
9148 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9149
9150 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9151 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9152 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9153 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9154 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9155 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9156 Makefile.in, configure.ac: Fix whitespace throughout.
9157 * configure: Regenerate.
9158
9159 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9160
9161 * inferiors.c (find_inferior): Make it safe for the callback
9162 function to delete the currently iterated inferior.
9163
9164 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9165
9166 * Makefile.in (linuw_low_h): Move higher.
9167 (thread-db.o): Depend on $(linux_low_h).
9168
9169 2009-03-17 Pedro Alves <pedro@codesourcery.com>
9170
9171 Rename "process" to "lwp" throughout.
9172
9173 * linux-low.c (all_processes): Rename to...
9174 (all_lwps): ... this.
9175 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9176 (add_process): Rename to ...
9177 (add_lwp): ... this. Adjust.
9178 (linux_create_inferior): Adjust.
9179 (linux_attach_lwp): Adjust.
9180 (linux_attach): Adjust.
9181 (linux_kill_one_process): Rename to ...
9182 (linux_kill_one_lwp): ... this. Adjust.
9183 (linux_kill): Adjust.
9184 (linux_detach_one_process): Rename to ...
9185 (linux_detach_one_lwp): ... this. Adjust.
9186 (linux_detach): Adjust.
9187 (check_removed_breakpoint): Adjust.
9188 (status_pending_p): Adjust.
9189 (linux_wait_for_process): Rename to ...
9190 (linux_wait_for_lwp): ... this. Adjust.
9191 (linux_wait_for_event): Adjust.
9192 (send_sigstop): Adjust.
9193 (wait_for_sigstop): Adjust.
9194 (stop_all_processes): Rename to ...
9195 (stop_all_lwps): ... this.
9196 (linux_resume_one_process): Rename to ...
9197 (linux_resume_one_lwp): ... this. Adjust.
9198 (linux_set_resume_request, linux_continue_one_thread)
9199 (linux_queue_one_thread, resume_status_pending_p)
9200 (usr_store_inferior_registers, regsets_store_inferior_registers)
9201 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9202 Adjust.
9203 * linux-low.h (get_process): Rename to ...
9204 (get_lwp): ... this. Adjust.
9205 (get_thread_process): Rename to ...
9206 (get_thread_lwp): ... this. Adjust.
9207 (get_process_thread): Rename to ...
9208 (get_lwp_thread): ... this. Adjust.
9209 (struct process_info): Rename to ...
9210 (struct lwp_info): ... this.
9211 (all_processes): Rename to ...
9212 (all_lwps): ... this.
9213 * proc-service.c (ps_lgetregs): Adjust.
9214 * thread-db.c (thread_db_create_event, find_one_thread)
9215 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9216
9217 2009-03-14 Pedro Alves <pedro@codesourcery.com>
9218
9219 * server.c (handle_query): Handle "qAttached".
9220
9221 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9222
9223 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9224 GPLv3, update license URL.
9225
9226 2009-03-01 Doug Evans <dje@google.com>
9227
9228 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
9229 (server_h): Add gdb_signals.h.
9230 (signals.o): Update.
9231 * server.h (target_signal_from_host,target_signal_to_host_p)
9232 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9233
9234 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9235
9236 * remote-utils.c (getpkt): Also generate remote-debug
9237 information if noack_mode is set.
9238
9239 2009-02-06 Pedro Alves <pedro@codesourcery.com>
9240
9241 * server.c (handle_query): Report qXfer:siginfo:read and
9242 qXfer:siginfo:write as supported and handle them.
9243 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9244 * linux-low.c (linux_xfer_siginfo): New.
9245 (linux_target_ops): Set it.
9246
9247 2009-01-26 Pedro Alves <pedro@codesourcery.com>
9248
9249 * server.c (gdbserver_usage): Mention --remote-debug.
9250 (main): Accept '--remote-debug' switch.
9251
9252 2009-01-18 Doug Evans <dje@google.com>
9253
9254 * regcache.c (new_register_cache): No need to check result of xcalloc.
9255 * server.c (handle_search_memory): Back out calls to xmalloc,
9256 result is checked and error is returned to user upon failure.
9257 (handle_query): Ditto. Add more checks for result of malloc.
9258 (handle_v_cont): Check result of malloc, report error back to
9259 user upon failure.
9260 (handle_v_run): Ditto. Call freeargv.
9261 * server.h (freeargv): Declare.
9262 * utils.c (freeargv): New fn.
9263
9264 2009-01-15 Doug Evans <dje@google.com>
9265
9266 * gdbreplay.c (perror_with_name): Make arg const char *.
9267 * server.h (target_signal_to_name): Make return type const char *.
9268 * thread-db.c (thread_db_err_str): Make return type const char *.
9269 * utils.c (perror_with_name): Make arg const char *.
9270
9271 2009-01-14 Pedro Alves <pedro@codesourcery.com>
9272
9273 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9274 when handling a EXIT_PROCESS_DEBUG_EVENT.
9275
9276 2009-01-06 Joel Brobecker <brobecker@adacore.com>
9277
9278 * gdbreplay.c (gdbreplay_version): Update copyright year.
9279 * server.c (gdbserver_version): Likewise.
9280
9281 2009-01-05 Doug Evans <dje@google.com>
9282
9283 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
9284 (handle_extended_wait): Improve comment.
9285
9286 2008-12-13 Doug Evans <dje@google.com>
9287
9288 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9289 * server.h (ATTR_MALLOC): New macro.
9290 (xmalloc,xcalloc,xstrdup): Declare.
9291 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9292 * inferiors.c: Ditto.
9293 * linux-low.c: Ditto.
9294 * mem-break.c: Ditto.
9295 * regcache.c: Ditto.
9296 * remote-utils.c: Ditto.
9297 * server.c: Ditto.
9298 * target.c: Ditto.
9299 * win32-low.c: Ditto.
9300
9301 2008-12-12 Doug Evans <dje@google.com>
9302
9303 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9304 in debugging printf.
9305
9306 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9307
9308 2008-12-09 Doug Evans <dje@google.com>
9309
9310 * linux-low.h (struct process_info): Delete member tid, unused.
9311 * thread-db.c (find_one_thread): Update.
9312 (maybe_attach_thread): Update.
9313
9314 2008-12-02 Pedro Alves <pedro@codesourcery.com>
9315
9316 * target.h (struct target_ops): Add qxfer_osdata member.
9317 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9318 and dirent.h.
9319 (linux_qxfer_osdata): New functions.
9320 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9321 callback.
9322 * server.c (handle_query): Handle "qXfer:osdata:read:".
9323 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9324 (buffer_xml_printf): New functions.
9325 * server.h (struct buffer): New.
9326 (buffer_grow_str, buffer_grow_str0): New macros.
9327 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9328 (buffer_xml_printf): Declare.
9329
9330 2008-11-24 Doug Evans <dje@google.com>
9331
9332 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9333
9334 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9335
9336 * server.c (handle_v_run): Always use the supplied argument list.
9337
9338 2008-11-19 Bob Wilson <bob.wilson@acm.org>
9339
9340 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9341 (xtensa_regmap_table): Add entry for scompare1.
9342
9343 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9344
9345 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9346 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9347 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9348 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9349 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9350 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9351 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9352 XML target descriptions.
9353 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9354 when inferior is running on an ISA 2.05 or later processor. Add
9355 special case to return offset for full 64-bit slot of FPSCR when
9356 in 32-bits.
9357
9358 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9359
9360 * Makefile.in (SFILES, clean): Added sparc64 files.
9361 (reg-sparc64.o, reg-sparc64.c): New.
9362 * configure.srv (sparc*-*-linux*): New configuration.
9363 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9364 syscall arguments for SPARC.
9365 (regsets_store_inferior_registers): Likewise.
9366 * linux-sparc-low.c: New file.
9367
9368 2008-10-21 Doug Evans <dje@google.com>
9369
9370 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9371 (READLINE_DIR,READLINE_DEP): Delete.
9372 (INTERNAL_CFLAGS): Update.
9373 (LINTFLAGS): Update.
9374
9375 2008-10-10 Pedro Alves <pedro@codesourcery.com>
9376
9377 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9378 whole argv from the last run, not just argv[0].
9379
9380 2008-09-08 Pedro Alves <pedro@codesourcery.com>
9381
9382 * regcache.c (new_register_cache): Return NULL if the register
9383 cache size isn't known yet.
9384 (free_register_cache): Avoid dereferencing a NULL regcache.
9385
9386 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9387
9388 * configure.srv: Merge MIPS and MIPS64.
9389
9390 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9391
9392 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9393
9394 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
9395
9396 * Makefile.in: Add required vsx dependencies.
9397
9398 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9399 Declare init_registers_powerpc_vsx32l.
9400 Declare init_registers_powerpc_vsx64l.
9401 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9402 (ppc_arch_setup): Check for VSX in hwcap.
9403 (ppc_fill_vsxregset): New function.
9404 (ppc_store_vsxregset): New function.
9405 Add new VSX entry in regset_info target_regsets.
9406
9407 * configure.srv: Add new VSX dependencies.
9408
9409 2008-08-12 Pedro Alves <pedro@codesourcery.com>
9410
9411 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9412 (remote_open): Set or clear transport_is_reliable.
9413 (putpkt_binary): Don't expect acks in noack mode.
9414 (getpkt): Don't send ack/nac in noack mode.
9415 * server.c (handle_general_set): Handle QStartNoAckMode.
9416 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9417 qSupported.
9418 (main): Reset noack_mode on every connection.
9419 * server.h (noack_mode): Declare.
9420
9421 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9422
9423 * Makefile.in (GDBREPLAY_OBS): New variable.
9424 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9425
9426 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9427 Daniel Jacobowitz <dan@codesourcery.com>
9428
9429 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9430 (usr_store_inferior_registers): Likewise.
9431 (regsets_store_inferior_registers): Likewise.
9432
9433 2008-07-31 Rolf Jansen <rj@surtec.com>
9434 Pedro Alves <pedro@codesourcery.com>
9435
9436 * configure.ac: Check for memmem declaration.
9437 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9438 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9439 (disable_packet_qfThreadInfo): Unconditionally compile.
9440 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9441 * configure, config.in: Regenerate.
9442
9443 2008-07-28 Doug Kwan <dougkwan@google.com>
9444
9445 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9446 (linux_write_memory): Remove declaration of errno.
9447
9448 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9449
9450 * linux-low.c (handle_extended_wait): Do not use "status"
9451 variable uninitialized.
9452
9453 2008-07-07 Pedro Alves <pedro@codesourcery.com>
9454
9455 * server.c (handle_v_attach): Inhibit reporting dll changes.
9456
9457 2008-06-27 Pedro Alves <pedro@codesourcery.com>
9458
9459 * remote-utils.c (prepare_resume_reply): If requested, don't
9460 output "thread:TID" in the T stop reply.
9461
9462 * server.c (disable_packet_vCont, disable_packet_Tthread)
9463 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9464 (handle_query): If requested, disable support for qC, qfThreadInfo
9465 and qsThreadInfo.
9466 (handle_v_requests): If requested, disable support for vCont.
9467 (gdbserver_show_disableable): New.
9468 (main): Handle --disable-packet and --disable-packet=LIST.
9469
9470 * server.h (disable_packet_vCont, disable_packet_Tthread)
9471 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9472
9473 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9474
9475 * server.c (gdbserver_usage): Mention --version.
9476
9477 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9478
9479 * Makefile.in (gdbreplay.o): New rule.
9480
9481 2008-06-06 Joseph Myers <joseph@codesourcery.com>
9482
9483 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9484 message, not gdbserver.
9485
9486 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
9487 Nathan Sidwell <nathan@codesourcery.com>
9488 Joseph Myers <joseph@codesourcery.com>
9489
9490 * acinclude.m4: Include ../../config/acx.m4.
9491 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9492 * configure, config.in: Regenerate.
9493 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9494 * server.c (gdbserver_version): Print PKGVERSION.
9495 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9496 (main): Adjust gdbserver_usage calls.
9497 * gdbreplay.c (version, host_name): Add declarations.
9498 (gdbreplay_version, gdbreplay_usage): New.
9499 (main): Accept --version and --help options.
9500
9501 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9502
9503 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9504 (arm_breakpoint_at): Handle Thumb.
9505 (the_low_target): Add comment.
9506
9507 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9508
9509 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9510
9511 2008-05-09 Doug Evans <dje@google.com>
9512
9513 * server.h (decode_search_memory_packet): Declare.
9514 * remote-utils.c (decode_search_memory_packet): New fn.
9515 * server.c (handle_search_memory_1): New fn.
9516 (handle_search_memory): New fn.
9517 (handle_query): Process qSearch:memory packets.
9518
9519 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9520
9521 * regcache.c (registers_length): Remove.
9522 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9523 full register packet.
9524 * regcache.h (registers_length): Remove prototype.
9525 * server.h (PBUFSIZ): Define to 16384.
9526
9527 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9528
9529 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9530 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9531 powerpc-64l.o, and powerpc-altivec64l.o.
9532 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9533 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9534 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9535 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9536 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9537 to srv_xmlfiles.
9538
9539 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9540 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9541 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9542 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9543 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9544 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9545 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9546 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9547 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9548 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9549 (clean): Update.
9550
9551 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9552 (init_registers_powerpc_32l): ... this new prototype.
9553 (init_registers_powerpc_32): Remove, replace by ...
9554 (init_registers_powerpc_altivec32l): ... this new prototype.
9555 (init_registers_powerpc_e500): Remove, replace by ...
9556 (init_registers_powerpc_e500l): ... this new prototype.
9557 (init_registers_ppc64): Remove, replace by ...
9558 (init_registers_powerpc_64l): ... this new prototype.
9559 (init_registers_powerpc_64): Remove, replace by ...
9560 (init_registers_powerpc_altivec64l): ... this new prototype.
9561 (ppc_num_regs): Set to 73.
9562 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9563 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9564 (ppc_cannot_store_register): Handle orig_r3 and trap.
9565 (ppc_arch_setup): Update init_registers_... calls.
9566 (ppc_fill_gregset): Handle orig_r3 and trap.
9567
9568 * inferiors.c (clear_inferiors): Reset current_inferior.
9569
9570 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
9571
9572 * acinclude.m4: Add override.m4.
9573 * configure: Regenerate.
9574
9575 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9576
9577 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9578 initial call to init_register_ppc64.
9579
9580 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9581
9582 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9583 single powerpc*-*-linux* case.
9584 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9585
9586 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9587
9588 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
9589 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
9590 from reg_xmlfiles.
9591 * linux-ppc-low.c: Include <elf.h>.
9592 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9593 (ppc_hwcap): New global variable.
9594 (ppc_regmap): Remove __SPE__ #ifdef sections.
9595 (ppc_regmap_e500): New global variable.
9596 (ppc_cannot_store_register): Update __SPE__ special case.
9597 (ppc_get_hwcap): New function.
9598 (ppc_arch_setup): Use it to determine whether inferior supports
9599 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9600 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9601 Do not access registers if target does not support AltiVec.
9602 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9603 Do not access registers if target does not support SPE.
9604 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9605
9606 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9607
9608 * linux-low.c (disabled_regsets, num_regsets): New.
9609 (use_regsets_p): Delete.
9610 (linux_wait_for_process): Clear disabled_regsets.
9611 (regsets_fetch_inferior_registers): Check and set it.
9612 (regsets_store_inferior_registers): Likewise.
9613 (linux_fetch_registers, linux_store_registers): Do not use
9614 use_regsets_p.
9615 (initialize_low): Allocate disabled_regsets.
9616
9617 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9618
9619 * Makefile.in (LIBOBJS): New.
9620 (OBS): Use LIBOBJS.
9621 (memmem.o): New rule.
9622 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9623 * configure: Regenerated.
9624
9625 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9626
9627 * server.c (handle_query): Never return "unsupported" for
9628 qXfer:features:read queries.
9629
9630 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9631
9632 * server.c (get_features_xml): Fix inverted condition.
9633 (handle_query): Always support qXfer:feature:read.
9634
9635 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9636
9637 * server.c (wrapper_argv): New.
9638 (start_inferior): Handle wrapper_argv. If set, expect an extra
9639 trap.
9640 (gdbserver_usage): Document --wrapper.
9641 (main): Parse --wrapper.
9642
9643 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9644
9645 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9646 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9647 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9648 (ppc_set_pc): Likewise.
9649 (ppc_arch_setup): New function.
9650 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9651 of collect_register.
9652 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
9653
9654 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9655
9656 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9657 instead of linux-ppc64-low.o.
9658 * linux-ppc64-low.c: Remove file.
9659 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9660 (linux-ppc64-low.o): Remove rule.
9661
9662 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9663 (init_registers_powerpc_64): Likewise.
9664 (ppc_regmap): Conditionally define depending on __powerpc64__.
9665 (ppc_cannot_store_register): Do not special-case "fpscr" when
9666 compiled on __powerpc64__.
9667 (ppc_collect_ptrace_register): New function.
9668 (ppc_supply_ptrace_register): New function.
9669 (ppc_breakpoint): Change type to "unsigned int".
9670 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9671 (the_low_target): Conditionally provide initializers for the
9672 arch_setup member depending on __powerpc64__. Install
9673 collect_ptrace_register and supply_ptrace_register members.
9674
9675 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9676
9677 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9678 * server.c (gdbserver_xmltarget): Define.
9679 (get_features_xml): Use it to replace "target.xml" and arch_string.
9680
9681 * configure.srv: Remove srv_xmltarget. Add XML files that were
9682 mentioned there to srv_xmlfiles instead. Remove conditional tests
9683 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9684 srv_xmlfiles and srv_regobj to include all possible choices.
9685 * configure.ac (srv_xmltarget): Remove.
9686 (srv_xmlfiles): Do not add "target.xml".
9687 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9688 checks for supplementary target information.
9689 * configure: Regenerate.
9690 * Makefile.in (XML_TARGET): Remove.
9691 (target.xml): Remove rule.
9692 (clean): Do not clean up target.xml.
9693 (.PRECIOUS): Do not mention target.xml.
9694
9695 * target.h (struct target_ops): Remove arch_string member.
9696 * linux-low.c (linux_arch_string): Remove.
9697 (linux_target_ops): Remove arch_string initializer.
9698 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9699 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9700 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9701 * spu-low.c (spu_arch_string): Remove.
9702 (spu_target_ops): Remove arch_string initializer.
9703 * win32-low.c (win32_arch_string): Remove.
9704 (win32_target_ops): Remove arch_string initializer.
9705 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9706 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9707 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9708
9709 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9710
9711 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9712 by collect_ptrace_register and supply_ptrace_register hooks.
9713 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9714 instead of checking for the_low_target.left_pad_xfer.
9715 (usr_store_inferior_registers): Use collect_ptrace_register callback
9716 instead of checking for the_low_target.left_pad_xfer.
9717
9718 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9719 (s390_supply_ptrace_register): Likewise.
9720 (s390_fill_gregset): Call s390_collect_ptrace_register.
9721 (the_low_target): Update.
9722
9723 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9724 (ppc_supply_ptrace_register): Likewise.
9725 (the_low_target): Update.
9726
9727 * linux-i386-low.c (the_low_target): Update.
9728 * linux-x86-64-low.c (the_low_target): Update.
9729
9730 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9731
9732 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9733 reg-s390.o and reg-s390x.o.
9734
9735 * linux-low.c (new_inferior): New global variable.
9736 (linux_create_inferior, linux_attach): Set it.
9737 (linux_wait_for_process): Call the_low_target.arch_setup after the
9738 target has stopped for the first time.
9739 (initialize_low): Do not call the_low_target.arch_setup.
9740
9741 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9742 (s390_set_pc): Likewise.
9743 (s390_arch_setup): New function.
9744 (the_low_target): Use s390_arch_setup as arch_setup routine.
9745
9746 * regcache.c (realloc_register_cache): New function.
9747 (set_register_cache): Call it for each existing regcache.
9748
9749 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9750
9751 * server.h (init_registers): Remove prototype.
9752
9753 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9754 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9755 instead of init_registers ().
9756 * linux-arm-low.c (init_registers_arm): Add prototype.
9757 (init_registers_arm_with_iwmmxt): Likewise.
9758 (the_low_target): Add initializer for arch_setup field.
9759 * linux-cris-low.c (init_registers_cris): Add prototype.
9760 (the_low_target): Add initializer for arch_setup field.
9761 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9762 (the_low_target): Add initializer for arch_setup field.
9763 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9764 (the_low_target): Add initializer for arch_setup field.
9765 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9766 (the_low_target): Add initializer for arch_setup field.
9767 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9768 (the_low_target): Add initializer for arch_setup field.
9769 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9770 (the_low_target): Add initializer for arch_setup field.
9771 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9772 (init_registers_mips64_linux): Likewise.
9773 (the_low_target): Add initializer for arch_setup field.
9774 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9775 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9776 (the_low_target): Add initializer for arch_setup field.
9777 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9778 (init_registers_powerpc_64): Likewise.
9779 (the_low_target): Add initializer for arch_setup field.
9780 * linux-s390-low.c (init_registers_s390): Add prototype.
9781 (init_registers_s390x): Likewise.
9782 (the_low_target): Add initializer for arch_setup field.
9783 * linux-sh-low.c (init_registers_sh): Add prototype.
9784 (the_low_target): Add initializer for arch_setup field.
9785 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9786 (the_low_target): Add initializer for arch_setup field.
9787 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9788 (the_low_target): Add initializer for arch_setup field.
9789
9790 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9791 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9792 instead of init_registers ().
9793 * win32-arm-low.c (init_registers_arm): Add prototype.
9794 (the_low_target): Add initializer for arch_setup field.
9795 * win32-i386-low.c (init_registers_i386): Add prototype.
9796 (the_low_target): Add initializer for arch_setup field.
9797
9798 * spu-low.c (init_registers_spu): Add prototype.
9799 (initialize_low): Call initialie_registers_spu () instead of
9800 initialize_registers ().
9801
9802 2008-02-19 Pedro Alves <pedro@codesourcery.com>
9803
9804 * server.c (handle_v_requests): When handling the vRun and vAttach
9805 packets, if already debugging a process, don't kill it. Return an
9806 error instead.
9807
9808 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9809
9810 * server.c (handle_query): Correct length check.
9811
9812 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9813
9814 * win32-low.c (do_initial_child_stuff): Add process handle
9815 parameter. Set current_process_handle and current_process_id from the
9816 parameters. Clear globals.
9817 (win32_create_inferior): Don't set current_process_handle and
9818 current_process_id here. Instead pass them on the call to
9819 do_initial_child_stuff.
9820 (win32_attach): Likewise.
9821 (win32_clear_inferiors): New.
9822 (win32_kill): Don't close the current process handle or the
9823 current thread handle here. Instead call win32_clear_inferiors.
9824 (win32_detach): Don't open a new handle to the process. Call
9825 win32_clear_inferiors.
9826 (win32_join): Don't rely on current_process_handle; open a new
9827 handle using the process id.
9828 (win32_wait): Call win32_clear_inferiors when the inferior process
9829 has exited.
9830
9831 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9832
9833 * server.c (monitor_show_help): Add "exit".
9834
9835 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9836
9837 * Makefile.in (SFILES): Add linux-xtensa-low.c.
9838 (clean): Add reg-xtensa.c.
9839 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
9840 * configure.srv (xtensa*-*-linux*) New target.
9841 * linux-xtensa-low.c: New.
9842 * xtensa-xtregs.c: New.
9843
9844 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9845
9846 * hostio.c: Don't include errno.h.
9847 (errno_to_fileio_errno): Move to hostio-errno.
9848 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9849 error number outputting to the target->hostio_last_error callback.
9850 (hostio_packet_error): Use FILEIO_EINVAL directly.
9851 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9852 calls to hostio_error.
9853 * hostio-errno.c: New.
9854 * server.h (hostio_last_error_from_errno): Declare.
9855 * target.h (target_ops): Add hostio_last_error member.
9856 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9857 as hostio_last_error handler.
9858 * spu-low.c (spu_target_ops): Likewise.
9859 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9860 (wince_hostio_last_error): New functions.
9861 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9862 as hostio_last_error handler.
9863 (win32_target_ops) [!_WIN32_WCE]: Register
9864 hostio_last_error_from_errno as hostio_last_error handler.
9865 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9866 (hostio-errno.o): New rule.
9867 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9868 * configure.srv (srv_hostio_err_objs): New variable. Default to
9869 hostio-errno.o.
9870 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9871 * configure: Regenerate.
9872
9873 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9874
9875 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9876 (linux_kill, linux_detach): Clean up the process list.
9877 * remote-utils.c (remote_open): Improve port number parsing.
9878 (putpkt_binary, input_interrupt): Only send interrupts if the target
9879 is running.
9880 * server.c (extended_protocol): Make static.
9881 (attached): Define earlier.
9882 (exit_requested, response_needed, program_argv): New variables.
9883 (target_running): New.
9884 (start_inferior): Clear attached here.
9885 (attach_inferior): Set attached here.
9886 (require_running): Define.
9887 (handle_query): Use require_running and target_running. Implement
9888 "monitor exit".
9889 (handle_v_attach, handle_v_run): New.
9890 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9891 (gdbserver_usage): Update.
9892 (main): Redo argument parsing. Handle --debug and --multi. Handle
9893 --attach along with other options or after the port. Save
9894 program_argv. Support no initial program. Resynchronize
9895 communication with GDB after an error. Handle "monitor exit".
9896 Use require_running and target_running. Always allow the extended
9897 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9898 restart in extended mode.
9899 * README: Refer to the GDB manual. Update --attach usage.
9900
9901 2007-12-20 Andreas Schwab <schwab@suse.de>
9902
9903 * linux-low.c (STACK_SIZE): Define.
9904 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9905 (linux_test_for_tracefork): Likewise.
9906
9907 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9908
9909 * linux-low.c (linux_wait_for_event): Update messages. Do not
9910 reinsert auto-delete breakpoints.
9911 * mem-break.c (struct breakpoint): Change return type of handler to
9912 int.
9913 (set_breakpoint_at): Update handler type.
9914 (reinsert_breakpoint_handler): Return 1 instead of calling
9915 delete_breakpoint.
9916 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9917 setting a new one.
9918 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9919 * mem-break.h (set_breakpoint_at): Update handler type.
9920 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9921 * win32-low.c (auto_delete_breakpoint): New.
9922 (get_child_debug_event): Use it.
9923
9924 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9925
9926 * configure.ac: Check for pread and pwrite.
9927 * hostio.c (handle_pread): Fall back to lseek and read.
9928 (handle_pwrite): Fall back to lseek and write.
9929 * config.in, configure: Regenerated.
9930
9931 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9932
9933 * server.c (myresume): Add own_buf argument.
9934 (main): Update calls.
9935
9936 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9937
9938 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9939 * remote-utils.c (remote_open): Do not call disable_async_io.
9940 (block_async_io): Delete.
9941 (unblock_async_io): Make static.
9942 (initialize_async_io): New.
9943 * server.c (handle_v_cont): Handle async I/O here.
9944 (myresume): Likewise. Move other common resume tasks here...
9945 (main): ... from here. Call initialize_async_io. Disable async
9946 I/O before the main loop.
9947 * server.h (initialize_async_io): Declare.
9948 (block_async_io, unblock_async_io): Delete prototypes.
9949 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9950
9951 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9952
9953 * remote-utils.c (readchar): Allow binary data in received messages.
9954
9955 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9956
9957 * win32-low.c (attaching): New global.
9958 (win32_create_inferior): Clear the `attaching' global.
9959 (win32_attach): Set the `attaching' global.
9960 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9961 attaching. Only set a breakpoint at the entry point if not
9962 attaching.
9963
9964 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9965
9966 * server.c (main): Don't report dll events on the initial
9967 connection on attaches.
9968
9969 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9970
9971 * server.c (main): Relax numerical bases supported for the pid of
9972 the --attach command line argument.
9973
9974 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9975
9976 * win32-low.c (win32_attach): Call OpenProcess before
9977 DebugActiveProcess, not after. Add last error output to error
9978 call.
9979
9980 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9981
9982 * win32-low.c (win32_get_thread_context)
9983 (win32_set_thread_context): New functions.
9984 (thread_rec): Use win32_get_thread_context.
9985 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9986 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9987 field.
9988
9989 2007-12-03 Leo Zayas
9990 Pedro Alves <pedro_alves@portugalmail.pt>
9991
9992 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9993 global variables.
9994 (child_add_thread): Minor cleanup.
9995 (child_continue): Resume artificially suspended threads before
9996 calling ContinueDebugEvent.
9997 (suspend_one_thread): New.
9998 (fake_breakpoint_event): New.
9999 (get_child_debug_event): Change return type to int. Check here if
10000 gdb sent an interrupt request. If a soft interrupt was requested,
10001 fake a breakpoint event. Return 0 if there is no event to handle,
10002 and 1 otherwise.
10003 (win32_wait): Don't check here if gdb sent an interrupt request.
10004 Ensure there is a valid event to handle.
10005 (win32_request_interrupt): Add soft interruption method as last
10006 resort.
10007
10008 2007-12-03 Leo Zayas
10009 Pedro Alves <pedro_alves@portugalmail.pt>
10010
10011 * win32-low.h (win32_thread_info): Add descriptions to the
10012 structure members. Replace `suspend_count' counter by a
10013 `suspended' flag.
10014 * win32-low.c (thread_rec): Update condition of when to get the
10015 context from the inferior. Rely on ContextFlags being set if it
10016 has already been retrieved. Only suspend the inferior thread if
10017 we haven't already. Warn if that fails.
10018 (continue_one_thread): s/suspend_count/suspended/. Only call
10019 ResumeThread once. Warn if that fails.
10020
10021 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10022
10023 * win32-low.c (win32_wait): Don't read from the inferior when it
10024 has already exited.
10025
10026 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10027
10028 * Makefile.in (win32_low_h): New variable.
10029 (win32-low.o): Add dependency on $(win32_low_h).
10030 (win32-arm-low.o, win32-i386-low.o): New rules.
10031
10032 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10033
10034 * hostio.c: Correct copyright year.
10035
10036 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10037
10038 * Makefile.in (OBS): Add hostio.o.
10039 (hostio.o): New rule.
10040 * server.h (handle_vFile): Declare.
10041 * hostio.c: New file.
10042 * server.c (handle_v_requests): Take packet_len and new_packet_len
10043 for binary packets. Call handle_vFile.
10044 (main): Update call to handle_v_requests.
10045
10046 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10047
10048 * linux-low.c: Include <sched.h>.
10049
10050 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10051
10052 * linux-low.c (linux_tracefork_grandchild): New.
10053 (linux_tracefork_child): Use clone.
10054 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10055
10056 2007-10-31 Joel Brobecker <brobecker@adacore.com>
10057
10058 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10059
10060 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10061
10062 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10063
10064 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10065
10066 * inferiors.c (change_inferior_id): Delete.
10067 (add_pid_to_list, pull_pid_from_list): New.
10068 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10069 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10070 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10071 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10072 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10073 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10074 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10075 (using_threads): Always set to 1.
10076 (handle_extended_wait): New.
10077 (add_process): Do not set TID.
10078 (linux_create_inferior): Set must_set_ptrace_flags.
10079 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10080 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10081 (linux_thread_alive): Rename TID argument to LWPID.
10082 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10083 (linux_wait_for_event): Do not use TID or check using_threads. Update
10084 call to dead_thread_notify. Call handle_extended_wait.
10085 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10086 (send_sigstop): Delete sigstop_sent.
10087 (wait_for_sigstop): Avoid TID.
10088 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10089 (linux_test_for_tracefork): New.
10090 (linux_lookup_signals): Use thread_db_active and
10091 linux_supports_tracefork_flag.
10092 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10093 * linux-low.h (get_process_thread): Avoid TID.
10094 (struct process_ifo): Move thread_known and tid to the end. Remove
10095 sigstop_sent.
10096 (linux_attach_lwp, thread_db_init): Update prototypes.
10097 * server.h (change_inferior_id): Delete prototype.
10098 (add_pid_to_list, pull_pid_from_list): New prototypes.
10099 * thread-db.c (thread_db_use_events): New.
10100 (find_first_thread): Rename to...
10101 (find_one_thread): ...this. Update callers and messages. Do not
10102 call fatal. Check thread_db_use_events. Do not call
10103 change_inferior_id or new_thread_notify.
10104 (maybe_attach_thread): Update. Do not call new_thread_notify.
10105 (thread_db_init): Set thread_db_use_events. Check use_events.
10106 * utils.c (fatal, warning): Correct message prefix.
10107
10108 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10109
10110 * Makefile.in (clean): Remove new files.
10111 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10112 (powerpc-64.o, powerpc-64.c): New rules.
10113 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10114 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10115 with SPE.
10116 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10117 SPE targets.
10118 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10119 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10120 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10121 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10122 (target_regsets): Add AltiVec and SPE register sets.
10123 * configure.ac: Check for AltiVec and SPE.
10124 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10125 (ppc_fill_vrregset, ppc_store_vrregset): New.
10126 (target_regsets): Add AltiVec register set.
10127 * configure: Regenerated.
10128
10129 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10130
10131 * linux-low.c (O_LARGEFILE): Define.
10132 (linux_read_memory): Use /proc/PID/mem.
10133 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10134 * configure, config.in: Regenerated.
10135
10136 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10137
10138 * linux-low.c (linux_wait_for_event): Do not pass signals while
10139 single-stepping.
10140
10141 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10142
10143 * win32-low.c (create_process): New.
10144 (win32_create_inferior): Use create_process instead of
10145 CreateProcess. If create_process failed retry appending an ".exe"
10146 suffix. Store the GetLastError result immediatelly after
10147 create_process calls and use it on the call to error.
10148
10149 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10150
10151 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10152
10153 2007-08-23 Joel Brobecker <brobecker@adacore.com>
10154
10155 * configure.ac: Switch license to GPLv3.
10156
10157 2007-08-01 Michael Snyder <msnyder@access-company.com>
10158
10159 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10160
10161 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10162
10163 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10164 typedef.
10165 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10166 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10167 CloseToolhelp32Snapshot.
10168 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10169 CloseToolhelp32Snapshot.
10170
10171 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
10172
10173 * server.c (main): Check for inferior exit before main loop.
10174
10175 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10176
10177 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10178 instead of on tmp_desc.
10179
10180 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10181 Daniel Jacobowitz <dan@codesourcery.com>
10182
10183 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10184 (add_thread): Minor cleanups.
10185 (clear_inferiors): Move lower in the file. Clear the DLL
10186 list.
10187 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10188 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10189 (xml_escape_text): New.
10190 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10191 for qSupported.
10192 (handle_v_cont): Report errors.
10193 (gdbserver_version): Update.
10194 (main): Correct size of own_buf. Do not report initial DLL events.
10195 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10196 (unloaded_dll, xml_escape_text): New.
10197 * win32-low.c (enum target_waitkind): Update comments.
10198 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10199 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10200 (win32_EnumProcessModules, win32_GetModuleInformation)
10201 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10202 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10203 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10204 (win32_Module32First, win32_Module32Next, load_toolhelp)
10205 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10206 (get_child_debug_event): Handle DLL events.
10207 (win32_wait): Likewise.
10208
10209 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10210
10211 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10212 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10213
10214 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10215
10216 * win32-low.c (handle_output_debug_string): Ignore event if not
10217 waiting.
10218
10219 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10220
10221 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10222
10223 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10224
10225 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10226
10227 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10228
10229 * inferiors.c (change_inferior_id): Add comment.
10230 * linux-low.c (check_removed_breakpoint): Add an early
10231 prototype. Improve debug output.
10232 (linux_attach): Doc update.
10233 (linux_detach_one_process, linux_detach): Clean up before releasing
10234 each process.
10235 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10236 * linux-low.h (struct process_info): Doc improvement.
10237 * mem-break.c (delete_all_breakpoints): New.
10238 * mem-break.h (delete_all_breakpoints): New prototype.
10239 * thread-db.c (find_first_thread): New.
10240 (thread_db_create_event): Call it instead of
10241 thread_db_find_new_threads. Clean up unused variables.
10242 (maybe_attach_thread): Remove first thread handling.
10243 (thread_db_find_new_threads): Use find_first_thread.
10244 (thread_db_get_tls_address): Likewise.
10245
10246 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10247
10248 * thread-db.c (thread_db_find_new_threads): Add prototype.
10249 (thread_db_create_event): Check for the main thread before adding
10250 a new thread.
10251 (maybe_attach_thread): Only enable event reporting if TID == 0.
10252 (thread_db_get_tls_address): Check for new threads.
10253
10254 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10255
10256 * linux-low.c (linux_create_inferior): Try execv before execvp.
10257 * spu-low.c (spu_create_inferior): Likewise.
10258
10259 2007-06-13 Mike Frysinger <vapier@gentoo.org>
10260
10261 * linux-low.c (linux_create_inferior): Change execv to execvp.
10262 * spu-low.c (spu_create_inferior): Likewies.
10263
10264 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10265
10266 * Makefile.in (clean): Clean new files instead of deleted ones.
10267 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10268 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10269 rules.
10270 * configure.srv: Specify XML files and new regformats for MIPS and
10271 MIPS64 GNU/Linux.
10272 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10273 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10274 an entry for the restart register.
10275 (mips_cannot_fetch_register, mips_cannot_store_register)
10276 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10277 register names to match the XML descriptions.
10278 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10279 restart register instead of $0.
10280
10281 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10282 Markus Deuling <deuling@de.ibm.com>
10283
10284 * remote-utils.c (decode_xfer_write): New function.
10285 * server.h (decode_xfer_write): Add prototype.
10286 * server.c (handle_query): Add PACKET_LEN argument. Support
10287 qXfer:spu:read and qXfer:spu:write packets.
10288 (main): Pass packet_len to handle_query.
10289 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10290 * target.h (target_ops): Add qxfer_spu.
10291
10292 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10293
10294 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10295 accessing non-seekable spufs files.
10296
10297 2007-05-16 Markus Deuling <deuling@de.ibm.com>
10298
10299 * server.c (handle_query): Add reply for qC packet.
10300
10301 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10302 Leo Zayas <lerele@champenstudios@com>
10303
10304 * server.h (check_remote_input_interrupt_request): New function.
10305 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10306 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10307 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10308 (check_remote_input_interrupt_request): New function.
10309 * server.h (check_remote_input_interrupt_request): Declare.
10310 * win32-low.c (winapi_DebugBreakProcess,
10311 winapi_GenerateConsoleCtrlEvent): New typedefs.
10312 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10313 to 250 ms.
10314 (win32_wait): Check for remote interrupt request
10315 with check_remote_input_interrupt_request.
10316 (win32_request_interrupt): New function.
10317 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10318
10319 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10320
10321 * win32-low.c (debug_registers_changed,
10322 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10323 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10324 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10325 (thread_rec): Get context using the low target.
10326 (child_add_thread): Call thread_added on the low target,
10327 which does the same thing.
10328 (regptr): Delete.
10329 (do_initial_child_stuff): Remove debug registers references.
10330 Set context using the low target. Resume threads after
10331 setting the contexts.
10332 (child_continue): Remove dead variable. Remove debug
10333 registers references.
10334 (child_fetch_inferior_registers): Go through the low target.
10335 (do_child_store_inferior_registers): Remove.
10336 (child_store_inferior_registers): Go through the low target.
10337 (win32_resume): Remove debug registers references.
10338 Set context using the low target.
10339 (handle_exception): Change return type to void. Don't record
10340 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10341 first chance exception.
10342 (get_child_debug_event): Change return type to void. Remove
10343 goto loop. Always return after waiting for debug event.
10344 (win32_wait): Convert to switch statement. Handle spurious
10345 events.
10346
10347 * win32-i386-low.c (debug_registers_changed,
10348 debug_registers_used): New.
10349 (initial_stuff): Rename to ...
10350 (i386_initial_stuff): ... this. Clear debug registers
10351 state variables.
10352 (store_debug_registers): Delete.
10353 (i386_get_thread_context): New.
10354 (load_debug_registers): Delete.
10355 (i386_set_thread_context): New.
10356 (i386_thread_added): New.
10357 (single_step): Rename to ...
10358 (i386_single_step): ... this.
10359 (do_fetch_inferior_registers): Rename to ...
10360 (i386_fetch_inferior_register): ... this.
10361 (i386_store_inferior_register): New.
10362 (the_low_target): Adapt to new interface.
10363
10364 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10365 (arm_get_thread_context): New.
10366 (arm_set_thread_context): New.
10367 (regptr): New.
10368 (do_fetch_inferior_registers): Rename to ...
10369 (arm_fetch_inferior_register): ... this.
10370 (arm_store_inferior_register): New.
10371 (arm_wince_breakpoint): Reimplement as unsigned long.
10372 (arm_wince_breakpoint_len): Define.
10373 (the_low_target): Adapt to new interface.
10374
10375 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10376 load_debug_registers. Add get_thread_context, set_thread_context,
10377 thread_added and store_inferior_register. Rename
10378 fetch_inferior_registers to fetch_inferior_register.
10379 (regptr): Remove declaration.
10380
10381 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10382
10383 * linux-low.c (linux_detach): Change return type to int. Return 0.
10384 * spu-low.c (spu_detach): Likewise.
10385
10386 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10387
10388 * target.h (target_ops): Change return type of detach to int.
10389 Add join.
10390 (join_inferior): New.
10391 * server.c (main): Don't skip detach support on mingw32.
10392 If the inferior doesn't support detaching return error.
10393 Call join_inferior instead of using waitpid.
10394 * linux-low.c (linux_join): New.
10395 (linux_target_op): Add linux_join.
10396 * spu-low.c (spu_join): New.
10397 (spu_target_ops): Add spu_join.
10398 * win32-low.c (win32_detach): Adapt to new interface.
10399 Reopen current_process_handle before detaching. Issue a child
10400 resume before detaching.
10401 (win32_join): New.
10402 (win32_target_op): Add win32_join.
10403
10404 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10405
10406 * win32-low.c (win32-attach): Fix return value.
10407 * target.h (target_ops): Describe ATTACH return values.
10408
10409 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10410
10411 * win32-low.c (GETPROCADDRESS): Define.
10412 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10413 (winapi_DebugSetProcessKillOnExit): Likewise.
10414 (win32_create_inferior): Force usage of ansi CreateProcessA.
10415 (win32_attach): Use GETPROCADDRESS.
10416 (win32_detach): Likewise.
10417
10418 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10419
10420 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10421
10422 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10423
10424 * win32-low.c: Commit leftover changes from 2007-03-29.
10425
10426 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10427
10428 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10429 fields short instead of int. Add explicit padding.
10430 (i387_cache_to_fsave): Remove unnecessary casts.
10431 (i387_fsave_to_cache): Doc fix.
10432 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10433
10434 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10435
10436 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10437 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10438
10439 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10440
10441 * configure.srv (arm*-*-mingw32ce*): Move near the other
10442 arm targets.
10443
10444 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10445
10446 * configure.ac: Add errno checking.
10447 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10448 sys/file.h and malloc.h.
10449 (AC_CHECK_DECLS): Add perror.
10450 (srv_mingwce): Handle.
10451 * configure.srv (i[34567]86-*-cygwin*): Add
10452 win32-i386-low.o to srv_tgtobj.
10453 (i[34567]86-*-mingw*): Likewise.
10454 (arm*-*-mingw32ce*): Add case.
10455 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10456 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10457 [__MINGW32CE__] (strerror): New function.
10458 [__MINGW32CE__] (errno): Define to GetLastError.
10459 [__MINGW32CE__] (COUNTOF): New macro.
10460 (remote_open): Remove extra close call.
10461 * mem-break.c (delete_breakpoint_at): New function.
10462 * mem-break.h (delete_breakpoint_at): Declare.
10463 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10464 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10465 [USE_WIN32API] (read, write): Add char* casts.
10466 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10467 * server.h: Include wincecompat.h on Windows CE.
10468 [HAVE_ERRNO_H]: Check.
10469 (perror): Declare if not declared.
10470 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10471 (perror_with_name): Remove errno declaration.
10472 * wincecompat.h: New.
10473 * wincecompat.c: New.
10474 * win32-low.h: New.
10475 * win32-arm-low.c: New.
10476 * win32-i386-low.c: New.
10477 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10478 (OUTMSG2): Make it safe.
10479 (_T): New macro.
10480 (COUNTOF): New macro.
10481 (NUM_REGS): Get it from the low target.
10482 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10483 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10484 (thread_rec): Let low target handle debug registers.
10485 (child_add_thread): Likewise.
10486 (child_init_thread_list): Likewise.
10487 (continue_one_thread): Likewise.
10488 (regptr): New.
10489 (do_child_fetch_inferior_registers): Move to ...
10490 * win32-i386-low.c: ... here, and rename to ...
10491 (do_fetch_inferior_registers): ... this.
10492 * win32-low.c (child_fetch_inferior_registers):
10493 Go through the low target.
10494 (do_child_store_inferior_registers): Use regptr.
10495 (strwinerror): New function.
10496 (win32_create_inferior): Handle Windows CE.
10497 Use strwinerror instead of strerror on Windows error
10498 codes. Add program to the error output.
10499 Don't close the main thread handle on Windows CE.
10500 (win32_attach): Use coredll.dll on Windows CE.
10501 (win32_kill): Close current process and current
10502 thread handles.
10503 (win32_detach): Use coredll.dll on Windows CE.
10504 (win32_resume): Let low target handle debug registers, and
10505 step request.
10506 (handle_exception): Add/Remove initial breakpoint. Avoid
10507 non-existant WSTOPSIG on Windows CE.
10508 (win32_read_inferior_memory): Cast to remove warning.
10509 (win32_arch_string): Go through the low target.
10510 (initialize_low): Call set_breakpoint_data with the low
10511 target's breakpoint.
10512 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10513 FOP_REGNUM, mappings): Move to ...
10514 * win32-i386-low.c: ... here.
10515 * win32-low.c (win32_thread_info): Move to ...
10516 * win32-low.h: ... here.
10517 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10518 win32-arm-low.c and wincecompat.c.
10519 (all:): Add $EXEEXT.
10520 (install-only:): Likewise.
10521 (gdbserver:): Likewise.
10522 (gdbreplay:): Likewise.
10523 * config.in: Regenerate.
10524 * configure: Regenerate.
10525
10526 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10527
10528 * win32-low.c: Rename typedef thread_info to
10529 win32_thread_info throughout.
10530
10531 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10532
10533 * win32-i386-low.c: Rename to ...
10534 * win32-low.c: ... this.
10535 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10536 * Makefile.in: Likewise.
10537
10538 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10539
10540 * remote-utils.c (monitor_output): Constify msg parameter.
10541 * server.h (monitor_output): Likewise.
10542 * win32-i386-low.c (handle_output_debug_string): New.
10543 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10544 handle_output_debug_string.
10545 (get_child_debug_event): Likewise.
10546
10547 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10548
10549 * server.c (main): Correct strtoul check.
10550
10551 2007-03-27 Jon Ringle <jon@ringle.org>
10552
10553 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10554
10555 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10556
10557 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10558
10559 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10560
10561 * terminal.h: Check HAVE_SGTTY_H.
10562
10563 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
10564
10565 * remote-utils.c (remote_open): Print out the assigned port number.
10566
10567 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10568
10569 * remote-utils.c (monitor_output): New function.
10570 * server.c (debug_threads): Define here.
10571 (monitor_show_help): New function.
10572 (handle_query): Handle qRcmd.
10573 (main): Do not handle 'd' packet.
10574 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10575 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10576 of debug_threads.
10577
10578 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10579
10580 * Makefile.in (EXEEXT): New.
10581 (clean): Use $(EXEEXT).
10582
10583 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10584
10585 * target.h (target_ops): Rename send_signal to request_interrupt,
10586 and remove enum target_signal parameter.
10587 * linux-low.c (linux_request_interrupt): Rename from
10588 linux_send_signal, and always send SIGINT.
10589 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10590 and always send SIGINT.
10591 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10592 of send_signal.
10593 (input_interrupt): Likewise.
10594
10595 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10596
10597 * server.c (get_features_xml): Check if target implemented
10598 arch_string.
10599 * win32-i386-low.c (win32_arch_string): New.
10600 (win32_target_ops): Add win32_arch_string as arch_string member.
10601
10602 2007-02-22 Markus Deuling <deuling@de.ibm.com>
10603
10604 * spu-low.c (spu_arch_string): New.
10605 (spu_target_ops): Add spu_arch_string.
10606
10607 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10608
10609 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10610 * configure.ac: Do not check for terminal.h.
10611 * configure, config.in: Regenerated.
10612
10613 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10614
10615 * Makefile.in (OBS): Add $(XML_BUILTIN).
10616 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10617 (clean): Update.
10618 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10619 (arm-with-iwmmxt.c): New.
10620 * config.in, configure: Regenerate.
10621 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10622 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10623 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10624 (arm*-*-linux*): Add iWMMXt and regset support.
10625 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10626 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10627 (arm_store_wmmxregset, target_regsets): New.
10628 * server.c (get_features_xml): Take annex argument. Check builtin
10629 XML documents.
10630 (handle_query): Handle multiple annexes.
10631
10632 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10633
10634 * remote-utils.c [USE_WIN32API] (read, write): Define.
10635 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10636 write.
10637
10638 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10639
10640 * linux-i386-low.c (the_low_target): Set arch_string.
10641 * linux-x86-64-low.c (the_low_target): Likewise.
10642 * linux-low.c (linux_arch_string): New.
10643 (linux_target_ops): Add it.
10644 * linux-low.h (struct linux_target_ops): Add arch_string.
10645 * server.c (write_qxfer_response): Use const void * for DATA.
10646 (get_features_xml): New.
10647 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10648 * target.h (struct target_ops): Add arch_string method.
10649
10650 2007-01-03 Denis Pilat <denis.pilat@st.com>
10651 Daniel Jacobowitz <dan@codesourcery.com>
10652
10653 * linux-low.c (linux_kill): Handle being called with no threads.
10654 * win32-i386-low.c (win32_kill): Likewise.
10655 (get_child_debug_event): Clear current_process_handle.
10656
10657 2006-12-30 Denis PILAT <denis.pilat@st.com>
10658 Daniel Jacobowitz <dan@codesourcery.com>
10659
10660 * remote-utils.c (remote_open): Check the type of specified
10661 serial port devices before opening them.
10662 * server.c (main): Kill the inferior if an error occurs during
10663 the first remote_open.
10664
10665 2006-12-05 Markus Deuling <deuling@de.ibm.com>
10666
10667 * README: Update supported targets.
10668
10669 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10670
10671 * Makefile.in (clean): Remove reg-mips64.c.
10672 (reg-mips64.c, reg-mips64.o): New rules.
10673 * configure.srv: Handle mips64. Include regset support for mips.
10674 * linux-mips-low.c (union mips_register): New.
10675 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10676 (mips_breakpoint, mips_breakpoint_at): Use int.
10677 (mips_collect_register, mips_supply_register)
10678 (mips_collect_register_32bit, mips_supply_register_32bit)
10679 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10680 (mips_store_fpregset, target_regsets): New.
10681 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10682
10683 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10684
10685 * configure.srv: Add target "spu*-*-*".
10686 * Makefile.in (clean): Remove reg-spu.c.
10687 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10688 * spu-low.c: New file.
10689
10690 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10691
10692 * configure.ac: Correct td_thr_tls_get_addr test.
10693 * configure: Regenerated.
10694
10695 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10696
10697 * linux-low.c (linux_wait_for_event): Reformat. Use the
10698 pass_signals array.
10699 * remote-utils.c (decode_address_to_semicolon): New.
10700 * server.c (pass_signals, handle_general_set): New.
10701 (handle_query): Mention QPassSignals for qSupported.
10702 (main): Call handle_general_set.
10703 * server.h (pass_signals, decode_address_to_semicolon): New.
10704
10705 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10706
10707 * server.c (handle_query): Correct error handling for read_auxv.
10708
10709 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10710
10711 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10712 and srv_linux_thread_db to yes.
10713 * linux-s390-low.c (s390_fill_gregset): New function.
10714 (target_regsets): Define data structure.
10715
10716 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10717
10718 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10719 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10720 * config.in, configure: Regenerated.
10721 * inferiors.c (gdb_id_to_thread): New function.
10722 (gdb_id_to_thread_id): Use it.
10723 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10724 * linux-low.h (struct process_info): Add th member.
10725 (thread_db_get_tls_address): New prototype.
10726 * remote-utils.c (decode_address): Make non-static.
10727 * server.c (handle_query): Handle qGetTLSAddr.
10728 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10729 * target.h (struct target_ops): Add get_tls_address.
10730 * thread-db.c (maybe_attach_thread): Save the thread handle.
10731 (thread_db_get_tls_address): New.
10732
10733 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10734
10735 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10736 (linux_resume_one_process): Take a siginfo_t *. Update all
10737 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10738 (struct pending_signals): Add a siginfo_t.
10739 (linux_wait_for_process): Always set last_status.
10740 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10741 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10742 * linux-low.h (struct process_info): Add last_status.
10743
10744 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10745
10746 * remote-utils.c (try_rle): New function.
10747 (putpkt_binary): Use it.
10748
10749 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10750
10751 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10752 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10753 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10754 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10755 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10756 point registers.
10757
10758 2006-08-08 Richard Sandiford <richard@codesourcery.com>
10759
10760 * server.c (terminal_fd): New variable.
10761 (old_foreground_pgrp): Likewise.
10762 (restore_old_foreground_pgrp): New function.
10763 (start_inferior): Record the terminal file descriptor in terminal_fd
10764 and its original foreground group in old_foreground_pgrp. Register
10765 restore_old_foreground_pgrp with atexit().
10766
10767 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10768
10769 * server.c (handle_query): Correct qPart to qXfer.
10770
10771 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10772
10773 * configure.ac: Check for more headers which are missing on
10774 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10775 * configure.srv: Add Cygwin and mingw32.
10776 * remote-utils.c: Don't include headers unconditionally which
10777 are missing on mingw32. Include <winsock.h> for mingw32.
10778 (remote_open): Adjust for mingw32 support. Flush
10779 standard error after writing to it.
10780 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10781 (unblock_async_io, enable_async_io, disable_async_io)
10782 (readchar, getpkt): Update for Winsock support.
10783 (prepare_resume_reply): Expect a protocol signal number.
10784 * server.c: Disable <sys/wait.h> on mingw32.
10785 (start_inferior): Adjust for mingw32 support. Flush
10786 standard error after writing to it.
10787 (attach_inferior): Likewise. Use protocol signal
10788 numbers.
10789 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10790 and names.
10791 * win32-i386-low.c: New file.
10792 * Makefile.in (XM_CLIBS): Set.
10793 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10794 (win32-i386-low.o): New dependency rule.
10795 * linux-low.c (linux_wait): Use target signal numbers.
10796 * target.h (struct target_ops): Doc fix.
10797 * server.h (target_signal_to_name): New prototype.
10798 * gdbreplay.c: Don't include headers unconditionally which
10799 are missing on mingw32. Include <winsock.h> for mingw32.
10800 (remote_close, remote_open): Adjust for Winsock support.
10801 * configure, config.in: Regenerated.
10802
10803 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10804
10805 * server.c (decode_xfer_read, write_qxfer_response): New.
10806 (handle_query): Take a packet length argument. Handle
10807 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10808 the qSupported response.
10809 (main): Update call to handle_query.
10810
10811 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10812
10813 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10814 (putpkt_binary): Renamed from putpkt and adjusted for binary
10815 data.
10816 (putpkt): New wrapper for putpkt_binary.
10817 (readchar): Don't mask off the high bit.
10818 (decode_X_packet): New function.
10819 * server.c (main): Call putpkt_binary if a handler sets the packet
10820 length. Save the length of the incoming packet. Handle 'X'.
10821 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10822
10823 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10824
10825 * server.c (handle_query): Handle qSupported.
10826
10827 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10828
10829 * remote-utils.c (all_symbols_looked_up): New variable.
10830 (look_up_one_symbol): Check it.
10831 * server.h (look_up_one_symbol): New declaration.
10832 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10833
10834 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10835
10836 * Makefile.in (linux-arm-low.o): Update dependencies.
10837 * linux-arm-low.c: Include "gdb_proc_service.h".
10838 (PTRACE_GET_THREAD_AREA): Define.
10839 (ps_get_thread_area): New function.
10840
10841 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10842
10843 * configure.srv (m68k*-*-uclinux*): New target.
10844 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10845 (linux_resume_one_process): Remove extraneous cast.
10846 (linux_read_offsets): New.
10847 (linux_target_op): Add linux_read_offsets on mmuless systems.
10848 * server.c (handle_query): Add qOffsets logic.
10849 * target.h (struct target_ops): Add read_offsets.
10850
10851 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10852
10853 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10854 (PTRACE_GET_THREAD_AREA): Define.
10855 (ps_get_thread_area): New function.
10856 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10857 (linux-x86-64-low.o): Update.
10858
10859 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10860
10861 * configure.ac: Remove checks for prfpregset_t.
10862 * gdb_proc_service.h: New file.
10863 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10864 new "gdb_proc_service.h".
10865 * proc-service.c: Likewise.
10866 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10867 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10868 * Makefile.in (gdb_proc_service_h): Updated.
10869 * configure, config.in: Regenerated.
10870
10871 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10872
10873 * remote-utils.c (prepare_resume_reply): Move declaration
10874 of gdb_id_from_wait to the top of the block.
10875
10876 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10877
10878 * linux-low.c (regsets_store_inferior_registers): Read the regset
10879 from the target before filling it.
10880
10881 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10882
10883 * server.c (attach_inferior): Return SIGTRAP for a successful
10884 attach.
10885
10886 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10887
10888 * Makefile.in (OBS): Add version.o.
10889 (STAGESTUFF): Delete.
10890 (version.o): Add dependencies.
10891 (version.c): Replace rule.
10892 (clean): Remove version.c.
10893 * server.c (gdbserver_version): New.
10894 (gdbserver_usage): Use printf.
10895 (main): Handle --version and --help.
10896 * server.h (version, host_name): Add declarations.
10897
10898 2005-12-23 Eli Zaretskii <eliz@gnu.org>
10899
10900 * linux-arm-low.c:
10901 * linux-arm-low.c:
10902 * inferiors.c:
10903 * i387-fp.h:
10904 * i387-fp.c:
10905 * gdbreplay.c:
10906 * regcache.c:
10907 * proc-service.c:
10908 * mem-break.h:
10909 * mem-break.c:
10910 * linux-x86-64-low.c:
10911 * linux-sh-low.c:
10912 * linux-s390-low.c:
10913 * linux-ppc64-low.c:
10914 * linux-ppc-low.c:
10915 * linux-mips-low.c:
10916 * linux-m68k-low.c:
10917 * linux-m32r-low.c:
10918 * linux-low.h:
10919 * linux-low.c:
10920 * linux-ia64-low.c:
10921 * linux-i386-low.c:
10922 * linux-crisv32-low.c:
10923 * thread-db.c:
10924 * terminal.h:
10925 * target.h:
10926 * target.c:
10927 * server.h:
10928 * server.c:
10929 * remote-utils.c:
10930 * regcache.h:
10931 * utils.c:
10932 * Makefile.in:
10933 * configure.ac:
10934 * gdbserver.1: Add (C) after Copyright. Update the FSF
10935 address.
10936
10937 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10938
10939 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10940 (arm_breakpoint_at): Recognize both breakpoints.
10941 (the_low_target): Use the correct breakpoint instruction.
10942
10943 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10944
10945 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10946 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10947 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10948 (the_low_target): Update.
10949
10950 2005-10-25 Andreas Schwab <schwab@suse.de>
10951
10952 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10953
10954 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10955 (ia64_num_regs): Reduce to 462.
10956
10957 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10958
10959 * acinclude.m4: Correct quoting.
10960 * aclocal.m4: Regenerated.
10961
10962 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10963 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10964 (thread_db_init): Call thread_db_err_str.
10965 * configure.ac: Check for TD_VERSION.
10966 * config.in, configure: Regenerated.
10967
10968 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10969
10970 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10971
10972 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10973
10974 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10975 is not available. Define HAVE_PTRACE_GETREGS if it is.
10976 * config.in, configure: Regenerated.
10977 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10978 * linux-i386-low.c, linux-m68k-low.c: Update to use
10979 HAVE_PTRACE_GETREGS.
10980 * linux-low.c (regsets_fetch_inferior_registers)
10981 (regsets_store_inferior_registers): Only return 0 if we processed
10982 GENERAL_REGS.
10983 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10984 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10985
10986 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10987
10988 * inferiors.c (struct thread_info): Add gdb_id.
10989 (add_thread): Add gdb_id argument.
10990 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10991 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10992 calls to add_thread.
10993 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10994 * server.c (handle_query): Use thread_to_gdb_id.
10995 (handle_v_cont, main): Use gdb_id_to_thread_id.
10996 * server.h (add_thread): Update prototype.
10997 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10998 prototypes.
10999
11000 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11001
11002 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11003 left-padded registers.
11004 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11005 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11006
11007 2005-07-01 Steve Ellcey <sje@cup.hp.com>
11008
11009 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11010 * configure: Regenerate.
11011 * config.in: Regenerate.
11012 * server.h (NEED_DECLARATION_STRERROR):
11013 Replace with !HAVE_DECL_STRERROR.
11014
11015 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11016
11017 * linux-low.c (linux_wait, linux_send_signal): Don't test
11018 an unsigned long variable for > 0 if it could be MAX_ULONG.
11019 * server.c (myresume): Likewise.
11020 * target.c (set_desired_inferior): Likewise.
11021
11022 2005-06-13 Mark Kettenis <kettenis@gnu.org>
11023
11024 * configure.ac: Simplify and improve check for socklen_t.
11025 * configure, config.in: Regenerate.
11026
11027 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11028
11029 * acconfig.h: Remove.
11030 * configure.ac: Add a test for socklen_t. Use three-argument
11031 AC_DEFINE throughout.
11032 * config.in: Regenerated using autoheader 2.59.
11033 * configure: Regenerated.
11034
11035 * gdbreplay.c (socklen_t): Provide a default.
11036 (remote_open): Use socklen_t.
11037 * remote-utils.c (socklen_t): Provide a default.
11038 (remote_open): Use socklen_t.
11039 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11040 unsigned char.
11041
11042 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11043 char for buffers.
11044 * linux-low.c (linux_read_memory, linux_write_memory)
11045 (linux_read_auxv): Likewise.
11046 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11047 (check_mem_write): Likewise.
11048 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11049 Likewise.
11050 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11051 (registers_from_string, register_data): Likewise.
11052 * server.c (handle_query, main): Likewise.
11053 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11054 (decode_M_packet): Likewise.
11055 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11056 * target.h (struct target_ops): Update read_memory, write_memory,
11057 and read_auxv.
11058 (read_inferior_memory, write_inferior_memory): Update.
11059 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11060 to unsigned char *.
11061 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11062 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11063 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11064 linux-s390-low.c, linux-sh-low.c: Update for changes in
11065 read_inferior_memory and the_low_target->breakpoint.
11066
11067 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11068
11069 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11070 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11071 * configure.srv: Add powerpc64-*-linux*.
11072 * linux-ppc64-low.c: New file.
11073
11074 2005-05-23 Orjan Friberg <orjanf@axis.com>
11075
11076 * linux-cris-low.c: New file with support for CRIS.
11077 * linux-crisv32-low.c: Ditto for CRISv32.
11078 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11079 (clean): Add reg-cris.c and reg-crisv32.c.
11080 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
11081 reg-crisv32.o, and reg-crisv32.c to make rules.
11082 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11083 recognized targets.
11084
11085 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11086
11087 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11088 of sizeof (PTRACE_XFER_TYPE).
11089 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11090
11091 2005-05-12 Orjan Friberg <orjanf@axis.com>
11092
11093 * target.h (struct target_ops): Add insert_watchpoint,
11094 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11095 pointers for hardware watchpoint support.
11096 * linux-low.h (struct linux_target_ops): Ditto.
11097 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11098 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11099 to linux_target_ops.
11100 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11101 reply packet.
11102 * server.c (main): Recognize 'Z' and 'z' packets.
11103
11104 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11105
11106 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11107 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11108 (the_low_target): Add new members.
11109
11110 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11111
11112 * proc-service.c (ps_lgetregs): Search all_processes instead of
11113 all_threads.
11114
11115 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11116
11117 * server.c (start_inferior): Change return type to int.
11118 (attach_inferior): Change sigptr to int *.
11119 (handle_v_cont, handle_v_requests): Change signal to int *.
11120 (main): Change signal to int.
11121
11122 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
11123
11124 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11125 * configure.srv: Add m32r*-*-linux*.
11126 * linux-m32r-low.c: New file.
11127
11128 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11129
11130 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11131
11132 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11133
11134 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11135 Take unsigned long arguments for PIDs.
11136 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11137 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11138 (wait_for_sigstop, linux_resume_one_process)
11139 (regsets_fetch_inferior_registers, linux_send_signal)
11140 (linux_read_auxv): Likewise. Update the types of variables holding
11141 PIDs. Update format string specifiers.
11142 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11143 * remote-utils.c (prepare_resume_reply): Likewise.
11144 * server.c (cont_thread, general_thread, step_thread)
11145 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11146 unsigned long.
11147 (handle_query): Update format specifiers.
11148 (handle_v_cont, main): Use strtoul for thread IDs.
11149 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11150 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11151 (general_thread, step_thread, thread_from_wait)
11152 (old_thread_from_wait): Update.
11153 * target.h (struct thread_resume): Use unsigned long for THREAD.
11154 (struct target_ops): Use unsigned long for arguments to attach and
11155 thread_alive.
11156
11157 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11158
11159 * acinclude.m4: Include bfd/bfd.m4 directly.
11160 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11161 <agriffis@toolchain.org>.
11162 * aclocal.m4, configure: Regenerated.
11163
11164 2005-01-07 Andrew Cagney <cagney@gnu.org>
11165
11166 * configure.ac: Rename configure.in, require autoconf 2.59.
11167 * configure: Re-generate.
11168
11169 2004-12-08 Daniel Jacobowitz <dan@debian.org>
11170
11171 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11172 LIBS when finished.
11173 * aclocal.m4: Regenerated.
11174 * configure: Regenerated.
11175
11176 2004-11-21 Andreas Schwab <schwab@suse.de>
11177
11178 * linux-m68k-low.c (m68k_num_gregs): Define.
11179 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11180 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11181 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11182 (m68k_breakpoint_at): New. Add to the_low_target.
11183
11184 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11185 srv_linux_thread_db to yes.
11186
11187 2004-10-20 Joel Brobecker <brobecker@gnat.com>
11188
11189 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11190 (ARCH_SET_FS): Likewise.
11191 (ARCH_GET_FS): Likewise.
11192 (ARCH_GET_GS): Likewise.
11193
11194 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11195
11196 * linux-i386-low.c (ps_get_thread_area): New.
11197 * linux-x86-64-low.c (ps_get_thread_area): New.
11198 * linux-low.c: Include <sys/syscall.h>.
11199 (linux_kill_one_process): Don't kill the first thread here.
11200 (linux_kill): Kill the first thread here.
11201 (kill_lwp): New function.
11202 (send_sigstop, linux_send_signal): Use it.
11203 * proc-service.c: Clean up #ifdefs.
11204 (fpregset_info): Delete.
11205 (ps_lgetregs): Update and enable implementation.
11206 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11207 implementations.
11208 * remote-utils.c (struct sym_cache, symbol_cache): New.
11209 (input_interrupt): Print a clearer message.
11210 (async_io_enabled): New variable.
11211 (enable_async_io, disable_async_io): Use it. Update comments.
11212 (look_up_one_symbol): Use the symbol cache.
11213 * thread-db.c (thread_db_look_up_symbols): New function.
11214 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11215
11216 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11217
11218 * configure.in: Test for -rdynamic.
11219 * configure: Regenerated.
11220 * Makefile (INTERNAL_LDFLAGS): New.
11221 (gdbserver, gdbreplay): Use it.
11222
11223 2004-09-02 Andrew Cagney <cagney@gnu.org>
11224
11225 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11226
11227 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
11228
11229 * linux-low.c (linux_wait): Clear all_processes list also.
11230
11231 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11232
11233 * linux-low.c: Include <errno.h>. Remove extern declaration of
11234 errno.
11235
11236 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11237
11238 * gdbreplay.c, server.h, utils.c: Update copyright years.
11239
11240 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11241
11242 * server.c (main): Print child status or termination signal from
11243 variable 'signal', not 'sig'.
11244
11245 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11246
11247 * linux-low.c (linux_read_memory): Change return type to
11248 int. Check for and return error from ptrace().
11249 * target.c (read_inferior_memory): Change return type to int. Pass
11250 back return status from the_target->read_memory().
11251 * target.h (struct target_ops): Adapt *read_memory() prototype.
11252 Update comment.
11253 (read_inferior_memory): Adapt prototype.
11254 * server.c (main): Return an error packet if
11255 read_inferior_memory() returns an error.
11256
11257 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
11258
11259 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11260 Unify with other clean targets.
11261
11262 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11263
11264 * server.c (handle_v_cont): Call set_desired_inferior.
11265
11266 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11267
11268 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11269
11270 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11271
11272 * linux-low.c (linux_wait): Unblock async I/O.
11273 (linux_resume): Block and enable async I/O.
11274 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11275 * server.h (block_async_io, unblock_async_io): Add prototypes.
11276
11277 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11278
11279 * remote-utils.c (remote_open): Print a status notice after
11280 opening a TCP port.
11281 * server.c (attach_inferior): Print a status notice after
11282 attaching.
11283
11284 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11285
11286 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11287
11288 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
11289
11290 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11291 error packet.
11292 * server.c, target.h: Update copyright years.
11293
11294 2004-02-25 Roland McGrath <roland@redhat.com>
11295
11296 * target.h (struct target_ops): New member `read_auxv'.
11297 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11298 * linux-low.c (linux_read_auxv): New function.
11299 (linux_target_ops): Initialize `read_auxv' member to that.
11300
11301 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11302
11303 Committed by Jim Blandy <jimb@redhat.com>.
11304
11305 * linux-s390-low.c (s390_num_regs): Update.
11306 (s390_regmap): Remove control registers. Use __s390x__ predefine
11307 instead of GPR_SIZE to distiguish s390 and s390x targets.
11308
11309 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
11310
11311 * linux-low.c: Update copyright year.
11312 (check_removed_breakpoint): Clear pending_is_breakpoint.
11313 (linux_set_resume_request, linux_queue_one_thread)
11314 (resume_status_pending_p): New functions.
11315 (linux_continue_one_thread): Use process->resume.
11316 (linux_resume): Only resume threads if there are no pending events.
11317 * linux-low.h (struct process_info): Add resume request
11318 pointer.
11319
11320 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
11321
11322 * regcache.c (new_register_cache): Clear the allocated register
11323 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11324
11325 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
11326
11327 * linux-low.c (linux_resume): Take a struct thread_resume *
11328 argument.
11329 (linux_wait): Update call.
11330 (resume_ptr): New static variable.
11331 (linux_continue_one_thread): Renamed from
11332 linux_continue_one_process. Use resume_ptr.
11333 (linux_resume): Use linux_continue_one_thread.
11334 * server.c (handle_v_cont, handle_v_requests): New functions.
11335 (myresume): New function.
11336 (main): Handle 'v' case.
11337 * target.h (struct thread_resume): New type.
11338 (struct target_ops): Change argument of "resume" to struct
11339 thread_resume *.
11340 (myresume): Delete macro.
11341
11342 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11343
11344 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11345 (uninstall): Support DESTDIR.
11346
11347 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11348
11349 * configure.srv: Add xscale*linux copy of arm*linux entry.
11350
11351 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
11352
11353 * linux-arm-low.c (arm_reinsert_addr): New function.
11354 (the_low_target): Add arm_reinsert_addr.
11355
11356 2003-07-08 Mark Kettenis <kettenis@gnu.org>
11357
11358 * mem-break.c: Remove whitespace at end of file.
11359
11360 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11361
11362 * configure.in: Check whether we need to prototype strerror.
11363 * server.h: Optionally prototype strerror.
11364 * gdbreplay.c (perror_with_name): Use strerror.
11365 * linux-low.c (linux_attach_lwp): Use strerror.
11366 * utils.c (perror_with_name): Use strerror.
11367 * config.in, configure: Regenerated.
11368
11369 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11370
11371 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11372 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11373
11374 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
11375
11376 * Makefile.in (SFILES): Update.
11377 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11378 low-sun3.c: Remove files.
11379
11380 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
11381
11382 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11383 (linux_detach_one_process, linux_detach): New functions.
11384 (linux_target_ops): Add linux_detach.
11385 * server.c (main): Handle 'D' packet.
11386 * target.h (struct target_ops): Add "detach" member.
11387 (detach_inferior): Define.
11388
11389 2003-06-13 Mark Kettenis <kettenis@gnu.org>
11390
11391 From Kelley Cook <kelleycook@wideopenwest.com>:
11392 * configure.srv: Accept i[34567]86 variants.
11393
11394 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
11395
11396 * linux-low.c (linux_wait_for_event): Correct comment typos.
11397 (linux_resume_one_process): Call check_removed_breakpoint.
11398 (linux_send_signal): New function.
11399 (linux_target_ops): Add linux_send_signal.
11400 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11401 of kill.
11402 * target.h (struct target_ops): Add send_signal.
11403
11404 2003-05-29 Jim Blandy <jimb@redhat.com>
11405
11406 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11407 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11408 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11409 away part of the register's value.
11410
11411 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
11412
11413 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11414 (linux_wait_for_event, linux_init_signals): Likewise.
11415
11416 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
11417
11418 * configure.in: Check for stdlib.h.
11419 * configure: Regenerated.
11420 * config.in: Regenerated.
11421
11422 2003-01-04 Andreas Schwab <schwab@suse.de>
11423
11424 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11425
11426 2003-01-02 Andrew Cagney <ac131313@redhat.com>
11427
11428 * Makefile.in: Remove obsolete code.
11429
11430 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
11431
11432 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11433 defined(PT_FPR0_HI).
11434
11435 2002-11-17 Stuart Hughes <seh@zee2.com>
11436
11437 * linux-arm-low.c (arm_num_regs): Increase.
11438 (arm_regmap): Include status register.
11439
11440 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
11441
11442 * linux-low.c (register_addr): Remove incorrect -1 check.
11443
11444 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
11445
11446 * linux-low.c (linux_create_inferior): Call setpgid. Return
11447 the new PID.
11448 (unstopped_p, linux_signal_pid): Remove.
11449 (linux_target_ops): Remove linux_signal_pid.
11450 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11451 global instead of target method.
11452 * target.h (struct target_ops): Remove signal_pid. Update comment
11453 for create_inferior.
11454 * server.c (signal_pid): New variable.
11455 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
11456 gdbserver. Set the child to be the foreground process group.
11457 (attach_inferior): Set signal_pid.
11458
11459 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
11460
11461 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11462
11463 2002-08-20 Jim Blandy <jimb@redhat.com>
11464
11465 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11466 default for this.
11467
11468 2002-08-01 Andrew Cagney <cagney@redhat.com>
11469
11470 * Makefile.in: Make chill references obsolete.
11471
11472 2002-07-24 Kevin Buettner <kevinb@redhat.com>
11473
11474 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11475 * configure: Regenerate.
11476 * config.in: Regenerate.
11477
11478 2002-07-09 David O'Brien <obrien@FreeBSD.org>
11479
11480 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11481 (perror_with_name, remote_close, remote_open, expect, play): Static.
11482
11483 2002-07-04 Michal Ludvig <mludvig@suse.cz>
11484
11485 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
11486 byte offsets instead of an array of indexes.
11487 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11488
11489 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
11490
11491 * regcache.c: Add comment.
11492
11493 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
11494
11495 * thread-db.c: New file.
11496 * proc-service.c: New file.
11497 * acinclude.m4: New file.
11498 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11499 proc-service.o, and thread-db.o.
11500 (linux-low.o): Add USE_THREAD_DB.
11501 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11502 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11503 * aclocal.m4: Regenerated.
11504 * config.in: Regenerated.
11505 * configure: Regenerated.
11506 * configure.in: Check for proc_service.h, sys/procfs.h,
11507 thread_db.h, and linux/elf.h headrs.
11508 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11509 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11510 Check for -lthread_db and thread support.
11511 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11512 PowerPC, and SuperH.
11513 * i387-fp.c: Constify arguments.
11514 * i387-fp.h: Likewise.
11515 * inferiors.c: (struct thread_info): Renamed from
11516 `struct inferior_info'. Remove PID member. Use generic inferior
11517 list header. All uses updated.
11518 (inferiors, signal_pid): Removed.
11519 (all_threads): New variable.
11520 (get_thread): Define.
11521 (add_inferior_to_list): New function.
11522 (for_each_inferior): New function.
11523 (change_inferior_id): New function.
11524 (add_inferior): Removed.
11525 (remove_inferior): New function.
11526 (add_thread): New function.
11527 (free_one_thread): New function.
11528 (remove_thread): New function.
11529 (clear_inferiors): Use for_each_inferior and free_one_thread.
11530 (find_inferior): New function.
11531 (find_inferior_id): New function.
11532 (inferior_target_data): Update argument type.
11533 (set_inferior_target_data): Likewise.
11534 (inferior_regcache_data): Likewise.
11535 (set_inferior_regcache_data): Likewise.
11536 * linux-low.c (linux_bp_reinsert): Remove.
11537 (all_processes, stopping_threads, using_thrads)
11538 (struct pending_signals, debug_threads, pid_of): New.
11539 (inferior_pid): Replace with macro.
11540 (struct inferior_linux_data): Remove.
11541 (get_stop_pc, add_process): New functions.
11542 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11543 Use add_process and add_thread.
11544 (linux_attach_lwp): New function, based on old linux_attach. Use
11545 add_process and add_thread. Set stop_expected for new threads.
11546 (linux_attach): New function.
11547 (linux_kill_one_process): New function.
11548 (linux_kill): Kill all LWPs.
11549 (linux_thread_alive): Use find_inferior_id.
11550 (check_removed_breakpoints, status_pending_p): New functions.
11551 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11552 Update. Use WNOHANG. Wait for cloned processes also. Update process
11553 struct for the found process.
11554 (linux_wait_for_event): New function.
11555 (linux_wait): Use it. Support LWPs.
11556 (send_sigstop, wait_for_sigstop, stop_all_processes)
11557 (linux_resume_one_process, linux_continue_one_process): New functions.
11558 (linux_resume): Support LWPs.
11559 (REGISTER_RAW_SIZE): Remove.
11560 (fetch_register): Use register_size instead. Call supply_register.
11561 (usr_store_inferior_registers): Likewise. Call collect_register.
11562 Fix recursive case.
11563 (regsets_fetch_inferior_registers): Improve error message.
11564 (regsets_store_inferior_registers): Add debugging.
11565 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11566 (unstopped_p, linux_signal_pid): New functions.
11567 (linux_target_ops): Add linux_signal_pid.
11568 (linux_init_signals): New function.
11569 (initialize_low): Call it. Initialize using_threads.
11570 * regcache.c (inferior_regcache_data): Add valid
11571 flag.
11572 (get_regcache): Fetch registers lazily. Add fetch argument
11573 and update all callers.
11574 (regcache_invalidate_one, regcache_invalidate): New
11575 functions.
11576 (new_register_cache): Renamed from create_register_cache.
11577 Return the new regcache.
11578 (free_register_cache): Change argument to a void *.
11579 (registers_to_string, registers_from_string): Call get_regcache
11580 with fetch flag set.
11581 (register_data): Make static. Pass fetch flag to get_regcache.
11582 (supply_register): Call get_regcache with fetch flag clear.
11583 (collect_register): Call get_regcache with fetch flag set.
11584 (collect_register_as_string): New function.
11585 * regcache.h: Update.
11586 * remote-utils.c (putpkt): Flush after debug output and use
11587 stderr.
11588 Handle input interrupts while waiting for an ACK.
11589 (input_interrupt): Use signal_pid method.
11590 (getpkt): Flush after debug output and use stderr.
11591 (outreg): Use collect_register_as_string.
11592 (new_thread_notify, dead_thread_notify): New functions.
11593 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11594 and general_thread.
11595 (look_up_one_symbol): Flush after debug output.
11596 * server.c (step_thread, server_waiting): New variables.
11597 (start_inferior): Don't use signal_pid. Update call to mywait.
11598 (attach_inferior): Update call to mywait.
11599 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11600 (main): Don't fetch/store registers explicitly. Use
11601 set_desired_inferior. Support proposed ``Hs'' packet. Update
11602 calls to mywait.
11603 * server.h: Update.
11604 (struct inferior_list, struct_inferior_list_entry): New.
11605 * target.c (set_desired_inferior): New.
11606 (write_inferior_memory): Constify.
11607 (mywait): New function.
11608 * target.h: Update.
11609 (struct target_ops): New signal_pid method.
11610 (mywait): Removed macro, added prototype.
11611
11612 * linux-low.h (regset_func): Removed.
11613 (regset_fill_func, regset_store_func): New.
11614 (enum regset_type): New.
11615 (struct regset_info): Add type field. Use new operation types.
11616 (struct linux_target_ops): stop_pc renamed to get_pc.
11617 Add decr_pc_after_break and breakpoint_at.
11618 (get_process, get_thread_proess, get_process_thread)
11619 (strut process_info, all_processes, linux_attach_lwp)
11620 (thread_db_init): New.
11621
11622 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11623 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11624 (the_low_target): Add new members.
11625 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11626 (i386_store_fpxregset): Constify.
11627 (target_regsets): Add new kind identifier.
11628 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11629 (i386_set_pc): Add debugging.
11630 (i386_breakpoint_at): New function.
11631 (the_low_target): Add new members.
11632 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11633 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11634 (mips_breakpoint_at): New.
11635 (the_low_target): Add new members.
11636 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11637 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11638 (the_low_target): Add new members.
11639 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11640 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11641 (the_low_target): Add new members.
11642 * linux-x86-64-low.c (target_regsets): Add new kind
11643 identifier.
11644
11645 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
11646
11647 From Martin Pool <mbp@samba.org>:
11648 * server.c (gdbserver_usage): New function.
11649 (main): Call it.
11650
11651 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
11652
11653 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11654 stop_at -> stop_pc.
11655
11656 2002-05-04 Andrew Cagney <ac131313@redhat.com>
11657
11658 * Makefile.in: Remove obsolete code.
11659
11660 2002-04-24 Michal Ludvig <mludvig@suse.cz>
11661
11662 * linux-low.c (regsets_fetch_inferior_registers),
11663 (regsets_store_inferior_registers): Removed cast to int from
11664 ptrace() calls.
11665 * regcache.h: Added declaration of struct inferior_info.
11666
11667 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11668
11669 * inferiors.c (struct inferior_info): Add regcache_data.
11670 (add_inferior): Call create_register_cache.
11671 (clear_inferiors): Call free_register_cache.
11672 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11673 * regcache.c (struct inferior_regcache_data): New.
11674 (registers): Remove.
11675 (get_regcache): New function.
11676 (create_register_cache, free_register_cache): New functions.
11677 (set_register_cache): Don't initialize the register cache here.
11678 (registers_to_string, registers_from_string, register_data): Call
11679 get_regcache.
11680 * regcache.h: Add prototypes.
11681 * server.h: Likewise.
11682
11683 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11684
11685 * mem-break.c: New file.
11686 * mem-break.h: New file.
11687 * Makefile.in: Add mem-break.o rule; update server.h
11688 dependencies.
11689 * inferiors.c (struct inferior_info): Add target_data
11690 member.
11691 (clear_inferiors): Free target_data member if set.
11692 (inferior_target_data, set_inferior_target_data): New functions.
11693 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11694 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11695 * linux-low.c (linux_bp_reinsert): New variable.
11696 (struct inferior_linux_data): New.
11697 (linux_create_inferior): Use set_inferior_target_data.
11698 (linux_attach): Likewise. Call add_inferior.
11699 (linux_wait_for_one_inferior): New function.
11700 (linux_wait): Call it.
11701 (linux_write_memory): Add const.
11702 (initialize_low): Call set_breakpoint_data.
11703 * linux-low.h (struct linux_target_ops): Add breakpoint
11704 handling members.
11705 * server.c (attach_inferior): Remove extra add_inferior
11706 call.
11707 * server.h: Include mem-break.h. Update inferior.c
11708 prototypes.
11709 * target.c (read_inferior_memory)
11710 (write_inferior_memory): New functions.
11711 * target.h (read_inferior_memory)
11712 (write_inferior_memory): Change macros to prototypes.
11713 (struct target_ops): Update comments. Add const to write_memory
11714 definition.
11715
11716 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
11717
11718 * linux-low.c (usr_store_inferior_registers): Support
11719 registers which are allowed to fail to store.
11720 * linux-low.h (linux_target_ops): Likewise.
11721 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11722 (ppc_cannot_store_register): FPSCR may not be storable.
11723
11724 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11725
11726 * server.h: Include <string.h> if HAVE_STRING_H.
11727 * ChangeLog: Correct paths in last ChangeLog entry.
11728
11729 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11730
11731 * linux-low.h: Remove obsolete prototypes.
11732 (struct linux_target_ops): New.
11733 (extern the_low_target): New.
11734 * linux-low.c (num_regs, regmap): Remove declarations.
11735 (register_addr): Use the_low_target explicitly.
11736 (fetch_register): Likewise.
11737 (usr_fetch_inferior_registers): Likewise.
11738 (usr_store_inferior_registers): Likewise.
11739 * linux-arm-low.c (num_regs): Remove.
11740 (arm_num_regs): Define.
11741 (arm_regmap): Renamed from regmap, made static.
11742 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11743 made static.
11744 (arm_cannot_store_register): Renamed from cannot_store_register,
11745 made static.
11746 (the_low_target): New.
11747 * linux-i386-low.c (num_regs): Remove.
11748 (i386_num_regs): Define.
11749 (i386_regmap): Renamed from regmap, made static.
11750 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11751 made static.
11752 (i386_cannot_store_register): Renamed from cannot_store_register,
11753 made static.
11754 (the_low_target): New.
11755 * linux-ia64-low.c (num_regs): Remove.
11756 (ia64_num_regs): Define.
11757 (ia64_regmap): Renamed from regmap, made static.
11758 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11759 made static.
11760 (ia64_cannot_store_register): Renamed from cannot_store_register,
11761 made static.
11762 (the_low_target): New.
11763 * linux-m68k-low.c (num_regs): Remove.
11764 (m68k_num_regs): Define.
11765 (m68k_regmap): Renamed from regmap, made static.
11766 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11767 made static.
11768 (m68k_cannot_store_register): Renamed from cannot_store_register,
11769 made static.
11770 (the_low_target): New.
11771 * linux-mips-low.c (num_regs): Remove.
11772 (mips_num_regs): Define.
11773 (mips_regmap): Renamed from regmap, made static.
11774 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11775 made static.
11776 (mips_cannot_store_register): Renamed from cannot_store_register,
11777 made static.
11778 (the_low_target): New.
11779 * linux-ppc-low.c (num_regs): Remove.
11780 (ppc_num_regs): Define.
11781 (ppc_regmap): Renamed from regmap, made static.
11782 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11783 made static.
11784 (ppc_cannot_store_register): Renamed from cannot_store_register,
11785 made static.
11786 (the_low_target): New.
11787 * linux-s390-low.c (num_regs): Remove.
11788 (s390_num_regs): Define.
11789 (s390_regmap): Renamed from regmap, made static.
11790 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11791 made static.
11792 (s390_cannot_store_register): Renamed from cannot_store_register,
11793 made static.
11794 (the_low_target): New.
11795 * linux-sh-low.c (num_regs): Remove.
11796 (sh_num_regs): Define.
11797 (sh_regmap): Renamed from regmap, made static.
11798 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11799 made static.
11800 (sh_cannot_store_register): Renamed from cannot_store_register,
11801 made static.
11802 (the_low_target): New.
11803 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11804 (the_low_target): New.
11805
11806 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11807
11808 * Makefile.in: Add stamp-h target.
11809 * configure.in: Create stamp-h.
11810 * configure: Regenerated.
11811
11812 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11813
11814 * inferiors.c: New file.
11815 * target.c: New file.
11816 * target.h: New file.
11817 * Makefile.in: Add target.o and inferiors.o. Update
11818 dependencies.
11819 * linux-low.c (inferior_pid): New static variable,
11820 moved from server.c.
11821 (linux_create_inferior): Renamed from create_inferior.
11822 Call add_inferior. Return 0 on success instead of a PID.
11823 (linux_attach): Renamed from myattach.
11824 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11825 (linux_thread_alive): Renamed from mythread_alive.
11826 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11827 child dies.
11828 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11829 (regsets_store_inferior_registers): Correct error message.
11830 Add missing ``return 0''.
11831 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11832 (linux_store_registers): Renamed from store_inferior_registers.
11833 (linux_read_memory): Renamed from read_inferior_memory.
11834 (linux_write_memory): Renamed from write_inferior_memory.
11835 (linux_target_ops): New structure.
11836 (initialize_low): Call set_target_ops ().
11837 * remote-utils.c (unhexify): New function.
11838 (hexify): New function.
11839 (input_interrupt): Send signals to ``signal_pid''.
11840 * server.c (inferior_pid): Remove.
11841 (start_inferior): Update create_inferior call.
11842 (attach_inferior): Call add_inferior.
11843 (handle_query): New function.
11844 (main): Call handle_query for `q' packets.
11845 * server.h: Include "target.h". Remove obsolete prototypes.
11846 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11847
11848 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11849
11850 * Makefile.in: Add WARN_CFLAGS. Update configury
11851 dependencies.
11852 * configure.in: Check for <string.h>
11853 * configure: Regenerate.
11854 * config.in: Regenerate.
11855 * gdbreplay.c: Include needed system headers.
11856 (remote_open): Remove strchr prototype.
11857 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11858 * regcache.c (supply_register): Change buf argument to const void *.
11859 (supply_register_by_name): Likewise.
11860 (collect_register): Change buf argument to void *.
11861 (collect_register_by_name): Likewise.
11862 * regcache.h: Add missing prototypes.
11863 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11864 * server.c (handle_query): New function.
11865 (attached): New static variable, moved out of main.
11866 (main): Quiet longjmp clobber warnings.
11867 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11868 * utils.c (error): Remove NORETURN.
11869 (fatal): Likewise.
This page took 0.280682 seconds and 4 git commands to generate.