2a7dc0b2ebe47024f7c9c89fd686f0870685f073
[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): Use
4 debug_printf.
5
6 2015-08-25 Yao Qi <yao.qi@linaro.org>
7
8 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
9
10 2015-08-25 Yao Qi <yao.qi@linaro.org>
11
12 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
13
14 2015-08-25 Yao Qi <yao.qi@linaro.org>
15
16 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
17 the code.
18
19 2015-08-25 Yao Qi <yao.qi@linaro.org>
20
21 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
22 Remove.
23 (debug_reg_change_callback): Remove argument entry and add argument
24 lwp. Remove local variable thread. Don't print thread id in the
25 debugging output. Don't check whether pid of thread equals to pid.
26 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
27 iterate_over_lwps instead find_inferior.
28
29 2015-08-24 Pedro Alves <palves@redhat.com>
30
31 * inferiors.c (get_first_process): New function.
32 * inferiors.h (get_first_process): New declaration.
33 * remote-utils.c (read_ptid): Default to the first process in the
34 list, instead of to the current thread's process.
35
36 2015-08-24 Pedro Alves <palves@redhat.com>
37
38 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
39 * event-loop.c: Likewise.
40 * remote-utils.c: Likewise.
41 * tracepoint.c: Likewise.
42
43 2015-08-24 Pedro Alves <palves@redhat.com>
44
45 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
46 ptid_get_lwp.
47
48 2015-08-21 Pedro Alves <palves@redhat.com>
49
50 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
51 instead of literal 1.
52
53 2015-08-21 Pedro Alves <palves@redhat.com>
54
55 * tdesc.c (default_description): Explicitly zero-initialize.
56
57 2015-08-21 Pedro Alves <palves@redhat.com>
58
59 PR gdb/18749
60 * inferiors.c (remove_thread): Discard any pending stop reply for
61 this thread.
62 * server.c (remove_all_on_match_pid): Rename to ...
63 (remove_all_on_match_ptid): ... this. Work with a filter ptid
64 instead of a pid.
65 (discard_queued_stop_replies): Change parameter to a ptid. Now
66 extern.
67 (handle_v_kill, kill_inferior_callback, captured_main)
68 (process_serial_event): Adjust.
69 * server.h (discard_queued_stop_replies): Declare.
70
71 2015-08-21 Pedro Alves <palves@redhat.com>
72
73 * linux-low.c (wait_for_sigstop): Always switch to no thread
74 selected if the previously current thread dies.
75 * lynx-low.c (lynx_request_interrupt): Use the first thread's
76 process instead of the current thread's.
77 * remote-utils.c (input_interrupt): Don't check if there's no
78 current thread.
79 * server.c (gdb_read_memory, gdb_write_memory): If setting the
80 current thread to the general thread fails, error out.
81 (handle_qxfer_auxv, handle_qxfer_libraries)
82 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
83 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
84 (handle_query): Check if there's a thread selected instead of
85 checking whether there's any thread in the thread list.
86 (handle_qxfer_threads, handle_qxfer_btrace)
87 (handle_qxfer_btrace_conf): Don't error out early if there's no
88 thread in the thread list.
89 (handle_v_cont, myresume): Don't set the current thread to the
90 continue thread.
91 (process_serial_event) <Hg handling>: Also set thread_id if the
92 previous general thread is still alive.
93 (process_serial_event) <g/G handling>: If setting the current
94 thread to the general thread fails, error out.
95 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
96 thread's lwp instead of the current thread's.
97 * target.c (set_desired_thread): If the desired thread was not
98 found, leave the current thread pointing to NULL. Return an int
99 (boolean) indicating success.
100 * target.h (set_desired_thread): Change return type to int.
101
102 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
103
104 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
105 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
106 #includes.
107 (ps_get_thread_area): New function.
108
109 2015-08-19 Gary Benson <gbenson@redhat.com>
110
111 * hostio.c (handle_pread): Do not attempt to read more data
112 than hostio_reply_with_data can fit in a packet.
113
114 2015-08-18 Joel Brobecker <brobecker@adacore.com>
115
116 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
117
118 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
119
120 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
121
122 2015-08-06 Pedro Alves <palves@redhat.com>
123
124 * tracepoint.c (expr_eval_result): Now an int.
125
126 2015-08-06 Pedro Alves <palves@redhat.com>
127
128 * gdbthread.h (struct regcache): Forward declare.
129 (struct thread_info) <regcache_data>: Now a struct regcache
130 pointer.
131 * inferiors.c (inferior_regcache_data)
132 (set_inferior_regcache_data): Now work with struct regcache
133 pointers.
134 * inferiors.h (struct regcache): Forward declare.
135 (inferior_regcache_data, set_inferior_regcache_data): Now work
136 with struct regcache pointers.
137 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
138 (free_register_cache_thread): Remove struct regcache pointer
139 casts.
140
141 2015-08-06 Pedro Alves <palves@redhat.com>
142
143 * server.c (captured_main): On error, print the exception message
144 to stderr, and if run_once is set, throw a quit.
145
146 2015-08-06 Pedro Alves <palves@redhat.com>
147
148 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
149 the current thread.
150
151 2015-08-06 Pedro Alves <palves@redhat.com>
152
153 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
154 reading beyond the passed in buffer length.
155
156 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
157
158 * tracepoint.c (symbol_list) <required>: Remove.
159
160 2015-08-06 Pedro Alves <palves@redhat.com>
161
162 * linux-low.c (handle_extended_wait): Set the fork child's suspend
163 count if stopping and suspending threads.
164 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
165 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
166 (linux_detach): Complete an ongoing step-over.
167 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
168 throughout.
169 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
170 (linux_wait_1): If passing a signal to the inferior after
171 finishing a step-over, unsuspend and re-resume all lwps. If we
172 see a single-step event but the thread should be continuing, don't
173 pass the trap to gdb.
174 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
175 internal_error instead of gdb_assert.
176 (enqueue_pending_signal): New function.
177 (check_ptrace_stopped_lwp_gone): Add debug output.
178 (start_step_over): Use internal_error instead of gdb_assert.
179 (complete_ongoing_step_over): New function.
180 (linux_resume_one_thread): Don't resume a suspended thread.
181 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
182 it stepping.
183
184 2015-08-06 Pedro Alves <palves@redhat.com>
185
186 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
187 (linux_thread_alive): Use lwp_is_marked_dead.
188 (extended_event_reported): Delete.
189 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
190 instead of extended_event_reported.
191 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
192 as well.
193 (lwp_is_marked_dead): New function.
194 (lwp_running): Use lwp_is_marked_dead.
195 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
196 comment.
197
198 2015-08-06 Pedro Alves <palves@redhat.com>
199
200 * linux-low.c (linux_wait_1): Move fork event output out of the
201 !report_to_gdb check. Pass event_child->waitstatus to
202 target_waitstatus_to_string instead of ourstatus.
203
204 2015-08-04 Yao Qi <yao.qi@linaro.org>
205
206 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
207 if current_thread is 32 bit.
208
209 2015-08-04 Yao Qi <yao.qi@linaro.org>
210
211 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
212 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
213 * server.c (extended_protocol): Remove "static".
214 * server.h (extended_protocol): Declare it.
215
216 2015-08-04 Yao Qi <yao.qi@linaro.org>
217
218 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
219 both aarch64 and aarch32.
220 (aarch64_set_pc): Likewise.
221
222 2015-08-04 Yao Qi <yao.qi@linaro.org>
223
224 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
225 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
226 arm-with-neon.xml to srv_xmlfiles.
227 * linux-aarch64-low.c: Include linux-aarch32-low.h.
228 (is_64bit_tdesc): New function.
229 (aarch64_linux_read_description): New function.
230 (aarch64_arch_setup): Call aarch64_linux_read_description.
231 (regs_info): Rename to regs_info_aarch64.
232 (aarch64_regs_info): Return right regs_info.
233 (initialize_low_arch): Call initialize_low_arch_aarch32.
234
235 2015-08-04 Yao Qi <yao.qi@linaro.org>
236
237 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
238 * linux-aarch32-low.c: New file.
239 * linux-aarch32-low.h: New file.
240 * linux-arm-low.c (arm_fill_gregset): Move it to
241 linux-aarch32-low.c.
242 (arm_store_gregset): Likewise.
243 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
244 (arm_store_vfpregset): Call arm_store_vfpregset_num.
245 (arm_arch_setup): Check if PTRACE_GETREGSET works.
246 (regs_info): Rename to regs_info_arm.
247 (arm_regs_info): Return regs_info_aarch32 if
248 have_ptrace_getregset is 1 and target description is
249 arm_with_neon or arm_with_vfpv3.
250 (initialize_low_arch): Don't call init_registers_arm_with_neon.
251 Call initialize_low_arch_aarch32 instead.
252
253 2015-08-04 Yao Qi <yao.qi@linaro.org>
254
255 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
256 * linux-low.c: ... here.
257 * linux-low.h (have_ptrace_getregset): Declare it.
258
259 2015-08-04 Pedro Alves <palves@redhat.com>
260
261 * thread-db.c (struct thread_db): Use new typedefs.
262 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
263 CHK calls.
264 (disable_thread_event_reporting): Cast result of dlsym to
265 destination function pointer type.
266 (thread_db_mourn): Use td_ta_delete_ftype.
267
268 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
269
270 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
271 arch variant.
272 (CDX_BREAKPOINT): Define for R2.
273 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
274 (the_low_target): Add comments.
275
276 2015-07-30 Yao Qi <yao.qi@linaro.org>
277
278 * linux-arm-low.c (arm_hwcap): Remove it.
279 (arm_read_description): New local variable arm_hwcap. Don't
280 set arm_hwcap to zero.
281
282 2015-07-30 Yao Qi <yao.qi@linaro.org>
283
284 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
285 Use regcache->tdesc instead.
286 (arm_store_wmmxregset): Likewise.
287 (arm_fill_vfpregset): Likewise.
288 (arm_store_vfpregset): Likewise.
289
290 2015-07-30 Yao Qi <yao.qi@linaro.org>
291
292 * linux-arm-low.c: Include arch/arm.h.
293 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
294 (arm_store_gregset): Likewise.
295
296 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
297
298 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
299 ptrace's 4th parameter.
300
301 2015-07-27 Yao Qi <yao.qi@linaro.org>
302
303 * configure.srv (case aarch64*-*-linux*): Don't set
304 srv_linux_usrregs.
305
306 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
307
308 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
309 sys/ptrace.h.
310 * linux-arm-low.c: Likewise.
311 * linux-cris-low.c: Likewise.
312 * linux-crisv32-low.c: Likewise.
313 * linux-low.c: Likewise.
314 * linux-m68k-low.c: Likewise.
315 * linux-mips-low.c: Likewise.
316 * linux-nios2-low.c: Likewise.
317 * linux-s390-low.c: Likewise.
318 * linux-sparc-low.c: Likewise.
319 * linux-tic6x-low.c: Likewise.
320 * linux-tile-low.c: Likewise.
321 * linux-x86-low.c: Likewise.
322
323 2015-07-24 Pedro Alves <palves@redhat.com>
324
325 * config.in: Regenerate.
326 * configure: Regenerate.
327
328 2015-07-24 Pedro Alves <palves@redhat.com>
329
330 * acinclude.m4: Include ../ptrace.m4.
331 * configure.ac: Call GDB_AC_PTRACE.
332 * config.in, configure: Regenerate.
333
334 2015-07-24 Yao Qi <yao.qi@linaro.org>
335
336 * linux-low.c (linux_create_inferior): Remove setting to
337 proc->priv->new_inferior.
338 (linux_attach): Likewise.
339 (linux_low_filter_event): Likewise.
340 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
341
342 2015-07-24 Yao Qi <yao.qi@linaro.org>
343
344 * linux-low.c (linux_arch_setup): New function.
345 (linux_low_filter_event): If proc->tdesc is NULL and
346 proc->attached is true, call the_low_target.arch_setup.
347 Otherwise, keep status pending, and return.
348 (linux_resume_one_lwp_throw): Don't call get_pc if
349 thread->while_stepping isn't NULL. Don't call
350 get_thread_regcache if proc->tdesc is NULL.
351 (need_step_over_p): Return 0 if proc->tdesc is NULL.
352 (linux_target_ops): Install arch_setup.
353 * server.c (start_inferior): Call the_target->arch_setup.
354 * target.h (struct target_ops) <arch_setup>: New field.
355 (target_arch_setup): New marco.
356 * lynx-low.c (lynx_target_ops): Update.
357 * nto-low.c (nto_target_ops): Update.
358 * spu-low.c (spu_target_ops): Update.
359 * win32-low.c (win32_target_ops): Update.
360
361 2015-07-24 Yao Qi <yao.qi@linaro.org>
362
363 * linux-low.c (linux_add_process): Don't set
364 proc->priv->new_inferior.
365 (linux_create_inferior): Set proc->priv->new_inferior to 1.
366 (linux_attach): Likewise.
367
368 2015-07-24 Yao Qi <yao.qi@linaro.org>
369
370 * server.c (start_inferior): Code refactor.
371
372 2015-07-24 Yao Qi <yao.qi@linaro.org>
373
374 * server.c (process_serial_event): Set general_thread.
375
376 2015-07-21 Yao Qi <yao.qi@linaro.org>
377
378 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
379 aarch64_linux_get_debug_reg_capacity.
380
381 2015-07-17 Yao Qi <yao.qi@linaro.org>
382
383 * Makefile.in (aarch64-linux-hw-point.o): New rule.
384 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
385 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
386 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
387 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
388 (AARCH64_HWP_ALIGNMENT): Likewise.
389 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
390 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
391 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
392 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
393 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
394 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
395 (struct aarch64_debug_reg_state): Likewise.
396 (struct arch_lwp_info): Likewise.
397 (aarch64_align_watchpoint): Likewise.
398 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
399 (aarch64_watchpoint_length): Likewise.
400 (aarch64_point_encode_ctrl_reg): Likewise
401 (aarch64_point_is_aligned): Likewise.
402 (aarch64_align_watchpoint): Likewise.
403 (aarch64_linux_set_debug_regs):
404 (aarch64_dr_state_insert_one_point): Likewise.
405 (aarch64_dr_state_remove_one_point): Likewise.
406 (aarch64_handle_breakpoint): Likewise.
407 (aarch64_handle_aligned_watchpoint): Likewise.
408 (aarch64_handle_unaligned_watchpoint): Likewise.
409 (aarch64_handle_watchpoint): Likewise.
410
411 2015-07-17 Yao Qi <yao.qi@linaro.org>
412
413 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
414 and don't aarch64_get_debug_reg_state. All callers update.
415 (aarch64_handle_aligned_watchpoint): Likewise.
416 (aarch64_handle_unaligned_watchpoint): Likewise.
417 (aarch64_handle_watchpoint): Likewise.
418 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
419 (aarch64_remove_point): Likewise.
420
421 2015-07-17 Yao Qi <yao.qi@linaro.org>
422
423 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
424 debug_printf.
425 (aarch64_handle_unaligned_watchpoint): Likewise.
426
427 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
428
429 Revert the previous 3 commits:
430 Move gdb_regex* to common/
431 Move linux_find_memory_regions_full & co.
432 gdbserver build-id attribute generator
433
434 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
435 Jan Kratochvil <jan.kratochvil@redhat.com>
436
437 gdbserver build-id attribute generator.
438 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
439 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
440 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
441 (find_phdr): New.
442 (get_dynamic): Use find_pdhr to traverse program headers.
443 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
444 (compare_mapping_entry_range, struct find_memory_region_callback_data)
445 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
446 (get_hex_build_id): New.
447 (linux_qxfer_libraries_svr4): Add optional build-id attribute
448 to reply XML document.
449
450 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
451 Jan Kratochvil <jan.kratochvil@redhat.com>
452
453 * target.c: Include target/target-utils.h and fcntl.h.
454 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
455 (target_fileio_read_stralloc): New functions.
456
457 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
458
459 * Makefile.in (OBS): Add gdb_regex.o.
460 (gdb_regex.o): New.
461 * config.in: Rebuilt.
462 * configure: Rebuilt.
463
464 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
465 Jan Kratochvil <jan.kratochvil@redhat.com>
466
467 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
468 * Makefile.in (OBS): Add target-utils.o.
469 (linux-maps.o, target-utils.o): New.
470 * configure.srv (srv_linux_obj): Add linux-maps.o.
471
472 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
473
474 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
475 function, return 1.
476 (the_low_target): Install it.
477
478 2015-07-14 Pedro Alves <palves@redhat.com>
479
480 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
481 Instead, ignore ECHILD, and throw an error for other errnos.
482
483 2015-07-10 Pedro Alves <palves@redhat.com>
484
485 * event-loop.c (struct callback_event) <data>: Change type to
486 gdb_client_data instance instead of gdb_client_data pointer.
487 (append_callback_event): Adjust.
488
489 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
490
491 * linux-aarch64-low.c: Add comments for each linux_target_ops
492 method. Remove comments already covered in target_ops and
493 linux_target_ops definitions.
494 (the_low_target): Add comments for each unimplemented method.
495
496 2015-07-09 Yao Qi <yao.qi@linaro.org>
497
498 * linux-aarch64-low.c (aarch64_regmap): Remove.
499 (aarch64_usrregs_info): Remove.
500 (regs_info): Set field usrregs to NULL.
501
502 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
503
504 * linux-low.c: Include "rsp-low.h"
505 (linux_low_encode_pt_config, linux_low_encode_raw): New.
506 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
507 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
508 (handle_btrace_enable_pt): New.
509 (handle_btrace_general_set): Support "pt".
510 (handle_btrace_conf_general_set): Support "pt:size".
511
512 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
513
514 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
515 Z_PACKET_SW_BP.
516
517 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
518
519 * linux-aarch64-low.c: Remove comment about endianness.
520 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
521 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
522 memcmp.
523
524 2015-06-24 Gary Benson <gbenson@redhat.com>
525
526 * linux-i386-ipa.c (stdint.h): Do not include.
527 * lynx-i386-low.c (stdint.h): Likewise.
528 * lynx-ppc-low.c (stdint.h): Likewise.
529 * mem-break.c (stdint.h): Likewise.
530 * thread-db.c (stdint.h): Likewise.
531 * tracepoint.c (stdint.h): Likewise.
532 * win32-low.c (stdint.h): Likewise.
533
534 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
535
536 * server.c (write_qxfer_response): Update call to
537 remote_escape_output.
538
539 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
540 Jan Kratochvil <jan.kratochvil@redhat.com>
541
542 Merge multiple hex conversions.
543 * gdbreplay.c (tohex): Rename to 'fromhex'.
544 (logchar): Use fromhex.
545
546 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
547
548 * server.c (handle_qxfer_libraries): Set `version' attribute for
549 <library-list>.
550
551 2015-06-10 Gary Benson <gbenson@redhat.com>
552
553 * target.h (struct target_ops) <multifs_open>: New field.
554 <multifs_unlink>: Likewise.
555 <multifs_readlink>: Likewise.
556 * linux-low.c (nat/linux-namespaces.h): New include.
557 (linux_target_ops): Initialize the_target->multifs_open,
558 the_target->multifs_unlink and the_target->multifs_readlink.
559 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
560 * hostio.c (hostio_fs_pid): New static variable.
561 (hostio_handle_new_gdb_connection): New function.
562 (handle_setfs): Likewise.
563 (handle_open): Use the_target->multifs_open as appropriate.
564 (handle_unlink): Use the_target->multifs_unlink as appropriate.
565 (handle_readlink): Use the_target->multifs_readlink as
566 appropriate.
567 (handle_vFile): Handle vFile:setfs packets.
568 * server.c (handle_query): Call hostio_handle_new_gdb_connection
569 after target_handle_new_gdb_connection.
570
571 2015-06-10 Gary Benson <gbenson@redhat.com>
572
573 * configure.ac (AC_CHECK_FUNCS): Add setns.
574 * config.in: Regenerate.
575 * configure: Likewise.
576 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
577 (linux-namespaces.o): New rule.
578 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
579
580 2015-06-09 Gary Benson <gbenson@redhat.com>
581
582 * hostio.c (handle_open): Process mode argument with
583 fileio_to_host_mode.
584
585 2015-06-01 Yao Qi <yao.qi@linaro.org>
586
587 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
588 * linux-x86-low.c: Likewise.
589
590 2015-05-28 Don Breazeal <donb@codesourcery.com>
591
592 * linux-low.c (handle_extended_wait): Initialize
593 thread_info.last_resume_kind for new fork children.
594
595 2015-05-15 Pedro Alves <palves@redhat.com>
596
597 * target.h (target_handle_new_gdb_connection): Rewrite using if
598 wrapped in do/while.
599
600 2015-05-14 Joel Brobecker <brobecker@adacore.com>
601
602 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
603 * configure, config.in: Regenerate.
604 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
605 Declare typedef.
606
607 2015-05-12 Don Breazeal <donb@codesourcery.com>
608
609 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
610 PTRACE_EVENT_VFORK_DONE.
611 (linux_low_ptrace_options, extended_event_reported): Add vfork
612 events.
613 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
614 and "vforkdone" for RSP 'T' Stop Reply Packet.
615 * server.h (report_vfork_events): Declare
616 global variable.
617
618 2015-05-12 Don Breazeal <donb@codesourcery.com>
619
620 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
621 (the_low_target) <new_fork>: Initialize new member.
622 * linux-arm-low.c (arm_new_fork): New function.
623 (the_low_target) <new_fork>: Initialize new member.
624 * linux-low.c (handle_extended_wait): Call new target function
625 new_fork.
626 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
627 * linux-mips-low.c (mips_add_watchpoint): New function
628 extracted from mips_insert_point.
629 (the_low_target) <new_fork>: Initialize new member.
630 (mips_linux_new_fork): New function.
631 (mips_insert_point): Call mips_add_watchpoint.
632 * linux-x86-low.c (x86_linux_new_fork): New function.
633 (the_low_target) <new_fork>: Initialize new member.
634
635 2015-05-12 Don Breazeal <donb@codesourcery.com>
636
637 * linux-low.c (handle_extended_wait): Implement return value,
638 rename argument 'event_child' to 'event_lwp', handle
639 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
640 (linux_low_ptrace_options): New function.
641 (linux_low_filter_event): Call linux_low_ptrace_options,
642 use different argument fo linux_enable_event_reporting,
643 use return value from handle_extended_wait.
644 (extended_event_reported): New function.
645 (linux_wait_1): Call extended_event_reported and set
646 status to report fork events.
647 (linux_write_memory): Add pid to debug message.
648 (reset_lwp_ptrace_options_callback): New function.
649 (linux_handle_new_gdb_connection): New function.
650 (linux_target_ops): Initialize new structure member.
651 * linux-low.h (struct lwp_info) <waitstatus>: New member.
652 * lynx-low.c: Initialize new structure member.
653 * remote-utils.c (prepare_resume_reply): Implement stop reason
654 "fork" for "T" stop message.
655 * server.c (handle_query): Call handle_new_gdb_connection.
656 * server.h (report_fork_events): Declare global flag.
657 * target.h (struct target_ops) <handle_new_gdb_connection>:
658 New member.
659 (target_handle_new_gdb_connection): New macro.
660 * win32-low.c: Initialize new structure member.
661
662 2015-05-12 Don Breazeal <donb@codesourcery.com>
663
664 * mem-break.c (APPEND_TO_LIST): Define macro.
665 (clone_agent_expr): New function.
666 (clone_one_breakpoint): New function.
667 (clone_all_breakpoints): New function.
668 * mem-break.h: Declare new functions.
669
670 2015-05-12 Don Breazeal <donb@codesourcery.com>
671
672 * linux-low.c (linux_supports_fork_events): New function.
673 (linux_supports_vfork_events): New function.
674 (linux_target_ops): Initialize new structure members.
675 (initialize_low): Call linux_check_ptrace_features.
676 * lynx-low.c (lynx_target_ops): Initialize new structure
677 members.
678 * server.c (report_fork_events, report_vfork_events):
679 New global flags.
680 (handle_query): Add new features to qSupported packet and
681 response.
682 (captured_main): Initialize new global variables.
683 * target.h (struct target_ops) <supports_fork_events>:
684 New member.
685 <supports_vfork_events>: New member.
686 (target_supports_fork_events): New macro.
687 (target_supports_vfork_events): New macro.
688 * win32-low.c (win32_target_ops): Initialize new structure
689 members.
690
691 2015-05-12 Gary Benson <gbenson@redhat.com>
692
693 * server.c (handle_qxfer_exec_file): Use current process
694 if annex is empty.
695
696 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
697
698 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
699 Remove HAVE_PTRACE_GETREGS conditionals.
700 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
701 instead of PTRACE_GETREGS and PTRACE_SETREGS.
702
703 2015-05-08 Yao Qi <yao.qi@linaro.org>
704
705 * linux-low.c (linux_supports_conditional_breakpoints): New
706 function.
707 (linux_target_ops): Install new target method.
708 * lynx-low.c (lynx_target_ops): Install NULL hook for
709 supports_conditional_breakpoints.
710 * nto-low.c (nto_target_ops): Likewise.
711 * spu-low.c (spu_target_ops): Likewise.
712 * win32-low.c (win32_target_ops): Likewise.
713 * server.c (handle_query): Check
714 target_supports_conditional_breakpoints.
715 * target.h (struct target_ops) <supports_conditional_breakpoints>:
716 New field.
717 (target_supports_conditional_breakpoints): New macro.
718
719 2015-05-06 Pedro Alves <palves@redhat.com>
720
721 PR server/18081
722 * server.c (start_inferior): If the process exits, mourn it.
723
724 2015-04-21 Gary Benson <gbenson@redhat.com>
725
726 * hostio.c (fileio_open_flags_to_host): Factored out to
727 fileio_to_host_openflags in common/fileio.c. Single use
728 updated.
729
730 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
731
732 * linux-xtensa-low.c (xtensa_fill_gregset)
733 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
734 XCHAL_HAVE_LOOP.
735
736 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
737
738 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
739 (regs_info): Replace usrregs pointer with NULL.
740
741 2015-04-17 Gary Benson <gbenson@redhat.com>
742
743 * target.h (struct target_ops) <pid_to_exec_file>: New field.
744 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
745 * server.c (handle_qxfer_exec_file): New function.
746 (qxfer_packets): Add exec-file entry.
747 (handle_query): Report qXfer:exec-file:read as supported packet.
748
749 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
750
751 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
752
753 2015-04-09 Gary Benson <gbenson@redhat.com>
754
755 * hostio-errno.c (errno_to_fileio_error): Remove function.
756 Update caller to use remote_fileio_to_fio_error.
757
758 2015-04-09 Yao Qi <yao.qi@linaro.org>
759
760 * linux-low.c (linux_insert_point): Call
761 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
762 (linux_remove_point): Call remove_memory_breakpoint if type is
763 raw_bkpt_type_sw.
764 * linux-x86-low.c (x86_insert_point): Don't call
765 insert_memory_breakpoint.
766 (x86_remove_point): Don't call remove_memory_breakpoint.
767
768 2015-04-01 Pedro Alves <palves@redhat.com>
769 Cleber Rosa <crosa@redhat.com>
770
771 * server.c (gdbserver_usage): Reorganize and extend the usage
772 message.
773
774 2015-03-24 Pedro Alves <palves@redhat.com>
775
776 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
777 output. Also dump TRAP_TRACE.
778 (linux_low_filter_event): In debug output, distinguish a
779 resume_stop SIGSTOP from a delayed SIGSTOP.
780
781 2015-03-24 Gary Benson <gbenson@redhat.com>
782
783 * linux-x86-low.c (x86_linux_new_thread): Moved to
784 nat/x86-linux.c.
785 (x86_linux_prepare_to_resume): Likewise.
786
787 2015-03-24 Gary Benson <gbenson@redhat.com>
788
789 * Makefile.in (x86-linux-dregs.o): New rule.
790 * configure.srv: Add x86-linux-dregs.o to relevant targets.
791 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
792 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
793 (x86_linux_dr_get): Likewise.
794 (x86_linux_dr_set): Likewise.
795 (update_debug_registers_callback): Likewise.
796 (x86_linux_dr_set_addr): Likewise.
797 (x86_linux_dr_get_addr): Likewise.
798 (x86_linux_dr_set_control): Likewise.
799 (x86_linux_dr_get_control): Likewise.
800 (x86_linux_dr_get_status): Likewise.
801 (x86_linux_update_debug_registers): Likewise.
802
803 2015-03-24 Gary Benson <gbenson@redhat.com>
804
805 * linux-x86-low.c (x86_linux_update_debug_registers):
806 New function, factored out from...
807 (x86_linux_prepare_to_resume): ...this.
808
809 2015-03-24 Gary Benson <gbenson@redhat.com>
810
811 * linux-x86-low.c (x86_linux_dr_get): Update comments.
812 (x86_linux_dr_set): Likewise.
813 (update_debug_registers_callback): Likewise.
814 (x86_linux_dr_set_addr): Likewise.
815 (x86_linux_dr_get_addr): Likewise.
816 (x86_linux_dr_set_control): Likewise.
817 (x86_linux_dr_get_control): Likewise.
818 (x86_linux_dr_get_status): Likewise.
819 (x86_linux_prepare_to_resume): Likewise.
820
821 2015-03-24 Gary Benson <gbenson@redhat.com>
822
823 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
824 Use perror_with_name. Pass string through gettext.
825 (x86_linux_dr_set): Likewise.
826
827 2015-03-24 Gary Benson <gbenson@redhat.com>
828
829 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
830 (x86_linux_dr_set_addr): ...this.
831 (x86_dr_low_get_addr): Rename to...
832 (x86_linux_dr_get_addr): ...this.
833 (x86_dr_low_set_control): Rename to...
834 (x86_linux_dr_set_control): ...this.
835 (x86_dr_low_get_control): Rename to...
836 (x86_linux_dr_get_control): ...this.
837 (x86_dr_low_get_status): Rename to...
838 (x86_linux_dr_get_status): ...this.
839 (x86_dr_low): Update with new function names.
840
841 2015-03-24 Gary Benson <gbenson@redhat.com>
842
843 * Makefile.in (x86-linux.o): New rule.
844 * configure.srv: Add x86-linux.o to relevant targets.
845 * linux-low.c (lwp_set_arch_private_info): New function.
846 (lwp_arch_private_info): Likewise.
847 * linux-x86-low.c: Include nat/x86-linux.h.
848 (arch_lwp_info): Removed structure.
849 (update_debug_registers_callback):
850 Use lwp_set_debug_registers_changed.
851 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
852 and lwp_set_debug_registers_changed.
853 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
854
855 2015-03-24 Gary Benson <gbenson@redhat.com>
856
857 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
858 * linux-arm-low.c (arm_new_thread): Likewise.
859 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
860 * linux-mips-low.c (mips_linux_new_thread): Likewise.
861 * linux-x86-low.c (x86_linux_new_thread): Likewise.
862 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
863
864 2015-03-24 Gary Benson <gbenson@redhat.com>
865
866 * linux-low.c (ptid_of_lwp): New function.
867 (lwp_is_stopped): Likewise.
868 (lwp_stop_reason): Likewise.
869 * linux-x86-low.c (update_debug_registers_callback):
870 Use lwp_is_stopped.
871 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
872 lwp_stop_reason.
873
874 2015-03-24 Gary Benson <gbenson@redhat.com>
875
876 * linux-low.h (linux_stop_lwp): Remove declaration.
877
878 2015-03-24 Gary Benson <gbenson@redhat.com>
879
880 * linux-low.h: Include nat/linux-nat.h.
881 * linux-low.c (iterate_over_lwps_args): New structure.
882 (iterate_over_lwps_filter): New function.
883 (iterate_over_lwps): Likewise.
884 * linux-x86-low.c (update_debug_registers_callback):
885 Update signature to what iterate_over_lwps expects.
886 Remove PID check that iterate_over_lwps now performs.
887 (x86_dr_low_set_addr): Use iterate_over_lwps.
888 (x86_dr_low_set_control): Likewise.
889
890 2015-03-24 Gary Benson <gbenson@redhat.com>
891
892 * linux-x86-low.c (x86_debug_reg_state): New function.
893 (x86_linux_prepare_to_resume): Use the above.
894
895 2015-03-24 Gary Benson <gbenson@redhat.com>
896
897 * linux-low.c (current_lwp_ptid): New function.
898 * linux-x86-low.c: Include nat/linux-nat.h.
899 (x86_dr_low_get_addr): Use current_lwp_ptid.
900 (x86_dr_low_get_control): Likewise.
901 (x86_dr_low_get_status): Likewise.
902
903 2015-03-20 Pedro Alves <palves@redhat.com>
904
905 * tracepoint.c (cmd_qtstatus): Make "str" const.
906
907 2015-03-20 Pedro Alves <palves@redhat.com>
908
909 * server.c (handle_general_set): Make "req_str" const.
910
911 2015-03-19 Pedro Alves <palves@redhat.com>
912
913 * linux-low.c (linux_resume_one_lwp): Rename to ...
914 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
915 instead call perror_with_name.
916 (check_ptrace_stopped_lwp_gone): New function.
917 (linux_resume_one_lwp): Reimplement as wrapper around
918 linux_resume_one_lwp_throw that swallows errors if the LWP is
919 gone.
920
921 2015-03-19 Pedro Alves <palves@redhat.com>
922
923 * linux-low.c (count_events_callback, select_event_lwp_callback):
924 No longer check whether the thread has resume_stop as last resume
925 kind.
926
927 2015-03-19 Pedro Alves <palves@redhat.com>
928
929 * linux-low.c (count_events_callback, select_event_lwp_callback):
930 Use the lwp's status_pending_p field, not the thread's.
931
932 2015-03-19 Pedro Alves <palves@redhat.com>
933
934 * linux-low.c (select_event_lwp_callback): Update comments to
935 no longer mention SIGTRAP.
936
937 2015-03-18 Gary Benson <gbenson@redhat.com>
938
939 * server.c (handle_query): Do not report vFile:fstat as supported.
940
941 2015-03-11 Gary Benson <gbenson@redhat.com>
942
943 * hostio.c (sys/types.h): New include.
944 (sys/stat.h): Likewise.
945 (common-remote-fileio.h): Likewise.
946 (handle_fstat): New function.
947 (handle_vFile): Handle vFile:fstat packets.
948
949 2015-03-11 Gary Benson <gbenson@redhat.com>
950
951 * configure.ac (AC_CHECK_MEMBERS): Add checks for
952 struct stat.st_blocks and struct stat.st_blksize.
953 * configure: Regenerate.
954 * config.in: Likewise.
955 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
956 (OBS): Add common-remote-fileio.o.
957 (common-remote-fileio.o): New rule.
958
959 2015-03-09 Pedro Alves <palves@redhat.com>
960
961 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
962 'struct sockaddr' pointer in 'accept' call.
963
964 2015-03-09 Pedro Alves <palves@redhat.com>
965
966 Revert:
967 2015-03-07 Pedro Alves <palves@redhat.com>
968 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
969 or <winsock2.h> here. Instead include "gdb_socket.h".
970 (remote_open): Use union gdb_sockaddr_u.
971 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
972 or <winsock2.h> here. Instead include "gdb_socket.h".
973 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
974 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
975 or <sys/un.h>.
976 (init_named_socket, gdb_agent_helper_thread): Use union
977 gdb_sockaddr_u.
978
979 2015-03-07 Pedro Alves <palves@redhat.com>
980
981 * configure.ac (build_warnings): Move
982 -Wdeclaration-after-statement to the C-specific set.
983 * configure: Regenerate.
984
985 2015-03-07 Pedro Alves <palves@redhat.com>
986
987 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
988 or <winsock2.h> here. Instead include "gdb_socket.h".
989 (remote_open): Use union gdb_sockaddr_u.
990 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
991 or <winsock2.h> here. Instead include "gdb_socket.h".
992 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
993 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
994 or <sys/un.h>.
995 (init_named_socket, gdb_agent_helper_thread): Use union
996 gdb_sockaddr_u.
997
998 2015-03-07 Pedro Alves <palves@redhat.com>
999
1000 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1001 instead.
1002
1003 2015-03-06 Yao Qi <yao.qi@linaro.org>
1004
1005 * linux-aarch64-low.c (aarch64_insert_point): Use
1006 show_debug_regs as a boolean.
1007 (aarch64_remove_point): Likewise.
1008
1009 2015-03-05 Pedro Alves <palves@redhat.com>
1010
1011 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1012 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1013 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1014 * nto-low.c (nto_target_ops): Likewise.
1015 * spu-low.c (spu_target_ops): Likewise.
1016 * win32-low.c (win32_target_ops): Likewise.
1017
1018 2015-03-04 Pedro Alves <palves@redhat.com>
1019
1020 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
1021 Decide whether a breakpoint triggered based on the SIGTRAP's
1022 siginfo.si_code.
1023 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1024 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
1025 (linux_low_filter_event): Check for breakpoints before checking
1026 watchpoints.
1027 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1028 siginfo.si_code.
1029 (linux_stopped_by_sw_breakpoint)
1030 (linux_supports_stopped_by_sw_breakpoint)
1031 (linux_stopped_by_hw_breakpoint)
1032 (linux_supports_stopped_by_hw_breakpoint): New functions.
1033 (linux_target_ops): Install new target methods.
1034
1035 2015-03-04 Pedro Alves <palves@redhat.com>
1036
1037 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1038 * server.c (swbreak_feature, hwbreak_feature): New globals.
1039 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1040 (captured_main): Clear swbreak_feature and hwbreak_feature.
1041 * server.h (swbreak_feature, hwbreak_feature): Declare.
1042 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1043 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1044 supports_stopped_by_hw_breakpoint>: New fields.
1045 (target_supports_stopped_by_sw_breakpoint)
1046 (target_stopped_by_sw_breakpoint)
1047 (target_supports_stopped_by_hw_breakpoint)
1048 (target_stopped_by_hw_breakpoint): Declare.
1049
1050 2015-03-04 Pedro Alves <palves@redhat.com>
1051
1052 enum lwp_stop_reason -> enum target_stop_reason
1053 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1054 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1055 (linux_wait_1, stuck_in_jump_pad_callback)
1056 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1057 (linux_stopped_by_watchpoint):
1058 * linux-low.h (enum lwp_stop_reason): Delete.
1059 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1060 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1061
1062 2015-03-04 Yao Qi <yao.qi@linaro.org>
1063
1064 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1065
1066 2015-03-03 Gary Benson <gbenson@redhat.com>
1067
1068 * hostio.c (handle_vFile): Fix prefix lengths.
1069
1070 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1071
1072 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1073 ptr_bits.
1074
1075 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1076
1077 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1078 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1079 (clean): Add "rm -f" for above C files.
1080 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1081 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1082 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1083 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1084 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1085 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1086 (init_registers_s390x_vx_linux64)
1087 (init_registers_s390x_tevx_linux64)
1088 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1089 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1090 declarations.
1091 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1092 (s390_store_vxrs_high): New functions.
1093 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1094 NT_S390_VXRS_HIGH.
1095 (s390_arch_setup): Add logic for selecting one of the new target
1096 descriptions. Activate the new vector regsets if applicable.
1097 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1098 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1099 and init_registers_s390x_tevx_linux64.
1100
1101 2015-03-01 Pedro Alves <palves@redhat.com>
1102
1103 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1104 parameter.
1105
1106 2015-02-27 Pedro Alves <palves@redhat.com>
1107
1108 * linux-x86-low.c (u_debugreg_offset): New function.
1109 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1110
1111 2015-02-27 Pedro Alves <palves@redhat.com>
1112
1113 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1114 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1115 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1116 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1117 (ps_lsetfpregs, ps_getpid)
1118 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1119 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1120 (ps_lsetxregs, ps_plog): Declare.
1121
1122 2015-02-27 Pedro Alves <palves@redhat.com>
1123
1124 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1125 IP_AGENT_EXPORT_FUNC.
1126 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1127 IP_AGENT_EXPORT_FUNC.
1128 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1129 (IP_AGENT_EXPORT): Delete.
1130 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1131 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1132 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1133 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1134 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1135 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1136 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1137 (traceframe_read_count, traceframe_write_count)
1138 (traceframes_created, trace_state_variables, get_raw_reg)
1139 (get_trace_state_variable_value, set_trace_state_variable_value)
1140 (ust_loaded, helper_thread_id, cmd_buf): Use
1141 IPA_SYM_EXPORTED_NAME.
1142 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1143 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1144 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1145 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1146 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1147 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1148 EXTERN_C_PUSH/EXTERN_C_POP.
1149 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1150 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1151 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1152 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1153 (traceframe_write_count, traceframe_read_count)
1154 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1155 (about_to_request_buffer_space, get_trace_state_variable_value)
1156 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1157 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1158 EXTERN_C_PUSH/EXTERN_C_POP.
1159 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1160 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1161 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1162 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1163 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1164 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1165 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1166 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1167 Define.
1168 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1169 (IP_AGENT_EXPORT_VAR_DECL): Define.
1170 (tracing): Declare.
1171 (gdb_agent_get_raw_reg): Declare.
1172
1173 2015-02-27 Tom Tromey <tromey@redhat.com>
1174 Pedro Alves <palves@redhat.com>
1175
1176 Rename symbols whose names are reserved C++ keywords throughout.
1177
1178 2015-02-27 Pedro Alves <palves@redhat.com>
1179
1180 * Makefile.in (COMPILER): New, get it from autoconf.
1181 (CXX): Get from autoconf instead.
1182 (COMPILE.pre): Use COMPILER.
1183 (CC-LD): Rename to ...
1184 (CC_LD): ... this. Use COMPILER.
1185 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1186 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1187 * acinclude.m4: Include build-with-cxx.m4.
1188 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1189 Disable -Werror by default if building in C++ mode.
1190 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1191 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1192 the C++ compiler. Save/restore CXXFLAGS too.
1193 * configure: Regenerate.
1194
1195 2015-02-27 Pedro Alves <palves@redhat.com>
1196
1197 * acinclude.m4: Include libiberty.m4.
1198 * configure.ac: Call libiberty_INIT.
1199 * config.in, configure: Regenerate.
1200
1201 2015-02-26 Pedro Alves <palves@redhat.com>
1202
1203 * linux-low.c (linux_wait_1): When incrementing the PC past a
1204 program breakpoint always use the_low_target.breakpoint_len as
1205 increment, rather than the maximum between that and
1206 the_low_target.decr_pc_after_break.
1207
1208 2015-02-23 Pedro Alves <palves@redhat.com>
1209
1210 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1211 thread was doing a step-over; always adjust the PC if
1212 we stepped over a permanent breakpoint.
1213 (linux_wait_1): If we stepped over breakpoint that was on top of a
1214 permanent breakpoint, manually advance the PC past it.
1215
1216 2015-02-23 Pedro Alves <palves@redhat.com>
1217
1218 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1219 modes.
1220 (x86_fill_gregset, x86_store_gregset): Use it when handling
1221 $orig_eax.
1222
1223 2015-02-20 Pedro Alves <palves@redhat.com>
1224
1225 * thread-db.c: Include "nat/linux-procfs.h".
1226 (thread_db_init): Skip listing new threads if the kernel supports
1227 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1228
1229 2015-02-20 Pedro Alves <palves@redhat.com>
1230
1231 * linux-low.c (status_pending_p_callback): Use ptid_match.
1232
1233 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1234
1235 PR breakpoints/16812
1236 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1237 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1238 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1239
1240 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1241
1242 PR breakpoints/15956
1243 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1244
1245 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1246
1247 * linux-low.c (linux_low_btrace_conf): Print size.
1248 * server.c (handle_btrace_conf_general_set): New.
1249 (hanle_general_set): Call handle_btrace_conf_general_set.
1250 (handle_query): Report Qbtrace-conf:bts:size as supported.
1251
1252 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1253
1254 * linux-low.c (linux_low_enable_btrace): Update parameters.
1255 (linux_low_btrace_conf): New.
1256 (linux_target_ops)<to_btrace_conf>: Initialize.
1257 * server.c (current_btrace_conf): New.
1258 (handle_btrace_enable): Rename to ...
1259 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
1260 to target_enable_btrace. Update comment. Update users.
1261 (handle_qxfer_btrace_conf): New.
1262 (qxfer_packets): Add btrace-conf entry.
1263 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1264 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1265 (target_ops)<read_btrace_conf>: New.
1266 (target_enable_btrace): Update parameters.
1267 (target_read_btrace_conf): New.
1268
1269 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1270
1271 * server.c (handle_btrace_general_set): Remove call to
1272 target_supports_btrace.
1273 (supported_btrace_packets): New.
1274 (handle_query): Call supported_btrace_packets.
1275 * target.h: include btrace-common.h.
1276 (btrace_target_info): Removed.
1277 (supports_btrace, target_supports_btrace): Update parameters.
1278
1279 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1280
1281 * Makefile.in (SFILES): Add common/btrace-common.c.
1282 (OBS): Add common/btrace-common.o.
1283 (btrace-common.o): Add build rules.
1284 * linux-low: Include btrace-common.h.
1285 (linux_low_read_btrace): Use struct btrace_data. Call
1286 btrace_data_init and btrace_data_fini.
1287
1288 2015-02-06 Pedro Alves <palves@redhat.com>
1289
1290 * thread-db.c (find_new_threads_callback): Add debug output.
1291
1292 2015-02-04 Pedro Alves <palves@redhat.com>
1293
1294 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1295 (resume_stopped_resumed_lwps): New function.
1296 (linux_wait_for_event_filtered): Use it.
1297
1298 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1299
1300 * Makefile.in (SFILES): Add linux-personality.c.
1301 (linux-personality.o): New rule.
1302 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1303 list of objects to be built.
1304 * linux-low.c: Include nat/linux-personality.h.
1305 (linux_create_inferior): Remove code to disable address space
1306 randomization (moved to ../nat/linux-personality.c). Create
1307 cleanup to disable address space randomization.
1308
1309 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1310
1311 * Makefile.in (posix-strerror.o): New rule.
1312 (mingw-strerror.o): Likewise.
1313 * configure: Regenerated.
1314 * configure.ac: Source file ../common/common.host. Initialize new
1315 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1316
1317 2015-01-14 Yao Qi <yao@codesourcery.com>
1318
1319 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1320 (ppc-linux.o): New rule.
1321 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1322 * configure.ac: AC_CHECK_FUNCS(getauxval).
1323 * config.in: Re-generated.
1324 * configure: Re-generated.
1325 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1326 ppc64_64bit_inferior_p
1327
1328 2015-01-14 Yao Qi <yao@codesourcery.com>
1329
1330 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1331 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1332 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1333 (PT_ORIG_R3, PT_TRAP): Likewise.
1334 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1335 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1336 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1337
1338 2015-01-10 Joel Brobecker <brobecker@adacore.com>
1339
1340 * i387-fp.c (i387_cache_to_xsave): In look over
1341 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1342 zmmh_low_space field by use of zmmh_high_space.
1343
1344 2015-01-09 Pedro Alves <palves@redhat.com>
1345
1346 * linux-low.c (step_over_bkpt): Move higher up in the file.
1347 (handle_extended_wait): Don't store the stop_pc here.
1348 (get_stop_pc): Adjust comments and rename to ...
1349 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1350 stopped for a software breakpoint or hardware breakpoint.
1351 (thread_still_has_status_pending_p): New function.
1352 (status_pending_p_callback): Use
1353 thread_still_has_status_pending_p. If the event is no longer
1354 interesting, resume the LWP.
1355 (handle_tracepoints): Add assert.
1356 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1357 (wstatus_maybe_breakpoint): New function.
1358 (cancel_breakpoint): Delete function.
1359 (check_stopped_by_watchpoint): New function, factored out from
1360 linux_low_filter_event.
1361 (lp_status_maybe_breakpoint): Delete function.
1362 (linux_low_filter_event): Remove filter_ptid argument.
1363 Leave thread group exits pending here. Store the LWP's stop PC.
1364 Always leave events pending.
1365 (linux_wait_for_event_filtered): Pull all events out of the
1366 kernel, and leave them all pending.
1367 (count_events_callback, select_event_lwp_callback): Consider all
1368 events.
1369 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1370 (select_event_lwp): Only give preference to the stepping LWP in
1371 all-stop mode. Adjust comments.
1372 (ignore_event): New function.
1373 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1374 references to cancel_breakpoints. Adjust to renames. Also give
1375 equal priority to all LWPs that have had events in non-stop mode.
1376 If reporting a software breakpoint event, unadjust the LWP's PC.
1377 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1378 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1379 Adjust.
1380 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1381 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1382 (linux_stopped_by_watchpoint): Adjust.
1383 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1384 * linux-low.h (enum lwp_stop_reason): New.
1385 (struct lwp_info) <stop_pc>: Adjust comment.
1386 <stopped_by_watchpoint>: Delete field.
1387 <stop_reason>: New field.
1388 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1389 * mem-break.c (software_breakpoint_inserted_here)
1390 (hardware_breakpoint_inserted_here): New function.
1391 * mem-break.h (software_breakpoint_inserted_here)
1392 (hardware_breakpoint_inserted_here): Declare.
1393 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1394 (cancel_breakpoints): Delete.
1395 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1396 (upload_fast_traceframes): Remove references to
1397 cancel_breakpoints.
1398
1399 2015-01-09 Pedro Alves <palves@redhat.com>
1400
1401 * thread-db.c (find_new_threads_callback): Ignore thread if the
1402 kernel thread ID is -1.
1403
1404 2015-01-09 Pedro Alves <palves@redhat.com>
1405
1406 * linux-low.c (linux_attach_fail_reason_string): Move to
1407 nat/linux-ptrace.c, and rename.
1408 (linux_attach_lwp): Update comment.
1409 (attach_proc_task_lwp_callback): New function.
1410 (linux_attach): Adjust to rename and use
1411 linux_proc_attach_tgid_threads.
1412 (linux_attach_fail_reason_string): Delete declaration.
1413
1414 2015-01-01 Joel Brobecker <brobecker@adacore.com>
1415
1416 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1417 * server.c (gdbserver_version): Likewise.
1418
1419 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1420
1421 * remote-utils.c: Include ctype.h.
1422 (input_interrupt): Explicitly handle the case when the char
1423 received is the NUL byte. Improve the printing of non-ASCII
1424 characters.
1425
1426 2014-12-16 Joel Brobecker <brobecker@adacore.com>
1427
1428 * linux-low.c (linux_low_filter_event): Update call to
1429 linux_enable_event_reporting following the addition of
1430 a new parameter to that function.
1431
1432 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
1433
1434 PR server/17457
1435 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1436 (AARCH64_FPCR_REGNO): Likewise.
1437 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1438 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1439 (aarch64_store_fpregset): Likewise.
1440
1441 2014-12-15 Joel Brobecker <brobecker@adacore.com>
1442
1443 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1444 Remove FIXME comment about assumption about N.
1445
1446 2014-12-13 Joel Brobecker <brobecker@adacore.com>
1447
1448 * configure.ac: If large-file support is disabled in GDBserver,
1449 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1450 * configure: Regenerate.
1451
1452 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1453
1454 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1455 warning upon ENODATA from ptrace.
1456 * linux-s390-low.c (s390_store_tdb): New.
1457 (s390_regsets): Add regset for NT_S390_TDB.
1458
1459 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1460
1461 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1462 without a fill_function.
1463 * linux-s390-low.c (s390_fill_last_break): Remove.
1464 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1465 (s390_arch_setup): Use regset's size instead of fill_function for
1466 loop end condition.
1467
1468 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1469
1470 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1471 the regset's store function when ptrace returned an error.
1472 * regcache.c (get_thread_regcache): Invalidate register cache
1473 before fetching inferior's registers.
1474
1475 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1476
1477 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1478 while-loop as for-loop.
1479 (regsets_store_inferior_registers): Likewise.
1480
1481 2014-11-28 Yao Qi <yao@codesourcery.com>
1482
1483 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1484 * config.in, configure: Re-generate.
1485 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1486 is defined.
1487
1488 2014-11-21 Yao Qi <yao@codesourcery.com>
1489
1490 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1491 (AC_CHECK_HEADERS): Remove malloc.h.
1492 * configure: Re-generated.
1493 * config.in: Re-generated.
1494 * server.h: Don't include alloca.h and malloc.h.
1495 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1496 Don't include malloc.h.
1497
1498 2014-11-17 Joel Brobecker <brobecker@adacore.com>
1499
1500 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1501 corresponding ERRNO check in same block.
1502
1503 2014-11-12 Pedro Alves <palves@redhat.com>
1504
1505 * server.c (cont_thread): Update comment.
1506 (start_inferior, attach_inferior): No longer clear cont_thread.
1507 (handle_v_cont): No longer set cont_thread.
1508 (captured_main): Clear cont_thread each time a GDB connects.
1509
1510 2014-11-12 Pedro Alves <palves@redhat.com>
1511
1512 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1513 thread, and don't resume all threads if the Hc thread has exited.
1514
1515 2014-11-12 Pedro Alves <palves@redhat.com>
1516
1517 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1518 the process group instead of to a specific LWP.
1519
1520 2014-10-15 Pedro Alves <palves@redhat.com>
1521
1522 PR server/17487
1523 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1524 parameter.
1525 (arm_set_thread_context): Delete.
1526 (the_low_target): Adjust.
1527 * win32-i386-low.c (debug_registers_changed)
1528 (debug_registers_used): Delete.
1529 (update_debug_registers_callback): New function.
1530 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1531 needing to update their debug registers.
1532 (win32_get_current_dr): New function.
1533 (x86_dr_low_get_addr, x86_dr_low_get_control)
1534 (x86_dr_low_get_status): Fetch the debug register from the thread
1535 record's context.
1536 (i386_initial_stuff): Adjust.
1537 (i386_get_thread_context): Remove current_event parameter. Don't
1538 clear debug_registers_changed nor copy DR values to
1539 debug_reg_state.
1540 (i386_set_thread_context): Delete.
1541 (i386_prepare_to_resume): New function.
1542 (i386_thread_added): Mark the thread as needing to update irs
1543 debug registers.
1544 (the_low_target): Remove i386_set_thread_context and install
1545 i386_prepare_to_resume.
1546 * win32-low.c (win32_get_thread_context): Adjust.
1547 (win32_set_thread_context): Use SetThreadContext
1548 directly.
1549 (win32_prepare_to_resume): New function.
1550 (win32_require_context): New function, factored out from ...
1551 (thread_rec): ... this.
1552 (continue_one_thread): Call win32_prepare_to_resume on each thread
1553 we're about to continue.
1554 (win32_resume): Call win32_prepare_to_resume on the event thread.
1555 * win32-low.h (struct win32_thread_info)
1556 <debug_registers_changed>: New field.
1557 (struct win32_target_ops): Change prototype of set_thread_context,
1558 delete set_thread_context and add prepare_to_resume.
1559 (win32_require_context): New declaration.
1560
1561 2014-10-08 Gary Benson <gbenson@redhat.com>
1562
1563 * server.h: Do not include common-exceptions.h.
1564
1565 2014-10-08 Gary Benson <gbenson@redhat.com>
1566
1567 * server.h: Do not include cleanups.h.
1568
1569 2014-09-30 James Hogan <james.hogan@imgtec.com>
1570
1571 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1572 mips64-dsp-linux.c.
1573
1574 2014-09-23 Yao Qi <yao@codesourcery.com>
1575
1576 * linux-low.c (lp_status_maybe_breakpoint): New function.
1577 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1578 (count_events_callback): Likewise.
1579 (select_event_lwp_callback): Likewise.
1580 (cancel_breakpoints_callback): Likewise.
1581
1582 2014-09-19 Don Breazeal <donb@codesourcery.com>
1583
1584 * linux-low.c (handle_extended_wait): Call
1585 linux_ptrace_get_extended_event.
1586 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1587 linux_is_extended_waitstatus.
1588
1589 2014-09-16 Joel Brobecker <brobecker@adacore.com>
1590
1591 * Makefile.in (CPPFLAGS): Define.
1592 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1593 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1594
1595 2014-09-16 Gary Benson <gbenson@redhat.com>
1596
1597 * inferiors.h (current_inferior): Renamed as...
1598 (current_thread): New variable. All uses updated.
1599 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1600 (maybe_move_out_of_jump_pad): Likewise.
1601 (cancel_breakpoint): Likewise.
1602 (linux_low_filter_event): Likewise.
1603 (wait_for_sigstop): Likewise.
1604 (linux_resume_one_lwp): Likewise.
1605 (need_step_over_p): Likewise.
1606 (start_step_over): Likewise.
1607 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1608 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1609 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1610 and save_inferior as saved_thread.
1611 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1612 saved_thread.
1613 (regcache_invalidate_thread): Likewise.
1614 * remote-utils.c (prepare_resume_reply): Likewise.
1615 * thread-db.c (thread_db_get_tls_address): Likewise.
1616 (disable_thread_event_reporting): Likewise.
1617 (remove_thread_event_breakpoints): Likewise.
1618 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1619 as saved_thread.
1620 * target.h (set_desired_inferior): Renamed as...
1621 (set_desired_thread): New declaration. All uses updated.
1622 * server.c (myresume): Updated comment to reference thread instead
1623 of inferior.
1624 (handle_serial_event): Likewise.
1625 (handle_target_event): Likewise.
1626
1627 2014-09-12 Tom Tromey <tromey@redhat.com>
1628 Gary Benson <gbenson@redhat.com>
1629
1630 * regcache.h: Include common-regcache.h.
1631 (regcache_read_pc): Don't declare.
1632 * regcache.c (get_thread_regcache_for_ptid): New function.
1633
1634 2014-09-11 Tom Tromey <tromey@redhat.com>
1635 Gary Benson <gbenson@redhat.com>
1636
1637 * symbol.c: New file.
1638 * Makefile.in (SFILES): Add symbol.c.
1639 (OBS): Add symbol.o.
1640
1641 2014-09-11 Gary Benson <gbenson@redhat.com>
1642
1643 * target.c (target_stop_ptid, target_continue_ptid): New
1644 functions.
1645
1646 2014-09-11 Tom Tromey <tromey@redhat.com>
1647 Gary Benson <gbenson@redhat.com>
1648
1649 * target.h: Include target/target.h.
1650 * target.c (target_read_memory, target_read_uint32)
1651 (target_write_memory): New functions.
1652
1653 2014-09-11 Gary Benson <gbenson@redhat.com>
1654
1655 * server.h (debug_hw_points): Don't declare.
1656 * server.c (debug_hw_points): Don't define. Replace all uses
1657 with show_debug_regs.
1658 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1659 all uses with show_debug_regs.
1660
1661 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1662
1663 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1664 endianness into account.
1665 (ppc_supply_ptrace_register): Likewise.
1666
1667 2014-09-03 James Hogan <james.hogan@imgtec.com>
1668
1669 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1670 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1671
1672 2014-09-03 Gary Benson <gbenson@redhat.com>
1673
1674 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1675 ALL_DEBUG_ADDRESS_REGISTERS.
1676
1677 2014-09-02 Gary Benson <gbenson@redhat.com>
1678
1679 * i386-low.h: Renamed as...
1680 * x86-low.h: New file. All type, function and variable name
1681 prefixes changed from "i386_" to "x86_". All references updated.
1682 * i386-low.c: Renamed as...
1683 * x86-low.c: New file. All type, function and variable name
1684 prefixes changed from "i386_" to "x86_". All references updated.
1685
1686 2014-09-02 Gary Benson <gbenson@redhat.com>
1687
1688 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1689 (x86_linux_new_thread): Likewise.
1690
1691 2014-08-29 Gary Benson <gbenson@redhat.com>
1692
1693 * server.h (setjmp.h): Do not include.
1694 (toplevel): Do not declare.
1695 (common-exceptions.h): Include.
1696 (cleanups.h): Likewise.
1697 * server.c (toplevel): Do not define.
1698 (exit_code): New static global.
1699 (detach_or_kill_for_exit_cleanup): New function.
1700 (main): New function. Original main renamed to...
1701 (captured_main): New function.
1702 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1703
1704 2014-08-29 Gary Benson <gbenson@redhat.com>
1705
1706 * Makefile.in (SFILES): Add common/common-exceptions.c.
1707 (OBS): Add common-exceptions.o.
1708 (common-exceptions.o): New rule.
1709 * utils.c (prepare_to_throw_exception): New function.
1710
1711 2014-08-29 Gary Benson <gbenson@redhat.com>
1712
1713 * config.in: Regenerate.
1714 * configure: Likewise.
1715
1716 2014-08-29 Gary Benson <gbenson@redhat.com>
1717
1718 * Makefile.in (SFILES): Add common/cleanups.c.
1719 (OBS): cleanups.o.
1720 (cleanups.o): New rule.
1721
1722 2014-08-29 Gary Benson <gbenson@redhat.com>
1723
1724 * utils.c (internal_vwarning): New function.
1725
1726 2014-08-28 Gary Benson <gbenson@redhat.com>
1727
1728 * utils.h (fatal): Remove declaration.
1729 * utils.c (fatal): Remove function.
1730
1731 2014-08-28 Gary Benson <gbenson@redhat.com>
1732
1733 * tracepoint.c (gdb_agent_init): Replace fatal with
1734 perror_with_name.
1735 (initialize_tracepoint): Likewise.
1736
1737 2014-08-28 Gary Benson <gbenson@redhat.com>
1738
1739 * remote-utils.c (remote_prepare): Replace fatal with error.
1740
1741 2014-08-28 Gary Benson <gbenson@redhat.com>
1742
1743 * linux-low.c (linux_async): Replace fatal with warning.
1744 Tidy up and return.
1745 (linux_start_non_stop): Return -1 if linux_async failed.
1746
1747 2014-08-28 Gary Benson <gbenson@redhat.com>
1748
1749 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1750 gdb_assert.
1751 (i386_dr_low_get_addr): Remove vague comment.
1752 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1753 gdb_assert.
1754
1755 2014-08-28 Gary Benson <gbenson@redhat.com>
1756
1757 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1758 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1759 internal_error.
1760 (linux_resume_one_lwp): Likewise.
1761 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1762 gdb_assert.
1763 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1764 with internal_error.
1765 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1766 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1767 (find_register_by_name): Replace fatal with internal_error.
1768 (find_regno): Likewise.
1769 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1770 * thread-db.c (thread_db_create_event): Likewise.
1771 (thread_db_load_search): Likewise.
1772 (try_thread_db_load_1): Likewise.
1773 * tracepoint.c (get_jump_space_head): Replace fatal with
1774 internal_error.
1775 (claim_trampoline_space): Likewise.
1776 (have_fast_tracepoint_trampoline_buffer): Likewise.
1777 (cmd_qtstart): Likewise.
1778 (stop_tracing): Likewise.
1779 (fast_tracepoint_collecting): Likewise.
1780 (target_malloc): Likewise.
1781 (download_tracepoint): Likewise.
1782 (download_trace_state_variables): Replace check with gdb_assert.
1783 (upload_fast_traceframes): Replace fatal with internal_error.
1784
1785 2014-08-19 Tom Tromey <tromey@redhat.com>
1786 Gary Benson <gbenson@redhat.com>
1787
1788 * Makefile.in (SFILES): Add common/common-debug.c.
1789 (OBS): Add common-debug.o.
1790 (common-debug.o): New rule.
1791 * debug.h (debug_printf): Don't declare.
1792 * debug.c (debug_printf): Renamed and rewritten as...
1793 (debug_vprintf): New function.
1794
1795 2014-08-19 Gary Benson <gbenson@redhat.com>
1796
1797 * utils.h: Do not include print-utils.h.
1798
1799 2014-08-19 Tom Tromey <tromey@redhat.com>
1800 Gary Benson <gbenson@redhat.com>
1801
1802 * server.h: Add static assertion.
1803 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1804
1805 2014-08-19 Tom Tromey <tromey@redhat.com>
1806 Gary Benson <gbenson@redhat.com>
1807
1808 * Makefile.in (SFILES): Add common/errors.c.
1809 (OBS): Add errors.o.
1810 (IPA_OBS): Add errors-ipa.o.
1811 (errors.o): New rule.
1812 (errors-ipa.o): Likewise.
1813 * utils.h (perror_with_name, error, warning): Don't declare.
1814 * utils.c (warning): Renamed and rewritten as...
1815 (vwarning): New function.
1816 (error): Renamed and rewritten as...
1817 (verror): New function.
1818 (internal_error): Renamed and rewritten as...
1819 (internal_verror): New function.
1820
1821 2014-08-07 Gary Benson <gbenson@redhat.com>
1822
1823 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1824 * configure: Regenerate.
1825 * config.in: Likewise.
1826 * server.h: Do not include errno.h.
1827 * event-loop.c: Likewise.
1828 * hostio-errno.c: Likewise.
1829 * linux-low.c: Likewise.
1830 * remote-utils.c: Likewise.
1831 * spu-low.c: Likewise.
1832 * utils.c: Likewise.
1833 * gdbreplay.c: Unconditionally include errno.h.
1834
1835 2014-08-07 Gary Benson <gbenson@redhat.com>
1836
1837 * server.h: Do not include string.h.
1838 * event-loop.c: Likewise.
1839 * linux-low.c: Likewise.
1840 * regcache.c: Likewise.
1841 * remote-utils.c: Likewise.
1842 * spu-low.c: Likewise.
1843 * utils.c: Likewise.
1844
1845 2014-08-07 Gary Benson <gbenson@redhat.com>
1846
1847 * server.h: Do not include gdb_assert.h.
1848
1849 2014-08-07 Gary Benson <gbenson@redhat.com>
1850
1851 * server.h: Do not include common-utils.h.
1852
1853 2014-08-07 Gary Benson <gbenson@redhat.com>
1854
1855 * server.h: Do not include ptid.h.
1856 * notif.h: Likewise.
1857
1858 2014-08-07 Gary Benson <gbenson@redhat.com>
1859
1860 * server.h: Do not include gdb_locale.h.
1861
1862 2014-08-07 Gary Benson <gbenson@redhat.com>
1863
1864 * server.h: Do not include gdb/signals.h.
1865 * win32-low.c: Likewise.
1866
1867 2014-08-07 Gary Benson <gbenson@redhat.com>
1868
1869 * server.h: Do not include pathmax.h.
1870
1871 2014-08-07 Gary Benson <gbenson@redhat.com>
1872
1873 * server.h: Do not include libiberty.h.
1874 * linux-bfin-low.c: Likewise.
1875
1876 2014-08-07 Gary Benson <gbenson@redhat.com>
1877
1878 * server.h: Do not include ansidecl.h.
1879
1880 2014-08-07 Gary Benson <gbenson@redhat.com>
1881
1882 * linux-x86-low.c: Do not include stddef.h.
1883 * lynx-ppc-low.c: Likewise.
1884 * tracepoint.c: Likewise.
1885
1886 2014-08-07 Gary Benson <gbenson@redhat.com>
1887
1888 * server.h: Do not include stdarg.h.
1889 * nto-low.c: Likewise.
1890
1891 2014-08-07 Gary Benson <gbenson@redhat.com>
1892
1893 * server.h: Do not include stdlib.h.
1894 * inferiors.c: Likewise.
1895 * linux-low.c: Likewise.
1896 * regcache.c: Likewise.
1897 * spu-low.c: Likewise.
1898 * tracepoint.c: Likewise.
1899 * utils.c: Likewise.
1900
1901 2014-08-07 Gary Benson <gbenson@redhat.com>
1902
1903 * server.h: Do not include stdio.h.
1904 * linux-low.c: Likewise.
1905 * remote-utils.c: Likewise.
1906 * spu-low.c: Likewise.
1907 * utils.c: Likewise.
1908 * wincecompat.c: Likewise.
1909
1910 2014-08-06 Gary Benson <gbenson@redhat.com>
1911
1912 * regcache.c (init_register_cache): Move conditionals inside if.
1913
1914 2014-08-06 Gary Benson <gbenson@redhat.com>
1915
1916 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1917
1918 2014-07-31 Gary Benson <gbenson@redhat.com>
1919
1920 * ax.h: Do not include server.h.
1921 * gdbthread.h: Likewise.
1922 * lynx-low.h: Likewise.
1923 * notif.h: Likewise.
1924
1925 2014-07-30 Gary Benson <gbenson@redhat.com>
1926
1927 * server.h: Include common-defs.h.
1928 Do not include config.h or build-gnulib-gdbserver/config.h.
1929
1930 2014-07-30 Gary Benson <gbenson@redhat.com>
1931
1932 * hostio-errno.c: Move server.h to top of includes list.
1933 * inferiors.c: Likewise.
1934 * linux-x86-low.c: Likewise.
1935 * notif.c: Include server.h.
1936
1937 2014-07-24 Tom Tromey <tromey@redhat.com>
1938 Gary Benson <gbenson@redhat.com>
1939
1940 * server.h (CORE_ADDR): Now unsigned.
1941
1942 2014-07-16 Pedro Alves <palves@redhat.com>
1943
1944 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1945
1946 2014-07-15 Pedro Alves <palves@redhat.com>
1947
1948 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1949 copy.
1950
1951 2014-07-11 Pedro Alves <palves@redhat.com>
1952
1953 * linux-low.c (kill_wait_lwp): New function, based on
1954 kill_one_lwp_callback, but use my_waitpid directly.
1955 (kill_one_lwp_callback, linux_kill): Use it.
1956
1957 2014-06-23 Pedro Alves <palves@redhat.com>
1958
1959 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1960 before setting DR0..DR3.
1961
1962 2014-06-20 Gary Benson <gbenson@redhat.com>
1963
1964 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1965 * configure: Regenerated.
1966 * config.in: Likewise.
1967
1968 2014-06-20 Gary Benson <gbenson@redhat.com>
1969
1970 * Makefile.in (SFILES): Update locations for files moved
1971 from common to nat.
1972 (object file files): Reordered.
1973
1974 2014-06-20 Gary Benson <gbenson@redhat.com>
1975
1976 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1977 (i386_dr_low_set_addr): Likewise.
1978 (i386_dr_low_get_addr): Likewise.
1979 (i386_dr_low_can_set_control): Likewise.
1980 (i386_dr_low_set_control): Likewise.
1981 (i386_dr_low_get_control): Likewise.
1982 (i386_dr_low_get_status): Likewise.
1983 (i386_get_debug_register_length): Likewise.
1984 * linux-x86-low.c (i386_dr_low_set_addr):
1985 Changed signature. Made static.
1986 (i386_dr_low_get_addr): Likewise.
1987 (i386_dr_low_set_control): Likewise.
1988 (i386_dr_low_get_control): Likewise.
1989 (i386_dr_low_get_status): Likewise.
1990 (i386_dr_low): New global variable.
1991 * win32-i386-low.c (i386_dr_low_set_addr):
1992 Changed signature. Made static.
1993 (i386_dr_low_get_addr): Likewise.
1994 (i386_dr_low_set_control): Likewise.
1995 (i386_dr_low_get_control): Likewise.
1996 (i386_dr_low_get_status): Likewise.
1997 (i386_dr_low): New global variable.
1998
1999 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2000
2001 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2002 * Makefile.in (AR, AR_FLAGS): Define.
2003 * configure: Regenerate.
2004
2005 2014-06-19 Gary Benson <gbenson@redhat.com>
2006
2007 * Makefile.in (i386-dregs.o): New rule.
2008 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2009 * i386-low.c (target.h): Remove include.
2010 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2011 (DR_CONTROL_SHIFT): Likewise.
2012 (DR_CONTROL_SIZE): Likewise.
2013 (DR_RW_EXECUTE): Likewise.
2014 (DR_RW_WRITE): Likewise.
2015 (DR_RW_READ): Likewise.
2016 (DR_RW_IORW): Likewise.
2017 (DR_LEN_1): Likewise.
2018 (DR_LEN_2): Likewise.
2019 (DR_LEN_4): Likewise.
2020 (DR_LEN_8): Likewise.
2021 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2022 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2023 (DR_ENABLE_SIZE): Likewise.
2024 (DR_LOCAL_SLOWDOWN): Likewise.
2025 (DR_GLOBAL_SLOWDOWN): Likewise.
2026 (DR_CONTROL_RESERVED): Likewise.
2027 (I386_DR_CONTROL_MASK): Likewise.
2028 (I386_DR_VACANT): Likewise.
2029 (I386_DR_LOCAL_ENABLE): Likewise.
2030 (I386_DR_GLOBAL_ENABLE): Likewise.
2031 (I386_DR_DISABLE): Likewise.
2032 (I386_DR_SET_RW_LEN): Likewise.
2033 (I386_DR_GET_RW_LEN): Likewise.
2034 (I386_DR_WATCH_HIT): Likewise.
2035 (i386_wp_op_t): Likewise.
2036 (i386_show_dr): Likewise.
2037 (i386_length_and_rw_bits): Likewise.
2038 (i386_insert_aligned_watchpoint): Likewise.
2039 (i386_remove_aligned_watchpoint): Likewise.
2040 (i386_handle_nonaligned_watchpoint): Likewise.
2041 i386_update_inferior_debug_regs(): Likewise.
2042 (i386_dr_insert_watchpoint): Likewise.
2043 (i386_dr_remove_watchpoint): Likewise.
2044 (i386_dr_region_ok_for_watchpoint): Likewise.
2045 (i386_dr_stopped_data_address): Likewise.
2046 (i386_dr_stopped_by_watchpoint): Likewise.
2047
2048 2014-06-19 Gary Benson <gbenson@redhat.com>
2049
2050 * i386-low.c (i386_dr_show): Renamed to
2051 i386_show_dr and made static. All uses updated.
2052 (i386_dr_length_and_rw_bits): Renamed to
2053 i386_length_and_rw_bits and made static.
2054 All uses updated.
2055 (i386_dr_insert_aligned_watchpoint): Renamed to
2056 i386_insert_aligned_watchpoint and made static.
2057 All uses updated.
2058 (i386_dr_remove_aligned_watchpoint): Renamed to
2059 i386_remove_aligned_watchpoint and made static.
2060 All uses updated.
2061 (i386_dr_update_inferior_debug_regs): Renamed to
2062 i386_update_inferior_debug_regs and made static.
2063 All uses updated.
2064
2065 2014-06-18 Gary Benson <gbenson@redhat.com>
2066
2067 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2068 (i386_dr_low_can_set_control): Likewise.
2069 (i386_get_debug_register_length): Likewise.
2070 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2071 (i386_dr_low_can_set_control): Likewise.
2072 (i386_get_debug_register_length): Likewise.
2073
2074 2014-06-17 Gary Benson <gbenson@redhat.com>
2075
2076 * i386-low.h (i386-dregs.h): New include.
2077 (DR_FIRSTADDR): Now in i386-dregs.h.
2078 (DR_LASTADDR): Likewise.
2079 (DR_NADDR): Likewise.
2080 (DR_STATUS): Likewise.
2081 (DR_CONTROL): Likewise.
2082 (i386_debug_reg_state): Likewise.
2083 (i386_dr_insert_watchpoint): Likewise.
2084 (i386_dr_remove_watchpoint): Likewise.
2085 (i386_dr_region_ok_for_watchpoint): Likewise.
2086 (i386_dr_stopped_data_address): Likewise.
2087 (i386_dr_stopped_by_watchpoint): Likewise.
2088 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2089
2090 2014-06-18 Gary Benson <gbenson@redhat.com>
2091
2092 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2093 i386_dr_insert_watchpoint.
2094 (i386_low_remove_watchpoint): Renamed to
2095 i386_dr_remove_watchpoint.
2096 (i386_low_region_ok_for_watchpoint): Renamed to
2097 i386_dr_region_ok_for_watchpoint.
2098 (i386_low_stopped_data_address): Renamed to
2099 i386_dr_stopped_data_address.
2100 (i386_low_stopped_by_watchpoint): Renamed to
2101 i386_dr_stopped_by_watchpoint.
2102 * i386-low.c (i386_show_dr): Renamed to
2103 i386_dr_show and made nonstatic. All uses updated.
2104 (i386_length_and_rw_bits): Renamed to
2105 i386_dr_length_and_rw_bits and made nonstatic.
2106 All uses updated.
2107 (i386_insert_aligned_watchpoint): Renamed to
2108 i386_dr_insert_aligned_watchpoint and made nonstatic.
2109 All uses updated.
2110 (i386_remove_aligned_watchpoint): Renamed to
2111 i386_dr_remove_aligned_watchpoint and made nonstatic.
2112 All uses updated.
2113 (i386_update_inferior_debug_regs): Renamed to
2114 i386_dr_update_inferior_debug_regs and made nonstatic.
2115 All uses updated.
2116 (i386_low_insert_watchpoint): Renamed to
2117 i386_dr_insert_watchpoint. All uses updated.
2118 (i386_low_remove_watchpoint): Renamed to
2119 i386_dr_remove_watchpoint. All uses updated.
2120 (i386_low_region_ok_for_watchpoint): Renamed to
2121 i386_dr_region_ok_for_watchpoint. All uses updated.
2122 (i386_low_stopped_data_address): Renamed to
2123 i386_dr_stopped_data_address. All uses updated.
2124 (i386_low_stopped_by_watchpoint): Renamed to
2125 i386_dr_stopped_by_watchpoint. All uses updated.
2126
2127 2014-06-18 Gary Benson <gbenson@redhat.com>
2128
2129 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2130 (i386_dr_low_can_set_control): Likewise.
2131 (i386_insert_aligned_watchpoint): New check.
2132
2133 2014-06-18 Gary Benson <gbenson@redhat.com>
2134
2135 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2136 Renamed to state.
2137
2138 2014-06-18 Gary Benson <gbenson@redhat.com>
2139
2140 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2141 instead of fatal and error.
2142 (i386_handle_nonaligned_watchpoint): Likewise.
2143
2144 2014-06-18 Gary Benson <gbenson@redhat.com>
2145
2146 * i386-low.c (i386_get_debug_register_length): New macro.
2147 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2148 (i386_show_dr): Use debug_printf instead of fprintf. Use
2149 phex to format values.
2150
2151 2014-06-18 Gary Benson <gbenson@redhat.com>
2152
2153 * i386-low.h: Comment changes.
2154 * i386-low.c: Likewise.
2155
2156 2014-06-18 Gary Benson <gbenson@redhat.com>
2157
2158 * i386-low.c: Whitespace changes.
2159
2160 2014-06-12 Tom Tromey <tromey@redhat.com>
2161
2162 * utils.c (freeargv): Remove.
2163
2164 2014-06-12 Tom Tromey <tromey@redhat.com>
2165
2166 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2167 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2168 (parse_debug_format_options): Likewise.
2169 (gdbserver_usage): Likewise.
2170 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2171 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2172 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2173 against libiberty.
2174 ($(LIBGNU)): Depend on libiberty.
2175 (all-lib): Recurse into all subdirs.
2176 (install-only): Invoke "install" target in subdirs.
2177 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2178 targets.
2179 * configure: Rebuild.
2180 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2181 for vasprintf, vsnprintf, or gettimeofday.
2182 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2183 srv_tgtobj.
2184
2185 2014-06-05 Joel Brobecker <brobecker@adacore.com>
2186
2187 * development.sh: Delete.
2188 * Makefile.in (config.status): Adjust dependency on development.sh.
2189 * configure.ac: Adjust development.sh source call.
2190 * configure: Regenerate.
2191
2192 2014-06-02 Pedro Alves <palves@redhat.com>
2193
2194 * ax.c (gdb_free_agent_expr): New function.
2195 * ax.h (gdb_free_agent_expr): New declaration.
2196 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2197 list.
2198 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2199 static.
2200 (clear_breakpoint_conditions_and_commands): New function.
2201 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2202 (clear_breakpoint_conditions_and_commands): New declaration.
2203
2204 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2205
2206 * linux-aarch64-low.c (asm/ptrace.h): Include.
2207
2208 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2209
2210 Fix TLS access for -static -pthread.
2211 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2212 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2213 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2214
2215 2014-05-20 Pedro Alves <palves@redhat.com>
2216
2217 * linux-aarch64-low.c (aarch64_insert_point)
2218 (aarch64_remove_point): No longer check whether the type is
2219 supported here. Adjust to new interface.
2220 (the_low_target): Install aarch64_supports_z_point_type as
2221 supports_z_point_type method.
2222 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2223 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2224 instead of a Z packet char. Adjust.
2225 (arm_supports_z_point_type): New function.
2226 (arm_insert_point, arm_remove_point): Adjust to new interface.
2227 (the_low_target): Install arm_supports_z_point_type.
2228 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2229 (cris_insert_point, cris_remove_point): Adjust to new interface.
2230 Don't check whether the type is supported here.
2231 (the_low_target): Install cris_supports_z_point_type.
2232 * linux-low.c (linux_supports_z_point_type): New function.
2233 (linux_insert_point, linux_remove_point): Adjust to new interface.
2234 * linux-low.h (struct linux_target_ops) <insert_point,
2235 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2236 raw_breakpoint pointer parameter.
2237 <supports_z_point_type>: New method.
2238 * linux-mips-low.c (mips_supports_z_point_type): New function.
2239 (mips_insert_point, mips_remove_point): Adjust to new interface.
2240 Use mips_supports_z_point_type.
2241 (the_low_target): Install mips_supports_z_point_type.
2242 * linux-ppc-low.c (the_low_target): Install NULL as
2243 supports_z_point_type method.
2244 * linux-s390-low.c (the_low_target): Install NULL as
2245 supports_z_point_type method.
2246 * linux-sparc-low.c (the_low_target): Install NULL as
2247 supports_z_point_type method.
2248 * linux-x86-low.c (x86_supports_z_point_type): New function.
2249 (x86_insert_point): Adjust to new insert_point interface. Use
2250 insert_memory_breakpoint. Adjust to new
2251 i386_low_insert_watchpoint interface.
2252 (x86_remove_point): Adjust to remove_point interface. Use
2253 remove_memory_breakpoint. Adjust to new
2254 i386_low_remove_watchpoint interface.
2255 (the_low_target): Install x86_supports_z_point_type.
2256 * lynx-low.c (lynx_target_ops): Install NULL as
2257 supports_z_point_type callback.
2258 * nto-low.c (nto_supports_z_point_type): New.
2259 (nto_insert_point, nto_remove_point): Adjust to new interface.
2260 (nto_target_ops): Install nto_supports_z_point_type.
2261 * mem-break.c: Adjust intro comment.
2262 (struct raw_breakpoint) <raw_type, size>: New fields.
2263 <inserted>: Update comment.
2264 <shlib_disabled>: Delete field.
2265 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2266 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2267 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2268 (raw_bkpt_type_to_target_hw_bp_type): New function.
2269 (find_enabled_raw_code_breakpoint_at): New function.
2270 (find_raw_breakpoint_at): New type and size parameters. Use them.
2271 (insert_memory_breakpoint): New function, based off
2272 set_raw_breakpoint_at.
2273 (remove_memory_breakpoint): New function.
2274 (set_raw_breakpoint_at): Reimplement.
2275 (set_breakpoint): New, based on set_breakpoint_at.
2276 (set_breakpoint_at): Reimplement.
2277 (delete_raw_breakpoint): Go through the_target->remove_point
2278 instead of assuming memory breakpoints.
2279 (find_gdb_breakpoint_at): Delete.
2280 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2281 (find_gdb_breakpoint): New function.
2282 (set_gdb_breakpoint_at): Delete.
2283 (z_type_supported): New function.
2284 (set_gdb_breakpoint_1): New function, loosely based off
2285 set_gdb_breakpoint_at.
2286 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2287 (delete_gdb_breakpoint_at): Delete.
2288 (delete_gdb_breakpoint_1): New function, loosely based off
2289 delete_gdb_breakpoint_at.
2290 (delete_gdb_breakpoint): New function.
2291 (clear_gdb_breakpoint_conditions): Rename to ...
2292 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2293 breakpoint.
2294 (add_condition_to_breakpoint): Make static.
2295 (add_breakpoint_condition): Take a struct breakpoint pointer
2296 instead of an address. Adjust.
2297 (gdb_condition_true_at_breakpoint): Rename to ...
2298 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2299 z_type parameter.
2300 (gdb_condition_true_at_breakpoint): Reimplement.
2301 (add_breakpoint_commands): Take a struct breakpoint pointer
2302 instead of an address. Adjust.
2303 (gdb_no_commands_at_breakpoint): Rename to ...
2304 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2305 parameter. Return true if no breakpoint was found. Change debug
2306 output.
2307 (gdb_no_commands_at_breakpoint): Reimplement.
2308 (run_breakpoint_commands): Rename to ...
2309 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2310 and change return type to boolean.
2311 (run_breakpoint_commands): New function.
2312 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2313 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2314 breakpoint. Go through the_target->remove_point instead of
2315 assuming memory breakpoint.
2316 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2317 software and hardware breakpoints.
2318 (reinsert_raw_breakpoint): Go through the_target->insert_point
2319 instead of assuming memory breakpoint.
2320 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2321 software and hardware breakpoints.
2322 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2323 Check both software and hardware breakpoints.
2324 (validate_inserted_breakpoint): Assert the breakpoint is a
2325 software breakpoint. Set the inserted flag to -1 instead of
2326 setting shlib_disabled.
2327 (delete_disabled_breakpoints): Adjust.
2328 (validate_breakpoints): Only validate software breakpoints.
2329 Adjust to inserted flag change.
2330 (check_mem_read, check_mem_write): Skip breakpoint types other
2331 than software breakpoints. Adjust to inserted flag change.
2332 * mem-break.h (enum raw_bkpt_type): New enum.
2333 (raw_breakpoint, struct process_info): Forward declare.
2334 (Z_packet_to_target_hw_bp_type): Delete declaration.
2335 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2336 (set_gdb_breakpoint, delete_gdb_breakpoint)
2337 (clear_breakpoint_conditions): New declarations.
2338 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2339 (breakpoint_inserted_here): Update comment.
2340 (add_breakpoint_condition, add_breakpoint_commands): Replace
2341 address parameter with a breakpoint pointer parameter.
2342 (gdb_breakpoint_here): Update comment.
2343 (delete_gdb_breakpoint_at): Delete.
2344 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2345 * server.c (process_point_options): Take a struct breakpoint
2346 pointer instead of an address. Adjust.
2347 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2348 delete_gdb_breakpoint.
2349 * spu-low.c (spu_target_ops): Install NULL as
2350 supports_z_point_type method.
2351 * target.h: Include mem-break.h.
2352 (struct target_ops) <prepare_to_access_memory>: Update comment.
2353 <supports_z_point_type>: New field.
2354 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2355 instead of a char. Also take a raw breakpoint pointer.
2356 * win32-arm-low.c (the_low_target): Install NULL as
2357 supports_z_point_type.
2358 * win32-i386-low.c (i386_supports_z_point_type): New function.
2359 (i386_insert_point, i386_remove_point): Adjust to new interface.
2360 (the_low_target): Install i386_supports_z_point_type.
2361 * win32-low.c (win32_supports_z_point_type): New function.
2362 (win32_insert_point, win32_remove_point): Adjust to new interface.
2363 (win32_target_ops): Install win32_supports_z_point_type.
2364 * win32-low.h (struct win32_target_ops):
2365 <supports_z_point_type>: New method.
2366 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2367 instead of a char. Also take a raw breakpoint pointer.
2368
2369 2014-05-20 Pedro Alves <palves@redhat.com>
2370
2371 * mem-break.h: Include break-common.h.
2372 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2373 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2374 (Z_packet_to_target_hw_bp_type): New declaration.
2375 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2376 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2377 (Z_PACKET_ACCESS_WP): Delete macros.
2378 (Z_packet_to_hw_type): Delete function.
2379 * i386-low.h: Don't include break-common.h here.
2380 (Z_packet_to_hw_type): Delete declaration.
2381 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2382 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2383 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2384 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2385 * linux-aarch64-low.c: Don't include break-common.h here.
2386 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2387 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2388 (Z_packet_to_target_hw_bp_type): Delete function.
2389 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2390 function.
2391 (mips_insert_point, mips_remove_point): Use
2392 Z_packet_to_target_hw_bp_type.
2393
2394 2014-05-20 Pedro Alves <palves@redhat.com>
2395
2396 * linux-aarch64-low.c: Include break-common.h.
2397 (enum target_point_type): Delete.
2398 (Z_packet_to_point_type): Rename to ...
2399 (Z_packet_to_target_hw_bp_type): ... this, and return a
2400 target_hw_bp_type instead.
2401 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2402 instead of an enum target_point_type.
2403 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2404 breakpoint type.
2405 (aarch64_dr_state_insert_one_point)
2406 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2407 (aarch64_handle_aligned_watchpoint)
2408 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2409 Take an enum target_hw_bp_type instead of an enum
2410 target_point_type.
2411 (aarch64_supports_z_point_type): New function.
2412 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2413 use Z_packet_to_target_hw_bp_type.
2414
2415 2014-05-20 Joel Brobecker <brobecker@adacore.com>
2416
2417 * configure.ac: Only use -Werror by default when DEVELOPMENT
2418 is true.
2419 * configure: Regenerate.
2420
2421 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2422
2423 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2424 * linux-x86-low.c (X86_64_USER_REGS): New.
2425 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2426
2427 2014-04-28 Yao Qi <yao@codesourcery.com>
2428
2429 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2430 name.
2431
2432 2014-04-25 Pedro Alves <palves@redhat.com>
2433
2434 PR server/16255
2435 * linux-low.c (linux_attach_fail_reason_string): New function.
2436 (linux_attach_lwp): Delete.
2437 (linux_attach_lwp_1): Rename to ...
2438 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2439 argument. Remove "initial" parameter. Return int instead of
2440 void. Don't error or warn here.
2441 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2442 failure to attach to the tgid. Call warning when failing to
2443 attach to an lwp.
2444 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2445 argument. Remove "initial" parameter. Return int instead of
2446 void. Don't error or warn here.
2447 (linux_attach_fail_reason_string): New declaration.
2448 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2449 interface change. Use linux_attach_fail_reason_string.
2450
2451 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
2452 Walfred Tedeschi <walfred.tedeschi@intel.com>
2453
2454 * Makefile.in: Added rules to handle new files
2455 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2456 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2457 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2458 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2459 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2460 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2461 x32-avx512-linux.o.
2462 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2463 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2464 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2465 i386/x32-avx512.xml.
2466 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2467 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2468 i386/x32-avx512-linux.xml.
2469 * i387-fp.c (num_avx512_k_registers): New constant for number
2470 of K registers.
2471 (num_avx512_zmmh_low_registers): New constant for number of
2472 lower ZMM registers (0-15).
2473 (num_avx512_zmmh_high_registers): New constant for number of
2474 higher ZMM registers (16-31).
2475 (num_avx512_ymmh_registers): New contant for number of higher
2476 YMM registers (ymm16-31 added by avx521 on x86_64).
2477 (num_avx512_xmm_registers): New constant for number of higher
2478 XMM registers (xmm16-31 added by AVX512 on x86_64).
2479 (struct i387_xsave): Add space for AVX512 registers.
2480 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2481 Add code to handle AVX512 registers.
2482 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2483 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2484 prototypei from generated file.
2485 (tdesc_amd64_avx512_linux): Likewise.
2486 (init_registers_x32_avx512_linux): Likewise.
2487 (tdesc_x32_avx512_linux): Likewise.
2488 (init_registers_i386_avx512_linux): Likewise.
2489 (tdesc_i386_avx512_linux): Likewise.
2490 (x86_64_regmap): Add AVX512 registers.
2491 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2492 mask.
2493 (initialize_low_arch): Add code to initialize AVX512 registers.
2494
2495 2014-04-23 Pedro Alves <palves@redhat.com>
2496
2497 * mem-break.c (find_gdb_breakpoint_at): Make static.
2498 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2499
2500 2014-04-23 Pedro Alves <palves@redhat.com>
2501
2502 * i386-low.c: Don't include break-common.h here.
2503 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2504 prototype to take target_hw_bp_type as argument instead of a Z
2505 packet char.
2506 * i386-low.h: Include break-common.h here.
2507 (Z_packet_to_hw_type): Declare.
2508 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2509 prototypes.
2510 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2511 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2512 (x86_remove_point): Convert the packet number to a
2513 target_hw_bp_type before calling i386_low_remove_watchpoint.
2514 * win32-i386-low.c (i386_insert_point): Convert the packet number
2515 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2516 (i386_remove_point): Convert the packet number to a
2517 target_hw_bp_type before calling i386_low_remove_watchpoint.
2518
2519 2014-04-23 Pedro Alves <palves@redhat.com>
2520
2521 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2522
2523 2014-04-10 Pedro Alves <palves@redhat.com>
2524
2525 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2526 Check if the condition or command is NULL before checking if the
2527 breakpoint is known. On success, return true.
2528 * mem-break.h (add_breakpoint_condition): Document return.
2529 (add_breakpoint_commands): Add describing comment.
2530 * server.c (skip_to_semicolon): New function.
2531 (process_point_options): Use it.
2532
2533 2014-04-09 Pedro Alves <palves@redhat.com>
2534
2535 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2536 to lwpid_of.
2537
2538 2014-02-27 Pedro Alves <palves@redhat.com>
2539
2540 PR 12702
2541 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2542 macros.
2543 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2544 output.
2545 (last_thread_of_process_p): Take a PID argument instead of a
2546 thread pointer.
2547 (linux_wait_for_lwp): Delete.
2548 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2549 functions.
2550 (linux_low_filter_event): New function, party factored out from
2551 linux_wait_for_event.
2552 (linux_wait_for_event): Rename to ...
2553 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2554 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2555 sigsuspend. Check for zombie leaders.
2556 (linux_wait_for_event): Reimplement as wrapper around
2557 linux_wait_for_event_filtered.
2558 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2559 a normal or signal exit is seen, it's the whole process exiting.
2560 (wait_for_sigstop): No longer a for_each_inferior callback.
2561 Rewrite on top of linux_wait_for_event_filtered.
2562 (stop_all_lwps): Call wait_for_sigstop directly.
2563 * server.c (resume, handle_target_event): Handle
2564 TARGET_WAITKIND_NO_RESUMED.
2565
2566 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2567
2568 * win32-low.c (psapi_get_dll_name,
2569 * win32_CreateToolhelp32Snapshot): Delete.
2570 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2571 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2572 Delete.
2573 (handle_load_dll): Add function description.
2574 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2575
2576 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2577
2578 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2579 Add comment.
2580 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2581 base address when calling win32_add_one_solib.
2582 (handle_load_dll): Delete local variable load_addr.
2583 Remove 0x1000 offset applied to DLL base address when calling
2584 win32_add_one_solib.
2585 (handle_unload_dll): Add comment.
2586
2587 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2588
2589 * win32-low.c (win32_add_all_dlls): Renames
2590 win32_ensure_ntdll_loaded. Rewrite function documentation.
2591 Adjust implementation to always load all DLLs.
2592 Add 0x1000 offset to DLL base address when calling
2593 win32_add_one_solib.
2594 (child_initialization_done): New static global.
2595 (do_initial_child_stuff): Set child_initialization_done to
2596 zero during child initialization, and 1 after. Replace call
2597 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2598 Add comment.
2599 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2600 (handle_unload_dll): Add function documentation.
2601 (get_child_debug_event): Ignore load and unload DLL events
2602 during child initialization.
2603
2604 2014-02-20 Doug Evans <dje@google.com>
2605
2606 Remove global all_lwps.
2607 * inferiors.h (ptid_of): Move here from linux-low.h.
2608 (pid_of, lwpid_of): Ditto.
2609 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2610 parameter is a struct thread_info * now.
2611 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2612 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2613 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2614 directly.
2615 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2616 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2617 * linux-arm-low.c (update_registers_callback): Update, "entry"
2618 parameter is a struct thread_info * now.
2619 Fetch lwpid from current_inferior directly.
2620 (arm_insert_point): Pass &all_threads to find_inferior instead of
2621 &all_lwps.
2622 (arm_remove_point): Ditto.
2623 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2624 (arm_prepare_to_resume): Fetch pid from thread.
2625 (arm_read_description): Fetch lwpid from current_inferior directly.
2626 * linux-low.c (all_lwps): Delete.
2627 (delete_lwp): Delete call to remove_inferior.
2628 (handle_extended_wait): Fetch lwpid from thread.
2629 (add_lwp): Don't set lwp->entry.id. Remove call to
2630 add_inferior_to_list.
2631 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2632 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2633 (kill_one_lwp_callback): Ditto.
2634 (linux_kill): Don't dereference NULL pointer.
2635 Fetch ptid,lwpid from thread.
2636 (get_detach_signal): Fetch ptid from thread.
2637 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2638 Simplify call to regcache_invalidate_thread.
2639 (delete_lwp_callback): Update, "entry" parameter is a
2640 struct thread_info * now. Fetch pid from thread.
2641 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2642 (status_pending_p_callback): Update, "entry" parameter is a
2643 struct thread_info * now. Fetch ptid from thread.
2644 (find_lwp_pid): Update, "entry" parameter is a
2645 struct thread_info * now.
2646 (linux_wait_for_lwp): Fetch pid from thread.
2647 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2648 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2649 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2650 (dequeue_one_deferred_signal): Ditto.
2651 (cancel_breakpoint): Fetch ptid from current_inferior.
2652 (linux_wait_for_event): Pass &all_threads to find_inferior,
2653 not &all_lwps. Fetch ptid, lwpid from thread.
2654 (count_events_callback): Update, "entry" parameter is a
2655 struct thread_info * now.
2656 (select_singlestep_lwp_callback): Ditto.
2657 (select_event_lwp_callback): Ditto.
2658 (cancel_breakpoints_callback): Ditto.
2659 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2660 not &all_lwps.
2661 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2662 (unsuspend_one_lwp): Update, "entry" parameter is a
2663 struct thread_info * now.
2664 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2665 not &all_lwps.
2666 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2667 Fetch lwpid from thread, not lwp.
2668 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2669 Pass &all_threads to find_inferior, not &all_lwps.
2670 (send_sigstop): Fetch lwpid from thread, not lwp.
2671 (send_sigstop_callback): Update, "entry" parameter is a
2672 struct thread_info * now.
2673 (suspend_and_send_sigstop_callback): Ditto.
2674 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2675 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2676 struct thread_info * now.
2677 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2678 from thread, lwp.
2679 (lwp_running): Update, "entry" parameter is a
2680 struct thread_info * now.
2681 (stop_all_lwps): Fetch ptid from thread.
2682 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2683 (linux_resume_one_lwp): Fetch lwpid from thread.
2684 (linux_set_resume_request): Update, "entry" parameter is a
2685 struct thread_info * now. Fetch pid, lwpid from thread.
2686 (resume_status_pending_p): Update, "entry" parameter is a
2687 struct thread_info * now.
2688 (need_step_over_p): Ditto. Fetch lwpid from thread.
2689 (start_step_over): Fetch lwpid from thread.
2690 (linux_resume_one_thread): Update, "entry" parameter is a
2691 struct thread_info * now. Fetch lwpid from thread.
2692 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2693 (proceed_one_lwp): Update, "entry" parameter is a
2694 struct thread_info * now. Fetch lwpid from thread.
2695 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2696 struct thread_info * now.
2697 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2698 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2699 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2700 directly.
2701 (regsets_store_inferior_registers): Ditto.
2702 (fetch_register, store_register): Ditto.
2703 (linux_read_memory, linux_write_memory): Ditto.
2704 (linux_request_interrupt): Ditto.
2705 (linux_read_auxv): Ditto.
2706 (linux_xfer_siginfo): Ditto.
2707 (linux_qxfer_spu): Ditto.
2708 (linux_qxfer_libraries_svr4): Ditto.
2709 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2710 moved to inferiors.h.
2711 (get_lwp): Delete.
2712 (get_thread_lwp): Update.
2713 (struct lwp_info): Delete member "entry". Simplify comment for
2714 member "thread".
2715 (all_lwps): Delete.
2716 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2717 current_inferior directly.
2718 (update_watch_registers_callback): Update, "entry" parameter is a
2719 struct thread_info * now. Fetch pid from thread.
2720 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2721 (mips_insert_point): Fetch lwpid from current_inferior.
2722 Pass &all_threads to find_inferior, not &all_lwps.
2723 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2724 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2725 directly.
2726 (mips_stopped_data_address): Ditto.
2727 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2728 directly.
2729 * linux-tile-low.c (tile_arch_setup): Ditto.
2730 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2731 (update_debug_registers_callback): Update, "entry" parameter is a
2732 struct thread_info * now. Fetch pid from thread.
2733 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2734 Pass &all_threads to find_inferior, not &all_lwps.
2735 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2736 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2737 Pass &all_threads to find_inferior, not &all_lwps.
2738 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2739 (i386_dr_low_get_status): Ditto.
2740 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2741 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2742 (x86_linux_read_description): Ditto.
2743 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2744
2745 2014-02-20 Doug Evans <dje@google.com>
2746
2747 * inferiors.c (get_first_inferior): Fix buglet.
2748
2749 2014-02-19 Doug Evans <dje@google.com>
2750
2751 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2752 * inferiors.c (add_thread): Change result type to struct thread_info *.
2753 All callers updated.
2754 (add_lwp): Call add_thread here instead of in callers.
2755 All callers updated.
2756 * linux-low.h (get_lwp_thread): Rewrite.
2757 (struct lwp_info): New member "thread".
2758
2759 2014-02-19 Doug Evans <dje@google.com>
2760
2761 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2762 All callers updated.
2763
2764 2014-02-19 Doug Evans <dje@google.com>
2765
2766 * inferiors.c (add_thread): Fix whitespace.
2767
2768 2014-02-19 Doug Evans <dje@google.com>
2769
2770 * dll.c (clear_dlls): Replace accessing list implemention details
2771 with API function.
2772 * gdbthread.h (get_first_thread): Declare.
2773 * inferiors.c (for_each_inferior_with_data): New function.
2774 (get_first_thread): New function.
2775 (find_thread_ptid): Simplify.
2776 (get_first_inferior): New function.
2777 (clear_list): Delete.
2778 (one_inferior_p): New function.
2779 (clear_inferior_list): New function.
2780 (clear_inferiors): Update.
2781 * inferiors.h (for_each_inferior_with_data): Declare.
2782 (clear_inferior_list): Declare.
2783 (one_inferior_p): Declare.
2784 (get_first_inferior): Declare.
2785 * linux-low.c (linux_wait_for_event): Replace accessing list
2786 implemention details with API function.
2787 * server.c (target_running): Ditto.
2788 (accumulate_file_name_length): New function.
2789 (emit_dll_description): New function.
2790 (handle_qxfer_libraries): Replace accessing list implemention
2791 details with API function.
2792 (handle_qxfer_threads_worker): New function.
2793 (handle_qxfer_threads_proper): Replace accessing list implemention
2794 details with API function.
2795 (handle_query): Ditto.
2796 (visit_actioned_threads_callback_ftype): New typedef.
2797 (visit_actioned_threads_data): New struct.
2798 (visit_actioned_threads): Rewrite to be find_inferior callback.
2799 (resume): Call find_inferior.
2800 (handle_status): Replace accessing list implemention
2801 details with API function.
2802 (process_serial_event): Replace accessing list implemention details
2803 with API function.
2804 * target.c (set_desired_inferior): Replace accessing list implemention
2805 details with API function.
2806 * tracepoint.c (same_process_p): New function.
2807 (gdb_agent_about_to_close): Replace accessing list implemention
2808 details with API function.
2809 * win32-low.c (child_delete_thread): Replace accessing list
2810 implemention details with API function.
2811 (match_dll_by_basename): New function.
2812 (dll_is_loaded_by_basename): New function.
2813 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2814 details call to dll_is_loaded_by_basename.
2815
2816 2014-02-19 Doug Evans <dje@google.com>
2817
2818 * dll.h (struct dll_info): Add comment.
2819 * gdbthread.h (struct thread_info): Add comment.
2820 (current_ptid): Simplify.
2821 * inferiors.c (add_process): Update.
2822 (remove_process): Update.
2823 * inferiors.h (struct process_info): Rename member "head" to "entry".
2824 * linux-low.c (delete_lwp): Update.
2825 (add_lwp): Update.
2826 (last_thread_of_process_p): Update.
2827 (kill_one_lwp_callback, linux_kill): Update.
2828 (status_pending_p_callback): Update.
2829 (wait_for_sigstop): Update. Simplify read of ptid.
2830 (start_step_over): Update.
2831 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2832 (get_lwp_thread): Update.
2833 (struct lwp_info): Rename member "head" to "entry".
2834 * regcache.h (inferior_list_entry): Delete.
2835 * server.c (kill_inferior_callback): Update.
2836 (detach_or_kill_inferior_callback): Update.
2837 (print_started_pid): Update.
2838 (print_attached_pid): Update.
2839 (process_serial_event): Simplify read of ptid.
2840 * thread-db.c (thread_db_create_event): Update.
2841 (thread_db_get_tls_address): Update.
2842 * win32-low.c (current_inferior_ptid): Simplify.
2843
2844 2014-02-19 Tom Tromey <tromey@redhat.com>
2845
2846 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2847 argument.
2848 (target_supports_btrace): Update.
2849
2850 2014-02-14 Yao Qi <yao@codesourcery.com>
2851
2852 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2853 (rsp-low-ipa.o): New target.
2854
2855 2014-02-12 Tom Tromey <tromey@redhat.com>
2856
2857 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2858 convert_ascii_to_int.
2859 * regcache.c (registers_to_string): Likewise.
2860 * remote-utils.c (decode_M_packet): Likewise.
2861 * server.c (process_serial_event): Likewise.
2862
2863 2014-02-12 Tom Tromey <tromey@redhat.com>
2864
2865 * server.c (handle_query, handle_v_run): Use hex2bin, not
2866 unhexify.
2867 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2868
2869 2014-02-12 Tom Tromey <tromey@redhat.com>
2870
2871 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2872 convert_int_to_ascii.
2873 * regcache.c (registers_to_string, collect_register_as_string):
2874 Likewise.
2875 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2876 Likewise.
2877 * server.c (process_serial_event): Likewise.
2878 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2879 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2880
2881 2014-02-12 Tom Tromey <tromey@redhat.com>
2882
2883 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2884 bin2hex, not hexify.
2885 * tracepoint.c (cmd_qtstatus): Likewise.
2886
2887 2014-02-12 Tom Tromey <tromey@redhat.com>
2888
2889 * remote-utils.c (monitor_output): Pass explicit length to
2890 hexify.
2891
2892 2014-02-12 Tom Tromey <tromey@redhat.com>
2893
2894 * tracepoint.c: Include rsp-low.h.
2895 * server.c: Include rsp-low.h.
2896 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2897 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2898 declare.
2899 * remote-utils.c: Include rsp-low.h.
2900 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2901 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2902 (convert_int_to_ascii, convert_ascii_to_int): Move to
2903 common/rsp-low.c.
2904 * regcache.c: Include rsp-low.h.
2905 * ax.c: Include rsp-low.h.
2906 * Makefile.in (SFILES): Add common/rsp-low.c.
2907 (OBS): Add rsp-low.o.
2908 (rsp-low.o): New target.
2909
2910 2014-02-12 Tom Tromey <tromey@redhat.com>
2911
2912 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2913 Include print-utils.h.
2914 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2915 (plongest, thirty_two, phex_nz): Remove.
2916 * Makefile.in (SFILES): Add common/print-utils.c.
2917 (OBS): Add print-utils.o.
2918 (print-utils-ipa.o): New target.
2919 (print-utils.o): New target.
2920 (IPA_OBJS): Add print-utils-ipa.o.
2921
2922 2014-02-06 Tom Tromey <tromey@redhat.com>
2923
2924 * Makefile.in (SFILES): Fix indentation.
2925
2926 2014-02-05 Doug Evans <dje@google.com>
2927
2928 * linux-low.c (linux_wait_for_event): Improve comment.
2929 (linux_wait_1): Keep current_inferior in sync with event_child.
2930
2931 2014-01-22 Doug Evans <dje@google.com>
2932
2933 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2934
2935 2014-01-22 Doug Evans <dje@google.com>
2936
2937 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2938 * configure: Regenerate.
2939 * config.in: Regenerate.
2940 * Makefile.in (SFILES): Add debug.c.
2941 (OBS): Add debug.o.
2942 * debug.c: New file.
2943 * debug.h: New file.
2944 * linux-aarch64-low.c (*): Update all debugging printfs to use
2945 debug_printf instead of fprintf.
2946 * linux-arm-low.c (*): Ditto.
2947 * linux-cris-low.c (*): Ditto.
2948 * linux-crisv32-low.c (*): Ditto.
2949 * linux-m32r-low.c (*): Ditto.
2950 * linux-sparc-low.c (*): Ditto.
2951 * linux-x86.c (*): Ditto.
2952 * linux-low.c (*): Ditto.
2953 (linux_wait_1): Add calls to debug_enter, debug_exit.
2954 (linux_wait): Remove redundant debugging printf.
2955 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2956 (linux_resume, unstop_all_lwps): Ditto.
2957 * mem-break.c (*): Update all debugging printfs to use
2958 debug_printf instead of fprintf.
2959 * remote-utils.c (*): Ditto.
2960 * thread-db.c (*): Ditto.
2961 * server.c #include <ctype.h>, "gdb_vecs.h".
2962 (debug_threads): Moved to debug.c.
2963 (*): Update all debugging printfs to use debug_printf instead of
2964 fprintf.
2965 (start_inferior): Replace call to fflush with call to debug_flush.
2966 (monitor_show_help): Mention set debug-format.
2967 (parse_debug_format_options): New function.
2968 (handle_monitor_command): Handle "monitor set debug-format".
2969 (gdbserver_usage): Mention --debug-format.
2970 (main): Parse --debug-format.
2971 * server.h (debug_threads): Declaration moved to debug.h.
2972 #include "debug.h".
2973 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2974 trace_debug_1 that uses debug_printf.
2975 (tracepoint_look_up_symbols): Update all debugging printfs to use
2976 debug_printf instead of fprintf.
2977
2978 2014-01-20 Baruch Siach <baruch@tkos.co.il>
2979
2980 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2981 sys/ptrace.h.
2982
2983 2014-01-17 Pedro Alves <palves@redhat.com>
2984
2985 PR build/16445
2986 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2987 defined after including gdb_proc_service.h.
2988
2989 2014-01-16 Doug Evans <dje@google.com>
2990
2991 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2992 (match_dll): Use it.
2993
2994 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2995
2996 * target.h (target_ops) <read_btrace>: Change parameters and
2997 return type to allow error reporting.
2998 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2999 trace reading errors on.
3000 * linux-low.c (linux_low_read_btrace): Pass trace reading
3001 errors on.
3002 (linux_low_disable_btrace): New.
3003
3004 2014-01-15 Doug Evans <dje@google.com>
3005
3006 * inferiors.c (thread_id_to_gdb_id): Delete.
3007 * inferiors.h (thread_id_to_gdb_id): Delete.
3008
3009 2014-01-13 Eli Zaretskii <eliz@gnu.org>
3010
3011 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3012 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3013 versions.
3014
3015 2014-01-08 Pedro Alves <palves@redhat.com>
3016
3017 * server.c (handle_status): Don't discard previous queued stop
3018 replies or thread's pending status here.
3019 (main) <disconnection>: Do it here instead.
3020
3021 2014-01-08 Pedro Alves <palves@redhat.com>
3022
3023 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3024 * server.c (visit_actioned_threads, handle_pending_status): New
3025 function.
3026 (handle_v_cont): Factor out parts to ...
3027 (resume): ... this new function. If in all-stop, and a thread
3028 being resumed has a pending status, report it without actually
3029 resuming.
3030 (myresume): Adjust to use the new 'resume' function.
3031 (clear_pending_status_callback, set_pending_status_callback)
3032 (find_status_pending_thread_callback): New functions.
3033 (handle_status): Handle the case of multiple threads having
3034 interesting statuses to report. Report threads' real last signal
3035 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3036 with an interesting thread to report the status for, instead of
3037 always reporting the status of the first thread.
3038
3039 2014-01-01 Joel Brobecker <brobecker@adacore.com>
3040
3041 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3042 * gdbreplay.c (gdbreplay_version): Likewise.
3043
3044 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3045
3046 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3047 iov.iov_len with the real length in use.
3048
3049 2013-12-13 Joel Brobecker <brobecker@adacore.com>
3050
3051 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3052 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3053 for all targets that use win32-low.c.
3054 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3055 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3056
3057 2013-12-13 Pedro Alves <palves@redhat.com>
3058
3059 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3060 if equal to TARGET_WAITKIND_LOADED.
3061 * win32-low.c (cached_status): New static global.
3062 (win32_wait): Add declaration.
3063 (do_initial_child_stuff): Flush all initial pending debug events
3064 up to the initial breakpoint.
3065 (win32_wait): If CACHED_STATUS was set, return that instead
3066 of doing a real wait. Remove the code resuming the execution
3067 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3068 during the initial phase. Also remove the code changing
3069 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3070 TARGET_WAITKIND_STOPPED.
3071
3072 2013-12-11 Yao Qi <yao@codesourcery.com>
3073
3074 * notif.c (handle_notif_ack): Return 0 if no notification
3075 matches.
3076
3077 2013-11-20 Doug Evans <dje@google.com>
3078
3079 * linux-low.c (linux_set_resume_request): Fix comment.
3080
3081 2013-11-20 Doug Evans <dje@google.com>
3082
3083 * linux-low.c (resume_status_pending_p): Tweak comment.
3084
3085 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3086
3087 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3088 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3089 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3090 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3091 (srv_amd64_regobj): Add amd64-mpx.o.
3092 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3093 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3094 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3095 * i387-fp.c (num_pl_bnd_register) Added constant.
3096 (num_pl_bnd_cfg_registers) Added constant.
3097 (struct i387_xsave) Added reserved area and MPX fields.
3098 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3099 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3100 function.
3101 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3102 (init_registers_amd64_mpx_linux): Declare new function.
3103 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3104 (x86_64_regmap): Add MPX registers.
3105 (x86_linux_read_description): Add MPX case.
3106 (initialize_low_arch): Initialize MPX targets.
3107
3108 2013-11-18 Tom Tromey <tromey@redhat.com>
3109
3110 * configure: Rebuild.
3111 * configure.ac: Don't check for stdlib.h.
3112 * gdbreplay.c: Unconditionally include stdlib.h.
3113
3114 2013-11-18 Tom Tromey <tromey@redhat.com>
3115
3116 * config.in: Rebuild.
3117 * configure: Rebuild.
3118 * configure.ac: Don't use AC_HEADER_DIRENT.
3119
3120 2013-11-18 Tom Tromey <tromey@redhat.com>
3121
3122 * server.h: Don't check HAVE_STRING_H.
3123 * gdbreplay.c: Don't check HAVE_STRING_H.
3124 * configure: Rebuild.
3125
3126 2013-11-18 Tom Tromey <tromey@redhat.com>
3127
3128 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3129 LIBGNU.
3130
3131 2013-11-08 Tom Tromey <tromey@redhat.com>
3132
3133 * configure, config.in: Rebuild.
3134 * configure.ac: Remove unused configury.
3135
3136 2013-11-08 Tom Tromey <tromey@redhat.com>
3137
3138 * acinclude.m4: Include common.m4, codeset.m4.
3139 * configure, config.in: Rebuild.
3140 * configure.ac: Use GDB_AC_COMMON.
3141
3142 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3143
3144 * linux-s390-low.c (HWCAP_S390_TE): New define.
3145 (s390_arch_setup): Consider the TE field in the HWCAP for
3146 determining 'have_regset_tdb'.
3147
3148 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3149
3150 PR gdb/16014
3151 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3152 call to sizeof.
3153
3154 2013-10-02 Pedro Alves <palves@redhat.com>
3155
3156 * server.c (process_serial_event): Don't output "GDBserver
3157 exiting" if GDB is connected through stdio.
3158 * target.c (mywait): Likewise, be silent if GDB is connected
3159 through stdio.
3160
3161 2013-10-01 Joel Brobecker <brobecker@adacore.com>
3162
3163 * lynx-low.c (lynx_add_threads_after_attach): New function.
3164 (lynx_attach): Remove call to add_thread. Add call to
3165 lynx_add_threads_after_attach instead.
3166
3167 2013-09-28 Mike Frysinger <vapier@gentoo.org>
3168
3169 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3170 * config.in, configure: Regenerated.
3171
3172 2013-09-18 Yao Qi <yao@codesourcery.com>
3173
3174 PR server/15959
3175 * server.c (start_inferior): Clear 'resume_info'.
3176
3177 2013-09-16 Jiong Wang <jiwang@tilera.com>
3178
3179 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3180 for each register.
3181
3182 2013-09-16 Jiong Wang <jiwang@tilera.com>
3183
3184 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3185 linux-tile-low.o to srv_tgtobj.
3186
3187 2013-09-16 Will Newton <will.newton@linaro.org>
3188
3189 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3190 out regs.
3191
3192 2013-09-06 Pedro Alves <palves@redhat.com>
3193
3194 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3195 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3196 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3197 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3198 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3199 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3200
3201 2013-09-06 Pedro Alves <palves@redhat.com>
3202
3203 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3204 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3205
3206 2013-09-06 Pedro Alves <palves@redhat.com>
3207
3208 * linux-amd64-ipa.c: Include tracepoint.h.
3209 * linux-i386-ipa.c: Include tracepoint.h.
3210
3211 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3212
3213 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3214 (ps_get_thread_area): New function.
3215
3216 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3217
3218 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3219 (initialize_low_arch): Call init_registers_crisv32 rather than
3220 init_register_crisv32.
3221
3222 2013-09-05 Pedro Alves <palves@redhat.com>
3223
3224 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3225 to ...
3226 * hostio.h: ... this new file.
3227 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3228 win32-low.c: Include hostio.h.
3229
3230 2013-09-05 Pedro Alves <palves@redhat.com>
3231
3232 * server.h (gdb_client_data, handler_func, callback_handler_func)
3233 (delete_file_handler, add_file_handler, append_callback_event)
3234 (delete_callback_event, start_event_loop, initialize_event_loop):
3235 Move to event-loop.h and include it.
3236 * event-loop.h: New file.
3237
3238 2013-09-05 Pedro Alves <palves@redhat.com>
3239
3240 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3241 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3242 (loaded_dll, unloaded_dll): Move to ...
3243 * dll.h: ... this new file.
3244 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3245
3246 2013-09-05 Pedro Alves <palves@redhat.com>
3247
3248 * server.h (current_process, get_thread_process, all_processes)
3249 (add_inferior_to_list, for_each_inferior, current_inferior)
3250 (remove_inferior, add_process, remove_process, find_process_pid)
3251 (have_started_inferiors_p, have_attached_inferiors_p)
3252 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3253 (clear_inferiors, find_inferior, find_inferior_id)
3254 (inferior_target_data, set_inferior_target_data)
3255 (inferior_regcache_data, set_inferior_regcache_data): Move to
3256 inferiors.h, and include it.
3257 * inferiors.h: New file.
3258
3259 2013-09-05 Pedro Alves <palves@redhat.com>
3260
3261 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3262 Move ...
3263 * ax.h: ... here.
3264
3265 2013-09-05 Pedro Alves <palves@redhat.com>
3266
3267 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3268 tracepoint.h.
3269 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3270 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3271 (handle_tracepoint_general_set, handle_tracepoint_query)
3272 (tracepoint_finished_step, tracepoint_was_hit)
3273 (release_while_stepping_state_list, current_traceframe)
3274 (in_readonly_region, traceframe_read_mem)
3275 (fetch_traceframe_registers, traceframe_read_sdata)
3276 (traceframe_read_info, struct fast_tpoint_collect_status)
3277 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3278 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3279 (supply_fast_tracepoint_registers)
3280 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3281 (ipa_tdesc, claim_trampoline_space)
3282 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3283 (agent_mem_read, agent_get_trace_state_variable_value)
3284 (agent_set_trace_state_variable_value, agent_tsv_read)
3285 (agent_mem_read_string, get_raw_reg_func_addr)
3286 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3287 * tracepoint.h: ... this new file.
3288
3289 2013-09-05 Pedro Alves <palves@redhat.com>
3290
3291 * server.h (perror_with_name, error, fatal, warning, paddress)
3292 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3293 include it.
3294 * utils.h: New file.
3295
3296 2013-09-05 Pedro Alves <palves@redhat.com>
3297
3298 * server.h (remote_debug, noack_mode, transport_is_reliable)
3299 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3300 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3301 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3302 (write_enn, initialize_async_io, enable_async_io)
3303 (disable_async_io, check_remote_input_interrupt_request)
3304 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3305 (dead_thread_notify, prepare_resume_reply)
3306 (decode_address_to_semicolon, decode_address, decode_m_packet)
3307 (decode_M_packet, decode_X_packet, decode_xfer_write)
3308 (decode_search_memory_packet, unhexify, hexify)
3309 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3310 (look_up_one_symbol, relocate_instruction)
3311 (monitor_output): Move to remote-utils.h, and include it.
3312 * remote-utils.h: New file.
3313
3314 2013-09-05 Pedro Alves <palves@redhat.com>
3315
3316 * server.h (_): Delete.
3317
3318 2013-09-02 Pedro Alves <palves@redhat.com>
3319
3320 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3321 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3322 allocated.
3323 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3324
3325 2013-09-02 Pierre Muller <muller@sourceware.org>
3326
3327 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3328 or WriteProcessMemory complete successfully and handle
3329 ERROR_PARTIAL_COPY error.
3330
3331 2013-09-02 Pedro Alves <palves@redhat.com>
3332
3333 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3334 error instead of EIO.
3335
3336 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3337
3338 PR server/15604
3339 * linux-low.c: Include filestuff.h.
3340 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3341 * lynx-low.c: Include filestuff.h.
3342 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3343 * server.c: Include filestuff.h.
3344 (main): Call notice_open_fds.
3345 * spu-low.c: Include filestuff.h.
3346 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3347
3348 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
3349
3350 * Makefile.in: Explain why ../target and ../nat are not
3351 listed as include file search paths.
3352 (linux-waitpid.o): New object file rule.
3353 * configure.srv (srv_native_linux_obj): New variable.
3354 Replace all occurrences of linux native object files with
3355 $srv_native_linux_obj.
3356 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3357 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3358 (linux_enable_event_reporting): Remove declaration.
3359 (my_waitpid): Moved to common/linux-waitpid.c.
3360 (linux_wait_for_event): Pass ptid when calling
3361 linux_enable_event_reporting.
3362 (linux_supports_tracefork_flag): Remove.
3363 (linux_enable_event_reporting): Likewise.
3364 (linux_tracefork_grandchild): Remove.
3365 (STACK_SIZE): Moved to common/linux-ptrace.c.
3366 (linux_tracefork_child): Remove.
3367 (linux_test_for_tracefork): Remove.
3368 (linux_look_up_symbols): Call linux_supports_traceclone.
3369 (initialize_low): Remove call to linux_test_for_tracefork.
3370 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3371 common/linux-ptrace.h.
3372 (PTRACE_TYPE_ARG4): Likewise.
3373 Include linux-ptrace.h.
3374
3375 2013-08-21 Pedro Alves <palves@redhat.com>
3376
3377 * config.in: Renegerate.
3378
3379 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
3380
3381 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3382 (SFILES): Remove $(srcdir)/common/target-common.c and
3383 add $(srcdir)/target/waitstatus.c.
3384 (OBS): Remove target-common.o and add waitstatus.o.
3385 (server_h): Remove $(srcdir)/../common/target-common.h and
3386 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3387 and $(srcdir)/../target/waitstatus.h.
3388 (target-common.o): Remove.
3389 (waitstatus.o): New target object file.
3390 * target.h: Do not include target-common.h and
3391 include target/resume.h, target/wait.h and
3392 target/waitstatus.h.
3393
3394 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
3395
3396 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3397 to PTRACE_TYPE_ARG3.
3398 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3399 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3400 PTRACE_TYPE_ARG4.
3401 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3402 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3403
3404 2013-07-27 Jie Zhang <jie@codesourcery.com>
3405 Daniel Jacobowitz <dan@codesourcery.com>
3406 Yao Qi <yao@codesourcery.com>
3407
3408 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3409 (mips-linux-watch.o): New rule.
3410 (mips_linux_watch_h): New variable.
3411 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3412 srv_tgtobj.
3413 * linux-mips-low.c: Include mips-linux-watch.h.
3414 (struct arch_process_info, struct arch_lwp_info): New.
3415 (update_watch_registers_callback): New function.
3416 (mips_linux_new_process, mips_linux_new_thread) New functions.
3417 (mips_linux_prepare_to_resume, mips_insert_point): New
3418 functions.
3419 (mips_remove_point, mips_stopped_by_watchpoint): New
3420 functions.
3421 (rsp_bp_type_to_target_hw_bp_type): New function.
3422 (mips_stopped_data_address): New function.
3423 (the_low_target): Add watchpoint support functions.
3424
3425 2013-07-27 Yao Qi <yao@codesourcery.com>
3426
3427 * i386-low.c: Include break-common.h.
3428 (enum target_hw_bp_type): Remove.
3429
3430 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
3431
3432 * Makefile.in (SFILES): /common/target-common.c.
3433 (OBS): Add target-common.o.
3434 (server_h): Add $(srcdir)/../common/target-common.h.
3435 (target-common.o): New target.
3436 * server.c (queue_stop_reply_callback): Free
3437 status string after use.
3438 * target.c (target_waitstatus_to_string): Remove.
3439 * target.h: Include target-common.h.
3440 (resume_kind): Likewise.
3441 (target_waitkind): Likewise.
3442 (target_waitstatus): Likewise.
3443 (TARGET_WNOHANG): Likewise.
3444
3445 2013-07-04 Yao Qi <yao@codesourcery.com>
3446
3447 * Makefile.in (host_alias): Use @host_noncanonical@.
3448 (target_alias): Use @target_noncanonical@.
3449 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3450 ACX_NONCANONICAL_HOST.
3451 * configure: Regenerated.
3452
3453 Revert:
3454 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3455
3456 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3457 * configure: Rebuild.
3458 * Makefile.in (version_host, version_target): Get from configure.
3459 (version.c): Use $(version_host) and $(version_target).
3460
3461 2013-07-03 Pedro Alves <palves@redhat.com>
3462
3463 * Makefile.in (config.status): Depend on development.sh.
3464 * acinclude.m4: Include libmcheck.m4.
3465 * configure: Regenerate.
3466
3467 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3468
3469 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3470 attribute inside the parentheses.
3471 (winapi_DebugSetProcessKillOnExit): Ditto.
3472 (winapi_DebugBreakProcess): Ditto.
3473 (winapi_GenerateConsoleCtrlEvent): Ditto.
3474
3475 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3476
3477 * notif.h (notif_event): Add a dummy member to avoid compiler
3478 errors.
3479
3480 2013-07-01 Pedro Alves <palves@redhat.com>
3481
3482 * hostio.c (HOSTIO_PATH_MAX): Define.
3483 (require_filename, handle_open, handle_unlink, handle_readlink):
3484 Use it.
3485
3486 2013-07-01 Pedro Alves <palves@redhat.com>
3487
3488 * server.h: Include "pathmax.h".
3489 * linux-low.c: Don't include sys/param.h.
3490 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3491 MAXPATHLEN.
3492 * win32-low.c: Don't include sys/param.h.
3493 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3494
3495 2013-07-01 Pedro Alves <palves@redhat.com>
3496
3497 * event-loop.c: Don't check HAVE_UNISTD_H before including
3498 <unistd.h>.
3499 * gdbreplay.c: Likewise.
3500 * remote-utils.c: Likewise.
3501 * server.c: Likewise.
3502 * configure.ac: Don't check for unistd.h.
3503 * configure: Regenerate.
3504
3505 2013-06-28 Tom Tromey <tromey@redhat.com>
3506
3507 * Makefile.in (version.c): Use version.in, not
3508 common/version.in.
3509
3510 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3511
3512 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3513 * configure: Rebuild.
3514 * Makefile.in (version_host, version_target): Get from configure.
3515 (version.c): Use $(version_host) and $(version_target).
3516
3517 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3518
3519 Fix trace-status to output user name without trailing colon.
3520 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3521
3522 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3523
3524 Fix trace-status to output proper start-time and stop-time.
3525 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3526 output start time and stop time in hex as gdb expects.
3527
3528 2013-06-26 Pedro Alves <pedro@codesourcery.com>
3529
3530 * tracepoint.c (build_traceframe_info_xml): Output trace state
3531 variables present in the trace buffer.
3532
3533 2013-06-24 Tom Tromey <tromey@redhat.com>
3534
3535 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3536 create-version.sh.
3537 (version.o): Remove.
3538 * gdbreplay.c: Include version.h.
3539 (version, host_name): Don't declare.
3540 * server.h: Include version.h.
3541 (version, host_name): Don't declare.
3542
3543 2013-06-12 Pedro Alves <palves@redhat.com>
3544
3545 * linux-x86-low.c (linux_is_elf64): Delete global.
3546 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3547 with local linux_pid_exe_is_elf_64_file use.
3548
3549 2013-06-11 Pedro Alves <palves@redhat.com>
3550
3551 * linux-low.c (regset_disabled, disable_regset): New functions.
3552 (regsets_fetch_inferior_registers)
3553 (regsets_store_inferior_registers): Use them.
3554 (initialize_regsets_info); Don't allocate the disabled_regsets
3555 array here.
3556 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3557 comment.
3558
3559 2013-06-11 Pedro Alves <palves@redhat.com>
3560
3561 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3562 xmalloc.
3563
3564 2013-06-11 Pedro Alves <palves@redhat.com>
3565
3566 * linux-x86-low.c (initialize_low_arch): Call
3567 init_registers_x32_avx_linux.
3568
3569 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3570
3571 Fix compatibility with Android Bionic.
3572 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3573 it is not empty.
3574
3575 2013-06-07 Pedro Alves <palves@redhat.com>
3576
3577 PR server/14823
3578 * Makefile.in (OBS): Add tdesc.o.
3579 (IPA_OBJS): Add tdesc-ipa.o.
3580 (tdesc-ipa.o): New rule.
3581 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3582 interface.
3583 * linux-low.c (new_inferior): Delete.
3584 (disabled_regsets, num_regsets): Delete.
3585 (linux_add_process): Adjust to set the new per-process
3586 new_inferior flag.
3587 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3588 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3589 was a stop. When calling arch_setup, switch the current inferior
3590 to the thread that got an event.
3591 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3592 (regsets_fetch_inferior_registers)
3593 (regsets_store_inferior_registers): New regsets_info parameter.
3594 Adjust to use it.
3595 (linux_register_in_regsets): New regs_info parameter. Adjust to
3596 use it.
3597 (register_addr, fetch_register, store_register): New usrregs_info
3598 parameter. Adjust to use it.
3599 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3600 parameter regs_info. Adjust to use it.
3601 (linux_fetch_registers): Get the current inferior's regs_info, and
3602 adjust to use it.
3603 (linux_store_registers): Ditto.
3604 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3605 (initialize_low): Don't initialize the target_regsets here. Call
3606 initialize_low_arch.
3607 * linux-low.h (target_regsets): Delete declaration.
3608 (struct regsets_info): New.
3609 (struct usrregs_info): New.
3610 (struct regs_info): New.
3611 (struct process_info_private) <new_inferior>: New field.
3612 (struct linux_target_ops): Delete the num_regs, regmap, and
3613 regset_bitmap fields. New field regs_info.
3614 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3615 * i387-fp.c (num_xmm_registers): Delete.
3616 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3617 calls to new interface.
3618 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3619 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3620 Infer the number of xmm registers from the regcache's target
3621 description.
3622 * i387-fp.h (num_xmm_registers): Delete.
3623 * inferiors.c (add_thread): Don't install the thread's regcache
3624 here.
3625 * proc-service.c (gregset_info): Fetch the current inferior's
3626 regs_info. Adjust to use it.
3627 * regcache.c: Include tdesc.h.
3628 (register_bytes, reg_defs, num_registers)
3629 (gdbserver_expedite_regs): Delete.
3630 (get_thread_regcache): If the thread doesn't have a regcache yet,
3631 create one, instead of aborting gdbserver.
3632 (regcache_invalidate_one): Rename to ...
3633 (regcache_invalidate_thread): ... this.
3634 (regcache_invalidate_one): New.
3635 (regcache_invalidate): Only invalidate registers of the current
3636 process.
3637 (init_register_cache): Add target_desc parameter, and use it.
3638 (new_register_cache): Ditto. Assert the target description has a
3639 non zero registers_size.
3640 (regcache_cpy): Add assertions. Adjust.
3641 (realloc_register_cache, set_register_cache): Delete.
3642 (registers_to_string, registers_from_string): Adjust.
3643 (find_register_by_name, find_regno, find_register_by_number)
3644 (register_cache_size): Add target_desc parameter, and use it.
3645 (free_register_cache_thread, free_register_cache_thread_one)
3646 (regcache_release, register_cache_size): New.
3647 (register_size): Add target_desc parameter, and use it.
3648 (register_data, supply_register, supply_register_zeroed)
3649 (supply_regblock, supply_register_by_name, collect_register)
3650 (collect_register_as_string, collect_register_by_name): Adjust.
3651 * regcache.h (struct target_desc): Forward declare.
3652 (struct regcache) <tdesc>: New field.
3653 (init_register_cache, new_register_cache): Add target_desc
3654 parameter.
3655 (regcache_invalidate_thread): Declare.
3656 (regcache_invalidate_one): Delete declaration.
3657 (regcache_release): Declare.
3658 (find_register_by_number, register_cache_size, register_size)
3659 (find_regno): Add target_desc parameter.
3660 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3661 declarations.
3662 * remote-utils.c: Include tdesc.h.
3663 (outreg, prepare_resume_reply): Adjust.
3664 * server.c: Include tdesc.h.
3665 (gdbserver_xmltarget): Delete declaration.
3666 (get_features_xml, process_serial_event): Adjust.
3667 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3668 declare.
3669 (struct process_info) <tdesc>: New field.
3670 (ipa_tdesc): Declare.
3671 * tdesc.c: New file.
3672 * tdesc.h: New file.
3673 * tracepoint.c: Include tdesc.h.
3674 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3675 (get_context_regcache): Adjust to pass ipa_tdesc down.
3676 (do_action_at_tracepoint): Adjust to get the register cache size
3677 from the context regcache's description.
3678 (traceframe_walk_blocks): Adjust to get the register cache size
3679 from the current trace frame's description.
3680 (traceframe_get_pc): Adjust to get current trace frame's
3681 description and pass it down.
3682 (gdb_collect): Adjust to get the register cache size from the
3683 IPA's description.
3684 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3685 (gdbserver_xmltarget): Delete.
3686 (initialize_low_tracepoint): Set the ipa's target description.
3687 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3688 (initialize_low_tracepoint): Set the ipa's target description.
3689 * linux-x86-low.c: Include tdesc.h.
3690 [__x86_64__] (is_64bit_tdesc): New.
3691 (ps_get_thread_area, x86_get_thread_area): Use it.
3692 (i386_cannot_store_register): Rename to ...
3693 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3694 (i386_cannot_fetch_register): Rename to ...
3695 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3696 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3697 to new interface.
3698 (target_regsets): Rename to ...
3699 (x86_regsets): ... this.
3700 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3701 interface.
3702 (x86_siginfo_fixup): Use is_64bit_tdesc.
3703 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3704 (tdesc_x32_avx_linux, tdesc_x32_linux)
3705 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3706 Declare.
3707 (x86_linux_update_xmltarget): Delete.
3708 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3709 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3710 (AMD64_LINUX_USER64_CS): New.
3711 (x86_linux_read_description): New, based on
3712 x86_linux_update_xmltarget.
3713 (same_process_callback): New.
3714 (x86_arch_setup_process_callback): New.
3715 (x86_linux_update_xmltarget): New.
3716 (x86_regsets_info): New.
3717 (amd64_linux_regs_info): New.
3718 (i386_linux_usrregs_info): New.
3719 (i386_linux_regs_info): New.
3720 (x86_linux_regs_info): New.
3721 (x86_arch_setup): Reimplement.
3722 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3723 (x86_emit_ops): Ditto.
3724 (the_low_target): Adjust. Install x86_linux_regs_info,
3725 x86_cannot_fetch_register, and x86_cannot_store_register.
3726 (initialize_low_arch): New.
3727 * linux-ia64-low.c (tdesc_ia64): Declare.
3728 (ia64_fetch_register): Adjust.
3729 (ia64_usrregs_info, regs_info): New globals.
3730 (ia64_regs_info): New function.
3731 (the_low_target): Adjust.
3732 (initialize_low_arch): New function.
3733 * linux-sparc-low.c (tdesc_sparc64): Declare.
3734 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3735 Adjust.
3736 (sparc_arch_setup): New function.
3737 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3738 (the_low_target): Adjust.
3739 (initialize_low_arch): New function.
3740 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3741 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3742 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3743 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3744 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3745 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3746 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3747 (tdesc_powerpc_isa205_vsx64l): Declare.
3748 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3749 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3750 (ppc_set_pc, ppc_get_hwcap): Adjust.
3751 (ppc_usrregs_info): Forward declare.
3752 (!__powerpc64__) ppc_regmap_adjusted: New global.
3753 (ppc_arch_setup): Adjust to the current process'es target
3754 description.
3755 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3756 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3757 (ppc_store_evrregset): Adjust.
3758 (target_regsets): Rename to ...
3759 (ppc_regsets): ... this, and make static.
3760 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3761 (ppc_regs_info): New function.
3762 (the_low_target): Adjust.
3763 (initialize_low_arch): New function.
3764 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3765 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3766 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3767 (tdesc_s390x_linux64v2): Declare.
3768 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3769 (s390_fill_gregset, s390_store_last_break): Adjust.
3770 (target_regsets): Rename to ...
3771 (s390_regsets): ... this, and make static.
3772 (s390_get_pc, s390_set_pc): Adjust.
3773 (s390_get_hwcap): New target_desc parameter, and use it.
3774 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3775 (s390_arch_setup): Adjust to set the current process'es target
3776 description. Don't adjust the regmap.
3777 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3778 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3779 (regs_info_3264): New globals.
3780 (s390_regs_info): New function.
3781 (the_low_target): Adjust.
3782 (initialize_low_arch): New function.
3783 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3784 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3785 [__mips64] (init_registers_mips_linux)
3786 (init_registers_mips_dsp_linux): Delete defines.
3787 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3788 (have_dsp): New global.
3789 (mips_read_description): New, based on mips_arch_setup.
3790 (mips_arch_setup): Reimplement.
3791 (get_usrregs_info): New function.
3792 (mips_cannot_fetch_register, mips_cannot_store_register)
3793 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3794 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3795 (target_regsets): Rename to ...
3796 (mips_regsets): ... this, and make static.
3797 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3798 (dsp_regs_info, regs_info): New globals.
3799 (mips_regs_info): New function.
3800 (the_low_target): Adjust.
3801 (initialize_low_arch): New function.
3802 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3803 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3804 Declare.
3805 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3806 (arm_read_description): New, with bits factored from
3807 arm_arch_setup.
3808 (arm_arch_setup): Reimplement.
3809 (target_regsets): Rename to ...
3810 (arm_regsets): ... this, and make static.
3811 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3812 (arm_regs_info): New function.
3813 (the_low_target): Adjust.
3814 (initialize_low_arch): New function.
3815 * linux-m68k-low.c (tdesc_m68k): Declare.
3816 (target_regsets): Rename to ...
3817 (m68k_regsets): ... this, and make static.
3818 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3819 (m68k_regs_info): New function.
3820 (m68k_arch_setup): New function.
3821 (the_low_target): Adjust.
3822 (initialize_low_arch): New function.
3823 * linux-sh-low.c (tdesc_sharch): Declare.
3824 (target_regsets): Rename to ...
3825 (sh_regsets): ... this, and make static.
3826 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3827 (sh_regs_info, sh_arch_setup): New functions.
3828 (the_low_target): Adjust.
3829 (initialize_low_arch): New function.
3830 * linux-bfin-low.c (tdesc_bfin): Declare.
3831 (bfin_arch_setup): New function.
3832 (bfin_usrregs_info, regs_info): New globals.
3833 (bfin_regs_info): New function.
3834 (the_low_target): Adjust.
3835 (initialize_low_arch): New function.
3836 * linux-cris-low.c (tdesc_cris): Declare.
3837 (cris_arch_setup): New function.
3838 (cris_usrregs_info, regs_info): New globals.
3839 (cris_regs_info): New function.
3840 (the_low_target): Adjust.
3841 (initialize_low_arch): New function.
3842 * linux-cris-low.c (tdesc_crisv32): Declare.
3843 (cris_arch_setup): New function.
3844 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3845 (cris_regs_info): New function.
3846 (the_low_target): Adjust.
3847 (initialize_low_arch): New function.
3848 * linux-m32r-low.c (tdesc_m32r): Declare.
3849 (m32r_arch_setup): New function.
3850 (m32r_usrregs_info, regs_info): New globals.
3851 (m32r_regs_info): Adjust.
3852 (initialize_low_arch): New function.
3853 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3854 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3855 (tic6x_usrregs_info): Forward declare.
3856 (tic6x_read_description): New function, based on ...
3857 (tic6x_arch_setup): ... this. Reimplement.
3858 (target_regsets): Rename to ...
3859 (tic6x_regsets): ... this, and make static.
3860 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3861 (tic6x_regs_info): New function.
3862 (the_low_target): Adjust.
3863 (initialize_low_arch): New function.
3864 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3865 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3866 (target_regsets): Rename to ...
3867 (xtensa_regsets): ... this, and make static.
3868 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3869 globals.
3870 (xtensa_arch_setup, xtensa_regs_info): New functions.
3871 (the_low_target): Adjust.
3872 (initialize_low_arch): New function.
3873 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3874 (nios2_arch_setup): Set the current process'es tdesc.
3875 (target_regsets): Rename to ...
3876 (nios2_regsets): ... this.
3877 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3878 (nios2_regs_info): New function.
3879 (the_low_target): Adjust.
3880 (initialize_low_arch): New function.
3881 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3882 (aarch64_arch_setup): Set the current process'es tdesc.
3883 (target_regsets): Rename to ...
3884 (aarch64_regsets): ... this.
3885 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3886 (aarch64_regs_info): New function.
3887 (the_low_target): Adjust.
3888 (initialize_low_arch): New function.
3889 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3890 globals.
3891 (target_regsets): Rename to ...
3892 (tile_regsets): ... this.
3893 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3894 (tile_regs_info): New function.
3895 (tile_arch_setup): Set the current process'es tdesc.
3896 (the_low_target): Adjust.
3897 (initialize_low_arch): New function.
3898 * spu-low.c (tdesc_spu): Declare.
3899 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3900 * win32-arm-low.c (tdesc_arm): Declare.
3901 (arm_arch_setup): New function.
3902 (the_low_target): Install arm_arch_setup instead of
3903 init_registers_arm.
3904 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3905 (init_windows_x86): Rename to ...
3906 (i386_arch_setup): ... this. Set `win32_tdesc'.
3907 (the_low_target): Adjust.
3908 * win32-low.c (win32_tdesc): New global.
3909 (child_add_thread): Don't create the thread cache here.
3910 (do_initial_child_stuff): Set the new process'es tdesc.
3911 * win32-low.h (struct target_desc): Forward declare.
3912 (win32_tdesc): Declare.
3913 * lynx-i386-low.c (tdesc_i386): Declare global.
3914 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3915 * lynx-low.c (lynx_tdesc): New global.
3916 (lynx_add_process): Set the new process'es tdesc.
3917 * lynx-low.h (struct target_desc): Forward declare.
3918 (lynx_tdesc): Declare global.
3919 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3920 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3921 * nto-low.c (nto_tdesc): New global.
3922 (do_attach): Set the new process'es tdesc.
3923 * nto-low.h (struct target_desc): Forward declare.
3924 (nto_tdesc): Declare.
3925 * nto-x86-low.c (tdesc_i386): Declare.
3926 (nto_x86_arch_setup): Set `nto_tdesc'.
3927
3928 2013-06-04 Gary Benson <gbenson@redhat.com>
3929
3930 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3931 to qSupported response when appropriate.
3932 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3933 with nonzero-length annex.
3934 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3935 arguments supplied in annex.
3936
3937 2013-05-31 Doug Evans <dje@google.com>
3938
3939 PR server/15594
3940 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3941 64 bits in 64-cross-32 environment.
3942
3943 2013-05-28 Pedro Alves <palves@redhat.com>
3944
3945 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3946 (aarch64-without-fpu.c): Delete rule.
3947 * configure.srv (aarch64*-*-linux*): Remove references to
3948 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3949 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3950 declaration.
3951
3952 2013-05-24 Pedro Alves <palves@redhat.com>
3953
3954 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3955 instead of strchr/decode_address. Error if the range isn't split
3956 with a ','. Don't assume there's be a ':' in the action.
3957
3958 2013-05-23 Yao Qi <yao@codesourcery.com>
3959 Pedro Alves <palves@redhat.com>
3960
3961 * linux-low.c (lwp_in_step_range): New function.
3962 (linux_wait_1): If the thread was range stepping and stopped
3963 outside the stepping range, report the stop to GDB. Otherwise,
3964 continue stepping. Add range stepping debug output.
3965 (linux_set_resume_request): Copy the step range from the resume
3966 request to the lwp.
3967 (linux_supports_range_stepping): New.
3968 (linux_target_ops) <supports_range_stepping>: Set to
3969 linux_supports_range_stepping.
3970 * linux-low.h (struct linux_target_ops)
3971 <supports_range_stepping>: New field.
3972 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3973 * linux-x86-low.c (x86_supports_range_stepping): New.
3974 (the_low_target) <supports_range_stepping>: Set to
3975 x86_supports_range_stepping.
3976 * server.c (handle_v_cont): Handle 'r' action.
3977 (handle_v_requests): Append ";r" if the target supports range
3978 stepping.
3979 * target.h (struct thread_resume) <step_range_start,
3980 step_range_end>: New fields.
3981 (struct target_ops) <supports_range_stepping>:
3982 New field.
3983 (target_supports_range_stepping): New macro.
3984
3985 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3986
3987 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3988 confusion in comment.
3989
3990 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3991
3992 * lynx-low.c (struct process_info_private): New type.
3993 (lynx_add_process): New function.
3994 (lynx_create_inferior, lynx_attach): Replace calls to
3995 add_process by calls to lynx_add_process.
3996 (lynx_resume): If PTID is null, then try using
3997 current_process()->private->last_wait_event_ptid.
3998 Add comments.
3999 (lynx_clear_inferiors): Delete. The contents of that function
4000 has been inlined in lynx_mourn;
4001 (lynx_wait_1): Save the ptid in the process's private data.
4002 (lynx_mourn): Free the process' private data. Replace call
4003 to lynx_clear_inferiors by call to clear_inferiors.
4004
4005 2013-05-17 Yao Qi <yao@codesourcery.com>
4006
4007 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4008 the right place.
4009
4010 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
4011
4012 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4013 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4014 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4015 PT_TEXT_END_ADDR guards. Update comments.
4016 (linux_target_op) <read_offsets>: Conditionally define to
4017 linux_read_offsets if the target is UCLIBC and if it defines
4018 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4019
4020 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4021 Andrew Jenner <andrew@codesourcery.com>
4022
4023 * Makefile.in (SFILES): Add linux-nios2-low.c.
4024 (clean): Add action to delete nios2-linux.c.
4025 (nios2-linux.c): New rule.
4026 * configure.srv: Add nios2*-*-linux*.
4027 * linux-nios2-low.c: New.
4028
4029 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4030
4031 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4032
4033 2013-04-25 Hui Zhu <hui@codesourcery.com>
4034
4035 PR gdb/15186
4036 * ax.c (ax_printf): Add fflush.
4037
4038 2013-04-22 Tom Tromey <tromey@redhat.com>
4039
4040 * Makefile.in (SFILES): Add filestuff.c.
4041 (OBS): Add filestuff.o.
4042 (filestuff.o): New target.
4043 * config.in, configure: Rebuild.
4044 * configure.ac: Check for fdwalk, pipe2.
4045
4046 2013-04-17 Pedro Alves <palves@redhat.com>
4047
4048 * configure.ac (USE_THREAD_DB): Delete variable.
4049 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4050 Don't AC_SUBST USE_THREAD_DB.
4051 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4052 * config.in, configure: Regenerate.
4053
4054 2013-04-16 Pedro Alves <palves@redhat.com>
4055
4056 * linux-low.h (struct lwp_info) <thread_known>: Move under
4057 the USE_THREAD_DB #ifdef.
4058
4059 2013-04-16 Pedro Alves <palves@redhat.com>
4060
4061 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4062 (linux-low.o): Delete rule.
4063 * linux-low.h: Always include "gdb_thread_db.h" instead of
4064 conditionally including thread_db.h.
4065 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4066 HAVE_THREAD_DB_H.
4067
4068 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4069
4070 * Makefile.in (install-only): Fix make install regression.
4071
4072 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4073
4074 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4075 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4076 installation.
4077 * gdbserver.1: Remove.
4078
4079 2013-03-22 Pedro Alves <palves@redhat.com>
4080
4081 * linux-low.c (handle_extended_wait): Don't call
4082 linux_enable_event_reporting.
4083
4084 2013-03-15 Tony Theodore <tonyt@logyst.com>
4085
4086 PR build/9098:
4087 * Makefile.in (SHELL): Use @SHELL@.
4088
4089 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4090
4091 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4092 compiler warning.
4093
4094 2013-03-13 Joel Brobecker <brobecker@adacore.com>
4095
4096 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4097 Remove extraneous NULL element.
4098
4099 2013-03-13 Yao Qi <yao@codesourcery.com>
4100
4101 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4102 'V' block in trace frame.
4103
4104 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4105
4106 * target.h (struct target_ops): Add btrace ops.
4107 (target_supports_btrace): New macro.
4108 (target_enable_btrace): New macro.
4109 (target_disable_btrace): New macro.
4110 (target_read_btrace): New macro.
4111 * gdbthread.h (struct thread_info): Add btrace field.
4112 * server.c: Include btrace-common.h.
4113 (handle_btrace_general_set): New function.
4114 (handle_btrace_enable): New function.
4115 (handle_btrace_disable): New function.
4116 (handle_general_set): Call handle_btrace_general_set.
4117 (handle_qxfer_btrace): New function.
4118 (struct qxfer qxfer_packets[]): Add btrace entry.
4119 * inferiors.c (remove_thread): Disable btrace.
4120 * linux-low: Include linux-btrace.h.
4121 (linux_low_enable_btrace): New function.
4122 (linux_low_read_btrace): New function.
4123 (linux_target_ops): Add btrace ops.
4124 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4125 Add srv_linux_btrace=yes.
4126 (x86_64-*-linux*): Add linux-btrace.o.
4127 Add srv_linux_btrace=yes.
4128 * configure.ac: Define HAVE_LINUX_BTRACE.
4129 * config.in: Regenerated.
4130 * configure: Regenerated.
4131
4132 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4133
4134 * server.c (handle_qxfer): Preserve error message if -3 is
4135 returned.
4136 (qxfer): Document the -3 return value.
4137
4138 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4139
4140 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4141 (linux_btrace_h): New variable.
4142 (linux-btrace.o): New rule.
4143
4144 2013-03-08 Stan Shebs <stan@codesourcery.com>
4145 Hafiz Abid Qadeer <abidh@codesourcery.com>
4146
4147 * tracepoint.c (trace_buffer_size): New global.
4148 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4149 (init_trace_buffer): Change to one-argument function. Allocate
4150 trace buffer memory.
4151 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4152 handle QTBuffer:size packet.
4153 (cmd_bigqtbuffer_size): New function.
4154 (initialize_tracepoint): Call init_trace_buffer with
4155 DEFAULT_TRACE_BUFFER_SIZE.
4156 * server.c (handle_query): Add QTBuffer:size in the
4157 supported packets.
4158
4159 2013-03-07 Yao Qi <yao@codesourcery.com>
4160
4161 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4162 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4163 of -1.
4164 (cmd_qtsp): Adjust condition. Do post increment.
4165 Set cur_action and cur_step_action back to 0.
4166
4167 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4168
4169 PR server/15236
4170 * linux-low.c (linux_write_memory): Return early success if LEN is
4171 zero.
4172
4173 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
4174
4175 * configure.srv: Add x86_64-*-cygwin* as target.
4176
4177 2013-02-28 Tom Tromey <tromey@redhat.com>
4178
4179 * configure.ac: Invoke AC_SYS_LARGEFILE.
4180 * configure, config.in: Rebuild.
4181
4182 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
4183
4184 * win32-low.c: Throughout, fix format strings and casts of
4185 printf-like functions to avoid type related warnings on all
4186 platforms.
4187 (get_child_debug_event): Print dwDebugEventCode as hex since
4188 that's how it's usually documented.
4189
4190 2013-02-28 Yao Qi <yao@codesourcery.com>
4191
4192 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4193 pulongest.
4194
4195 2013-02-27 Jiong Wang <jiwang@tilera.com>
4196
4197 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4198 (reg-tilegx32.c): New rule.
4199 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4200 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4201 different register info initializer according to elf class.
4202 (init_registers_tilgx32): New function. The tilegx32 register info
4203 initializer.
4204 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4205 (tile_store_gregset): Likewise.
4206
4207 2013-02-27 Yao Qi <yao@codesourcery.com>
4208
4209 * server.c (process_point_options): Print debug message when
4210 debug_threads is true.
4211
4212 2013-02-26 Yao Qi <yao@codesourcery.com>
4213
4214 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4215
4216 2013-02-19 Pedro Alves <palves@redhat.com>
4217 Kai Tietz <ktietz@redhat.com>
4218
4219 PR gdb/15161
4220
4221 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4222 instead of strtoul to extract address from packet.
4223 (process_serial_event) <'z'>: Likewise.
4224
4225 2013-02-18 Yao Qi <yao@codesourcery.com>
4226
4227 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4228
4229 2013-02-14 Pedro Alves <palves@redhat.com>
4230
4231 Plug memory leak.
4232
4233 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4234 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4235
4236 2013-02-14 Pedro Alves <palves@redhat.com>
4237
4238 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4239
4240 2013-02-14 Pedro Alves <palves@redhat.com>
4241
4242 * tracepoint.c (save_string): Delete.
4243 (add_tracepoint_action): Use savestring instead of save_string.
4244
4245 2013-02-12 Pedro Alves <palves@redhat.com>
4246
4247 * linux-xtensa-low.c: Ditto.
4248 * xtensa-xtregs.c: Ditto.
4249
4250 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4251
4252 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4253 thread_db.
4254
4255 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4256
4257 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4258 aarch64_num_wp_regs and aarch64_num_bp_regs to
4259 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4260
4261 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4262
4263 * linux-aarch64-low.c (ps_get_thread_area): Replace
4264 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4265
4266 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4267 Marcus Shawcroft <marcus.shawcroft@arm.com>
4268 Nigel Stephens <nigel.stephens@arm.com>
4269 Yufeng Zhang <yufeng.zhang@arm.com>
4270
4271 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4272 (aarch64.c, aarch64-without-fpu.c): New targets.
4273 * configure.srv (aarch64*-*-linux*): New.
4274 * linux-aarch64-low.c: New file.
4275
4276 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4277
4278 * linux-low.c (handle_extended_wait, linux_create_inferior)
4279 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4280 (dequeue_one_deferred_signal, linux_resume_one_thread)
4281 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4282 (linux_tracefork_grandchild, linux_test_for_tracefork)
4283 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4284 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4285 where the argument is 0.
4286
4287 2013-01-25 Yao Qi <yao@codesourcery.com>
4288
4289 * event-loop.c: Include "queue.h".
4290 (gdb_event_p): New typedef.
4291 (struct gdb_event) <next_event>: Remove.
4292 (event_queue): Change to QUEUE(gdb_event_p).
4293 (async_queue_event): Remove.
4294 (gdb_event_xfree): New.
4295 (initialize_event_loop): New.
4296 (process_event): Use API from QUEUE.
4297 (wait_for_event): Likewise.
4298 * server.c (main): Call initialize_event_loop.
4299 * server.h (initialize_event_loop): Declare.
4300
4301 2013-01-18 Yao Qi <yao@codesourcery.com>
4302
4303 * ax.h (struct eval_agent_expr_context): New.
4304 (gdb_eval_agent_expr): Update declaration.
4305 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4306 TFRAME. Add new argument CTX.
4307 * server.h (struct eval_agent_expr_context): Declare.
4308 (agent_mem_read, agent_tsv_read): Update declaration.
4309 (agent_mem_read_string): Likewise.
4310 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4311 (add_traceframe_block): Add new argument TPOINT.
4312 Increase TPOINT->traceframe_usage.
4313 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4314 eval_tracepoint_agent_expr.
4315 (condition_true_at_tracepoint): Likewise.
4316 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4317 (agent_mem_read_string, agent_tsv_read): Likewise.
4318
4319 2013-01-16 Yao Qi <yao@codesourcery.com>
4320
4321 * linux-low.c (linux_resume_one_lwp): Don't check
4322 'lwp->bp_reinsert != 0'.
4323
4324 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4325 Pedro Alves <palves@redhat.com>
4326
4327 * lynx-low.c (ptrace_request_to_str): Define a temporary
4328 macro and use it to simplify this function's implementation.
4329
4330 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4331
4332 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4333 sets errno.
4334
4335 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4336
4337 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4338
4339 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4340
4341 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4342
4343 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4344
4345 * lynx-low.c (lynx_resume): Use the resume_info parameter
4346 to determine the ptid for the lynx_ptrace call, unless
4347 it is equal to minus_one_ptid, in which case we use the
4348 ptid of the current_inferior.
4349 (lynx_wait_1): After having received a thread create/exit
4350 event, resume the inferior's execution using the signaling
4351 thread's ptid, rather than the old ptid.
4352
4353 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4354
4355 * lynx-low.c (lynx_resume): Delete variable ret.
4356
4357 2013-01-01 Joel Brobecker <brobecker@adacore.com>
4358
4359 * gdbreplay.c (gdbreplay_version): Update copyright year.
4360 * server.c (gdbserver_version): Likewise.
4361
4362 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4363
4364 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4365 new thread.
4366
4367 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4368
4369 * lynx-low.c (ptrace_request_to_str): Add handling for
4370 PTRACE_GETTRACESIG.
4371
4372 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4373
4374 * lynx-low.c (lynx_attach): Delete variable new_process.
4375
4376 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4377
4378 * lynx-low.c (lynx_create_inferior): Delete variable
4379 new_process.
4380
4381 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4382
4383 * lynx-low.c (ptrace_request_to_str): Do not handle
4384 PTRACE_GETTHREADLIST if this macro does not exist.
4385
4386 2012-12-15 Yao Qi <yao@codesourcery.com>
4387
4388 * Makefile.in (OBS): Add notif.o.
4389 * notif.c, notif.h: New.
4390 * server.c: Include "notif.h".
4391 (struct vstop_notif) <next>: Remove.
4392 <base>: New field.
4393 (queue_stop_reply): Update.
4394 (push_event, send_next_stop_reply): Remove.
4395 (discard_queued_stop_replies): Update.
4396 (notif_stop): New variable.
4397 (handle_v_stopped): Remove.
4398 (handle_v_requests): Don't call handle_v_stopped. Call
4399 handle_ack_notif instead.
4400 (queue_stop_reply_callback): Call notif_event_enque instead
4401 of queue_stop_reply.
4402 (handle_status): Don't call send_next_stop_reply, call
4403 notif_write_event instead.
4404 (kill_inferior_callback): Likewise.
4405 (detach_or_kill_inferior_callback): Likewise.
4406 (main): Call initialize_notif.
4407 (process_serial_event): Call QUEUE_is_empty.
4408 (handle_target_event): Call notif_push instead of push event.
4409 * server.h (push_event): Remove declaration.
4410
4411 2012-12-10 Tom Tromey <tromey@redhat.com>
4412
4413 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4414 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4415 macros.
4416 (.c.o): Rewrite.
4417 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4418 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4419 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4420 (amd64-linux-ipa.o, ax.o): Rewrite.
4421 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4422 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4423 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4424 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4425 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4426 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4427 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4428 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4429 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4430 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4431 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4432 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4433 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4434 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4435 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4436 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4437 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4438 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4439 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4440 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4441 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4442 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4443 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4444 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4445 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4446 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4447 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4448 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4449 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4450 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4451 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4452 (reg-tilegx.o): Remove.
4453 (all_object_files): New macro.
4454 Include .deps files.
4455 * aclocal.m4, configure: Rebuild.
4456 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4457 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4458 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4459
4460 2012-12-05 Tom Tromey <tromey@redhat.com>
4461
4462 PR gdb/14917:
4463 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4464
4465 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
4466
4467 * configure.ac: Check for linux/perf_event.h.
4468 * config.in: Regenerated.
4469 * configure: Regenerated.
4470
4471 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4472
4473 * hostio.c (handle_readlink): Decrease buffer size
4474 parameter passed to readlink by one byte.
4475
4476 2012-11-26 Yao Qi <yao@codesourcery.com>
4477
4478 * configure.ac (build_warnings): Append '-Wempty-body'.
4479 * configure: Regenerated.
4480 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4481 body.
4482
4483 2012-11-15 Pierre Muller <muller@sourceware.org>
4484
4485 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4486 * config.in: Regenerate.
4487 * configure: Regenerate.
4488 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4489 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4490 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4491 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4492 header.
4493 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4494 instead of <sys/wait.h> header.
4495 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4496
4497 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
4498
4499 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4500 (various make rules): Remove -DGDBSERVER
4501
4502 2012-11-09 Yao Qi <yao@codesourcery.com>
4503
4504 * spu-low.c (current_ptid): Move it to ..
4505 * gdbthread.h: ... here. New.
4506 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4507 * server.c (myresume, process_serial_event): Likewise.
4508 * thread-db.c (thread_db_find_new_threads): Likewise.
4509 * tracepoint.c (run_inferior_command): Likewise.
4510
4511 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
4512
4513 * server.c (handle_search_memory_1): Include access length in
4514 warning message.
4515
4516 2012-09-05 Michael Brandt <michael.brandt@axis.com>
4517
4518 * linux-crisv32-low.c: Fix compile errors.
4519
4520 2012-09-04 Yao Qi <yao@codesourcery.com>
4521
4522 * tracepoint.c (cmd_qtsv): Adjust debug message.
4523 Don't check CUR_TPOINT.
4524
4525 2012-08-28 Yao Qi <yao@codesourcery.com>
4526
4527 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4528 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4529 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4530 Remove declarations of xmalloc, xreallloc, xstrdup and
4531 freeargv.
4532 * Makefile.in (libiberty_h): New.
4533 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4534 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4535
4536 2012-08-23 Yao Qi <yao@codesourcery.com>
4537
4538 * server.h: Remove declaration of 'xsnprintf'.
4539
4540 2012-08-22 Keith Seitz <keiths@redhat.com>
4541
4542 * server.h: Include build-gnulib-gbserver/config.h.
4543 * gdbreplay.c: Likewise.
4544
4545 2012-08-08 Doug Evans <dje@google.com>
4546
4547 * Makefile.in (SFILES): Add gdb_vecs.c.
4548 (OBS): Add gdb_vecs.o.
4549 (gdb_vecs_h, host_defs_h): New variables.
4550 (thread-db.o): Add $(gdb_vecs_h) dependency.
4551 (gdb_vecs.o): New rule.
4552 * thread-db.c: #include "gdb_vecs.h".
4553 (thread_db_load_search): Use a vector to iterate over path elements.
4554 Handle text appearing after "$pdir".
4555
4556 * configure.ac: Add check for strstr.
4557 * config.in: Regenerate.
4558 * configure: Regenerate.
4559
4560 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4561
4562 * hostio.c (handle_pread): If pread fails, fall back to attempting
4563 lseek/read.
4564 (handle_pwrite): Likewise for pwrite.
4565
4566 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4567
4568 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4569 between unsupported TYPE and unimplementable ADDR/LEN combination.
4570 (arm_insert_point): Act on new return value.
4571
4572 2012-07-31 Pedro Alves <palves@redhat.com>
4573
4574 * server.c (process_point_options): Only skip tokens if we find
4575 one that is unrecognized. Don't treat 'X' specially while
4576 skipping unrecognized tokens.
4577
4578 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4579
4580 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4581 to 4-byte-align HW breakpoint addresses for Thumb.
4582
4583 2012-07-27 Yao Qi <yao@codesourcery.com>
4584
4585 PR remote/14161.
4586
4587 * server.h: Declare gdb_agent_about_to_close.
4588 * target.c (kill_inferior): Include "agent.h".
4589 New. Send command 'kill'.
4590 * target.h (kill_inferior): Removed macro.
4591 * tracepoint.c (gdb_agent_about_to_close): New.
4592 (gdb_agent_helper_thread): Handle command 'close'.
4593 Wait endlessly until the inferior stops.
4594 Install gdb_agent_remove_socket to atexit hook.
4595 (agent_socket_name): New static variable.
4596 (gdb_agent_socket_init): Replace local variable 'name' with
4597 'agent_socket_name'.
4598 (gdb_agent_remove_socket): New.
4599
4600 2012-07-27 Yao Qi <yao@codesourcery.com>
4601
4602 * server.c (process_point_options): Stop at 'X' when parsing.
4603
4604 2012-07-19 Michael Eager <eager@eagercon.com>
4605
4606 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
4607 to hw_execute.
4608 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4609 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4610 hardware breakpoint.
4611
4612 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4613
4614 * gdbserver/linux-low.c (initialize_low): Call
4615 linux_ptrace_init_warnings.
4616
4617 2012-07-02 Doug Evans <dje@google.com>
4618
4619 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4620 pointer to int.
4621
4622 2012-07-02 Stan Shebs <stan@codesourcery.com>
4623
4624 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4625 (ax.o): Add it to build rule.
4626 (ax-ipa.o): Ditto.
4627 (OBS): Add format.o.
4628 (IPA_OBS): Add format.o.
4629 * server.c (handle_query): Claim support for breakpoint commands.
4630 (process_point_options): Add command case.
4631 (process_serial_event): Leave running if there are printfs in
4632 effect.
4633 * mem-break.h (any_persistent_commands): Declare.
4634 (add_breakpoint_commands): Declare.
4635 (gdb_no_commands_at_breakpoint): Declare.
4636 (run_breakpoint_commands): Declare.
4637 * mem-break.c (struct point_command_list): New struct.
4638 (struct breakpoint): New field command_list.
4639 (any_persistent_commands): New function.
4640 (add_commands_to_breakpoint): New function.
4641 (add_breakpoint_commands): New function.
4642 (gdb_no_commands_at_breakpoint): New function.
4643 (run_breakpoint_commands): New function.
4644 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4645 locally.
4646 * ax.c: Include format.h.
4647 (ax_printf): New function.
4648 (gdb_eval_agent_expr): Add printf opcode.
4649
4650 2012-06-13 Yao Qi <yao@codesourcery.com>
4651
4652 * server.c (start_inferior): Remove duplicated writes to fields
4653 'last_resume_kind' and 'last_status' of 'current_inferior'.
4654
4655 2012-06-12 Yao Qi <yao@codesourcery.com>
4656 Pedro Alves <palves@redhat.com>
4657
4658 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4659 comment.
4660 * server.c (handle_v_cont): Extend comment.
4661
4662 2012-06-11 Yao Qi <yao@codesourcery.com>
4663
4664 * linux-low.c (linux_attach): Add 'static'.
4665
4666 2012-06-06 Yao Qi <yao@codesourcery.com>
4667
4668 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4669
4670 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4671
4672 Fix gcc -flto compilation warning.
4673 * server.c (main): Make variable multi_mode and attach volatile.
4674
4675 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4676
4677 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4678 if the platform doesn't know about it.
4679
4680 2012-05-30 Jeff Kenton <jkenton@tilera.com>
4681
4682 * Makefile.in (SFILES): Add linux-tile-low.c.
4683 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4684 * configure.srv: Handle tilegx-*-linux*.
4685 * linux-tile-low.c: New file.
4686
4687 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4688
4689 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4690
4691 2012-05-24 Pedro Alves <palves@redhat.com>
4692
4693 PR gdb/7205
4694
4695 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
4696
4697 2012-05-24 Pedro Alves <palves@redhat.com>
4698
4699 PR gdb/7205
4700
4701 Replace target_signal with gdb_signal throughout.
4702
4703 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4704
4705 * linux-low.c (linux_store_registers): Avoid the copying sequence
4706 when no data has been retrieved by ptrace.
4707
4708 2012-05-22 Will Deacon <will.deacon@arm.com>
4709
4710 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4711 Include asm/ptrace.h.
4712 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4713 already defined.
4714
4715 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4716
4717 * linux-low.c (linux_store_registers): Don't re-retrieve data
4718 with ptrace that has already been obtained from /proc. Always
4719 copy any data retrieved with ptrace to the buffer supplied.
4720
4721 2012-05-11 Yao Qi <yao@codesourcery.com>
4722 Pedro Alves <palves@redhat.com>
4723
4724 * linux-low.c (enum stopping_threads_kind): New.
4725 (stopping_threads): Change type to `enum stopping_threads_kind'.
4726 (handle_extended_wait): If stopping and suspending threads, leave
4727 the new_lwp suspended too.
4728 (linux_wait_for_event): Adjust.
4729 (stop_all_lwps): Set `stopping_threads' to
4730 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4731 whether we're suspending threads or just stopping them. Assert no
4732 recursion happens.
4733
4734 2012-04-29 Yao Qi <yao@codesourcery.com>
4735
4736 * server.h: Move some code to ...
4737 * gdbthread.h: ... here. New.
4738 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4739 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4740 (nto-low.o, win32-low.o): Likewise.
4741 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4742 * regcache.c, remote-utils.c, server.c: Likewise.
4743 * target.c, tracepoint.c, win32-low.c: Likewise.
4744
4745 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4746
4747 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4748 (PTRACE_ARG4_TYPE): Likewise.
4749 (PTRACE_XFER_TYPE): Likewise.
4750 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4751 ptrace to PTRACE_ARG3_TYPE.
4752 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4753 (PTRACE_ARG4_TYPE): Likewise.
4754 (PTRACE_XFER_TYPE): Likewise.
4755 (linux_detach_one_lwp): Cast fourth argument of
4756 ptrace to long then PTRACE_ARG4_TYPE.
4757 (regsets_fetch_inferior_registers): Cast third argument of
4758 ptrace to long then PTRACE_ARG3_TYPE.
4759 (regsets_store_inferior_registers): Likewise.
4760
4761 2012-04-20 Pedro Alves <palves@redhat.com>
4762
4763 * configure: Regenerate.
4764
4765 2012-04-19 Pedro Alves <palves@redhat.com>
4766
4767 * Makefile.in (GNULIB_BUILDDIR): New.
4768 (LIBGNU, INCGNU, GNULIB_H): Adjust.
4769 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4770 (all, install-only, uninstall, clean-info, all-lib, clean): No
4771 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4772 (maintainer-clean realclean distclean): Use subdir_do.
4773 (subdir_do): New.
4774 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
4775 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
4776 * acinclude.m4: Include acx_configure_dir.m4.
4777 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4778 calls. Call AC_PROG_RANLIB. Configure gnulib using
4779 ACX_CONFIGURE_DIR.
4780 (GNULIB): New.
4781 (GNULIB_STDINT_H): Adjust.
4782 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4783 * gdbreplay.c: Include build-gnulib/config.h.
4784 * server.h: Likewise.
4785 * aclocal.m4: Regenerate.
4786 * config.in: Regenerate.
4787 * configure: Regenerate.
4788
4789 2012-04-19 Pedro Alves <palves@redhat.com>
4790
4791 * Makefile.in (LIBGNU, INCGNU): Adjust.
4792 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4793 (all, install-only, uninstall, clean-info, all-lib, clean)
4794 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4795 * configure.ac: Adjust AC_OUTPUT output.
4796 * aclocal.m4: Regenerate.
4797 * configure: Regenerate.
4798
4799 2012-04-19 Pedro Alves <palves@redhat.com>
4800
4801 * Makefile.in (generated_files): New.
4802 (server_h): Remove the explicit dependency on config.h, and depend
4803 on $generated_files.
4804
4805 2012-04-19 Pedro Alves <palves@redhat.com>
4806
4807 * Makefile.in (INCGNU): Add -Ignulib.
4808
4809 2012-04-19 Pedro Alves <palves@redhat.com>
4810
4811 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4812 (INCGNU): ... this, and spell out -I here.
4813 (GNULIB_LIB): Rename to ...
4814 (LIBGNU): ... this.
4815 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4816
4817 2012-04-19 Pedro Alves <palves@redhat.com>
4818
4819 * config.in: Regenerate.
4820
4821 2012-04-19 Pedro Alves <palves@redhat.com>
4822
4823 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4824 * server.h (memmem): Remove declaration.
4825 * config.in: Regenerate.
4826 * configure: Regenerate.
4827
4828 2012-04-19 Yao Qi <yao@codesourcery.com>
4829
4830 * Makefile.in (SFILES): Add common/vec.c.
4831 (OBS): Add vec.o.
4832 (vec.o): New rule.
4833
4834 2012-04-19 Yao Qi <yao@codesourcery.com>
4835
4836 * remote-utils.c (prepare_resume_reply): Replace with macro
4837 target_core_of_thread.
4838 * server.c (handle_qxfer_threads_proper): Likewise.
4839 * target.h (traget_core_of_thread): New macro.
4840
4841 2012-04-18 Pedro Alves <palves@redhat.com>
4842
4843 * aclocal.m4: Regenerate.
4844 * configure: Regenerate.
4845
4846 2012-04-16 Yao Qi <yao@codesourcery.com>
4847
4848 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4849 duplicated on address.
4850
4851 2012-04-16 Yao Qi <yao@codesourcery.com>
4852
4853 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4854 (struct tracepoint_action_ops) <send>: New field.
4855 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4856 (agent_expr_send, x_tracepoint_action_send): New.
4857 (l_tracepoint_action_send): New.
4858 (cmd_qtdp): Download and install tracepoint
4859 according to `use_agent'.
4860 (run_inferior_command): Add one more parameter `len'.
4861 Update callers.
4862 (tracepoint_send_agent): New.
4863 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4864
4865 2012-04-16 Yao Qi <yao@codesourcery.com>
4866
4867 * tracepoint.c (download_tracepoints): Moved to ...
4868 (cmd_qtstart): ... here.
4869
4870 2012-04-14 Yao Qi <yao@codesourcery.com>
4871
4872 * tracepoint.c: Include inttypes.h.
4873 (struct collect_memory_action): Use sized types.
4874 (struct tracepoint): Likewise.
4875 (cmd_qtdp, stop_tracing): Update print specifiers.
4876 (cmd_qtp, response_tracepoint): Likewise.
4877 (collect_data_at_tracepoint): Likewise.
4878 (collect_data_at_step): Likewise.
4879
4880 2012-04-14 Yao Qi <yao@codesourcery.com>
4881
4882 Import gnulib module inttypes.
4883 * aclocal.m4, config.in, configure: Regenerated.
4884
4885 2012-04-14 Yao Qi <yao@codesourcery.com>
4886
4887 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4888 Makefile and config.status at last.
4889
4890 2012-04-13 Yao Qi <yao@codesourcery.com>
4891
4892 * tracepoint.c: Include stdint.h unconditionally.
4893
4894 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4895
4896 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4897 on BFD_HAVE_SYS_PROCFS_TYPE.
4898 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4899 * configure: Regenerate.
4900 * config.in: Likewise.
4901
4902 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4903
4904 * Makefile.in (clean): Also remove x32.c x32-linux.c
4905 x32-avx.c x32-avx-linux.c.
4906 (x32.o): New target.
4907 (x32.c): Likewise.
4908 (x32-linux.o): Likewise.
4909 (x32-linux.c): Likewise.
4910 (x32-avx.o): Likewise.
4911 (x32-avx.c): Likewise.
4912 (x32-avx-linux.o): Likewise.
4913 (x32-avx-linux.c): Likewise.
4914
4915 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4916 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4917 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4918 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4919 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4920 i386/x32-avx-linux.xml.
4921
4922 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4923 (init_registers_x32_avx_linux): Likwise.
4924 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4925 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4926
4927 2012-04-13 Pedro Alves <palves@redhat.com>
4928
4929 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4930 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4931 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4932 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4933 the sub-make.
4934
4935 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4936
4937 * linux-x86-low.c (compat_x32_clock_t): New.
4938 (compat_x32_siginfo_t): Likewise.
4939 (compat_x32_siginfo_from_siginfo): Likewise.
4940 (siginfo_from_compat_x32_siginfo): Likewise.
4941 (linux_is_elf64): Likewise.
4942 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4943 and siginfo_from_compat_x32_siginfo for x32.
4944 (x86_arch_setup): Set linux_is_elf64.
4945
4946 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4947
4948 PR gdb/13969
4949 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4950 e_machine field.
4951 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4952 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4953 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4954 compatible with process.
4955
4956 2012-04-12 Yao Qi <yao@codesourcery.com>
4957
4958 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4959 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4960 (install-only, install-info, clean): Handle sub dir gnulib.
4961 (all-lib, am--refresh): New targets.
4962 (memmem.o): Remove target.
4963 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4964 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4965 (AC_REPLACE_FUNCS): Remove memmem.
4966 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4967 (AC_OUTPUT): Generate Makefile in gnulib/.
4968 * aclocal.m4, config.in, configure: Regenerated.
4969
4970 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4971
4972 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4973
4974 2012-04-05 Pedro Alves <palves@redhat.com>
4975
4976 -Werror=strict-aliasing
4977
4978 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4979 pointer.
4980
4981 2012-04-04 Pedro Alves <palves@redhat.com>
4982
4983 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4984 (sparc_store_gregset_from_stack, sparc_store_gregset)
4985 (sparc_breakpoint_at): Fix formatting.
4986
4987 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4988
4989 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4990 are available.
4991 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4992 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4993 * config.in: Regenerate.
4994 * configure: Likewise.
4995
4996 2012-03-29 Pedro Alves <palves@redhat.com>
4997
4998 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4999 Correct ptrace arguments.
5000
5001 2012-03-28 Pedro Alves <palves@redhat.com>
5002
5003 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5004 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5005 (IA64_FR1_REGNUM): New defines.
5006 (ia64_fetch_register): New.
5007 (the_low_target): Install it.
5008 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5009 field.
5010 * linux-low.c (linux_fetch_registers): Try the
5011 the_low_target.fetch_register hook first.
5012
5013 * linux-arm-low.c (the_low_target): Adjust.
5014 * linux-bfin-low.c (the_low_target): Adjust.
5015 * linux-cris-low.c (the_low_target): Adjust.
5016 * linux-crisv32-low.c (the_low_target): Adjust.
5017 * linux-m32r-low.c (the_low_target): Adjust.
5018 * linux-m68k-low.c (the_low_target): Adjust.
5019 * linux-mips-low.c (the_low_target): Adjust.
5020 * linux-ppc-low.c (the_low_target): Adjust.
5021 * linux-s390-low.c (the_low_target): Adjust.
5022 * linux-sh-low.c (the_low_target): Adjust.
5023 * linux-sparc-low.c (the_low_target): Adjust.
5024 * linux-tic6x-low.c (the_low_target): Adjust.
5025 * linux-x86-low.c (the_low_target): Adjust.
5026 * linux-xtensa-low.c (the_low_target): Adjust.
5027
5028 2012-03-26 Pedro Alves <palves@redhat.com>
5029
5030 * server.c (handle_qxfer_libraries): Don't bail early if
5031 the_target->qxfer_libraries_svr4 is not NULL.
5032
5033 2012-03-26 Pedro Alves <palves@redhat.com>
5034
5035 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5036
5037 2012-03-23 Pedro Alves <palves@redhat.com>
5038
5039 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5040 "library-list-svr4" element's start tag when the the DSO list is
5041 empty.
5042
5043 2012-03-23 Pedro Alves <palves@redhat.com>
5044
5045 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5046 a variable whose type size is the same as the inferior's pointer
5047 size.
5048
5049 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5050
5051 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5052 struct siginfo.
5053 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5054 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5055 * linux-low.h: Include <signal.h>.
5056 (struct siginfo): Remove forward declaration.
5057 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5058 struct siginfo.
5059
5060 2012-03-21 Mike Frysinger <vapier@gentoo.org>
5061
5062 * .gitignore: Ignore more files.
5063
5064 2012-03-19 Pedro Alves <palves@redhat.com>
5065 Jan Kratochvil <jan.kratochvil@redhat.com>
5066
5067 * server.c (cont_thread, general_thread): Add describing comments.
5068 (start_inferior): Clear `cont_thread'.
5069 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5070 of a process.
5071
5072 2012-03-15 Yao Qi <yao@codesourcery.com>
5073
5074 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5075 handling to ...
5076 (cmd_qtdp): ... here.
5077
5078 2012-03-15 Yao Qi <yao@codesourcery.com>
5079
5080 * tracepoint.c (struct tracepoint_action_ops): New.
5081 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5082 (m_tracepoint_action_download): New.
5083 (r_tracepoint_action_download): New.
5084 (x_tracepoint_action_download): New.
5085 (l_tracepoint_action_download): New.
5086 (add_tracepoint_action): Install `action->ops' according type.
5087 (download_tracepoint_1): Move code `download' function pointer
5088 of various tracepoint_action_ops.
5089
5090 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5091
5092 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5093 linux_ptrace_attach_warnings.
5094
5095 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5096
5097 * Makefile.in (linux-ptrace.o): New.
5098 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5099 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5100 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5101 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5102 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5103 of these targets.
5104 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5105
5106 2012-03-08 Yao Qi <yao@codesourcery.com>
5107 Pedro Alves <palves@redhat.com>
5108
5109 Fix PR server/13392.
5110 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5111 offset of JMP insn.
5112 * tracepoint.c (remove_tracepoint): New.
5113 (cmd_qtdp): Call remove_tracepoint when failed to install.
5114
5115 2012-03-07 Pedro Alves <palves@redhat.com>
5116
5117 * linux-low.c (get_detach_signal): New.
5118 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5119 Pass on pending signals to PTRACE_DETACH. Check the result of the
5120 ptrace call.
5121 * server.c (program_signals, program_signals_p): New.
5122 (handle_general_set): Handle QProgramSignals.
5123 * server.h (program_signals, program_signals_p): Declare.
5124
5125 2012-03-05 Pedro Alves <palves@redhat.com>
5126 Jan Kratochvil <jan.kratochvil@redhat.com>
5127
5128 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5129 New comment why.
5130
5131 2012-03-03 Yao Qi <yao@codesourcery.com>
5132
5133 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5134 agent_look_up_symbols.
5135
5136 2012-03-03 Yao Qi <yao@codesourcery.com>
5137
5138 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5139 (linux-x86-low.o): Likewise.
5140 * server.h: Remove in_process_agent_loaded.
5141 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5142 common/agent.c.
5143 Update callers.
5144
5145 2012-03-03 Yao Qi <yao@codesourcery.com>
5146
5147 * tracepoint.c (gdb_agent_capability): New global.
5148 (in_process_agent_loaded_ust): Renamed to
5149 `in_process_agent_supports_ust'.
5150 Update callers.
5151 (in_process_agent_supports_ust): Call agent_capability_check.
5152 (clear_installed_tracepoints): Assert that agent supports
5153 agent.
5154
5155 2012-03-03 Yao Qi <yao@codesourcery.com>
5156
5157 * linux-low.c (linux_supports_agent): New.
5158 (linux_target_ops): Initialize field `supports_agent' with
5159 linux_supports_agent.
5160 * target.h (struct target_ops) <supports_agent>: New.
5161 (target_supports_agent): New macro.
5162 * server.c (handle_general_set): Handle packet 'QAgent'.
5163 (handle_query): Send `QAgent+'.
5164 * Makefile.in (server.o): Depends on agent.h.
5165
5166 2012-03-03 Yao Qi <yao@codesourcery.com>
5167
5168 * Makefile.in (OBS): Add agent.o.
5169 Add new rule for agent.o.
5170 Track dependence of tracepoint.c on agent.h.
5171 * tracepoint.c (run_inferior_command_1):
5172 (run_inferior_command): Call agent_run_command.
5173 (gdb_ust_connect_sync_socket): Deleted. Move it to
5174 common/agent.c.
5175 (resume_thread, stop_thread): Likewise.
5176 (gdb_ust_socket_init): Renamed to ...
5177 (gdb_agent_socket_init): ... New.
5178 (gdb_ust_thread): Renamed to ...
5179 (gdb_agent_helper_thread): ... New.
5180 (gdb_ust_init): Move some code to ...
5181 (gdb_agent_init): ... here. New.
5182 [HAVE_UST]: Call gdb_ust_init.
5183 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5184 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5185 * config.in, configure: Regenerated.
5186
5187 2012-03-02 Pedro Alves <palves@redhat.com>
5188
5189 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5190 * linux-low.c (struct simple_pid_list): New.
5191 (stopped_pids): New a struct simple_pid_list pointer.
5192 (add_to_pid_list, pull_pid_from_list): New.
5193 (handle_extended_wait): Don't assume the first signal new children
5194 report is SIGSTOP. Adjust call to pull_pid_from_list.
5195 (linux_wait_for_lwp): Adjust.
5196
5197 2012-03-02 Yao Qi <yao@codesourcery.com>
5198
5199 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5200 debug log.
5201
5202 2012-03-02 Yao Qi <yao@codesourcery.com>
5203
5204 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5205 `stop_pc' and `tpoint'. Update caller.
5206
5207 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5208
5209 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5210 * linux-low.c (use_linux_regsets): New macro.
5211 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5212 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5213 (linux_register_in_regsets): New function.
5214 (usr_fetch_inferior_registers): Skip registers covered by
5215 regsets.
5216 (usr_store_inferior_registers): Likewise.
5217 (usr_fetch_inferior_registers): New macro.
5218 (usr_store_inferior_registers): Likewise.
5219 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5220 (linux_store_registers): Likewise.
5221 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5222 prototype.
5223 (init_registers_mips64_dsp_linux): Likewise.
5224 (init_registers_mips_linux): New macro.
5225 (init_registers_mips_dsp_linux): Likewise.
5226 (mips_dsp_num_regs): Likewise.
5227 (DSP_BASE, DSP_CONTROL): New fallback macros.
5228 (mips_base_regs): New macro.
5229 (mips_regmap): Use it. Fix the size.
5230 (mips_dsp_regmap): New variable.
5231 (mips_dsp_regset_bitmap): Likewise.
5232 (mips_arch_setup): New function.
5233 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5234 than mips_regmap.
5235 (mips_cannot_store_register): Likewise.
5236 (the_low_target): Update .arch_setup, .num_regs and .regmap
5237 initializers. Add .regset_bitmap initializer.
5238 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5239 initializer.
5240 * linux-bfin-low.c (the_low_target): Likewise.
5241 * linux-cris-low.c (the_low_target): Likewise.
5242 * linux-crisv32-low.c (the_low_target): Likewise.
5243 * linux-ia64-low.c (the_low_target): Likewise.
5244 * linux-m32r-low.c (the_low_target): Likewise.
5245 * linux-m68k-low.c (the_low_target): Likewise.
5246 * linux-ppc-low.c (the_low_target): Likewise.
5247 * linux-s390-low.c (the_low_target): Likewise.
5248 * linux-sh-low.c (the_low_target): Likewise.
5249 * linux-sparc-low.c (the_low_target): Likewise.
5250 * linux-tic6x-low.c (the_low_target): Likewise.
5251 * linux-x86-low.c (the_low_target): Likewise.
5252 * linux-xtensa-low.c (the_low_target): Likewise.
5253 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5254 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5255 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5256 srv_xmlfiles.
5257 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5258 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5259
5260 2012-02-29 Yao Qi <yao@codesourcery.com>
5261 Pedro Alves <palves@redhat.com>
5262
5263 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5264 `step_over_finished' is true.
5265
5266 2012-02-27 Pedro Alves <palves@redhat.com>
5267
5268 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5269 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5270
5271 2012-02-27 Pedro Alves <palves@redhat.com>
5272
5273 PR server/9684
5274 * linux-low.c (pid_is_stopped): New.
5275 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5276
5277 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
5278
5279 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5280 of conditions.
5281
5282 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5283
5284 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5285
5286 2012-02-24 Luis Machado <lgustavo@codesourcery>
5287
5288 * server.c (handle_query): Advertise support for target-side
5289 breakpoint condition evaluation.
5290 (process_point_options): New function.
5291 (process_serial_event): When inserting a breakpoint, check for
5292 a target-side condition that should be evaluated.
5293
5294 * mem-break.c: Include regcache.h and ax.h.
5295 (point_cond_list_t): New data structure.
5296 (breakpoint) <cond_list>: New field.
5297 (find_gdb_breakpoint_at): Make non-static.
5298 (delete_gdb_breakpoint_at): Clear any target-side
5299 conditions.
5300 (clear_gdb_breakpoint_conditions): New function.
5301 (add_condition_to_breakpoint): Likewise.
5302 (add_breakpoint_condition): Likewise.
5303 (gdb_condition_true_at_breakpoint): Likewise.
5304 (gdb_breakpoint_here): Return result directly instead
5305 of going through a local variable.
5306
5307 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5308 (clear_gdb_breakpoint_conditions): Likewise.
5309 (add_breakpoint_condition): Likewise.
5310 (gdb_condition_true_at_breakpoint): Likewise.
5311
5312 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5313 (need_step_over_p): Take target-side breakpoint condition into
5314 consideration.
5315
5316 2012-02-24 Luis Machado <lgustavo@codesourcery>
5317
5318 * server.h: Include tracepoint.h.
5319 (agent_mem_read, agent_get_trace_state_variable_value,
5320 agent_set_trace_state_variable_value,
5321 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5322 get_set_tsv_func_addr): New prototypes.
5323
5324 * ax.h: New include file.
5325 * ax.c: New source file.
5326
5327 * tracepoint.c: Include ax.h.
5328 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5329 agent_expr, eval_result_type): Move to ax.h.
5330 (parse_agent_expr): Rename to ...
5331 (gdb_parse_agent_expr): ... this, make it non-static and move
5332 to ax.h.
5333 (unparse_agent_expr) Rename to ...
5334 (gdb_unparse_agent_expr): ... this, make it non-static and move
5335 to ax.h.
5336 (eval_agent_expr): Rename to ...
5337 (eval_tracepoint_agent_expr): ... this.
5338 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5339 forward declarations.
5340 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5341 (agent_get_trace_state_variable_value): New function.
5342 (agent_set_trace_state_variable_value): New function.
5343 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5344 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5345 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5346 (condition_true_at_tracepoint): Likewise.
5347 (parse_agent_expr): Rename to ...
5348 (gdb_parse_agent_expr): ... this and move to ax.c.
5349 (unparse_agent_expr): Rename to ...
5350 (gdb_unparse_agent_expr): ... this and move to ax.c.
5351 (gdb_agent_op_name): Move to ax.c.
5352 (eval_agent_expr): Rename to ...
5353 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5354 and move to ax.c.
5355 (eval_tracepoint_agent_expr): New function.
5356 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
5357 non-static.
5358 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5359 ax.c.
5360 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5361 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5362 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5363 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5364 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5365 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5366 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5367 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5368 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5369 (compile_bytecodes): Remove forward declaration.
5370 (is_goto_target): Move to ax.c.
5371 (compile_bytecodes): Move to ax.c and call
5372 agent_get_trace_state_variable_value (...) and
5373 agent_set_trace_state_variable_value (...).
5374
5375 * Makefile.in: Update ax.c and IPA dependencies.
5376
5377 2012-02-24 Pedro Alves <palves@redhat.com>
5378
5379 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5380 (cmd_bigqtbuffer_circular): ... this. Only handle
5381 'QTBuffer:circular:'.
5382 (handle_tracepoint_general_set): Adjust.
5383
5384 2012-02-16 Yao Qi <yao@codesourcery.com>
5385
5386 * inferiors.c: Move code to ...
5387 * dll.c: .... here. New.
5388 * server.h: Declare clear_dlls.
5389 * Makefile.in (SFILES): Add dll.c.
5390 (OBS): Add dll.o
5391 (dll.o): New rule.
5392
5393 2012-02-11 Yao Qi <yao@codesourcery.com>
5394
5395 * server.c: (handle_monitor_command): Add a new parameter
5396 `own_buf'.
5397 (handle_query): Update caller.
5398
5399 2012-02-09 Joel Brobecker <brobecker@adacore.com>
5400
5401 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5402 * configure, config.in: Regenerate.
5403 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5404 is not defined.
5405
5406 2012-02-02 Pedro Alves <palves@redhat.com>
5407
5408 Try SIGKILL first, then PTRACE_KILL.
5409 * linux-low.c (linux_kill_one_lwp): New.
5410 (linux_kill_one_lwp): Rename to ...
5411 (kill_one_lwp_callback): ... this. Use the new
5412 linux_kill_one_lwp.
5413
5414 2012-02-02 Pedro Alves <palves@redhat.com>
5415
5416 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5417 inferior.
5418
5419 2012-01-27 Pedro Alves <palves@redhat.com>
5420
5421 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5422 (elf_64_file_p): Make static.
5423 (linux_pid_exe_is_elf_64_file): New.
5424 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5425 Delete declarations.
5426 (linux_pid_exe_is_elf_64_file): Declare.
5427 * linux-x86-low.c (x86_arch_setup): Use
5428 linux_pid_exe_is_elf_64_file.
5429
5430 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5431
5432 * linux-low.c (linux_wait_for_event_1): Rename to ...
5433 (linux_wait_for_event): ... here and merge it with former
5434 linux_wait_for_event - new variable wait_ptid, use it.
5435 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5436
5437 2012-01-23 Pedro Alves <palves@redhat.com>
5438
5439 * server.c (main): Avoid yet another case of infinite loop while
5440 detaching/killing after a longjmp.
5441
5442 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5443
5444 Code cleanup.
5445 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5446
5447 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5448
5449 * hostio.c (handle_readlink): New function.
5450 (handle_vFile): Call it to handle "vFile:readlink" packets.
5451
5452 2012-01-20 Pedro Alves <palves@redhat.com>
5453 Ulrich Weigand <ulrich.weigand@linaro.org>
5454
5455 * server.c (handle_v_requests): Only support vAttach and vRun to
5456 start multiple processes when in extended protocol mode.
5457
5458 2012-01-17 Pedro Alves <palves@redhat.com>
5459
5460 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5461 memalign plus mprotect to allocate the scratch buffer.
5462
5463 2012-01-13 Pedro Alves <palves@redhat.com>
5464
5465 * server.c (attach_inferior): Clear `cont_thread'.
5466
5467 2012-01-13 Pedro Alves <palves@redhat.com>
5468
5469 * server.c (main): Avoid infinite loop while detaching/killing
5470 after a longjmp.
5471
5472 2012-01-09 Doug Evans <dje@google.com>
5473
5474 * server.c (start_inferior): Set last_ptid in --wrapper case.
5475
5476 2012-01-06 Yao Qi <yao@codesourcery.com>
5477
5478 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5479 defined.
5480 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5481
5482 2012-01-04 Yao Qi <yao@codesourcery.com>
5483
5484 * tracepoint.c (cmd_qtdp): Print debug message
5485 for static tracepoint.
5486
5487 2012-01-04 Yao Qi <yao@codesourcery.com>
5488
5489 * tracepoint.c (trace_vdebug): Differentiate debug message
5490 between gdbserver and IPA.
5491
5492 2012-01-03 Yao Qi <yao@codesourcery.com>
5493
5494 * tracepoint.c (tracepoint_was_hit): Don't collect for
5495 static tracepoint.
5496
5497 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5498
5499 * terminal.h: Reformat copyright header.
5500
5501 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5502
5503 * server.c (gdbserver_version): Update copyright year.
5504 * gdbreplay.c (gdbreplay_version): Likewise.
5505
5506 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5507
5508 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5509
5510 Revert:
5511 2011-12-18 Hui Zhu <teawater@gmail.com>
5512 * linux-low.c (linux_create_inferior): Save return value to ret.
5513
5514 2011-12-18 Hui Zhu <teawater@gmail.com>
5515
5516 * linux-low.c (linux_create_inferior): Save return value to ret.
5517
5518 2011-12-16 Doug Evans <dje@google.com>
5519
5520 * linux-low.c (linux_create_inferior): If stdio connection,
5521 redirect stdin from /dev/null, stdout to stderr.
5522 * remote-utils.c (remote_is_stdio): New static global.
5523 (remote_connection_is_stdio): New function.
5524 (remote_prepare): Handle stdio connection.
5525 (remote_open): Ditto.
5526 (remote_close): Don't close stdin for stdio connections.
5527 (read_prim,write_prim): New functions. Replace all calls to
5528 read/write to these.
5529 * server.c (main): Watch for "-" argument. Move call to
5530 remote_prepare before start_inferior.
5531 * server.h (STDIO_CONNECTION_NAME): New macro.
5532 (remote_connection_is_stdio): Declare.
5533
5534 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5535 in debugging output.
5536
5537 2011-12-15 Yao Qi <yao@codesourcery.com>
5538
5539 * tracepoint.c: Include sys/syscall.h.
5540 (gdb_ust_thread): Remove preprocessor conditional.
5541
5542 2011-12-14 Pedro Alves <pedro@codesourcery.com>
5543
5544 * linux-low.c (linux_detach_one_lwp): Call
5545 the_low_target.prepare_to_resume before detaching.
5546
5547 2011-12-14 Yao Qi <yao@codesourcery.com>
5548
5549 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5550 of write.
5551
5552 2011-12-14 Yao Qi <yao@codesourcery.com>
5553
5554 * i386-low.c (i386_low_stopped_data_address): Initialize local
5555 variable `control'.
5556
5557 2011-12-13 Pedro Alves <pedro@codesourcery.com>
5558
5559 PR remote/13492
5560
5561 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5562 DR_CONTROL unless necessary. Extend comments.
5563 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5564 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5565
5566 2011-12-13 Yao Qi <yao@codesourcery.com>
5567
5568 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5569 macros.
5570 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5571
5572 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5573
5574 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5575 Print new debug message for such case.
5576
5577 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5578
5579 Fix overlapping memcpy.
5580 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5581 the read_inferior_memory transfer.
5582 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5583 write_inferior_memory transfer.
5584 (set_fast_tracepoint_jump): New variable buf. Use it for the
5585 read_inferior_memory and write_inferior_memory transfers.
5586 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5587 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5588 Use it for the write_inferior_memory transfer.
5589 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5590 buffers.
5591
5592 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5593
5594 * linux-low.c (fetch_register, store_register): Make code
5595 consistent, fix formatting.
5596
5597 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5598
5599 * linux-low.c (usr_store_inferior_registers): Factor out code
5600 to handle individual registers into...
5601 (store_register): ... this new function.
5602
5603 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5604
5605 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5606 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5607 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5608 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5609 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5610 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5611 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5612 (srv_xmlfiles): Add new XML files.
5613
5614 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5615 and <sys/uio.h>.
5616 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5617 (init_registers_s390_linux32v1): Add prototype.
5618 (init_registers_s390_linux32v2): Likewise.
5619 (init_registers_s390_linux64v1): Likewise.
5620 (init_registers_s390_linux64v2): Likewise.
5621 (init_registers_s390x_linux64v1): Likewise.
5622 (init_registers_s390x_linux64v2): Likewise.
5623 (s390_num_regs): Increment to 52.
5624 (s390_regmap): Add orig_r2 register.
5625 (s390_num_regs_3264): Increment to 68.
5626 (s390_regmap_3264): Add orig_r2 register.
5627 (s390_collect_ptrace_register): Handle orig_r2 register.
5628 (s390_supply_ptrace_register): Likewise.
5629 (s390_fill_last_break): New function.
5630 (s390_store_last_break): Likewise.
5631 (s390_fill_system_call): New function.
5632 (s390_store_system_call): Likewise.
5633 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5634 register sets.
5635 (s390_check_regset): New function.
5636 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5637 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5638 Update target_regsets for available register sets.
5639
5640 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5641 Jan Kratochvil <jan.kratochvil@redhat.com>
5642
5643 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5644 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5645 New.
5646 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5647 * linux-low.h (struct process_info_private): New member r_debug.
5648 * server.c (handle_qxfer_libraries): Call
5649 the_target->qxfer_libraries_svr4.
5650 (handle_qxfer_libraries_svr4): New function.
5651 (qxfer_packets): New entry "libraries-svr4".
5652 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5653 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5654 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5655 PACKET_qXfer_libraries_svr4.
5656
5657 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5658
5659 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5660 PSW address/mask between 8-byte and 16-byte formats.
5661 (s390_supply_ptrace_register): Likewise.
5662 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5663 basic addressing mode bit.
5664
5665 2011-11-24 Stan Shebs <stan@codesourcery.com>
5666
5667 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5668
5669 2011-11-17 Stan Shebs <stan@codesourcery.com>
5670
5671 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5672 (tracing_start_time): New global.
5673 (tracing_stop_time): New global.
5674 (tracing_user_name): New global.
5675 (tracing_notes): New global.
5676 (tracing_stop_note): New global.
5677 (cmd_qtstart): Set traceframe_usage, start_time.
5678 (stop_tracing): Set stop_time.
5679 (cmd_qtstatus): Report additional status.
5680 (cmd_qtp): New function.
5681 (handle_tracepoint_query): Call it.
5682 (cmd_qtnotes): New function.
5683 (handle_tracepoint_general_set): Call it.
5684 (get_timestamp): Rename from tsv_get_timestamp.
5685
5686 2011-11-14 Stan Shebs <stan@codesourcery.com>
5687 Kwok Cheung Yeung <kcy@codesourcery.com>
5688
5689 * linux-x86-low.c (small_jump_insn): New.
5690 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5691 trampoline and error message, build a trampoline and issue a small
5692 jump instruction to it.
5693 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5694 trampoline and error message.
5695 (x86_get_min_fast_tracepoint_insn_len): New.
5696 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5697 * linux-low.h (struct linux_target_ops): Add arguments to
5698 install_fast_tracepoint_jump_pad operation, add new operation.
5699 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5700 arguments.
5701 (linux_get_min_fast_tracepoint_insn_len): New function.
5702 (linux_target_op): Add new operation.
5703 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5704 (gdb_trampoline_buffer_end): Ditto.
5705 (gdb_trampoline_buffer_error): Ditto.
5706 (struct ipa_sym_addresses): Add fields for new IPA variables.
5707 (symbol_list): Add entries for new IPA variables.
5708 (struct tracepoint): Add fields to hold the address range of the
5709 trampoline used by the tracepoint.
5710 (trampoline_buffer_head): New static variable.
5711 (trampoline_buffer_tail): Ditto.
5712 (claim_trampoline_space): New function.
5713 (have_fast_tracepoint_trampoline_buffer): New function.
5714 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5715 structure.
5716 (install_fast_tracepoint): Ditto, also add error buffer argument.
5717 (cmd_qtminftpilen): New function.
5718 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5719 (fast_tracepoint_from_trampoline_address): New function.
5720 (fast_tracepoint_collecting): Handle trampoline as part of jump
5721 pad space.
5722 (set_trampoline_buffer_space): New function.
5723 (initialize_tracepoint): Initialize new IPA variables.
5724 * target.h (struct target_ops): Add arguments to
5725 install_fast_tracepoint_jump_pad operation, add new
5726 get_min_fast_tracepoint_insn_len operation.
5727 (target_get_min_fast_tracepoint_insn_len): New.
5728 (install_fast_tracepoint_jump_pad): Add arguments.
5729 * server.h (IPA_BUFSIZ): Define.
5730 * linux-i386-ipa.c: Include extra header files.
5731 (initialize_fast_tracepoint_trampoline_buffer): New function.
5732 (initialize_low_tracepoint): Call it.
5733 * server.h (set_trampoline_buffer_space): Declare.
5734 (claim_trampoline_space): Ditto.
5735 (have_fast_tracepoint_trampoline_buffer): Ditto.
5736
5737 2011-11-14 Yao Qi <yao@codesourcery.com>
5738
5739 * server.c (handle_query): Handle InstallInTrace for qSupported.
5740 * tracepoint.c (add_tracepoint): Sort list.
5741 (install_tracepoint, download_tracepoint): New.
5742 (cmd_qtdp): Call them to install and download tracepoints.
5743 (sort_tracepoints): Removed.
5744 (cmd_qtstart): Update.
5745
5746 2011-11-14 Yao Qi <yao@codesourcery.com>
5747
5748 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5749 * mem-break.h: Declare.
5750 * tracepoint.c (cmd_qtstart): Move some code to ...
5751 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5752 New.
5753 (download_tracepoints): Move some code to ...
5754 (download_tracepoint_1): ... here. New.
5755
5756 2011-11-08 Yao Qi <yao@codesourcery.com>
5757
5758 * remote-utils.c (relocate_instruction): A comment fix.
5759
5760 2011-11-07 Joel Brobecker <brobecker@adacore.com>
5761
5762 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5763 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5764 dr_status_mirror and dr_control_mirror from debug_reg_state.
5765 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5766 (i386_initial_stuff): Remove use of deleted globals.
5767 (i386_get_thread_context, i386_set_thread_context,
5768 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5769 from debug_reg_state.
5770
5771 2011-11-05 Yao Qi <yao@codesourcery.com>
5772
5773 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5774 address as TPOINT's.
5775
5776 2011-11-02 Stan Shebs <stan@codesourcery.com>
5777
5778 * tracepoint.c (agent_mem_read_string): New function.
5779 (eval_agent_expr): Call it for tracenz.
5780 * server.c (handle_query): Report support for tracenz.
5781
5782 2011-11-02 Yao Qi <yao@codesourcery.com>
5783
5784 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5785
5786 2011-11-02 Yao Qi <yao@codesourcery.com>
5787
5788 * target.h: Fix a typo in comment.
5789
5790 2011-10-31 Pedro Alves <pedro@codesourcery.com>
5791
5792 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5793 clobber the breakpoints' shadows with fast tracepoint jumps.
5794 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5795 * target.c (write_inferior_memory): Also pass MYADDR down to
5796 check_mem_write.
5797
5798 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5799
5800 * configure.ac: Check support for personality routine.
5801 * configure: Regenerate.
5802 * config.in: Likewise.
5803 * linux-low.c: Include <sys/personality.h>.
5804 Define ADDR_NO_RANDOMIZE if necessary.
5805 (linux_create_inferior): Disable address space randomization when
5806 forking inferior, if requested.
5807 (linux_supports_disable_randomization): New function.
5808 (linux_target_ops): Install it.
5809 * server.h (disable_randomization): Declare.
5810 * server.c (disable_randomization): New global variable.
5811 (handle_general_set): Handle QDisableRandomization.
5812 (handle_query): Likewise for qSupported.
5813 (main): Support --disable-randomization and --no-disable-randomization
5814 command line arguments.
5815 * target.h (struct target_ops): Add supports_disable_randomization.
5816 (target_supports_disable_randomization): New macro.
5817
5818 2011-09-29 Mike Frysinger <vapier@gentoo.org>
5819
5820 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5821 ifdef check.
5822 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5823 [!PT_GETDSBT] (target_loadmap): New definition.
5824 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5825 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5826 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5827 and PT_GETDSBT to LINUX_LOADMAP.
5828 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5829 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5830
5831 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5832
5833 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5834 (arm_linux_hwbp_cap): New static variable.
5835 (arm_linux_get_hwbp_cap): Replace by ...
5836 (arm_linux_init_hwbp_cap): ... this new function.
5837 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5838 (arm_linux_get_hw_watchpoint_count): Likewise.
5839 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5840 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5841 (arm_prepare_to_resume): Use perror_with_name instead of error.
5842
5843 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5844
5845 * linux-arm-low.c: Include <signal.h>.
5846 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5847 (struct arm_linux_hwbp_cap): New data type.
5848 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5849 (struct arm_linux_hw_breakpoint): New data type.
5850 (MAX_BPTS, MAX_WPTS): Define.
5851 (struct arch_process_info, struct arch_lwp_info): New data types.
5852 (arm_linux_get_hwbp_cap): New function.
5853 (arm_linux_get_hw_breakpoint_count): Likewise.
5854 (arm_linux_get_hw_watchpoint_count): Likewise.
5855 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5856 (arm_hwbp_control_initialize): Likewise.
5857 (arm_hwbp_control_is_enabled): Likewise.
5858 (arm_hwbp_control_is_initialized): Likewise.
5859 (arm_hwbp_control_disable): Likewise.
5860 (arm_linux_hw_breakpoint_equal): Likewise.
5861 (arm_linux_hw_point_initialize): Likewise.
5862 (struct update_registers_data): New data structure.
5863 (update_registers_callback: New function.
5864 (arm_insert_point): Likewise.
5865 (arm_remove_point): Likewise.
5866 (arm_stopped_by_watchpoint): Likewise.
5867 (arm_stopped_data_address): Likewise.
5868 (arm_new_process): Likewise.
5869 (arm_new_thread): Likewise.
5870 (arm_prepare_to_resume): Likewise.
5871 (the_low_target): Register arm_insert_point, arm_remove_point,
5872 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5873 arm_new_thread, and arm_prepare_to_resume.
5874
5875 2011-09-15 Stan Shebs <stan@codesourcery.com>
5876
5877 * server.h (struct emit_ops): Add compare-goto fields.
5878 * tracepoint.c (gdb_agent_op_sizes): New table.
5879 (emit_eq_goto): New function.
5880 (emit_ne_goto): New function.
5881 (emit_lt_goto): New function.
5882 (emit_le_goto): New function.
5883 (emit_gt_goto): New function.
5884 (emit_ge_goto): New function.
5885 (is_goto_target): New function.
5886 (compile_bytecodes): Recognize special cases of compare-goto
5887 combinations and call specialized emitters for them.
5888 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5889 (amd64_emit_ne_goto): New function.
5890 (amd64_emit_lt_goto): New function.
5891 (amd64_emit_le_goto): New function.
5892 (amd64_emit_gt_goto): New function.
5893 (amd64_emit_ge_goto): New function.
5894 (amd64_emit_ops): Add the new functions.
5895 (i386_emit_eq_goto): New function.
5896 (i386_emit_ne_goto): New function.
5897 (i386_emit_lt_goto): New function.
5898 (i386_emit_le_goto): New function.
5899 (i386_emit_gt_goto): New function.
5900 (i386_emit_ge_goto): New function.
5901 (i386_emit_ops): Add the new functions.
5902
5903 2011-09-08 Stan Shebs <stan@codesourcery.com>
5904
5905 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5906 (i386_emit_epilogue): Restore %ebx.
5907
5908 2011-08-31 Jie Zhang <jzhang918@gmail.com>
5909
5910 * server.c (step_thread): Remove definition.
5911 (process_serial_event): Don't handle Hs.
5912 * server.h (step_thread): Remove declaration.
5913 * target.c (set_desired_inferior): Remove use of step_thread.
5914
5915 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5916
5917 * linux-low.c: Include linux-procfs.h.
5918 (linux_attach_lwp_1): Update comments.
5919 (linux_attach): Scan for existing threads when attaching to a
5920 process that is the tgid.
5921 * Makefile.in: Update dependencies.
5922
5923 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5924
5925 * configure.srv: Add linux-procfs.o dependencies.
5926
5927 2011-08-14 Yao Qi <yao@codesourcery.com>
5928
5929 * target.h (struct target_ops): Fix indent.
5930 * win32-low.c (win32_target_ops): Fix comment.
5931
5932 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
5933 Yao Qi <yao@codesourcery.com>
5934
5935 * Makefile.in (clean): Remove tic6x-*.c files.
5936 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5937 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5938 (tic6x-c64xp-linux.c): Likewise.
5939 * configure.srv: Add support for tic6x-*-uclinux.
5940 * linux-tic6x-low.c: New.
5941 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5942
5943 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
5944 Yao Qi <yao@codesourcery.com>
5945
5946 * target.h (struct target_ops): Add read_loadmap.
5947 * linux-low.c (struct target_loadseg): New type.
5948 (struct target_loadmap): New type.
5949 (linux_read_loadmap): New function.
5950 (linux_target_ops): Add linux_read_loadmap.
5951 * server.c (handle_query): Support qXfer:fdpic:read packet.
5952 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5953 to NULL.
5954
5955 2011-08-05 Eli Zaretskii <eliz@gnu.org>
5956
5957 * win32-low.c: Include <stdint.h>.
5958
5959 2011-07-22 Pedro Alves <pedro@codesourcery.com>
5960
5961 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5962 to the inferior here.
5963 (i386_remove_aligned_watchpoint): Ditto.
5964 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5965 fit part of the watchpoint in the debug registers.
5966 (i386_update_inferior_debug_regs): New.
5967 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5968 registers, and only update the inferior on success.
5969 (i386_low_remove_watchpoint): Ditto.
5970
5971 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5972
5973 * linux-low.c (compare_ints, unique, list_threads, show_process,
5974 linux_core_of_thread): Delete.
5975 (linux_target_ops): Change linux_core_of_thread to
5976 linux_common_core_of_thread.
5977 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5978 * utils.c (malloc_failure): Change type of argument.
5979 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5980 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5981 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5982 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5983 (IPA_OBJS): Add common-utils-ipa.o.
5984 (ptid_h, linux_osdata_h): New macros.
5985 (server_h): Add common/common-utils.h, common/xml-utils.h,
5986 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5987 common/ptid.h.
5988 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5989 ptid.o, buffer.o): New rules.
5990 (linux-low.o): Add common/linux-osdata.h as a dependency.
5991 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5992 * configure.ac: Add AC_HEADER_DIRENT check.
5993 * config.in: Regenerate.
5994 * configure: Regenerate.
5995 * remote-utils.c (xml_escape_text): Delete.
5996 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5997 buffer_xml_printf): Move to common/buffer.c.
5998 * server.c (main): Remove call to initialize_inferiors.
5999 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6000 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6001 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6002 internal_error, gdb_assert, gdb_assert_fail): Delete.
6003 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6004 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6005 common/buffer.h.
6006 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6007 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6008 initialize_inferiors): Delete.
6009
6010 2011-07-20 Pedro Alves <pedro@codesourcery.com>
6011
6012 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6013 symbol error.
6014
6015 2011-05-31 Pedro Alves <pedro@codesourcery.com>
6016
6017 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6018 assertion.
6019 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6020
6021 2011-05-26 Yao Qi <yao@codesourcery.com>
6022
6023 * Makefile.in (thread-db.o): Track dependence to
6024 common/gdb_thread_db.h.
6025 * thread-db.c: include gdb_thread_db.h from right place.
6026
6027 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6028
6029 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6030 __FILE__ and __LINE__ to internal_error.
6031
6032 2011-05-13 Doug Evans <dje@google.com>
6033
6034 * thread-db.c (try_thread_db_load_from_sdir): New function.
6035 (try_thread_db_load_from_dir): New function.
6036 (thread_db_load_search): Handle $sdir, ignore $pdir.
6037 Remove trying of system directories if search of
6038 libthread-db-search-path fails, that is now done via $sdir.
6039
6040 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6041
6042 * server.c (handle_query): Add EnableDisableTracepoints to the list
6043 of supported features.
6044 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
6045 tracepoints.
6046 (cmd_qtenable_disable): New.
6047 (cmd_qtstart): Install tracepoints even if disabled.
6048 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6049 receiving a QTEnable or QTDisable packet.
6050 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6051 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6052 tracepoints.
6053 (gdb_probe): Skip data collection if static tracepoint is disabled.
6054
6055 2011-05-10 Doug Evans <dje@google.com>
6056
6057 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6058
6059 2011-05-04 Doug Evans <dje@google.com>
6060
6061 * linux-low.c (linux_join): Skip process lookup.
6062 * spu-low.c (spu_join): Ditto.
6063 * server.c (join_inferiors_callback): Delete.
6064 (process_serial_event): For 'D' packet (detach) call join_inferior
6065 directly.
6066
6067 2011-05-04 Joseph Myers <joseph@codesourcery.com>
6068
6069 * README: Don't mention xscale*-*-linux*.
6070 * configure.srv (xscale*-*-linux*): Don't handle target.
6071
6072 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6073
6074 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6075 casting pointers.
6076 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6077 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6078 (i386_emit_void_call_2): Likewise.
6079
6080 2011-04-26 Yao Qi <yao@codesourcery.com>
6081
6082 * linux-low.c: Move common macros to linux-ptrace.h.
6083 Include linux-ptrace.h.
6084 * Makefile.in (linux_ptrace_h): New.
6085 (linux-low.o): Depends on linux-ptrace.h.
6086
6087 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6088
6089 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6090 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6091 (remote_prepare): New function with most of the TCP code from ...
6092 (remote_open): ... here. Detect PORT here unconditionally. Move also
6093 setting transport_is_reliable.
6094 * server.c (run_once): New variable.
6095 (gdbserver_usage): Document it.
6096 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6097 the first run if RUN_ONCE.
6098 * server.h (run_once, remote_prepare): New declarations.
6099
6100 2011-04-19 Tom Tromey <tromey@redhat.com>
6101
6102 * win32-low.c (handle_load_dll): Remove duplicate "the".
6103
6104 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6105
6106 Remove support for old Cygwin 1.5 versions.
6107 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6108 function to avoid warning.
6109 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6110 warning.
6111
6112 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6113
6114 * gdbserver/server.h (Macro _): Define it if not available.
6115
6116 2011-03-14 Michael Snyder <msnyder@vmware.com>
6117
6118 * hostio.c (handle_close): Remove unnecessary null test.
6119
6120 2011-03-10 Joel Brobecker <brobecker@adacore.com>
6121
6122 * Makefile.in (maintainer-clean realclean distclean): Remove
6123 "make ... subdir_do" command.
6124
6125 2011-03-10 Michael Snyder <msnyder@vmware.com>
6126
6127 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6128
6129 * server.c (handle_v_run): Free alloced buffer on early return.
6130
6131 2011-03-09 Yao Qi <yao@codesourcery.com>
6132
6133 Revert:
6134 2011-03-04 Yao Qi <yao@codesourcery.com>
6135
6136 * Makefile.in: Remove GNU make feature --directory.
6137
6138 2011-03-05 Yao Qi <yao@codesourcery.com>
6139
6140 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6141 (subdir_do): New make target. Copied from gdb/Makefile.
6142 (maintainer-clean, realclean, distclean, clean): Call corresponding
6143 make targets in common/Makefile.
6144
6145 2011-02-11 Yao Qi <yao@codesourcery.com>
6146
6147 * configure.ac: Call AC_PROG_RANLIB.
6148 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6149 * configure: Regenerate.
6150
6151 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6152
6153 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6154
6155 2011-03-06 Yao Qi <yao@codesourcery.com>
6156
6157 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6158
6159 2011-03-05 Yao Qi <yao@codesourcery.com>
6160
6161 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6162 (subdir_do): New make target. Copied from gdb/Makefile.
6163 (maintainer-clean, realclean, distclean, clean): Call corresponding
6164 make targets in common/Makefile.
6165
6166 2011-03-04 Yao Qi <yao@codesourcery.com>
6167
6168 * Makefile.in: Remove GNU make feature --directory.
6169
6170 2011-03-04 Michael Snyder <msnyder@vmware.com>
6171
6172 * server.c (queue_stop_reply): Call xmalloc not malloc.
6173
6174 2011-03-02 Michael Snyder <msnyder@vmware.com>
6175
6176 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6177
6178 2011-02-28 Michael Snyder <msnyder@vmware.com>
6179
6180 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6181 (cmd_qtframe): Ditto.
6182 (cmd_qtbuffer): Ditto.
6183 (cmd_bigqtbuffer): Ditto.
6184
6185 * utils.c (decimal2str): Initialize 'width' to nine, then
6186 don't mess with it.
6187
6188 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6189
6190 * hostio.c (require_data): Free *data, not data.
6191
6192 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6193
6194 * hostio.c (require_data): Use free, not xfree.
6195
6196 2011-02-27 Michael Snyder <msnyder@vmware.com>
6197
6198 * server.c (handle_query): Discard unused value.
6199
6200 * hostio.c (require_data): Free malloc memory before returning
6201 error.
6202
6203 2011-02-26 Michael Snyder <msnyder@vmware.com>
6204
6205 * linux-low.c (list_threads): Call closedir for dirent.
6206
6207 2011-02-27 Michael Snyder <msnyder@vmware.com>
6208
6209 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6210 a case statement falls through.
6211
6212 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6213
6214 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6215 in comparison.
6216
6217 2011-02-26 Michael Snyder <msnyder@vmware.com>
6218
6219 * utils.c (decimal2str): Eliminate dead code and dead param.
6220 (pulongest): Drop dead param from call to decimal2str.
6221 (plongest): Ditto.
6222
6223 2011-02-24 Joel Brobecker <brobecker@adacore.com>
6224
6225 Revert the following patch (not approved yet):
6226 2011-02-21 Hui Zhu <teawater@gmail.com>
6227 * tracepoint.c (tp_printf): New function.
6228 (eval_agent_expr): Handle gdb_agent_op_printf.
6229
6230 2011-02-21 Hui Zhu <teawater@gmail.com>
6231
6232 * tracepoint.c (tp_printf): New function.
6233 (eval_agent_expr): Handle gdb_agent_op_printf.
6234
6235 2011-02-18 Tom Tromey <tromey@redhat.com>
6236
6237 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6238 (tracepoint.o): Likewise.
6239 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6240 (gdb_agent_op_names): Likewise.
6241
6242 2011-02-18 Tom Tromey <tromey@redhat.com>
6243
6244 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6245 gdb_agent_op_rot>: New constants.
6246 (gdb_agent_op_names): Add pick and roll.
6247 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6248 cases.
6249
6250 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6251
6252 * aclocal.m4: Regenerated with aclocal-1.11.1.
6253
6254 2011-02-14 Pedro Alves <pedro@codesourcery.com>
6255
6256 * server.c (handle_qxfer_traceframe_info): New.
6257 (qxfer_packets): Register "traceframe-info".
6258 (handle_query): Report support for qXfer:traceframe-info:read+.
6259 * tracepoint.c (match_blocktype): New.
6260 (traceframe_find_block_type): Rename to ...
6261 (traceframe_walk_blocks): ... this. Add callback filter argument,
6262 and use it.
6263 (traceframe_find_block_type): New, reimplemented on top of
6264 traceframe_walk_blocks.
6265 (build_traceframe_info_xml): New.
6266 (traceframe_read_info): New.
6267 * server.h (traceframe_read_info): Declare.
6268
6269 2011-02-11 Yao Qi <yao@codesourcery.com>
6270
6271 * configure.ac: Call AC_PROG_RANLIB.
6272 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6273 * configure: Regenerate.
6274
6275 2011-02-07 Pedro Alves <pedro@codesourcery.com>
6276
6277 * server.c (gdb_read_memory): Change return semantics to allow
6278 partial transfers.
6279 (handle_search_memory_1): Adjust.
6280 (process_serial_event) <'m' packet>: Handle partial transfers.
6281 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6282
6283 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6284
6285 * regcache.c (init_register_cache): Initialize
6286 regcache->register_status.
6287 (free_register_cache): Release regcache->register_status.
6288 (regcache_cpy): Copy register_status.
6289 (registers_to_string): Print 'x's for unavailable registers.
6290 (supply_register): Mark the register's status valid or
6291 unavailable, depending on whether a buffer was passed in or not.
6292 (supply_register_zeroed): New.
6293 (supply_regblock): Mark the registers' status valid or
6294 unavailable, depending on whether a buffer was passed in or not.
6295 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6296 (struct regcache): New `register_status' field.
6297 (supply_register_zeroed): Declare.
6298 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6299 supply_register_zeroed, rather than passing a NULL buffer to
6300 supply_register.
6301 * tracepoint.c (fetch_traceframe_registers): Update comment.
6302
6303 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6304
6305 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6306 buffer explicit.
6307
6308 2011-01-25 Pedro Alves <pedro@codesourcery.com>
6309
6310 * server.h (decode_xfer_write): Change prototype.
6311 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6312 and don't extract the annex here.
6313 * server.c (decode_xfer_read): Remove `annex' parameter,
6314 and don't extract the annex here.
6315 (decode_xfer): New.
6316 (struct qxfer): New.
6317 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6318 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6319 (handle_qxfer_statictrace): New functions, abstracted out from
6320 handle_query, and made to use the struct qxfer interface.
6321 (handle_threads_qxfer_proper): Rename to ...
6322 (handle_qxfer_threads_proper): ... this.
6323 (handle_threads_qxfer): Rename to ...
6324 (handle_qxfer_threads): ... this. Adjust.
6325 (qxfer_packets): New array.
6326 (handle_qxfer): New function.
6327 (handle_query): Use handle_qxfer.
6328
6329 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6330
6331 * gdbreplay.c: Shorten lines of >= 80 columns.
6332 * linux-low.c: Ditto.
6333 * linux-ppc-low.c: Ditto.
6334 * linux-s390-low.c: Ditto.
6335 * linux-sparc-low.c: Ditto.
6336 * linux-x86-low.c: Ditto.
6337 * linux-xtensa-low.c: Ditto.
6338 * mem-break.c: Ditto.
6339 * nto-low.c: Ditto.
6340 * regcache.h: Ditto.
6341 * remote-utils.c: Ditto.
6342 * server.c: Ditto.
6343 * server.h: Ditto.
6344 * thread-db.c: Ditto.
6345 * tracepoint.c: Ditto.
6346 * utils.c: Ditto.
6347 * win32-low.h: Ditto.
6348
6349 2011-01-05 Joel Brobecker <brobecker@adacore.com>
6350
6351 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6352 update.
6353
6354 2011-01-01 Joel Brobecker <brobecker@adacore.com>
6355
6356 * server.c (gdbserver_version): Update copyright year in version
6357 output.
6358 * gdbreplay.c (gdbreplay_version): Ditto.
6359
6360 2010-12-29 Jie Zhang <jie.zhang@analog.com>
6361
6362 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6363 * linux-bfin-low.c: New file.
6364 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6365 PT_DATA_ADDR for BFIN targets.
6366 * Makefile.in (SFILES): Add linux-bfin-low.c.
6367 (clean): Remove reg-bfin.c.
6368 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6369 * README: Mention supported Blackfin targets.
6370
6371 2010-12-23 Mike Frysinger <vapier@gentoo.org>
6372
6373 * .gitignore: New file.
6374
6375 2010-11-16 Mike Frysinger <vapier@gentoo.org>
6376
6377 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6378
6379 2010-10-22 Jie Zhang <jie@codesourcery.com>
6380
6381 * Makefile.in: Add FLAGS_TO_PASS variable.
6382 (install): Remove dependency of install-only and recursively
6383 invoke make for install-only.
6384
6385 2010-10-04 Doug Evans <dje@google.com>
6386
6387 * Makefile.in (uninstall): Use $(DESTDIR).
6388
6389 2010-09-24 Pedro Alves <pedro@codesourcery.com>
6390
6391 PR gdb/11842
6392
6393 * linux-x86-low.c (compat_siginfo_from_siginfo)
6394 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6395 si_code is < 0. Check for si_code == SI_TIMER before checking for
6396 si_code < 0.
6397
6398 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6399
6400 * lynx-i386-low.c: New file.
6401 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6402
6403 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6404
6405 * lynx-low.c (ptrace_request_to_str): Remove handling for
6406 request values that have been removed in LynxOS 5.x.
6407
6408 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6409
6410 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6411 <ptrace.h>
6412
6413 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6414
6415 * configure.ac: Add --enable-inprocess-agent option.
6416 * configure: Rebuilt.
6417
6418 2010-09-06 Yao Qi <yao@codesourcery.com>
6419
6420 * linux-low.c (linux_kill): Remove unused variable.
6421 (linux_stabilize_threads): Likewise.
6422 * server.c (start_inferior): Likewise.
6423 (queue_stop_reply_callback): Likewise.
6424 * tracepoint.c (do_action_at_tracepoint): Likewise.
6425
6426 2010-09-06 Yao Qi <yao@codesourcery.com>
6427
6428 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6429 on return.
6430
6431 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6432
6433 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6434
6435 2010-09-06 Pedro Alves <pedro@codesourcery.com>
6436
6437 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6438 "$(IPA_DEPFILES)".
6439
6440 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6441
6442 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6443 gdbserver/lynx-ppc-low.c: New files.
6444 * Makefile.in (lynx_low_h): New variable.
6445 (lynx-low.o, lynx-ppc-low.o): New rules.
6446 * configure.ac: On LynxOS, link with -lnetinet.
6447 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6448 * configure: regenerate.
6449
6450 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6451
6452 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6453 * configure.ac: Add check for vasprintf and vsnprintf.
6454 * configure, config.in: Regenerate.
6455 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6456
6457 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6458
6459 * gdbreplay.c: Move include of alloca.h up, next to include of
6460 malloc.h.
6461 * server.h: Add include of malloc.h.
6462 * mem-break.c: Remove include of malloc.h.
6463 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6464
6465 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6466
6467 * Makefile.in (memmem.o): Build with -Wno-error.
6468
6469 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6470
6471 * utils.c (xsnprintf): Make non-static.
6472 * server.h: Add xsnprintf declaration.
6473 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6474 replace calls to snprintf by calls to xsnprintf throughout.
6475
6476 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6477
6478 * configure.ac: Add configure check for alloca.
6479 * configure, config.in: Regenerate.
6480 * server.h: Include alloca.h if it exists.
6481 * gdbreplay.c: Include alloca.h if it exists.
6482
6483 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6484
6485 * linux-low.c (__SIGRTMIN): Define if not already defined.
6486 (linux_create_inferior): Check for __ANDROID__ rather than
6487 __SIGRTMIN.
6488 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6489 are already deferred.
6490 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6491 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6492 stopped and already has a pending signal to report.
6493 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6494 a pending signal to report or is moving out of a jump pad.
6495 (linux_init_signals): Check for __ANDROID__ rather than
6496 __SIGRTMIN.
6497
6498 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6499
6500 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6501 debug_threads check. Avoid a linear search when not doing debug
6502 output.
6503
6504 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6505
6506 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6507 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6508 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6509 (process_event): Change local fd's type to gdb_fildes_t.
6510 (create_file_handler): Adjust prototype.
6511 (delete_file_handler): Adjust prototype.
6512 (handle_file_event): Adjust prototype. Use pfildes.
6513 (create_file_event): Adjsut prototype.
6514 * remote-utils.c (remote_desc, listen_desc): Change type to
6515 gdb_fildes_t.
6516 * server.h: New gdb_fildes_t typedef.
6517 [USE_WIN32API]: Include winsock2.h.
6518 (delete_file_handler, add_file_handler): Adjust prototypes.
6519 (pfildes): Declare.
6520 * utils.c (pfildes): New.
6521
6522 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6523
6524 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6525 * configure: Regenerate.
6526
6527 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6528
6529 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6530 (linux_done_accessing_memory): ... this.
6531 (linux_target_ops): Adjust.
6532 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6533 * nto-low.c (nto_target_ops): Adjust comment.
6534 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6535 * spu-low.c (spu_target_ops): Adjust comment.
6536 * target.h (target_ops): Rename unprepare_to_access_memory field
6537 to done_accessing_memory.
6538 (unprepare_to_access_memory): Rename to ...
6539 (done_accessing_memory): ... this.
6540
6541 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6542
6543 * linux-low.c (linux_prepare_to_access_memory): New.
6544 (linux_unprepare_to_access_memory): New.
6545 (linux_target_ops): Install them.
6546 * server.c (read_memory): Rename to ...
6547 (gdb_read_memory): ... this. Use
6548 prepare_to_access_memory/prepare_to_access_memory.
6549 (write_memory): Rename to ...
6550 (gdb_write_memory): ... this. Use
6551 prepare_to_access_memory/prepare_to_access_memory.
6552 (handle_search_memory_1): Adjust.
6553 (process_serial_event): Adjust.
6554 * target.h (struct target_ops): New fields
6555 prepare_to_access_memory and unprepare_to_access_memory.
6556 (prepare_to_access_memory, unprepare_to_access_memory): New.
6557 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6558 prepare_to_access_memory/prepare_to_access_memory.
6559 * nto-low.c (nto_target_ops): Adjust.
6560 * spu-low.c (spu_target_ops): Adjust.
6561 * win32-low.c (win32_target_ops): Adjust.
6562
6563 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6564
6565 * Makefile.in (WARN_CFLAGS): Get it from configure.
6566 (WERROR_CFLAGS): New.
6567 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6568 * configure.ac: Introduce --enable-werror, which adds -Werror to
6569 the compiler command line. Enabled by default. Disable with
6570 --disable-werror. Add -Wdeclaration-after-statement
6571 Wpointer-arith and -Wformat-nonliteral to warning flags.
6572 * configure: Regenerate.
6573
6574 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6575
6576 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6577
6578 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6579
6580 * gdbreplay.c (remote_error): New.
6581 (gdbchar): New.
6582 (expect): Use gdbchar. Check for error reading from GDB.
6583 Clarify sync error output.
6584 (play): Check for errors writing to GDB.
6585 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6586 * remote-utils.c (getpkt): Check for errors writing to the remote
6587 descriptor.
6588
6589 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6590
6591 * linux-low.c (linux_wait_1): Move non-debugging code out of
6592 `debug_threads' control.
6593
6594 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6595
6596 * linux-low.c (linux_wait_1): Don't set last_status here.
6597 * server.c (push_event, queue_stop_reply_callback): Assert we're
6598 not pushing a TARGET_WAITKIND_IGNORE event.
6599 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6600 (myresume, handle_target_event): Set the thread's last_resume_kind
6601 and last_status from the target returned status.
6602
6603 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6604
6605 PR threads/10729
6606
6607 * linux-x86-low.c (update_debug_registers_callback): New.
6608 (i386_dr_low_set_addr): Use it.
6609 (i386_dr_low_get_addr): New.
6610 (i386_dr_low_set_control): Use update_debug_registers_callback.
6611 (i386_dr_low_get_control): New.
6612 (i386_dr_low_get_status): Adjust.
6613 * linux-low.c (linux_stop_lwp): New.
6614 * linux-low.h (linux_stop_lwp): Declare.
6615
6616 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6617 argument instead of a i386_debug_reg_state.
6618 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6619 a i386_debug_reg_state.
6620 (i386_insert_aligned_watchpoint): Adjust.
6621 (i386_remove_aligned_watchpoint): Adjust.
6622 (i386_low_stopped_data_address): Read the debug registers from the
6623 inferior instead of from the mirrors.
6624 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6625 (i386_dr_low_get_addr): Declare.
6626 (i386_dr_low_get_control): Declare.
6627 (i386_dr_low_get_status): Change prototype.
6628
6629 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6630 (i386_dr_low_get_addr): New.
6631 (i386_dr_low_get_control): New.
6632 (i386_dr_low_get_status): Adjust prototype. Return
6633 dr_status_mirror.
6634 (i386_initial_stuff): Clear dr_status_mirror and
6635 dr_control_mirror.
6636 (i386_get_thread_context): Adjust.
6637 (i386_set_thread_context): Adjust.
6638 (i386_thread_added): Adjust.
6639
6640 2010-08-24 Pedro Alves <pedro@codesourcery.com>
6641
6642 * linux-low.h (linux_thread_area): Delete declaration.
6643
6644 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6645
6646 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6647 after its termination.
6648
6649 2010-08-09 Pedro Alves <pedro@codesourcery.com>
6650
6651 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6652 (gdb_wants_all_stopped): Delete.
6653 (linux_wait_1): Don't call them.
6654 * server.c (handle_v_cont): Tag all threads as want-stopped.
6655 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6656 stopped as "client-wants-stopped".
6657
6658 2010-07-31 Pedro Alves <pedro@codesourcery.com>
6659
6660 * Makefile.in (signals_h): New.
6661 (server_h): Depend on it.
6662 (server.o): Don't depend on $(signals_def).
6663 (signals.o): Depend on $(signals_def).
6664
6665 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6666
6667 * Makefile.in (signals_def): New.
6668 (server_h): Append include/gdb/signals.h and signals_def.
6669 (server.o): Append signals_def.
6670
6671 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6672
6673 * server.c (handle_target_event): Use target_signal_to_host for
6674 resume_info.sig initialization.
6675 * target.h (struct thread_resume) <sig>: New comment.
6676
6677 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6678
6679 * server.c (handle_query): strcpy() the returned string from paddress()
6680 instead of sprintf().
6681 * utils.c (paddress): Return phex_nz().
6682
6683 2010-07-07 Joel Brobecker <brobecker@adacore.com>
6684
6685 * server.c (handle_v_cont): Call mourn_inferior if process
6686 just exited.
6687 (myresume): Likewise.
6688
6689 2010-07-01 Pedro Alves <pedro@codesourcery.com>
6690
6691 Static tracepoints, and integration with UST.
6692
6693 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6694 * mem-break.c (uninsert_all_breakpoints)
6695 (reinsert_all_breakpoints): New.
6696 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6697 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6698 (gdb_agent_ust_loaded, helper_thread_id)
6699 (gdb_agent_helper_thread_id): New macros.
6700 (struct ipa_sym_addresses): Add addr_ust_loaded,
6701 addr_helper_thread_id, addr_cmd_buf.
6702 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6703 (in_process_agent_loaded_ust): New.
6704 (write_e_ust_not_loaded): New.
6705 (maybe_write_ipa_ust_not_loaded): New.
6706 (struct collect_static_trace_data_action): New.
6707 (enum tracepoint_type) <static_tracepoint>: New.
6708 (struct tracepoint) <handle>: Mention static tracepoints.
6709 (struct static_tracepoint_ctx): New.
6710 (CMD_BUF_SIZE): New.
6711 (add_tracepoint_action): Handle static tracepoint actions.
6712 (unprobe_marker_at): New.
6713 (clear_installed_tracepoints): Handle static tracepoints.
6714 (cmd_qtdp): Handle static tracepoints.
6715 (probe_marker_at): New.
6716 (cmd_qtstart): Handle static tracepoints.
6717 (response_tracepoint): Handle static tracepoints.
6718 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6719 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6720 (get_context_regcache): Handle static tracepoints.
6721 (do_action_at_tracepoint): Handle static tracepoint actions.
6722 (traceframe_find_block_type): Handle static trace data blocks.
6723 (traceframe_read_sdata): New.
6724 (download_tracepoints): Download static tracepoint actions.
6725 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6726 (GDB_PROBE_NAME): New.
6727 (ust_ops): New.
6728 (GET_UST_SYM): New.
6729 (USTF): New.
6730 (dlsym_ust): New.
6731 (ust_marker_to_static_tracepoint): New.
6732 (gdb_probe): New.
6733 (collect_ust_data_at_tracepoint): New.
6734 (gdb_ust_probe): New.
6735 (UNIX_PATH_MAX, SOCK_DIR): New.
6736 (gdb_ust_connect_sync_socket): New.
6737 (resume_thread, stop_thread): New.
6738 (run_inferior_command): New.
6739 (init_named_socket): New.
6740 (gdb_ust_socket_init): New.
6741 (cstr_to_hexstr): New.
6742 (next_st): New.
6743 (first_marker, next_marker): New.
6744 (response_ust_marker): New.
6745 (cmd_qtfstm, cmd_qtsstm): New.
6746 (unprobe_marker_at, probe_marker_at): New.
6747 (cmd_qtstmat, gdb_ust_thread): New.
6748 (gdb_ust_init): New.
6749 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6750 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6751 (ST_REGENTRY): New.
6752 (x86_64_st_collect_regmap): New.
6753 (X86_64_NUM_ST_COLLECT_GREGS): New.
6754 (AMD64_RIP_REGNUM): New.
6755 (supply_static_tracepoint_registers): New.
6756 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6757 (ST_REGENTRY): New.
6758 (i386_st_collect_regmap): New.
6759 (i386_NUM_ST_COLLECT_GREGS): New.
6760 (supply_static_tracepoint_registers): New.
6761 * server.c (handle_query): Handle qXfer:statictrace:read.
6762 <qSupported>: Report support for StaticTracepoints, and
6763 qXfer:statictrace:read features.
6764 * server.h (traceframe_read_sdata)
6765 (supply_static_tracepoint_registers): Declare.
6766 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6767 (unpack_varlen_hex): Include in IPA build.
6768 * Makefile.in (ustlibs, ustinc): New.
6769 (IPA_OBJS): Add remote-utils-ipa.o.
6770 ($(IPA_LIB)): Link -ldl and -lpthread.
6771 (UST_CFLAGS): New.
6772 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6773 * config.in, configure: Regenerate.
6774
6775 2010-06-20 Ian Lance Taylor <iant@google.com>
6776 Pedro Alves <pedro@codesourcery.com>
6777
6778 * linux-x86-low.c (always_true): Delete.
6779 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6780 trying to fool the compiler with always_true.
6781
6782 2010-06-20 Pedro Alves <pedro@codesourcery.com>
6783
6784 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6785 conditions in gdbserver.
6786
6787 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6788
6789 * spu-low.c (spu_read_memory): Wrap around local store limit.
6790 (spu_write_memory): Likewise.
6791
6792 2010-06-15 Pedro Alves <pedro@codesourcery.com>
6793
6794 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6795 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6796 LONGEST uses.
6797 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6798 uses.
6799 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6800 uses with LONGEST uses.
6801
6802 2010-06-14 Stan Shebs <stan@codesourcery.com>
6803 Pedro Alves <pedro@codesourcery.com>
6804
6805 Bytecode compiler.
6806
6807 * linux-x86-low.c: Include limits.h.
6808 (add_insns): New.
6809 (always_true): New.
6810 (EMIT_ASM): New.
6811 (EMIT_ASM32): New.
6812 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6813 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6814 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6815 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6816 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6817 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6818 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6819 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6820 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6821 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6822 (amd64_emit_void_call_2): New.
6823 (amd64_emit_ops): New.
6824 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6825 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6826 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6827 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6828 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6829 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6830 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6831 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6832 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6833 (i386_emit_stack_adjust, i386_emit_int_call_1)
6834 (i386_emit_void_call_2): New.
6835 (i386_emit_ops): New.
6836 (x86_emit_ops): New.
6837 (the_low_target): Install x86_emit_ops.
6838 * server.h (struct emit_ops): New.
6839 (get_raw_reg_func_addr): Declare.
6840 (current_insn_ptr, emit_error): Declare.
6841 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6842 (set_trace_state_variable_value): New defines.
6843 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6844 addr_get_trace_state_variable_value and
6845 addr_set_trace_state_variable_value.
6846 (symbol_list): New fields for get_raw_reg,
6847 get_trace_state_variable_value and set_trace_state_variable_value.
6848 (condfn): New typedef.
6849 (struct tracepoint): New field `compiled_cond'.
6850 (do_action_at_tracepoint): Clear compiled_cond.
6851 (get_trace_state_variable_value, set_trace_state_variable_value):
6852 Export in the IPA.
6853 (condition_true_at_tracepoint): If there's a compiled condition,
6854 run that.
6855 (current_insn_ptr, emit_error): New globals.
6856 (struct bytecode_address): New.
6857 (get_raw_reg_func_addr): New.
6858 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6859 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6860 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6861 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6862 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6863 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6864 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6865 (compile_tracepoint_condition, compile_bytecodes): New.
6866 * target.h (emit_ops): Forward declare.
6867 (struct target_ops): New field emit_ops.
6868 (target_emit_ops): New.
6869 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6870 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6871 * linux-low.c (linux_emit_ops): New.
6872 (linux_target_ops): Install it.
6873 * linux-low.h (struct linux_target_ops): New field emit_ops.
6874
6875 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6876
6877 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6878 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6879
6880 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6881 Stan Shebs <stan@codesourcery.com>
6882
6883 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6884 (all): Depend on $(extra_libraries).
6885 (install-only): Install the IPA.
6886 (IPA_OBJS, IPA_LIB): New.
6887 (clean): Remove the IPA lib.
6888 (IPAGENT_CFLAGS): New.
6889 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6890 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6891 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6892 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6893 * configure.ac: Check for atomic builtins support in the compiler.
6894 (IPA_DEPFILES, extra_libraries): Define.
6895 * configure.srv (ipa_obj): Add description.
6896 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6897 (i[34567]86-*-linux*): Set ipa_obj.
6898 (x86_64-*-linux*): Set ipa_obj.
6899 * linux-low.c (stabilizing_threads): New.
6900 (supports_fast_tracepoints): New.
6901 (linux_detach): Stabilize threads before detaching.
6902 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6903 the lwp is either not stabilizing, or is moving out of a jump pad.
6904 (linux_fast_tracepoint_collecting): New.
6905 (maybe_move_out_of_jump_pad): New.
6906 (enqueue_one_deferred_signal): New.
6907 (dequeue_one_deferred_signal): New.
6908 (linux_wait_for_event_1): If moving out of a jump pad, defer
6909 pending signals to later.
6910 (linux_stabilize_threads): New.
6911 (linux_wait_1): Check if threads need moving out of jump pads, and
6912 do it if so.
6913 (stuck_in_jump_pad_callback): New.
6914 (move_out_of_jump_pad_callback): New.
6915 (lwp_running): New.
6916 (linux_resume_one_lwp): Handle moving out of jump pads.
6917 (linux_set_resume_request): Dequeue deferred signals.
6918 (need_step_over_p): Also step over fast tracepoint jumps.
6919 (start_step_over): Also uninsert fast tracepoint jumps.
6920 (finish_step_over): Also reinsert fast tracepoint jumps.
6921 (linux_install_fast_tracepoint_jump): New.
6922 (linux_target_ops): Install linux_stabilize_threads and
6923 linux_install_fast_tracepoint_jump_pad.
6924 * linux-low.h (linux_target_ops) <get_thread_area,
6925 install_fast_tracepoint_jump_pad>: New fields.
6926 (struct lwp_info) <collecting_fast_tracepoint,
6927 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6928 (linux_get_thread_area): Declare.
6929 * linux-x86-low.c (jump_insn): New.
6930 (x86_get_thread_area): New.
6931 (append_insns): New.
6932 (push_opcode): New.
6933 (amd64_install_fast_tracepoint_jump_pad): New.
6934 (i386_install_fast_tracepoint_jump_pad): New.
6935 (x86_install_fast_tracepoint_jump_pad): New.
6936 (the_low_target): Install x86_get_thread_area and
6937 x86_install_fast_tracepoint_jump_pad.
6938 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6939 (struct fast_tracepoint_jump): New.
6940 (fast_tracepoint_jump_insn): New.
6941 (fast_tracepoint_jump_shadow): New.
6942 (find_fast_tracepoint_jump_at): New.
6943 (fast_tracepoint_jump_here): New.
6944 (delete_fast_tracepoint_jump): New.
6945 (set_fast_tracepoint_jump): New.
6946 (uninsert_fast_tracepoint_jumps_at): New.
6947 (reinsert_fast_tracepoint_jumps_at): New.
6948 (set_breakpoint_at): Use write_inferior_memory.
6949 (uninsert_raw_breakpoint): Use write_inferior_memory.
6950 (check_mem_read): Mask out fast tracepoint jumps.
6951 (check_mem_write): Mask out fast tracepoint jumps.
6952 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6953 (set_fast_tracepoint_jump): Declare.
6954 (delete_fast_tracepoint_jump)
6955 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6956 (reinsert_fast_tracepoint_jumps_at): Declare.
6957 * regcache.c: Don't compile many functions when building the
6958 in-process agent library.
6959 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6960 the register buffer in the heap.
6961 (free_register_cache): If the register buffer isn't owned by the
6962 regcache, don't free it.
6963 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6964 pre-existing register caches.
6965 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6966 type.
6967 (convert_ascii_to_int): : Constify `from' parameter type.
6968 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6969 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6970 the needed buffer in-place.
6971 (relocate_instruction): New.
6972 * server.c (handle_query) <qSymbols>: If the target supports
6973 tracepoints, give it a chance of looking up symbols. Report
6974 support for fast tracepoints.
6975 (handle_status): Stabilize threads.
6976 (process_serial_event): Adjust.
6977 * server.h (struct fast_tracepoint_jump): Forward declare.
6978 (struct process_info) <fast_tracepoint_jumps>: New field.
6979 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6980 (decode_X_packet, decode_M_packet): Adjust.
6981 (relocate_instruction): Declare.
6982 (in_process_agent_loaded): Declare.
6983 (tracepoint_look_up_symbols): Declare.
6984 (struct fast_tpoint_collect_status): Declare.
6985 (fast_tracepoint_collecting): Declare.
6986 (force_unlock_trace_buffer): Declare.
6987 (handle_tracepoint_bkpts): Declare.
6988 (initialize_low_tracepoint)
6989 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6990 * target.h (struct target_ops) <stabilize_threads,
6991 install_fast_tracepoint_jump_pad>: New fields.
6992 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6993 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6994 [HAVE_STDINT_H]: Include stdint.h.
6995 (trace_debug_1): Rename to ...
6996 (trace_vdebug): ... this.
6997 (trace_debug): Rename to ...
6998 (trace_debug_1): ... this. Add `level' parameter.
6999 (trace_debug): New.
7000 (ATTR_USED, ATTR_NOINLINE): New.
7001 (IP_AGENT_EXPORT): New.
7002 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7003 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7004 (about_to_request_buffer_space, trace_buffer_is_full)
7005 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7006 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7007 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7008 (traceframe_write_count, traceframes_created)
7009 (trace_state_variables)
7010 New renaming defines.
7011 (struct ipa_sym_addresses): New.
7012 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7013 (symbol_list): New.
7014 (ipa_sym_addrs): New.
7015 (all_tracepoint_symbols_looked_up): New.
7016 (in_process_agent_loaded): New.
7017 (write_e_ipa_not_loaded): New.
7018 (maybe_write_ipa_not_loaded): New.
7019 (tracepoint_look_up_symbols): New.
7020 (debug_threads) [IN_PROCESS_AGENT]: New.
7021 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7022 (UNKNOWN_SIDE_EFFECTS): New.
7023 (stop_tracing): New.
7024 (flush_trace_buffer): New.
7025 (stop_tracing_bkpt): New.
7026 (flush_trace_buffer_bkpt): New.
7027 (read_inferior_integer): New.
7028 (read_inferior_uinteger): New.
7029 (read_inferior_data_pointer): New.
7030 (write_inferior_data_pointer): New.
7031 (write_inferior_integer): New.
7032 (write_inferior_uinteger): New.
7033 (struct collect_static_trace_data_action): Delete.
7034 (enum tracepoint_type): New.
7035 (struct tracepoint) <type>: New field `type'.
7036 <actions_str, step_actions, step_actions_str>: Only include in
7037 GDBserver.
7038 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7039 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7040 (tracepoints): Use IP_AGENT_EXPORT.
7041 (last_tracepoint): Don't include in the IPA.
7042 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7043 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7044 (alloced_trace_state_variables): New.
7045 (trace_state_variables): Use IP_AGENT_EXPORT.
7046 (traceframe_t): Delete unused variable.
7047 (circular_trace_buffer): Don't include in the IPA.
7048 (trace_buffer_start): Delete.
7049 (struct trace_buffer_control): New.
7050 (trace_buffer_free): Delete.
7051 (struct ipa_trace_buffer_control): New.
7052 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7053 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7054 New.
7055 (trace_buffer_ctrl): New.
7056 (TRACE_BUFFER_CTRL_CURR): New.
7057 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7058 Reimplement as macros.
7059 (trace_buffer_wrap): Delete.
7060 (traceframe_write_count, traceframe_read_count)
7061 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7062 (struct tracepoint_hit_ctx) <type>: New field.
7063 (struct fast_tracepoint_ctx): New.
7064 (memory_barrier): New.
7065 (cmpxchg): New.
7066 (record_tracepoint_error): Update atomically in the IPA.
7067 (clear_inferior_trace_buffer): New.
7068 (about_to_request_buffer_space): New.
7069 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7070 updating the same buffer.
7071 (add_tracepoint): Default the tracepoint's type to trap
7072 tracepoint, and orig_size to -1.
7073 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7074 internal variables.
7075 (create_trace_state_variable): New parameter `gdb'. Handle it.
7076 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7077 (cmd_qtdp): Handle fast tracepoints.
7078 (cmd_qtdv): Adjust.
7079 (max_jump_pad_size): New.
7080 (gdb_jump_pad_head): New.
7081 (get_jump_space_head): New.
7082 (claim_jump_space): New.
7083 (sort_tracepoints): New.
7084 (MAX_JUMP_SIZE): New.
7085 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7086 IPA.
7087 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7088 support. Upload fast traceframes, and delete internal IPA
7089 breakpoints.
7090 (stop_tracing_handler): New.
7091 (flush_trace_buffer_handler): New.
7092 (cmd_qtstop): Upload fast tracepoints.
7093 (response_tracepoint): Handle fast tracepoints.
7094 (tracepoint_finished_step): Upload fast traceframes. Set the
7095 tracepoint hit context's tracepoint type.
7096 (handle_tracepoint_bkpts): New.
7097 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7098 type. Add comment about fast tracepoints.
7099 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7100 non-existing action_str field.
7101 (get_context_regcache): Handle fast tracepoints.
7102 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7103 to the regcache.
7104 (fast_tracepoint_from_jump_pad_address): New.
7105 (fast_tracepoint_from_ipa_tpoint_address): New.
7106 (collecting_t): New.
7107 (force_unlock_trace_buffer): New.
7108 (fast_tracepoint_collecting): New.
7109 (collecting): New.
7110 (gdb_collect): New.
7111 (write_inferior_data_ptr): New.
7112 (target_tp_heap): New.
7113 (target_malloc): New.
7114 (download_agent_expr): New.
7115 (UALIGN): New.
7116 (download_tracepoints): New.
7117 (download_trace_state_variables): New.
7118 (upload_fast_traceframes): New.
7119 (IPA_FIRST_TRACEFRAME): New.
7120 (IPA_NEXT_TRACEFRAME_1): New.
7121 (IPA_NEXT_TRACEFRAME): New.
7122 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7123 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7124 (gdb_jump_pad_buffer_end): New.
7125 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7126 (initialize_tracepoint): Adjust.
7127 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7128 buffer. Initialize the low module.
7129 * utils.c (PREFIX, TOOLNAME): New.
7130 (malloc_failure): Use PREFIX.
7131 (error): In the IPA, an error causes an exit.
7132 (fatal, warning): Use PREFIX.
7133 (internal_error): Use TOOLNAME.
7134 (NUMCELLS): Increase to 10.
7135 * configure, config.in: Regenerate.
7136
7137 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7138
7139 * server.c (handle_query) <qSupported>: Do two passes over the
7140 qSupported string to avoid nesting strtok.
7141
7142 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7143
7144 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7145 (CDEPS): New.
7146 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7147 -Wl,--dynamic-list.
7148 * configure: Regenerate.
7149 * proc-service.list: New.
7150
7151 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7152
7153 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7154 New comment.
7155
7156 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7157
7158 * gdbreplay.c (remote_open): Check error return from socket() call by
7159 its equality to -1 not by it being negative.
7160 * remote-utils.c (remote_open): Likewise.
7161
7162 2010-05-23 Pedro Alves <pedro@codesourcery.com>
7163
7164 * config.h: Regenerate.
7165
7166 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7167
7168 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7169 doesn't provide PTRACE_GET_THREAD_AREA.
7170
7171 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7172
7173 * linux-m68k-low.c: Include <asm/ptrace.h>
7174 (ps_get_thread_area): Implement.
7175
7176 2010-05-03 Doug Evans <dje@google.com>
7177
7178 * event-loop.c (struct callback_event): New struct.
7179 (callback_list): New global.
7180 (append_callback_event, delete_callback_event): New functions.
7181 (process_callback): New function.
7182 (start_event_loop): Call it.
7183 * remote-utils.c (NOT_SCHEDULED): Define.
7184 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7185 moved out of readchar.
7186 (readchar): Rewrite. Call reschedule before returning.
7187 (reset_readchar): New function.
7188 (remote_close): Call it.
7189 (process_remaining, reschedule): New functions.
7190 * server.h (callback_handler_func): New typedef.
7191 (append_callback_event, delete_callback_event): Declare.
7192
7193 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7194
7195 * proc-service.c (ps_pglobal_lookup): Use
7196 thread_db_look_up_one_symbol.
7197 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7198 parameter. Use it instead of all_symbols_looked_up.
7199 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7200 field.
7201 (all_symbols_looked_up): Don't declare.
7202 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7203 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7204 field.
7205 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7206 Set all_symbols_looked_up here.
7207 (thread_db_look_up_one_symbol): New.
7208 (thread_db_get_tls_address): Adjust.
7209 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7210 thread_db object on the heap, and tentatively set it in the
7211 process structure.
7212 (thread_db_init): Don't set all_symbols_looked_up here.
7213 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7214
7215 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7216
7217 * linux-low.c (linux_kill, linux_detach): Adjust.
7218 (status_pending_p_callback): Remove redundant statement. Check
7219 for !TARGET_WAITIKIND_IGNORE, instead of
7220 TARGET_WAITKIND_STOPPED.
7221 (handle_tracepoints): Make sure LWP is locked. Adjust.
7222 (linux_wait_for_event_1): Adjust.
7223 (linux_cancel_breakpoints): New.
7224 (unsuspend_one_lwp): New.
7225 (unsuspend_all_lwps): New.
7226 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7227 (send_sigstop_callback): Change return type to int, add new
7228 `except' parameter and handle it.
7229 (suspend_and_send_sigstop_callback): New.
7230 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7231 pass them down. If SUSPEND, also increment the lwp's suspend
7232 count.
7233 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7234 (need_step_over_p): Don't consider suspended LWPs.
7235 (start_step_over): Adjust.
7236 (proceed_one_lwp): Change return type to int, add new `except'
7237 parameter and handle it.
7238 (unsuspend_and_proceed_one_lwp): New.
7239 (proceed_all_lwps): Use find_inferior instead of
7240 for_each_inferior.
7241 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7242 also decrement the suspend count of LWPs. Pass `except' down,
7243 instead of hacking its suspend count.
7244 (linux_pause_all): Add `freeze' parameter. Adjust.
7245 (linux_unpause_all): New.
7246 (linux_target_ops): Install linux_unpause_all.
7247 * server.c (handle_status): Adjust.
7248 * target.h (struct target_ops): New fields `unpause_all' and
7249 `cancel_breakpoints'. Add new parameter to `pause_all'.
7250 (pause_all): Add new `freeze' parameter.
7251 (unpause_all): New.
7252 (cancel_breakpoints): New.
7253 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7254 cancel breakpoints.
7255 (cmd_qtstart): Pause threads.
7256 (stop_tracing): Pause threads, and cancel breakpoints.
7257 * win32-low.c (win32_target_ops): Adjust.
7258
7259 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7260
7261 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7262 the inferior right away from here...
7263 (linux_wait_1): ... to here, and adjust to check the thread's
7264 last_resume_kind instead of the lwp's step or stop_expected flags.
7265
7266 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7267
7268 * README: Use consistent `GDB' and `GDBserver' spellings.
7269
7270 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7271
7272 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7273 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7274 (linux_detach_one_lwp): Assume the lwp is stopped.
7275 (any_thread_of): Delete.
7276 (linux_detach): Stop all lwps here. Don't blindly delete all
7277 breakpoints.
7278 (delete_lwp_callback): New.
7279 (linux_mourn): Delete all lwps of the process that is gone.
7280 (linux_wait_1): Don't delete the last lwp of the process here.
7281 * mem-break.h (mark_breakpoints_out): Declare.
7282 * mem-break.c (mark_breakpoints_out): New.
7283 (free_all_breakpoints): Use it.
7284 * server.c (handle_target_event): If the process is gone, mark
7285 breakpoints out.
7286 * thread-db.c (struct thread_db) <create_bp>: New field.
7287 (thread_db_enable_reporting): Fix prototype. Store a thread event
7288 breakpoint reference in the thread_db struct.
7289 (thread_db_load_search): Clear the thread_db object.
7290 (try_thread_db_load_1): Ditto.
7291 (switch_to_process): New.
7292 (disable_thread_event_reporting): Use it.
7293 (remove_thread_event_breakpoints): New.
7294 (thread_db_detach, thread_db_mourn): Use it.
7295
7296 2010-05-01 Pedro Alves <pedro@codesourcery.com>
7297
7298 * linux-low.c (linux_enable_event_reporting): New.
7299 (linux_wait_for_event_1, handle_extended_wait): Use it.
7300
7301 2010-04-30 Pedro Alves <pedro@codesourcery.com>
7302
7303 * linux-low.c (linux_kill_one_lwp, linux_kill)
7304 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7305 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7306 SIGSTOP even if the LWP is stopped.
7307 (send_sigstop_callback): New.
7308 (stop_all_lwps): Use send_sigstop_callback instead.
7309 (linux_resume_one_thread): Adjust.
7310 (proceed_one_lwp): Still proceed an LWP that the client has
7311 requested to stop, if we haven't reported it as stopped yet. Make
7312 sure that LWPs the client want stopped, have a pending SIGSTOP.
7313
7314 2010-04-26 Doug Evans <dje@google.com>
7315
7316 * server.c (handle_general_set): Make static.
7317
7318 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7319 Print received char after testing for error/eof instead of before.
7320 (input_interrupt): Tweak comment.
7321
7322 2010-04-23 Doug Evans <dje@google.com>
7323
7324 * server.c (start_inferior): Print inferior argv if --debug.
7325
7326 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7327
7328 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7329 * nto-x86-low.c: Include server.h
7330
7331 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7332
7333 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7334 be consistent with other sources of this directory.
7335 (init_registers_amd64): Correct name of source file of this function
7336 in the comment.
7337
7338 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7339
7340 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7341 64-bit executables.
7342
7343 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7344
7345 * win32-i386-low.c: Add 64-bit support.
7346 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7347 (init_registers_amd64): Declare.
7348 (mappings): Add 64-bit version of array.
7349 (init_windows_x86): New function.
7350 (the_low_target): Change init_arch field to init_windows_x86.
7351
7352 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7353
7354 * win32-low.c: Adapt to support also 64-bit architecture.
7355 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7356 (get_image_name): Use SIZE_T type for local variable `done'.
7357 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7358 (toolhelp_get_dll_name): Idem.
7359 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7360 Use uintptr_t typecast to avoid warning.
7361 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7362 (handle_exception): Use phex_nz to avoid warning.
7363 (win32_wait): Remove unused local variable `process'.
7364
7365 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7366
7367 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7368 `amd64-avx.o'.
7369
7370 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7371
7372 * configure.ac: Use `ws2_32' library for srv_mingw.
7373 * configure: Regenerate.
7374 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7375 * remote-utils.c: Likewise.
7376
7377 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7378
7379 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7380 if __x86_64__ is defined.
7381
7382 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7383
7384 * configure: Regenerate.
7385
7386 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7387
7388 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7389 * target.h (target_ops): New get_tib_address field.
7390 * win32-low.h (win32_thread_info): Add thread_local_base field.
7391 * win32-low.c (child_add_thread): Add tlb argument.
7392 Set thread_local_base field to TLB.
7393 (get_child_debug_event): Adapt to child_add_thread change.
7394 (win32_get_tib_address): New function.
7395 (win32_target_ops): Set get_tib_address field to
7396 win32_get_tib_address.
7397 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7398
7399 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7400
7401 * linux-low.c (linux_mourn): Also remove the process.
7402 * server.c (handle_target_event): Don't remove the process here.
7403 * nto-low.c (nto_mourn): New.
7404 (nto_target_ops): Install it.
7405 * spu-low.c (spu_mourn): New.
7406 (spu_target_ops): Install it.
7407 * win32-low.c (win32_mourn): New.
7408 (win32_target_ops): Install it.
7409
7410 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7411
7412 * server.h (buffer_xml_printf): Remove redundant `;'.
7413
7414 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7415
7416 * regcache.c (set_register_cache): Invalidate regcaches before
7417 changing the register cache layout.
7418 (regcache_invalidate_one): Allow a NULL regcache.
7419 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7420 regcaches before changing the register cache layout or the target
7421 regsets.
7422
7423 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7424
7425 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7426 variable warning on Linux/x86-64.
7427
7428 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7429
7430 GDBserver disconnected tracing support.
7431
7432 * linux-low.c (linux_remove_process): Delete.
7433 (add_lwp): Don't set last_resume_kind here.
7434 (linux_kill): Use `mourn'.
7435 (linux_detach): Use `thread_db_detach', and `mourn'.
7436 (linux_mourn): New.
7437 (linux_attach_lwp_1): Adjust comment.
7438 (linux_attach): last_resume_kind moved the thread_info; adjust.
7439 (status_pending_p_callback): Adjust.
7440 (linux_wait_for_event_1): Adjust.
7441 (count_events_callback, select_singlestep_lwp_callback)
7442 (select_event_lwp_callback, cancel_breakpoints_callback)
7443 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7444 (proceed_one_lwp): Adjust.
7445 (linux_async): Add debug output.
7446 (linux_thread_stopped): New.
7447 (linux_pause_all): New.
7448 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7449 linux_pause_all.
7450 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7451 (thread_db_free): Delete declaration.
7452 (thread_db_detach, thread_db_mourn): Declare.
7453 * thread-db.c (thread_db_init): Use thread_db_mourn.
7454 (thread_db_free): Delete, split in two.
7455 (disable_thread_event_reporting): New.
7456 (thread_db_detach): New.
7457 (thread_db_mourn): New.
7458
7459 * server.h (struct thread_info) <last_resume_kind>: New field.
7460 <attached>: Add comment.
7461 <gdb_detached>: New field.
7462 (handler_func): Change return type to int.
7463 (handle_serial_event, handle_target_event): Ditto.
7464 (gdb_connected): Declare.
7465 (tracing): Delete.
7466 (disconnected_tracing): Declare.
7467 (stop_tracing): Declare.
7468
7469 * server.c (handle_query) <qSupported>: Report support for
7470 disconnected tracing.
7471 (queue_stop_reply_callback): Account for running threads.
7472 (gdb_wants_thread_stopped): New.
7473 (gdb_wants_all_threads_stopped): New.
7474 (gdb_reattached_process): New.
7475 (handle_status): Clear the `gdb_detached' flag of all processes.
7476 In all-stop, stop all threads.
7477 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7478 (process_serial_event): If the remote connection breaks, or if an
7479 exit was forced with "monitor exit", force an event loop exit.
7480 Handle disconnected tracing on detach.
7481 (handle_serial_event): Adjust.
7482 (handle_target_event): If GDB isn't connected, forward events back
7483 to the inferior, unless the last process exited, in which case,
7484 exit gdbserver. Adjust interface.
7485
7486 * remote-utils.c (remote_open): Don't block in accept. Instead
7487 register an event loop source on the listen socket file
7488 descriptor. Refactor bits into ...
7489 (listen_desc): ... this new global.
7490 (gdb_connected): ... this new function.
7491 (enable_async_notification): ... this new function.
7492 (handle_accept_event): ... this new function.
7493 (remote_close): Clear remote_desc.
7494
7495 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7496
7497 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7498 New fields.
7499 (mourn_inferior): Define.
7500 (target_process_qsupported): Avoid the dangling else problem.
7501 (thread_stopped): Define.
7502 (pause_all): Define.
7503 (target_waitstatus_to_string): Declare.
7504 * target.c (target_waitstatus_to_string): New.
7505
7506 * tracepoint.c (tracing): Make extern.
7507 (disconnected_tracing): New.
7508 (stop_tracing): Make extern. Handle tracing stops due to GDB
7509 disconnecting.
7510 (cmd_qtdisconnected): New.
7511 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7512 (handle_tracepoint_general_set): Handle QTDisconnected.
7513
7514 * event-loop.c (event_handler_func): Change return type to int.
7515 (process_event): Bail out if the event handler wants the event
7516 loop to stop.
7517 (handle_file_event): Ditto.
7518 (start_event_loop): Bail out if the event handler wants the event
7519 loop to stop.
7520
7521 * nto-low.c (nto_target_ops): Adjust.
7522 * spu-low.c (spu_wait): Don't remove the process here.
7523 (spu_target_ops): Adjust.
7524 * win32-low.c (win32_wait): Don't remove the process here.
7525 (win32_target_ops): Adjust.
7526
7527 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7528
7529 * regcache.c (realloc_register_cache): Invalidate inferior's
7530 regcache before recreating it.
7531
7532 2010-04-09 Pedro Alves <pedro@codesourcery.com>
7533
7534 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7535
7536 2010-04-09 Stan Shebs <stan@codesourcery.com>
7537 Pedro Alves <pedro@codesourcery.com>
7538
7539 * server.h (LONGEST): New.
7540 (struct thread_info) <while_stepping>: New field.
7541 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7542 Declare.
7543 (initialize_tracepoint, handle_tracepoint_general_set)
7544 (handle_tracepoint_query, tracepoint_finished_step)
7545 (tracepoint_was_hit, release_while_stepping_state_list):
7546 (current_traceframe): Declare.
7547 * server.c (handle_general_set): Handle tracepoint packets.
7548 (read_memory): New.
7549 (write_memory): New.
7550 (handle_search_memory_1): Use read_memory.
7551 (handle_query): Report support for conditional tracepoints, trace
7552 state variables, and tracepoint sources. Handle tracepoint
7553 queries.
7554 (main): Initialize the tracepoints module.
7555 (process_serial_event): Handle traceframe reads/writes.
7556
7557 * linux-low.c (handle_tracepoints): New.
7558 (linux_wait_1): Call it.
7559 (linux_resume_one_lwp): Handle while-stepping.
7560 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7561 (linux_target_ops): Install them.
7562 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7563 New field.
7564 * linux-x86-low.c (x86_supports_tracepoints): New.
7565 (the_low_target). Install it.
7566
7567 * mem-break.h (delete_breakpoint): Declare.
7568 * mem-break.c (delete_breakpoint): Make external.
7569
7570 * target.h (struct target_ops): Add `supports_tracepoints',
7571 `read_pc', and `write_pc' fields.
7572 (target_supports_tracepoints): Define.
7573 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7574 (phex_nz): New.
7575
7576 * regcache.h (struct regcache) <registers_owned>: New field.
7577 (init_register_cache, regcache_cpy): Declare.
7578 (regcache_read_pc, regcache_write_pc): Declare.
7579 (register_cache_size): Declare.
7580 (supply_regblock): Declare.
7581 * regcache.c (init_register_cache): New.
7582 (new_register_cache): Use it.
7583 (regcache_cpy): New.
7584 (register_cache_size): New.
7585 (supply_regblock): New.
7586 (regcache_read_pc, regcache_write_pc): New.
7587
7588 * tracepoint.c: New.
7589
7590 * Makefile.in (OBS): Add tracepoint.o.
7591 (tracepoint.o): New rule.
7592
7593 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7594
7595 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7596 (i386-mmx.o): New.
7597 (i386-mmx.c): Likewise.
7598 (i386-mmx-linux.o): Likewise.
7599 (i386-mmx-linux.c): Likewise.
7600
7601 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7602 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7603 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7604 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7605
7606 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7607 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7608 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7609
7610 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7611
7612 * Makefile.in (clean): Updated.
7613 (i386-avx.o): New.
7614 (i386-avx.c): Likewise.
7615 (i386-avx-linux.o): Likewise.
7616 (i386-avx-linux.c): Likewise.
7617 (amd64-avx.o): Likewise.
7618 (amd64-avx.c): Likewise.
7619 (amd64-avx-linux.o): Likewise.
7620 (amd64-avx-linux.c): Likewise.
7621
7622 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7623 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7624 (srv_amd64_regobj): Add amd64-avx.o.
7625 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7626 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7627 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7628 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7629 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7630 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7631 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7632
7633 * i387-fp.c: Include "i386-xstate.h".
7634 (i387_xsave): New.
7635 (i387_cache_to_xsave): Likewise.
7636 (i387_xsave_to_cache): Likewise.
7637 (x86_xcr0): Likewise.
7638
7639 * i387-fp.h (i387_cache_to_xsave): Likewise.
7640 (i387_xsave_to_cache): Likewise.
7641 (x86_xcr0): Likewise.
7642
7643 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7644 * linux-crisv32-low.c (target_regsets): Likewise.
7645 * linux-m68k-low.c (target_regsets): Likewise.
7646 * linux-mips-low.c (target_regsets): Likewise.
7647 * linux-ppc-low.c (target_regsets): Likewise.
7648 * linux-s390-low.c (target_regsets): Likewise.
7649 * linux-sh-low.c (target_regsets): Likewise.
7650 * linux-sparc-low.c (target_regsets): Likewise.
7651 * linux-xtensa-low.c (target_regsets): Likewise.
7652
7653 * linux-low.c: Include <sys/uio.h>.
7654 (regsets_fetch_inferior_registers): Support nt_type.
7655 (regsets_store_inferior_registers): Likewise.
7656 (linux_process_qsupported): New.
7657 (linux_target_ops): Add linux_process_qsupported.
7658
7659 * linux-low.h (regset_info): Add nt_type.
7660 (linux_target_ops): Add process_qsupported.
7661
7662 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7663 and <sys/uio.h>.
7664 (init_registers_i386_avx_linux): New.
7665 (init_registers_amd64_avx_linux): Likewise.
7666 (xmltarget_i386_linux_no_xml): Likewise.
7667 (xmltarget_amd64_linux_no_xml): Likewise.
7668 (PTRACE_GETREGSET): Likewise.
7669 (PTRACE_SETREGSET): Likewise.
7670 (x86_fill_xstateregset): Likewise.
7671 (x86_store_xstateregset): Likewise.
7672 (use_xml): Likewise.
7673 (x86_linux_update_xmltarget): Likewise.
7674 (x86_linux_process_qsupported): Likewise.
7675 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7676 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7677 init_registers_i386_linux here. Call
7678 x86_linux_update_xmltarget.
7679 (the_low_target): Add x86_linux_process_qsupported.
7680
7681 * server.c (handle_query): Call target_process_qsupported.
7682
7683 * target.h (target_ops): Add process_qsupported.
7684 (target_process_qsupported): New.
7685
7686 2010-04-03 Pedro Alves <pedro@codesourcery.com>
7687
7688 * inferiors.c (add_thread): Set last_status kind to
7689 TARGET_WAITKIND_IGNORE.
7690 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7691 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7692 (linux_wait_1): Move `thread' local definition to block that uses
7693 it. Don't NULL initialize `event_child'.
7694 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7695 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7696 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7697
7698 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7699
7700 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7701 an extended waitstatus, or by a watchpoint.
7702 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7703 thread was stepping or has been stopped by a watchpoint.
7704
7705 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7706
7707 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7708 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7709 of another, then delete the previous, and validate all
7710 breakpoints.
7711 (validate_inserted_breakpoint): New.
7712 (delete_disabled_breakpoints): New.
7713 (validate_breakpoints): New.
7714 (check_mem_read): Validate breakpoints before trusting their
7715 shadow. Delete disabled breakpoints.
7716 (check_mem_write): Validate breakpoints before trusting they
7717 should be inserted. Delete disabled breakpoints.
7718 * mem-break.h (validate_breakpoints):
7719 * server.c (handle_query): Validate breakpoints when we see a
7720 qSymbol query.
7721
7722 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7723
7724 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7725 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7726 if we could tell there's a GDB breakpoint at stop_pc.
7727 (need_step_over_p): Don't do a step over if we find a GDB
7728 breakpoint at the resume PC.
7729
7730 * mem-break.c (struct raw_breakpoint): New.
7731 (enum bkpt_type): New type `gdb_breakpoint'.
7732 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7733 fields. New field `raw'.
7734 (find_raw_breakpoint_at): New.
7735 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7736 breakpoint instead.
7737 (set_breakpoint_at): Adjust.
7738 (delete_raw_breakpoint): New.
7739 (release_breakpoint): New.
7740 (delete_breakpoint): Rename to...
7741 (delete_breakpoint_1): ... this. Add proc parameter. Use
7742 release_breakpoint. Return ENOENT.
7743 (delete_breakpoint): Reimplement.
7744 (find_breakpoint_at): Delete.
7745 (find_gdb_breakpoint_at): New.
7746 (delete_breakpoint_at): Delete.
7747 (set_gdb_breakpoint_at): New.
7748 (delete_gdb_breakpoint_at): New.
7749 (gdb_breakpoint_here): New.
7750 (set_reinsert_breakpoint): Use release_breakpoint.
7751 (uninsert_breakpoint): Rename to ...
7752 (uninsert_raw_breakpoint): ... this.
7753 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7754 (reinsert_raw_breakpoint): Change parameter type to
7755 raw_breakpoint.
7756 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7757 instead.
7758 (check_breakpoints): Adjust. Use release_breakpoint.
7759 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7760 (breakpoint_inserted_here): Ditto.
7761 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7762 Don't trust the breakpoint's shadow if it is not inserted.
7763 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7764 (delete_all_breakpoints): Adjust.
7765 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7766 use delete_breakpoint_1.
7767
7768 * mem-break.h (breakpoints_supported): Delete declaration.
7769 (set_gdb_breakpoint_at): Declare.
7770 (gdb_breakpoint_here): Declare.
7771 (delete_breakpoint_at): Delete.
7772 (delete_gdb_breakpoint_at): Declare.
7773
7774 * server.h (struct raw_breakpoint): Forward declare.
7775 (struct process_info): New field `raw_breakpoints'.
7776
7777 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7778 breakpoints.
7779
7780 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7781
7782 * linux-low.c (status_pending_p_callback): Fix comment.
7783 (linux_wait_for_event_1): Move most of the internal breakpoint
7784 handling from here...
7785 (linux_wait_1): ... to here.
7786 (count_events_callback): New.
7787 (select_singlestep_lwp_callback): New.
7788 (select_event_lwp_callback): New.
7789 (cancel_breakpoints_callback): New.
7790 (select_event_lwp): New.
7791 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7792 priority to all LWPs that have had events that should be reported
7793 to the client. Cancel breakpoints when about to reporting the
7794 event to the client, not while stopping lwps. No longer cancel
7795 finished single-steps here.
7796 (cancel_finished_single_step): Delete.
7797 (cancel_finished_single_steps): Delete.
7798
7799 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7800
7801 * mem-break.c (enum bkpt_type): New.
7802 (struct breakpoint): New field `type'.
7803 (set_breakpoint_at): Change return type to struct breakpoint
7804 pointer. Set type to `other_breakpoint' by default.
7805 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7806 in the breakpoint list.
7807 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7808 (reinsert_breakpoint): Rename to ...
7809 (reinsert_raw_breakpoint): ... this.
7810 (reinsert_breakpoints_at): Adjust.
7811 * mem-break.h (struct breakpoint): Declare.
7812 (set_breakpoint_at): Change return type to struct breakpoint
7813 pointer.
7814
7815 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7816
7817 * server.c (handle_query): Assign, not compare.
7818
7819 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7820
7821 Teach linux gdbserver to step-over-breakpoints.
7822
7823 * linux-low.c (can_hardware_single_step): New.
7824 (supports_breakpoints): New.
7825 (handle_extended_wait): If stopping threads, read the stop pc of
7826 the new cloned LWP.
7827 (get_pc): New.
7828 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7829 low target doesn't support retrieving the PC.
7830 (add_lwp): Set last_resume_kind to resume_continue.
7831 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7832 (linux_attach): Don't clear stop_expected. Set the lwp's
7833 last_resume_kind to resume_stop.
7834 (linux_detach_one_lwp): Don't check for removed breakpoints.
7835 (check_removed_breakpoint): Delete.
7836 (status_pending_p): Rename to ...
7837 (status_pending_p_callback): ... this. Don't check for removed
7838 breakpoints. Don't consider threads that are stopped from GDB's
7839 perspective.
7840 (linux_wait_for_lwp): Always read the stop_pc here.
7841 (cancel_breakpoint): New.
7842 (step_over_bkpt): New global.
7843 (linux_wait_for_event_1): Implement stepping over breakpoints.
7844 (gdb_wants_lwp_stopped): New.
7845 (gdb_wants_all_stopped): New.
7846 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7847 single-step traps here. Store the thread's last reported target
7848 wait status.
7849 (send_sigstop): Don't clear stop_expected. Always set it,
7850 instead.
7851 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7852 (cancel_finished_single_step): New.
7853 (cancel_finished_single_steps): New.
7854 (wait_for_sigstop): Don't cancel finished single-step traps here.
7855 (linux_resume_one_lwp): Don't check for removed breakpoints.
7856 Don't set `step' on non-hardware step archs.
7857 (linux_set_resume_request): Ignore resume_stop requests if already
7858 stopping or stopped. Set the lwp's last_resume_kind.
7859 (resume_status_pending_p): Don't check for removed breakpoints.
7860 (need_step_over_p): New.
7861 (start_step_over): New.
7862 (finish_step_over): New.
7863 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7864 requests. Clear the thread's last reported target waitstatus.
7865 Don't use the `suspended' flag. Don't consider pending breakpoints.
7866 (linux_resume): Start a step-over if necessary.
7867 (proceed_one_lwp): New.
7868 (proceed_all_lwps): New.
7869 (unstop_all_lwps): New.
7870 * linux-low.h (struct lwp_info): Rewrite comment for the
7871 `suspended' flag. Add the `stop_pc' field. Delete the
7872 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7873 Add `'last_resume_kind' and `need_step_over' fields.
7874 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7875 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7876 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7877 (set_raw_breakpoint_at): New.
7878 (set_breakpoint_at): Rewrite to use it.
7879 (reinsert_breakpoint_handler): Delete.
7880 (set_reinsert_breakpoint): New.
7881 (reinsert_breakpoint_by_bp): Delete.
7882 (delete_reinsert_breakpoints): New.
7883 (uninsert_breakpoint): Rewrite.
7884 (uninsert_breakpoints_at): New.
7885 (reinsert_breakpoint): Rewrite.
7886 (reinsert_breakpoints_at): New.
7887 (check_breakpoints): Rewrite.
7888 (breakpoint_here): New.
7889 (breakpoint_inserted_here): New.
7890 (check_mem_read): Adjust.
7891 * mem-break.h (breakpoints_supported, breakpoint_here)
7892 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7893 (reinsert_breakpoint_by_bp): Delete declaration.
7894 (delete_reinsert_breakpoints): Declare.
7895 (reinsert_breakpoint): Delete declaration.
7896 (reinsert_breakpoints_at): Declare.
7897 (uninsert_breakpoint): Delete declaration.
7898 (uninsert_breakpoints_at): Declare.
7899 (check_breakpoints): Adjust prototype.
7900 * server.h: Adjust include order.
7901 (struct thread_info): Declare here. Add a `last_status' field.
7902
7903 2010-03-23 Michael Snyder <msnyder@vmware.com>
7904
7905 * server.c (crc32): New function.
7906 (handle_query): Add handling for 'qCRC:' request.
7907
7908 2010-03-23 Pedro Alves <pedro@codesourcery.com>
7909
7910 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7911 lwp had been stopped by a watchpoint.
7912
7913 2010-03-16 Pedro Alves <pedro@codesourcery.com>
7914
7915 * server.h (internal_error): Declare.
7916 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7917 * utils.c (internal_error): New function.
7918
7919 2010-03-15 Andreas Schwab <schwab@redhat.com>
7920
7921 * configure.srv: Fix typo setting srv_regobj.
7922
7923 2010-03-15 Pedro Alves <pedro@codesourcery.com>
7924
7925 * linux-low.c (fetch_register): Avoid passing a non string literal
7926 format to `error'.
7927 (usr_store_inferior_registers): Ditto.
7928
7929 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7930
7931 * linux-low.c (linux_write_memory): Bail out early if peeking
7932 memory failed.
7933
7934 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7935
7936 * linux-low.h (struct lwp_info): New fields
7937 `stopped_by_watchpoint' and `stopped_data_address'.
7938 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7939 here, and cache them in the lwp object.
7940 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7941 directly.
7942 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7943 field.
7944 (linux_stopped_by_watchpoint): Rewrite.
7945 (linux_stopped_data_address): Rewrite.
7946
7947 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
7948
7949 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7950 switching the current inferior, not before.
7951
7952 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7953
7954 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7955 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7956 i386-linux.c and amd64-linux.c.
7957 (reg-i386.o): Removed.
7958 (reg-i386.c): Likewise.
7959 (reg-i386-linux.o): Likewise.
7960 (reg-i386-linux.c): Likewise.
7961 (reg-x86-64.o): Likewise.
7962 (reg-x86-64.c): Likewise.
7963 (reg-x86-64-linux.o): Likewise.
7964 (reg-x86-64-linux.c): Likewise.
7965 (i386.o): New.
7966 (i386.c): Likewise.
7967 (i386-linux.o): Likewise.
7968 (i386-linux.c): Likewise.
7969 (amd64.o): Likewise.
7970 (amd64.c): Likewise.
7971 (amd64-linux.o): Likewise.
7972 (amd64-linux.c): Likewise.
7973
7974 * configure.srv (srv_i386_regobj): New.
7975 (srv_i386_linux_regobj): Likewise.
7976 (srv_amd64_regobj): Likewise.
7977 (srv_amd64_linux_regobj): Likewise.
7978 (srv_i386_32bit_xmlfiles): Likewise.
7979 (srv_i386_64bit_xmlfiles): Likewise.
7980 (srv_i386_xmlfiles): Likewise.
7981 (srv_amd64_xmlfiles): Likewise.
7982 (srv_i386_linux_xmlfiles): Likewise.
7983 (srv_amd64_linux_xmlfiles): Likewise.
7984 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7985 srv_xmlfiles to $srv_i386_xmlfiles.
7986 (i[34567]86-*-mingw32ce*): Likewise.
7987 (i[34567]86-*-mingw*): Likewise.
7988 (i[34567]86-*-nto*): Likewise.
7989 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7990 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7991 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7992 (x86_64-*-linux*): Likewise.
7993
7994 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7995 (init_registers_amd64_linux): New.
7996 (x86_arch_setup): Replace init_registers_x86_64_linux with
7997 init_registers_amd64_linux.
7998
7999 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8000
8001 * configure.ac: Check for libdl. If it is not available link against
8002 static libthread_db.
8003 * configure: Regenerate.
8004
8005 2010-02-22 Pedro Alves <pedro@codesourcery.com>
8006
8007 PR9605
8008
8009 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8010 handing a read watchpoint.
8011 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8012
8013 2010-02-12 Doug Evans <dje@google.com>
8014
8015 * linux-low.c (linux_supports_tracefork_flag): Document.
8016 (linux_look_up_symbols): Add comment.
8017
8018 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8019
8020 * regcache.c (supply_register): Clear regcache if buf is NULL.
8021
8022 2010-02-02 Nicolas Roche <roche@sourceware.org>
8023 Joel Brobecker <brobecker@adacore.com>
8024
8025 * inferiors.c (find_inferior): Add function documentation.
8026 (unloaded_dll): Handle the case where the unloaded dll has not
8027 been previously registered in the dll list.
8028
8029 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8030
8031 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8032 (thumb2_breakpoint): New.
8033 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8034
8035 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8036
8037 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8038 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8039 breakpoints.
8040
8041 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8042
8043 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8044
8045 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8046
8047 * linux-s390-low.c (s390_collect_ptrace_register)
8048 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8049
8050 2010-01-21 Doug Evans <dje@google.com>
8051
8052 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8053 (PTRACE_ARG4_TYPE): New macro.
8054 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8055 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8056 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8057 (usr_store_inferior_registers): Ditto.
8058 (linux_read_memory, linux_write_memory): Ditto.
8059 (linux_test_for_tracefork): Ditto.
8060
8061 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8062 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8063
8064 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8065
8066 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8067 target.
8068
8069 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8070
8071 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8072 prototype to take a regcache. Adjust.
8073
8074 2010-01-20 Pedro Alves <pedro@codesourcery.com>
8075
8076 * regcache.h (struct thread_info): Forward declare.
8077 (struct regcache): New.
8078 (new_register_cache): Adjust prototype.
8079 (get_thread_regcache): Declare.
8080 (free_register_cache): Adjust prototype.
8081 (registers_to_string, registers_from_string): Ditto.
8082 (supply_register, supply_register_by_name, collect_register)
8083 (collect_register_as_string, collect_register_by_name): Ditto.
8084 * regcache.c (struct inferior_regcache_data): Delete.
8085 (get_regcache): Rename to ...
8086 (get_thread_regcache): ... this. Adjust. Switch inferior before
8087 fetching registers.
8088 (regcache_invalidate_one): Adjust.
8089 (regcache_invalidate): Fix prototype.
8090 (new_register_cache): Return the new register cache.
8091 (free_register_cache): Change prototype.
8092 (realloc_register_cache): Adjust.
8093 (registers_to_string): Change prototype to take a regcache. Adjust.
8094 (registers_from_string): Ditto.
8095 (register_data): Ditto.
8096 (supply_register): Ditto.
8097 (supply_register_by_name): Ditto.
8098 (collect_register): Ditto.
8099 (collect_register_as_string): Ditto.
8100 (collect_register_by_name): Ditto.
8101 * server.c (process_serial_event): Adjust.
8102 * linux-low.h (regset_fill_func, regset_store_func): Change
8103 prototype.
8104 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8105 Change prototype.
8106 * linux-low.c (get_stop_pc): Adjust.
8107 (check_removed_breakpoint): Adjust.
8108 (linux_wait_for_event): Adjust.
8109 (linux_resume_one_lwp): Adjust.
8110 (fetch_register): Add regcache parameter. Adjust.
8111 (usr_store_inferior_registers): Ditto.
8112 (regsets_fetch_inferior_registers): Ditto.
8113 (regsets_store_inferior_registers): Ditto.
8114 (linux_fetch_registers, linux_store_registers): Ditto.
8115 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8116 regcache. Adjust.
8117 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8118 Ditto.
8119 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8120 prototype to take a regcache.
8121 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8122 * remote-utils.c (convert_ascii_to_int, outreg)
8123 (prepare_resume_reply): Change prototype to take a regcache.
8124 Adjust.
8125 * target.h (struct target_ops) <fetch_registers, store_registers>:
8126 Change prototype to take a regcache.
8127 (fetch_inferior_registers, store_inferior_registers): Change
8128 prototype to take a regcache. Adjust.
8129 * proc-service.c (ps_lgetregs): Adjust.
8130 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8131 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8132 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8133 take a regcache. Adjust.
8134 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8135 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8136 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8137 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8138 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8139 (cris_cannot_fetch_register):
8140 (cris_breakpoint_at): Change prototype to take a regcache.
8141 Adjust.
8142 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8143 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8144 to take a regcache. Adjust.
8145 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8146 Adjust.
8147 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8148 take a regcache. Adjust.
8149 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8150 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8151 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8152 * linux-mips-low.c (mips_get_pc):
8153 (mips_set_pc): Change prototype to take a regcache. Adjust.
8154 (mips_reinsert_addr): Adjust.
8155 (mips_collect_register): Change prototype to take a regcache.
8156 Adjust.
8157 (mips_supply_register):
8158 (mips_collect_register_32bit, mips_supply_register_32bit)
8159 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8160 (mips_store_fpregset): Ditto.
8161 * linux-ppc-low.c (ppc_supply_ptrace_register)
8162 (ppc_supply_ptrace_register): Ditto.
8163 (parse_spufs_run): Adjust.
8164 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8165 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8166 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8167 take a regcache. Adjust.
8168 * linux-s390-low.c (s390_collect_ptrace_register)
8169 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8170 (s390_set_pc): Change prototype to take a regcache. Adjust.
8171 (s390_arch_setup): Adjust.
8172 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8173 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8174 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8175 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8176 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8177 regcache. Adjust.
8178 (sparc_breakpoint_at): Adjust.
8179 * linux-xtensa-low.c (xtensa_fill_gregset):
8180 (xtensa_store_gregset):
8181 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8182 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8183 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8184 prototype to take a regcache. Adjust.
8185 * win32-arm-low.c (arm_fetch_inferior_register)
8186 (arm_store_inferior_register): Change prototype to take a
8187 regcache. Adjust.
8188 * win32-i386-low.c (i386_fetch_inferior_register)
8189 (i386_store_inferior_register): Change prototype to take a
8190 regcache. Adjust.
8191 * win32-low.c (child_fetch_inferior_registers)
8192 (child_store_inferior_registers): Change prototype to take a
8193 regcache. Adjust.
8194 (win32_wait): Adjust.
8195 (win32_fetch_inferior_registers): Change prototype to take a
8196 regcache. Adjust.
8197 (win32_store_inferior_registers): Adjust.
8198 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8199 store_inferior_register>: Change prototype to take a regcache.
8200
8201 2010-01-20 Doug Evans <dje@google.com>
8202
8203 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8204 #ifdef.
8205 (linux_wait_for_event1, linux_init_signals): Ditto.
8206 (W_STOPCODE): Provide definition if missing.
8207
8208 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8209
8210 * linux-low.c (linux_core_of_thread): New.
8211 (compare_ints, show_process, list_threads): New.
8212 (linux_qxfer_osdata): Report threads and cores.
8213 (linux_target_op): Register linux_core_of_thread.
8214 * remote-utils.c (prepare_resume_reply): Report the core.
8215 (buffer_xml_printf): Support %d specifier.
8216 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8217 New.
8218 (handle_query): Handle qXfer:threads. Announce availability
8219 thereof.
8220 * target.h (struct target_ops): New field core_of_thread.
8221
8222 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8223
8224 * Makefile.in (clean): Remove new generated files.
8225 (reg-s390.o, reg-s390.c): Remove rules.
8226 (reg-s390x.o, reg-s390x.c): Likewise.
8227 (s390-linux32.o, s390-linux32.c): Add rules.
8228 (s390-linux64.o, s390-linux64.c): Likewise.
8229 (s390x-linux64.o, s390x-linux64.c): Likewise.
8230 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8231 * linux-s390-low.c: Include <elf.h>.
8232 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8233 (init_registers_s390): Remove prototype.
8234 (init_registers_s390x): Likewise.
8235 (init_registers_s390_linux32): Add prototype.
8236 (init_registers_s390_linux64): Likewise.
8237 (init_registers_s390x_linux64): Likewise.
8238 (s390_num_regs_3264): New define.
8239 (s390_regmap_3264): New global variable.
8240 (s390_cannot_fetch_register): Remove obsolete check.
8241 (s390_cannot_store_register): Likewise.
8242 (s390_collect_ptrace_register): Handle upper/lower register halves.
8243 (s390_supply_ptrace_register): Likewise.
8244 (s390_fill_gregset): Update to register number changes.
8245 (s390_get_hwcap): New routine.
8246 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8247 Install appropriate regmap and register set.
8248
8249 2010-01-01 Joel Brobecker <brobecker@adacore.com>
8250
8251 * server.c (gdbserver_version): Update copyright year to 2010.
8252 * gdbreplay.c (gdbreplay_version): Likewise.
8253
8254 2009-12-28 Doug Evans <dje@google.com>
8255
8256 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8257 elf/external.h. Include <elf.h> instead but only if necessary.
8258
8259 2009-12-28 Pedro Alves <pedro@codesourcery.com>
8260
8261 * linux-low.c (linux_remove_process): Remove `detaching'
8262 parameter. Don't release/detach from thread_db here.
8263 (linux_kill): Release/detach from thread_db here, ...
8264 (linux_detach): ... and here, before actually detaching.
8265 (linux_wait_1): ... and here, when a process exits.
8266 * thread-db.c (any_thread_of): New.
8267 (thread_db_free): Switch the current inferior to a thread of the
8268 passed in process.
8269
8270 2009-12-21 Doug Evans <dje@google.com>
8271
8272 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8273
8274 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8275 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8276 warning ifndef __NR_tkill. Move setting of errno there too.
8277 Delete unnecessary resetting of errno after syscall.
8278 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8279
8280 * configure.ac: Check for dladdr.
8281 * config.in: Regenerate.
8282 * configure: Regenerate.
8283 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8284 (try_thread_db_load): Update.
8285
8286 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8287
8288 2009-12-18 Doug Evans <dje@google.com>
8289
8290 * event-loop.c: Include unistd.h if it exists.
8291
8292 * linux-low.c (my_waitpid): Move definition away from being in
8293 between linux_tracefork_child/linux_test_for_tracefork.
8294
8295 * gdb_proc_service.h (psaddr_t): Fix type.
8296 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8297 signature to match glibc.
8298
8299 2009-12-16 Doug Evans <dje@google.com>
8300
8301 * linux-low.c (linux_read_memory): Fix argument to read.
8302
8303 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8304
8305 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8306 events, don't leave current_inferior pointing at null.
8307
8308 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8309
8310 * win32-low.c (LOG): Delete.
8311 (OUTMSG): Output to stderr.
8312 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8313 on compile time LOG macro.
8314 (win32_wait): Fix debug output.
8315
8316 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8317
8318 * win32-low.c (win32_add_one_solib): If the dll name is
8319 "ntdll.dll", prepend the system directory to the dll path.
8320
8321 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8322
8323 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8324
8325 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
8326 Vladimir Prus <vladimir@codesourcery.com>
8327
8328 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8329 * configure.ac: Check for __mcoldfire__ and set
8330 gdb_cv_m68k_is_coldfire.
8331 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8332 reg-cf.o and reg-m68k.o.
8333 * configure: Regenerated.
8334
8335 2009-11-16 Pedro Alves <pedro@codesourcery.com>
8336
8337 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8338 Pass it to thread_db_free.
8339 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8340 proper `detaching' argument to linux_remove_process.
8341 * linux-low.h (thread_db_free): Add `detaching' parameter.
8342 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8343 to thread_db_free.
8344 (thread_db_free): Add `detaching' parameter. Only
8345 call td_ta_clear_event if detaching from process.
8346
8347 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8348
8349 * thread-db.c (thread_db_free): Fix typo.
8350
8351 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8352
8353 PR gdb/10838
8354 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8355
8356 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8357
8358 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8359 with an i686 compiler.
8360 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8361 needed.
8362 * configure: Rebuilt.
8363
8364 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8365
8366 PR gdb/10783
8367
8368 * server.c (handle_search_memory_1): Correct read_addr initialization
8369 in loop for searching subsequent chunks.
8370
8371 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8372
8373 * configure.ac: New --with-libthread-db option.
8374 * thread-db.c: Allow direct dependence on libthread_db.
8375 (thread_db_free): Adjust.
8376 * config.in: Regenerate.
8377 * configure: Likewise.
8378
8379 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8380
8381 PR gdb/10757
8382 * thread-db.c (attach_thread): New function.
8383 (maybe_attach_thread): Return success/failure.
8384 (find_new_threads_callback): Adjust.
8385 (thread_db_find_new_threads): Loop until no new threads.
8386
8387 2009-10-13 Pedro Alves <pedro@codesourcery.com>
8388
8389 * proc-service.c (ps_lgetregs): Formatting.
8390
8391 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8392
8393 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8394 * configure.ac: Adjust.
8395 * linux-low.h (struct process_info_private): Move members to struct
8396 thread_db.
8397 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8398 * linux-low.c (linux_remove_process): Adjust.
8399 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8400 * server.c (handle_query): Move code ...
8401 (handle_monitor_command): ... here. New function.
8402 * target.h (struct target_ops): New member.
8403 * thread-db.c (struct thread_db): New.
8404 (libthread_db_search_path): New variable.
8405 (thread_db_create_event, thread_db_enable_reporting)
8406 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8407 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8408 (try_thread_db_load_1, dladdr_to_soname): New functions.
8409 (try_thread_db_load, thread_db_load_search): New functions.
8410 (thread_db_init): Search for libthread_db.
8411 (thread_db_free): New function.
8412 (thread_db_handle_monitor_command): Likewise.
8413 * config.in: Regenerate.
8414 * configure: Regenerate.
8415
8416 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8417
8418 * spu-low.c (spu_kill): Wait for inferior to terminate.
8419 Call clear_inferiors.
8420 (spu_detach): Call clear_inferiors.
8421
8422 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8423
8424 * aclocal.m4: Regenerate.
8425 * config.in: Likewise.
8426 * configure: Likewise.
8427
8428 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8429
8430 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8431 (parse_spufs_run): New function.
8432 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8433 (ppc_breakpoint_at): Handle SPU breakpoints.
8434
8435 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8436
8437 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8438 (SPUFS_MAGIC): Define.
8439 (spu_enumerate_spu_ids): New function.
8440 (linux_qxfer_spu): New function.
8441 (linux_target_ops): Install linux_qxfer_spu.
8442
8443 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8444
8445 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8446 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8447 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8448 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8449 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8450 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8451 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8452 (init_registers_powerpc_cell32l): Add prototype.
8453 (init_registers_powerpc_cell64l): Likewise.
8454 (ppc_arch_setup): Detect Cell/B.E. architecture.
8455
8456 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8457
8458 * Makefile.in (datarootdir): New variable.
8459
8460 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8461
8462 * linux-low.c (linux_write_memory): Update debugging output.
8463 * Makefile.in (clean): Add new descriptions.
8464 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8465 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8466 * configure.srv: Add new files for arm*-*-linux*.
8467 * linux-arm-low.c: Add new declarations.
8468 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8469 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8470 (HWCAP_VFPv3D16): New.
8471 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8472 instead of __IWMMXT__.
8473 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8474 (arm_arch_setup): New.
8475 (target_regsets): Remove #ifdef. Add VFP regset.
8476 (the_low_target): Use arm_arch_setup.
8477
8478 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8479
8480 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8481 the main thread again.
8482
8483 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8484
8485 Adding Neutrino gdbserver.
8486 * configure: Regenerated.
8487 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8488 * configure.srv (i[34567]86-*-nto*): New target.
8489 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8490 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8491 (nto_comctrl) [__QNX__]: New function.
8492 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8493
8494 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
8495
8496 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8497 srv_tgtobj.
8498
8499 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8500 Pedro Alves <pedro@codesourcery.com>
8501
8502 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8503 don't support CONTEXT_EXTENDED_REGISTERS.
8504 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8505 (the_low_target): Install them.
8506 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8507 failing with ERROR_PIPE_NOT_CONNECTED.
8508
8509 2009-06-30 Doug Evans <dje@google.com>
8510 Pierre Muller <muller@ics.u-strasbg.fr>
8511
8512 Add h/w watchpoint support to x86-linux, win32-i386.
8513 * Makefile.in (SFILES): Add i386-low.c
8514 (i386_low_h): Define.
8515 (i386-low.o): Add dependencies.
8516 (linux-x86-low.o): Add i386-low.h dependency.
8517 (win32-i386-low.o): Ditto.
8518 * i386-low.c: New file.
8519 * i386-low.h: New file.
8520 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8521 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8522 * linux-low.c (linux_add_process): Initialize arch_private.
8523 (linux_remove_process): Free arch_private.
8524 (add_lwp): Initialize arch_private.
8525 (delete_lwp): Free arch_private.
8526 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8527 provided.
8528 * linux-low.h (process_info_private): New member arch_private.
8529 (lwp_info): New member arch_private.
8530 (linux_target_ops): New members new_process, new_thread,
8531 prepare_to_resume.
8532 (ptid_of): New macro.
8533 * linux-x86-low.c: Include stddef.h, i386-low.h.
8534 (arch_process_info): New struct.
8535 (arch_lwp_info): New struct.
8536 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8537 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8538 (i386_dr_low_get_status): New function.
8539 (x86_insert_point, x86_remove_point): New functions.
8540 (x86_stopped_by_watchpoint): New function.
8541 (x86_stopped_data_address): New function.
8542 (x86_linux_new_process, x86_linux_new_thread): New functions.
8543 (x86_linux_prepare_to_resume): New function.
8544 (the_low_target): Add entries for insert_point, remove_point,
8545 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8546 prepare_to_resume.
8547 * server.c (debug_hw_points): New global.
8548 (monitor_show_help): Document set debug-hw-points.
8549 (handle_query): Process "set debug-hw-points".
8550 * server.h (debug_hw_points): Declare.
8551 (paddress): Declare.
8552 * utils.c (NUMCELLS, CELLSIZE): New macros.
8553 (get_sell, xsnprintf, paddress): New functions.
8554 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8555 remove_point, stopped_by_watchpoint, stopped_data_address.
8556 * win32-i386-low.c: Include i386-low.h.
8557 (debug_reg_state): Replaces dr.
8558 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8559 (i386_dr_low_get_status): New function.
8560 (i386_insert_point, i386_remove_point): New functions.
8561 (i386_stopped_by_watchpoint): New function.
8562 (i386_stopped_data_address): New function.
8563 (i386_initial_stuff): Update.
8564 (get_thread_context,set_thread_context,i386_thread_added): Update.
8565 (the_low_target): Add entries for insert_point,
8566 remove_point, stopped_by_watchpoint, stopped_data_address.
8567 * win32-low.c (win32_insert_watchpoint): New function.
8568 (win32_remove_watchpoint): New function.
8569 (win32_stopped_by_watchpoint): New function.
8570 (win32_stopped_data_address): New function.
8571 (win32_target_ops): Add entries for insert_watchpoint,
8572 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8573 * win32-low.h (win32_target_ops): New members insert_point,
8574 remove_point, stopped_by_watchpoint, stopped_data_address.
8575
8576 2009-06-25 Pedro Alves <pedro@codesourcery.com>
8577
8578 * server.c (process_serial_event): Re-return unsupported, not
8579 error, if the type isn't recognized. Re-allow supporting only
8580 insert or remove packets. Also call require_running for
8581 breakpoints. Add missing break statement to default case. Tidy.
8582 * target.h (struct target_ops): Rename insert_watchpoint to
8583 insert_point, and remove_watchpoint to remove_point.
8584
8585 * linux-low.h (struct linux_target_ops): Likewise.
8586 * linux-low.c (linux_insert_watchpoint): Rename to ...
8587 (linux_insert_point): ... this. Adjust.
8588 (linux_remove_watchpoint): Rename to ...
8589 (linux_remove_point): ... this. Adjust.
8590 (linux_target_ops): Adjust.
8591 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8592 (cris_insert_point): ... this.
8593 (cris_remove_watchpoint): Rename to ...
8594 (cris_remove_point): ... this.
8595 (the_low_target): Adjust.
8596
8597 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8598
8599 * server.c (handle_v_kill): Pass signal_pid to
8600 kill_inferior if multi_process is zero.
8601
8602 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8603
8604 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8605 * target.h (target_ops): Comment for *_watchpoint to make it clear
8606 the functions can get types '0' and '1'.
8607
8608 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8609
8610 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8611 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8612 * regcache.c (get_regcache): Likewise.
8613 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8614 * win32-low.c (child_fetch_inferior_registers): Remove check for
8615 regno 0.
8616
8617 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8618 Pedro Alves <pedro@codesourcery.com>
8619
8620 * target.h (struct target_ops) <supports_multi_process>: New
8621 callback.
8622 (target_supports_multi_process): New.
8623 * server.c (handle_query): Even if GDB reports support, only
8624 enable multi-process if the target also supports it. Report
8625 multi-process support only if the target backend supports it.
8626 * linux-low.c (linux_supports_multi_process): New function.
8627 (linux_target_ops): Install it as target_supports_multi_process
8628 callback.
8629
8630 2009-05-24 Doug Evans <dje@google.com>
8631
8632 Global renaming of find_thread_pid to find_thread_ptid.
8633 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8634 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8635 All callers updated.
8636
8637 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8638 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8639 directly.
8640
8641 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8642 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8643 (linux_resume_one_lwp): Ditto.
8644
8645 2009-05-23 Doug Evans <dje@google.com>
8646
8647 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8648 from struct inferior_list_entry * to struct lwp_info *.
8649 All callers updated.
8650
8651 2009-05-13 Doug Evans <dje@google.com>
8652
8653 * linux-x86-low.c: Don't include assert.h.
8654 (x86_siginfo_fixup): Use fatal, not assert.
8655 (x86_arch_setup): Fix comment.
8656
8657 2009-05-12 Doug Evans <dje@google.com>
8658
8659 Biarch support for i386/amd64 gdbserver.
8660 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8661 Add linux-x86-low.c.
8662 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8663 (linux-x86-low.o): Add.
8664 * linux-x86-64-low.c: Delete.
8665 * linux-i386-low.c: Delete.
8666 * linux-x86-low.c: New file.
8667 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8668 linux-x86-low.o.
8669 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8670 linux-x86-low.o.
8671 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8672 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8673 (linux_child_pid_to_exec_file): New function.
8674 (elf_64_header_p, elf_64_file_p): New functions.
8675 (siginfo_fixup): New function.
8676 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8677 give target a chance to convert layout.
8678 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8679 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8680
8681 2009-05-07 Doug Evans <dje@google.com>
8682
8683 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8684 (regsets_store_inferior_registers): Ditto.
8685
8686 2009-05-06 Pedro Alves <pedro@codesourcery.com>
8687
8688 PR server/10048
8689
8690 * linux-low.c (must_set_ptrace_flags): Delete.
8691 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8692 of the global.
8693 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8694 `lwp->must_set_ptrace_flags' instead.
8695 (linux_wait_for_event_1): Set ptrace options here.
8696 (linux_wait_1): ... not here.
8697
8698 2009-04-30 Doug Evans <dje@google.com>
8699
8700 * inferiors.c (started_inferior_callback): New function.
8701 (attached_inferior_callback): New function.
8702 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8703 * server.c (print_started_pid, print_attached_pid): New functions.
8704 (detach_or_kill_for_exit): New function.
8705 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8706 * server.h (have_started_inferiors_p): Declare.
8707 (have_attached_inferiors_p): Declare.
8708
8709 * inferiors.c (remove_process): Fix memory leak, free process.
8710 * linux-low.c (linux_remove_process): New function.
8711 (linux_kill): Call it instead of remove_process.
8712 (linux_detach, linux_wait_1): Ditto.
8713
8714 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8715
8716 * configure.srv: Add x86 Windows CE target.
8717
8718 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8719
8720 * inferiors.c (get_thread_process): Make global.
8721 * server.h (get_thread_process): Add prototype.
8722 * thread-db.c (find_one_thread): Use get_thread_process
8723 instead of current_process.
8724 (thread_db_get_tls_address): Do not crash if called when
8725 thread layer is not yet initialized.
8726
8727 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8728
8729 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8730 * spu-low.c (current_tid): Rename to ...
8731 (current_ptid): ... this.
8732 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8733 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8734 ptid_get_lwp (current_ptid) instead of current_tid.
8735 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8736 instead of current_tid. Use find_process_pid to verify pid
8737 argument is valid. Pass proper argument to remove_process.
8738 (spu_thread_alive): Compare current_ptid instead of current_tid.
8739 (spu_resume): Likewise.
8740
8741 2009-04-02 Pedro Alves <pedro@codesourcery.com>
8742
8743 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8744 variable.
8745
8746 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8747
8748 Implement the multiprocess extensions, and add linux multiprocess
8749 support.
8750
8751 * server.h (ULONGEST): Declare.
8752 (struct ptid, ptid_t): New.
8753 (minus_one_ptid, null_ptid): Declare.
8754 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8755 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8756 (struct inferior_list_entry): Change `id' type from unsigned from
8757 to ptid_t.
8758 (struct sym_cache, struct breakpoint, struct
8759 process_info_private): Forward declare.
8760 (struct process_info): Declare.
8761 (current_process): Declare.
8762 (all_processes): Declare.
8763 (initialize_inferiors): Declare.
8764 (add_thread): Adjust to use ptid_t.
8765 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8766 (add_process, remove_process, find_thread_pid): Declare.
8767 (find_inferior_id): Adjust to use ptid_t.
8768 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8769 (multi_process): Declare.
8770 (push_event): Adjust to use ptid_t.
8771 (read_ptid, write_ptid): Declare.
8772 (prepare_resume_reply): Adjust to use ptid_t.
8773 (clear_symbol_cache): Declare.
8774 * inferiors.c (all_processes): New.
8775 (null_ptid, minus_one_ptid): New.
8776 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8777 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8778 (add_thread): Change unsigned long to ptid. Remove gdb_id
8779 parameter. Adjust.
8780 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8781 (gdb_id_to_thread): Rename to ...
8782 (find_thread_pid): ... this. Change unsigned long to ptid.
8783 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8784 (loaded_dll, pull_pid_from_list): Adjust.
8785 (add_process, remove_process, find_process_pid)
8786 (get_thread_process, current_process, initialize_inferiors): New.
8787 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8788 (struct target_waitstatus) <related_pid>: Ditto.
8789 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8790 return type to int.
8791 (struct target_ops) <join>: Add `pid' argument.
8792 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8793 (struct target_ops) <wait>: Add `ptid' field. Change return type
8794 to ptid.
8795 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8796 (mywait): Add `ptid' argument. Change return type to ptid_t.
8797 (target_pid_to_str): Declare.
8798 * target.c (set_desired_inferior): Adjust to use ptids.
8799 (mywait): Add new `ptid' argument. Adjust.
8800 (target_pid_to_str): New.
8801 * mem-break.h (free_all_breakpoints): Declare.
8802 * mem-break.c (breakpoints): Delelete.
8803 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8804 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8805 to use per-process breakpoint list.
8806 (free_all_breakpoints): New.
8807 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8808 (symbol_cache, all_symbols_looked_up): Delete.
8809 (hexchars): New.
8810 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8811 read_ptid): New.
8812 (prepare_resume_reply): Change ptid argument's type from unsigned
8813 long to ptid_t. Adjust. Implement W;process and X;process.
8814 (free_sym_cache, clear_symbol_cache): New.
8815 (look_up_one_symbol): Adjust to per-process symbol cache. *
8816 * server.c (cont_thread, general_thread, step_thread): Change type
8817 to ptid_t.
8818 (attached): Delete.
8819 (multi_process): New.
8820 (last_ptid): Change type to ptid_t.
8821 (struct vstop_notif) <ptid>: Change type to ptid_t.
8822 (queue_stop_reply, push_event): Change `ptid' argument's type to
8823 ptid_t.
8824 (discard_queued_stop_replies): Add `pid' argument.
8825 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8826 changes. Don't reference the `attached' global.
8827 (attach_inferior): Adjust to mywait interface changes.
8828 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8829 features. Handle and report "multiprocess+". Handle
8830 "qAttached:PID".
8831 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8832 changes.
8833 (handle_v_kill): New.
8834 (handle_v_stopped): Adjust to use target_pid_to_str.
8835 (handle_v_requests): Allow multiple attaches and runs when
8836 multiprocess extensions are in effect. Handle "vKill".
8837 (myresume): Adjust to use ptids.
8838 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8839 (handle_status): Adjust to discard_queued_stop_replies interface
8840 change.
8841 (first_thread_of, kill_inferior_callback)
8842 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8843 (main): Call initialize_inferiors. Adjust to use ptids, killing
8844 and detaching from all inferiors. Handle multiprocess packet
8845 variants.
8846 * linux-low.h: Include gdb_proc_service.h.
8847 (struct process_info_private): New.
8848 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8849 <lwpid_of>: Use ptid_get_lwp.
8850 (get_lwp_thread): Adjust.
8851 (struct lwp_info): Add `dead' member.
8852 (find_lwp_pid): Declare.
8853 * linux-low.c (thread_db_active): Delete.
8854 (new_inferior): Adjust comment.
8855 (inferior_pid): Delete.
8856 (linux_add_process): New.
8857 (handle_extended_wait): Adjust.
8858 (add_lwp): Change unsigned long to ptid.
8859 (linux_create_inferior): Add process to processes table. Adjust
8860 to use ptids. Don't set new_inferior here.
8861 (linux_attach_lwp): Rename to ...
8862 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8863 it. Adjust to use ptids.
8864 (linux_attach_lwp): New.
8865 (linux_attach): Add process to processes table. Don't set
8866 new_inferior here.
8867 (struct counter): New.
8868 (second_thread_of_pid_p, last_thread_of_process_p): New.
8869 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8870 multiple processes.
8871 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8872 processes. Remove process from process table.
8873 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8874 to multiple processes.
8875 (any_thread_of): New.
8876 (linux_detach): Add `pid' argument, and handle it. Remove process
8877 from processes table.
8878 (linux_join): Add `pid' argument. Handle it.
8879 (linux_thread_alive): Change unsighed long argument to ptid_t.
8880 Consider dead lwps as not being alive.
8881 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8882 threads we're not interested in.
8883 (same_lwp, find_lwp_pid): New.
8884 (linux_wait_for_lwp): Change `pid' argument's type from int to
8885 ptid_t. Adjust.
8886 (linux_wait_for_event): Rename to ...
8887 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8888 from int to ptid_t. Adjust.
8889 (linux_wait_for_event): New.
8890 (linux_wait_1): Add `ptid' argument. Change return type to
8891 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8892 that exit from the process table.
8893 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8894 Adjust.
8895 (mark_lwp_dead): New.
8896 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8897 stopping all threads, mark its main lwp as dead.
8898 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8899 ptids.
8900 (fetch_register, usr_store_inferior_registers)
8901 (regsets_fetch_inferior_registers)
8902 (regsets_store_inferior_registers, linux_read_memory)
8903 (linux_write_memory): Inline `inferior_pid'.
8904 (linux_look_up_symbols): Adjust to use per-process
8905 `thread_db_active'.
8906 (linux_request_interrupt): Adjust to use ptids.
8907 (linux_read_auxv): Inline `inferior_pid'.
8908 (initialize_low): Don't reference thread_db_active.
8909 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8910 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8911 (ps_getpid): Return the pid of the current inferior.
8912 * thread-db.c (proc_handle, thread_agent): Delete.
8913 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8914 per-process data.
8915 (find_one_thread): Change argument type to ptid_t. Adjust to
8916 per-process data.
8917 (maybe_attach_thread): Adjust to per-process data and ptids.
8918 (thread_db_find_new_threads): Ditto.
8919 (thread_db_init): Ditto.
8920 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8921 processes table. Adjust to use ptids.
8922 (spu_kill, spu_detach): Adjust interface. Remove process from
8923 processes table.
8924 (spu_join, spu_thread_alive): Adjust interface.
8925 (spu_wait): Adjust interface. Remove process from processes
8926 table. Adjust to use ptids.
8927 * win32-low.c (current_inferior_tid): Delete.
8928 (current_inferior_ptid): New.
8929 (debug_event_ptid): New.
8930 (thread_rec): Take a ptid. Adjust.
8931 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8932 (child_delete_thread): Ditto.
8933 (do_initial_child_stuff): Add `attached' argument. Add process to
8934 processes table.
8935 (child_fetch_inferior_registers, child_store_inferior_registers):
8936 Adjust.
8937 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8938 (win32_attach): Pass 1 to do_initial_child_stuff.
8939 (win32_kill): Adjust interface. Remove process from processes
8940 table.
8941 (win32_detach): Ditto.
8942 (win32_join): Adjust interface.
8943 (win32_thread_alive): Take a ptid.
8944 (win32_resume): Adjust to use ptids.
8945 (get_child_debug_event): Ditto.
8946 (win32_wait): Adjust interface. Remove exiting process from
8947 processes table.
8948
8949 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8950
8951 Non-stop mode support.
8952
8953 * server.h (non_stop): Declare.
8954 (gdb_client_data, handler_func): Declare.
8955 (delete_file_handler, add_file_handler, start_event_loop):
8956 Declare.
8957 (handle_serial_event, handle_target_event, push_event)
8958 (putpkt_notif): Declare.
8959 * target.h (enum resume_kind): New.
8960 (struct thread_resume): Replace `step' field by `kind' field.
8961 (TARGET_WNOHANG): Define.
8962 (struct target_ops) <wait>: Add `options' argument.
8963 <supports_non_stop, async, start_non_stop>: New fields.
8964 (target_supports_non_stop, target_async): New.
8965 (start_non_stop): Declare.
8966 (mywait): Add `options' argument.
8967 * target.c (mywait): Add `options' argument. Print child exit
8968 notifications here.
8969 (start_non_stop): New.
8970 * server.c (non_stop, own_buf, mem_buf): New globals.
8971 (struct vstop_notif): New.
8972 (notif_queue): New global.
8973 (queue_stop_reply, push_event, discard_queued_stop_replies)
8974 (send_next_stop_reply): New.
8975 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8976 interface changes.
8977 (attach_inferior): In non-stop mode, don't wait for the target
8978 here.
8979 (handle_general_set): Handle QNonStop.
8980 (handle_query): When handling qC, return the current general
8981 thread, instead of the first thread of the list.
8982 (handle_query): If the backend supports non-stop mode, include
8983 QNonStop+ in the qSupported query response.
8984 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8985 and non-stop mode.
8986 (handle_v_attach, handle_v_run): Handle non-stop mode.
8987 (handle_v_stopped): New.
8988 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8989 (myresume): Adjust to use resume_kind. Handle non-stop.
8990 (queue_stop_reply_callback): New.
8991 (handle_status): Handle non-stop mode.
8992 (main): Clear non_stop flag on reconnection. Use the event-loop.
8993 Refactor serial protocol handling from here ...
8994 (process_serial_event): ... to this new function. When GDB
8995 selects any thread, select one here. In non-stop mode, wait until
8996 GDB acks all pending events before exiting.
8997 (handle_serial_event, handle_target_event): New.
8998 * remote-utils.c (remote_open): Install remote_desc in the event
8999 loop.
9000 (remote_close): Remove remote_desc from the event loop.
9001 (putpkt_binary): Rename to...
9002 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9003 (putpkt_binary): New as wrapper around putpkt_binary_1.
9004 (putpkt_notif): New.
9005 (prepare_resume_reply): In non-stop mode, don't change the
9006 general_thread.
9007 * event-loop.c: New.
9008 * Makefile.in (OBJ): Add event-loop.o.
9009 (event-loop.o): New rule.
9010
9011 * linux-low.h (pid_of): Moved here.
9012 (lwpid_of): New.
9013 (get_lwp_thread): Use lwpid_of.
9014 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9015 * linux-low.c (pid_of): Delete.
9016 (inferior_pid): Use lwpid_of.
9017 (linux_event_pipe): New.
9018 (target_is_async_p): New.
9019 (delete_lwp): New.
9020 (handle_extended_wait): Use lwpid_of.
9021 (add_lwp): Don't set lwpid field.
9022 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9023 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9024 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9025 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9026 first. Adjust to linux_wait_for_event interface changes. Use
9027 lwpid_of.
9028 (linux_detach): Don't delete the main lwp here.
9029 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9030 (status_pending_p): Don't consider explicitly suspended lwps.
9031 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9032 pointer. Add OPTIONS argument. Change return type to int. Use
9033 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9034 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9035 pointer. Add status pointer argument. Return a pid instead of a
9036 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9037 changes. In non-stop mode, don't switch to a random thread.
9038 (linux_wait): Rename to...
9039 (linux_wait_1): ... this. Add target_options argument, and handle
9040 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9041 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9042 clean exit and signal exit code. Don't stop all threads in
9043 non-stop mode. In all-stop mode, only stop all threads when
9044 reporting a stop to GDB. Handle explicit thread stop requests.
9045 (async_file_flush, async_file_mark): New.
9046 (linux_wait): New.
9047 (send_sigstop): Use lwpid_of.
9048 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9049 interface changes. In non-stop mode, don't switch to a random
9050 thread.
9051 (linux_resume_one_lwp): Use lwpid_of.
9052 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9053 (linux_resume_one_thread): ... this. Handle resume_stop. In
9054 non-stop mode, don't look for pending flag in all threads.
9055 (resume_status_pending_p): Don't consider explicitly suspended
9056 threads.
9057 (my_waitpid): Reimplement. Emulate __WALL.
9058 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9059 Use lwpid_of.
9060 (sigchld_handler, linux_supports_non_stop, linux_async)
9061 (linux_start_non_stop): New.
9062 (linux_target_ops): Register linux_supports_non_stop, linux_async
9063 and linux_start_non_stop.
9064 (initialize_low): Install SIGCHLD handler.
9065 * thread-db.c (thread_db_create_event, find_one_thread)
9066 (thread_db_get_tls_address): Use lwpid_of.
9067 * win32-low.c (win32_detach): Adjust to use resume_kind.
9068 (win32_wait): Add `options' argument.
9069 * spu-low.c (spu_resume): Adjust to use resume_kind.
9070 (spu_wait): Add `options' argument.
9071
9072 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9073
9074 Decouple target code from remote protocol.
9075
9076 * target.h (enum target_waitkind): New.
9077 (struct target_waitstatus): New.
9078 (struct target_ops) <wait>: Return an unsigned long. Take a
9079 target_waitstatus pointer instead of a char pointer.
9080 (mywait): Likewise.
9081 * target.c (mywait): Change prototype to return an unsigned long.
9082 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9083 * server.h (thread_from_wait, old_thread_from_wait): Delete
9084 declarations.
9085 (prepare_resume_reply): Change prototype to take a
9086 target_waitstatus.
9087 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9088 (last_status, last_ptid): New.
9089 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9090 pid instead of a signal.
9091 (attach_inferior): Remove "status" and "signal" parameters.
9092 Adjust.
9093 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9094 not as an address.
9095 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9096 (handle_v_requests, myresume): Remove "status" and "signal"
9097 parameters. Adjust.
9098 (handle_status): New.
9099 (main): Delete local `status'. Adjust.
9100 * remote-utils.c: Include target.h.
9101 (prepare_resume_reply): Change prototype to take a
9102 target_waitstatus. Adjust.
9103
9104 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9105 interface.
9106 * spu-low.c (spu_wait): Adjust.
9107 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9108 Delete.
9109 (win32_wait): Adjust.
9110
9111 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9112
9113 * target.h (struct thread_resume): Delete leave_stopped member.
9114 (struct target_ops): Add a `n' argument to the `resume' callback.
9115 * server.c (start_inferior): Adjust.
9116 (handle_v_cont, myresume): Adjust.
9117 * linux-low.c (check_removed_breakpoint): Adjust to resume
9118 interface change, and to removed leave_stopped field.
9119 (resume_ptr): Delete.
9120 (struct thread_resume_array): New.
9121 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9122 resume interface change.
9123 (linux_continue_one_thread, linux_queue_one_thread)
9124 (resume_status_pending_p): Check if the resume field is NULL
9125 instead of checking the leave_stopped member.
9126 (linux_resume): Adjust to the target resume interface change.
9127 * spu-low.c (spu_resume): Adjust to the target resume interface
9128 change.
9129 * win32-low.c (win32_detach, win32_resume): Ditto.
9130
9131 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9132
9133 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9134 flag.
9135 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9136 pending.
9137 (linux_continue_one_thread): Only preserve the stepping flag if
9138 there's a pending breakpoint.
9139
9140 2009-03-31 Pedro Alves <pedro@codesourcery.com>
9141
9142 * server.c (main): After the inferior having exited, call
9143 remote_close before exiting gdbserver.
9144
9145 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9146
9147 Fix size of FPSCR in Power 7 processors.
9148 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9149 (PPC_FEATURE_HAS_DFP): New #define.
9150 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9151 size of the FPSCR.
9152
9153 2009-03-23 Pedro Alves <pedro@codesourcery.com>
9154
9155 * server.c (handle_query) Whitespace and formatting.
9156
9157 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9158
9159 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9160 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9161 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9162 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9163 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9164 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9165 Makefile.in, configure.ac: Fix whitespace throughout.
9166 * configure: Regenerate.
9167
9168 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9169
9170 * inferiors.c (find_inferior): Make it safe for the callback
9171 function to delete the currently iterated inferior.
9172
9173 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9174
9175 * Makefile.in (linuw_low_h): Move higher.
9176 (thread-db.o): Depend on $(linux_low_h).
9177
9178 2009-03-17 Pedro Alves <pedro@codesourcery.com>
9179
9180 Rename "process" to "lwp" throughout.
9181
9182 * linux-low.c (all_processes): Rename to...
9183 (all_lwps): ... this.
9184 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9185 (add_process): Rename to ...
9186 (add_lwp): ... this. Adjust.
9187 (linux_create_inferior): Adjust.
9188 (linux_attach_lwp): Adjust.
9189 (linux_attach): Adjust.
9190 (linux_kill_one_process): Rename to ...
9191 (linux_kill_one_lwp): ... this. Adjust.
9192 (linux_kill): Adjust.
9193 (linux_detach_one_process): Rename to ...
9194 (linux_detach_one_lwp): ... this. Adjust.
9195 (linux_detach): Adjust.
9196 (check_removed_breakpoint): Adjust.
9197 (status_pending_p): Adjust.
9198 (linux_wait_for_process): Rename to ...
9199 (linux_wait_for_lwp): ... this. Adjust.
9200 (linux_wait_for_event): Adjust.
9201 (send_sigstop): Adjust.
9202 (wait_for_sigstop): Adjust.
9203 (stop_all_processes): Rename to ...
9204 (stop_all_lwps): ... this.
9205 (linux_resume_one_process): Rename to ...
9206 (linux_resume_one_lwp): ... this. Adjust.
9207 (linux_set_resume_request, linux_continue_one_thread)
9208 (linux_queue_one_thread, resume_status_pending_p)
9209 (usr_store_inferior_registers, regsets_store_inferior_registers)
9210 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9211 Adjust.
9212 * linux-low.h (get_process): Rename to ...
9213 (get_lwp): ... this. Adjust.
9214 (get_thread_process): Rename to ...
9215 (get_thread_lwp): ... this. Adjust.
9216 (get_process_thread): Rename to ...
9217 (get_lwp_thread): ... this. Adjust.
9218 (struct process_info): Rename to ...
9219 (struct lwp_info): ... this.
9220 (all_processes): Rename to ...
9221 (all_lwps): ... this.
9222 * proc-service.c (ps_lgetregs): Adjust.
9223 * thread-db.c (thread_db_create_event, find_one_thread)
9224 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9225
9226 2009-03-14 Pedro Alves <pedro@codesourcery.com>
9227
9228 * server.c (handle_query): Handle "qAttached".
9229
9230 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9231
9232 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9233 GPLv3, update license URL.
9234
9235 2009-03-01 Doug Evans <dje@google.com>
9236
9237 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
9238 (server_h): Add gdb_signals.h.
9239 (signals.o): Update.
9240 * server.h (target_signal_from_host,target_signal_to_host_p)
9241 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9242
9243 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9244
9245 * remote-utils.c (getpkt): Also generate remote-debug
9246 information if noack_mode is set.
9247
9248 2009-02-06 Pedro Alves <pedro@codesourcery.com>
9249
9250 * server.c (handle_query): Report qXfer:siginfo:read and
9251 qXfer:siginfo:write as supported and handle them.
9252 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9253 * linux-low.c (linux_xfer_siginfo): New.
9254 (linux_target_ops): Set it.
9255
9256 2009-01-26 Pedro Alves <pedro@codesourcery.com>
9257
9258 * server.c (gdbserver_usage): Mention --remote-debug.
9259 (main): Accept '--remote-debug' switch.
9260
9261 2009-01-18 Doug Evans <dje@google.com>
9262
9263 * regcache.c (new_register_cache): No need to check result of xcalloc.
9264 * server.c (handle_search_memory): Back out calls to xmalloc,
9265 result is checked and error is returned to user upon failure.
9266 (handle_query): Ditto. Add more checks for result of malloc.
9267 (handle_v_cont): Check result of malloc, report error back to
9268 user upon failure.
9269 (handle_v_run): Ditto. Call freeargv.
9270 * server.h (freeargv): Declare.
9271 * utils.c (freeargv): New fn.
9272
9273 2009-01-15 Doug Evans <dje@google.com>
9274
9275 * gdbreplay.c (perror_with_name): Make arg const char *.
9276 * server.h (target_signal_to_name): Make return type const char *.
9277 * thread-db.c (thread_db_err_str): Make return type const char *.
9278 * utils.c (perror_with_name): Make arg const char *.
9279
9280 2009-01-14 Pedro Alves <pedro@codesourcery.com>
9281
9282 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9283 when handling a EXIT_PROCESS_DEBUG_EVENT.
9284
9285 2009-01-06 Joel Brobecker <brobecker@adacore.com>
9286
9287 * gdbreplay.c (gdbreplay_version): Update copyright year.
9288 * server.c (gdbserver_version): Likewise.
9289
9290 2009-01-05 Doug Evans <dje@google.com>
9291
9292 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
9293 (handle_extended_wait): Improve comment.
9294
9295 2008-12-13 Doug Evans <dje@google.com>
9296
9297 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9298 * server.h (ATTR_MALLOC): New macro.
9299 (xmalloc,xcalloc,xstrdup): Declare.
9300 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9301 * inferiors.c: Ditto.
9302 * linux-low.c: Ditto.
9303 * mem-break.c: Ditto.
9304 * regcache.c: Ditto.
9305 * remote-utils.c: Ditto.
9306 * server.c: Ditto.
9307 * target.c: Ditto.
9308 * win32-low.c: Ditto.
9309
9310 2008-12-12 Doug Evans <dje@google.com>
9311
9312 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9313 in debugging printf.
9314
9315 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9316
9317 2008-12-09 Doug Evans <dje@google.com>
9318
9319 * linux-low.h (struct process_info): Delete member tid, unused.
9320 * thread-db.c (find_one_thread): Update.
9321 (maybe_attach_thread): Update.
9322
9323 2008-12-02 Pedro Alves <pedro@codesourcery.com>
9324
9325 * target.h (struct target_ops): Add qxfer_osdata member.
9326 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9327 and dirent.h.
9328 (linux_qxfer_osdata): New functions.
9329 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9330 callback.
9331 * server.c (handle_query): Handle "qXfer:osdata:read:".
9332 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9333 (buffer_xml_printf): New functions.
9334 * server.h (struct buffer): New.
9335 (buffer_grow_str, buffer_grow_str0): New macros.
9336 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9337 (buffer_xml_printf): Declare.
9338
9339 2008-11-24 Doug Evans <dje@google.com>
9340
9341 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9342
9343 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9344
9345 * server.c (handle_v_run): Always use the supplied argument list.
9346
9347 2008-11-19 Bob Wilson <bob.wilson@acm.org>
9348
9349 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9350 (xtensa_regmap_table): Add entry for scompare1.
9351
9352 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9353
9354 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9355 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9356 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9357 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9358 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9359 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9360 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9361 XML target descriptions.
9362 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9363 when inferior is running on an ISA 2.05 or later processor. Add
9364 special case to return offset for full 64-bit slot of FPSCR when
9365 in 32-bits.
9366
9367 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9368
9369 * Makefile.in (SFILES, clean): Added sparc64 files.
9370 (reg-sparc64.o, reg-sparc64.c): New.
9371 * configure.srv (sparc*-*-linux*): New configuration.
9372 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9373 syscall arguments for SPARC.
9374 (regsets_store_inferior_registers): Likewise.
9375 * linux-sparc-low.c: New file.
9376
9377 2008-10-21 Doug Evans <dje@google.com>
9378
9379 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9380 (READLINE_DIR,READLINE_DEP): Delete.
9381 (INTERNAL_CFLAGS): Update.
9382 (LINTFLAGS): Update.
9383
9384 2008-10-10 Pedro Alves <pedro@codesourcery.com>
9385
9386 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9387 whole argv from the last run, not just argv[0].
9388
9389 2008-09-08 Pedro Alves <pedro@codesourcery.com>
9390
9391 * regcache.c (new_register_cache): Return NULL if the register
9392 cache size isn't known yet.
9393 (free_register_cache): Avoid dereferencing a NULL regcache.
9394
9395 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9396
9397 * configure.srv: Merge MIPS and MIPS64.
9398
9399 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9400
9401 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9402
9403 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
9404
9405 * Makefile.in: Add required vsx dependencies.
9406
9407 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9408 Declare init_registers_powerpc_vsx32l.
9409 Declare init_registers_powerpc_vsx64l.
9410 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9411 (ppc_arch_setup): Check for VSX in hwcap.
9412 (ppc_fill_vsxregset): New function.
9413 (ppc_store_vsxregset): New function.
9414 Add new VSX entry in regset_info target_regsets.
9415
9416 * configure.srv: Add new VSX dependencies.
9417
9418 2008-08-12 Pedro Alves <pedro@codesourcery.com>
9419
9420 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9421 (remote_open): Set or clear transport_is_reliable.
9422 (putpkt_binary): Don't expect acks in noack mode.
9423 (getpkt): Don't send ack/nac in noack mode.
9424 * server.c (handle_general_set): Handle QStartNoAckMode.
9425 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9426 qSupported.
9427 (main): Reset noack_mode on every connection.
9428 * server.h (noack_mode): Declare.
9429
9430 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9431
9432 * Makefile.in (GDBREPLAY_OBS): New variable.
9433 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9434
9435 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9436 Daniel Jacobowitz <dan@codesourcery.com>
9437
9438 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9439 (usr_store_inferior_registers): Likewise.
9440 (regsets_store_inferior_registers): Likewise.
9441
9442 2008-07-31 Rolf Jansen <rj@surtec.com>
9443 Pedro Alves <pedro@codesourcery.com>
9444
9445 * configure.ac: Check for memmem declaration.
9446 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9447 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9448 (disable_packet_qfThreadInfo): Unconditionally compile.
9449 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9450 * configure, config.in: Regenerate.
9451
9452 2008-07-28 Doug Kwan <dougkwan@google.com>
9453
9454 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9455 (linux_write_memory): Remove declaration of errno.
9456
9457 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9458
9459 * linux-low.c (handle_extended_wait): Do not use "status"
9460 variable uninitialized.
9461
9462 2008-07-07 Pedro Alves <pedro@codesourcery.com>
9463
9464 * server.c (handle_v_attach): Inhibit reporting dll changes.
9465
9466 2008-06-27 Pedro Alves <pedro@codesourcery.com>
9467
9468 * remote-utils.c (prepare_resume_reply): If requested, don't
9469 output "thread:TID" in the T stop reply.
9470
9471 * server.c (disable_packet_vCont, disable_packet_Tthread)
9472 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9473 (handle_query): If requested, disable support for qC, qfThreadInfo
9474 and qsThreadInfo.
9475 (handle_v_requests): If requested, disable support for vCont.
9476 (gdbserver_show_disableable): New.
9477 (main): Handle --disable-packet and --disable-packet=LIST.
9478
9479 * server.h (disable_packet_vCont, disable_packet_Tthread)
9480 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9481
9482 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9483
9484 * server.c (gdbserver_usage): Mention --version.
9485
9486 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9487
9488 * Makefile.in (gdbreplay.o): New rule.
9489
9490 2008-06-06 Joseph Myers <joseph@codesourcery.com>
9491
9492 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9493 message, not gdbserver.
9494
9495 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
9496 Nathan Sidwell <nathan@codesourcery.com>
9497 Joseph Myers <joseph@codesourcery.com>
9498
9499 * acinclude.m4: Include ../../config/acx.m4.
9500 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9501 * configure, config.in: Regenerate.
9502 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9503 * server.c (gdbserver_version): Print PKGVERSION.
9504 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9505 (main): Adjust gdbserver_usage calls.
9506 * gdbreplay.c (version, host_name): Add declarations.
9507 (gdbreplay_version, gdbreplay_usage): New.
9508 (main): Accept --version and --help options.
9509
9510 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9511
9512 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9513 (arm_breakpoint_at): Handle Thumb.
9514 (the_low_target): Add comment.
9515
9516 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9517
9518 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9519
9520 2008-05-09 Doug Evans <dje@google.com>
9521
9522 * server.h (decode_search_memory_packet): Declare.
9523 * remote-utils.c (decode_search_memory_packet): New fn.
9524 * server.c (handle_search_memory_1): New fn.
9525 (handle_search_memory): New fn.
9526 (handle_query): Process qSearch:memory packets.
9527
9528 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9529
9530 * regcache.c (registers_length): Remove.
9531 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9532 full register packet.
9533 * regcache.h (registers_length): Remove prototype.
9534 * server.h (PBUFSIZ): Define to 16384.
9535
9536 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9537
9538 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9539 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9540 powerpc-64l.o, and powerpc-altivec64l.o.
9541 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9542 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9543 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9544 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9545 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9546 to srv_xmlfiles.
9547
9548 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9549 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9550 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9551 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9552 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9553 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9554 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9555 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9556 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9557 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9558 (clean): Update.
9559
9560 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9561 (init_registers_powerpc_32l): ... this new prototype.
9562 (init_registers_powerpc_32): Remove, replace by ...
9563 (init_registers_powerpc_altivec32l): ... this new prototype.
9564 (init_registers_powerpc_e500): Remove, replace by ...
9565 (init_registers_powerpc_e500l): ... this new prototype.
9566 (init_registers_ppc64): Remove, replace by ...
9567 (init_registers_powerpc_64l): ... this new prototype.
9568 (init_registers_powerpc_64): Remove, replace by ...
9569 (init_registers_powerpc_altivec64l): ... this new prototype.
9570 (ppc_num_regs): Set to 73.
9571 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9572 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9573 (ppc_cannot_store_register): Handle orig_r3 and trap.
9574 (ppc_arch_setup): Update init_registers_... calls.
9575 (ppc_fill_gregset): Handle orig_r3 and trap.
9576
9577 * inferiors.c (clear_inferiors): Reset current_inferior.
9578
9579 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
9580
9581 * acinclude.m4: Add override.m4.
9582 * configure: Regenerate.
9583
9584 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9585
9586 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9587 initial call to init_register_ppc64.
9588
9589 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9590
9591 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9592 single powerpc*-*-linux* case.
9593 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9594
9595 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9596
9597 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
9598 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
9599 from reg_xmlfiles.
9600 * linux-ppc-low.c: Include <elf.h>.
9601 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9602 (ppc_hwcap): New global variable.
9603 (ppc_regmap): Remove __SPE__ #ifdef sections.
9604 (ppc_regmap_e500): New global variable.
9605 (ppc_cannot_store_register): Update __SPE__ special case.
9606 (ppc_get_hwcap): New function.
9607 (ppc_arch_setup): Use it to determine whether inferior supports
9608 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9609 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9610 Do not access registers if target does not support AltiVec.
9611 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9612 Do not access registers if target does not support SPE.
9613 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9614
9615 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9616
9617 * linux-low.c (disabled_regsets, num_regsets): New.
9618 (use_regsets_p): Delete.
9619 (linux_wait_for_process): Clear disabled_regsets.
9620 (regsets_fetch_inferior_registers): Check and set it.
9621 (regsets_store_inferior_registers): Likewise.
9622 (linux_fetch_registers, linux_store_registers): Do not use
9623 use_regsets_p.
9624 (initialize_low): Allocate disabled_regsets.
9625
9626 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9627
9628 * Makefile.in (LIBOBJS): New.
9629 (OBS): Use LIBOBJS.
9630 (memmem.o): New rule.
9631 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9632 * configure: Regenerated.
9633
9634 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9635
9636 * server.c (handle_query): Never return "unsupported" for
9637 qXfer:features:read queries.
9638
9639 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9640
9641 * server.c (get_features_xml): Fix inverted condition.
9642 (handle_query): Always support qXfer:feature:read.
9643
9644 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9645
9646 * server.c (wrapper_argv): New.
9647 (start_inferior): Handle wrapper_argv. If set, expect an extra
9648 trap.
9649 (gdbserver_usage): Document --wrapper.
9650 (main): Parse --wrapper.
9651
9652 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9653
9654 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9655 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9656 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9657 (ppc_set_pc): Likewise.
9658 (ppc_arch_setup): New function.
9659 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9660 of collect_register.
9661 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
9662
9663 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9664
9665 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9666 instead of linux-ppc64-low.o.
9667 * linux-ppc64-low.c: Remove file.
9668 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9669 (linux-ppc64-low.o): Remove rule.
9670
9671 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9672 (init_registers_powerpc_64): Likewise.
9673 (ppc_regmap): Conditionally define depending on __powerpc64__.
9674 (ppc_cannot_store_register): Do not special-case "fpscr" when
9675 compiled on __powerpc64__.
9676 (ppc_collect_ptrace_register): New function.
9677 (ppc_supply_ptrace_register): New function.
9678 (ppc_breakpoint): Change type to "unsigned int".
9679 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9680 (the_low_target): Conditionally provide initializers for the
9681 arch_setup member depending on __powerpc64__. Install
9682 collect_ptrace_register and supply_ptrace_register members.
9683
9684 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9685
9686 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9687 * server.c (gdbserver_xmltarget): Define.
9688 (get_features_xml): Use it to replace "target.xml" and arch_string.
9689
9690 * configure.srv: Remove srv_xmltarget. Add XML files that were
9691 mentioned there to srv_xmlfiles instead. Remove conditional tests
9692 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9693 srv_xmlfiles and srv_regobj to include all possible choices.
9694 * configure.ac (srv_xmltarget): Remove.
9695 (srv_xmlfiles): Do not add "target.xml".
9696 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9697 checks for supplementary target information.
9698 * configure: Regenerate.
9699 * Makefile.in (XML_TARGET): Remove.
9700 (target.xml): Remove rule.
9701 (clean): Do not clean up target.xml.
9702 (.PRECIOUS): Do not mention target.xml.
9703
9704 * target.h (struct target_ops): Remove arch_string member.
9705 * linux-low.c (linux_arch_string): Remove.
9706 (linux_target_ops): Remove arch_string initializer.
9707 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9708 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9709 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9710 * spu-low.c (spu_arch_string): Remove.
9711 (spu_target_ops): Remove arch_string initializer.
9712 * win32-low.c (win32_arch_string): Remove.
9713 (win32_target_ops): Remove arch_string initializer.
9714 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9715 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9716 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9717
9718 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9719
9720 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9721 by collect_ptrace_register and supply_ptrace_register hooks.
9722 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9723 instead of checking for the_low_target.left_pad_xfer.
9724 (usr_store_inferior_registers): Use collect_ptrace_register callback
9725 instead of checking for the_low_target.left_pad_xfer.
9726
9727 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9728 (s390_supply_ptrace_register): Likewise.
9729 (s390_fill_gregset): Call s390_collect_ptrace_register.
9730 (the_low_target): Update.
9731
9732 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9733 (ppc_supply_ptrace_register): Likewise.
9734 (the_low_target): Update.
9735
9736 * linux-i386-low.c (the_low_target): Update.
9737 * linux-x86-64-low.c (the_low_target): Update.
9738
9739 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9740
9741 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9742 reg-s390.o and reg-s390x.o.
9743
9744 * linux-low.c (new_inferior): New global variable.
9745 (linux_create_inferior, linux_attach): Set it.
9746 (linux_wait_for_process): Call the_low_target.arch_setup after the
9747 target has stopped for the first time.
9748 (initialize_low): Do not call the_low_target.arch_setup.
9749
9750 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9751 (s390_set_pc): Likewise.
9752 (s390_arch_setup): New function.
9753 (the_low_target): Use s390_arch_setup as arch_setup routine.
9754
9755 * regcache.c (realloc_register_cache): New function.
9756 (set_register_cache): Call it for each existing regcache.
9757
9758 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9759
9760 * server.h (init_registers): Remove prototype.
9761
9762 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9763 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9764 instead of init_registers ().
9765 * linux-arm-low.c (init_registers_arm): Add prototype.
9766 (init_registers_arm_with_iwmmxt): Likewise.
9767 (the_low_target): Add initializer for arch_setup field.
9768 * linux-cris-low.c (init_registers_cris): Add prototype.
9769 (the_low_target): Add initializer for arch_setup field.
9770 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9771 (the_low_target): Add initializer for arch_setup field.
9772 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9773 (the_low_target): Add initializer for arch_setup field.
9774 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9775 (the_low_target): Add initializer for arch_setup field.
9776 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9777 (the_low_target): Add initializer for arch_setup field.
9778 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9779 (the_low_target): Add initializer for arch_setup field.
9780 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9781 (init_registers_mips64_linux): Likewise.
9782 (the_low_target): Add initializer for arch_setup field.
9783 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9784 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9785 (the_low_target): Add initializer for arch_setup field.
9786 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9787 (init_registers_powerpc_64): Likewise.
9788 (the_low_target): Add initializer for arch_setup field.
9789 * linux-s390-low.c (init_registers_s390): Add prototype.
9790 (init_registers_s390x): Likewise.
9791 (the_low_target): Add initializer for arch_setup field.
9792 * linux-sh-low.c (init_registers_sh): Add prototype.
9793 (the_low_target): Add initializer for arch_setup field.
9794 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9795 (the_low_target): Add initializer for arch_setup field.
9796 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9797 (the_low_target): Add initializer for arch_setup field.
9798
9799 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9800 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9801 instead of init_registers ().
9802 * win32-arm-low.c (init_registers_arm): Add prototype.
9803 (the_low_target): Add initializer for arch_setup field.
9804 * win32-i386-low.c (init_registers_i386): Add prototype.
9805 (the_low_target): Add initializer for arch_setup field.
9806
9807 * spu-low.c (init_registers_spu): Add prototype.
9808 (initialize_low): Call initialie_registers_spu () instead of
9809 initialize_registers ().
9810
9811 2008-02-19 Pedro Alves <pedro@codesourcery.com>
9812
9813 * server.c (handle_v_requests): When handling the vRun and vAttach
9814 packets, if already debugging a process, don't kill it. Return an
9815 error instead.
9816
9817 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9818
9819 * server.c (handle_query): Correct length check.
9820
9821 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9822
9823 * win32-low.c (do_initial_child_stuff): Add process handle
9824 parameter. Set current_process_handle and current_process_id from the
9825 parameters. Clear globals.
9826 (win32_create_inferior): Don't set current_process_handle and
9827 current_process_id here. Instead pass them on the call to
9828 do_initial_child_stuff.
9829 (win32_attach): Likewise.
9830 (win32_clear_inferiors): New.
9831 (win32_kill): Don't close the current process handle or the
9832 current thread handle here. Instead call win32_clear_inferiors.
9833 (win32_detach): Don't open a new handle to the process. Call
9834 win32_clear_inferiors.
9835 (win32_join): Don't rely on current_process_handle; open a new
9836 handle using the process id.
9837 (win32_wait): Call win32_clear_inferiors when the inferior process
9838 has exited.
9839
9840 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9841
9842 * server.c (monitor_show_help): Add "exit".
9843
9844 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9845
9846 * Makefile.in (SFILES): Add linux-xtensa-low.c.
9847 (clean): Add reg-xtensa.c.
9848 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
9849 * configure.srv (xtensa*-*-linux*) New target.
9850 * linux-xtensa-low.c: New.
9851 * xtensa-xtregs.c: New.
9852
9853 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9854
9855 * hostio.c: Don't include errno.h.
9856 (errno_to_fileio_errno): Move to hostio-errno.
9857 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9858 error number outputting to the target->hostio_last_error callback.
9859 (hostio_packet_error): Use FILEIO_EINVAL directly.
9860 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9861 calls to hostio_error.
9862 * hostio-errno.c: New.
9863 * server.h (hostio_last_error_from_errno): Declare.
9864 * target.h (target_ops): Add hostio_last_error member.
9865 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9866 as hostio_last_error handler.
9867 * spu-low.c (spu_target_ops): Likewise.
9868 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9869 (wince_hostio_last_error): New functions.
9870 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9871 as hostio_last_error handler.
9872 (win32_target_ops) [!_WIN32_WCE]: Register
9873 hostio_last_error_from_errno as hostio_last_error handler.
9874 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9875 (hostio-errno.o): New rule.
9876 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9877 * configure.srv (srv_hostio_err_objs): New variable. Default to
9878 hostio-errno.o.
9879 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9880 * configure: Regenerate.
9881
9882 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9883
9884 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9885 (linux_kill, linux_detach): Clean up the process list.
9886 * remote-utils.c (remote_open): Improve port number parsing.
9887 (putpkt_binary, input_interrupt): Only send interrupts if the target
9888 is running.
9889 * server.c (extended_protocol): Make static.
9890 (attached): Define earlier.
9891 (exit_requested, response_needed, program_argv): New variables.
9892 (target_running): New.
9893 (start_inferior): Clear attached here.
9894 (attach_inferior): Set attached here.
9895 (require_running): Define.
9896 (handle_query): Use require_running and target_running. Implement
9897 "monitor exit".
9898 (handle_v_attach, handle_v_run): New.
9899 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9900 (gdbserver_usage): Update.
9901 (main): Redo argument parsing. Handle --debug and --multi. Handle
9902 --attach along with other options or after the port. Save
9903 program_argv. Support no initial program. Resynchronize
9904 communication with GDB after an error. Handle "monitor exit".
9905 Use require_running and target_running. Always allow the extended
9906 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9907 restart in extended mode.
9908 * README: Refer to the GDB manual. Update --attach usage.
9909
9910 2007-12-20 Andreas Schwab <schwab@suse.de>
9911
9912 * linux-low.c (STACK_SIZE): Define.
9913 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9914 (linux_test_for_tracefork): Likewise.
9915
9916 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9917
9918 * linux-low.c (linux_wait_for_event): Update messages. Do not
9919 reinsert auto-delete breakpoints.
9920 * mem-break.c (struct breakpoint): Change return type of handler to
9921 int.
9922 (set_breakpoint_at): Update handler type.
9923 (reinsert_breakpoint_handler): Return 1 instead of calling
9924 delete_breakpoint.
9925 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9926 setting a new one.
9927 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9928 * mem-break.h (set_breakpoint_at): Update handler type.
9929 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9930 * win32-low.c (auto_delete_breakpoint): New.
9931 (get_child_debug_event): Use it.
9932
9933 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9934
9935 * configure.ac: Check for pread and pwrite.
9936 * hostio.c (handle_pread): Fall back to lseek and read.
9937 (handle_pwrite): Fall back to lseek and write.
9938 * config.in, configure: Regenerated.
9939
9940 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9941
9942 * server.c (myresume): Add own_buf argument.
9943 (main): Update calls.
9944
9945 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9946
9947 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9948 * remote-utils.c (remote_open): Do not call disable_async_io.
9949 (block_async_io): Delete.
9950 (unblock_async_io): Make static.
9951 (initialize_async_io): New.
9952 * server.c (handle_v_cont): Handle async I/O here.
9953 (myresume): Likewise. Move other common resume tasks here...
9954 (main): ... from here. Call initialize_async_io. Disable async
9955 I/O before the main loop.
9956 * server.h (initialize_async_io): Declare.
9957 (block_async_io, unblock_async_io): Delete prototypes.
9958 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9959
9960 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9961
9962 * remote-utils.c (readchar): Allow binary data in received messages.
9963
9964 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9965
9966 * win32-low.c (attaching): New global.
9967 (win32_create_inferior): Clear the `attaching' global.
9968 (win32_attach): Set the `attaching' global.
9969 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9970 attaching. Only set a breakpoint at the entry point if not
9971 attaching.
9972
9973 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9974
9975 * server.c (main): Don't report dll events on the initial
9976 connection on attaches.
9977
9978 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9979
9980 * server.c (main): Relax numerical bases supported for the pid of
9981 the --attach command line argument.
9982
9983 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9984
9985 * win32-low.c (win32_attach): Call OpenProcess before
9986 DebugActiveProcess, not after. Add last error output to error
9987 call.
9988
9989 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9990
9991 * win32-low.c (win32_get_thread_context)
9992 (win32_set_thread_context): New functions.
9993 (thread_rec): Use win32_get_thread_context.
9994 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9995 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9996 field.
9997
9998 2007-12-03 Leo Zayas
9999 Pedro Alves <pedro_alves@portugalmail.pt>
10000
10001 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10002 global variables.
10003 (child_add_thread): Minor cleanup.
10004 (child_continue): Resume artificially suspended threads before
10005 calling ContinueDebugEvent.
10006 (suspend_one_thread): New.
10007 (fake_breakpoint_event): New.
10008 (get_child_debug_event): Change return type to int. Check here if
10009 gdb sent an interrupt request. If a soft interrupt was requested,
10010 fake a breakpoint event. Return 0 if there is no event to handle,
10011 and 1 otherwise.
10012 (win32_wait): Don't check here if gdb sent an interrupt request.
10013 Ensure there is a valid event to handle.
10014 (win32_request_interrupt): Add soft interruption method as last
10015 resort.
10016
10017 2007-12-03 Leo Zayas
10018 Pedro Alves <pedro_alves@portugalmail.pt>
10019
10020 * win32-low.h (win32_thread_info): Add descriptions to the
10021 structure members. Replace `suspend_count' counter by a
10022 `suspended' flag.
10023 * win32-low.c (thread_rec): Update condition of when to get the
10024 context from the inferior. Rely on ContextFlags being set if it
10025 has already been retrieved. Only suspend the inferior thread if
10026 we haven't already. Warn if that fails.
10027 (continue_one_thread): s/suspend_count/suspended/. Only call
10028 ResumeThread once. Warn if that fails.
10029
10030 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10031
10032 * win32-low.c (win32_wait): Don't read from the inferior when it
10033 has already exited.
10034
10035 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10036
10037 * Makefile.in (win32_low_h): New variable.
10038 (win32-low.o): Add dependency on $(win32_low_h).
10039 (win32-arm-low.o, win32-i386-low.o): New rules.
10040
10041 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10042
10043 * hostio.c: Correct copyright year.
10044
10045 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10046
10047 * Makefile.in (OBS): Add hostio.o.
10048 (hostio.o): New rule.
10049 * server.h (handle_vFile): Declare.
10050 * hostio.c: New file.
10051 * server.c (handle_v_requests): Take packet_len and new_packet_len
10052 for binary packets. Call handle_vFile.
10053 (main): Update call to handle_v_requests.
10054
10055 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10056
10057 * linux-low.c: Include <sched.h>.
10058
10059 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10060
10061 * linux-low.c (linux_tracefork_grandchild): New.
10062 (linux_tracefork_child): Use clone.
10063 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10064
10065 2007-10-31 Joel Brobecker <brobecker@adacore.com>
10066
10067 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10068
10069 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10070
10071 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10072
10073 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10074
10075 * inferiors.c (change_inferior_id): Delete.
10076 (add_pid_to_list, pull_pid_from_list): New.
10077 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10078 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10079 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10080 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10081 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10082 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10083 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10084 (using_threads): Always set to 1.
10085 (handle_extended_wait): New.
10086 (add_process): Do not set TID.
10087 (linux_create_inferior): Set must_set_ptrace_flags.
10088 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10089 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10090 (linux_thread_alive): Rename TID argument to LWPID.
10091 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10092 (linux_wait_for_event): Do not use TID or check using_threads. Update
10093 call to dead_thread_notify. Call handle_extended_wait.
10094 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10095 (send_sigstop): Delete sigstop_sent.
10096 (wait_for_sigstop): Avoid TID.
10097 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10098 (linux_test_for_tracefork): New.
10099 (linux_lookup_signals): Use thread_db_active and
10100 linux_supports_tracefork_flag.
10101 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10102 * linux-low.h (get_process_thread): Avoid TID.
10103 (struct process_ifo): Move thread_known and tid to the end. Remove
10104 sigstop_sent.
10105 (linux_attach_lwp, thread_db_init): Update prototypes.
10106 * server.h (change_inferior_id): Delete prototype.
10107 (add_pid_to_list, pull_pid_from_list): New prototypes.
10108 * thread-db.c (thread_db_use_events): New.
10109 (find_first_thread): Rename to...
10110 (find_one_thread): ...this. Update callers and messages. Do not
10111 call fatal. Check thread_db_use_events. Do not call
10112 change_inferior_id or new_thread_notify.
10113 (maybe_attach_thread): Update. Do not call new_thread_notify.
10114 (thread_db_init): Set thread_db_use_events. Check use_events.
10115 * utils.c (fatal, warning): Correct message prefix.
10116
10117 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10118
10119 * Makefile.in (clean): Remove new files.
10120 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10121 (powerpc-64.o, powerpc-64.c): New rules.
10122 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10123 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10124 with SPE.
10125 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10126 SPE targets.
10127 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10128 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10129 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10130 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10131 (target_regsets): Add AltiVec and SPE register sets.
10132 * configure.ac: Check for AltiVec and SPE.
10133 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10134 (ppc_fill_vrregset, ppc_store_vrregset): New.
10135 (target_regsets): Add AltiVec register set.
10136 * configure: Regenerated.
10137
10138 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10139
10140 * linux-low.c (O_LARGEFILE): Define.
10141 (linux_read_memory): Use /proc/PID/mem.
10142 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10143 * configure, config.in: Regenerated.
10144
10145 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10146
10147 * linux-low.c (linux_wait_for_event): Do not pass signals while
10148 single-stepping.
10149
10150 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10151
10152 * win32-low.c (create_process): New.
10153 (win32_create_inferior): Use create_process instead of
10154 CreateProcess. If create_process failed retry appending an ".exe"
10155 suffix. Store the GetLastError result immediatelly after
10156 create_process calls and use it on the call to error.
10157
10158 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10159
10160 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10161
10162 2007-08-23 Joel Brobecker <brobecker@adacore.com>
10163
10164 * configure.ac: Switch license to GPLv3.
10165
10166 2007-08-01 Michael Snyder <msnyder@access-company.com>
10167
10168 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10169
10170 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10171
10172 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10173 typedef.
10174 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10175 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10176 CloseToolhelp32Snapshot.
10177 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10178 CloseToolhelp32Snapshot.
10179
10180 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
10181
10182 * server.c (main): Check for inferior exit before main loop.
10183
10184 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10185
10186 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10187 instead of on tmp_desc.
10188
10189 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10190 Daniel Jacobowitz <dan@codesourcery.com>
10191
10192 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10193 (add_thread): Minor cleanups.
10194 (clear_inferiors): Move lower in the file. Clear the DLL
10195 list.
10196 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10197 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10198 (xml_escape_text): New.
10199 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10200 for qSupported.
10201 (handle_v_cont): Report errors.
10202 (gdbserver_version): Update.
10203 (main): Correct size of own_buf. Do not report initial DLL events.
10204 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10205 (unloaded_dll, xml_escape_text): New.
10206 * win32-low.c (enum target_waitkind): Update comments.
10207 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10208 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10209 (win32_EnumProcessModules, win32_GetModuleInformation)
10210 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10211 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10212 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10213 (win32_Module32First, win32_Module32Next, load_toolhelp)
10214 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10215 (get_child_debug_event): Handle DLL events.
10216 (win32_wait): Likewise.
10217
10218 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10219
10220 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10221 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10222
10223 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10224
10225 * win32-low.c (handle_output_debug_string): Ignore event if not
10226 waiting.
10227
10228 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10229
10230 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10231
10232 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10233
10234 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10235
10236 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10237
10238 * inferiors.c (change_inferior_id): Add comment.
10239 * linux-low.c (check_removed_breakpoint): Add an early
10240 prototype. Improve debug output.
10241 (linux_attach): Doc update.
10242 (linux_detach_one_process, linux_detach): Clean up before releasing
10243 each process.
10244 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10245 * linux-low.h (struct process_info): Doc improvement.
10246 * mem-break.c (delete_all_breakpoints): New.
10247 * mem-break.h (delete_all_breakpoints): New prototype.
10248 * thread-db.c (find_first_thread): New.
10249 (thread_db_create_event): Call it instead of
10250 thread_db_find_new_threads. Clean up unused variables.
10251 (maybe_attach_thread): Remove first thread handling.
10252 (thread_db_find_new_threads): Use find_first_thread.
10253 (thread_db_get_tls_address): Likewise.
10254
10255 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10256
10257 * thread-db.c (thread_db_find_new_threads): Add prototype.
10258 (thread_db_create_event): Check for the main thread before adding
10259 a new thread.
10260 (maybe_attach_thread): Only enable event reporting if TID == 0.
10261 (thread_db_get_tls_address): Check for new threads.
10262
10263 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10264
10265 * linux-low.c (linux_create_inferior): Try execv before execvp.
10266 * spu-low.c (spu_create_inferior): Likewise.
10267
10268 2007-06-13 Mike Frysinger <vapier@gentoo.org>
10269
10270 * linux-low.c (linux_create_inferior): Change execv to execvp.
10271 * spu-low.c (spu_create_inferior): Likewies.
10272
10273 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10274
10275 * Makefile.in (clean): Clean new files instead of deleted ones.
10276 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10277 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10278 rules.
10279 * configure.srv: Specify XML files and new regformats for MIPS and
10280 MIPS64 GNU/Linux.
10281 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10282 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10283 an entry for the restart register.
10284 (mips_cannot_fetch_register, mips_cannot_store_register)
10285 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10286 register names to match the XML descriptions.
10287 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10288 restart register instead of $0.
10289
10290 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10291 Markus Deuling <deuling@de.ibm.com>
10292
10293 * remote-utils.c (decode_xfer_write): New function.
10294 * server.h (decode_xfer_write): Add prototype.
10295 * server.c (handle_query): Add PACKET_LEN argument. Support
10296 qXfer:spu:read and qXfer:spu:write packets.
10297 (main): Pass packet_len to handle_query.
10298 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10299 * target.h (target_ops): Add qxfer_spu.
10300
10301 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10302
10303 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10304 accessing non-seekable spufs files.
10305
10306 2007-05-16 Markus Deuling <deuling@de.ibm.com>
10307
10308 * server.c (handle_query): Add reply for qC packet.
10309
10310 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10311 Leo Zayas <lerele@champenstudios@com>
10312
10313 * server.h (check_remote_input_interrupt_request): New function.
10314 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10315 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10316 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10317 (check_remote_input_interrupt_request): New function.
10318 * server.h (check_remote_input_interrupt_request): Declare.
10319 * win32-low.c (winapi_DebugBreakProcess,
10320 winapi_GenerateConsoleCtrlEvent): New typedefs.
10321 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10322 to 250 ms.
10323 (win32_wait): Check for remote interrupt request
10324 with check_remote_input_interrupt_request.
10325 (win32_request_interrupt): New function.
10326 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10327
10328 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10329
10330 * win32-low.c (debug_registers_changed,
10331 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10332 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10333 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10334 (thread_rec): Get context using the low target.
10335 (child_add_thread): Call thread_added on the low target,
10336 which does the same thing.
10337 (regptr): Delete.
10338 (do_initial_child_stuff): Remove debug registers references.
10339 Set context using the low target. Resume threads after
10340 setting the contexts.
10341 (child_continue): Remove dead variable. Remove debug
10342 registers references.
10343 (child_fetch_inferior_registers): Go through the low target.
10344 (do_child_store_inferior_registers): Remove.
10345 (child_store_inferior_registers): Go through the low target.
10346 (win32_resume): Remove debug registers references.
10347 Set context using the low target.
10348 (handle_exception): Change return type to void. Don't record
10349 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10350 first chance exception.
10351 (get_child_debug_event): Change return type to void. Remove
10352 goto loop. Always return after waiting for debug event.
10353 (win32_wait): Convert to switch statement. Handle spurious
10354 events.
10355
10356 * win32-i386-low.c (debug_registers_changed,
10357 debug_registers_used): New.
10358 (initial_stuff): Rename to ...
10359 (i386_initial_stuff): ... this. Clear debug registers
10360 state variables.
10361 (store_debug_registers): Delete.
10362 (i386_get_thread_context): New.
10363 (load_debug_registers): Delete.
10364 (i386_set_thread_context): New.
10365 (i386_thread_added): New.
10366 (single_step): Rename to ...
10367 (i386_single_step): ... this.
10368 (do_fetch_inferior_registers): Rename to ...
10369 (i386_fetch_inferior_register): ... this.
10370 (i386_store_inferior_register): New.
10371 (the_low_target): Adapt to new interface.
10372
10373 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10374 (arm_get_thread_context): New.
10375 (arm_set_thread_context): New.
10376 (regptr): New.
10377 (do_fetch_inferior_registers): Rename to ...
10378 (arm_fetch_inferior_register): ... this.
10379 (arm_store_inferior_register): New.
10380 (arm_wince_breakpoint): Reimplement as unsigned long.
10381 (arm_wince_breakpoint_len): Define.
10382 (the_low_target): Adapt to new interface.
10383
10384 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10385 load_debug_registers. Add get_thread_context, set_thread_context,
10386 thread_added and store_inferior_register. Rename
10387 fetch_inferior_registers to fetch_inferior_register.
10388 (regptr): Remove declaration.
10389
10390 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10391
10392 * linux-low.c (linux_detach): Change return type to int. Return 0.
10393 * spu-low.c (spu_detach): Likewise.
10394
10395 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10396
10397 * target.h (target_ops): Change return type of detach to int.
10398 Add join.
10399 (join_inferior): New.
10400 * server.c (main): Don't skip detach support on mingw32.
10401 If the inferior doesn't support detaching return error.
10402 Call join_inferior instead of using waitpid.
10403 * linux-low.c (linux_join): New.
10404 (linux_target_op): Add linux_join.
10405 * spu-low.c (spu_join): New.
10406 (spu_target_ops): Add spu_join.
10407 * win32-low.c (win32_detach): Adapt to new interface.
10408 Reopen current_process_handle before detaching. Issue a child
10409 resume before detaching.
10410 (win32_join): New.
10411 (win32_target_op): Add win32_join.
10412
10413 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10414
10415 * win32-low.c (win32-attach): Fix return value.
10416 * target.h (target_ops): Describe ATTACH return values.
10417
10418 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10419
10420 * win32-low.c (GETPROCADDRESS): Define.
10421 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10422 (winapi_DebugSetProcessKillOnExit): Likewise.
10423 (win32_create_inferior): Force usage of ansi CreateProcessA.
10424 (win32_attach): Use GETPROCADDRESS.
10425 (win32_detach): Likewise.
10426
10427 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10428
10429 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10430
10431 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10432
10433 * win32-low.c: Commit leftover changes from 2007-03-29.
10434
10435 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10436
10437 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10438 fields short instead of int. Add explicit padding.
10439 (i387_cache_to_fsave): Remove unnecessary casts.
10440 (i387_fsave_to_cache): Doc fix.
10441 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10442
10443 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10444
10445 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10446 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10447
10448 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10449
10450 * configure.srv (arm*-*-mingw32ce*): Move near the other
10451 arm targets.
10452
10453 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10454
10455 * configure.ac: Add errno checking.
10456 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10457 sys/file.h and malloc.h.
10458 (AC_CHECK_DECLS): Add perror.
10459 (srv_mingwce): Handle.
10460 * configure.srv (i[34567]86-*-cygwin*): Add
10461 win32-i386-low.o to srv_tgtobj.
10462 (i[34567]86-*-mingw*): Likewise.
10463 (arm*-*-mingw32ce*): Add case.
10464 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10465 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10466 [__MINGW32CE__] (strerror): New function.
10467 [__MINGW32CE__] (errno): Define to GetLastError.
10468 [__MINGW32CE__] (COUNTOF): New macro.
10469 (remote_open): Remove extra close call.
10470 * mem-break.c (delete_breakpoint_at): New function.
10471 * mem-break.h (delete_breakpoint_at): Declare.
10472 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10473 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10474 [USE_WIN32API] (read, write): Add char* casts.
10475 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10476 * server.h: Include wincecompat.h on Windows CE.
10477 [HAVE_ERRNO_H]: Check.
10478 (perror): Declare if not declared.
10479 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10480 (perror_with_name): Remove errno declaration.
10481 * wincecompat.h: New.
10482 * wincecompat.c: New.
10483 * win32-low.h: New.
10484 * win32-arm-low.c: New.
10485 * win32-i386-low.c: New.
10486 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10487 (OUTMSG2): Make it safe.
10488 (_T): New macro.
10489 (COUNTOF): New macro.
10490 (NUM_REGS): Get it from the low target.
10491 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10492 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10493 (thread_rec): Let low target handle debug registers.
10494 (child_add_thread): Likewise.
10495 (child_init_thread_list): Likewise.
10496 (continue_one_thread): Likewise.
10497 (regptr): New.
10498 (do_child_fetch_inferior_registers): Move to ...
10499 * win32-i386-low.c: ... here, and rename to ...
10500 (do_fetch_inferior_registers): ... this.
10501 * win32-low.c (child_fetch_inferior_registers):
10502 Go through the low target.
10503 (do_child_store_inferior_registers): Use regptr.
10504 (strwinerror): New function.
10505 (win32_create_inferior): Handle Windows CE.
10506 Use strwinerror instead of strerror on Windows error
10507 codes. Add program to the error output.
10508 Don't close the main thread handle on Windows CE.
10509 (win32_attach): Use coredll.dll on Windows CE.
10510 (win32_kill): Close current process and current
10511 thread handles.
10512 (win32_detach): Use coredll.dll on Windows CE.
10513 (win32_resume): Let low target handle debug registers, and
10514 step request.
10515 (handle_exception): Add/Remove initial breakpoint. Avoid
10516 non-existant WSTOPSIG on Windows CE.
10517 (win32_read_inferior_memory): Cast to remove warning.
10518 (win32_arch_string): Go through the low target.
10519 (initialize_low): Call set_breakpoint_data with the low
10520 target's breakpoint.
10521 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10522 FOP_REGNUM, mappings): Move to ...
10523 * win32-i386-low.c: ... here.
10524 * win32-low.c (win32_thread_info): Move to ...
10525 * win32-low.h: ... here.
10526 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10527 win32-arm-low.c and wincecompat.c.
10528 (all:): Add $EXEEXT.
10529 (install-only:): Likewise.
10530 (gdbserver:): Likewise.
10531 (gdbreplay:): Likewise.
10532 * config.in: Regenerate.
10533 * configure: Regenerate.
10534
10535 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10536
10537 * win32-low.c: Rename typedef thread_info to
10538 win32_thread_info throughout.
10539
10540 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10541
10542 * win32-i386-low.c: Rename to ...
10543 * win32-low.c: ... this.
10544 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10545 * Makefile.in: Likewise.
10546
10547 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10548
10549 * remote-utils.c (monitor_output): Constify msg parameter.
10550 * server.h (monitor_output): Likewise.
10551 * win32-i386-low.c (handle_output_debug_string): New.
10552 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10553 handle_output_debug_string.
10554 (get_child_debug_event): Likewise.
10555
10556 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10557
10558 * server.c (main): Correct strtoul check.
10559
10560 2007-03-27 Jon Ringle <jon@ringle.org>
10561
10562 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10563
10564 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10565
10566 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10567
10568 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10569
10570 * terminal.h: Check HAVE_SGTTY_H.
10571
10572 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
10573
10574 * remote-utils.c (remote_open): Print out the assigned port number.
10575
10576 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10577
10578 * remote-utils.c (monitor_output): New function.
10579 * server.c (debug_threads): Define here.
10580 (monitor_show_help): New function.
10581 (handle_query): Handle qRcmd.
10582 (main): Do not handle 'd' packet.
10583 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10584 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10585 of debug_threads.
10586
10587 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10588
10589 * Makefile.in (EXEEXT): New.
10590 (clean): Use $(EXEEXT).
10591
10592 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10593
10594 * target.h (target_ops): Rename send_signal to request_interrupt,
10595 and remove enum target_signal parameter.
10596 * linux-low.c (linux_request_interrupt): Rename from
10597 linux_send_signal, and always send SIGINT.
10598 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10599 and always send SIGINT.
10600 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10601 of send_signal.
10602 (input_interrupt): Likewise.
10603
10604 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10605
10606 * server.c (get_features_xml): Check if target implemented
10607 arch_string.
10608 * win32-i386-low.c (win32_arch_string): New.
10609 (win32_target_ops): Add win32_arch_string as arch_string member.
10610
10611 2007-02-22 Markus Deuling <deuling@de.ibm.com>
10612
10613 * spu-low.c (spu_arch_string): New.
10614 (spu_target_ops): Add spu_arch_string.
10615
10616 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10617
10618 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10619 * configure.ac: Do not check for terminal.h.
10620 * configure, config.in: Regenerated.
10621
10622 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10623
10624 * Makefile.in (OBS): Add $(XML_BUILTIN).
10625 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10626 (clean): Update.
10627 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10628 (arm-with-iwmmxt.c): New.
10629 * config.in, configure: Regenerate.
10630 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10631 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10632 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10633 (arm*-*-linux*): Add iWMMXt and regset support.
10634 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10635 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10636 (arm_store_wmmxregset, target_regsets): New.
10637 * server.c (get_features_xml): Take annex argument. Check builtin
10638 XML documents.
10639 (handle_query): Handle multiple annexes.
10640
10641 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10642
10643 * remote-utils.c [USE_WIN32API] (read, write): Define.
10644 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10645 write.
10646
10647 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10648
10649 * linux-i386-low.c (the_low_target): Set arch_string.
10650 * linux-x86-64-low.c (the_low_target): Likewise.
10651 * linux-low.c (linux_arch_string): New.
10652 (linux_target_ops): Add it.
10653 * linux-low.h (struct linux_target_ops): Add arch_string.
10654 * server.c (write_qxfer_response): Use const void * for DATA.
10655 (get_features_xml): New.
10656 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10657 * target.h (struct target_ops): Add arch_string method.
10658
10659 2007-01-03 Denis Pilat <denis.pilat@st.com>
10660 Daniel Jacobowitz <dan@codesourcery.com>
10661
10662 * linux-low.c (linux_kill): Handle being called with no threads.
10663 * win32-i386-low.c (win32_kill): Likewise.
10664 (get_child_debug_event): Clear current_process_handle.
10665
10666 2006-12-30 Denis PILAT <denis.pilat@st.com>
10667 Daniel Jacobowitz <dan@codesourcery.com>
10668
10669 * remote-utils.c (remote_open): Check the type of specified
10670 serial port devices before opening them.
10671 * server.c (main): Kill the inferior if an error occurs during
10672 the first remote_open.
10673
10674 2006-12-05 Markus Deuling <deuling@de.ibm.com>
10675
10676 * README: Update supported targets.
10677
10678 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10679
10680 * Makefile.in (clean): Remove reg-mips64.c.
10681 (reg-mips64.c, reg-mips64.o): New rules.
10682 * configure.srv: Handle mips64. Include regset support for mips.
10683 * linux-mips-low.c (union mips_register): New.
10684 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10685 (mips_breakpoint, mips_breakpoint_at): Use int.
10686 (mips_collect_register, mips_supply_register)
10687 (mips_collect_register_32bit, mips_supply_register_32bit)
10688 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10689 (mips_store_fpregset, target_regsets): New.
10690 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10691
10692 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10693
10694 * configure.srv: Add target "spu*-*-*".
10695 * Makefile.in (clean): Remove reg-spu.c.
10696 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10697 * spu-low.c: New file.
10698
10699 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10700
10701 * configure.ac: Correct td_thr_tls_get_addr test.
10702 * configure: Regenerated.
10703
10704 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10705
10706 * linux-low.c (linux_wait_for_event): Reformat. Use the
10707 pass_signals array.
10708 * remote-utils.c (decode_address_to_semicolon): New.
10709 * server.c (pass_signals, handle_general_set): New.
10710 (handle_query): Mention QPassSignals for qSupported.
10711 (main): Call handle_general_set.
10712 * server.h (pass_signals, decode_address_to_semicolon): New.
10713
10714 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10715
10716 * server.c (handle_query): Correct error handling for read_auxv.
10717
10718 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10719
10720 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10721 and srv_linux_thread_db to yes.
10722 * linux-s390-low.c (s390_fill_gregset): New function.
10723 (target_regsets): Define data structure.
10724
10725 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10726
10727 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10728 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10729 * config.in, configure: Regenerated.
10730 * inferiors.c (gdb_id_to_thread): New function.
10731 (gdb_id_to_thread_id): Use it.
10732 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10733 * linux-low.h (struct process_info): Add th member.
10734 (thread_db_get_tls_address): New prototype.
10735 * remote-utils.c (decode_address): Make non-static.
10736 * server.c (handle_query): Handle qGetTLSAddr.
10737 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10738 * target.h (struct target_ops): Add get_tls_address.
10739 * thread-db.c (maybe_attach_thread): Save the thread handle.
10740 (thread_db_get_tls_address): New.
10741
10742 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10743
10744 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10745 (linux_resume_one_process): Take a siginfo_t *. Update all
10746 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10747 (struct pending_signals): Add a siginfo_t.
10748 (linux_wait_for_process): Always set last_status.
10749 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10750 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10751 * linux-low.h (struct process_info): Add last_status.
10752
10753 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10754
10755 * remote-utils.c (try_rle): New function.
10756 (putpkt_binary): Use it.
10757
10758 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10759
10760 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10761 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10762 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10763 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10764 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10765 point registers.
10766
10767 2006-08-08 Richard Sandiford <richard@codesourcery.com>
10768
10769 * server.c (terminal_fd): New variable.
10770 (old_foreground_pgrp): Likewise.
10771 (restore_old_foreground_pgrp): New function.
10772 (start_inferior): Record the terminal file descriptor in terminal_fd
10773 and its original foreground group in old_foreground_pgrp. Register
10774 restore_old_foreground_pgrp with atexit().
10775
10776 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10777
10778 * server.c (handle_query): Correct qPart to qXfer.
10779
10780 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10781
10782 * configure.ac: Check for more headers which are missing on
10783 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10784 * configure.srv: Add Cygwin and mingw32.
10785 * remote-utils.c: Don't include headers unconditionally which
10786 are missing on mingw32. Include <winsock.h> for mingw32.
10787 (remote_open): Adjust for mingw32 support. Flush
10788 standard error after writing to it.
10789 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10790 (unblock_async_io, enable_async_io, disable_async_io)
10791 (readchar, getpkt): Update for Winsock support.
10792 (prepare_resume_reply): Expect a protocol signal number.
10793 * server.c: Disable <sys/wait.h> on mingw32.
10794 (start_inferior): Adjust for mingw32 support. Flush
10795 standard error after writing to it.
10796 (attach_inferior): Likewise. Use protocol signal
10797 numbers.
10798 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10799 and names.
10800 * win32-i386-low.c: New file.
10801 * Makefile.in (XM_CLIBS): Set.
10802 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10803 (win32-i386-low.o): New dependency rule.
10804 * linux-low.c (linux_wait): Use target signal numbers.
10805 * target.h (struct target_ops): Doc fix.
10806 * server.h (target_signal_to_name): New prototype.
10807 * gdbreplay.c: Don't include headers unconditionally which
10808 are missing on mingw32. Include <winsock.h> for mingw32.
10809 (remote_close, remote_open): Adjust for Winsock support.
10810 * configure, config.in: Regenerated.
10811
10812 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10813
10814 * server.c (decode_xfer_read, write_qxfer_response): New.
10815 (handle_query): Take a packet length argument. Handle
10816 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10817 the qSupported response.
10818 (main): Update call to handle_query.
10819
10820 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10821
10822 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10823 (putpkt_binary): Renamed from putpkt and adjusted for binary
10824 data.
10825 (putpkt): New wrapper for putpkt_binary.
10826 (readchar): Don't mask off the high bit.
10827 (decode_X_packet): New function.
10828 * server.c (main): Call putpkt_binary if a handler sets the packet
10829 length. Save the length of the incoming packet. Handle 'X'.
10830 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10831
10832 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10833
10834 * server.c (handle_query): Handle qSupported.
10835
10836 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10837
10838 * remote-utils.c (all_symbols_looked_up): New variable.
10839 (look_up_one_symbol): Check it.
10840 * server.h (look_up_one_symbol): New declaration.
10841 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10842
10843 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10844
10845 * Makefile.in (linux-arm-low.o): Update dependencies.
10846 * linux-arm-low.c: Include "gdb_proc_service.h".
10847 (PTRACE_GET_THREAD_AREA): Define.
10848 (ps_get_thread_area): New function.
10849
10850 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10851
10852 * configure.srv (m68k*-*-uclinux*): New target.
10853 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10854 (linux_resume_one_process): Remove extraneous cast.
10855 (linux_read_offsets): New.
10856 (linux_target_op): Add linux_read_offsets on mmuless systems.
10857 * server.c (handle_query): Add qOffsets logic.
10858 * target.h (struct target_ops): Add read_offsets.
10859
10860 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10861
10862 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10863 (PTRACE_GET_THREAD_AREA): Define.
10864 (ps_get_thread_area): New function.
10865 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10866 (linux-x86-64-low.o): Update.
10867
10868 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10869
10870 * configure.ac: Remove checks for prfpregset_t.
10871 * gdb_proc_service.h: New file.
10872 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10873 new "gdb_proc_service.h".
10874 * proc-service.c: Likewise.
10875 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10876 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10877 * Makefile.in (gdb_proc_service_h): Updated.
10878 * configure, config.in: Regenerated.
10879
10880 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10881
10882 * remote-utils.c (prepare_resume_reply): Move declaration
10883 of gdb_id_from_wait to the top of the block.
10884
10885 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10886
10887 * linux-low.c (regsets_store_inferior_registers): Read the regset
10888 from the target before filling it.
10889
10890 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10891
10892 * server.c (attach_inferior): Return SIGTRAP for a successful
10893 attach.
10894
10895 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10896
10897 * Makefile.in (OBS): Add version.o.
10898 (STAGESTUFF): Delete.
10899 (version.o): Add dependencies.
10900 (version.c): Replace rule.
10901 (clean): Remove version.c.
10902 * server.c (gdbserver_version): New.
10903 (gdbserver_usage): Use printf.
10904 (main): Handle --version and --help.
10905 * server.h (version, host_name): Add declarations.
10906
10907 2005-12-23 Eli Zaretskii <eliz@gnu.org>
10908
10909 * linux-arm-low.c:
10910 * linux-arm-low.c:
10911 * inferiors.c:
10912 * i387-fp.h:
10913 * i387-fp.c:
10914 * gdbreplay.c:
10915 * regcache.c:
10916 * proc-service.c:
10917 * mem-break.h:
10918 * mem-break.c:
10919 * linux-x86-64-low.c:
10920 * linux-sh-low.c:
10921 * linux-s390-low.c:
10922 * linux-ppc64-low.c:
10923 * linux-ppc-low.c:
10924 * linux-mips-low.c:
10925 * linux-m68k-low.c:
10926 * linux-m32r-low.c:
10927 * linux-low.h:
10928 * linux-low.c:
10929 * linux-ia64-low.c:
10930 * linux-i386-low.c:
10931 * linux-crisv32-low.c:
10932 * thread-db.c:
10933 * terminal.h:
10934 * target.h:
10935 * target.c:
10936 * server.h:
10937 * server.c:
10938 * remote-utils.c:
10939 * regcache.h:
10940 * utils.c:
10941 * Makefile.in:
10942 * configure.ac:
10943 * gdbserver.1: Add (C) after Copyright. Update the FSF
10944 address.
10945
10946 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10947
10948 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10949 (arm_breakpoint_at): Recognize both breakpoints.
10950 (the_low_target): Use the correct breakpoint instruction.
10951
10952 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10953
10954 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10955 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10956 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10957 (the_low_target): Update.
10958
10959 2005-10-25 Andreas Schwab <schwab@suse.de>
10960
10961 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10962
10963 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10964 (ia64_num_regs): Reduce to 462.
10965
10966 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10967
10968 * acinclude.m4: Correct quoting.
10969 * aclocal.m4: Regenerated.
10970
10971 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10972 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10973 (thread_db_init): Call thread_db_err_str.
10974 * configure.ac: Check for TD_VERSION.
10975 * config.in, configure: Regenerated.
10976
10977 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10978
10979 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10980
10981 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10982
10983 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10984 is not available. Define HAVE_PTRACE_GETREGS if it is.
10985 * config.in, configure: Regenerated.
10986 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10987 * linux-i386-low.c, linux-m68k-low.c: Update to use
10988 HAVE_PTRACE_GETREGS.
10989 * linux-low.c (regsets_fetch_inferior_registers)
10990 (regsets_store_inferior_registers): Only return 0 if we processed
10991 GENERAL_REGS.
10992 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10993 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10994
10995 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10996
10997 * inferiors.c (struct thread_info): Add gdb_id.
10998 (add_thread): Add gdb_id argument.
10999 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11000 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11001 calls to add_thread.
11002 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11003 * server.c (handle_query): Use thread_to_gdb_id.
11004 (handle_v_cont, main): Use gdb_id_to_thread_id.
11005 * server.h (add_thread): Update prototype.
11006 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11007 prototypes.
11008
11009 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11010
11011 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11012 left-padded registers.
11013 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11014 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11015
11016 2005-07-01 Steve Ellcey <sje@cup.hp.com>
11017
11018 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11019 * configure: Regenerate.
11020 * config.in: Regenerate.
11021 * server.h (NEED_DECLARATION_STRERROR):
11022 Replace with !HAVE_DECL_STRERROR.
11023
11024 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11025
11026 * linux-low.c (linux_wait, linux_send_signal): Don't test
11027 an unsigned long variable for > 0 if it could be MAX_ULONG.
11028 * server.c (myresume): Likewise.
11029 * target.c (set_desired_inferior): Likewise.
11030
11031 2005-06-13 Mark Kettenis <kettenis@gnu.org>
11032
11033 * configure.ac: Simplify and improve check for socklen_t.
11034 * configure, config.in: Regenerate.
11035
11036 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11037
11038 * acconfig.h: Remove.
11039 * configure.ac: Add a test for socklen_t. Use three-argument
11040 AC_DEFINE throughout.
11041 * config.in: Regenerated using autoheader 2.59.
11042 * configure: Regenerated.
11043
11044 * gdbreplay.c (socklen_t): Provide a default.
11045 (remote_open): Use socklen_t.
11046 * remote-utils.c (socklen_t): Provide a default.
11047 (remote_open): Use socklen_t.
11048 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11049 unsigned char.
11050
11051 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11052 char for buffers.
11053 * linux-low.c (linux_read_memory, linux_write_memory)
11054 (linux_read_auxv): Likewise.
11055 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11056 (check_mem_write): Likewise.
11057 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11058 Likewise.
11059 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11060 (registers_from_string, register_data): Likewise.
11061 * server.c (handle_query, main): Likewise.
11062 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11063 (decode_M_packet): Likewise.
11064 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11065 * target.h (struct target_ops): Update read_memory, write_memory,
11066 and read_auxv.
11067 (read_inferior_memory, write_inferior_memory): Update.
11068 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11069 to unsigned char *.
11070 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11071 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11072 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11073 linux-s390-low.c, linux-sh-low.c: Update for changes in
11074 read_inferior_memory and the_low_target->breakpoint.
11075
11076 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11077
11078 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11079 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11080 * configure.srv: Add powerpc64-*-linux*.
11081 * linux-ppc64-low.c: New file.
11082
11083 2005-05-23 Orjan Friberg <orjanf@axis.com>
11084
11085 * linux-cris-low.c: New file with support for CRIS.
11086 * linux-crisv32-low.c: Ditto for CRISv32.
11087 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11088 (clean): Add reg-cris.c and reg-crisv32.c.
11089 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
11090 reg-crisv32.o, and reg-crisv32.c to make rules.
11091 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11092 recognized targets.
11093
11094 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11095
11096 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11097 of sizeof (PTRACE_XFER_TYPE).
11098 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11099
11100 2005-05-12 Orjan Friberg <orjanf@axis.com>
11101
11102 * target.h (struct target_ops): Add insert_watchpoint,
11103 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11104 pointers for hardware watchpoint support.
11105 * linux-low.h (struct linux_target_ops): Ditto.
11106 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11107 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11108 to linux_target_ops.
11109 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11110 reply packet.
11111 * server.c (main): Recognize 'Z' and 'z' packets.
11112
11113 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11114
11115 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11116 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11117 (the_low_target): Add new members.
11118
11119 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11120
11121 * proc-service.c (ps_lgetregs): Search all_processes instead of
11122 all_threads.
11123
11124 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11125
11126 * server.c (start_inferior): Change return type to int.
11127 (attach_inferior): Change sigptr to int *.
11128 (handle_v_cont, handle_v_requests): Change signal to int *.
11129 (main): Change signal to int.
11130
11131 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
11132
11133 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11134 * configure.srv: Add m32r*-*-linux*.
11135 * linux-m32r-low.c: New file.
11136
11137 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11138
11139 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11140
11141 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11142
11143 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11144 Take unsigned long arguments for PIDs.
11145 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11146 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11147 (wait_for_sigstop, linux_resume_one_process)
11148 (regsets_fetch_inferior_registers, linux_send_signal)
11149 (linux_read_auxv): Likewise. Update the types of variables holding
11150 PIDs. Update format string specifiers.
11151 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11152 * remote-utils.c (prepare_resume_reply): Likewise.
11153 * server.c (cont_thread, general_thread, step_thread)
11154 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11155 unsigned long.
11156 (handle_query): Update format specifiers.
11157 (handle_v_cont, main): Use strtoul for thread IDs.
11158 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11159 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11160 (general_thread, step_thread, thread_from_wait)
11161 (old_thread_from_wait): Update.
11162 * target.h (struct thread_resume): Use unsigned long for THREAD.
11163 (struct target_ops): Use unsigned long for arguments to attach and
11164 thread_alive.
11165
11166 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11167
11168 * acinclude.m4: Include bfd/bfd.m4 directly.
11169 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11170 <agriffis@toolchain.org>.
11171 * aclocal.m4, configure: Regenerated.
11172
11173 2005-01-07 Andrew Cagney <cagney@gnu.org>
11174
11175 * configure.ac: Rename configure.in, require autoconf 2.59.
11176 * configure: Re-generate.
11177
11178 2004-12-08 Daniel Jacobowitz <dan@debian.org>
11179
11180 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11181 LIBS when finished.
11182 * aclocal.m4: Regenerated.
11183 * configure: Regenerated.
11184
11185 2004-11-21 Andreas Schwab <schwab@suse.de>
11186
11187 * linux-m68k-low.c (m68k_num_gregs): Define.
11188 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11189 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11190 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11191 (m68k_breakpoint_at): New. Add to the_low_target.
11192
11193 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11194 srv_linux_thread_db to yes.
11195
11196 2004-10-20 Joel Brobecker <brobecker@gnat.com>
11197
11198 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11199 (ARCH_SET_FS): Likewise.
11200 (ARCH_GET_FS): Likewise.
11201 (ARCH_GET_GS): Likewise.
11202
11203 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11204
11205 * linux-i386-low.c (ps_get_thread_area): New.
11206 * linux-x86-64-low.c (ps_get_thread_area): New.
11207 * linux-low.c: Include <sys/syscall.h>.
11208 (linux_kill_one_process): Don't kill the first thread here.
11209 (linux_kill): Kill the first thread here.
11210 (kill_lwp): New function.
11211 (send_sigstop, linux_send_signal): Use it.
11212 * proc-service.c: Clean up #ifdefs.
11213 (fpregset_info): Delete.
11214 (ps_lgetregs): Update and enable implementation.
11215 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11216 implementations.
11217 * remote-utils.c (struct sym_cache, symbol_cache): New.
11218 (input_interrupt): Print a clearer message.
11219 (async_io_enabled): New variable.
11220 (enable_async_io, disable_async_io): Use it. Update comments.
11221 (look_up_one_symbol): Use the symbol cache.
11222 * thread-db.c (thread_db_look_up_symbols): New function.
11223 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11224
11225 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11226
11227 * configure.in: Test for -rdynamic.
11228 * configure: Regenerated.
11229 * Makefile (INTERNAL_LDFLAGS): New.
11230 (gdbserver, gdbreplay): Use it.
11231
11232 2004-09-02 Andrew Cagney <cagney@gnu.org>
11233
11234 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11235
11236 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
11237
11238 * linux-low.c (linux_wait): Clear all_processes list also.
11239
11240 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11241
11242 * linux-low.c: Include <errno.h>. Remove extern declaration of
11243 errno.
11244
11245 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11246
11247 * gdbreplay.c, server.h, utils.c: Update copyright years.
11248
11249 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11250
11251 * server.c (main): Print child status or termination signal from
11252 variable 'signal', not 'sig'.
11253
11254 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11255
11256 * linux-low.c (linux_read_memory): Change return type to
11257 int. Check for and return error from ptrace().
11258 * target.c (read_inferior_memory): Change return type to int. Pass
11259 back return status from the_target->read_memory().
11260 * target.h (struct target_ops): Adapt *read_memory() prototype.
11261 Update comment.
11262 (read_inferior_memory): Adapt prototype.
11263 * server.c (main): Return an error packet if
11264 read_inferior_memory() returns an error.
11265
11266 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
11267
11268 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11269 Unify with other clean targets.
11270
11271 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11272
11273 * server.c (handle_v_cont): Call set_desired_inferior.
11274
11275 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11276
11277 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11278
11279 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11280
11281 * linux-low.c (linux_wait): Unblock async I/O.
11282 (linux_resume): Block and enable async I/O.
11283 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11284 * server.h (block_async_io, unblock_async_io): Add prototypes.
11285
11286 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11287
11288 * remote-utils.c (remote_open): Print a status notice after
11289 opening a TCP port.
11290 * server.c (attach_inferior): Print a status notice after
11291 attaching.
11292
11293 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11294
11295 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11296
11297 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
11298
11299 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11300 error packet.
11301 * server.c, target.h: Update copyright years.
11302
11303 2004-02-25 Roland McGrath <roland@redhat.com>
11304
11305 * target.h (struct target_ops): New member `read_auxv'.
11306 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11307 * linux-low.c (linux_read_auxv): New function.
11308 (linux_target_ops): Initialize `read_auxv' member to that.
11309
11310 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11311
11312 Committed by Jim Blandy <jimb@redhat.com>.
11313
11314 * linux-s390-low.c (s390_num_regs): Update.
11315 (s390_regmap): Remove control registers. Use __s390x__ predefine
11316 instead of GPR_SIZE to distiguish s390 and s390x targets.
11317
11318 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
11319
11320 * linux-low.c: Update copyright year.
11321 (check_removed_breakpoint): Clear pending_is_breakpoint.
11322 (linux_set_resume_request, linux_queue_one_thread)
11323 (resume_status_pending_p): New functions.
11324 (linux_continue_one_thread): Use process->resume.
11325 (linux_resume): Only resume threads if there are no pending events.
11326 * linux-low.h (struct process_info): Add resume request
11327 pointer.
11328
11329 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
11330
11331 * regcache.c (new_register_cache): Clear the allocated register
11332 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11333
11334 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
11335
11336 * linux-low.c (linux_resume): Take a struct thread_resume *
11337 argument.
11338 (linux_wait): Update call.
11339 (resume_ptr): New static variable.
11340 (linux_continue_one_thread): Renamed from
11341 linux_continue_one_process. Use resume_ptr.
11342 (linux_resume): Use linux_continue_one_thread.
11343 * server.c (handle_v_cont, handle_v_requests): New functions.
11344 (myresume): New function.
11345 (main): Handle 'v' case.
11346 * target.h (struct thread_resume): New type.
11347 (struct target_ops): Change argument of "resume" to struct
11348 thread_resume *.
11349 (myresume): Delete macro.
11350
11351 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11352
11353 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11354 (uninstall): Support DESTDIR.
11355
11356 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11357
11358 * configure.srv: Add xscale*linux copy of arm*linux entry.
11359
11360 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
11361
11362 * linux-arm-low.c (arm_reinsert_addr): New function.
11363 (the_low_target): Add arm_reinsert_addr.
11364
11365 2003-07-08 Mark Kettenis <kettenis@gnu.org>
11366
11367 * mem-break.c: Remove whitespace at end of file.
11368
11369 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11370
11371 * configure.in: Check whether we need to prototype strerror.
11372 * server.h: Optionally prototype strerror.
11373 * gdbreplay.c (perror_with_name): Use strerror.
11374 * linux-low.c (linux_attach_lwp): Use strerror.
11375 * utils.c (perror_with_name): Use strerror.
11376 * config.in, configure: Regenerated.
11377
11378 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11379
11380 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11381 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11382
11383 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
11384
11385 * Makefile.in (SFILES): Update.
11386 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11387 low-sun3.c: Remove files.
11388
11389 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
11390
11391 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11392 (linux_detach_one_process, linux_detach): New functions.
11393 (linux_target_ops): Add linux_detach.
11394 * server.c (main): Handle 'D' packet.
11395 * target.h (struct target_ops): Add "detach" member.
11396 (detach_inferior): Define.
11397
11398 2003-06-13 Mark Kettenis <kettenis@gnu.org>
11399
11400 From Kelley Cook <kelleycook@wideopenwest.com>:
11401 * configure.srv: Accept i[34567]86 variants.
11402
11403 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
11404
11405 * linux-low.c (linux_wait_for_event): Correct comment typos.
11406 (linux_resume_one_process): Call check_removed_breakpoint.
11407 (linux_send_signal): New function.
11408 (linux_target_ops): Add linux_send_signal.
11409 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11410 of kill.
11411 * target.h (struct target_ops): Add send_signal.
11412
11413 2003-05-29 Jim Blandy <jimb@redhat.com>
11414
11415 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11416 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11417 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11418 away part of the register's value.
11419
11420 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
11421
11422 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11423 (linux_wait_for_event, linux_init_signals): Likewise.
11424
11425 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
11426
11427 * configure.in: Check for stdlib.h.
11428 * configure: Regenerated.
11429 * config.in: Regenerated.
11430
11431 2003-01-04 Andreas Schwab <schwab@suse.de>
11432
11433 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11434
11435 2003-01-02 Andrew Cagney <ac131313@redhat.com>
11436
11437 * Makefile.in: Remove obsolete code.
11438
11439 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
11440
11441 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11442 defined(PT_FPR0_HI).
11443
11444 2002-11-17 Stuart Hughes <seh@zee2.com>
11445
11446 * linux-arm-low.c (arm_num_regs): Increase.
11447 (arm_regmap): Include status register.
11448
11449 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
11450
11451 * linux-low.c (register_addr): Remove incorrect -1 check.
11452
11453 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
11454
11455 * linux-low.c (linux_create_inferior): Call setpgid. Return
11456 the new PID.
11457 (unstopped_p, linux_signal_pid): Remove.
11458 (linux_target_ops): Remove linux_signal_pid.
11459 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11460 global instead of target method.
11461 * target.h (struct target_ops): Remove signal_pid. Update comment
11462 for create_inferior.
11463 * server.c (signal_pid): New variable.
11464 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
11465 gdbserver. Set the child to be the foreground process group.
11466 (attach_inferior): Set signal_pid.
11467
11468 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
11469
11470 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11471
11472 2002-08-20 Jim Blandy <jimb@redhat.com>
11473
11474 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11475 default for this.
11476
11477 2002-08-01 Andrew Cagney <cagney@redhat.com>
11478
11479 * Makefile.in: Make chill references obsolete.
11480
11481 2002-07-24 Kevin Buettner <kevinb@redhat.com>
11482
11483 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11484 * configure: Regenerate.
11485 * config.in: Regenerate.
11486
11487 2002-07-09 David O'Brien <obrien@FreeBSD.org>
11488
11489 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11490 (perror_with_name, remote_close, remote_open, expect, play): Static.
11491
11492 2002-07-04 Michal Ludvig <mludvig@suse.cz>
11493
11494 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
11495 byte offsets instead of an array of indexes.
11496 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11497
11498 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
11499
11500 * regcache.c: Add comment.
11501
11502 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
11503
11504 * thread-db.c: New file.
11505 * proc-service.c: New file.
11506 * acinclude.m4: New file.
11507 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11508 proc-service.o, and thread-db.o.
11509 (linux-low.o): Add USE_THREAD_DB.
11510 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11511 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11512 * aclocal.m4: Regenerated.
11513 * config.in: Regenerated.
11514 * configure: Regenerated.
11515 * configure.in: Check for proc_service.h, sys/procfs.h,
11516 thread_db.h, and linux/elf.h headrs.
11517 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11518 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11519 Check for -lthread_db and thread support.
11520 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11521 PowerPC, and SuperH.
11522 * i387-fp.c: Constify arguments.
11523 * i387-fp.h: Likewise.
11524 * inferiors.c: (struct thread_info): Renamed from
11525 `struct inferior_info'. Remove PID member. Use generic inferior
11526 list header. All uses updated.
11527 (inferiors, signal_pid): Removed.
11528 (all_threads): New variable.
11529 (get_thread): Define.
11530 (add_inferior_to_list): New function.
11531 (for_each_inferior): New function.
11532 (change_inferior_id): New function.
11533 (add_inferior): Removed.
11534 (remove_inferior): New function.
11535 (add_thread): New function.
11536 (free_one_thread): New function.
11537 (remove_thread): New function.
11538 (clear_inferiors): Use for_each_inferior and free_one_thread.
11539 (find_inferior): New function.
11540 (find_inferior_id): New function.
11541 (inferior_target_data): Update argument type.
11542 (set_inferior_target_data): Likewise.
11543 (inferior_regcache_data): Likewise.
11544 (set_inferior_regcache_data): Likewise.
11545 * linux-low.c (linux_bp_reinsert): Remove.
11546 (all_processes, stopping_threads, using_thrads)
11547 (struct pending_signals, debug_threads, pid_of): New.
11548 (inferior_pid): Replace with macro.
11549 (struct inferior_linux_data): Remove.
11550 (get_stop_pc, add_process): New functions.
11551 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11552 Use add_process and add_thread.
11553 (linux_attach_lwp): New function, based on old linux_attach. Use
11554 add_process and add_thread. Set stop_expected for new threads.
11555 (linux_attach): New function.
11556 (linux_kill_one_process): New function.
11557 (linux_kill): Kill all LWPs.
11558 (linux_thread_alive): Use find_inferior_id.
11559 (check_removed_breakpoints, status_pending_p): New functions.
11560 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11561 Update. Use WNOHANG. Wait for cloned processes also. Update process
11562 struct for the found process.
11563 (linux_wait_for_event): New function.
11564 (linux_wait): Use it. Support LWPs.
11565 (send_sigstop, wait_for_sigstop, stop_all_processes)
11566 (linux_resume_one_process, linux_continue_one_process): New functions.
11567 (linux_resume): Support LWPs.
11568 (REGISTER_RAW_SIZE): Remove.
11569 (fetch_register): Use register_size instead. Call supply_register.
11570 (usr_store_inferior_registers): Likewise. Call collect_register.
11571 Fix recursive case.
11572 (regsets_fetch_inferior_registers): Improve error message.
11573 (regsets_store_inferior_registers): Add debugging.
11574 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11575 (unstopped_p, linux_signal_pid): New functions.
11576 (linux_target_ops): Add linux_signal_pid.
11577 (linux_init_signals): New function.
11578 (initialize_low): Call it. Initialize using_threads.
11579 * regcache.c (inferior_regcache_data): Add valid
11580 flag.
11581 (get_regcache): Fetch registers lazily. Add fetch argument
11582 and update all callers.
11583 (regcache_invalidate_one, regcache_invalidate): New
11584 functions.
11585 (new_register_cache): Renamed from create_register_cache.
11586 Return the new regcache.
11587 (free_register_cache): Change argument to a void *.
11588 (registers_to_string, registers_from_string): Call get_regcache
11589 with fetch flag set.
11590 (register_data): Make static. Pass fetch flag to get_regcache.
11591 (supply_register): Call get_regcache with fetch flag clear.
11592 (collect_register): Call get_regcache with fetch flag set.
11593 (collect_register_as_string): New function.
11594 * regcache.h: Update.
11595 * remote-utils.c (putpkt): Flush after debug output and use
11596 stderr.
11597 Handle input interrupts while waiting for an ACK.
11598 (input_interrupt): Use signal_pid method.
11599 (getpkt): Flush after debug output and use stderr.
11600 (outreg): Use collect_register_as_string.
11601 (new_thread_notify, dead_thread_notify): New functions.
11602 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11603 and general_thread.
11604 (look_up_one_symbol): Flush after debug output.
11605 * server.c (step_thread, server_waiting): New variables.
11606 (start_inferior): Don't use signal_pid. Update call to mywait.
11607 (attach_inferior): Update call to mywait.
11608 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11609 (main): Don't fetch/store registers explicitly. Use
11610 set_desired_inferior. Support proposed ``Hs'' packet. Update
11611 calls to mywait.
11612 * server.h: Update.
11613 (struct inferior_list, struct_inferior_list_entry): New.
11614 * target.c (set_desired_inferior): New.
11615 (write_inferior_memory): Constify.
11616 (mywait): New function.
11617 * target.h: Update.
11618 (struct target_ops): New signal_pid method.
11619 (mywait): Removed macro, added prototype.
11620
11621 * linux-low.h (regset_func): Removed.
11622 (regset_fill_func, regset_store_func): New.
11623 (enum regset_type): New.
11624 (struct regset_info): Add type field. Use new operation types.
11625 (struct linux_target_ops): stop_pc renamed to get_pc.
11626 Add decr_pc_after_break and breakpoint_at.
11627 (get_process, get_thread_proess, get_process_thread)
11628 (strut process_info, all_processes, linux_attach_lwp)
11629 (thread_db_init): New.
11630
11631 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11632 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11633 (the_low_target): Add new members.
11634 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11635 (i386_store_fpxregset): Constify.
11636 (target_regsets): Add new kind identifier.
11637 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11638 (i386_set_pc): Add debugging.
11639 (i386_breakpoint_at): New function.
11640 (the_low_target): Add new members.
11641 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11642 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11643 (mips_breakpoint_at): New.
11644 (the_low_target): Add new members.
11645 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11646 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11647 (the_low_target): Add new members.
11648 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11649 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11650 (the_low_target): Add new members.
11651 * linux-x86-64-low.c (target_regsets): Add new kind
11652 identifier.
11653
11654 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
11655
11656 From Martin Pool <mbp@samba.org>:
11657 * server.c (gdbserver_usage): New function.
11658 (main): Call it.
11659
11660 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
11661
11662 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11663 stop_at -> stop_pc.
11664
11665 2002-05-04 Andrew Cagney <ac131313@redhat.com>
11666
11667 * Makefile.in: Remove obsolete code.
11668
11669 2002-04-24 Michal Ludvig <mludvig@suse.cz>
11670
11671 * linux-low.c (regsets_fetch_inferior_registers),
11672 (regsets_store_inferior_registers): Removed cast to int from
11673 ptrace() calls.
11674 * regcache.h: Added declaration of struct inferior_info.
11675
11676 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11677
11678 * inferiors.c (struct inferior_info): Add regcache_data.
11679 (add_inferior): Call create_register_cache.
11680 (clear_inferiors): Call free_register_cache.
11681 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11682 * regcache.c (struct inferior_regcache_data): New.
11683 (registers): Remove.
11684 (get_regcache): New function.
11685 (create_register_cache, free_register_cache): New functions.
11686 (set_register_cache): Don't initialize the register cache here.
11687 (registers_to_string, registers_from_string, register_data): Call
11688 get_regcache.
11689 * regcache.h: Add prototypes.
11690 * server.h: Likewise.
11691
11692 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11693
11694 * mem-break.c: New file.
11695 * mem-break.h: New file.
11696 * Makefile.in: Add mem-break.o rule; update server.h
11697 dependencies.
11698 * inferiors.c (struct inferior_info): Add target_data
11699 member.
11700 (clear_inferiors): Free target_data member if set.
11701 (inferior_target_data, set_inferior_target_data): New functions.
11702 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11703 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11704 * linux-low.c (linux_bp_reinsert): New variable.
11705 (struct inferior_linux_data): New.
11706 (linux_create_inferior): Use set_inferior_target_data.
11707 (linux_attach): Likewise. Call add_inferior.
11708 (linux_wait_for_one_inferior): New function.
11709 (linux_wait): Call it.
11710 (linux_write_memory): Add const.
11711 (initialize_low): Call set_breakpoint_data.
11712 * linux-low.h (struct linux_target_ops): Add breakpoint
11713 handling members.
11714 * server.c (attach_inferior): Remove extra add_inferior
11715 call.
11716 * server.h: Include mem-break.h. Update inferior.c
11717 prototypes.
11718 * target.c (read_inferior_memory)
11719 (write_inferior_memory): New functions.
11720 * target.h (read_inferior_memory)
11721 (write_inferior_memory): Change macros to prototypes.
11722 (struct target_ops): Update comments. Add const to write_memory
11723 definition.
11724
11725 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
11726
11727 * linux-low.c (usr_store_inferior_registers): Support
11728 registers which are allowed to fail to store.
11729 * linux-low.h (linux_target_ops): Likewise.
11730 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11731 (ppc_cannot_store_register): FPSCR may not be storable.
11732
11733 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11734
11735 * server.h: Include <string.h> if HAVE_STRING_H.
11736 * ChangeLog: Correct paths in last ChangeLog entry.
11737
11738 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11739
11740 * linux-low.h: Remove obsolete prototypes.
11741 (struct linux_target_ops): New.
11742 (extern the_low_target): New.
11743 * linux-low.c (num_regs, regmap): Remove declarations.
11744 (register_addr): Use the_low_target explicitly.
11745 (fetch_register): Likewise.
11746 (usr_fetch_inferior_registers): Likewise.
11747 (usr_store_inferior_registers): Likewise.
11748 * linux-arm-low.c (num_regs): Remove.
11749 (arm_num_regs): Define.
11750 (arm_regmap): Renamed from regmap, made static.
11751 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11752 made static.
11753 (arm_cannot_store_register): Renamed from cannot_store_register,
11754 made static.
11755 (the_low_target): New.
11756 * linux-i386-low.c (num_regs): Remove.
11757 (i386_num_regs): Define.
11758 (i386_regmap): Renamed from regmap, made static.
11759 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11760 made static.
11761 (i386_cannot_store_register): Renamed from cannot_store_register,
11762 made static.
11763 (the_low_target): New.
11764 * linux-ia64-low.c (num_regs): Remove.
11765 (ia64_num_regs): Define.
11766 (ia64_regmap): Renamed from regmap, made static.
11767 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11768 made static.
11769 (ia64_cannot_store_register): Renamed from cannot_store_register,
11770 made static.
11771 (the_low_target): New.
11772 * linux-m68k-low.c (num_regs): Remove.
11773 (m68k_num_regs): Define.
11774 (m68k_regmap): Renamed from regmap, made static.
11775 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11776 made static.
11777 (m68k_cannot_store_register): Renamed from cannot_store_register,
11778 made static.
11779 (the_low_target): New.
11780 * linux-mips-low.c (num_regs): Remove.
11781 (mips_num_regs): Define.
11782 (mips_regmap): Renamed from regmap, made static.
11783 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11784 made static.
11785 (mips_cannot_store_register): Renamed from cannot_store_register,
11786 made static.
11787 (the_low_target): New.
11788 * linux-ppc-low.c (num_regs): Remove.
11789 (ppc_num_regs): Define.
11790 (ppc_regmap): Renamed from regmap, made static.
11791 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11792 made static.
11793 (ppc_cannot_store_register): Renamed from cannot_store_register,
11794 made static.
11795 (the_low_target): New.
11796 * linux-s390-low.c (num_regs): Remove.
11797 (s390_num_regs): Define.
11798 (s390_regmap): Renamed from regmap, made static.
11799 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11800 made static.
11801 (s390_cannot_store_register): Renamed from cannot_store_register,
11802 made static.
11803 (the_low_target): New.
11804 * linux-sh-low.c (num_regs): Remove.
11805 (sh_num_regs): Define.
11806 (sh_regmap): Renamed from regmap, made static.
11807 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11808 made static.
11809 (sh_cannot_store_register): Renamed from cannot_store_register,
11810 made static.
11811 (the_low_target): New.
11812 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11813 (the_low_target): New.
11814
11815 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11816
11817 * Makefile.in: Add stamp-h target.
11818 * configure.in: Create stamp-h.
11819 * configure: Regenerated.
11820
11821 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11822
11823 * inferiors.c: New file.
11824 * target.c: New file.
11825 * target.h: New file.
11826 * Makefile.in: Add target.o and inferiors.o. Update
11827 dependencies.
11828 * linux-low.c (inferior_pid): New static variable,
11829 moved from server.c.
11830 (linux_create_inferior): Renamed from create_inferior.
11831 Call add_inferior. Return 0 on success instead of a PID.
11832 (linux_attach): Renamed from myattach.
11833 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11834 (linux_thread_alive): Renamed from mythread_alive.
11835 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11836 child dies.
11837 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11838 (regsets_store_inferior_registers): Correct error message.
11839 Add missing ``return 0''.
11840 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11841 (linux_store_registers): Renamed from store_inferior_registers.
11842 (linux_read_memory): Renamed from read_inferior_memory.
11843 (linux_write_memory): Renamed from write_inferior_memory.
11844 (linux_target_ops): New structure.
11845 (initialize_low): Call set_target_ops ().
11846 * remote-utils.c (unhexify): New function.
11847 (hexify): New function.
11848 (input_interrupt): Send signals to ``signal_pid''.
11849 * server.c (inferior_pid): Remove.
11850 (start_inferior): Update create_inferior call.
11851 (attach_inferior): Call add_inferior.
11852 (handle_query): New function.
11853 (main): Call handle_query for `q' packets.
11854 * server.h: Include "target.h". Remove obsolete prototypes.
11855 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11856
11857 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11858
11859 * Makefile.in: Add WARN_CFLAGS. Update configury
11860 dependencies.
11861 * configure.in: Check for <string.h>
11862 * configure: Regenerate.
11863 * config.in: Regenerate.
11864 * gdbreplay.c: Include needed system headers.
11865 (remote_open): Remove strchr prototype.
11866 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11867 * regcache.c (supply_register): Change buf argument to const void *.
11868 (supply_register_by_name): Likewise.
11869 (collect_register): Change buf argument to void *.
11870 (collect_register_by_name): Likewise.
11871 * regcache.h: Add missing prototypes.
11872 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11873 * server.c (handle_query): New function.
11874 (attached): New static variable, moved out of main.
11875 (main): Quiet longjmp clobber warnings.
11876 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11877 * utils.c (error): Remove NORETURN.
11878 (fatal): Likewise.
This page took 0.318187 seconds and 4 git commands to generate.